[MediaWiki-commits] [Gerrit] integration/config[master]: Archive OAI extension

2016-12-20 Thread Aklapper (Code Review)
Aklapper has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328475 )

Change subject: Archive OAI extension
..

Archive OAI extension

Bug: T129864
Change-Id: I9ad1216e62f645652bbd92ccb4cda23d669057f4
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/75/328475/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 32067e2..921ab80 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4346,11 +4346,7 @@
 
   - name: mediawiki/extensions/OAI
 template:
-  - name: jshint
-  - name: extension-unittests-generic
-  - name: npm
-check:
-  - jsonlint
+  - name: archived
 
   - name: mediawiki/extensions/OAuth
 template:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Parser functions now format numbers according to page langua...

2016-12-20 Thread Nikerabbit (Code Review)
Nikerabbit has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/319528 )

Change subject: Parser functions now format numbers according to page language 
(2nd attempt)
..


Parser functions now format numbers according to page language (2nd attempt)

Bug: T62604
Change-Id: I1c60d828891b82a8122e7030d843018fccaf72e4
---
M RELEASE-NOTES-1.29
M includes/parser/CoreParserFunctions.php
2 files changed, 44 insertions(+), 16 deletions(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 5ff4ca9..3bd9a18 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -38,6 +38,8 @@
  Removed and replaced external libraries 
 
 === Bug fixes in 1.29 ===
+* (T62604) Core parser functions returning a number now format the number 
according
+  to the page content language, not wiki content language.
 
 === Action API changes in 1.29 ===
 * Submitting sensitive authentication request parameters to action=clientlogin,
diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index 4c82dda..51cb410 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -489,40 +489,66 @@
return $mwObject->matchStartToEnd( $value );
}
 
-   public static function formatRaw( $num, $raw ) {
+   /**
+* Formats a number according to a language.
+*
+* @param int|float $num
+* @param string $raw
+* @param Language|StubUserLang $language
+* @return string
+*/
+   public static function formatRaw( $num, $raw, $language ) {
if ( self::matchAgainstMagicword( 'rawsuffix', $raw ) ) {
return $num;
} else {
-   global $wgContLang;
-   return $wgContLang->formatNum( $num );
+   return $language->formatNum( $num );
}
}
+
public static function numberofpages( $parser, $raw = null ) {
-   return self::formatRaw( SiteStats::pages(), $raw );
+   return self::formatRaw( SiteStats::pages(), $raw, 
$parser->getFunctionLang() );
}
+
public static function numberofusers( $parser, $raw = null ) {
-   return self::formatRaw( SiteStats::users(), $raw );
+   return self::formatRaw( SiteStats::users(), $raw, 
$parser->getFunctionLang() );
}
public static function numberofactiveusers( $parser, $raw = null ) {
-   return self::formatRaw( SiteStats::activeUsers(), $raw );
+   return self::formatRaw( SiteStats::activeUsers(), $raw, 
$parser->getFunctionLang() );
}
+
public static function numberofarticles( $parser, $raw = null ) {
-   return self::formatRaw( SiteStats::articles(), $raw );
+   return self::formatRaw( SiteStats::articles(), $raw, 
$parser->getFunctionLang() );
}
+
public static function numberoffiles( $parser, $raw = null ) {
-   return self::formatRaw( SiteStats::images(), $raw );
+   return self::formatRaw( SiteStats::images(), $raw, 
$parser->getFunctionLang() );
}
+
public static function numberofadmins( $parser, $raw = null ) {
-   return self::formatRaw( SiteStats::numberingroup( 'sysop' ), 
$raw );
+   return self::formatRaw(
+   SiteStats::numberingroup( 'sysop' ),
+   $raw,
+   $parser->getFunctionLang()
+   );
}
+
public static function numberofedits( $parser, $raw = null ) {
-   return self::formatRaw( SiteStats::edits(), $raw );
+   return self::formatRaw( SiteStats::edits(), $raw, 
$parser->getFunctionLang() );
}
+
public static function pagesinnamespace( $parser, $namespace = 0, $raw 
= null ) {
-   return self::formatRaw( SiteStats::pagesInNs( intval( 
$namespace ) ), $raw );
+   return self::formatRaw(
+   SiteStats::pagesInNs( intval( $namespace ) ),
+   $raw,
+   $parser->getFunctionLang()
+   );
}
public static function numberingroup( $parser, $name = '', $raw = null 
) {
-   return self::formatRaw( SiteStats::numberingroup( strtolower( 
$name ) ), $raw );
+   return self::formatRaw(
+   SiteStats::numberingroup( strtolower( $name ) ),
+   $raw,
+   $parser->getFunctionLang()
+   );
}
 
/**
@@ -729,7 +755,7 @@
 
$title = Title::makeTitleSafe( NS_CATEGORY, $name );
if ( !$title ) { # invalid title
-   return self::formatRaw( 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Increase hhvm threads and transcode capabilities on mw116[89]

2016-12-20 Thread Elukey (Code Review)
Elukey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328473 )

Change subject: Increase hhvm threads and transcode capabilities on mw116[89]
..

Increase hhvm threads and transcode capabilities on mw116[89]

These videoscalers are power powerful and can manage more transcode
jobs at the same time. This change should improve their overall
utilization and help a bit reducing the transcode backlog.

Bug: T153488
Change-Id: I7e2ed5cb5e3776b2f5e6f0d025b7e16c3f4a
---
A hieradata/hosts/mw1168.yaml
A hieradata/hosts/mw1169.yaml
2 files changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/328473/1

diff --git a/hieradata/hosts/mw1168.yaml b/hieradata/hosts/mw1168.yaml
new file mode 100644
index 000..0130502
--- /dev/null
+++ b/hieradata/hosts/mw1168.yaml
@@ -0,0 +1,5 @@
+mediawiki::jobrunner::runners_transcode: 10
+hhvm::extra::fcgi:
+  hhvm:
+server:
+  thread_count: 15
\ No newline at end of file
diff --git a/hieradata/hosts/mw1169.yaml b/hieradata/hosts/mw1169.yaml
new file mode 100644
index 000..0130502
--- /dev/null
+++ b/hieradata/hosts/mw1169.yaml
@@ -0,0 +1,5 @@
+mediawiki::jobrunner::runners_transcode: 10
+hhvm::extra::fcgi:
+  hhvm:
+server:
+  thread_count: 15
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Pin eslint version

2016-12-20 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328474 )

Change subject: Pin eslint version
..

Pin eslint version

Same as core did in I1c76dacd0950100825b85a3791f74c1f6d5477d9

Change-Id: Id977f752afd9a5bf48f4f5e40c7116df816e0de4
---
M package.json
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/package.json b/package.json
index fedc0ea..84b5fd4 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
 "test": "grunt test"
   },
   "devDependencies": {
+"eslint": "3.12.2",
 "eslint-config-wikimedia": "0.3.0",
 "grunt": "1.0.1",
 "grunt-banana-checker": "0.5.0",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id977f752afd9a5bf48f4f5e40c7116df816e0de4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: For editing, allow only local entity types.

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328417 )

Change subject: For editing, allow only local entity types.
..


For editing, allow only local entity types.

Change-Id: I6881dcc2468ab675e7836eb6dc483a5c5ade40ba
---
M repo/includes/Api/ModifyEntity.php
M repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php
M repo/tests/phpunit/includes/Api/EditEntityTest.php
M repo/tests/phpunit/includes/Api/EntitySavingHelperTest.php
4 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/repo/includes/Api/ModifyEntity.php 
b/repo/includes/Api/ModifyEntity.php
index 67ff404..ca22ad6 100644
--- a/repo/includes/Api/ModifyEntity.php
+++ b/repo/includes/Api/ModifyEntity.php
@@ -109,7 +109,7 @@
$this->resultBuilder = $apiHelperFactory->getResultBuilder( 
$this );
$this->entitySavingHelper = 
$apiHelperFactory->getEntitySavingHelper( $this );
$this->stringNormalizer = $wikibaseRepo->getStringNormalizer();
-   $this->enabledEntityTypes = 
$wikibaseRepo->getEnabledEntityTypes();
+   $this->enabledEntityTypes = 
$wikibaseRepo->getLocalEntityTypes();
 
$this->entitySavingHelper->setEntityIdParam( 'id' );
 
diff --git a/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php 
b/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php
index d98b5db..3a559ef 100644
--- a/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php
+++ b/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php
@@ -23,7 +23,7 @@
 
return new self(

$wikibaseRepo->getStore()->newEntitiesWithoutTermFinder(),
-   $wikibaseRepo->getEnabledEntityTypes(),
+   $wikibaseRepo->getLocalEntityTypes(),
$wikibaseRepo->getTermsLanguages(),
new LanguageNameLookup()
);
diff --git a/repo/tests/phpunit/includes/Api/EditEntityTest.php 
b/repo/tests/phpunit/includes/Api/EditEntityTest.php
index b6ca308..ea926e5 100644
--- a/repo/tests/phpunit/includes/Api/EditEntityTest.php
+++ b/repo/tests/phpunit/includes/Api/EditEntityTest.php
@@ -414,7 +414,7 @@
return;
}
 
-   $enabledTypes = 
WikibaseRepo::getDefaultInstance()->getEnabledEntityTypes();
+   $enabledTypes = 
WikibaseRepo::getDefaultInstance()->getLocalEntityTypes();
if ( !in_array( $requiredEntityType, $enabledTypes ) ) {
$this->markTestSkipped( 'Entity type not enabled: ' . 
$requiredEntityType );
}
diff --git a/repo/tests/phpunit/includes/Api/EntitySavingHelperTest.php 
b/repo/tests/phpunit/includes/Api/EntitySavingHelperTest.php
index 9f66468..b8b5399 100644
--- a/repo/tests/phpunit/includes/Api/EntitySavingHelperTest.php
+++ b/repo/tests/phpunit/includes/Api/EntitySavingHelperTest.php
@@ -49,7 +49,7 @@
return;
}
 
-   $enabledTypes = 
WikibaseRepo::getDefaultInstance()->getEnabledEntityTypes();
+   $enabledTypes = 
WikibaseRepo::getDefaultInstance()->getLocalEntityTypes();
if ( !in_array( $requiredEntityType, $enabledTypes ) ) {
$this->markTestSkipped( 'Entity type not enabled: ' . 
$requiredEntityType );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6881dcc2468ab675e7836eb6dc483a5c5ade40ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Jakob 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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...BlueSpiceSMWConnector[REL1_23]: Attribute registration

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327736 )

Change subject: Attribute registration
..


Attribute registration

Change-Id: I8431dd556300245933acb8205d71d985cc18528c
---
M LocalSettings.BlueSpiceSemantics.php
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/LocalSettings.BlueSpiceSemantics.php 
b/LocalSettings.BlueSpiceSemantics.php
index 3326e53..6814f6e 100644
--- a/LocalSettings.BlueSpiceSemantics.php
+++ b/LocalSettings.BlueSpiceSemantics.php
@@ -29,3 +29,17 @@
 require_once "$IP/extensions/PageSchemas/PageSchemas.php";
 
 require_once( "$IP/extensions/BlueSpiceSMWConnector/BlueSpiceSMWConnector.php" 
);
+
+$GLOBALS['smwgPageSpecialProperties'] = array_merge( 
$GLOBALS['smwgPageSpecialProperties'], array(
+   '_CDAT', '_LEDT', '_NEWP', '_MIME', '_MEDIA'
+) );
+$GLOBALS['smwgEnabledEditPageHelp'] = false;
+
+
+$GLOBALS['sespUseAsFixedTables'] = true;
+$GLOBALS['wgSESPExcludeBots'] = true;
+
+$GLOBALS['sespSpecialProperties'] = array(
+   '_EUSER', '_CUSER', '_REVID', '_PAGEID', '_VIEWS', '_NREV', '_TNREV',
+   '_SUBP', '_USERREG', '_USEREDITCNT', '_EXIFDATA'
+);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8431dd556300245933acb8205d71d985cc18528c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceSMWConnector
Gerrit-Branch: REL1_23
Gerrit-Owner: ItSpiderman 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Start showing warnings for deprecated PHP entry point

2016-12-20 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328471 )

Change subject: Start showing warnings for deprecated PHP entry point
..

Start showing warnings for deprecated PHP entry point

Change-Id: I0ef9a614048ec139f15353eac554a91500119eca
---
M UniversalLanguageSelector.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php
index 2bfd3d3..e85a361 100644
--- a/UniversalLanguageSelector.php
+++ b/UniversalLanguageSelector.php
@@ -22,11 +22,11 @@
wfLoadExtension( 'UniversalLanguageSelector' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['UniversalLanguageSelector'] = __DIR__ . '/i18n';
-   /* wfWarn(
+   wfWarn(
'Deprecated PHP entry point used for UniversalLanguageSelector 
extension. ' .
'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
+   );
return;
 } else {
die( 'Universal Language Selector extension requires MediaWiki 1.25 or 
later' );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.api.watch: Remove the uselang parameter in POST

2016-12-20 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328472 )

Change subject: mediawiki.api.watch: Remove the uselang parameter in POST
..

mediawiki.api.watch: Remove the uselang parameter in POST

Since 1f15d1d5828dfbc70d036a52da57460ea0e89175 the response does not contain
any user language specific messages anymore.

Change-Id: I525af200e3d1a48877438a997e78bb5fff297357
---
M resources/src/mediawiki/api/watch.js
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/resources/src/mediawiki/api/watch.js 
b/resources/src/mediawiki/api/watch.js
index f68697f..501a9dd 100644
--- a/resources/src/mediawiki/api/watch.js
+++ b/resources/src/mediawiki/api/watch.js
@@ -29,7 +29,6 @@
formatversion: 2,
action: 'watch',
titles: $.isArray( pages ) ? 
pages.join( '|' ) : String( pages ),
-   uselang: mw.config.get( 
'wgUserLanguage' )
},
addParams
)

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: PopupButtonWidget: Remove unnecessary CSS property

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328442 )

Change subject: PopupButtonWidget: Remove unnecessary CSS property
..


PopupButtonWidget: Remove unnecessary CSS property

Removing unnecessary CSS property, as `position: absolute` is already
set on `.oo-ui-popupWidget` anyways.

Change-Id: I543787044e1c2e8ad87146baeae3bb479d601b6e
---
M src/styles/widgets/PopupButtonWidget.less
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/src/styles/widgets/PopupButtonWidget.less 
b/src/styles/widgets/PopupButtonWidget.less
index 805239e..b87be1d 100644
--- a/src/styles/widgets/PopupButtonWidget.less
+++ b/src/styles/widgets/PopupButtonWidget.less
@@ -4,7 +4,6 @@
position: relative;
 
.oo-ui-popupWidget {
-   position: absolute;
cursor: auto;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I543787044e1c2e8ad87146baeae3bb479d601b6e
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Prtksxna 
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]: Pin eslint version

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328049 )

Change subject: Pin eslint version
..


Pin eslint version

We don't want tests failing every time upstream publishing a new
version.

Instead we should bump this manually everytime they update to make sure
no failures happen.

Bug: T118941
Change-Id: I1c76dacd0950100825b85a3791f74c1f6d5477d9
---
M package.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/package.json b/package.json
index 99e752c..e415d66 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
 "postdoc": "grunt copy:jsduck"
   },
   "devDependencies": {
+"eslint": "3.12.2",
 "eslint-config-wikimedia": "0.3.0",
 "grunt": "1.0.1",
 "grunt-banana-checker": "0.5.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c76dacd0950100825b85a3791f74c1f6d5477d9
Gerrit-PatchSet: 14
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
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] mediawiki...LocalisationUpdate[master]: Start showing warnings for deprecated PHP entry point

2016-12-20 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328470 )

Change subject: Start showing warnings for deprecated PHP entry point
..

Start showing warnings for deprecated PHP entry point

Change-Id: I5a1456a1a7679266420694bfae905c3ba92aa595
---
M LocalisationUpdate.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/LocalisationUpdate.php b/LocalisationUpdate.php
index 03114bf..4589968 100644
--- a/LocalisationUpdate.php
+++ b/LocalisationUpdate.php
@@ -4,11 +4,11 @@
wfLoadExtension( 'LocalisationUpdate' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
$GLOBALS['wgMessagesDirs']['LocalisationUpdate'] = __DIR__ . '/i18n';
-   /* wfWarn(
+   wfWarn(
'Deprecated PHP entry point used for LocalisationUpdate 
extension. ' .
'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
+   );
return;
 } else {
die( 'This version of the LocalisationUpdate extension requires 
MediaWiki 1.25+' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a1456a1a7679266420694bfae905c3ba92aa595
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LocalisationUpdate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 

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


[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: [WIP] Preview node on graph dialog (GeneratedContentNode imp...

2016-12-20 Thread Ferdbold (Code Review)
Ferdbold has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328469 )

Change subject: [WIP] Preview node on graph dialog (GeneratedContentNode 
implementation)
..

[WIP] Preview node on graph dialog (GeneratedContentNode implementation)

Bug: T151127
Change-Id: I8f3510e7082ca43ae1e0f24238c885b7a19961f9
---
M extension.json
M modules/ve-graph/ve.ce.MWGraphNode.js
M modules/ve-graph/ve.dm.MWGraphNode.js
A modules/ve-graph/ve.ui.MWGraphDialog.css
M modules/ve-graph/ve.ui.MWGraphDialog.js
5 files changed, 81 insertions(+), 12 deletions(-)


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

diff --git a/extension.json b/extension.json
index 7384adc..018bf43 100644
--- a/extension.json
+++ b/extension.json
@@ -114,6 +114,7 @@
"modules/ve-graph/widgets/ve.ui.TableWidget.js"
],
"styles": [
+   "modules/ve-graph/ve.ui.MWGraphDialog.css",
"modules/ve-graph/ve.ce.MWGraphNode.css",
"modules/ve-graph/ve.ui.MWGraphIcons.css",
"modules/ve-graph/widgets/ve.ui.RowWidget.css",
diff --git a/modules/ve-graph/ve.ce.MWGraphNode.js 
b/modules/ve-graph/ve.ce.MWGraphNode.js
index 4a4010d..58d9703 100644
--- a/modules/ve-graph/ve.ce.MWGraphNode.js
+++ b/modules/ve-graph/ve.ce.MWGraphNode.js
@@ -113,9 +113,11 @@
 
 /**
  * Render a Vega graph inside the node
+ * @override
  */
-ve.ce.MWGraphNode.prototype.update = function () {
-   var node = this;
+ve.ce.MWGraphNode.prototype.generateContents = function() {
+   var node = this,
+   deferred = $.Deferred();
 
// Clear element
this.$graph.empty();
@@ -134,12 +136,25 @@
node.$plot.css( view._padding );
 
node.calculateHighlights();
+
+   deferred.resolve( node.$element.get() );
},
function ( failMessageKey ) {
node.$graph.text( ve.msg( failMessageKey ) );
+   deferred.resolve( node.$element.get() );
}
);
} );
+
+   return deferred.promise();
+};
+
+/**
+ * @override
+ */
+ve.ce.MWGraphNode.prototype.validateGeneratedContents = function () {
+   // Always invalidate cached renders since the canvas will be blank 
inside
+   return false;
 };
 
 /**
diff --git a/modules/ve-graph/ve.dm.MWGraphNode.js 
b/modules/ve-graph/ve.dm.MWGraphNode.js
index 20f07ae..82d027c 100644
--- a/modules/ve-graph/ve.dm.MWGraphNode.js
+++ b/modules/ve-graph/ve.dm.MWGraphNode.js
@@ -181,6 +181,25 @@
return result || '';
 };
 
+/**
+ * @override
+ */
+ve.dm.MWGraphNode.static.toDataElement = function ( domElements ) {
+   var dataElement,
+   mwDataJSON = domElements[ 0 ].getAttribute( 'data-mw' ),
+   mwData = mwDataJSON ? JSON.parse( mwDataJSON ) : {};
+
+   dataElement = {
+   type: this.name,
+   attributes: {
+   mw: mwData,
+   originalMw: mwDataJSON
+   }
+   };
+
+   return dataElement;
+};
+
 /* Methods */
 
 /**
diff --git a/modules/ve-graph/ve.ui.MWGraphDialog.css 
b/modules/ve-graph/ve.ui.MWGraphDialog.css
new file mode 100644
index 000..58ed897
--- /dev/null
+++ b/modules/ve-graph/ve.ui.MWGraphDialog.css
@@ -0,0 +1,7 @@
+.ve-ui-graphDialog-menuLayout-content {
+   overflow: auto;
+}
+
+.ve-ui-mwGraphDialog-preview {
+   text-align: center;
+}
diff --git a/modules/ve-graph/ve.ui.MWGraphDialog.js 
b/modules/ve-graph/ve.ui.MWGraphDialog.js
index cc05ab7..0be993d 100644
--- a/modules/ve-graph/ve.ui.MWGraphDialog.js
+++ b/modules/ve-graph/ve.ui.MWGraphDialog.js
@@ -8,7 +8,7 @@
  * MediaWiki graph dialog.
  *
  * @class
- * @extends ve.ui.MWExtensionDialog
+ * @extends ve.ui.MWExtensionPreviewDialog
  *
  * @constructor
  * @param {Object} [element]
@@ -26,7 +26,7 @@
 
 /* Inheritance */
 
-OO.inheritClass( ve.ui.MWGraphDialog, ve.ui.MWExtensionDialog );
+OO.inheritClass( ve.ui.MWGraphDialog, ve.ui.MWExtensionPreviewDialog );
 
 /* Static properties */
 
@@ -35,6 +35,8 @@
 ve.ui.MWGraphDialog.static.title = OO.ui.deferMsg( 
'graph-ve-dialog-edit-title' );
 
 ve.ui.MWGraphDialog.static.size = 'large';
+
+ve.ui.MWGraphDialog.static.modelClasses = [ ve.dm.MWGraphNode ];
 
 ve.ui.MWGraphDialog.static.actions = [
{
@@ -55,8 +57,6 @@
modes: [ 'edit', 'insert' ]
}
 ];
-
-ve.ui.MWGraphDialog.static.modelClasses = [ ve.dm.MWGraphNode ];
 
 /* Methods */
 
@@ -81,7 +81,17 @@
ve.ui.MWGraphDialog.super.prototype.initialize.call( this );
 
/* Root layout */
-   this.rootLayout = new OO.ui.BookletLayout( {
+  

[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Preview node on graph dialog

2016-12-20 Thread Ferdbold (Code Review)
Ferdbold has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328468 )

Change subject: Preview node on graph dialog
..

Preview node on graph dialog

Bug: T151127
Change-Id: Ia03568165e821f2617e6fc87f36d3b1d97e6c6aa
---
M extension.json
M modules/ve-graph/ve.dm.MWGraphNode.js
A modules/ve-graph/ve.ui.MWGraphDialog.css
M modules/ve-graph/ve.ui.MWGraphDialog.js
4 files changed, 60 insertions(+), 10 deletions(-)


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

diff --git a/extension.json b/extension.json
index 7384adc..018bf43 100644
--- a/extension.json
+++ b/extension.json
@@ -114,6 +114,7 @@
"modules/ve-graph/widgets/ve.ui.TableWidget.js"
],
"styles": [
+   "modules/ve-graph/ve.ui.MWGraphDialog.css",
"modules/ve-graph/ve.ce.MWGraphNode.css",
"modules/ve-graph/ve.ui.MWGraphIcons.css",
"modules/ve-graph/widgets/ve.ui.RowWidget.css",
diff --git a/modules/ve-graph/ve.dm.MWGraphNode.js 
b/modules/ve-graph/ve.dm.MWGraphNode.js
index 20f07ae..1f92141 100644
--- a/modules/ve-graph/ve.dm.MWGraphNode.js
+++ b/modules/ve-graph/ve.dm.MWGraphNode.js
@@ -51,6 +51,8 @@
 
 ve.dm.MWGraphNode.static.name = 'mwGraph';
 
+ve.dm.MWExtensionNode.static.tagName = 'div';
+
 ve.dm.MWGraphNode.static.extensionName = 'graph';
 
 ve.dm.MWGraphNode.static.defaultSpec = {
@@ -181,6 +183,19 @@
return result || '';
 };
 
+/**
+ * @override
+ */
+ve.dm.MWGraphNode.static.toDomElements = function ( dataElement, doc, 
converter ) {
+   var element = ve.dm.MWExtensionNode.static.toDomElements.call( this, 
dataElement, doc, converter ),
+   spec = ve.dm.MWGraphNode.static.parseSpecString( 
dataElement.attributes.mw.body.extsrc );
+
+   // Render Vega asynchronously for preview element purposes
+   ve.ce.MWGraphNode.static.vegaParseSpec( spec, element[ 0 ] );
+
+   return element;
+};
+
 /* Methods */
 
 /**
diff --git a/modules/ve-graph/ve.ui.MWGraphDialog.css 
b/modules/ve-graph/ve.ui.MWGraphDialog.css
new file mode 100644
index 000..58ed897
--- /dev/null
+++ b/modules/ve-graph/ve.ui.MWGraphDialog.css
@@ -0,0 +1,7 @@
+.ve-ui-graphDialog-menuLayout-content {
+   overflow: auto;
+}
+
+.ve-ui-mwGraphDialog-preview {
+   text-align: center;
+}
diff --git a/modules/ve-graph/ve.ui.MWGraphDialog.js 
b/modules/ve-graph/ve.ui.MWGraphDialog.js
index cc05ab7..0be993d 100644
--- a/modules/ve-graph/ve.ui.MWGraphDialog.js
+++ b/modules/ve-graph/ve.ui.MWGraphDialog.js
@@ -8,7 +8,7 @@
  * MediaWiki graph dialog.
  *
  * @class
- * @extends ve.ui.MWExtensionDialog
+ * @extends ve.ui.MWExtensionPreviewDialog
  *
  * @constructor
  * @param {Object} [element]
@@ -26,7 +26,7 @@
 
 /* Inheritance */
 
-OO.inheritClass( ve.ui.MWGraphDialog, ve.ui.MWExtensionDialog );
+OO.inheritClass( ve.ui.MWGraphDialog, ve.ui.MWExtensionPreviewDialog );
 
 /* Static properties */
 
@@ -35,6 +35,8 @@
 ve.ui.MWGraphDialog.static.title = OO.ui.deferMsg( 
'graph-ve-dialog-edit-title' );
 
 ve.ui.MWGraphDialog.static.size = 'large';
+
+ve.ui.MWGraphDialog.static.modelClasses = [ ve.dm.MWGraphNode ];
 
 ve.ui.MWGraphDialog.static.actions = [
{
@@ -55,8 +57,6 @@
modes: [ 'edit', 'insert' ]
}
 ];
-
-ve.ui.MWGraphDialog.static.modelClasses = [ ve.dm.MWGraphNode ];
 
 /* Methods */
 
@@ -81,7 +81,17 @@
ve.ui.MWGraphDialog.super.prototype.initialize.call( this );
 
/* Root layout */
-   this.rootLayout = new OO.ui.BookletLayout( {
+   this.rootLayout = new OO.ui.MenuLayout( {
+   menuPosition: 'bottom'
+   } );
+
+   /* Preview element */
+   this.previewElement.$element.addClass(
+   've-ui-mwGraphDialog-preview'
+   );
+
+   /* Menu layout */
+   this.menuLayout = new OO.ui.BookletLayout( {
classes: [ 've-ui-mwGraphDialog-panel-root' ],
outlined: true
} );
@@ -90,7 +100,7 @@
this.dataPage = new OO.ui.PageLayout( 'data' );
this.rawPage = new OO.ui.PageLayout( 'raw' );
 
-   this.rootLayout.addPages( [
+   this.menuLayout.addPages( [
this.generalPage, this.dataPage, this.rawPage
] );
 
@@ -213,7 +223,7 @@
this.rawPage.$element.append( jsonTextField.$element );
 
// Events
-   this.rootLayout.connect( this, { set: 'onRootLayoutSet' } );
+   this.menuLayout.connect( this, { set: 'onMenuLayoutSet' } );
 
this.graphTypeDropdownInput.connect( this, { change: 
'onGraphTypeInputChange' } );
this.sizeWidget.connect( this, { change: 'onSizeWidgetChange' } );
@@ -230,6 +240,13 @@
this.jsonTextInput.connect( this, { change: 'onSpecStringInputChange' } 
);
 
// 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] aptly: Make aptly work with Apache

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328467 )

Change subject: [WIP] aptly: Make aptly work with Apache
..

[WIP] aptly: Make aptly work with Apache

Currently aptly (only) installs an nginx server.  This is inconvenient
for instances where there is already an Apache server in use, for
example as a standalone puppetmaster.  This change adds a parameter
$manage_apache that enables support for Apache servers.

Bug: T153814
Change-Id: I3f638c6837675e41bc7966ab293cc2ffd48aaa70
---
M modules/aptly/manifests/init.pp
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/328467/1

diff --git a/modules/aptly/manifests/init.pp b/modules/aptly/manifests/init.pp
index 79d2687..b0a9680 100644
--- a/modules/aptly/manifests/init.pp
+++ b/modules/aptly/manifests/init.pp
@@ -3,6 +3,7 @@
 #
 # Set up to only allow root to add packages
 class aptly(
+$manage_apache=false,
 $manage_nginx=true,
 $owner='root',
 $group='root',
@@ -25,6 +26,13 @@
 mode   => '0444',
 }
 
+if $manage_apache {
+apache::static_site { 'aptly-server':
+servername => $::fqdn,
+docroot=> '/srv/packages/public',
+}
+}
+
 if $manage_nginx {
 nginx::site { 'aptly-server':
 source => 'puppet:///modules/aptly/aptly.nginx.conf',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f638c6837675e41bc7966ab293cc2ffd48aaa70
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: apache: Fix some issues with apache::static_site

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328466 )

Change subject: apache: Fix some issues with apache::static_site
..

apache: Fix some issues with apache::static_site

apache::static_site:

- Uses the function any2array() that is not defined,
- specifies the wrong path to the template static_site.conf.erb,
- calls apache::site with the non-existent parameter conf_type, and
- calls the function is_domain_name() with the parameter $servername
  which fails when a string constant like $::fqdn is passed.

This change fixes those issues.

Bug: T153816
Change-Id: I3b48f44a3c6532bacc75eba766e200d183eac299
---
M modules/apache/manifests/static_site.pp
M modules/apache/templates/static_site.conf.erb
M modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb
3 files changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/328466/1

diff --git a/modules/apache/manifests/static_site.pp 
b/modules/apache/manifests/static_site.pp
index 81238c8..3bf68de 100644
--- a/modules/apache/manifests/static_site.pp
+++ b/modules/apache/manifests/static_site.pp
@@ -43,7 +43,6 @@
 validate_ensure($ensure)
 validate_absolute_path($docroot)
 
-$ldap_groups = any2array($restricted_to)
 $servername_safe = regsubst($servername, '[\W_]', '-', 'G')
 $servername_real = is_domain_name($servername) ? {
 true  => $servername,
@@ -54,7 +53,7 @@
 include ::apache::mod::headers
 include ::apache::mod::rewrite
 
-if ! empty($ldap_groups) {
+if ! empty($restricted_to) {
 include ::apache::mod::authnz_ldap
 include ::passwords::ldap::production
 }
@@ -67,8 +66,7 @@
 
 apache::site { $name:
 ensure=> $ensure,
-content   => template('apache/static.conf.erb'),
-conf_type => 'sites',
+content   => template('apache/static_site.conf.erb'),
 priority  => $priority,
 }
 }
diff --git a/modules/apache/templates/static_site.conf.erb 
b/modules/apache/templates/static_site.conf.erb
index 9c14f8c..65a7156 100644
--- a/modules/apache/templates/static_site.conf.erb
+++ b/modules/apache/templates/static_site.conf.erb
@@ -11,14 +11,14 @@
 Header always merge Vary X-Forwarded-Proto
 Header set Strict-Transport-Security "max-age=604800"
 
-<%- if @ldap_groups.length -%>
+<%- if @restricted_to -%>
 AuthName "<%= @auth_realm %>"
 AuthType Basic
 AuthBasicProvider ldap
 AuthLDAPBindDN cn=proxyagent,ou=profile,dc=wikimedia,dc=org
 AuthLDAPBindPassword <%= 
scope.lookupvar('::passwords::ldap::production::proxypass') %>
 AuthLDAPURL "ldaps://ldap-labs.eqiad.wikimedia.org 
ldap-labs.codfw.wikimedia.org/ou=people,dc=wikimedia,dc=org?cn"
-<%- @ldap_groups.each do |group| -%>
+<%- @restricted_to.each do |group| -%>
 Require ldap-group "cn=<%= group %>,ou=groups,dc=wikimedia,dc=org"
 <%- end -%>
 <%- end -%>
diff --git a/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb 
b/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb
index 5826dc0..18f1e57 100644
--- a/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb
+++ b/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb
@@ -13,7 +13,7 @@
 "given #{arguments.size} for 1")
 end
 
-domain = arguments[0]
+domain = arguments[0].dup
 
 # Limits (rfc1035, 3.1)
 domain_max_length=255

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b48f44a3c6532bacc75eba766e200d183eac299
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: planet: remove wikimedia.org.au feed

2016-12-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328465 )

Change subject: planet: remove wikimedia.org.au feed
..


planet: remove wikimedia.org.au feed

The feed doesn't exist anymore, see ticket for the details
trying to revive it. More than happy to re-add a working one
if there is one in the future.

Bug: T133620
Change-Id: I56569282357b31fb940585e7abfcb915fa121adb
---
M modules/planet/templates/feeds/en_config.erb
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/modules/planet/templates/feeds/en_config.erb 
b/modules/planet/templates/feeds/en_config.erb
index 447a337..6ea545c 100644
--- a/modules/planet/templates/feeds/en_config.erb
+++ b/modules/planet/templates/feeds/en_config.erb
@@ -476,9 +476,6 @@
 [https://jonatanglad.wordpress.com/category/wiki/feed/]
 name=User:Josve05a
 
-[http://blog.wikimedia.org.au/category/wikimedia/feed/]
-name=Wikimedia Australia
-
 [https://cxupdate.wordpress.com/feed/]
 name=Content Translation Update
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56569282357b31fb940585e7abfcb915fa121adb
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
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]: Fixes and tests for ApiErrorFormatter ILocalizedException ha...

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328409 )

Change subject: Fixes and tests for ApiErrorFormatter ILocalizedException 
handling
..


Fixes and tests for ApiErrorFormatter ILocalizedException handling

Change-Id: I9449ea5886e27dfb9e54b91cdb50a6a6a2c9a4ed
---
M includes/api/ApiErrorFormatter.php
M tests/phpunit/includes/api/ApiErrorFormatterTest.php
2 files changed, 118 insertions(+), 5 deletions(-)

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



diff --git a/includes/api/ApiErrorFormatter.php 
b/includes/api/ApiErrorFormatter.php
index f246203..814004a 100644
--- a/includes/api/ApiErrorFormatter.php
+++ b/includes/api/ApiErrorFormatter.php
@@ -148,10 +148,11 @@
 * @param Exception|Throwable $exception
 * @param array $options
 *  - wrap: (string|array|MessageSpecifier) Used to wrap the exception's
-*message. The exception's message will be added as the final 
parameter.
+*message if it's not an ILocalizedException. The exception's 
message
+*will be added as the final parameter.
 *  - code: (string) Default code
-*  - data: (array) Extra data
-* @return ApiMessage
+*  - data: (array) Default extra data
+* @return IApiMessage
 */
public function getMessageFromException( $exception, array $options = 
[] ) {
$options += [ 'code' => null, 'data' => [] ];
@@ -163,11 +164,11 @@
// Extract code and data from the exception, if 
applicable
if ( $exception instanceof UsageException ) {
$data = $exception->getMessageArray();
-   if ( !isset( $options['code'] ) ) {
+   if ( !$options['code'] ) {
$options['code'] = $data['code'];
}
unset( $data['code'], $data['info'] );
-   $options['data'] = array_merge( $data['code'], 
$options['data'] );
+   $options['data'] = array_merge( $data, 
$options['data'] );
}
 
if ( isset( $options['wrap'] ) ) {
diff --git a/tests/phpunit/includes/api/ApiErrorFormatterTest.php 
b/tests/phpunit/includes/api/ApiErrorFormatterTest.php
index 1b7f6bf..a40db24 100644
--- a/tests/phpunit/includes/api/ApiErrorFormatterTest.php
+++ b/tests/phpunit/includes/api/ApiErrorFormatterTest.php
@@ -504,4 +504,116 @@
);
}
 
+   /**
+* @dataProvider provideGetMessageFromException
+* @covers ApiErrorFormatter::getMessageFromException
+* @covers ApiErrorFormatter::formatException
+* @param Exception $exception
+* @param array $options
+* @param array $expect
+*/
+   public function testGetMessageFromException( $exception, $options, 
$expect ) {
+   $result = new ApiResult( 8388608 );
+   $formatter = new ApiErrorFormatter( $result, Language::factory( 
'en' ), 'html', false );
+
+   $msg = $formatter->getMessageFromException( $exception, 
$options );
+   $this->assertInstanceOf( Message::class, $msg );
+   $this->assertInstanceOf( IApiMessage::class, $msg );
+   $this->assertSame( $expect, [
+   'text' => $msg->parse(),
+   'code' => $msg->getApiCode(),
+   'data' => $msg->getApiData(),
+   ] );
+
+   $expectFormatted = $formatter->formatMessage( $msg );
+   $formatted = $formatter->formatException( $exception, $options 
);
+   $this->assertSame( $expectFormatted, $formatted );
+   }
+
+   /**
+* @dataProvider provideGetMessageFromException
+* @covers ApiErrorFormatter_BackCompat::formatException
+* @param Exception $exception
+* @param array $options
+* @param array $expect
+*/
+   public function testGetMessageFromException_BC( $exception, $options, 
$expect ) {
+   $result = new ApiResult( 8388608 );
+   $formatter = new ApiErrorFormatter_BackCompat( $result );
+
+   $msg = $formatter->getMessageFromException( $exception, 
$options );
+   $this->assertInstanceOf( Message::class, $msg );
+   $this->assertInstanceOf( IApiMessage::class, $msg );
+   $this->assertSame( $expect, [
+   'text' => $msg->parse(),
+   'code' => $msg->getApiCode(),
+   'data' => $msg->getApiData(),
+   ] );
+
+   $expectFormatted = $formatter->formatMessage( $msg );
+   $formatted = $formatter->formatException( $exception, 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: planet: remove wikimedia.org.au feed

2016-12-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328465 )

Change subject: planet: remove wikimedia.org.au feed
..

planet: remove wikimedia.org.au feed

Bug: T133620
Change-Id: I56569282357b31fb940585e7abfcb915fa121adb
---
M modules/planet/templates/feeds/en_config.erb
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/65/328465/1

diff --git a/modules/planet/templates/feeds/en_config.erb 
b/modules/planet/templates/feeds/en_config.erb
index 447a337..6ea545c 100644
--- a/modules/planet/templates/feeds/en_config.erb
+++ b/modules/planet/templates/feeds/en_config.erb
@@ -476,9 +476,6 @@
 [https://jonatanglad.wordpress.com/category/wiki/feed/]
 name=User:Josve05a
 
-[http://blog.wikimedia.org.au/category/wikimedia/feed/]
-name=Wikimedia Australia
-
 [https://cxupdate.wordpress.com/feed/]
 name=Content Translation Update
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove FileRepoStatus references

2016-12-20 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328464 )

Change subject: Remove FileRepoStatus references
..

Remove FileRepoStatus references

Change-Id: I03190273670f5c255423cf59019cbf12220c5498
---
D README.mediawiki
M includes/filerepo/FileRepo.php
M includes/filerepo/file/File.php
M includes/filerepo/file/LocalFile.php
M includes/upload/UploadFromChunks.php
M tests/phpunit/includes/filerepo/StoreBatchTest.php
6 files changed, 11 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/328464/1

diff --git a/README.mediawiki b/README.mediawiki
deleted file mode 12
index 100b938..000
--- a/README.mediawiki
+++ /dev/null
@@ -1 +0,0 @@
-README
\ No newline at end of file
diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php
index be37011..0e4b2f0 100644
--- a/includes/filerepo/FileRepo.php
+++ b/includes/filerepo/FileRepo.php
@@ -1059,7 +1059,7 @@
 
/**
 * Pick a random name in the temp zone and store a file to it.
-* Returns a FileRepoStatus object with the file Virtual URL in the 
value,
+* Returns a Status object with the file Virtual URL in the value,
 * file can later be disposed using FileRepo::freeTemp().
 *
 * @param string $originalName The base name of the file as specified
@@ -1143,7 +1143,7 @@
 * Copy or move a file either from a storage path, virtual URL,
 * or file system path, into this repository at the specified 
destination location.
 *
-* Returns a FileRepoStatus object. On success, the value contains 
"new" or
+* Returns a Status object. On success, the value contains "new" or
 * "archived", to indicate whether the file was new with that name.
 *
 * Options to $options include:
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index 8be662f..be78462 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -1792,7 +1792,7 @@
 
/**
 * Move or copy a file to its public location. If a file exists at the
-* destination, move it to an archive. Returns a FileRepoStatus object 
with
+* destination, move it to an archive. Returns a Status object with
 * the archive name in the "value" member on success.
 *
 * The archive name should be passed through to recordUpload for 
database
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 011ba87..16fe72d 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -1572,7 +1572,7 @@
 
/**
 * Move or copy a file to its public location. If a file exists at the
-* destination, move it to an archive. Returns a FileRepoStatus object 
with
+* destination, move it to an archive. Returns a Status object with
 * the archive name in the "value" member on success.
 *
 * The archive name should be passed through to recordUpload for 
database
@@ -1590,7 +1590,7 @@
}
 
/**
-* Move or copy a file to a specified location. Returns a FileRepoStatus
+* Move or copy a file to a specified location. Returns a Status
 * object with the archive name in the "value" member on success.
 *
 * The archive name should be passed through to recordUpload for 
database
@@ -2086,7 +2086,7 @@
/** @var bool Whether to suppress all suppressable fields when deleting 
*/
private $suppress;
 
-   /** @var FileRepoStatus */
+   /** @var Status */
private $status;
 
/** @var User */
@@ -2993,7 +2993,7 @@
}
 
/**
-* Verify the database updates and return a new FileRepoStatus 
indicating how
+* Verify the database updates and return a new Status indicating how
 * many rows would be updated.
 *
 * @return Status
@@ -3036,7 +3036,7 @@
}
 
/**
-* Do the database updates and return a new FileRepoStatus indicating 
how
+* Do the database updates and return a new Status indicating how
 * many rows where updated.
 */
protected function doDBUpdates() {
diff --git a/includes/upload/UploadFromChunks.php 
b/includes/upload/UploadFromChunks.php
index 449fc05..03b9821 100644
--- a/includes/upload/UploadFromChunks.php
+++ b/includes/upload/UploadFromChunks.php
@@ -113,7 +113,7 @@
 
/**
 * Append the final chunk and ready file for parent::performUpload()
-* @return FileRepoStatus
+* @return Status
 */
public function concatenateChunks() {
$chunkIndex = $this->getChunkIndex();
@@ -313,7 +313,7 @@
 *
 * @param string $chunkPath
 * @throws UploadChunkFileException
-* 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Do not lose message parameters in UploadFromChunks::verifyCh...

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327500 )

Change subject: Do not lose message parameters in 
UploadFromChunks::verifyChunk()
..


Do not lose message parameters in UploadFromChunks::verifyChunk()

This change is similar to If9ce05045ada1e3f55e031639e4c4ebc2a216de8

Having verifyChunk inside doStashFile was annoying. We'd have to
catch the exception in UploadBase::tryStashFile in order to convert
it to a proper Status object instead of the generic one that is
currently built there.
I felt like UploadBase::tryStashFile shouldn't have to be aware of
this exception, so I moved that catch into a new
UploadFromChunks::tryStashFile.
It makes no sense to perform that check twice when running
tryStashFile, so I got rid of it in doStashFile. But that also
meant we had to add it to a few other (now deprecated) places calling
doStashFile... But they should be cleaned up at some point anyway.

This will make sure we get error output like this:
"code":"filetype-bad-ie-mime",
"key":"filetype-bad-ie-mime",
"params":["text/html"]

instead of:
"code":"stashfailed",
"key":"Cannot upload this file because Internet Explorer would detect it as 
\"text/html\", which is a disallowed and potentially dangerous file type.",
"params":[]

Bug: T32095
Change-Id: I2fa767656cb3a5b366210042b8b504dc10ddaf68
---
M includes/upload/UploadFromChunks.php
1 file changed, 46 insertions(+), 1 deletion(-)

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



diff --git a/includes/upload/UploadFromChunks.php 
b/includes/upload/UploadFromChunks.php
index 449fc05..3dabc0d 100644
--- a/includes/upload/UploadFromChunks.php
+++ b/includes/upload/UploadFromChunks.php
@@ -64,6 +64,52 @@
}
 
/**
+* {@inheritdoc}
+*/
+   public function tryStashFile( User $user, $isPartial = false ) {
+   try {
+   $this->verifyChunk();
+   } catch ( UploadChunkVerificationException $e ) {
+   return Status::newFatal( $e->msg );
+   }
+
+   return parent::tryStashFile( $user, $isPartial );
+   }
+
+   /**
+* {@inheritdoc}
+* @throws UploadChunkVerificationException
+* @deprecated since 1.28 Use tryStashFile() instead
+*/
+   public function stashFile( User $user = null ) {
+   wfDeprecated( __METHOD__, '1.28' );
+   $this->verifyChunk();
+   return parent::stashFile( $user );
+   }
+
+   /**
+* {@inheritdoc}
+* @throws UploadChunkVerificationException
+* @deprecated since 1.28
+*/
+   public function stashFileGetKey() {
+   wfDeprecated( __METHOD__, '1.28' );
+   $this->verifyChunk();
+   return parent::stashFileGetKey();
+   }
+
+   /**
+* {@inheritdoc}
+* @throws UploadChunkVerificationException
+* @deprecated since 1.28
+*/
+   public function stashSession() {
+   wfDeprecated( __METHOD__, '1.28' );
+   $this->verifyChunk();
+   return parent::stashSession();
+   }
+
+   /**
 * Calls the parent doStashFile and updates the uploadsession table to 
handle "chunks"
 *
 * @param User|null $user
@@ -74,7 +120,6 @@
$this->mChunkIndex = 0;
$this->mOffset = 0;
 
-   $this->verifyChunk();
// Create a local stash target
$this->mStashFile = parent::doStashFile( $user );
// Update the initial file offset (based on file size)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fa767656cb3a5b366210042b8b504dc10ddaf68
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie 
Gerrit-Reviewer: Aaron Schulz 
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...EtherEditor[master]: Removed deprecated hook usage

2016-12-20 Thread Georggi199 (Code Review)
Georggi199 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328463 )

Change subject: Removed deprecated hook usage
..

Removed deprecated hook usage

Bug: T151973
Change-Id: I4681e01023944cff0e8397f18159b335e9a9742f
---
M EtherEditor.php
M EtherEditorHooks.php
2 files changed, 8 insertions(+), 9 deletions(-)


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

diff --git a/EtherEditor.php b/EtherEditor.php
index add49ef..e9cea12 100644
--- a/EtherEditor.php
+++ b/EtherEditor.php
@@ -114,7 +114,7 @@
 $wgExtensionMessagesFiles['EtherEditor'] = $dir . '/EtherEditor.i18n.php';
 $wgHooks['LoadExtensionSchemaUpdates'][] = 'EtherEditorHooks::onSchemaUpdate';
 $wgHooks['EditPage::showEditForm:initial'][] = 
'EtherEditorHooks::editPageShowEditFormInitial';
-$wgHooks['ArticleSaveComplete'][] = 'EtherEditorHooks::saveComplete';
+$wgHooks['PageContentSaveComplete'][] = 'EtherEditorHooks::saveComplete';
 $wgHooks['GetPreferences'][] = 'EtherEditorHooks::getPreferences';
 
 $wgAPIModules['GetEtherPadText'] = 'GetEtherPadText';
diff --git a/EtherEditorHooks.php b/EtherEditorHooks.php
index 61eea57..6c85d2b 100644
--- a/EtherEditorHooks.php
+++ b/EtherEditorHooks.php
@@ -36,27 +36,26 @@
}
 
/**
-* ArticleSaveComplete hook
+* PageContentSaveComplete hook
 *
 * @since 0.0.1
 *
 * @param Article $article needed to find the title
 * @param User $user
-* @param string $text
+* @param Content $content
 * @param string $summary
-* @param boolean $minoredit
-* @param boolean $watchthis
-* @param $sectionanchor deprecated
+* @param boolean $isMinor
+* @param boolean $isWatch
+* @param $section deprecated
 * @param integer $flags
 * @param Revision $revision
 * @param Status $status
 * @param integer $baseRevId need this to find the padId
-* @param boolean $redirect
 *
 * @return bool true
 */
-   public static function saveComplete( &$article, &$user, $text, 
$summary, $minoredit,
-   $watchthis, $sectionanchor, &$flags, $revision, &$status, 
$baseRevId ) {
+   public static function saveComplete( $article, $user, $content, 
$summary, $isMinor,
+   $isWatch, $section, $flags, $revision, $status, $baseRevId ) {
global $wgOut;
$dbId = $wgOut->getRequest()->getInt( 'dbId', -1 );
if ( $dbId != -1 ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4681e01023944cff0e8397f18159b335e9a9742f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EtherEditor
Gerrit-Branch: master
Gerrit-Owner: Georggi199 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ApiWatch: Set 'missing' to true, not 1

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328410 )

Change subject: ApiWatch: Set 'missing' to true, not 1
..


ApiWatch: Set 'missing' to true, not 1

Bug: T153775
Change-Id: I2b45cc7f64623f10d86e37dd2cbf2516f78ae7e6
---
M includes/api/ApiWatch.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php
index 88aff41..37d319f 100644
--- a/includes/api/ApiWatch.php
+++ b/includes/api/ApiWatch.php
@@ -60,7 +60,7 @@
 
foreach ( $pageSet->getMissingTitles() as $title ) {
$r = $this->watchTitle( $title, $user, $params 
);
-   $r['missing'] = 1;
+   $r['missing'] = true;
$res[] = $r;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b45cc7f64623f10d86e37dd2cbf2516f78ae7e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ApiQueryWatchlist: Handle empty wltypes

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328411 )

Change subject: ApiQueryWatchlist: Handle empty wltypes
..


ApiQueryWatchlist: Handle empty wltypes

The pre-WatchedItemQueryService code used ApiQueyrBase::addWhereFld()
which filters out empty arrays. WatchedItemQueryService doesn't do that.

Bug: T153733
Change-Id: I3416b5a05c9751303b5c28a8b6d9cb746a101f73
---
M includes/api/ApiQueryWatchlist.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/api/ApiQueryWatchlist.php 
b/includes/api/ApiQueryWatchlist.php
index 6b5ceb7..3f59751 100644
--- a/includes/api/ApiQueryWatchlist.php
+++ b/includes/api/ApiQueryWatchlist.php
@@ -151,7 +151,10 @@
 
if ( !is_null( $params['type'] ) ) {
try {
-   $options['rcTypes'] = 
RecentChange::parseToRCType( $params['type'] );
+   $rcTypes = RecentChange::parseToRCType( 
$params['type'] );
+   if ( $rcTypes ) {
+   $options['rcTypes'] = $rcTypes;
+   }
} catch ( Exception $e ) {
ApiBase::dieDebug( __METHOD__, $e->getMessage() 
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3416b5a05c9751303b5c28a8b6d9cb746a101f73
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
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...CentralAuth[master]: Make CentralAuthGroupMembershipProxy implement UserGroupMember

2016-12-20 Thread TTO (Code Review)
TTO has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328462 )

Change subject: Make CentralAuthGroupMembershipProxy implement UserGroupMember
..

Make CentralAuthGroupMembershipProxy implement UserGroupMember

See I705b7fe8755064b9ae85442b6949700c01736ea6 in core

Bug: T88510
Change-Id: I90894aa13a2af3c609d6c3a2a1f3d151fc44891c
---
M includes/CentralAuthGroupMembershipProxy.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/CentralAuthGroupMembershipProxy.php 
b/includes/CentralAuthGroupMembershipProxy.php
index 65d86d3..b48aecc 100644
--- a/includes/CentralAuthGroupMembershipProxy.php
+++ b/includes/CentralAuthGroupMembershipProxy.php
@@ -3,7 +3,7 @@
  * Cut-down copy of User interface for local-interwiki-database
  * user rights manipulation.
  */
-class CentralAuthGroupMembershipProxy {
+class CentralAuthGroupMembershipProxy implements UserGroupMember {
/**
 * @var string
 */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90894aa13a2af3c609d6c3a2a1f3d151fc44891c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: TTO 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.requestIdleCallback: Improve documentation

2016-12-20 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328461 )

Change subject: mediawiki.requestIdleCallback: Improve documentation
..

mediawiki.requestIdleCallback: Improve documentation

* Explain basic logic.
* Document the 'options.timeout' parameter of the native interface.
  The fallback shim ignores this parameter because it always executes
  callbacks using setTimeout(,1), which is before any timeout would
  expire. The native requestIdleCallback is smarter about scheduling
  callbacks at moments in time when no other priority things happen,
  at which point the timeout helps inform how long to wait at most
  for an idle period to naturally occur.

Change-Id: I45126b875547f64ec8b450a264b250260c41084c
---
M resources/src/mediawiki/mediawiki.requestIdleCallback.js
1 file changed, 24 insertions(+), 5 deletions(-)


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

diff --git a/resources/src/mediawiki/mediawiki.requestIdleCallback.js 
b/resources/src/mediawiki/mediawiki.requestIdleCallback.js
index b58cb69..09bbcc1 100644
--- a/resources/src/mediawiki/mediawiki.requestIdleCallback.js
+++ b/resources/src/mediawiki/mediawiki.requestIdleCallback.js
@@ -1,8 +1,3 @@
-/*!
- * An interface for scheduling background tasks.
- *
- * Loosely based on https://w3c.github.io/requestidlecallback/
- */
 ( function ( mw ) {
var maxBusy = 50;
 
@@ -21,8 +16,32 @@
/**
 * Schedule a deferred task to run in the background.
 *
+* This allows code to perform tasks in the main thread without 
impacting
+* time-critical operations such as animations and response to input 
events.
+*
+* Basic logic is as follows:
+*
+* - User input event should be acknowledged within 100ms per [RAIL].
+* - Idle work should be grouped in blocks of upto 50ms so that enough 
time
+*   remains for the event handler to execute and any rendering to take 
place.
+* - Whenever a native event happens (e.g. user input), the deadline 
for any
+*   running  idle callback drops to 0.
+* - As long as the deadline is non-zero, other callbacks pending may be
+*   executed in the same idle period.
+*
+* See also:
+*
+* - 

+* - 
+* - 

+* [RAIL]: 
https://developers.google.com/web/fundamentals/performance/rail
+*
 * @member mw
 * @param {Function} callback
+* @param {Object} [options]
+* @param {number} [options.timeout] If set, the callback will be 
scheduled for
+*  immediate execution after this amount of time (in milliseconds) if 
it didn't run
+*  by that time.
 */
mw.requestIdleCallback = mw.requestIdleCallbackInternal;
/*

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labsdbs: Fixup delete-dbusers

2016-12-20 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328460 )

Change subject: labsdbs: Fixup delete-dbusers
..


labsdbs: Fixup delete-dbusers

- Works without needing to explicitly specify config
- Drop users in all dbs

Change-Id: Ic30d7198eb073ccb955ebc339c13e9a0bc233b25
---
M modules/labstore/files/delete-dbuser
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/modules/labstore/files/delete-dbuser 
b/modules/labstore/files/delete-dbuser
index 9677fc0..92877a3 100755
--- a/modules/labstore/files/delete-dbuser
+++ b/modules/labstore/files/delete-dbuser
@@ -11,7 +11,11 @@
 
 if __name__ == '__main__':
 argparser = argparse.ArgumentParser()
-argparser.add_argument('--config', help='Path to YAML config file')
+argparser.add_argument(
+'--config',
+default='/etc/dbusers.yaml',
+help='Path to YAML config file'
+)
 argparser.add_argument('username', help='mysql username to delete')
 args = argparser.parse_args()
 
@@ -19,11 +23,7 @@
 config = yaml.safe_load(f)
 
 
-# Only on old' style labsdbs for now!
-hosts = [
-h for h in config['labsdbs']['hosts']
-if config['labsdbs']['hosts'][h]['grant-type'] == 'legacy'
-]
+hosts = [h for h in config['labsdbs']['hosts']]
 for host in hosts:
 conn = pymysql.connect(
 host,

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labsdbs: Fixup delete-dbusers

2016-12-20 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328460 )

Change subject: labsdbs: Fixup delete-dbusers
..

labsdbs: Fixup delete-dbusers

- Works without needing to explicitly specify config
- Drop users in all dbs

Change-Id: Ic30d7198eb073ccb955ebc339c13e9a0bc233b25
---
M modules/labstore/files/delete-dbuser
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/60/328460/1

diff --git a/modules/labstore/files/delete-dbuser 
b/modules/labstore/files/delete-dbuser
index 9677fc0..92877a3 100755
--- a/modules/labstore/files/delete-dbuser
+++ b/modules/labstore/files/delete-dbuser
@@ -11,7 +11,11 @@
 
 if __name__ == '__main__':
 argparser = argparse.ArgumentParser()
-argparser.add_argument('--config', help='Path to YAML config file')
+argparser.add_argument(
+'--config',
+default='/etc/dbusers.yaml',
+help='Path to YAML config file'
+)
 argparser.add_argument('username', help='mysql username to delete')
 args = argparser.parse_args()
 
@@ -19,11 +23,7 @@
 config = yaml.safe_load(f)
 
 
-# Only on old' style labsdbs for now!
-hosts = [
-h for h in config['labsdbs']['hosts']
-if config['labsdbs']['hosts'][h]['grant-type'] == 'legacy'
-]
+hosts = [h for h in config['labsdbs']['hosts']]
 for host in hosts:
 conn = pymysql.connect(
 host,

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: Fix service unit for maintani-dbusers

2016-12-20 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328459 )

Change subject: labs: Fix service unit for maintani-dbusers
..


labs: Fix service unit for maintani-dbusers

Change-Id: I64742926b210f973841a9cab06dd5453736618ee
---
M modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git 
a/modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb 
b/modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb
index 1993c36..8163106 100644
--- a/modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb
+++ b/modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb
@@ -2,6 +2,6 @@
 Description=Maintain labsdb accounts
 
 [Service]
-ExecStart=/usr/local/sbin/maintain-dbusers --config /etc/dbusers.yaml
-Restart=no
+ExecStart=/usr/local/sbin/maintain-dbusers maintain
+Restart=always
 Nice=19

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: Fix service unit for maintani-dbusers

2016-12-20 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328459 )

Change subject: labs: Fix service unit for maintani-dbusers
..

labs: Fix service unit for maintani-dbusers

Change-Id: I64742926b210f973841a9cab06dd5453736618ee
---
M modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/328459/1

diff --git 
a/modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb 
b/modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb
index 1993c36..8163106 100644
--- a/modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb
+++ b/modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb
@@ -2,6 +2,6 @@
 Description=Maintain labsdb accounts
 
 [Service]
-ExecStart=/usr/local/sbin/maintain-dbusers --config /etc/dbusers.yaml
-Restart=no
+ExecStart=/usr/local/sbin/maintain-dbusers maintain
+Restart=always
 Nice=19

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: maintain-dbusers.py for maintaining labsdb users

2016-12-20 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327157 )

Change subject: labs: maintain-dbusers.py for maintaining labsdb users
..


labs: maintain-dbusers.py for maintaining labsdb users

- Will replace create-dbusers.py
- Uses a database in m5 as canonical store of user accounts
- Will create different type of accounts for new and old labsdbs

Change-Id: I5ced2ca23722267bca57fa234b0a1d6aaa0e9966
---
D modules/labstore/templates/initscripts/create-dbusers.systemd.erb
A modules/role/files/labs/db/maintain-dbusers.py
R modules/role/manifests/labs/db/maintain_dbusers.pp
M modules/role/manifests/labs/nfs/secondary.pp
A modules/role/templates/initscripts/labs/db/maintain-dbusers.systemd.erb
5 files changed, 445 insertions(+), 19 deletions(-)

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



diff --git a/modules/labstore/templates/initscripts/create-dbusers.systemd.erb 
b/modules/labstore/templates/initscripts/create-dbusers.systemd.erb
deleted file mode 100644
index b65dad2..000
--- a/modules/labstore/templates/initscripts/create-dbusers.systemd.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-[Unit]
-Description=DB Accounts and Grants creator
-
-[Service]
-ExecStart=/usr/local/sbin/create-dbusers --interval 300 --config 
/etc/create-dbusers.yaml
-Restart=no
-Nice=19
diff --git a/modules/role/files/labs/db/maintain-dbusers.py 
b/modules/role/files/labs/db/maintain-dbusers.py
new file mode 100644
index 000..8dcdd19
--- /dev/null
+++ b/modules/role/files/labs/db/maintain-dbusers.py
@@ -0,0 +1,425 @@
+#!/usr/bin/python3
+"""
+This script keeps canonical source of mysql labsdb accounts in a
+database, and ensures that it is kept up to date with reality.
+
+The code pattern here is that you have a central data store (the db),
+that is then read/written to by various independent functions. These
+functions are not 'pure' - they could even be separate scripts. They
+mutate the DB in some way. They are also supposed to be idempotent -
+if they have nothing to do, they should not do anything.
+
+Some of the functions are one-time only, allowing migration from
+create-dbusers. These are:
+
+## harvest_cnf_files ##
+
+ - Look through NFS for replica.my.cnf files
+ - For those found, but no entry in `accounts` table, make an entry
+
+## harvest_dbaccounts ##
+ - Look through all accounts in account db
+ - Look through all users in all provisioned labsdbs
+ - Make entries in `account_host` table with status of all accounts.
+
+Most of these functions should be run in a continuous loop, maintaining
+mysql accounts for new tool accounts as they appear.
+
+## populate_new_tools ##
+
+ - Find list of tools (From LDAP) that aren't in the `accounts` table
+ - Create a replica.my.cnf for each of these tools
+ - Make an entry in the `accounts` table for each of these tools
+ - Make entries in `account_host` for each of these tools, marking them as
+   absent
+
+## create_accounts ##
+
+ - Look through `account_host` table for accounts that are marked as 'absent'
+ - Create those accounts, and mark them as present.
+
+If we need to add a new labsdb, we can do so the following way:
+ - Add it to the config file
+ - Insert entries into `account_host` for each tool with the new host.
+ - Run `create_accounts`
+
+In normal usage, just a continuous process running `populate_new_tools` and
+`create_accounts` in a loop will suffice.
+
+TODO:
+  - Support for maintaining per-tool restrictions (number of connections + 
time)
+"""
+import ldap3
+import logging
+import argparse
+import string
+import io
+import yaml
+import configparser
+import os
+import time
+import pymysql
+import random
+from hashlib import sha1
+import subprocess
+
+PROJECT = 'tools'
+PASSWORD_LENGTH = 16
+PASSWORD_CHARS = string.ascii_letters + string.digits
+ACCOUNT_CREATION_SQL = {
+'role': """
+GRANT USAGE ON *.* TO '{username}'@'%'
+  IDENTIFIED BY PASSWORD '{password_hash}'
+  WITH MAX_USER_CONNECTIONS {max_connections};
+GRANT labsdbuser TO '{username}'@'%';
+SET DEFAULT ROLE labsdbuser FOR '{username}'@'%';
+""",
+'legacy': """
+CREATE USER '{username}'@'%'
+   IDENTIFIED BY PASSWORD '{password_hash}';
+GRANT SELECT, SHOW VIEW ON `%\_p`.* TO '{username}'@'%';
+GRANT ALL PRIVILEGES ON `{username}\_\_%`.* TO '{username}'@'%';
+"""
+}
+
+
+def generate_new_pw():
+"""
+Generate a new random password
+"""
+sysrandom = random.SystemRandom()  # Uses /dev/urandom
+return ''.join([sysrandom.choice(PASSWORD_CHARS) for _ in 
range(PASSWORD_LENGTH)])
+
+
+def mysql_hash(password):
+"""
+Hash a password to mimic MySQL's PASSWORD() function
+"""
+return '*' + sha1(sha1(password.encode('utf-8')).digest()).hexdigest()
+
+
+def write_replica_cnf(file_path, uid, mysql_username, pwd):
+"""
+Write a 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Tests: Add users to DB when they are given advanced rights

2016-12-20 Thread TTO (Code Review)
TTO has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328458 )

Change subject: Tests: Add users to DB when they are given advanced rights
..

Tests: Add users to DB when they are given advanced rights

In general, it doesn't make sense to assign user groups to users who
are not in the database, as it will create bogus database entries
(rows in the user_groups table with ug_user = 0). For tests, this is
not so much of an issue, as the database doesn't need to be
consistent. But I plan to start enforcing that the user ID > 0 when 
assigning users to a group (I93c955dc7a970f78e32aa503c01c67da30971d1a)
so all these tests would fail in that scenario without this change.

Change-Id: Ia9616e1e35184fed9058d2d39afbe1038f56d7fa
---
M repo/tests/phpunit/includes/Actions/ActionTestCase.php
M repo/tests/phpunit/includes/Content/EntityContentTest.php
M repo/tests/phpunit/includes/PermissionsHelper.php
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/58/328458/2

diff --git a/repo/tests/phpunit/includes/Actions/ActionTestCase.php 
b/repo/tests/phpunit/includes/Actions/ActionTestCase.php
index 34ff6d0..e13377d 100644
--- a/repo/tests/phpunit/includes/Actions/ActionTestCase.php
+++ b/repo/tests/phpunit/includes/Actions/ActionTestCase.php
@@ -72,8 +72,7 @@
$this->permissionsChanged = true;
 
// reset rights cache
-   $wgUser->addGroup( "dummy" );
-   $wgUser->removeGroup( "dummy" );
+   $wgUser->clearInstanceCache();
}
 
/**
diff --git a/repo/tests/phpunit/includes/Content/EntityContentTest.php 
b/repo/tests/phpunit/includes/Content/EntityContentTest.php
index c8b95cb..ee734ad 100644
--- a/repo/tests/phpunit/includes/Content/EntityContentTest.php
+++ b/repo/tests/phpunit/includes/Content/EntityContentTest.php
@@ -62,8 +62,7 @@
 
if ( $wgUser ) { // should not be null, but sometimes, it is
// reset rights cache
-   $wgUser->addGroup( "dummy" );
-   $wgUser->removeGroup( "dummy" );
+   $wgUser->clearInstanceCache();
}
 
parent::tearDown();
diff --git a/repo/tests/phpunit/includes/PermissionsHelper.php 
b/repo/tests/phpunit/includes/PermissionsHelper.php
index 2f0889b..46cefa4 100644
--- a/repo/tests/phpunit/includes/PermissionsHelper.php
+++ b/repo/tests/phpunit/includes/PermissionsHelper.php
@@ -29,6 +29,8 @@
return;
}
 
+   $wgUser->addToDatabase();
+
if ( is_array( $groups ) ) {
$oldGroups = $wgUser->getGroups();
foreach ( $oldGroups as $group ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9616e1e35184fed9058d2d39afbe1038f56d7fa
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: TTO 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Daniel Kinzler 
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]: trebuchet: Fully qualify hostname

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328457 )

Change subject: trebuchet: Fully qualify hostname
..

trebuchet: Fully qualify hostname

Bug: T153608
Change-Id: Icbeffe40c4038cf8d4076522090e256aa7cd382f
---
M modules/trebuchet/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/trebuchet/manifests/init.pp 
b/modules/trebuchet/manifests/init.pp
index 9a0d9bc..9acafb2 100644
--- a/modules/trebuchet/manifests/init.pp
+++ b/modules/trebuchet/manifests/init.pp
@@ -8,7 +8,7 @@
 $deployment_server = $::deployment_server_override
 ) {
 $trebuchet_master = $::realm ? {
-labs   => pick($deployment_server, 
"${::labsproject}-deploy.eqiad.wmflabs"),
+labs   => pick($deployment_server, 
"${::labsproject}-deploy.${::labsproject}.eqiad.wmflabs"),
 default=> hiera('deployment_server','tin.eqiad.wmnet'),
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbeffe40c4038cf8d4076522090e256aa7cd382f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: staging: Fully qualify hostname

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328456 )

Change subject: staging: Fully qualify hostname
..

staging: Fully qualify hostname

Bug: T153608
Change-Id: I05951a4e5b7a670701f6aa50beae2882e2c5d398
---
M hieradata/labs/staging/common.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/hieradata/labs/staging/common.yaml 
b/hieradata/labs/staging/common.yaml
index 8644a7b..5ddde52 100644
--- a/hieradata/labs/staging/common.yaml
+++ b/hieradata/labs/staging/common.yaml
@@ -6,7 +6,7 @@
 salt::master::salt_pillar_roots: { base: [ '/srv/pillars' ] }
 salt::master::salt_module_roots: { base: [ '/srv/salt/_modules' ] }
 salt::master::salt_returner_roots: { base: [ '/srv/salt/_returners' ] }
-role::deployment::salt_masters::deployment_server: staging-tin.eqiad.wmflabs
+role::deployment::salt_masters::deployment_server: 
staging-tin.staging.eqiad.wmflabs
 trebuchet::deployment_server: staging-tin.staging.eqiad.wmflabs
 elasticsearch::expected_nodes: 3
 elasticsearch::minimum_master_nodes: 3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05951a4e5b7a670701f6aa50beae2882e2c5d398
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: deployment-prep: Fully qualify hostnames

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328455 )

Change subject: deployment-prep: Fully qualify hostnames
..

deployment-prep: Fully qualify hostnames

Bug: T153608
Change-Id: Ia32b47d04a8e7112d3aabb5e02207f015f30907e
---
M hieradata/labs.yaml
M hieradata/labs/deployment-prep/common.yaml
M modules/scap/manifests/init.pp
3 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index c20b7a6..f19ca0b 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -78,7 +78,7 @@
   restbase:
 route: eqiad
 backends:
-  eqiad: 'deployment-restbase01.eqiad.wmflabs'
+  eqiad: 'deployment-restbase01.deployment-prep.eqiad.wmflabs'
 cache::upload::apps:
   swift:
 route: eqiad
diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index c5ddf9c..0584493 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -117,7 +117,7 @@
 restbase::pdfrender_uri: 
http://deployment-pdfrender02.deployment-prep.eqiad.wmflabs:5252
 restbase::citoid_uri: 
http://deployment-sca02.deployment-prep.eqiad.wmflabs:1970
 restbase::trendingedits_uri: 
http://deployment-trending01.deployment-prep.eqiad.wmflabs:6699
-"mediawiki::log_aggregator": deployment-fluorine02.eqiad.wmflabs:8420
+"mediawiki::log_aggregator": 
deployment-fluorine02.deployment-prep.eqiad.wmflabs:8420
 "mediawiki::forward_syslog": 
deployment-logstash2.deployment-prep.eqiad.wmflabs:10514
 mediawiki_memcached_servers:
 - 10.68.23.25:11211:1  # deployment-memc04
@@ -137,7 +137,7 @@
 "misc::syslog-server::basepath": /data/project/syslog
 "cxserver::apertium": http://apertium-beta.wmflabs.org
 role::deployment::mediawiki::key_fingerprint: 
f0:54:06:fa:17:27:97:a2:cc:69:a0:a7:df:4c:0a:e3
-"role::deployment::salt_masters::deployment_server": 
deployment-tin.eqiad.wmflabs
+"role::deployment::salt_masters::deployment_server": 
deployment-tin.deployment-prep.eqiad.wmflabs
 "hhvm::extra::fcgi":
 hhvm:
 pcre_cache_type: lru
diff --git a/modules/scap/manifests/init.pp b/modules/scap/manifests/init.pp
index 38c5972..2a08dc9 100644
--- a/modules/scap/manifests/init.pp
+++ b/modules/scap/manifests/init.pp
@@ -11,7 +11,7 @@
 #Default 'deployment-tin.eqiad.wmflabs'.
 class scap (
 $deployment_server = 'deployment',
-$wmflabs_master = 'deployment-tin.eqiad.wmflabs',
+$wmflabs_master = 'deployment-tin.deployment-prep.eqiad.wmflabs',
 $version = '3.4.2-1',
 ) {
 package { 'scap':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia32b47d04a8e7112d3aabb5e02207f015f30907e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: geoFeatures: Remove dead code and optimize common page views

2016-12-20 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328454 )

Change subject: geoFeatures: Remove dead code and optimize common page views
..

geoFeatures: Remove dead code and optimize common page views

The following happens on all page loads (all projects, namespaces,
page actions).

* Trying to remove old "GeoFeaturesUser" cookies. (since 2e947dce31)
* Find anchor link to "tools.wmflabs.org/geohack/geohack.php".
* Try to attach a "click" handler to $geoHackLinks.
* 5 attempts to trackButton for ".osm-icon-coordinates".
* Trying to find "#mapwrap #mapdiv".

Changes:
* Remove "GeoFeaturesUser" code (2e947dce31 landed in March 2016).
* Simplify $geoHackLinks selector.
* Don't create $geoHackLinks event handler on pages without the link.
* Don't run $geoHackLinks.on() on pages without the link.
* Replace trackButton() use of setTimeout with requestIdleCallback,
  this way the "waiting for element X" will not, itself, be blocking
  elements from appearing. Timeout parameter of 1s is kept for now.

Change-Id: I12f0b1794ed6ba12fcb8bab66f7994b09c24e403
---
M modules/ext.wikimediaEvents.geoFeatures.js
1 file changed, 38 insertions(+), 41 deletions(-)


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

diff --git a/modules/ext.wikimediaEvents.geoFeatures.js 
b/modules/ext.wikimediaEvents.geoFeatures.js
index 7ef11e3..9c5fa93 100644
--- a/modules/ext.wikimediaEvents.geoFeatures.js
+++ b/modules/ext.wikimediaEvents.geoFeatures.js
@@ -131,7 +131,7 @@
return;
}
// Give the tool some time to load, can't hook to it cleanly 
because it's not in a RL module
-   setTimeout( function () {
+   mw.requestIdleCallback( function () {
var $button = $( selector );
 
if ( $button.length ) {
@@ -145,52 +145,49 @@
}
 
mw.requestIdleCallback( function () {
-   // Nuke old cookies
-   mw.cookie.set( 'GeoFeaturesUser', null );
-
// Track GeoHack usage
-   $geoHackLinks = $( 
'a[href^=\'//tools.wmflabs.org/geohack/geohack.php\']' );
-   $geoHackLinks.on( 'click', function ( event ) {
-   var $this = $( this ),
-   isTitle = isTitleCoordinate( $this );
+   $geoHackLinks = $( 
'a[href^="//tools.wmflabs.org/geohack/geohack.php"]' );
 
-   // Don't override all the weird input combinations 
because this may, for example,
-   // result in link being opened in the same tab instead 
of another
-   if ( event.buttons === undefined
-   || event.buttons > 1
-   || event.button
-   || event.altKey
-   || event.ctrlKey
-   || event.metaKey
-   || event.shiftKey
-   ) {
-   doTrack( 'GeoHack', 'open', isTitle );
-   } else {
-   // Ordinary click, override to ensure it's 
logged
-   doTrack( 'GeoHack', 'open', isTitle, 
$this.attr( 'href' ) );
-   event.preventDefault();
-   }
-   } );
-
-   // Track WikiMiniAtlas usage
if ( $geoHackLinks.length ) {
+   $geoHackLinks.on( 'click', function ( event ) {
+   var $this = $( this ),
+   isTitle = isTitleCoordinate( $this );
+
+   // Don't override all the weird input 
combinations because this may, for example,
+   // result in link being opened in the same tab 
instead of another
+   if ( event.buttons === undefined
+   || event.buttons > 1
+   || event.button
+   || event.altKey
+   || event.ctrlKey
+   || event.metaKey
+   || event.shiftKey
+   ) {
+   doTrack( 'GeoHack', 'open', isTitle );
+   } else {
+   // Ordinary click, override to ensure 
it's logged
+   doTrack( 'GeoHack', 'open', isTitle, 
$this.attr( 'href' ) );
+   event.preventDefault();
+   }
+   } );
+
+   // Track WikiMiniAtlas usage

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Get rid of BehaviorSwitchPreprocessor

2016-12-20 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328452 )

Change subject: Get rid of BehaviorSwitchPreprocessor
..

Get rid of BehaviorSwitchPreprocessor

Change-Id: I79f1d698e3821354412c0baba129cefdfcfcb9e3
---
M lib/wt2html/parser.js
M lib/wt2html/pegTokenizer.pegjs
M lib/wt2html/tt/BehaviorSwitchHandler.js
3 files changed, 10 insertions(+), 45 deletions(-)


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

diff --git a/lib/wt2html/parser.js b/lib/wt2html/parser.js
index ae63baa..cc810c8 100644
--- a/lib/wt2html/parser.js
+++ b/lib/wt2html/parser.js
@@ -27,7 +27,7 @@
 var AttributeExpander = require('./tt/AttributeExpander.js').AttributeExpander;
 var ListHandler = require('./tt/ListHandler.js').ListHandler;
 var LinkHandler = require('./tt/LinkHandler.js');
-var BehaviorSwitch = require('./tt/BehaviorSwitchHandler.js');
+var BehaviorSwitchHandler = 
require('./tt/BehaviorSwitchHandler.js').BehaviorSwitchHandler;
 var DOMFragmentBuilder = 
require('./tt/DOMFragmentBuilder.js').DOMFragmentBuilder;
 var TreeBuilder = require('./HTML5TreeBuilder.js').TreeBuilder;
 var DOMPostProcessor = require('./DOMPostProcessor.js').DOMPostProcessor;
@@ -40,8 +40,6 @@
 var OnlyInclude = NoIncludeOnly.OnlyInclude;
 var WikiLinkHandler = LinkHandler.WikiLinkHandler;
 var ExternalLinkHandler = LinkHandler.ExternalLinkHandler;
-var BehaviorSwitchHandler = BehaviorSwitch.BehaviorSwitchHandler;
-var BehaviorSwitchPreprocessor = BehaviorSwitch.BehaviorSwitchPreprocessor;
 
 
 var ParserPipeline; // forward declaration
@@ -92,9 +90,6 @@
OnlyInclude,  // 0.01
IncludeOnly,  // 0.02
NoInclude,  // 0.03
-
-   // Preprocess behavior switches
-   BehaviorSwitchPreprocessor,  // 0.05
],
],
/*
diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index f487a3c..16887fb 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -558,10 +558,15 @@
 // https://www.mediawiki.org/wiki/Help:Magic_words#Behavior_switches
 behavior_switch
   = bs:$('__' behavior_text '__') {
-return [
-  new SelfclosingTagTk('behavior-switch', [ new KV('word', bs) ],
-{ tsr: tsrOffsets(), src: bs }),
-];
+if (env.conf.wiki.isMagicWord(bs)) {
+  return [
+new SelfclosingTagTk('behavior-switch', [ new KV('word', bs) ],
+  { tsr: tsrOffsets(), src: bs, magicSrc: bs }
+),
+  ];
+} else {
+  return [ bs ];
+}
   }
 
 // Instead of defining a charset, php's doDoubleUnderscore concats a regexp of
diff --git a/lib/wt2html/tt/BehaviorSwitchHandler.js 
b/lib/wt2html/tt/BehaviorSwitchHandler.js
index acb190a..01c3932 100644
--- a/lib/wt2html/tt/BehaviorSwitchHandler.js
+++ b/lib/wt2html/tt/BehaviorSwitchHandler.js
@@ -49,42 +49,7 @@
return { tokens: [ metaToken ] };
 };
 
-/**
- * @class
- *
- * Pre-process behavior switches, check to see that they're valid magic words.
- *
- * @constructor
- * @param {Object} manager
- * @param {Object} options
- */
-function BehaviorSwitchPreprocessor(manager, options) {
-   this.manager = manager;
-   this.manager.addTransform(this.onBehaviorSwitch.bind(this), 
'BehaviorSwitchPreprocessor:onBehaviorSwitch',
-   this.rank, 'tag', 'behavior-switch');
-}
-
-// Specifies where in the pipeline this stage should run.
-BehaviorSwitchPreprocessor.prototype.rank = 0.05;
-
-/**
- * See {@link TokenTransformManager#addTransform}'s transformation parameter
- */
-BehaviorSwitchPreprocessor.prototype.onBehaviorSwitch = function(token, 
manager, cb) {
-   var magicWord = token.attribs[0].v;
-   if (this.manager.env.conf.wiki.isMagicWord(magicWord)) {
-   token.dataAttribs.magicSrc = magicWord;
-   return {
-   tokens: [ token ],
-   };
-   } else {
-   return {
-   tokens: [ magicWord ],
-   };
-   }
-};
 
 if (typeof module === "object") {
module.exports.BehaviorSwitchHandler = BehaviorSwitchHandler;
-   module.exports.BehaviorSwitchPreprocessor = BehaviorSwitchPreprocessor;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79f1d698e3821354412c0baba129cefdfcfcb9e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Remove redundant tools-db entry from /etc/hosts

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328453 )

Change subject: Tools: Remove redundant tools-db entry from /etc/hosts
..

Tools: Remove redundant tools-db entry from /etc/hosts

The alias tools-db.tools.eqiad.wmflabs has been added to DNS with
9816b226f36154f52d794c9a186ebcd994775fb6; since then, with
/etc/resolv.conf's:

| search tools.eqiad.wmflabs eqiad.wmflabs

queries for the hostname "tools-db" will be properly resolved by DNS
alone; thus this change removes the redundant entry from /etc/hosts.

Bug: T139190
Change-Id: Ifdbbbc87fb2d68fe415af10c9fe8069a3c80e9f8
---
M modules/toollabs/templates/hosts.erb
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/modules/toollabs/templates/hosts.erb 
b/modules/toollabs/templates/hosts.erb
index 9ab8d86..b209e65 100644
--- a/modules/toollabs/templates/hosts.erb
+++ b/modules/toollabs/templates/hosts.erb
@@ -11,5 +11,3 @@
 ff02::3 ip6-allhosts
 
 <%= @active_redis_ip %> tools-redis tools-redis.eqiad.wmflabs
-
-10.64.37.9 tools-db

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdbbbc87fb2d68fe415af10c9fe8069a3c80e9f8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Fully qualify hostnames

2016-12-20 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328451 )

Change subject: Tools: Fully qualify hostnames
..

Tools: Fully qualify hostnames

This change fully qualifies some hostnames in the "flat" namespace
beneath .eqiad.wmflabs.  Hostnames should only refer to the
project-specific instance, i. e. beneath .tools.eqiad.wmflabs.

This is most obvious in the case of role::toollabs::services: Here the
parameter $active_host was tested for equality with $::fqdn.  However,
due to $active_host being "tools-services-01.eqiad.wmflabs" and
$::fqdn being "tools-services-01.tools.eqiad.wmflabs", this would have
failed if $active_host had not been overwritten at
https://wikitech.wikimedia.org/wiki/Hiera:Tools.

An exception to this rule are modules/toollabs/files/host_aliases and
modules/toollabs/templates/mail-relay.exim4.conf.erb that need to list
legacy hostnames.

Bug: T153608
Change-Id: I6888bb449bd59bf4c522e3b14d6a38dc2540decd
---
M modules/role/manifests/toollabs/services.pp
M modules/toollabs/files/exec-manage
M modules/toollabs/manifests/init.pp
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/328451/1

diff --git a/modules/role/manifests/toollabs/services.pp 
b/modules/role/manifests/toollabs/services.pp
index 7b76a1d..f2f44db 100644
--- a/modules/role/manifests/toollabs/services.pp
+++ b/modules/role/manifests/toollabs/services.pp
@@ -1,6 +1,6 @@
 # filtertags: labs-project-tools
 class role::toollabs::services(
-$active_host = 'tools-services-01.eqiad.wmflabs',
+$active_host = 'tools-services-01.tools.eqiad.wmflabs',
 ) {
 system::role { 'role::toollabs::services':
 description => 'Tool Labs manifest based services',
diff --git a/modules/toollabs/files/exec-manage 
b/modules/toollabs/files/exec-manage
index bb82f32..8c221ce 100644
--- a/modules/toollabs/files/exec-manage
+++ b/modules/toollabs/files/exec-manage
@@ -11,7 +11,7 @@
 echo "exec-manage [status|depool|repool|test] exec_host_name"
 echo "exec-manage [list]"
 echo ""
-echo "Example: exec-manage status tools-exec1001.eqiad.wmflabs "
+echo "Example: exec-manage status tools-exec1001.tools.eqiad.wmflabs"
 }
 
 if [[ ! "$1" || "$1" == '-h' ]]; then
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index a590802..cbb9fc4 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -4,7 +4,7 @@
 $external_hostname = undef,
 $external_ip = undef,
 $is_mail_relay = false,
-$active_mail_relay = 'tools-mail.eqiad.wmflabs',
+$active_mail_relay = 'tools-mail.tools.eqiad.wmflabs',
 $mail_domain = 'tools.wmflabs.org',
 ) {
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6888bb449bd59bf4c522e3b14d6a38dc2540decd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: move ganglia aggregator eqiad from carbon to install1001

2016-12-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328450 )

Change subject: move ganglia aggregator eqiad from carbon to install1001
..

move ganglia aggregator eqiad from carbon to install1001

Since we want to reinstall/decom carbon, and the ganglia
aggregator for codfw is on install2001, also use install1001
for this in eqiad.

Bug: T132757
Change-Id: Ieb6b71b8f1b6bb8a460e690ccd722a61a4d16934
---
M manifests/site.pp
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 797966e..a372c40 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -240,10 +240,6 @@
 interface => 'eth0',
 }
 
-class { 'ganglia::monitor::aggregator':
-sites =>  'eqiad',
-}
-
 }
 
 # cerium, praseodymium and xenon are Cassandra test hosts
@@ -1320,6 +1316,10 @@
 interface::add_ip6_mapped { 'main':
 interface => 'eth0',
 }
+
+class { 'ganglia::monitor::aggregator':
+sites =>  'eqiad',
+}
 }
 
 node 'install2001.wikimedia.org' {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Don't try to JSON stringify load error messages that are alr...

2016-12-20 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328449 )

Change subject: Don't try to JSON stringify load error messages that are 
already strings
..

Don't try to JSON stringify load error messages that are already strings

Change-Id: Ib180c3ac7eb62d351e05153defd6330c3397c478
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 8bb7d28..5295737 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -700,6 +700,8 @@
}
} else if ( errorInfo ) {
confirmPromptMessage = ve.msg( 
'visualeditor-loadwarning', errorText + ': ' + errorInfo );
+   } else if ( typeof error === 'string' ) {
+   confirmPromptMessage = error;
} else {
// At least give the devs something to work from
confirmPromptMessage = JSON.stringify( error );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: ve.init.MWWelcomeDialog: Don't treat text messages as HTML

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328322 )

Change subject: ve.init.MWWelcomeDialog: Don't treat text messages as HTML
..


ve.init.MWWelcomeDialog: Don't treat text messages as HTML

This appears to be unintentional. The messages don't have any markup.

Change-Id: I6f6570c5ef90e4a06ead1a23f6f851021a77c234
---
M modules/ve-mw/init/ve.init.MWWelcomeDialog.js
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/ve-mw/init/ve.init.MWWelcomeDialog.js 
b/modules/ve-mw/init/ve.init.MWWelcomeDialog.js
index 4599e36..fbe4e3c 100644
--- a/modules/ve-mw/init/ve.init.MWWelcomeDialog.js
+++ b/modules/ve-mw/init/ve.init.MWWelcomeDialog.js
@@ -66,10 +66,10 @@
.append(
$( '' )
.addClass( 
'visualeditor-welcomedialog-content-text' )
-   .html(
-   mw.msg( 
'visualeditor-welcomedialog-content' ) +
-   '' +
-   mw.msg( 
'visualeditor-welcomedialog-content-thanks' )
+   .append(
+   document.createTextNode( 
mw.msg( 'visualeditor-welcomedialog-content' ) ),
+   $( '' ),
+   document.createTextNode( 
mw.msg( 'visualeditor-welcomedialog-content-thanks' ) )
)
)
}, data );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f6570c5ef90e4a06ead1a23f6f851021a77c234
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: API: Add action=validatepassword

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/324968 )

Change subject: API: Add action=validatepassword
..


API: Add action=validatepassword

This will allow for checking passwords against the wiki's password
policy from the account creation and password change forms.

Bug: T111303
Change-Id: I0de281483bd83e47d80aa1ea37149d14f2ae5ebd
---
M RELEASE-NOTES-1.29
M autoload.php
M docs/hooks.txt
M includes/api/ApiMain.php
A includes/api/ApiValidatePassword.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
7 files changed, 104 insertions(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 3af1654..10b152d 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -75,6 +75,8 @@
   'stasherrors' rather than a 'stashfailed' text string.
 * action=watch reports 'errors' and 'warnings' instead of a single 'error', and
   no longer returns a 'message' on success.
+* Added action=validatepassword to validate passwords for the account creation
+  and password change forms.
 
 === Action API internal changes in 1.29 ===
 * New methods were added to ApiBase to handle errors and warnings using i18n
diff --git a/autoload.php b/autoload.php
index 941b335..d85b679 100644
--- a/autoload.php
+++ b/autoload.php
@@ -147,6 +147,7 @@
'ApiUpload' => __DIR__ . '/includes/api/ApiUpload.php',
'ApiUsageException' => __DIR__ . '/includes/api/ApiUsageException.php',
'ApiUserrights' => __DIR__ . '/includes/api/ApiUserrights.php',
+   'ApiValidatePassword' => __DIR__ . 
'/includes/api/ApiValidatePassword.php',
'ApiWatch' => __DIR__ . '/includes/api/ApiWatch.php',
'ArchivedFile' => __DIR__ . '/includes/filerepo/file/ArchivedFile.php',
'ArrayDiffFormatter' => __DIR__ . 
'/includes/diff/ArrayDiffFormatter.php',
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 1ecc1f8..862f9f0 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -592,6 +592,10 @@
 &$tokenTypes: supported token types in format 'type' => callback function
   used to retrieve this type of tokens.
 
+'ApiValidatePassword': Called from ApiValidatePassword.
+$module: ApiValidatePassword instance.
+&$r: Result array.
+
 'Article::MissingArticleConditions': Before fetching deletion & move log 
entries
 to display a message of a non-existing page being deleted/moved, give 
extensions
 a chance to hide their (unrelated) log entries.
diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index 54679a8..4220fb8 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -79,6 +79,7 @@
'tokens' => 'ApiTokens',
'checktoken' => 'ApiCheckToken',
'cspreport' => 'ApiCSPReport',
+   'validatepassword' => 'ApiValidatePassword',
 
// Write modules
'purge' => 'ApiPurge',
diff --git a/includes/api/ApiValidatePassword.php 
b/includes/api/ApiValidatePassword.php
new file mode 100644
index 000..6968523
--- /dev/null
+++ b/includes/api/ApiValidatePassword.php
@@ -0,0 +1,81 @@
+extractRequestParams();
+
+   // For sanity
+   $this->requirePostedParameters( [ 'password' ] );
+
+   if ( $params['user'] !== null ) {
+   $user = User::newFromName( $params['user'], 'creatable' 
);
+   if ( !$user ) {
+   $encParamName = $this->encodeParamName( 'user' 
);
+   $this->dieWithError(
+   [ 'apierror-baduser', $encParamName, 
wfEscapeWikiText( $params['user'] ) ],
+   "baduser_{$encParamName}"
+   );
+   }
+
+   if ( !$user->isAnon() || 
AuthManager::singleton()->userExists( $user->getName() ) ) {
+   $this->dieWithError( 'userexists' );
+   }
+
+   $user->setEmail( (string)$params['email'] );
+   $user->setRealName( (string)$params['realname'] );
+   } else {
+   $user = $this->getUser();
+   }
+
+   $validity = $user->checkPasswordValidity( $params['password'] );
+   $r['validity'] = $validity->isGood() ? 'Good' : ( 
$validity->isOK() ? 'Change' : 'Invalid' );
+   $messages = array_merge(
+   $this->getErrorFormatter()->arrayFromStatus( $validity, 
'error' ),
+   $this->getErrorFormatter()->arrayFromStatus( $validity, 
'warning' )
+   );
+   if ( $messages ) {
+   $r['validitymessages'] = $messages;
+   }
+
+   Hooks::run( 'ApiValidatePassword', [ $this, &$r ] );
+
+ 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: prometheus: add aggregation rules for MySQL

2016-12-20 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328425 )

Change subject: prometheus: add aggregation rules for MySQL
..


prometheus: add aggregation rules for MySQL

The rules can be used to speed up dashboards by pre-calculating
aggregated metrics. Also collect the metrics into the 'global' instance
for a overall view.

Change-Id: Id08df46c58f93e71f70ed3a2534658b64dbb047e
---
M modules/role/files/prometheus/rules_ops.conf
M modules/role/manifests/prometheus/global.pp
2 files changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/modules/role/files/prometheus/rules_ops.conf 
b/modules/role/files/prometheus/rules_ops.conf
index 33bbd89..85b58b6 100644
--- a/modules/role/files/prometheus/rules_ops.conf
+++ b/modules/role/files/prometheus/rules_ops.conf
@@ -39,3 +39,11 @@
 backend:varnish_backend_pipe_in:sum = sum(varnish_backend_pipe_in) without 
(server)
 backend:varnish_backend_pipe_out:sum = sum(varnish_backend_pipe_out) without 
(server)
 backend:varnish_backend_req:sum = sum(varnish_backend_req) without (server)
+
+# MySQL aggregated stats
+job_role_shard:mysql_global_status_queries:rate5m = sum by (job, role, shard) 
(rate(mysql_global_status_queries[5m]))
+job_role_shard:mysql_global_status_handlers_write_total:rate5m = sum by (job, 
role, shard) 
rate(mysql_global_status_handlers_total{handler=~"(write|update|delete).*"}[5m])
+job_role_shard:mysql_global_status_handlers_read_total:rate5m = sum by (job, 
role, shard) rate(mysql_global_status_handlers_total{handler=~"read.*"}[5m])
+job_role_shard:mysql_global_status_bytes_received:rate5m = sum by (job, role, 
shard) rate(mysql_global_status_bytes_received[5m])
+job_role_shard:mysql_global_status_bytes_sent:rate5m = sum by (job, role, 
shard) rate(mysql_global_status_bytes_sent[5m])
+job_shard:mysql_slave_status_seconds_behind_master:max = 
max(mysql_slave_status_seconds_behind_master) by (job, shard)
diff --git a/modules/role/manifests/prometheus/global.pp 
b/modules/role/manifests/prometheus/global.pp
index 72d0fbb..49c73ea 100644
--- a/modules/role/manifests/prometheus/global.pp
+++ b/modules/role/manifests/prometheus/global.pp
@@ -27,6 +27,8 @@
 '{__name__="mysqld_exporter_build_info"}',
 '{__name__="memcached_version"}',
 '{__name__="hhvm_build_info"}',
+# MySQL metrics
+'{__name__=~"^.*:mysql_.*"}',
   ],
 },
 'static_configs' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ApiTag: Return 'noop' as a boolean in formatversion=2

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328405 )

Change subject: ApiTag: Return 'noop' as a boolean in formatversion=2
..


ApiTag: Return 'noop' as a boolean in formatversion=2

Bug: T153704
Change-Id: I1d8059e5e0ede6ba11449ecb4de5a482ddc8d2e4
---
M includes/api/ApiTag.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/api/ApiTag.php b/includes/api/ApiTag.php
index f6c0584..b142900 100644
--- a/includes/api/ApiTag.php
+++ b/includes/api/ApiTag.php
@@ -109,7 +109,7 @@
} else {
$idResult['status'] = 'success';
if ( is_null( $status->value->logId ) ) {
-   $idResult['noop'] = '';
+   $idResult['noop'] = true;
} else {
$idResult['actionlogid'] = 
$status->value->logId;
$idResult['added'] = $status->value->addedTags;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d8059e5e0ede6ba11449ecb4de5a482ddc8d2e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: TTO 
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]: dhcp: switch private-c-eqiad to install1001 as tftp

2016-12-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328448 )

Change subject: dhcp: switch private-c-eqiad to install1001 as tftp
..


dhcp: switch private-c-eqiad to install1001 as tftp

Test installing with install1001 instead of carbon
for mw1168. While DHCP is stopped on carbon.

After switching one host, now switch one network,
finally switch all.

Bug: T132757
Change-Id: I4460b587a862694a8a98ee5a9d62236befc13ec4
---
M modules/install_server/files/dhcpd/dhcpd.conf
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/install_server/files/dhcpd/dhcpd.conf 
b/modules/install_server/files/dhcpd/dhcpd.conf
index 6ce3650..f353c3f 100644
--- a/modules/install_server/files/dhcpd/dhcpd.conf
+++ b/modules/install_server/files/dhcpd/dhcpd.conf
@@ -243,7 +243,7 @@
 option routers 10.64.32.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # private1-d-eqiad

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: dhcp: switch private-c-eqiad to install1001 as tftp

2016-12-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328448 )

Change subject: dhcp: switch private-c-eqiad to install1001 as tftp
..

dhcp: switch private-c-eqiad to install1001 as tftp

Test installing with install1001 instead of carbon
for mw1168. While DHCP is stopped on carbon.

After switching one host, now switch one network,
finally switch all.

Bug: T132757
Change-Id: I4460b587a862694a8a98ee5a9d62236befc13ec4
---
M modules/install_server/files/dhcpd/dhcpd.conf
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/328448/1

diff --git a/modules/install_server/files/dhcpd/dhcpd.conf 
b/modules/install_server/files/dhcpd/dhcpd.conf
index 6ce3650..f353c3f 100644
--- a/modules/install_server/files/dhcpd/dhcpd.conf
+++ b/modules/install_server/files/dhcpd/dhcpd.conf
@@ -243,7 +243,7 @@
 option routers 10.64.32.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # private1-d-eqiad

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Add "enhancedFiltersEnabled" boolean to RC filters logger

2016-12-20 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328447 )

Change subject: Add "enhancedFiltersEnabled" boolean to RC filters logger
..

Add "enhancedFiltersEnabled" boolean to RC filters logger

Distinguish between usage with the current filters and the new upcoming
"enhanced filters" for the user.

Updated in https://meta.wikimedia.org/wiki/Schema:ChangesListFilters
for schema version 16174591

Bug: T144331
Change-Id: I87a1c593cefef3512e34119f630d531984f09d37
Depends-On: Ia1d00f6d52d02bebcb8f1e8b394ef765349e4738
---
M WikimediaEventsHooks.php
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index 6e3f963..8fd2f3e 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -562,7 +562,8 @@
}
 
$logData = [
-   'pagename' => $special->getName()
+   'pagename' => $special->getName(),
+   'enhancedFiltersEnabled' => 
(bool)$this->getUser()->getOption( 'rcenhancedfilters' )
];
 
$knownFilters = [
@@ -599,7 +600,7 @@
// Log the existing filters
EventLogging::logEvent(
'ChangesListFilters',
-   15876023,
+   16174591,
$logData
);
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ApiMove: Fix fatal when attempting to move to a namespace wi...

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328210 )

Change subject: ApiMove: Fix fatal when attempting to move to a namespace with 
no talkpages
..


ApiMove: Fix fatal when attempting to move to a namespace with no talkpages

The move will probably error out anyway, but we want it to do so
properly instead of by throwing a PHP fatal.

Bug: T153693
Change-Id: I19334a28a3f539e0f3d3866353093711f68786ee
---
M includes/api/ApiMove.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php
index 7c8aa90..18e582d 100644
--- a/includes/api/ApiMove.php
+++ b/includes/api/ApiMove.php
@@ -59,7 +59,7 @@
if ( !$toTitle || $toTitle->isExternal() ) {
$this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $params['to'] ) ] );
}
-   $toTalk = $toTitle->getTalkPage();
+   $toTalk = $toTitle->canTalk() ? $toTitle->getTalkPage() : null;
 
if ( $toTitle->getNamespace() == NS_FILE
&& !RepoGroup::singleton()->getLocalRepo()->findFile( 
$toTitle )
@@ -100,7 +100,7 @@
$r['moveoverredirect'] = $toTitleExists;
 
// Move the talk page
-   if ( $params['movetalk'] && $fromTalk->exists() && 
!$fromTitle->isTalkPage() ) {
+   if ( $params['movetalk'] && $toTalk && $fromTalk->exists() && 
!$fromTitle->isTalkPage() ) {
$toTalkExists = $toTalk->exists();
$status = $this->movePage( $fromTalk, $toTalk, 
$params['reason'], !$params['noredirect'] );
if ( $status->isOK() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19334a28a3f539e0f3d3866353093711f68786ee
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: Remove warning about missing site ID

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328445 )

Change subject: Remove warning about missing site ID
..


Remove warning about missing site ID

Seems to interfere with qunit somehow.

Cherry-picked from I1a52ce07943f20ccd63f5d357c5e006cd721da64 by @Tgr

Bug: T153729
Bug: T153597
Change-Id: I1a52ce07943f20ccd63f5d357c5e006cd721da64
---
M extensions/Wikibase/client/includes/WikibaseClient.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/extensions/Wikibase/client/includes/WikibaseClient.php 
b/extensions/Wikibase/client/includes/WikibaseClient.php
index 5b2e726..eb7b060 100644
--- a/extensions/Wikibase/client/includes/WikibaseClient.php
+++ b/extensions/Wikibase/client/includes/WikibaseClient.php
@@ -731,8 +731,6 @@
$site = $this->getSiteStore()->getSite( $siteId );
 
if ( !$site ) {
-   wfWarn( 'Cannot find site ' . $siteId . ' in 
sites table' );
-
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a52ce07943f20ccd63f5d357c5e006cd721da64
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Tobias Gritschacher 
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]: Work around &$this usage in SkinTemplate

2016-12-20 Thread Sn1per (Code Review)
Sn1per has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328446 )

Change subject: Work around &$this usage in SkinTemplate
..

Work around &$this usage in SkinTemplate

Using &$this triggers warnings with PHP 7.1.

Bug: T153505
Change-Id: I7798b08a356c64796c9aea1273eef88f8678f8d4
---
M includes/skins/SkinTemplate.php
1 file changed, 21 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/46/328446/1

diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index 69f2e49..575a9ac 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -489,8 +489,10 @@
$tpl->set( 'debughtml', $this->generateDebugHTML() );
$tpl->set( 'reporttime', wfReportTime() );
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $skinTemplate = $this;
// original version by hansm
-   if ( !Hooks::run( 'SkinTemplateOutputPageBeforeExec', [ &$this, 
&$tpl ] ) ) {
+   if ( !Hooks::run( 'SkinTemplateOutputPageBeforeExec', [ 
&$skinTemplate, &$tpl ] ) ) {
wfDebug( __METHOD__ . ": Hook 
SkinTemplateOutputPageBeforeExec broke outputPage execution!\n" );
}
 
@@ -768,8 +770,10 @@
MWNamespace::getSubject( $title->getNamespace() 
) );
}
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $skinTemplate = $this;
$result = [];
-   if ( !Hooks::run( 'SkinTemplateTabAction', [ &$this,
+   if ( !Hooks::run( 'SkinTemplateTabAction', [ &$skinTemplate,
$title, $message, $selected, $checkEdit,
&$classes, &$query, &$text, &$result ] ) ) {
return $result;
@@ -870,8 +874,10 @@
 
$userCanRead = $title->quickUserCan( 'read', $user );
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $skinTemplate = $this;
$preventActiveTabs = false;
-   Hooks::run( 'SkinTemplatePreventOtherActiveTabs', [ &$this, 
&$preventActiveTabs ] );
+   Hooks::run( 'SkinTemplatePreventOtherActiveTabs', [ 
&$skinTemplate, &$preventActiveTabs ] );
 
// Checks if page is some kind of content
if ( $title->canExist() ) {
@@ -1074,7 +1080,9 @@
}
}
 
-   Hooks::run( 'SkinTemplateNavigation', [ &$this, 
&$content_navigation ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $skinTemplate = $this;
+   Hooks::run( 'SkinTemplateNavigation', [ &$skinTemplate, 
&$content_navigation ] );
 
if ( $userCanRead && !$wgDisableLangConversion ) {
$pageLang = $title->getPageLanguage();
@@ -1116,12 +1124,16 @@
'context' => 'subject'
];
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $skinTemplate = $this;
Hooks::run( 'SkinTemplateNavigation::SpecialPage',
-   [ &$this, &$content_navigation ] );
+   [ &$skinTemplate, &$content_navigation ] );
}
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $skinTemplate = $this;
// Equiv to SkinTemplateContentActions
-   Hooks::run( 'SkinTemplateNavigation::Universal', [ &$this, 
&$content_navigation ] );
+   Hooks::run( 'SkinTemplateNavigation::Universal', [ 
&$skinTemplate, &$content_navigation ] );
 
// Setup xml ids and tooltip info
foreach ( $content_navigation as $section => &$links ) {
@@ -1254,9 +1266,11 @@
];
}
 
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $skinTemplate = $this;
// Use the copy of revision ID in case this 
undocumented, shady hook tries to mess with internals
Hooks::run( 
'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink',
-   [ &$this, &$nav_urls, &$revid, &$revid ] );
+   [ &$skinTemplate, &$nav_urls, &$revid, &$revid 
] );
}
 
if ( $out->isArticleRelated() ) {

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

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

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Remove warning about missing site ID

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328326 )

Change subject: Remove warning about missing site ID
..


Remove warning about missing site ID

Seems to interfere with qunit somehow.

Bug: T153729
Bug: T153597
Change-Id: I1a52ce07943f20ccd63f5d357c5e006cd721da64
---
M client/includes/WikibaseClient.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index 5b2e726..eb7b060 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -731,8 +731,6 @@
$site = $this->getSiteStore()->getSite( $siteId );
 
if ( !$site ) {
-   wfWarn( 'Cannot find site ' . $siteId . ' in 
sites table' );
-
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a52ce07943f20ccd63f5d357c5e006cd721da64
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
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...Wikidata[master]: Remove warning about missing site ID

2016-12-20 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328445 )

Change subject: Remove warning about missing site ID
..

Remove warning about missing site ID

Seems to interfere with qunit somehow.

Cherry-picked from I1a52ce07943f20ccd63f5d357c5e006cd721da64 by @Tgr

Bug: T153729
Bug: T153597
Change-Id: I1a52ce07943f20ccd63f5d357c5e006cd721da64
---
0 files changed, 0 insertions(+), 0 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a52ce07943f20ccd63f5d357c5e006cd721da64
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Get rid of the generic_tag rule

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328434 )

Change subject: Get rid of the generic_tag rule
..


Get rid of the generic_tag rule

  * It's only used in xmlish_tag.

Change-Id: Ic16d5ef900a03df06336b3497cc6977cb0ef0eb9
---
M lib/wt2html/pegTokenizer.pegjs
1 file changed, 42 insertions(+), 41 deletions(-)

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



diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index b4bd3e0..f487a3c 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -76,6 +76,24 @@
 }
 };
 
+/* 
+ * Extension tags should be parsed with higher priority than anything else.
+ *
+ * The trick we use is to strip out the content inside a matching tag-pair
+ * and not tokenize it. The content, if it needs to parsed (for example,
+ * for , <*include*> tags), is parsed in a fresh tokenizer context
+ * which means any error correction that needs to happen is restricted to
+ * the scope of the extension content and doesn't spill over to the higher
+ * level.  Ex: 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T143183: Extensions take precedence over templates

2016-12-20 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328444 )

Change subject: T143183: Extensions take precedence over templates
..

T143183: Extensions take precedence over templates

Change-Id: I85fd4d1273aff632abf3cf54fc4ba8293cae5f71
---
M lib/wt2html/pegTokenizer.pegjs
M lib/wt2html/tokenizer.utils.js
M tests/parserTests.txt
3 files changed, 24 insertions(+), 3 deletions(-)


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

diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index f487a3c..381b7ad 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -119,6 +119,9 @@
 constants.HTML.BlockTags.has(uName) && !ignoredExtTag :
 constants.HTML.HTML5Tags.has(uName) || 
constants.HTML.OlderHTMLTags.has(uName);
 
+// WARNING: Be careful to pop this when `isXMLTag` is used.
+stops.push('extTag', isInstalledExt);
+
 return isHtmlTag || isInstalledExt || isIncludeTag;
 };
 
@@ -1220,14 +1223,15 @@
   // should not be parsed as /".
   return stops.push('tableCellArg', false);
 }
-"<"
-end:"/"? name:$(tn:tag_name & { return isXMLTag(tn, false); })
+"<" end:"/"?
+name:$(tn:tag_name & { return isXMLTag(tn, false); })
 attribs:generic_newline_attributes
 space_or_newline* // No need to preserve this -- canonicalize on RT via 
dirty diff
 selfclose:"/"?
 bad_ws:space* // No need to preserve this -- canonicalize on RT via dirty 
diff
 ">" {
 stops.pop('tableCellArg');
+stops.pop('extTag');
 
 var lcName = name.toLowerCase();
 var isVoidElt = Util.isVoidElement(lcName) ? true : null;
@@ -1252,6 +1256,7 @@
 
 return maybeExtensionTag(res);
 }
+/ "<" "/"? tag_name & { stops.pop('extTag'); return false; }
 / & { return stops.pop('tableCellArg'); }
 
 /*
@@ -1267,9 +1272,11 @@
 space_or_newline*
 selfclose:"/"?
 ">" {
+  stops.pop('extTag');
   var t = tu.buildXMLTag(name, name.toLowerCase(), attribs, end, 
selfclose, tsrOffsets());
   return [maybeExtensionTag(t)];
 }
+/ "<" "/"? tag_name & { stops.pop('extTag'); return false; }
 
 // A generic attribute that can span multiple lines.
 generic_newline_attribute
diff --git a/lib/wt2html/tokenizer.utils.js b/lib/wt2html/tokenizer.utils.js
index 9bbd1bb..c09ed65 100644
--- a/lib/wt2html/tokenizer.utils.js
+++ b/lib/wt2html/tokenizer.utils.js
@@ -182,7 +182,8 @@
.test(input.substr(pos 
+ 1)))
);
case '|':
-   return stops.onStack('templateArg') ||
+   return (stops.onStack('templateArg') &&
+   !stops.onStack('extTag')) ||
stops.onStack('tableCellArg') ||
stops.onStack('linkdesc') ||
(stops.onStack('table') && (
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 7703d28..d25c251 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -6465,6 +6465,19 @@
 ho">ha
 !! end
 
+!! test
+Break on | in extension attribute in template
+!! wikitext
+{{echo|1=ha}}
+
+
+!! html/parsoid
+[1]
+
+↑  ha
+!! end
+
 ## We don't support roundtripping of these attributes in Parsoid.
 ## Selective serialization takes care of preventing dirty diffs.
 ## But, on edits, we dirty-diff the invalid attribute text.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85fd4d1273aff632abf3cf54fc4ba8293cae5f71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "dhcp: set installserver for mw1168 to install1001"

2016-12-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328440 )

Change subject: Revert "dhcp: set installserver for mw1168 to install1001"
..


Revert "dhcp: set installserver for mw1168 to install1001"

This was a test before doing https://gerrit.wikimedia.org/r/#/c/328439/ where 
we switch it over for all hosts, and
it worked fine, so we don't need the special case anymore.

This reverts commit 8cc491eaec28fe3773997e4bd5805d8f4e217ff9.

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

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



diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 27c6bb7..41d6e94 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -3981,7 +3981,6 @@
 host mw1168 {
 hardware ethernet 90:B1:1C:27:88:5B;
 fixed-address mw1168.eqiad.wmnet;
-next-server 208.80.154.83; # install1001 (tftp server)
 option pxelinux.pathprefix "trusty-installer/";
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: Test: Do not merge

2016-12-20 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328443 )

Change subject: Test: Do not merge
..

Test: Do not merge

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I816b0bcb50f4e2928670c994faf98734ebe92a94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: PopupButtonWidget: Remove unnecessary CSS property

2016-12-20 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328442 )

Change subject: PopupButtonWidget: Remove unnecessary CSS property
..

PopupButtonWidget: Remove unnecessary CSS property

Removing unnecessary CSS property, as it inherits `position: absolute`
from `.oo-ui-popupWidget` anyways.

Change-Id: I543787044e1c2e8ad87146baeae3bb479d601b6e
---
M src/styles/widgets/PopupButtonWidget.less
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/42/328442/1

diff --git a/src/styles/widgets/PopupButtonWidget.less 
b/src/styles/widgets/PopupButtonWidget.less
index 805239e..b87be1d 100644
--- a/src/styles/widgets/PopupButtonWidget.less
+++ b/src/styles/widgets/PopupButtonWidget.less
@@ -4,7 +4,6 @@
position: relative;
 
.oo-ui-popupWidget {
-   position: absolute;
cursor: auto;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Test

2016-12-20 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328441 )

Change subject: Test
..

Test

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/41/328441/1


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "dhcp: set installserver for mw1168 to install1001"

2016-12-20 Thread Dzahn (Code Review)
Hello jenkins-bot,

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

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

to review the following change.


Change subject: Revert "dhcp: set installserver for mw1168 to install1001"
..

Revert "dhcp: set installserver for mw1168 to install1001"

This was a test before doing https://gerrit.wikimedia.org/r/#/c/328439/ where 
we switch it over for all hosts, and
it worked fine, so we don't need the special case anymore.

This reverts commit 8cc491eaec28fe3773997e4bd5805d8f4e217ff9.

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


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

diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 27c6bb7..41d6e94 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -3981,7 +3981,6 @@
 host mw1168 {
 hardware ethernet 90:B1:1C:27:88:5B;
 fixed-address mw1168.eqiad.wmnet;
-next-server 208.80.154.83; # install1001 (tftp server)
 option pxelinux.pathprefix "trusty-installer/";
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0999b6e343703ba71e5342a38cb5a43d1cd2f357
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
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]: upload: Avoid &$this in hooks

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328387 )

Change subject: upload: Avoid &$this in hooks
..


upload: Avoid &$this in hooks

&$this triggers warnings in PHP 7.1. Simply renaming the variable before
passing it by reference avoids the warning, without breaking backwards
compatibility.

Bug: T153505
Change-Id: I78ea04a01ecce82294837e92c2a05b00ffb6e0f6
---
M includes/specials/SpecialUpload.php
M includes/upload/UploadBase.php
2 files changed, 12 insertions(+), 5 deletions(-)

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



diff --git a/includes/specials/SpecialUpload.php 
b/includes/specials/SpecialUpload.php
index f7e46cb..aabd450 100644
--- a/includes/specials/SpecialUpload.php
+++ b/includes/specials/SpecialUpload.php
@@ -209,7 +209,9 @@
$this->processUpload();
} else {
# Backwards compatibility hook
-   if ( !Hooks::run( 'UploadForm:initial', [ &$this ] ) ) {
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $upload = $this;
+   if ( !Hooks::run( 'UploadForm:initial', [ &$upload ] ) 
) {
wfDebug( "Hook 'UploadForm:initial' broke 
output of the upload form\n" );
 
return;
@@ -483,8 +485,9 @@
 
return;
}
-
-   if ( !Hooks::run( 'UploadForm:BeforeProcessing', [ &$this ] ) ) 
{
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $upload = $this;
+   if ( !Hooks::run( 'UploadForm:BeforeProcessing', [ &$upload ] ) 
) {
wfDebug( "Hook 'UploadForm:BeforeProcessing' broke 
processing the file.\n" );
// This code path is deprecated. If you want to break 
upload processing
// do so by hooking into the appropriate hooks in 
UploadBase::verifyUpload
@@ -570,7 +573,9 @@
 
// Success, redirect to description page
$this->mUploadSuccessful = true;
-   Hooks::run( 'SpecialUploadComplete', [ &$this ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $upload = $this;
+   Hooks::run( 'SpecialUploadComplete', [ &$upload ] );
$this->getOutput()->redirect( 
$this->mLocalFile->getTitle()->getFullURL() );
}
 
diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index ea6ef30..96f8638 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -775,7 +775,9 @@
User::IGNORE_USER_RIGHTS
);
}
-   Hooks::run( 'UploadComplete', [ &$this ] );
+   // Avoid PHP 7.1 warning of passing $this by reference
+   $uploadBase = $this;
+   Hooks::run( 'UploadComplete', [ &$uploadBase ] );
 
$this->postProcessUpload();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78ea04a01ecce82294837e92c2a05b00ffb6e0f6
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Filip 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Filip 
Gerrit-Reviewer: Florianschmidtwelzow 
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] oojs/ui[master]: [DEPRECATING CHANGE] icons: Rename 'betaLaunch' to 'logoWiki...

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326823 )

Change subject: [DEPRECATING CHANGE] icons: Rename 'betaLaunch' to 
'logoWikimediaDiscovery', move pack
..


[DEPRECATING CHANGE] icons: Rename 'betaLaunch' to 'logoWikimediaDiscovery', 
move pack

Change-Id: I6527e91942bb0a719bf5f7aa1dbbbd577e6b840e
---
M demos/pages/icons.js
M src/themes/apex/icons-interactions.json
R src/themes/apex/images/icons/logo-wikimediaDiscovery.svg
M src/themes/mediawiki/icons-interactions.json
M src/themes/mediawiki/icons-wikimedia.json
R src/themes/mediawiki/images/icons/logo-wikimediaDiscovery.svg
6 files changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/demos/pages/icons.js b/demos/pages/icons.js
index 4c9bdc1..ab815df 100644
--- a/demos/pages/icons.js
+++ b/demos/pages/icons.js
@@ -65,7 +65,6 @@
],
interactions: [
'beta',
-   'betaLaunch',
'bookmark',
'browser',
'clear',
@@ -194,6 +193,7 @@
wikimedia: [
'logoCC',
'logoWikimediaCommons',
+   'logoWikimediaDiscovery',
'logoWikipedia'
]
},
diff --git a/src/themes/apex/icons-interactions.json 
b/src/themes/apex/icons-interactions.json
index 02dfffa..449cb77 100644
--- a/src/themes/apex/icons-interactions.json
+++ b/src/themes/apex/icons-interactions.json
@@ -9,7 +9,7 @@
},
"images": {
"beta": { "file": "images/icons/beta.svg" },
-   "betaLaunch": { "file": "images/icons/betaLaunch.svg" },
+   "betaLaunch": { "file": 
"images/icons/logo-wikimediaDiscovery.svg" },
"bookmark": { "file": {
"ltr": "images/icons/bookmark-ltr.svg",
"rtl": "images/icons/bookmark-rtl.svg"
diff --git a/src/themes/apex/images/icons/betaLaunch.svg 
b/src/themes/apex/images/icons/logo-wikimediaDiscovery.svg
similarity index 100%
rename from src/themes/apex/images/icons/betaLaunch.svg
rename to src/themes/apex/images/icons/logo-wikimediaDiscovery.svg
diff --git a/src/themes/mediawiki/icons-interactions.json 
b/src/themes/mediawiki/icons-interactions.json
index f110a04..e040ffb 100644
--- a/src/themes/mediawiki/icons-interactions.json
+++ b/src/themes/mediawiki/icons-interactions.json
@@ -23,7 +23,7 @@
},
"images": {
"beta": { "file": "images/icons/beta.svg" },
-   "betaLaunch": { "file": "images/icons/betaLaunch.svg" },
+   "betaLaunch": { "file": 
"images/icons/logo-wikimediaDiscovery.svg" },
"bookmark": { "file": {
"ltr": "images/icons/bookmark-ltr.svg",
"rtl": "images/icons/bookmark-rtl.svg"
diff --git a/src/themes/mediawiki/icons-wikimedia.json 
b/src/themes/mediawiki/icons-wikimedia.json
index 61aec85..14f6b18 100644
--- a/src/themes/mediawiki/icons-wikimedia.json
+++ b/src/themes/mediawiki/icons-wikimedia.json
@@ -24,6 +24,7 @@
"images": {
"logoCC": { "file": "images/icons/logo-cc.svg" },
"logoWikimediaCommons": { "file": 
"images/icons/logo-wikimediaCommons.svg" },
+   "logoWikimediaDiscovery": { "file": 
"images/icons/logo-wikimediaDiscovery.svg" },
"logoWikipedia": { "file": "images/icons/logo-wikipedia.svg" }
}
 }
diff --git a/src/themes/mediawiki/images/icons/betaLaunch.svg 
b/src/themes/mediawiki/images/icons/logo-wikimediaDiscovery.svg
similarity index 100%
rename from src/themes/mediawiki/images/icons/betaLaunch.svg
rename to src/themes/mediawiki/images/icons/logo-wikimediaDiscovery.svg

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6527e91942bb0a719bf5f7aa1dbbbd577e6b840e
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: VolkerE 
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]: install/dhcp: switch all "next-server" from carbon to instal...

2016-12-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328439 )

Change subject: install/dhcp: switch all "next-server" from carbon to 
install1001
..

install/dhcp: switch all "next-server" from carbon to install1001

Make all networks use install1001 as tftp server where they used
to use carbon as tftp server. I have tested it with a single host
and installing from install1001 worked just fine now.

Bug: T132757
Change-Id: I8ed5efb77b23cde638ec325c1a3fbe95d0cb3c63
---
M modules/install_server/files/dhcpd/dhcpd.conf
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 18 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/328439/1

diff --git a/modules/install_server/files/dhcpd/dhcpd.conf 
b/modules/install_server/files/dhcpd/dhcpd.conf
index 6ce3650..92361d1 100644
--- a/modules/install_server/files/dhcpd/dhcpd.conf
+++ b/modules/install_server/files/dhcpd/dhcpd.conf
@@ -159,7 +159,7 @@
 option routers 208.80.154.1;
 option domain-name "wikimedia.org";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # public1-b-eqiad
@@ -171,7 +171,7 @@
 option routers 208.80.154.129;
 option domain-name "wikimedia.org";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # public1-c-eqiad
@@ -183,7 +183,7 @@
 option routers 208.80.154.65;
 option domain-name "wikimedia.org";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # public1-d-eqiad
@@ -195,7 +195,7 @@
 option routers 208.80.155.97;
 option domain-name "wikimedia.org";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # sandbox1-b-eqiad
@@ -207,7 +207,7 @@
 option routers 208.80.155.65;
 option domain-name "wikimedia.org";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # private1-a-eqiad
@@ -219,7 +219,7 @@
 option routers 10.64.0.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # private1-b-eqiad
@@ -231,7 +231,7 @@
 option routers 10.64.16.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # private1-c-eqiad
@@ -243,7 +243,7 @@
 option routers 10.64.32.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # private1-d-eqiad
@@ -255,7 +255,7 @@
 option routers 10.64.48.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # labs-hosts1-a-eqiad subnet
@@ -267,7 +267,7 @@
 option routers 10.64.4.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # labs-hosts1-b-eqiad subnet
@@ -279,7 +279,7 @@
 option routers 10.64.20.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # labs-support1-c-eqiad subnet
@@ -291,7 +291,7 @@
 option routers 10.64.37.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # analytics1-a-eqiad subnet
@@ -303,7 +303,7 @@
 option routers 10.64.5.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # analytics1-b-eqiad subnet
@@ -315,7 +315,7 @@
 option routers 10.64.21.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # analytics1-c-eqiad subnet
@@ -327,7 +327,7 @@
 option routers 10.64.36.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 # analytics1-d-eqiad subnet
@@ -339,7 +339,7 @@
 option routers 10.64.53.1;
 option domain-name "eqiad.wmnet";
 
-next-server 208.80.154.10; # carbon (tftp server)
+next-server 208.80.154.83; # install1001 (tftp server)
 }
 
 #
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 

[MediaWiki-commits] [Gerrit] integration/config[master]: minor localisation link changes within README file

2016-12-20 Thread Zppix (Code Review)
Zppix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328437 )

Change subject: minor localisation link changes within README file
..

minor localisation link changes within README file

Change-Id: I40cbf2e0ea2c010a2700135ec1382b1b73531076
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/37/328437/1

diff --git a/README.md b/README.md
index fb9a052..5d7c53f 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
 
 When you tweak or add jobs, follow the documentation maintained on 
mediawiki.org:
 
-  https://www.mediawiki.org/wiki/CI/JJB
+  https://www.mediawiki.org/wiki/Special:MyLanguage/CI/JJB
 
 For more about the Jenkins Job Builder software and how to use it, refer to 
the upstream documentation:
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Test

2016-12-20 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328438 )

Change subject: Test
..

Test

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/328438/1


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: The match percentage is not localized in Translate suggestions

2016-12-20 Thread Huji (Code Review)
Huji has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328436 )

Change subject: The match percentage is not localized in Translate suggestions
..

The match percentage is not localized in Translate suggestions

Bug: T153514
Change-Id: Icf20cd5bf7cc050d59d454946eb530cecab99d1f
---
M resources/js/ext.translate.editor.helpers.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/js/ext.translate.editor.helpers.js 
b/resources/js/ext.translate.editor.helpers.js
index 5c3ef11..7d8033d 100644
--- a/resources/js/ext.translate.editor.helpers.js
+++ b/resources/js/ext.translate.editor.helpers.js
@@ -317,7 +317,7 @@
$( '' )
.addClass( 'three 
columns quality text-right' )
.text( mw.msg( 
'tux-editor-tm-match',
-   Math.floor( 
translation.quality * 100 ) ) ),
+   Math.floor( 
translation.quality * 100 ).toLocaleString( translation.language ) ) ),
$( '' )
.addClass( 'row 
text-right' )
.append(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf20cd5bf7cc050d59d454946eb530cecab99d1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Huji 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Test: Do not merge

2016-12-20 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328435 )

Change subject: Test: Do not merge
..

Test: Do not merge

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/35/328435/1


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: dhcp: set installserver for mw1168 to install1001

2016-12-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328427 )

Change subject: dhcp: set installserver for mw1168 to install1001
..


dhcp: set installserver for mw1168 to install1001

mw1168 should be reinstalled with a different partman
recipe per mail from Luca.

And i wanted to test if using install1001 works to
replace/reinstall carbon.

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

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



diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 41d6e94..27c6bb7 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -3981,6 +3981,7 @@
 host mw1168 {
 hardware ethernet 90:B1:1C:27:88:5B;
 fixed-address mw1168.eqiad.wmnet;
+next-server 208.80.154.83; # install1001 (tftp server)
 option pxelinux.pathprefix "trusty-installer/";
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Get rid of the generic_tag rule

2016-12-20 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328434 )

Change subject: Get rid of the generic_tag rule
..

Get rid of the generic_tag rule

  * It's only used in xmlish_tag.

Change-Id: Ic16d5ef900a03df06336b3497cc6977cb0ef0eb9
---
M lib/wt2html/pegTokenizer.pegjs
1 file changed, 42 insertions(+), 41 deletions(-)


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

diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index b4bd3e0..f487a3c 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -76,6 +76,24 @@
 }
 };
 
+/* 
+ * Extension tags should be parsed with higher priority than anything else.
+ *
+ * The trick we use is to strip out the content inside a matching tag-pair
+ * and not tokenize it. The content, if it needs to parsed (for example,
+ * for , <*include*> tags), is parsed in a fresh tokenizer context
+ * which means any error correction that needs to happen is restricted to
+ * the scope of the extension content and doesn't spill over to the higher
+ * level.  Ex: 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "install/apt: set install2001 to active host temp."

2016-12-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328433 )

Change subject: Revert "install/apt: set install2001 to active host temp."
..


Revert "install/apt: set install2001 to active host temp."

This reverts commit bc6da726521e34e8a1f7ca1fd0a0d86ab5ce15ec.

Change-Id: I5c4cd2f612f8bd4c58de40f7ee7373866cf18b6e
---
M hieradata/hosts/install2001.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/hieradata/hosts/install2001.yaml b/hieradata/hosts/install2001.yaml
index 0100918..2984fb1 100644
--- a/hieradata/hosts/install2001.yaml
+++ b/hieradata/hosts/install2001.yaml
@@ -3,4 +3,4 @@
   debdeploy-tftpserver:
 value: standard
 
-apt::wikimedia::active-host: true
+apt::wikimedia::active-host: false

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: install/apt: set install2001 to active host temp.

2016-12-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328432 )

Change subject: install/apt: set install2001 to active host temp.
..


install/apt: set install2001 to active host temp.

Have to set install2001 as the active host and
let puppet run once, _then_ disable it again to avoid
puppet errors with dependency on
/etc/acme/challenge-nginx.conf.

Change-Id: I064decd0471ea89df89bff026e8d9ed956b66d18
---
M hieradata/hosts/install2001.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/hieradata/hosts/install2001.yaml b/hieradata/hosts/install2001.yaml
index 2984fb1..0100918 100644
--- a/hieradata/hosts/install2001.yaml
+++ b/hieradata/hosts/install2001.yaml
@@ -3,4 +3,4 @@
   debdeploy-tftpserver:
 value: standard
 
-apt::wikimedia::active-host: false
+apt::wikimedia::active-host: true

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "install/apt: set install2001 to active host temp."

2016-12-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328433 )

Change subject: Revert "install/apt: set install2001 to active host temp."
..

Revert "install/apt: set install2001 to active host temp."

This reverts commit bc6da726521e34e8a1f7ca1fd0a0d86ab5ce15ec.

Change-Id: I5c4cd2f612f8bd4c58de40f7ee7373866cf18b6e
---
M hieradata/hosts/install2001.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/hieradata/hosts/install2001.yaml b/hieradata/hosts/install2001.yaml
index 0100918..2984fb1 100644
--- a/hieradata/hosts/install2001.yaml
+++ b/hieradata/hosts/install2001.yaml
@@ -3,4 +3,4 @@
   debdeploy-tftpserver:
 value: standard
 
-apt::wikimedia::active-host: true
+apt::wikimedia::active-host: false

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: install/apt: set install2001 to active host temp.

2016-12-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328432 )

Change subject: install/apt: set install2001 to active host temp.
..

install/apt: set install2001 to active host temp.

Have to set install2001 as the active host and
let puppet run once, _then_ disable it again to avoid
puppet errors with dependency on
/etc/acme/challenge-nginx.conf.

Change-Id: I064decd0471ea89df89bff026e8d9ed956b66d18
---
M hieradata/hosts/install2001.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/hieradata/hosts/install2001.yaml b/hieradata/hosts/install2001.yaml
index 2984fb1..0100918 100644
--- a/hieradata/hosts/install2001.yaml
+++ b/hieradata/hosts/install2001.yaml
@@ -3,4 +3,4 @@
   debdeploy-tftpserver:
 value: standard
 
-apt::wikimedia::active-host: false
+apt::wikimedia::active-host: true

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[mpga]: ext.popups module should be loaded for anon users

2016-12-20 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328431 )

Change subject: ext.popups module should be loaded for anon users
..

ext.popups module should be loaded for anon users

Bug: T146889
Change-Id: I11dc6208334daa556d376f04aeb099a2642fcec0
---
M includes/PopupsContext.php
M tests/phpunit/PopupsContextTest.php
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/PopupsContext.php b/includes/PopupsContext.php
index bd8fb69..f64d780 100644
--- a/includes/PopupsContext.php
+++ b/includes/PopupsContext.php
@@ -119,7 +119,7 @@
 */
public function isEnabledByUser( \User $user ) {
if ( $user->isAnon() ) {
-   return false;
+   return true;
}
if ( $this->isBetaModeOn() ) {
return \BetaFeatures::isFeatureEnabled( $user, 
self::PREVIEWS_BETA_PREFERENCE_NAME );
diff --git a/tests/phpunit/PopupsContextTest.php 
b/tests/phpunit/PopupsContextTest.php
index bcd3ea6..2ef1b6c 100644
--- a/tests/phpunit/PopupsContextTest.php
+++ b/tests/phpunit/PopupsContextTest.php
@@ -163,13 +163,13 @@
$user = $this->getMutableTestUser()->getUser();
$user->setId( self::ANONYMOUS_USER );
$user->setOption( PopupsContext::PREVIEWS_OPTIN_PREFERENCE_NAME,
-   PopupsContext::PREVIEWS_ENABLED );
+   PopupsContext::PREVIEWS_DISABLED );
$this->setMwGlobals( [
"wgPopupsBetaFeature" => false
] );
 
$context = PopupsContext::getInstance();
-   $this->assertEquals( false, $context->isEnabledByUser( $user ) 
);
+   $this->assertEquals( true, $context->isEnabledByUser( $user ) );
}
/**
 * @return array/

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11dc6208334daa556d376f04aeb099a2642fcec0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: mpga
Gerrit-Owner: Pmiazga 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: install: add http & proxy roles on install2001

2016-12-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325743 )

Change subject: install: add http & proxy roles on install2001
..


install: add http & proxy roles on install2001

Make install2001 match install1001 by including
the (new) http and proxy classes one subtask of T132757 says.

Bug: T132757
Change-Id: Ie1c89f96b7932fc6cfe5a3afc22b93e8dab2e24c
---
M manifests/site.pp
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index a77b813..797966e 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1325,6 +1325,9 @@
 node 'install2001.wikimedia.org' {
 role(installserver::tftp,
 installserver::dhcp,
+installserver::http,
+installserver::proxy,
+installserver::preseed,
 aptrepo::wikimedia)
 
 $cluster = 'misc'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1c89f96b7932fc6cfe5a3afc22b93e8dab2e24c
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
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...Popups[mpga]: Inject preference option directly after skin select

2016-12-20 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328430 )

Change subject: Inject preference option directly after skin select
..

Inject preference option directly after skin select

Changes:
 - onGetPreferences will try to inject PagePreviews option after
skin select or on the end of section when skin select is not available
 - unit tests for new behaviour

Bug: T146889
Change-Id: Id14c0774aee917b7e949ab3ba5968a038b3ca933
---
M Popups.hooks.php
M tests/phpunit/PopupsHooksTest.php
2 files changed, 44 insertions(+), 5 deletions(-)


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

diff --git a/Popups.hooks.php b/Popups.hooks.php
index e9d1b29..198a074 100644
--- a/Popups.hooks.php
+++ b/Popups.hooks.php
@@ -55,17 +55,27 @@
if ( !$module->showPreviewsOptInOnPreferencesPage() ) {
return;
}
-   $prefs[PopupsContext::PREVIEWS_OPTIN_PREFERENCE_NAME] = [
+   $option = [
'type' => 'radio',
'label-message' => 'popups-prefs-optin-title',
'options' => [
wfMessage( 'popups-prefs-optin-enabled-label' 
)->text()
-   => PopupsContext::PREVIEWS_ENABLED,
+   => PopupsContext::PREVIEWS_ENABLED,
wfMessage( 'popups-prefs-optin-disabled-label' 
)->text()
-   => PopupsContext::PREVIEWS_DISABLED
+   => PopupsContext::PREVIEWS_DISABLED
],
'section' => self::PREVIEWS_PREFERENCES_SECTION
];
+   $skinPosition = array_search( 'skin', array_keys( $prefs ) );
+
+   if ( $skinPosition !== false ) {
+   $injectIntoIndex = $skinPosition + 1;
+   $prefs = array_slice( $prefs, 0, $injectIntoIndex, true 
)
+   + [ 
PopupsContext::PREVIEWS_OPTIN_PREFERENCE_NAME => $option ]
+   + array_slice( $prefs, $injectIntoIndex, count( 
$prefs ) - 1, true );
+   } else {
+   $prefs[ PopupsContext::PREVIEWS_OPTIN_PREFERENCE_NAME ] 
= $option;
+   }
}
 
public static function onBeforePageDisplay( OutputPage &$out, Skin 
&$skin ) {
diff --git a/tests/phpunit/PopupsHooksTest.php 
b/tests/phpunit/PopupsHooksTest.php
index a2dd1e3..8825233 100644
--- a/tests/phpunit/PopupsHooksTest.php
+++ b/tests/phpunit/PopupsHooksTest.php
@@ -86,12 +86,41 @@
->will( $this->returnValue( true ) );
 
PopupsContextTestWrapper::injectTestInstance( $contextMock );
-   $prefs = [ 'someNotEmptyValue' => 'notEmpty' ];
+   $prefs = [
+   'someNotEmptyValue' => 'notEmpty',
+   'skin' => 'skin stuff',
+   'other' => 'notEmpty'
+   ];
 
PopupsHooks::onGetPreferences( $this->getTestUser()->getUser(), 
$prefs );
-   $this->assertCount( 2, $prefs );
+   $this->assertCount( 4, $prefs );
$this->assertEquals( 'notEmpty', $prefs[ 'someNotEmptyValue'] );
$this->assertArrayHasKey( 
\Popups\PopupsContext::PREVIEWS_OPTIN_PREFERENCE_NAME, $prefs );
+   $this->assertEquals( 2, array_search( 
\Popups\PopupsContext::PREVIEWS_OPTIN_PREFERENCE_NAME,
+   array_keys( $prefs ) ), ' PagePreviews preferences 
should be injected after Skin select' );
+   }
+
+   /**
+* @covers ::onGetPreferences
+*/
+   public function 
testOnGetPreferencesPreviewsEnabledWhenSkinIsNotAvailable() {
+   $contextMock = $this->getMock( PopupsContextTestWrapper::class,
+   [ 'showPreviewsOptInOnPreferencesPage' ], [ 
ExtensionRegistry::getInstance() ] );
+   $contextMock->expects( $this->once() )
+   ->method( 'showPreviewsOptInOnPreferencesPage' )
+   ->will( $this->returnValue( true ) );
+
+   PopupsContextTestWrapper::injectTestInstance( $contextMock );
+   $prefs = [
+   'someNotEmptyValue' => 'notEmpty',
+   'other' => 'notEmpty'
+   ];
+
+   PopupsHooks::onGetPreferences( $this->getTestUser()->getUser(), 
$prefs );
+   $this->assertCount( 3, $prefs );
+   $this->assertArrayHasKey( 
\Popups\PopupsContext::PREVIEWS_OPTIN_PREFERENCE_NAME, $prefs );
+   $this->assertEquals( 2, array_search( 
\Popups\PopupsContext::PREVIEWS_OPTIN_PREFERENCE_NAME,
+   array_keys( $prefs ) ), ' PagePreviews should be 
injected at end of 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: install: add hiera override to skip Letsencrypt cert creation

2016-12-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328429 )

Change subject: install: add hiera override to skip Letsencrypt cert creation
..


install: add hiera override to skip Letsencrypt cert creation

Add a Hiera override to skip the Letsecnrypt cert creation
for apt.wikimedia.org on the hosts that currently don't serve
it but have the role applied.

Bug: T132757
Change-Id: I11a07dbfdc3317422a5f553e9d6b069479d8506c
---
A hieradata/hosts/carbon.yaml
M hieradata/hosts/install1001.yaml
M hieradata/hosts/install2001.yaml
M modules/install_server/manifests/web_server.pp
4 files changed, 12 insertions(+), 5 deletions(-)

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



diff --git a/hieradata/hosts/carbon.yaml b/hieradata/hosts/carbon.yaml
new file mode 100644
index 000..a583592
--- /dev/null
+++ b/hieradata/hosts/carbon.yaml
@@ -0,0 +1 @@
+apt::wikimedia::active-host: true
diff --git a/hieradata/hosts/install1001.yaml b/hieradata/hosts/install1001.yaml
index a54dfbb..2984fb1 100644
--- a/hieradata/hosts/install1001.yaml
+++ b/hieradata/hosts/install1001.yaml
@@ -2,3 +2,5 @@
 debdeploy::grains:
   debdeploy-tftpserver:
 value: standard
+
+apt::wikimedia::active-host: false
diff --git a/hieradata/hosts/install2001.yaml b/hieradata/hosts/install2001.yaml
index a54dfbb..2984fb1 100644
--- a/hieradata/hosts/install2001.yaml
+++ b/hieradata/hosts/install2001.yaml
@@ -2,3 +2,5 @@
 debdeploy::grains:
   debdeploy-tftpserver:
 value: standard
+
+apt::wikimedia::active-host: false
diff --git a/modules/install_server/manifests/web_server.pp 
b/modules/install_server/manifests/web_server.pp
index 221c2e1..935c7f5 100644
--- a/modules/install_server/manifests/web_server.pp
+++ b/modules/install_server/manifests/web_server.pp
@@ -16,12 +16,14 @@
 class install_server::web_server {
 include ::nginx
 
-letsencrypt::cert::integrated { 'apt':
-subjects   => 'apt.wikimedia.org',
-puppet_svc => 'nginx',
-system_svc => 'nginx',
+if hiera('apt::wikimedia::active-host', false) {
+letsencrypt::cert::integrated { 'apt':
+subjects   => 'apt.wikimedia.org',
+puppet_svc => 'nginx',
+system_svc => 'nginx',
+}
+# TODO: Monitor SSL?
 }
-# TODO: Monitor SSL?
 
 $ssl_settings = ssl_ciphersuite('nginx', 'mid', true)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I11a07dbfdc3317422a5f553e9d6b069479d8506c
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
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...AntiBot[master]: Replaced deprecated hooks

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328428 )

Change subject: Replaced deprecated hooks
..


Replaced deprecated hooks

Bug: T151973
Change-Id: I30dbcedf54bf4cfb4602ed129353e93304f935f7
---
M available/GenericFormEncoding.php
M available/XRumerCommentBug.php
M available/XRumerCookieBug.php
3 files changed, 26 insertions(+), 15 deletions(-)

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



diff --git a/available/GenericFormEncoding.php 
b/available/GenericFormEncoding.php
index 862cda6..a059aad 100644
--- a/available/GenericFormEncoding.php
+++ b/available/GenericFormEncoding.php
@@ -8,21 +8,21 @@
  * attribute.
  */
 
-$wgHooks['EditFilterMerged'][] = 
'AntiBot_GenericFormEncoding::onEditFilterMerged';
+$wgHooks['EditFilterMergedContent'][] = 
'AntiBot_GenericFormEncoding::onEditFilterMergedContent';
 
 class AntiBot_GenericFormEncoding {
/**
-* @param $editPage EditPage
-* @param $text string
-* @param $hookError
+* @param $context IContextSource
+* @param $content Content
+* @param $status Status
+* @param $summary string
+* @param $user User
 * @return bool
 */
-   public static function onEditFilterMerged( $editPage, $text, 
&$hookError ) {
-   global $wgUser;
+   public static function onEditFilterMergedContent( $context, $content, 
$status, $summary, $user ) {
+   $header = $context->getRequest()->getHeader( 'Content-Type' );
 
-   $header = 
$editPage->getArticle()->getContext()->getRequest()->getHeader( 'Content-Type' 
);
-
-   if ( $header === 'application/x-www-form-urlencoded' && 
!$wgUser->isAllowed( 'bot' )
+   if ( $header === 'application/x-www-form-urlencoded' && 
!$user->isAllowed( 'bot' )
&& AntiBot::trigger( __CLASS__ ) == 'fail' ) {
return false;
}
diff --git a/available/XRumerCommentBug.php b/available/XRumerCommentBug.php
index adb667e..2baff1e 100644
--- a/available/XRumerCommentBug.php
+++ b/available/XRumerCommentBug.php
@@ -5,7 +5,7 @@
  */
 
 $wgHooks['EditPage::showEditForm:fields'][] = 
'AntiBot_XRumerCommentBug::onEditFormFields';
-$wgHooks['EditFilterMerged'][] = 
'AntiBot_XRumerCommentBug::onEditFilterMerged';
+$wgHooks['EditFilterMergedContent'][] = 
'AntiBot_XRumerCommentBug::onEditFilterMergedContent';
 
 class AntiBot_XRumerCommentBug {
function onEditFormFields( &$editPage, &$wgOut ) {
@@ -14,9 +14,14 @@
return true;
}
 
-   function onEditFilterMerged( $editPage, $text, &$hookError ) {
-   global $wgRequest;
-   if ( $wgRequest->getVal( AntiBot::getSecret( 'CommentBug' ) ) 
!== null ){
+   /**
+* @param $context IContextSource
+* @param $content Content
+* @param $status Status
+* @return bool
+*/
+   function onEditFilterMergedContent( $context, $content, $status ) {
+   if ( $context->getRequest()->getVal( AntiBot::getSecret( 
'CommentBug' ) ) !== null ){
if ( AntiBot::trigger(__CLASS__) == 'fail' ) {
return false;
}
diff --git a/available/XRumerCookieBug.php b/available/XRumerCookieBug.php
index 3adeea2..7f08f44 100644
--- a/available/XRumerCookieBug.php
+++ b/available/XRumerCookieBug.php
@@ -7,7 +7,7 @@
  */
 
 $wgHooks['EditPage::showEditForm:initial'][] = 
'AntiBot_XRumerCookieBug::onEditForm';
-$wgHooks['EditFilterMerged'][] = 'AntiBot_XRumerCookieBug::onEditFilterMerged';
+$wgHooks['EditFilterMergedContent'][] = 
'AntiBot_XRumerCookieBug::onEditFilterMergedContent';
 
 class AntiBot_XRumerCookieBug {
function onEditForm( &$editPage ) {
@@ -18,7 +18,13 @@
return true;
}
 
-   function onEditFilterMerged( $editPage, $text, &$hookError ) {
+   /**
+* @param $context IContextSource
+* @param $content Content
+* @param $status Status
+* @return bool
+*/
+   function onEditFilterMergedContent( $context, $content, $status ) {
if ( isset( $_COOKIE[AntiBot::getSecret( 'CookieBug2' ) ] ) ) {
if ( AntiBot::trigger(__CLASS__) == 'fail' ) {
return false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30dbcedf54bf4cfb4602ed129353e93304f935f7
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/AntiBot
Gerrit-Branch: master
Gerrit-Owner: Georggi199 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Protect -{...}- variant constructs in galleries

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/76341 )

Change subject: Protect -{...}- variant constructs in galleries
..


Protect -{...}- variant constructs in galleries

This also protects naked external links, which are internally surrounded by
`-{R|...}-` by LanguageConverter::markNoConversion.

Originally found in failed tests in I7fa2d85d6.

Bug: T54190
Change-Id: I9b099273203482ffb570a5654d8ba50c833e526d
---
M includes/parser/Parser.php
M tests/parser/parserTests.txt
2 files changed, 133 insertions(+), 1 deletion(-)

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



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 8f9830c..5b2dadd 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -5018,7 +5018,10 @@
// FIXME: Doing recursiveTagParse at this 
stage, and the trim before
// splitting on '|' is a bit odd, and different 
from makeImage.
$matches[3] = $this->recursiveTagParse( trim( 
$matches[3] ) );
-   $parameterMatches = StringUtils::explode( '|', 
$matches[3] );
+   // Protect LanguageConverter markup
+   $parameterMatches = 
StringUtils::delimiterExplode(
+   '-{', '}-', '|', $matches[3], true /* 
nested */
+   );
 
foreach ( $parameterMatches as $parameterMatch 
) {
list( $magicName, $match ) = 
$mwArray->matchVariableStartToEnd( $parameterMatch );
@@ -5035,6 +5038,11 @@
$addr = 
self::EXT_LINK_ADDR;
$prots = 
$this->mUrlProtocols;
// check to see if link 
matches an absolute url, if not then it must be a wiki link.
+   if ( preg_match( 
'/^-{R|(.*)}-$/', $linkValue ) ) {
+   // Result of 
LanguageConverter::markNoConversion
+   // invoked on 
an external link.
+   $linkValue = 
substr( $linkValue, 4, -2 );
+   }
if ( preg_match( 
"/^($prots)$addr$chars*$/u", $linkValue ) ) {
$link = 
$linkValue;
} else {
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index edcc2c4..b34a03f 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -20643,6 +20643,35 @@
 
 !! end
 
+!! test
+Don't break gallery if language converter markup is inside.
+!! options
+language=zh
+!! wikitext
+
+File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
+File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
+
+!! html
+
+   
+   http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg; 
width="120" height="14" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" 
/>
+   
+http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg; 
width="20" height="2" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" />
+
+   
+   
+   
+   http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg; 
width="120" height="14" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" 
/>
+   
+This is a test template
+
+   
+   
+
+
+!! end
+
 # FIXME: This test is currently broken in the PHP parser (bug 52661)
 !! test
 Don't break list handling if language converter markup is in the item.
@@ -22240,7 +22269,102 @@
 
 !! end
 
+!!test
+Gallery override link with WikiLink (bug 34852)
+!! wikitext
+
+File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
+
+!! html
+
+   
+   http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg; 
width="120" height="14" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" 
/>
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: install: add hiera override to skip Letsencrypt cert creation

2016-12-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328429 )

Change subject: install: add hiera override to skip Letsencrypt cert creation
..

install: add hiera override to skip Letsencrypt cert creation

Add a Hiera override to skip the Letsecnrypt cert creation
for apt.wikimedia.org on the hosts that currently don't serve
it but have the role applied.

Bug: T132757
Change-Id: I11a07dbfdc3317422a5f553e9d6b069479d8506c
---
A hieradata/hosts/carbon.yaml
M hieradata/hosts/install1001.yaml
M hieradata/hosts/install2001.yaml
M modules/install_server/manifests/web_server.pp
4 files changed, 12 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/328429/1

diff --git a/hieradata/hosts/carbon.yaml b/hieradata/hosts/carbon.yaml
new file mode 100644
index 000..a583592
--- /dev/null
+++ b/hieradata/hosts/carbon.yaml
@@ -0,0 +1 @@
+apt::wikimedia::active-host: true
diff --git a/hieradata/hosts/install1001.yaml b/hieradata/hosts/install1001.yaml
index a54dfbb..2984fb1 100644
--- a/hieradata/hosts/install1001.yaml
+++ b/hieradata/hosts/install1001.yaml
@@ -2,3 +2,5 @@
 debdeploy::grains:
   debdeploy-tftpserver:
 value: standard
+
+apt::wikimedia::active-host: false
diff --git a/hieradata/hosts/install2001.yaml b/hieradata/hosts/install2001.yaml
index a54dfbb..2984fb1 100644
--- a/hieradata/hosts/install2001.yaml
+++ b/hieradata/hosts/install2001.yaml
@@ -2,3 +2,5 @@
 debdeploy::grains:
   debdeploy-tftpserver:
 value: standard
+
+apt::wikimedia::active-host: false
diff --git a/modules/install_server/manifests/web_server.pp 
b/modules/install_server/manifests/web_server.pp
index 221c2e1..935c7f5 100644
--- a/modules/install_server/manifests/web_server.pp
+++ b/modules/install_server/manifests/web_server.pp
@@ -16,12 +16,14 @@
 class install_server::web_server {
 include ::nginx
 
-letsencrypt::cert::integrated { 'apt':
-subjects   => 'apt.wikimedia.org',
-puppet_svc => 'nginx',
-system_svc => 'nginx',
+if hiera('apt::wikimedia::active-host', false) {
+letsencrypt::cert::integrated { 'apt':
+subjects   => 'apt.wikimedia.org',
+puppet_svc => 'nginx',
+system_svc => 'nginx',
+}
+# TODO: Monitor SSL?
 }
-# TODO: Monitor SSL?
 
 $ssl_settings = ssl_ciphersuite('nginx', 'mid', true)
 

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Capture qunit curl commands + log JavaScriptTest output

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328401 )

Change subject: Capture qunit curl commands + log JavaScriptTest output
..


Capture qunit curl commands + log JavaScriptTest output

We emit a couple curl commands against the webhost to assist in
debugging. Use 'tee' to write the full output of each command to /log/.

Also add output of Special:JavaScriptTest/qunit/export to assist in
T153597. Will help spot an invalid javascript when PHP errors are
emitted.

Update:
mediawiki-core-qunit-jessie
mediawiki-core-selenium-jessie
mediawiki-extensions-qunit-jessie
mediawiki-selenium-integration
mediawiki-selenium-integration-jessie
mwext-mw-rspec-jessie
mwext-mw-selenium-composer-jessie
mwext-mw-selenium-jessie
mwext-qunit-composer-jessie
mwext-qunit-jessie

Bug: T153597
Change-Id: Idc71bad8b4518c03ec33e619ffd49b29a1d3643a
---
M jjb/macro.yaml
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/jjb/macro.yaml b/jjb/macro.yaml
index 45c6d5d..fd6a428 100644
--- a/jjb/macro.yaml
+++ b/jjb/macro.yaml
@@ -310,8 +310,9 @@
 
 # Fetch headers and content preview for debugging (HTTP 500 Error, 
Database error, ResourceLoader etc.)
 # NB: Uses 'tac' twice to exhaust buffer before using 'head' to avoid 
"curl: Failed writing body" error.
-curl --include 
"${MW_SERVER}${MW_SCRIPT_PATH}/index.php/Special:BlankPage" | tac|tac | head 
-n42
-curl --include 
"${MW_SERVER}${MW_SCRIPT_PATH}/load.php?debug=true=startup=scripts"
 | tac|tac | head -n42
+curl --include 
"${MW_SERVER}${MW_SCRIPT_PATH}/index.php/Special:BlankPage" | tee 
log/curl-SpecialBlankPage.log | tac|tac | head -n42
+curl --include 
"${MW_SERVER}${MW_SCRIPT_PATH}/load.php?debug=true=startup=scripts"
 | tee log/curl-load-startup.log | tac|tac | head -n42
+curl --include 
"${MW_SERVER}${MW_SCRIPT_PATH}/index.php?title=Special:JavaScriptTest/qunit/export"
 | tee log/curl-SpecialJavaScriptTest.log | tac|tac | head -n11
 
 # qunit
 #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc71bad8b4518c03ec33e619ffd49b29a1d3643a
Gerrit-PatchSet: 3
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] mediawiki/core[master]: Protect -{...}- variant constructs in images.

2016-12-20 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327042 )

Change subject: Protect -{...}- variant constructs in images.
..


Protect -{...}- variant constructs in images.

A protected version of explode is factored out as
`StringUtils::delimiterExplode`, since it will be used in follow-up
patches in this series.  The `delimiterExplode` implementation creates
an intermediate array of the exploded results, which is reasonable as
the number of image options is small; but since an Iterator is
returned the implementation can be upgraded in the future (at the cost
of additional complexity) to avoid this.  The additional code in that
case would be similar to ExplodeIterator.

Bug: T146305
Change-Id: I1327685e9e8c07ef476dceaa6f6dae4ba40989ef
---
M includes/libs/StringUtils.php
M includes/parser/Parser.php
M tests/parser/parserTests.txt
3 files changed, 76 insertions(+), 6 deletions(-)

Approvals:
  Tim Starling: Verified; Looks good to me, approved



diff --git a/includes/libs/StringUtils.php b/includes/libs/StringUtils.php
index 6b10c09..26f3c4a 100644
--- a/includes/libs/StringUtils.php
+++ b/includes/libs/StringUtils.php
@@ -55,6 +55,59 @@
}
 
/**
+* Explode a string, but ignore any instances of the separator inside
+* the given start and end delimiters, which may optionally nest.
+* The delimiters are literal strings, not regular expressions.
+* @param string $startDelim Start delimiter
+* @param string $endDelim End delimiter
+* @param string $separator Separator string for the explode.
+* @param string $subject Subject string to explode.
+* @param bool $nested True iff the delimiters are allowed to nest.
+* @return ArrayIterator
+*/
+   static function delimiterExplode( $startDelim, $endDelim, $separator,
+   $subject, $nested = false ) {
+   $inputPos = 0;
+   $lastPos = 0;
+   $depth = 0;
+   $encStart = preg_quote( $startDelim, '!' );
+   $encEnd = preg_quote( $endDelim, '!' );
+   $encSep = preg_quote( $separator, '!' );
+   $len = strlen( $subject );
+   $m = [];
+   $exploded = [];
+   while (
+   $inputPos < $len &&
+   preg_match(
+   "!$encStart|$encEnd|$encSep!S", $subject, $m,
+   PREG_OFFSET_CAPTURE, $inputPos
+   )
+   ) {
+   $match = $m[0][0];
+   $matchPos = $m[0][1];
+   $inputPos = $matchPos + strlen( $match );
+   if ( $match === $separator ) {
+   if ( $depth === 0 ) {
+   $exploded[] = substr(
+   $subject, $lastPos, $matchPos - 
$lastPos
+   );
+   $lastPos = $inputPos;
+   }
+   } elseif ( $match === $startDelim ) {
+   if ( $depth === 0 || $nested ) {
+   $depth++;
+   }
+   } else {
+   $depth--;
+   }
+   }
+   $exploded[] = substr( $subject, $lastPos );
+   // This method could be rewritten in the future to avoid 
creating an
+   // intermediate array, since the return type is just an 
iterator.
+   return new ArrayIterator( $exploded );
+   }
+
+   /**
 * Perform an operation equivalent to `preg_replace()`
 *
 * Matches this code:
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 7418547..8f9830c 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -5150,7 +5150,10 @@
#  * bottom
#  * text-bottom
 
-   $parts = StringUtils::explode( "|", $options );
+   # Protect LanguageConverter markup when splitting into parts
+   $parts = StringUtils::delimiterExplode(
+   '-{', '}-', '|', $options, true /* allow nesting */
+   );
 
# Give extensions a chance to select the file revision for us
$options = [];
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 505bc2d..edcc2c4 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -20617,16 +20617,30 @@
 
 !! end
 
-# FIXME: This test is currently broken in the PHP parser (bug 52661)
 !! test
-Don't break image parsing if language converter markup is in the caption.
+T146305: Don't break image parsing 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: install: add http & proxy roles on install1001

2016-12-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325739 )

Change subject: install: add http & proxy roles on install1001
..


install: add http & proxy roles on install1001

These 2 roles are the remaining difference between
carbon and install1001/2001. This should make them
identical. (If everything is puppetized that was on carbon,
we will see).

These roles have been created by splitting up the existing
role::installserver and making sure it always stayed no-op.

Bug: T132757
Change-Id: I757cc26a880fb7a82c6eb1d1ca12003fd67a34dc
---
M manifests/site.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index d1b001a..a77b813 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1310,6 +1310,8 @@
 node 'install1001.wikimedia.org' {
 role(installserver::tftp,
 installserver::dhcp,
+installserver::http,
+installserver::proxy,
 installserver::preseed,
 aptrepo::wikimedia)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I757cc26a880fb7a82c6eb1d1ca12003fd67a34dc
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
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...AntiBot[master]: Replaced deprecated hooks

2016-12-20 Thread Georggi199 (Code Review)
Georggi199 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328428 )

Change subject: Replaced deprecated hooks
..

Replaced deprecated hooks

Bug: T151973
Change-Id: I30dbcedf54bf4cfb4602ed129353e93304f935f7
---
M available/GenericFormEncoding.php
M available/XRumerCommentBug.php
M available/XRumerCookieBug.php
3 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AntiBot 
refs/changes/28/328428/1

diff --git a/available/GenericFormEncoding.php 
b/available/GenericFormEncoding.php
index 862cda6..b5db5b4 100644
--- a/available/GenericFormEncoding.php
+++ b/available/GenericFormEncoding.php
@@ -8,19 +8,19 @@
  * attribute.
  */
 
-$wgHooks['EditFilterMerged'][] = 
'AntiBot_GenericFormEncoding::onEditFilterMerged';
+$wgHooks['EditFilterMergedContent'][] = 
'AntiBot_GenericFormEncoding::onEditFilterMergedContent';
 
 class AntiBot_GenericFormEncoding {
/**
-* @param $editPage EditPage
-* @param $text string
-* @param $hookError
+* @param $context IContextSource
+* @param $content Content
+* @param $status Status
 * @return bool
 */
-   public static function onEditFilterMerged( $editPage, $text, 
&$hookError ) {
+   public static function onEditFilterMergedContent( $context, $content, 
$status ) {
global $wgUser;
 
-   $header = 
$editPage->getArticle()->getContext()->getRequest()->getHeader( 'Content-Type' 
);
+   $header = $context->getRequest()->getHeader( 'Content-Type' );
 
if ( $header === 'application/x-www-form-urlencoded' && 
!$wgUser->isAllowed( 'bot' )
&& AntiBot::trigger( __CLASS__ ) == 'fail' ) {
diff --git a/available/XRumerCommentBug.php b/available/XRumerCommentBug.php
index adb667e..d08855d 100644
--- a/available/XRumerCommentBug.php
+++ b/available/XRumerCommentBug.php
@@ -5,7 +5,7 @@
  */
 
 $wgHooks['EditPage::showEditForm:fields'][] = 
'AntiBot_XRumerCommentBug::onEditFormFields';
-$wgHooks['EditFilterMerged'][] = 
'AntiBot_XRumerCommentBug::onEditFilterMerged';
+$wgHooks['EditFilterMergedContent'][] = 
'AntiBot_XRumerCommentBug::onEditFilterMergedContent';
 
 class AntiBot_XRumerCommentBug {
function onEditFormFields( &$editPage, &$wgOut ) {
@@ -14,7 +14,7 @@
return true;
}
 
-   function onEditFilterMerged( $editPage, $text, &$hookError ) {
+   function onEditFilterMergedContent( $context, $content, $status ) {
global $wgRequest;
if ( $wgRequest->getVal( AntiBot::getSecret( 'CommentBug' ) ) 
!== null ){
if ( AntiBot::trigger(__CLASS__) == 'fail' ) {
diff --git a/available/XRumerCookieBug.php b/available/XRumerCookieBug.php
index 3adeea2..a048d7a 100644
--- a/available/XRumerCookieBug.php
+++ b/available/XRumerCookieBug.php
@@ -7,7 +7,7 @@
  */
 
 $wgHooks['EditPage::showEditForm:initial'][] = 
'AntiBot_XRumerCookieBug::onEditForm';
-$wgHooks['EditFilterMerged'][] = 'AntiBot_XRumerCookieBug::onEditFilterMerged';
+$wgHooks['EditFilterMergedContent'][] = 
'AntiBot_XRumerCookieBug::onEditFilterMergedContent';
 
 class AntiBot_XRumerCookieBug {
function onEditForm( &$editPage ) {
@@ -18,7 +18,7 @@
return true;
}
 
-   function onEditFilterMerged( $editPage, $text, &$hookError ) {
+   function onEditFilterMergedContent( $context, $content, $status ) {
if ( isset( $_COOKIE[AntiBot::getSecret( 'CookieBug2' ) ] ) ) {
if ( AntiBot::trigger(__CLASS__) == 'fail' ) {
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30dbcedf54bf4cfb4602ed129353e93304f935f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AntiBot
Gerrit-Branch: master
Gerrit-Owner: Georggi199 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Add Czech aliases

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328084 )

Change subject: Add Czech aliases
..


Add Czech aliases

Change-Id: I2ac5105a2ac16e632eb2bf8eea32d218f66d7a4d
---
M MobileFrontend.alias.php
1 file changed, 13 insertions(+), 0 deletions(-)

Approvals:
  Matěj Suchánek: Looks good to me, but someone else must approve
  Bmansurov: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/MobileFrontend.alias.php b/MobileFrontend.alias.php
index 739a3a5..36f2ad1 100644
--- a/MobileFrontend.alias.php
+++ b/MobileFrontend.alias.php
@@ -113,6 +113,19 @@
'Nearby' => array( 'Гергахьо' ),
 );
 
+/** Czech (čeština) */
+$specialPageAliases['cs'] = array(
+   'History' => array( 'Historie' ),
+   'MobileCite' => array( 'Mobilní_citace' ),
+   'MobileOptions' => array( 'Mobilní_nastavení' ),
+   'Uploads' => array( 'Vaše_soubory' ),
+   'MobileDiff' => array( 'Mobilní_rozdíl' ),
+   'MobileEditor' => array( 'Mobilní_editor' ),
+   'MobileMenu' => array( 'Mobilní_menu' ),
+   'MobileLanguages' => array( 'Mobilní_jazyky' ),
+   'Nearby' => array( 'Poblíž' ),
+);
+
 /** German (Deutsch) */
 $specialPageAliases['de'] = array(
'History' => array( 'Versionsgeschichte' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ac5105a2ac16e632eb2bf8eea32d218f66d7a4d
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Matěj Suchánek 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: dhcp: set installserver for mw1168 to install1001

2016-12-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328427 )

Change subject: dhcp: set installserver for mw1168 to install1001
..

dhcp: set installserver for mw1168 to install1001

mw1168 should be reinstalled with a different partman
recipe per mail from Luca.

And i wanted to test if using install1001 works.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/27/328427/1

diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 41d6e94..27c6bb7 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -3981,6 +3981,7 @@
 host mw1168 {
 hardware ethernet 90:B1:1C:27:88:5B;
 fixed-address mw1168.eqiad.wmnet;
+next-server 208.80.154.83; # install1001 (tftp server)
 option pxelinux.pathprefix "trusty-installer/";
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[mpga]: Hygiene: Improve code quality

2016-12-20 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328426 )

Change subject: Hygiene: Improve code quality
..

Hygiene: Improve code quality

Changes:
 - added missing unit tests
 - introduced PopupsContextTestWrapper, removed all unit-tests logic
   from Hooks/Context classes
 - removed getModule() from Popups.hooks.php, it's hooks responsibility
   to keep single context instance
 - removed class_exists calls, use ExtensionRegistry instead
 - pass ExtensionRegistry as a dependency so it's easy to mock

Change-Id: Id014efe72edf24628539c76968e53eb3e06709f4
---
M Popups.hooks.php
M includes/PopupsContext.php
M tests/phpunit/PopupsContextTest.php
A tests/phpunit/PopupsContextTestWrapper.php
M tests/phpunit/PopupsHooksTest.php
5 files changed, 368 insertions(+), 105 deletions(-)


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

diff --git a/Popups.hooks.php b/Popups.hooks.php
index 042ab04..e9d1b29 100644
--- a/Popups.hooks.php
+++ b/Popups.hooks.php
@@ -23,11 +23,9 @@
 class PopupsHooks {
const PREVIEWS_PREFERENCES_SECTION = 'rendering/reading';
 
-   private static $context;
-
static function onGetBetaPreferences( User $user, array &$prefs ) {
global $wgExtensionAssetsPath;
-   if ( self::getModuleContext()->getConfig()->get( 
'PopupsBetaFeature' ) !== true ) {
+   if ( PopupsContext::getInstance()->isBetaModeOn() !== true ) {
return;
}
$prefs[PopupsContext::PREVIEWS_BETA_PREFERENCE_NAME] = [
@@ -52,7 +50,7 @@
 * @param array $prefs
 */
static function onGetPreferences( User $user, array &$prefs ) {
-   $module = self::getModuleContext();
+   $module = PopupsContext::getInstance();
 
if ( !$module->showPreviewsOptInOnPreferencesPage() ) {
return;
@@ -70,28 +68,13 @@
];
}
 
-   /**
-* @return PopupsContext
-*/
-   private static function getModuleContext() {
-
-   if ( !self::$context ) {
-   self::$context = new \Popups\PopupsContext();
-   }
-   return self::$context;
-   }
-
-   private static function areDependenciesMet() {
-   $registry = ExtensionRegistry::getInstance();
-   return $registry->isLoaded( 'TextExtracts' ) && class_exists( 
'ApiQueryPageImages' );
-   }
-
public static function onBeforePageDisplay( OutputPage &$out, Skin 
&$skin ) {
-   $module = self::getModuleContext();
+   $module = PopupsContext::getInstance();
 
-   if ( !self::areDependenciesMet() ) {
+   if ( !$module->areDependenciesMet() ) {
$logger = $module->getLogger();
-   $logger->error( 'Popups requires the PageImages and 
TextExtracts extensions.' );
+   $logger->error( 'Popups requires the PageImages and 
TextExtracts extensions. '
+   . 'If Beta mode is on it requires also 
BetaFeatures extension' );
return true;
}
 
@@ -104,7 +87,6 @@
/**
 * @param array &$testModules
 * @param ResourceLoader $resourceLoader
-* @return bool
 */
public static function onResourceLoaderTestModules( array &$testModules,
ResourceLoader &$resourceLoader ) {
@@ -143,8 +125,7 @@
 * @param array $vars
 */
public static function onResourceLoaderGetConfigVars( array &$vars ) {
-   $module = self::getModuleContext();
-   $conf = $module->getConfig();
+   $conf = PopupsContext::getInstance()->getConfig();
$vars['wgPopupsSchemaPopupsSamplingRate'] = $conf->get( 
'SchemaPopupsSamplingRate' );
}
 
@@ -165,31 +146,4 @@
$config->get( 'PopupsOptInDefaultState' );
}
 
-   /**
-* Inject Mocked context
-* As there is no service registration this is used for tests only.
-*
-* @param PopupsContext $context
-* @throws MWException
-*/
-   public static function injectContext( PopupsContext $context ) {
-   if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
-   throw new MWException( 'injectContext() must not be 
used outside unit tests.' );
-   }
-   self::$context = $context;
-   }
-
-   /**
-* Remove cached context.
-* As there is no service registration this is used for tests only.
-*
-*
-* @throws MWException
-*/
-   public static function resetContext() {
-   if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
-   throw new MWException( 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Escape cite ids with Sanitizer.escapeId

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327879 )

Change subject: Escape cite ids with Sanitizer.escapeId
..


Escape cite ids with Sanitizer.escapeId

* Without this, refs like  won't generate the same
  links that the PHP parser generates.

* Updated an existing test to add the :0 key that require escapeId
  to be encoded properly.

Change-Id: I69e5f16ccf64bd1c9cf05bdea7a379e679d36b1a
---
M lib/ext/Cite/index.js
M tests/parserTests.txt
2 files changed, 8 insertions(+), 11 deletions(-)

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



diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js
index eabfc17..1379725 100644
--- a/lib/ext/Cite/index.js
+++ b/lib/ext/Cite/index.js
@@ -4,13 +4,12 @@
  * -- */
 'use strict';
 
-var entities = module.parent.require('entities');
-
 var ParsoidExtApi = 
module.parent.require('./extapi.js').versionCheck('^0.6.1');
 var Util = ParsoidExtApi.Util;
 var DU = ParsoidExtApi.DOMUtils;
 var Promise = ParsoidExtApi.Promise;
 var defines = ParsoidExtApi.defines;
+var Sanitizer = module.parent.require('../wt2html/tt/Sanitizer.js').Sanitizer;
 
 // define some constructor shortcuts
 var KV = defines.KV;
@@ -172,10 +171,8 @@
// Looks like Cite.php doesn't try to fix ids that already have
// a "_" in them. Ex: name="a b" and name="a_b" are considered
// identical. Not sure if this is a feature or a bug.
-   // It also considers entities equal to their encoding (i.e. '&' === 
'')
-   // and then substitutes % with .
-   var v = entities.decodeHTML(val).replace(/\s/g, '_');
-   return encodeURIComponent(v).replace(/%/g, ".");
+   // It also considers entities equal to their encoding (i.e. '&' === 
'').
+   return Sanitizer.escapeId(val, { noninitial: true });
 }
 
 RefGroup.prototype.renderLine = function(env, refsList, ref) {
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 4ae2c0e..7703d28 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -22672,15 +22672,15 @@
 Ref: 17. Generate valid HTML5 id/about attributes
 !!wikitext
 foo
+ve-created name
 
 
 !!html/parsoid
-[1]
-
+[1]
+[2]
 
-
-↑  foo
-
+↑  foo↑  ve-created 
name
+
 !!end
 
 !!test

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69e5f16ccf64bd1c9cf05bdea7a379e679d36b1a
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T102134: Fix cite hrefs to render properly

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327863 )

Change subject: T102134: Fix cite hrefs to render properly
..


T102134: Fix cite hrefs to render properly

* With Parsoid's base href pointing to the wiki, plain #-fragment
  links won't resolve properly. Add the page title to the href
  for the links to start resolving properly again.

* Updated parser tests accordingly.

Change-Id: I280c41a0382bd2acd82cc586212695aa3b920171
---
M lib/config/MWParserEnvironment.js
M lib/ext/Cite/index.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
4 files changed, 125 insertions(+), 122 deletions(-)

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



diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index 55a6430..614a26c 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -370,6 +370,7 @@
var title = this.makeTitleFromURLDecodedStr(pageName);
this.page.ns = title.getNamespace()._id;
this.page.title = title;
+   this.page.titleURI = this.makeLink(title);
this.page.name = pageName;
// Always prefix a ./ so that we don't have to escape colons. Those
// would otherwise fool browsers into treating namespaces (like File:)
diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js
index 3ec8abb..eabfc17 100644
--- a/lib/ext/Cite/index.js
+++ b/lib/ext/Cite/index.js
@@ -178,7 +178,7 @@
return encodeURIComponent(v).replace(/%/g, ".");
 }
 
-RefGroup.prototype.renderLine = function(refsList, ref) {
+RefGroup.prototype.renderLine = function(env, refsList, ref) {
var ownerDoc = refsList.ownerDocument;
 
// Generate the li and set ref content first, so the HTML gets parsed.
@@ -201,7 +201,7 @@
var a = ownerDoc.createElement('a');
var span = ownerDoc.createElement('span');
var textNode = ownerDoc.createTextNode(text + " ");
-   a.setAttribute('href', href);
+   a.setAttribute('href', env.page.titleURI + '#' + href);
span.setAttribute('class', 'mw-linkback-text');
if (group) {
a.setAttribute('data-mw-group', group);
@@ -211,7 +211,7 @@
return a;
};
if (ref.linkbacks.length === 1) {
-   var linkback = createLinkback('#' + ref.id, ref.group, '↑');
+   var linkback = createLinkback(ref.id, ref.group, '↑');
linkback.setAttribute('rel', 'mw:referencedBy');
li.insertBefore(linkback, reftextSpan);
} else {
@@ -221,7 +221,7 @@
li.insertBefore(span, reftextSpan);
 
ref.linkbacks.forEach(function(lb, i) {
-   span.appendChild(createLinkback('#' + lb, ref.group, i 
+ 1));
+   span.appendChild(createLinkback(lb, ref.group, i + 1));
});
}
 
@@ -232,8 +232,9 @@
refsList.appendChild(li);
 };
 
-function ReferencesData() {
+function ReferencesData(env) {
this.index = 0;
+   this.env = env;
this.refGroups = new Map();
 }
 
@@ -448,7 +449,7 @@
// refLink is the link to the citation
var refLink = doc.createElement('a');
DU.addAttributes(refLink, {
-   'href': '#' + ref.target,
+   'href': refsData.env.page.titleURI + '#' + ref.target,
'style': 'counter-reset: mw-Ref ' + ref.groupIndex + ';',
});
if (ref.group) {
@@ -512,7 +513,7 @@
 
var refGroup = refsData.getRefGroup(group);
if (refGroup) {
-   refGroup.refs.forEach(refGroup.renderLine.bind(refGroup, 
refsNode));
+   refGroup.refs.forEach(refGroup.renderLine.bind(refGroup, 
refsData.env, refsNode));
}
 
// Remove the group from refsData
@@ -522,7 +523,8 @@
 // Process s left behind after the DOM is fully processed.
 // We process them as if there was an implicit  tag at
 // the end of the DOM.
-References.prototype.insertMissingReferencesIntoDOM = function(env, refsData, 
node) {
+References.prototype.insertMissingReferencesIntoDOM = function(refsData, node) 
{
+   var env = refsData.env;
var doc = node.ownerDocument;
var self = this;
 
@@ -707,9 +709,9 @@
 // DOM Post Processor
 Cite.prototype.domPostProcessor = function(node, env, options, atTopLevel) {
if (atTopLevel) {
-   var refsData = new ReferencesData();
+   var refsData = new ReferencesData(env);
_processRefs(this, refsData, node);
-   this.references.insertMissingReferencesIntoDOM(env, refsData, 
node);
+   this.references.insertMissingReferencesIntoDOM(refsData, node);
}
 };
 
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Recover from an allowed warning in the first chunk of an upload

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/323396 )

Change subject: Recover from an allowed warning in the first chunk of an upload
..


Recover from an allowed warning in the first chunk of an upload

Bug: T151562
Change-Id: If9e946138f50100dfb752f113b87344eea366116
---
M pywikibot/site.py
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/pywikibot/site.py b/pywikibot/site.py
index f4267ca..9084daa 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -6091,10 +6091,24 @@
 _file_key = data['filekey']
 if 'warnings' in data and not ignore_all_warnings:
 if callable(ignore_warnings):
+restart = False
 if 'offset' not in data:
+# This is a result of a warning in the
+# first chunk. The chunk is not actually
+# stashed so upload must be restarted if
+# the warning is allowed.
+# T112416 and T112405#1637544
+restart = True
 data['offset'] = True
 if ignore_warnings(create_warnings_list(data)):
 # Future warnings of this run can be 
ignored
+if restart:
+return self.upload(
+filepage, source_filename,
+source_url, comment, text, watch,
+True, chunk_size, None, 0,
+report_success=False)
+
 ignore_warnings = True
 ignore_all_warnings = True
 offset = data['offset']

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9e946138f50100dfb752f113b87344eea366116
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Lokal Profil 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: XZise 
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] operations/mediawiki-config[master]: scap branch plugin

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328399 )

Change subject: scap branch plugin
..


scap branch plugin

This will soon replace `make-wmf-branch`

Bug: T140918
Change-Id: I30092565bf553d81198846a1fc2bfb66ee5681d5
---
A multiversion/submodules.json
A scap/plugins/branch.py
M scap/plugins/gerrit.py
A scap/plugins/iter.py
4 files changed, 871 insertions(+), 4 deletions(-)

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



diff --git a/multiversion/submodules.json b/multiversion/submodules.json
new file mode 100644
index 000..81159bf
--- /dev/null
+++ b/multiversion/submodules.json
@@ -0,0 +1,653 @@
+{
+"extensions/AbuseFilter": {
+"action": "branch",
+"ref": "."
+},
+"extensions/AccountAudit": {
+"action": "branch",
+"ref": "."
+},
+"extensions/ActiveAbstract": {
+"action": "branch",
+"ref": "."
+},
+"extensions/AntiSpoof": {
+"action": "branch",
+"ref": "."
+},
+"extensions/ApiFeatureUsage": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Babel": {
+"action": "branch",
+"ref": "."
+},
+"extensions/BetaFeatures": {
+"action": "branch",
+"ref": "."
+},
+"extensions/BounceHandler": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Calendar": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Campaigns": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Capiunto": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Cards": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CategoryTree": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CentralAuth": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CharInsert": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CheckUser": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CirrusSearch": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Cite": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CiteThisPage": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Citoid": {
+"action": "branch",
+"ref": "."
+},
+"extensions/cldr": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CleanChanges": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CodeEditor": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CodeReview": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Collection": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CommonsMetadata": {
+"action": "branch",
+"ref": "."
+},
+"extensions/ConfirmEdit": {
+"action": "branch",
+"ref": "."
+},
+"extensions/ContactPage": {
+"action": "branch",
+"ref": "."
+},
+"extensions/ContentTranslation": {
+"action": "branch",
+"ref": "."
+},
+"extensions/ContributionTracking": {
+"action": "branch",
+"ref": "."
+},
+"extensions/CreditsSource": {
+"action": "branch",
+"ref": "."
+},
+"extensions/DisableAccount": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Disambiguator": {
+"action": "branch",
+"ref": "."
+},
+"extensions/DismissableSiteNotice": {
+"action": "branch",
+"ref": "."
+},
+"extensions/DonationInterface": {
+"action": "branch",
+"ref": "."
+},
+"extensions/DoubleWiki": {
+"action": "branch",
+"ref": "."
+},
+"extensions/DynamicSidebar": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Echo": {
+"action": "branch",
+"ref": "."
+},
+"extensions/EducationProgram": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Elastica": {
+"action": "branch",
+"ref": "."
+},
+"extensions/EventBus": {
+"action": "branch",
+"ref": "."
+},
+"extensions/EventLogging": {
+"action": "branch",
+"ref": "."
+},
+"extensions/ExtensionDistributor": {
+"action": "branch",
+"ref": "."
+},
+"extensions/FeaturedFeeds": {
+"action": "branch",
+"ref": "."
+},
+"extensions/FlaggedRevs": {
+"action": "branch",
+"ref": "."
+},
+"extensions/Flow": {
+"action": "branch",
+"ref": "."
+},
+"extensions/FundraiserLandingPage": {
+"action": "branch",
+"ref": "."

[MediaWiki-commits] [Gerrit] operations/puppet[production]: prometheus: add aggregation rules for MySQL

2016-12-20 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328425 )

Change subject: prometheus: add aggregation rules for MySQL
..

prometheus: add aggregation rules for MySQL

The rules can be used to speed up dashboards by pre-calculating
aggregated metrics. Also collect the metrics into the 'global' instance
for a overall view.

Change-Id: Id08df46c58f93e71f70ed3a2534658b64dbb047e
---
M modules/role/files/prometheus/rules_ops.conf
M modules/role/manifests/prometheus/global.pp
2 files changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/328425/1

diff --git a/modules/role/files/prometheus/rules_ops.conf 
b/modules/role/files/prometheus/rules_ops.conf
index 33bbd89..85b58b6 100644
--- a/modules/role/files/prometheus/rules_ops.conf
+++ b/modules/role/files/prometheus/rules_ops.conf
@@ -39,3 +39,11 @@
 backend:varnish_backend_pipe_in:sum = sum(varnish_backend_pipe_in) without 
(server)
 backend:varnish_backend_pipe_out:sum = sum(varnish_backend_pipe_out) without 
(server)
 backend:varnish_backend_req:sum = sum(varnish_backend_req) without (server)
+
+# MySQL aggregated stats
+job_role_shard:mysql_global_status_queries:rate5m = sum by (job, role, shard) 
(rate(mysql_global_status_queries[5m]))
+job_role_shard:mysql_global_status_handlers_write_total:rate5m = sum by (job, 
role, shard) 
rate(mysql_global_status_handlers_total{handler=~"(write|update|delete).*"}[5m])
+job_role_shard:mysql_global_status_handlers_read_total:rate5m = sum by (job, 
role, shard) rate(mysql_global_status_handlers_total{handler=~"read.*"}[5m])
+job_role_shard:mysql_global_status_bytes_received:rate5m = sum by (job, role, 
shard) rate(mysql_global_status_bytes_received[5m])
+job_role_shard:mysql_global_status_bytes_sent:rate5m = sum by (job, role, 
shard) rate(mysql_global_status_bytes_sent[5m])
+job_shard:mysql_slave_status_seconds_behind_master:max = 
max(mysql_slave_status_seconds_behind_master) by (job, shard)
diff --git a/modules/role/manifests/prometheus/global.pp 
b/modules/role/manifests/prometheus/global.pp
index 72d0fbb..49c73ea 100644
--- a/modules/role/manifests/prometheus/global.pp
+++ b/modules/role/manifests/prometheus/global.pp
@@ -27,6 +27,8 @@
 '{__name__="mysqld_exporter_build_info"}',
 '{__name__="memcached_version"}',
 '{__name__="hhvm_build_info"}',
+# MySQL metrics
+'{__name__=~"^.*:mysql_.*"}',
   ],
 },
 'static_configs' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Genealogy[master]: Add warnings for invalid parent or partner page titles

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328358 )

Change subject: Add warnings for invalid parent or partner page titles
..


Add warnings for invalid parent or partner page titles

This may still be less than intuitive for some types of input
to the parent or partner parser functions, but at least it gives
a clue and doesn't just fail miserably.

Change-Id: I2cfee41c1500ec40e3598f36377aaa1861cb247c
---
M src/Hooks.php
1 file changed, 13 insertions(+), 4 deletions(-)

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



diff --git a/src/Hooks.php b/src/Hooks.php
index 211cd72..e22b84f 100644
--- a/src/Hooks.php
+++ b/src/Hooks.php
@@ -83,16 +83,25 @@
break;
case 'parent':
$parentTitle = Title::newFromText( $params[0] );
-   $parent = new Person( $parentTitle );
-   $out .= $parent->getWikiLink();
-   self::saveProp( $parser, 'parent', $params[0] );
+   if ( !$parentTitle instanceof Title ) {
+   $out .= "Invalid 
parent page title: '{$params[0]}'";
+   } else {
+   $parent = new Person( $parentTitle );
+   $out .= $parent->getWikiLink();
+   self::saveProp( $parser, 'parent', 
$params[0] );
+   }
break;
case 'siblings':
$person = new Person( $parser->getTitle() );
$out .= self::peopleList( $parser, 
$person->getSiblings() );
break;
case 'partner':
-   self::saveProp( $parser, 'partner', $params[0] 
);
+   $partnerTitle = Title::newFromText( $params[0] 
);
+   if ( !$partnerTitle instanceof Title ) {
+   $out .= "Invalid 
partner page title: '{$params[0]}'";
+   } else {
+   self::saveProp( $parser, 'partner', 
$params[0] );
+   }
break;
case 'partners':
$person = new Person( $parser->getTitle() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2cfee41c1500ec40e3598f36377aaa1861cb247c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Genealogy
Gerrit-Branch: master
Gerrit-Owner: Samwilson 
Gerrit-Reviewer: Samwilson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Enable ICU folding for hebrew

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328170 )

Change subject: Enable ICU folding for hebrew
..


Enable ICU folding for hebrew

Bug: T3836
Change-Id: Ic18e9caf295bd74a9fdb9fd8101c24794590ec26
---
M includes/Maintenance/AnalysisConfigBuilder.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index aade8d1..8f666fd 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -916,6 +916,7 @@
'en-gb' => true,
'simple' => true,
'fr' => true,
+   'he' => true,
];
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic18e9caf295bd74a9fdb9fd8101c24794590ec26
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Eranroz 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Tjones 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add 2 sets of quotes around success and failure messages

2016-12-20 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328424 )

Change subject: Add 2 sets of quotes around success and failure messages
..

Add 2 sets of quotes around success and failure messages

If we doint do this, the gerrit command will fail.

+ doing this fixed it for me when running the command manually.

+ The gerrit docs say you have to here
https://gerrit-review.googlesource.com/Documentation/cmd-review.html#_examples

+ spoke with zaro on #gerrit who aggreed we need 2 sets of quotes :)

Bug: T153737
Change-Id: I07df89a39851d2ca4f730c491a4efc61f7166ef5
---
M zuul/layout.yaml
1 file changed, 14 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/24/328424/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1bde0ec..ce6a587 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -229,13 +229,13 @@
 | zhorishna@gmail\.com
   )).*$
 
-success-message: 'Basic test build succeeded.'
+success-message: '"Basic test build succeeded."'
 success:
   # Only V+1 as these are not elaborate tests. This prevents a change from
   # being merged (requires V+2) before elaborate tests, which vote V+2, 
have run.
   gerrit:
 verified: 1
-failure-message: 'Basic test build failed.'
+failure-message: '"Basic test build failed."'
 failure:
   gerrit:
 verified: -1
@@ -254,11 +254,11 @@
 - event: comment-added
   branch: (?!^refs/meta/config)
   comment: (?im)^Patch Set \d+:( 
-?Code\-Review(\+|-)?(1|2)?)?\n\n\s*recheck\.?\s*$
-success-message: 'Basic test build succeeded.'
+success-message: '"Basic test build succeeded."'
 success:
   gerrit:
 verified: 2
-failure-message: 'Basic test build failed.'
+failure-message: '"Basic test build failed."'
 failure:
   gerrit:
 verified: -1
@@ -506,11 +506,11 @@
   approval:
 - code-review: +1
 
-success-message: 'Main test build succeeded.'
+success-message: '"Main test build succeeded."'
 success:
   gerrit:
 verified: 2
-failure-message: 'Main test build failed.'
+failure-message: '"Main test build failed."'
 failure:
   gerrit:
 verified: -1
@@ -527,10 +527,10 @@
 - event: comment-added
   comment: (?im)^Patch Set \d+:\n\n\s*check experimental\.?\s*$
   email: *email_whitelist
-success-message: 'Experimental build succeeded.'
+success-message: '"Experimental build succeeded."'
 success:
   gerrit: {}
-failure-message: 'Experimental build failed.'
+failure-message: '"Experimental build failed."'
 failure:
   gerrit: {}
 
@@ -546,10 +546,10 @@
 - event: comment-added
   comment: (?im)^Patch Set \d+:\n\n\s*check (php53?|zend)\.?\s*$
   email: *email_whitelist
-success-message: 'PHP5 build succeeded.'
+success-message: '"PHP5 build succeeded."'
 success:
   gerrit: {}
-failure-message: 'PHP5 build failed.'
+failure-message: '"PHP5 build failed."'
 failure:
   gerrit: {}
 
@@ -576,13 +576,13 @@
 start:
   gerrit:
 verified: 0
-success-message: 'Gate pipeline build succeeded.'
+success-message: '"Gate pipeline build succeeded."'
 success:
   gerrit:
 verified: 2
 # Let Zuul merge the change \O/
 submit: true
-failure-message: 'Gate pipeline build failed.'
+failure-message: '"Gate pipeline build failed."'
 failure:
   gerrit:
 verified: -1
@@ -595,13 +595,13 @@
   gerrit:
 - event: change-merged
   branch: (?!^refs/meta/config)
-success-message: 'Post-merge build succeeded.'
+success-message: '"Post-merge build succeeded."'
 # Zuul needs at least one option beside --message or it will not report
 # Since Gerrit 2.8, we can vote on closed changes.
 success:
   gerrit:
 verified: 0
-failure-message: 'Post-merge build failed.'
+failure-message: '"Post-merge build failed."'
 failure:
   gerrit:
 verified: 0

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

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

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


[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Archive

2016-12-20 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328423 )

Change subject: Archive
..


Archive

Change-Id: I79c7cd19a7e5474704396b38fb2236da66a4af3e
---
D Gruntfile.js
D LICENSE
A OBSOLETE
D README.md
D config.yaml
D config.yaml.sample
D connections.yaml
D fabfile.py
D kubernetes-deployment.yaml
D log_to_irc.py
D package.json
D src/colors.js
D src/kick.bash
D src/preprocess.js
D src/relay.js
D src/template.txt
16 files changed, 2 insertions(+), 923 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index bb08be4..000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/*jshint node:true */
-module.exports = function(grunt) {
-   grunt.loadNpmTasks('grunt-contrib-jshint');
-
-   grunt.initConfig({
-   jshint: {
-   options: {
-   jshintrc: true
-   },
-   files: ['Gruntfile.js', 'src/*.js']
-   },
-   });
-
-   grunt.registerTask('test', 'jshint');
-   grunt.registerTask('default', 'test');
-};
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index e93da93..000
--- a/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-   Version 2, December 2004
-
-Copyright (C) 2013 Yuvi Panda 
-
-Everyone is permitted to copy and distribute verbatim or modified
-copies of this license document, and changing it is allowed as long
-as the name is changed.
-
-   DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
diff --git a/OBSOLETE b/OBSOLETE
new file mode 100644
index 000..1f287d4
--- /dev/null
+++ b/OBSOLETE
@@ -0,0 +1,2 @@
+grrrit-wm was archived and subsumed by wikibugs. Please contribute to the
+labs/tools/wikibugs2 repository on Gerrit instead.
diff --git a/README.md b/README.md
deleted file mode 100644
index ed312e1..000
--- a/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# lolrrit-wm
-
-lolrrit-wm is a simple IRC bot that listens to events from [gerrit][1]
-and reports them on various IRC channels. Which repo changes report
-to which channels can be configured in `config.yaml`
-
-## Config Changes ##
-
-To add more repo -> channel mappings, please edit `config.yaml`. The
-repo names can be matched using regexps. The tool needs to be restarted
-on SGE for the changes to take effect. Executing `kick.bash` will kill
-the job and start it up again.
-
-## Logs ##
-
-There are somewhat comprehensive logs in the `~/logs` folder on toollabs.
-
-## Dependencies ##
-
-This is written with NodeJS, and has a few dependencies (which are all
-bundled in the repo):
-
-1. underscore.js
-2. node-irc
-3. redis
-4. swig
-5. js-yaml
-
-## LICENSE ##
-
-Licensed under WTFPL. See the LICENSE file for more details.
-
-## CREDITS ##
-
-- Yuvi Panda
-- AzaToth
-
-[1]: https://gerrit.wikimedia.org
-[2]: http://tools.wmflabs.org
diff --git a/config.yaml b/config.yaml
deleted file mode 100644
index 4849e92..000
--- a/config.yaml
+++ /dev/null
@@ -1,205 +0,0 @@
-nick: grrrit-wm
-server: irc.freenode.net
-userName: lolrrit
-realName: GRRRit the Terrible
-default-channel: "#wikimedia-dev"
-firehose-channel: "#mediawiki-feed"
-blacklist:
-L10n-bot
-Jenkins-mwext-sync
-channels:
-"#mediawiki-i18n":
-mediawiki/extensions/Babel:
-mediawiki/extensions/CLDR:
-mediawiki/extensions/ContentTranslation:
-mediawiki/extensions/Translate:
-mediawiki/extensions/TranslationNotifications:
-mediawiki/extensions/TwnMainPage:
-mediawiki/extensions/UniversalLanguageSelector:
-mediawiki/services/cxserver:
-mediawiki/services/cxserver/deploy:
-translatewiki.*:
-"#mediawiki-parsoid":
-mediawiki/services/parsoid:
-mediawiki/services/parsoid/deploy:
-mediawiki/services/parsoid/node_modules:
-mediawiki/extensions/Parsoid:
-"#mediawiki-visualeditor":
-mediawiki/extensions/Citoid:
-mediawiki/extensions/TemplateData:
-mediawiki/extensions/VisualEditor:
-mediawiki/extensions/WikiEditor:
-unicodejs:
-VisualEditor/.*:
-"#wikimedia-editing":
-mediawiki/extensions/Cite$:
-mediawiki/extensions/CiteThisPage:
-mediawiki/extensions/CodeEditor:
-mediawiki/extensions/Graph:
-mediawiki/extensions/Kartographer:
-mediawiki/extensions/Math:
-mediawiki/extensions/ParserFunctions:
-mediawiki/skins/apex:
-mediawiki/skins/Vector:
-oojs/.*:
-# Also in #wikimedia-services
-mediawiki/services/citoid:
-mediawiki/services/graphoid:
-mediawiki/services/mathoid:
-

[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Archive

2016-12-20 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328423 )

Change subject: Archive
..

Archive

Change-Id: I79c7cd19a7e5474704396b38fb2236da66a4af3e
---
D Gruntfile.js
D LICENSE
A OBSOLETE
D README.md
D config.yaml
D config.yaml.sample
D connections.yaml
D fabfile.py
D kubernetes-deployment.yaml
D log_to_irc.py
D package.json
D src/colors.js
D src/kick.bash
D src/preprocess.js
D src/relay.js
D src/template.txt
16 files changed, 2 insertions(+), 923 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit 
refs/changes/23/328423/1

diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index bb08be4..000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/*jshint node:true */
-module.exports = function(grunt) {
-   grunt.loadNpmTasks('grunt-contrib-jshint');
-
-   grunt.initConfig({
-   jshint: {
-   options: {
-   jshintrc: true
-   },
-   files: ['Gruntfile.js', 'src/*.js']
-   },
-   });
-
-   grunt.registerTask('test', 'jshint');
-   grunt.registerTask('default', 'test');
-};
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index e93da93..000
--- a/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-   Version 2, December 2004
-
-Copyright (C) 2013 Yuvi Panda 
-
-Everyone is permitted to copy and distribute verbatim or modified
-copies of this license document, and changing it is allowed as long
-as the name is changed.
-
-   DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
diff --git a/OBSOLETE b/OBSOLETE
new file mode 100644
index 000..1f287d4
--- /dev/null
+++ b/OBSOLETE
@@ -0,0 +1,2 @@
+grrrit-wm was archived and subsumed by wikibugs. Please contribute to the
+labs/tools/wikibugs2 repository on Gerrit instead.
diff --git a/README.md b/README.md
deleted file mode 100644
index ed312e1..000
--- a/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# lolrrit-wm
-
-lolrrit-wm is a simple IRC bot that listens to events from [gerrit][1]
-and reports them on various IRC channels. Which repo changes report
-to which channels can be configured in `config.yaml`
-
-## Config Changes ##
-
-To add more repo -> channel mappings, please edit `config.yaml`. The
-repo names can be matched using regexps. The tool needs to be restarted
-on SGE for the changes to take effect. Executing `kick.bash` will kill
-the job and start it up again.
-
-## Logs ##
-
-There are somewhat comprehensive logs in the `~/logs` folder on toollabs.
-
-## Dependencies ##
-
-This is written with NodeJS, and has a few dependencies (which are all
-bundled in the repo):
-
-1. underscore.js
-2. node-irc
-3. redis
-4. swig
-5. js-yaml
-
-## LICENSE ##
-
-Licensed under WTFPL. See the LICENSE file for more details.
-
-## CREDITS ##
-
-- Yuvi Panda
-- AzaToth
-
-[1]: https://gerrit.wikimedia.org
-[2]: http://tools.wmflabs.org
diff --git a/config.yaml b/config.yaml
deleted file mode 100644
index 4849e92..000
--- a/config.yaml
+++ /dev/null
@@ -1,205 +0,0 @@
-nick: grrrit-wm
-server: irc.freenode.net
-userName: lolrrit
-realName: GRRRit the Terrible
-default-channel: "#wikimedia-dev"
-firehose-channel: "#mediawiki-feed"
-blacklist:
-L10n-bot
-Jenkins-mwext-sync
-channels:
-"#mediawiki-i18n":
-mediawiki/extensions/Babel:
-mediawiki/extensions/CLDR:
-mediawiki/extensions/ContentTranslation:
-mediawiki/extensions/Translate:
-mediawiki/extensions/TranslationNotifications:
-mediawiki/extensions/TwnMainPage:
-mediawiki/extensions/UniversalLanguageSelector:
-mediawiki/services/cxserver:
-mediawiki/services/cxserver/deploy:
-translatewiki.*:
-"#mediawiki-parsoid":
-mediawiki/services/parsoid:
-mediawiki/services/parsoid/deploy:
-mediawiki/services/parsoid/node_modules:
-mediawiki/extensions/Parsoid:
-"#mediawiki-visualeditor":
-mediawiki/extensions/Citoid:
-mediawiki/extensions/TemplateData:
-mediawiki/extensions/VisualEditor:
-mediawiki/extensions/WikiEditor:
-unicodejs:
-VisualEditor/.*:
-"#wikimedia-editing":
-mediawiki/extensions/Cite$:
-mediawiki/extensions/CiteThisPage:
-mediawiki/extensions/CodeEditor:
-mediawiki/extensions/Graph:
-mediawiki/extensions/Kartographer:
-mediawiki/extensions/Math:
-mediawiki/extensions/ParserFunctions:
-mediawiki/skins/apex:
-mediawiki/skins/Vector:
-oojs/.*:
-# Also in #wikimedia-services
-mediawiki/services/citoid:
-mediawiki/services/graphoid:
-

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Percent-encode the entire thing

2016-12-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328422 )

Change subject: Percent-encode the entire thing
..


Percent-encode the entire thing

Change-Id: Ib914206c7c27292ac9b07dc88c45c947e1d2ab18
---
M lib/wt2html/DOMPostProcessor.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/wt2html/DOMPostProcessor.js b/lib/wt2html/DOMPostProcessor.js
index df94a4b..4fe4373 100644
--- a/lib/wt2html/DOMPostProcessor.js
+++ b/lib/wt2html/DOMPostProcessor.js
@@ -350,7 +350,7 @@
});
}
var styleURI = env.getModulesLoadURI() +
-   '?modules=' + Array.from(modules).join('%7C') + 
'=styles=vector';
+   '?modules=' + encodeURIComponent(Array.from(modules).join('|')) 
+ '=styles=vector';
appendToHead(document, 'link', { rel: 'stylesheet', href: styleURI });
 
// Stick data attributes in the head

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Percent-encode the entire thing

2016-12-20 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328422 )

Change subject: Percent-encode the entire thing
..

Percent-encode the entire thing

Change-Id: Ib914206c7c27292ac9b07dc88c45c947e1d2ab18
---
M lib/wt2html/DOMPostProcessor.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/wt2html/DOMPostProcessor.js b/lib/wt2html/DOMPostProcessor.js
index df94a4b..4fe4373 100644
--- a/lib/wt2html/DOMPostProcessor.js
+++ b/lib/wt2html/DOMPostProcessor.js
@@ -350,7 +350,7 @@
});
}
var styleURI = env.getModulesLoadURI() +
-   '?modules=' + Array.from(modules).join('%7C') + 
'=styles=vector';
+   '?modules=' + encodeURIComponent(Array.from(modules).join('|')) 
+ '=styles=vector';
appendToHead(document, 'link', { rel: 'stylesheet', href: styleURI });
 
// Stick data attributes in the head

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib914206c7c27292ac9b07dc88c45c947e1d2ab18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: otrs: use wikimedia_domains from role exim

2016-12-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328407 )

Change subject: otrs: use wikimedia_domains from role exim
..


otrs: use wikimedia_domains from role exim

Followup to Iabed0cace1

Change-Id: If541797dcb2e4829d6003632272c4bfe7b0efa74
---
M modules/role/manifests/otrs/webserver.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/role/manifests/otrs/webserver.pp 
b/modules/role/manifests/otrs/webserver.pp
index 73e847b..e2847e8 100644
--- a/modules/role/manifests/otrs/webserver.pp
+++ b/modules/role/manifests/otrs/webserver.pp
@@ -38,7 +38,7 @@
 owner   => 'root',
 group   => 'root',
 mode=> '0444',
-source  => 'puppet:///files/exim/wikimedia_domains',
+source  => 'puppet:///modules/role/exim/wikimedia_domains',
 require => Class['exim4'],
 }
 # lint:endignore

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update change-propagation to 9a87712

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328421 )

Change subject: Update change-propagation to 9a87712
..

Update change-propagation to 9a87712

List of changes:
2e1f0ae Move transclusion updates to the page_edit rule
xxx Update config

Change-Id: I46d203c027bfd42cecb8ba789de4b0cc846cc95c
---
M scap/templates/config.yaml.j2
M src
2 files changed, 12 insertions(+), 23 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/21/328421/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 1318f1a..853b0a6 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -178,14 +178,17 @@
   domain: /\.wikidata\.org$/
 page_namespace: 120
 exec:
-  method: get
-  uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/html/{message.page_title}/{{message.rev_id}}'
-  headers:
-cache-control: no-cache
-x-restbase-parentrevision: '{{message.rev_parent_id}}'
-if-unmodified-since: '{{date(message.meta.dt)}}'
-  query:
-redirect: false
+  - method: get
+uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/html/{message.page_title}/{{message.rev_id}}'
+headers:
+  cache-control: no-cache
+  x-restbase-parentrevision: '{{message.rev_parent_id}}'
+  if-unmodified-since: '{{date(message.meta.dt)}}'
+query:
+  redirect: false
+  - method: post
+uri: '/sys/links/transcludes/{message.page_title}'
+body: '{{globals.message}}'
 
   revision_visibility_change:
 topic: mediawiki.revision-visibility-change
@@ -289,20 +292,6 @@
   cache-control: no-cache
 query:
   redirect: false
-
-  transclusion_update:
-topic: mediawiki.revision-create
-match_not:
-  - meta:
-  domain: /\.wikidata\.org$/
-page_namespace: 0
-  - meta:
-  domain: /\.wikidata\.org$/
-page_namespace: 120
-exec:
-  method: post
-  uri: '/sys/links/transcludes/{message.page_title}'
-  body: '{{globals.message}}'
 
   on_transclusion_update:
 concurrency: <%= concurrency * 8 %>
diff --git a/src b/src
index ca54ef0..9a87712 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit ca54ef0bbf525ca091abdb3b591234e45cd9a75e
+Subproject commit 9a877128015c9258524dbea359d4c5509ebe57c6

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46d203c027bfd42cecb8ba789de4b0cc846cc95c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


  1   2   3   >