[MediaWiki-commits] [Gerrit] operations/puppet[production]: site.pp: Failover labsdb1011 to labsdb1010

2017-12-13 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398222 )

Change subject: site.pp: Failover labsdb1011 to labsdb1010
..

site.pp: Failover labsdb1011 to labsdb1010

labsdb1011 is delayed due to the ongoing ALTER table on s4 which already
finished on labsdb1010.
Let's failover to labsdb1010 until the alter is finished on labsdb1011

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/398222/1

diff --git a/manifests/site.pp b/manifests/site.pp
index d058f15..6618172 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -690,10 +690,10 @@
 node 'dbproxy1011.eqiad.wmnet' {
 class { '::role::mariadb::proxy::master':
 shard  => 'labsdb',
-primary_name   => 'labsdb1011',
-primary_addr   => '10.64.37.24',
-secondary_name => 'labsdb1010',
-secondary_addr => '10.64.37.23',
+primary_name   => 'labsdb1010',
+primary_addr   => '10.64.37.23',
+secondary_name => 'labsdb1011',
+secondary_addr => '10.64.37.24',
 }
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use findItemFromData instead getItemFromData

2017-12-13 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398221 )

Change subject: Use findItemFromData instead getItemFromData
..

Use findItemFromData instead getItemFromData

Change-Id: I3cea1dacc1452b05e7e7423e47dcb2ffdf70c1ce
Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f
Bug: T76630
---
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js
M resources/src/mediawiki.widgets/mw.widgets.CategoryMultiselectWidget.js
5 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/398221/1

diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
index 91a2d5f..6db55d4 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
@@ -474,7 +474,7 @@
this.controller.toggleFilterSelect( item.model.getName() );
 
// Select the tag if it exists, or reset selection otherwise
-   this.selectTag( this.getItemFromData( item.model.getName() ) );
+   this.selectTag( this.findItemFromData( item.model.getName() ) );
 
this.focus();
};
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js
index ad3b304..64a7fcf 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js
@@ -84,8 +84,8 @@
 * @param {string} color Selected color
 */
mw.rcfilters.ui.HighlightColorPickerWidget.prototype.selectColor = 
function ( color ) {
-   var previousItem = this.buttonSelect.getItemFromData( 
this.currentSelection ),
-   selectedItem = this.buttonSelect.getItemFromData( color 
);
+   var previousItem = this.buttonSelect.findItemFromData( 
this.currentSelection ),
+   selectedItem = this.buttonSelect.findItemFromData( 
color );
 
if ( this.currentSelection !== color ) {
this.currentSelection = color;
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js
index 71e3b55..060ead0 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js
@@ -309,7 +309,7 @@
if ( this.default !== isDefault ) {
this.default = isDefault;
this.setIcon( this.default ? 'pushPin' : '' );
-   this.menu.getItemFromData( 'default' ).setLabel(
+   this.menu.findItemFromData( 'default' ).setLabel(
this.default ?
mw.msg( 
'rcfilters-savedqueries-unsetdefault' ) :
mw.msg( 
'rcfilters-savedqueries-setdefault' )
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js
index 8287ef9..7077434 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js
@@ -131,7 +131,7 @@
 * @param {mw.rcfilters.ui.SavedLinksListItemWidget} item Menu item
 */
mw.rcfilters.ui.SavedLinksListWidget.prototype.onModelAddItem = 
function ( item ) {
-   if ( this.menu.getItemFromData( item.getID() ) ) {
+   if ( this.menu.findItemFromData( item.getID() ) ) {
return;
}
 
@@ -147,7 +147,7 @@
 * @param {mw.rcfilters.ui.SavedLinksListItemWidget} item Menu item
 */
mw.rcfilters.ui.SavedLinksListWidget.prototype.onModelRemoveItem = 
function ( item ) {
-   this.menu.removeItems( [ this.menu.getItemFromData( 
item.getID() ) ] );
+   this.menu.removeItems( [ this.menu.findItemFromData( 
item.getID() ) ] );
this.placeholderItem.toggle( this.model.isEmpty() );
};
 }( mediaWiki ) );
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Replace 'constructive' with 'progressive' flag

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

Change subject: Replace 'constructive' with 'progressive' flag
..


Replace 'constructive' with 'progressive' flag

'constructive' flag has been deprecated and will be removed entirely
in upcoming OOUI v0.25.0

Change-Id: I124f4080506d640c90ccd0a5d0c98fe1768b15c7
---
M modules/ui/mw.cx.ui.SourceColumn.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ui/mw.cx.ui.SourceColumn.js 
b/modules/ui/mw.cx.ui.SourceColumn.js
index b4acb22..cdaf846 100644
--- a/modules/ui/mw.cx.ui.SourceColumn.js
+++ b/modules/ui/mw.cx.ui.SourceColumn.js
@@ -67,7 +67,7 @@
target: '_blank',
classes: [ 'cx-column-sub-heading-view-page' ],
framed: false,
-   flags: [ 'constructive' ]
+   flags: [ 'progressive' ]
} );
 
subHeading = new OO.ui.HorizontalLayout( {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I124f4080506d640c90ccd0a5d0c98fe1768b15c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Petar.petkovic 
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...TwoColConflict[master]: Replace 'constructive' with 'progressive' flag

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

Change subject: Replace 'constructive' with 'progressive' flag
..

Replace 'constructive' with 'progressive' flag

Replacing 'constructive' flag, which has been deprecated and
will be removed entirely in upcoming OOUI v0.25.0

Change-Id: I500f1e02e286537315c433ab5883f0557460e6d7
---
M includes/SpecialConflictTestPage/TwoColConflictTestEditPage.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwoColConflict 
refs/changes/18/398218/1

diff --git a/includes/SpecialConflictTestPage/TwoColConflictTestEditPage.php 
b/includes/SpecialConflictTestPage/TwoColConflictTestEditPage.php
index 426cd4f..ed5aad3 100644
--- a/includes/SpecialConflictTestPage/TwoColConflictTestEditPage.php
+++ b/includes/SpecialConflictTestPage/TwoColConflictTestEditPage.php
@@ -52,7 +52,7 @@
'tabindex' => ++$tabindex,
'inputId' => 'wpPreview',
'useInputTag' => true,
-   'flags' => [ 'constructive', 'primary' ],
+   'flags' => [ 'progressive', 'primary' ],
'label' => $this->context->msg( 
'twoColConflict-test-preview-submit' )->text(),
'infusable' => true,
'type' => 'submit',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I500f1e02e286537315c433ab5883f0557460e6d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwoColConflict
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...ContentTranslation[master]: Use findItem(s)FromData instead getItem(s)FromData

2017-12-13 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398217 )

Change subject: Use findItem(s)FromData instead getItem(s)FromData
..

Use findItem(s)FromData instead getItem(s)FromData

Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f
Bug: T76630
Change-Id: I1fe6d194a87579dc457708d88dd01b30c5b8a1c3
---
M modules/tools/ext.cx.tools.template.editor.js
M modules/tools/mw.cx.tools.MachineTranslationTool.js
M modules/ui/mw.cx.ui.ToolsColumn.js
3 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/modules/tools/ext.cx.tools.template.editor.js 
b/modules/tools/ext.cx.tools.template.editor.js
index e2f5c05..ab0ca62 100644
--- a/modules/tools/ext.cx.tools.template.editor.js
+++ b/modules/tools/ext.cx.tools.template.editor.js
@@ -433,7 +433,7 @@
selectedOption = selector.getMenu().getSelectedItem();
selectedKeys.forEach( function ( key ) {
if ( !selectedOption || key !== 
selectedOption.getData() ) {
-   selector.getMenu().getItemFromData( key 
).setDisabled( true );
+   selector.getMenu().findItemFromData( 
key ).setDisabled( true );
}
} );
} );
diff --git a/modules/tools/mw.cx.tools.MachineTranslationTool.js 
b/modules/tools/mw.cx.tools.MachineTranslationTool.js
index 5ef2cf8..68c26b3 100644
--- a/modules/tools/mw.cx.tools.MachineTranslationTool.js
+++ b/modules/tools/mw.cx.tools.MachineTranslationTool.js
@@ -153,7 +153,7 @@
}
 
// Validate and fix the given provider if required
-   item = menu.getItemFromData( provider );
+   item = menu.findItemFromData( provider );
if ( provider === undefined || !item ) {
// Fallback to something that always exists
provider = 'source';
diff --git a/modules/ui/mw.cx.ui.ToolsColumn.js 
b/modules/ui/mw.cx.ui.ToolsColumn.js
index 9511043..6eddfd9 100644
--- a/modules/ui/mw.cx.ui.ToolsColumn.js
+++ b/modules/ui/mw.cx.ui.ToolsColumn.js
@@ -95,7 +95,7 @@
  * @param {mw.cx.tools.TranslationTool} tool The translation tool instance
  */
 mw.cx.ui.ToolsColumn.prototype.showTool = function ( tool ) {
-   if ( !this.toolContainer.getItemsFromData( tool.getData() ).length ) {
+   if ( !this.toolContainer.findItemsFromData( tool.getData() ).length ) {
this.toolContainer.addItems( [ tool.getCard() ] );
}
 };
@@ -105,7 +105,7 @@
  * @param {mw.cx.tools.TranslationTool} tool The translation tool instance
  */
 mw.cx.ui.ToolsColumn.prototype.hideTool = function ( tool ) {
-   var items = this.toolContainer.getItemsFromData( tool.getData() );
+   var items = this.toolContainer.findItemsFromData( tool.getData() );
this.toolContainer.removeItems( items );
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fe6d194a87579dc457708d88dd01b30c5b8a1c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1109 and db1101:3318

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

Change subject: db-eqiad.php: Depool db1109 and db1101:3318
..


db-eqiad.php: Depool db1109 and db1101:3318

Going to checksum data on db1101:3318 and db1109.
db1101 (s5 and s8) broke replication and db1109 didn't so, going to
checksum those two hosts to start with as looks like they were cloned
form different sources.

Bug: T161294
Change-Id: I65ecba7678c4ff917f392ed0b6c76bc91ee885fe
---
M wmf-config/db-eqiad.php
1 file changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 01105d0..88d1e4d 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -177,9 +177,9 @@
'db1087' => 500, # C2 3.6TB 512GB, # db1095 master
'db1092' => 300, # D2 3.6TB 512GB, api
'db1099:3318' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8
-   'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8
+   # 'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8 # 
T161294
'db1104' => 300,  # B3 3.6TB 512GB, api
-   'db1109' => 500,  # D8 3.6TB 512GB
+   # 'db1109' => 500,  # D8 3.6TB 512GB # T161294
],
 
'silver' => [
@@ -500,23 +500,23 @@
],
'watchlist' => [
'db1099:3318' => 1,
-   'db1101:3318' => 1,
+   # 'db1101:3318' => 1,
],
'recentchanges' => [
'db1099:3318' => 1,
-   'db1101:3318' => 1,
+   # 'db1101:3318' => 1,
],
'recentchangeslinked' => [
'db1099:3318' => 1,
-   'db1101:3318' => 1,
+   # 'db1101:3318' => 1,
],
'contributions' => [
'db1099:3318' => 1,
-   'db1101:3318' => 1,
+   # 'db1101:3318' => 1,
],
'logpager' => [
'db1099:3318' => 1,
-   'db1101:3318' => 1,
+   # 'db1101:3318' => 1,
],
],
 ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65ecba7678c4ff917f392ed0b6c76bc91ee885fe
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1109 and db1101:3318

2017-12-13 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398216 )

Change subject: db-eqiad.php: Depool db1109 and db1101:3318
..

db-eqiad.php: Depool db1109 and db1101:3318

Going to checksum data on db1101:3318 and db1109.
db1101 (s5 and s8) broke replication and db1109 didn't so, going to
checksum those two hosts to start with as looks like they were cloned
form different sources.

Bug: T161294
Change-Id: I65ecba7678c4ff917f392ed0b6c76bc91ee885fe
---
M wmf-config/db-eqiad.php
1 file changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 01105d0..88d1e4d 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -177,9 +177,9 @@
'db1087' => 500, # C2 3.6TB 512GB, # db1095 master
'db1092' => 300, # D2 3.6TB 512GB, api
'db1099:3318' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8
-   'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8
+   # 'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8 # 
T161294
'db1104' => 300,  # B3 3.6TB 512GB, api
-   'db1109' => 500,  # D8 3.6TB 512GB
+   # 'db1109' => 500,  # D8 3.6TB 512GB # T161294
],
 
'silver' => [
@@ -500,23 +500,23 @@
],
'watchlist' => [
'db1099:3318' => 1,
-   'db1101:3318' => 1,
+   # 'db1101:3318' => 1,
],
'recentchanges' => [
'db1099:3318' => 1,
-   'db1101:3318' => 1,
+   # 'db1101:3318' => 1,
],
'recentchangeslinked' => [
'db1099:3318' => 1,
-   'db1101:3318' => 1,
+   # 'db1101:3318' => 1,
],
'contributions' => [
'db1099:3318' => 1,
-   'db1101:3318' => 1,
+   # 'db1101:3318' => 1,
],
'logpager' => [
'db1099:3318' => 1,
-   'db1101:3318' => 1,
+   # 'db1101:3318' => 1,
],
],
 ],

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1101:3318 and db1109"

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

Change subject: Revert "db-eqiad.php: Depool db1101:3318 and db1109"
..


Revert "db-eqiad.php: Depool db1101:3318 and db1109"

This reverts commit 414cda5253a44aea1550a17b30084a1f19a49c79.

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

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 2c911a5..01105d0 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -177,9 +177,9 @@
'db1087' => 500, # C2 3.6TB 512GB, # db1095 master
'db1092' => 300, # D2 3.6TB 512GB, api
'db1099:3318' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8
-   # 'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8 # 
T161294
+   'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8
'db1104' => 300,  # B3 3.6TB 512GB, api
-   # 'db1109' => 500,  # D8 3.6TB 512GB # T161294
+   'db1109' => 500,  # D8 3.6TB 512GB
],
 
'silver' => [
@@ -468,23 +468,23 @@
],
'watchlist' => [
'db1098:3317' => 1,
-   # 'db1101:3317' => 1,
+   'db1101:3317' => 1,
],
'recentchanges' => [
'db1098:3317' => 1,
-   # 'db1101:3317' => 1,
+   'db1101:3317' => 1,
],
'recentchangeslinked' => [
'db1098:3317' => 1,
-   # 'db1101:3317' => 1,
+   'db1101:3317' => 1,
],
'contributions' => [
'db1098:3317' => 1,
-   # 'db1101:3317' => 1,
+   'db1101:3317' => 1,
],
'logpager' => [
'db1098:3317' => 1,
-   # 'db1101:3317' => 1,
+   'db1101:3317' => 1,
],
],
's8' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice13fdfb7c1cd962d93631cc63b25e88b1535f3c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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]: Revert "db-eqiad.php: Depool db1101:3318 and db1109"

2017-12-13 Thread Marostegui (Code Review)
Hello Urbanecm, jenkins-bot, Jcrespo, Zoranzoki21,

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

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

to review the following change.


Change subject: Revert "db-eqiad.php: Depool db1101:3318 and db1109"
..

Revert "db-eqiad.php: Depool db1101:3318 and db1109"

This reverts commit 414cda5253a44aea1550a17b30084a1f19a49c79.

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


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 2c911a5..01105d0 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -177,9 +177,9 @@
'db1087' => 500, # C2 3.6TB 512GB, # db1095 master
'db1092' => 300, # D2 3.6TB 512GB, api
'db1099:3318' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8
-   # 'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8 # 
T161294
+   'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8
'db1104' => 300,  # B3 3.6TB 512GB, api
-   # 'db1109' => 500,  # D8 3.6TB 512GB # T161294
+   'db1109' => 500,  # D8 3.6TB 512GB
],
 
'silver' => [
@@ -468,23 +468,23 @@
],
'watchlist' => [
'db1098:3317' => 1,
-   # 'db1101:3317' => 1,
+   'db1101:3317' => 1,
],
'recentchanges' => [
'db1098:3317' => 1,
-   # 'db1101:3317' => 1,
+   'db1101:3317' => 1,
],
'recentchangeslinked' => [
'db1098:3317' => 1,
-   # 'db1101:3317' => 1,
+   'db1101:3317' => 1,
],
'contributions' => [
'db1098:3317' => 1,
-   # 'db1101:3317' => 1,
+   'db1101:3317' => 1,
],
'logpager' => [
'db1098:3317' => 1,
-   # 'db1101:3317' => 1,
+   'db1101:3317' => 1,
],
],
's8' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice13fdfb7c1cd962d93631cc63b25e88b1535f3c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1101:3318 and db1109

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

Change subject: db-eqiad.php: Depool db1101:3318 and db1109
..


db-eqiad.php: Depool db1101:3318 and db1109

Going to checksum data on db1101:3318 and db1109.
db1101 (s5 and s8) broke replication and db1109 didn't so, going to
checksum those two hosts to start with as looks like they were cloned
form different sources.

Bug: T161294
Change-Id: I1f599e5cfee0480edea64f1a9f7f0bef82cc0b1b
---
M wmf-config/db-eqiad.php
1 file changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 01105d0..2c911a5 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -177,9 +177,9 @@
'db1087' => 500, # C2 3.6TB 512GB, # db1095 master
'db1092' => 300, # D2 3.6TB 512GB, api
'db1099:3318' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8
-   'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8
+   # 'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8 # 
T161294
'db1104' => 300,  # B3 3.6TB 512GB, api
-   'db1109' => 500,  # D8 3.6TB 512GB
+   # 'db1109' => 500,  # D8 3.6TB 512GB # T161294
],
 
'silver' => [
@@ -468,23 +468,23 @@
],
'watchlist' => [
'db1098:3317' => 1,
-   'db1101:3317' => 1,
+   # 'db1101:3317' => 1,
],
'recentchanges' => [
'db1098:3317' => 1,
-   'db1101:3317' => 1,
+   # 'db1101:3317' => 1,
],
'recentchangeslinked' => [
'db1098:3317' => 1,
-   'db1101:3317' => 1,
+   # 'db1101:3317' => 1,
],
'contributions' => [
'db1098:3317' => 1,
-   'db1101:3317' => 1,
+   # 'db1101:3317' => 1,
],
'logpager' => [
'db1098:3317' => 1,
-   'db1101:3317' => 1,
+   # 'db1101:3317' => 1,
],
],
's8' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f599e5cfee0480edea64f1a9f7f0bef82cc0b1b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1101:3318 and db1109

2017-12-13 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398214 )

Change subject: db-eqiad.php: Depool db1101:3318 and db1109
..

db-eqiad.php: Depool db1101:3318 and db1109

Going to checksum data on db1101:3318 and db1109.
db1101 (s5 and s8) broke replication and db1109 didn't so, going to
checksum those two hosts to start with as looks like they were cloned
form different sources.

Bug: T161294
Change-Id: I1f599e5cfee0480edea64f1a9f7f0bef82cc0b1b
---
M wmf-config/db-eqiad.php
1 file changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 01105d0..2c911a5 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -177,9 +177,9 @@
'db1087' => 500, # C2 3.6TB 512GB, # db1095 master
'db1092' => 300, # D2 3.6TB 512GB, api
'db1099:3318' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8
-   'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8
+   # 'db1101:3318' => 1,   # C2 3.6TB 512GB # rc, log: s7 and s8 # 
T161294
'db1104' => 300,  # B3 3.6TB 512GB, api
-   'db1109' => 500,  # D8 3.6TB 512GB
+   # 'db1109' => 500,  # D8 3.6TB 512GB # T161294
],
 
'silver' => [
@@ -468,23 +468,23 @@
],
'watchlist' => [
'db1098:3317' => 1,
-   'db1101:3317' => 1,
+   # 'db1101:3317' => 1,
],
'recentchanges' => [
'db1098:3317' => 1,
-   'db1101:3317' => 1,
+   # 'db1101:3317' => 1,
],
'recentchangeslinked' => [
'db1098:3317' => 1,
-   'db1101:3317' => 1,
+   # 'db1101:3317' => 1,
],
'contributions' => [
'db1098:3317' => 1,
-   'db1101:3317' => 1,
+   # 'db1101:3317' => 1,
],
'logpager' => [
'db1098:3317' => 1,
-   'db1101:3317' => 1,
+   # 'db1101:3317' => 1,
],
],
's8' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Replace instances of constructive and remove option entirely

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

Change subject: Replace instances of constructive and remove option entirely
..

Replace instances of constructive and remove option entirely

Removing 'constructive' button flag, which has been deprecated,
entirely.

Bug: T182730
Change-Id: Ia3b9b2c3fc8da3724f28bd210e6c3fd24fc99259
---
M includes/MobileUI.php
M includes/specials/SpecialMobileOptions.php
M resources/mobile.init/BetaOptinPanel.js
M resources/mobile.startup/Button.js
M resources/mobile.startup/button.hogan
M resources/mobile.talk.overlays/TalkSectionOverlay.js
6 files changed, 4 insertions(+), 7 deletions(-)


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

diff --git a/includes/MobileUI.php b/includes/MobileUI.php
index 0206bbf..b6a4ae7 100644
--- a/includes/MobileUI.php
+++ b/includes/MobileUI.php
@@ -42,7 +42,7 @@
 
/**
 * Get CSS classes for buttons
-* @param string $modifier Type of button (progressive, constructive, 
destructive)
+* @param string $modifier Type of button (progressive, destructive)
 * @param string $additionalClassNames additional class names you want 
to associate
 *  with the button element
 * @return string class name for use with HTML element
diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index 7d61a47..acb3cda 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -148,7 +148,7 @@
$html .= $templateParser->processTemplate( 
'checkbox', $data );
}
}
-   $className = MobileUI::buttonClass( 'constructive' );
+   $className = MobileUI::buttonClass( 'progressive' );
$html .= <<
$token
diff --git a/resources/mobile.init/BetaOptinPanel.js 
b/resources/mobile.init/BetaOptinPanel.js
index a0adeb0..cb6dd94 100644
--- a/resources/mobile.init/BetaOptinPanel.js
+++ b/resources/mobile.init/BetaOptinPanel.js
@@ -23,7 +23,7 @@
text: mw.msg( 'mobile-frontend-panel-betaoptin-msg' ),
buttons: [
new Button( {
-   constructive: true,
+   progressive: true,
additionalClassNames: 'optin',
label: mw.msg( 
'mobile-frontend-panel-ok' )
} ).options,
diff --git a/resources/mobile.startup/Button.js 
b/resources/mobile.startup/Button.js
index 662077e..059fd3a 100644
--- a/resources/mobile.startup/Button.js
+++ b/resources/mobile.startup/Button.js
@@ -25,7 +25,6 @@
 * @cfg {string} defaults.tagName The name of the tag in which 
the button is wrapped.
 * @cfg {boolean} defaults.block is stacked button
 * @cfg {boolean} defaults.progressive is progressive action
-* @cfg {boolean} defaults.constructive is constructive action
 *   This option is deprecated. Please use `progressive`.
 * @cfg {boolean} defaults.quiet is quiet button
 * @cfg {boolean} defaults.destructive is destructive action
@@ -38,7 +37,6 @@
block: undefined,
progressive: undefined,
destructive: undefined,
-   constructive: undefined,
quiet: undefined,
additionalClassNames: '',
href: undefined,
diff --git a/resources/mobile.startup/button.hogan 
b/resources/mobile.startup/button.hogan
index 844cbee..130d6ae 100644
--- a/resources/mobile.startup/button.hogan
+++ b/resources/mobile.startup/button.hogan
@@ -3,6 +3,5 @@
class="mw-ui-button {{#progressive}}mw-ui-progressive{{/progressive}}
{{#block}}mw-ui-block{{/block}}
{{#quiet}}mw-ui-quiet{{/quiet}}
-   {{#constructive}}mw-ui-progressive{{/constructive}}
{{#destructive}}mw-ui-destructive{{/destructive}} 
{{additionalClassNames}}
">{{label}}
diff --git a/resources/mobile.talk.overlays/TalkSectionOverlay.js 
b/resources/mobile.talk.overlays/TalkSectionOverlay.js
index a8af395..c5c90e6 100644
--- a/resources/mobile.talk.overlays/TalkSectionOverlay.js
+++ b/resources/mobile.talk.overlays/TalkSectionOverlay.js
@@ -35,7 +35,7 @@
saveButton: new Button( {
block: true,
additionalClassNames: 'save-button',
-   constructive: true,
+   progressive: true,
label: mw.msg( 

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

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

Change subject: db-eqiad.php: Depool db1091
..


db-eqiad.php: Depool db1091

Needs alter table

Bug: T174569
Change-Id: Ica0f4c38bf532cd90e3c7751e7d06007996b9c31
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 43a2dee..01105d0 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -138,7 +138,7 @@
'db1064' => 0,   # D1 2.8TB 160GB, vslow, dump #Master for 
db1095 - new sanitarium
'db1081' => 300, # A2 3.6TB 512GB, api
'db1084' => 400, # B1 3.6TB 512GB, api
-   'db1091' => 500, # D2 3.6TB 512GB
+   # 'db1091' => 500, # D2 3.6TB 512GB # T174569
'db1097:3314' => 1,   # D1 3.6TB 512GB, # rc, log: s4 and s5
'db1103:3314' => 1,  # A3 3.6TB 512GB # rc, log: s2 and s4
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica0f4c38bf532cd90e3c7751e7d06007996b9c31
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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...ContentTranslation[master]: Replace 'constructive' with 'progressive' flag

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

Change subject: Replace 'constructive' with 'progressive' flag
..

Replace 'constructive' with 'progressive' flag

'constructive' flag has been deprecated and will be removed entirely
in upcoming OOUI v0.25.0

Change-Id: I124f4080506d640c90ccd0a5d0c98fe1768b15c7
---
M modules/ui/mw.cx.ui.SourceColumn.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ui/mw.cx.ui.SourceColumn.js 
b/modules/ui/mw.cx.ui.SourceColumn.js
index b4acb22..cdaf846 100644
--- a/modules/ui/mw.cx.ui.SourceColumn.js
+++ b/modules/ui/mw.cx.ui.SourceColumn.js
@@ -67,7 +67,7 @@
target: '_blank',
classes: [ 'cx-column-sub-heading-view-page' ],
framed: false,
-   flags: [ 'constructive' ]
+   flags: [ 'progressive' ]
} );
 
subHeading = new OO.ui.HorizontalLayout( {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I124f4080506d640c90ccd0a5d0c98fe1768b15c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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] operations/mediawiki-config[master]: db-eqiad.php: Depool db1091

2017-12-13 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398211 )

Change subject: db-eqiad.php: Depool db1091
..

db-eqiad.php: Depool db1091

Needs alter table

Bug: T174569
Change-Id: Ica0f4c38bf532cd90e3c7751e7d06007996b9c31
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 43a2dee..01105d0 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -138,7 +138,7 @@
'db1064' => 0,   # D1 2.8TB 160GB, vslow, dump #Master for 
db1095 - new sanitarium
'db1081' => 300, # A2 3.6TB 512GB, api
'db1084' => 400, # B1 3.6TB 512GB, api
-   'db1091' => 500, # D2 3.6TB 512GB
+   # 'db1091' => 500, # D2 3.6TB 512GB # T174569
'db1097:3314' => 1,   # D1 3.6TB 512GB, # rc, log: s4 and s5
'db1103:3314' => 1,  # A3 3.6TB 512GB # rc, log: s2 and s4
],

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Fix for CRM-21180: Inline changes to custom fields aren't re...

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

Change subject: Fix for CRM-21180: Inline changes to custom fields aren't 
reflected in custom greetings.
..

Fix for CRM-21180: Inline changes to custom fields aren't reflected in custom 
greetings.

https://github.com/civicrm/civicrm-core/pull/11364/commits

Toward CRM-21180: Better static var handling.

Toward CRM-21180: removed static vars; removed unused method parameters.

CRM-21180 add unit test for custom field being set in address

CRM-21180 Inline changes to custom fields aren't reflected in custom greetings

This incorporates Allan's work to cause custom fields to be updated
when a custom value is updated. These have been reconciled with the changes to 
allow
greeting fields to be set to null per CRM-21474

CRM-21474 add support for setting non-required fields to 'null'

When a field is not required in the database the 'null' should be pass through 
the pseudoconstant validation.

Note the unit test on this is failing because the BAO is not respecting setting 
null. Follow up patch

CRM-21474, CRM-21880 fix error in Contact schema causing test fail.

The pseudoConstant was against the wrong field

Change-Id: If0365cd1fa34e46004a67d19377882368d063574
---
M CRM/Contact/BAO/Contact.php
M CRM/Contact/BAO/Contact/Utils.php
M CRM/Contact/DAO/Contact.php
M CRM/Core/BAO/CustomQuery.php
M CRM/Core/BAO/CustomValueTable.php
M api/v3/Contact.php
M api/v3/utils.php
M templates/CRM/Contact/Page/View/CustomDataFieldView.tpl
8 files changed, 167 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/10/398210/1

diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php
index 5689082..53730bd 100644
--- a/CRM/Contact/BAO/Contact.php
+++ b/CRM/Contact/BAO/Contact.php
@@ -151,16 +151,11 @@
   $params['source'] = $params['contact_source'];
 }
 
-// Fix for preferred communication method.
-$prefComm = CRM_Utils_Array::value('preferred_communication_method', 
$params, '');
-if ($prefComm && is_array($prefComm)) {
+if (isset($params['preferred_communication_method']) && 
is_array($params['preferred_communication_method'])) {
+  
CRM_Utils_Array::formatArrayKeys($params['preferred_communication_method']);
+  $contact->preferred_communication_method = 
CRM_Utils_Array::implodePadded($params['preferred_communication_method']);
   unset($params['preferred_communication_method']);
-
-  CRM_Utils_Array::formatArrayKeys($prefComm);
-  $prefComm = CRM_Utils_Array::implodePadded($prefComm);
 }
-
-$contact->preferred_communication_method = $prefComm;
 
 $allNull = $contact->copyValues($params);
 
@@ -183,6 +178,12 @@
 $allNull = FALSE;
 $contact->display_name = $contact->sort_name = 
CRM_Utils_Array::value('organization_name', $params, '');
   }
+}
+if (strlen($contact->display_name) > 128) {
+  $contact->display_name = substr($contact->display_name, 0, 128);
+}
+if (strlen($contact->sort_name) > 128) {
+  $contact->sort_name = substr($contact->sort_name, 0, 128);
 }
 
 $privacy = CRM_Utils_Array::value('privacy', $params);
@@ -286,7 +287,7 @@
   }
 }
 
-$config = CRM_Core_Config::singleton();
+self::ensureGreetingParamsAreSet($params);
 
 // CRM-6942: set preferred language to the current language if it’s unset 
(and we’re creating a contact).
 if (empty($params['contact_id'])) {
@@ -295,15 +296,10 @@
 $params['preferred_language'] = $language;
   }
 
-  // CRM-9739: set greeting & addressee if unset and we’re creating a 
contact.
-  foreach (self::$_greetingTypes as $greeting) {
-if (empty($params[$greeting . '_id'])) {
-  if ($defaultGreetingTypeId
-= 
CRM_Contact_BAO_Contact_Utils::defaultGreeting($params['contact_type'], 
$greeting)
-  ) {
-$params[$greeting . '_id'] = $defaultGreetingTypeId;
-  }
-}
+  // CRM-21041: set default 'Communication Style' if unset when creating a 
contact.
+  if (empty($params['communication_style_id'])) {
+$defaultCommunicationStyleId = 
CRM_Core_OptionGroup::values('communication_style', TRUE, NULL, NULL, 'AND 
is_default = 1');
+$params['communication_style_id'] = 
array_pop($defaultCommunicationStyleId);
   }
 }
 
@@ -448,6 +444,53 @@
   }
 
   /**
+   * Ensure greeting parameters are set.
+   *
+   * By always populating greetings here we can be sure they are set if 
required & avoid a call later.
+   * (ie. knowing we have definitely tried disambiguates between NULL & not 
loaded.)
+   *
+   * @param array $params
+   */
+  public static function ensureGreetingParamsAreSet(&$params) {
+$allGreetingParams = array('addressee' => 'addressee_id', 
'postal_greeting' => 'postal_greeting_id', 'email_greeting' => 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Use findItem(s)FromData instead of getItem(s)FromData

2017-12-13 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398209 )

Change subject: Use findItem(s)FromData instead of getItem(s)FromData
..

Use findItem(s)FromData instead of getItem(s)FromData

Bug: T76630
Change-Id: I1ae2c3da6d1bf1b5c45f8937797661b3c10cd03a
---
M demos/classes/IndexedDialog.js
M src/layouts/BookletLayout.js
M src/layouts/IndexLayout.js
M src/widgets/CapsuleMultiselectWidget.js
M src/widgets/CheckboxMultiselectInputWidget.js
M src/widgets/ComboBoxInputWidget.js
M src/widgets/DropdownInputWidget.js
M src/widgets/MenuTagMultiselectWidget.js
M src/widgets/MultiselectWidget.js
M src/widgets/RadioSelectInputWidget.js
M src/widgets/SelectWidget.js
M src/widgets/TagMultiselectWidget.js
12 files changed, 25 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/09/398209/1

diff --git a/demos/classes/IndexedDialog.js b/demos/classes/IndexedDialog.js
index c2d437f..ac93224 100644
--- a/demos/classes/IndexedDialog.js
+++ b/demos/classes/IndexedDialog.js
@@ -33,7 +33,7 @@
this.indexLayout.addTabPanels( this.tabPanels );
this.$body.append( this.indexLayout.$element );
 
-   this.indexLayout.getTabs().getItemFromData( 'fourth' ).setDisabled( 
true );
+   this.indexLayout.getTabs().findItemFromData( 'fourth' ).setDisabled( 
true );
 };
 Demo.IndexedDialog.prototype.getActionProcess = function ( action ) {
if ( action ) {
diff --git a/src/layouts/BookletLayout.js b/src/layouts/BookletLayout.js
index 4fb4d5b..c53017a 100644
--- a/src/layouts/BookletLayout.js
+++ b/src/layouts/BookletLayout.js
@@ -323,16 +323,16 @@
prev = pages[ index - 1 ];
// Prefer adjacent pages at the same level
if ( this.outlined ) {
-   level = this.outlineSelectWidget.getItemFromData( 
page.getName() ).getLevel();
+   level = this.outlineSelectWidget.findItemFromData( 
page.getName() ).getLevel();
if (
prev &&
-   level === 
this.outlineSelectWidget.getItemFromData( prev.getName() ).getLevel()
+   level === 
this.outlineSelectWidget.findItemFromData( prev.getName() ).getLevel()
) {
return prev;
}
if (
next &&
-   level === 
this.outlineSelectWidget.getItemFromData( next.getName() ).getLevel()
+   level === 
this.outlineSelectWidget.findItemFromData( next.getName() ).getLevel()
) {
return next;
}
@@ -467,7 +467,7 @@
name = page.getName();
delete this.pages[ name ];
if ( this.outlined ) {
-   items.push( this.outlineSelectWidget.getItemFromData( 
name ) );
+   items.push( this.outlineSelectWidget.findItemFromData( 
name ) );
page.setOutlineItem( null );
}
}
diff --git a/src/layouts/IndexLayout.js b/src/layouts/IndexLayout.js
index 22bcc1a..12fb1b5 100644
--- a/src/layouts/IndexLayout.js
+++ b/src/layouts/IndexLayout.js
@@ -213,16 +213,16 @@
next = tabPanels[ index + 1 ];
prev = tabPanels[ index - 1 ];
// Prefer adjacent tab panels at the same level
-   level = this.tabSelectWidget.getItemFromData( 
tabPanel.getName() ).getLevel();
+   level = this.tabSelectWidget.findItemFromData( 
tabPanel.getName() ).getLevel();
if (
prev &&
-   level === this.tabSelectWidget.getItemFromData( 
prev.getName() ).getLevel()
+   level === this.tabSelectWidget.findItemFromData( 
prev.getName() ).getLevel()
) {
return prev;
}
if (
next &&
-   level === this.tabSelectWidget.getItemFromData( 
next.getName() ).getLevel()
+   level === this.tabSelectWidget.findItemFromData( 
next.getName() ).getLevel()
) {
return next;
}
@@ -340,7 +340,7 @@
tabPanel = tabPanels[ i ];
name = tabPanel.getName();
delete this.tabPanels[ name ];
-   items.push( this.tabSelectWidget.getItemFromData( name ) );
+   items.push( this.tabSelectWidget.findItemFromData( name ) );
tabPanel.setTabItem( null );
}
if ( items.length ) {
diff --git a/src/widgets/CapsuleMultiselectWidget.js 
b/src/widgets/CapsuleMultiselectWidget.js
index 5509050..e515a8b 100644
--- 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Override OO.ui.getViewportSpacing in infused PHP demo...

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

Change subject: demos: Override OO.ui.getViewportSpacing in infused PHP demo too
..


demos: Override OO.ui.getViewportSpacing in infused PHP demo too

The widgets should not overlap the fixed header when they are infused.
Follow-up to 85bcb4d71.

Change-Id: I32258e263460b8791e20098b55ada6dbaa1a3039
---
M demos/infusion.js
1 file changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/demos/infusion.js b/demos/infusion.js
index dcf8c12..1374b9a 100644
--- a/demos/infusion.js
+++ b/demos/infusion.js
@@ -1,7 +1,7 @@
 // Demonstrate JavaScript 'infusion' of PHP-generated widgets.
 // Used by widgets.php.
 
-var infuseButton;
+var infuseButton, $demoMenu;
 
 // Helper function to get high resolution profiling data, where available.
 function now() {
@@ -24,6 +24,17 @@
infuseButton.setDisabled( true );
 }
 
+$demoMenu = $( '.demo-menu' );
+
+OO.ui.getViewportSpacing = function () {
+   return {
+   top: $demoMenu.outerHeight(),
+   right: 0,
+   bottom: 0,
+   left: 0
+   };
+};
+
 // More typical usage: we take the existing server-side
 // button group and do things to it, here adding a new button.
 infuseButton = new OO.ui.ButtonWidget( { label: 'Infuse' } )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32258e263460b8791e20098b55ada6dbaa1a3039
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: 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] oojs/ui[master]: ClippableElement: Fix JS error when Floatable is mixed in bu...

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

Change subject: ClippableElement: Fix JS error when Floatable is mixed in but 
disabled
..


ClippableElement: Fix JS error when Floatable is mixed in but disabled

Follow-up to I0d1846e4a68b, which called #computePosition without
checking if positioning was enabled.

Bug: T182359
Change-Id: Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988
---
M src/mixins/ClippableElement.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/mixins/ClippableElement.js b/src/mixins/ClippableElement.js
index 43c2220..512e5a8 100644
--- a/src/mixins/ClippableElement.js
+++ b/src/mixins/ClippableElement.js
@@ -204,7 +204,7 @@
  * @return {string} 'left' or 'right'
  */
 OO.ui.mixin.ClippableElement.prototype.getHorizontalAnchorEdge = function () {
-   if ( this.computePosition && this.computePosition().right !== '' ) {
+   if ( this.computePosition && this.positioning && 
this.computePosition().right !== '' ) {
return 'right';
}
return 'left';
@@ -226,7 +226,7 @@
  * @return {string} 'top' or 'bottom'
  */
 OO.ui.mixin.ClippableElement.prototype.getVerticalAnchorEdge = function () {
-   if ( this.computePosition && this.computePosition().bottom !== '' ) {
+   if ( this.computePosition && this.positioning && 
this.computePosition().bottom !== '' ) {
return 'bottom';
}
return 'top';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Catrope 
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] mediawiki...ContentTranslation[master]: Use PSR-4 autoloader in extension.json

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

Change subject: Use PSR-4 autoloader in extension.json
..


Use PSR-4 autoloader in extension.json

Rest of the files should also be moved into a suitable namespace,
such as ContentTranslation\Api and ContentTranslation\SpecialPage.

Bug: T182754
Change-Id: Ic7bf8b0caf6a1d5cf4fcb61c9e2924155c05c663
---
M extension.json
1 file changed, 3 insertions(+), 19 deletions(-)

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



diff --git a/extension.json b/extension.json
index 086cc12..0b6d644 100644
--- a/extension.json
+++ b/extension.json
@@ -83,28 +83,12 @@
"ApiQueryPublishedTranslations": 
"api/ApiQueryPublishedTranslations.php",
"ApiQueryTranslatorStats": "api/ApiQueryTranslatorStats.php",
"ContentTranslationHooks": "ContentTranslation.hooks.php",
-   "ContentTranslation\\AbuseFilterCheck": 
"includes/AbuseFilterCheck.php",
-   "ContentTranslation\\CorporaLookup": 
"includes/CorporaLookup.php",
-   "ContentTranslation\\Database": "includes/Database.php",
-   "ContentTranslation\\DateManipulator": 
"includes/DateManipulator.php",
-   "ContentTranslation\\EchoNotificationPresentationModel": 
"includes/EchoNotificationPresentationModel.php",
-   "ContentTranslation\\JsonDumpFormatter": 
"includes/JsonDumpFormatter.php",
-   "ContentTranslation\\Notification": "includes/Notification.php",
-   "ContentTranslation\\RestbaseClient": 
"includes/RestbaseClient.php",
-   "ContentTranslation\\SiteMapper": "includes/SiteMapper.php",
-   "ContentTranslation\\Stats": "includes/Stats.php",
-   "ContentTranslation\\Suggestion": "includes/Suggestion.php",
-   "ContentTranslation\\SuggestionList": 
"includes/SuggestionList.php",
-   "ContentTranslation\\SuggestionListManager": 
"includes/SuggestionListManager.php",
-   "ContentTranslation\\TmxDumpFormatter": 
"includes/TmxDumpFormatter.php",
-   "ContentTranslation\\Translation": "includes/Translation.php",
-   "ContentTranslation\\TranslationStorageManager": 
"includes/TranslationStorageManager.php",
-   "ContentTranslation\\TranslationUnit": 
"includes/TranslationUnit.php",
-   "ContentTranslation\\TranslationWork": 
"includes/TranslationWork.php",
-   "ContentTranslation\\Translator": "includes/Translator.php",
"SpecialContentTranslation": 
"specials/SpecialContentTranslation.php",
"SpecialContentTranslationStats": 
"specials/SpecialContentTranslationStats.php"
},
+   "AutoloadNamespaces": {
+   "ContentTranslation\\": "includes/"
+   },
"DefaultUserOptions": {
"echo-subscriptions-web-cx": true
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7bf8b0caf6a1d5cf4fcb61c9e2924155c05c663
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Remove long obsolete comment from 29362cc

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

Change subject: Remove long obsolete comment from 29362cc
..


Remove long obsolete comment from 29362cc

Change-Id: Ib5d10f75e1c07ab2c16621e9599973a9b707819c
---
M lib/wt2html/parser.js
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/lib/wt2html/parser.js b/lib/wt2html/parser.js
index caf40ce..3d63eb2 100644
--- a/lib/wt2html/parser.js
+++ b/lib/wt2html/parser.js
@@ -13,8 +13,6 @@
 
 var Promise = require('../utils/promise.js');
 
-// make this global for now
-// XXX: figure out a way to get away without a global for PEG actions!
 var PegTokenizer = require('./tokenizer.js').PegTokenizer;
 var TokenTransformManager = require('./TokenTransformManager.js');
 var ExtensionHandler = require('./tt/ExtensionHandler.js').ExtensionHandler;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5d10f75e1c07ab2c16621e9599973a9b707819c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Sbailey 
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] wikimedia/wikimania-scholarships[master]: More modifications to the form

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

Change subject: More modifications to the form
..


More modifications to the form

- Replaces one question with another (string change only)
- Adds a text field as a follow-up question to another (validation dependent)

Bug: T181072
Change-Id: I8f143d7324764f047bd0cdd37b1d4e34efe91114
---
A data/db/migrations/20171212-add-scholarship-orgs-field.sql
M data/db/schema.mysql
M data/i18n/en.json
M data/i18n/qqq.json
M data/templates/apply.html
M data/templates/review/view.html
M src/Forms/Apply.php
7 files changed, 37 insertions(+), 14 deletions(-)

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



diff --git a/data/db/migrations/20171212-add-scholarship-orgs-field.sql 
b/data/db/migrations/20171212-add-scholarship-orgs-field.sql
new file mode 100644
index 000..903a2ea
--- /dev/null
+++ b/data/db/migrations/20171212-add-scholarship-orgs-field.sql
@@ -0,0 +1,2 @@
+-- Add column for scholarship organizations people apply for
+ALTER TABLE scholarships ADD COLUMN scholarorgs VARCHAR(255) DEFAULT NULL 
AFTER separatejury;
diff --git a/data/db/schema.mysql b/data/db/schema.mysql
index 74523d9..2e43ecf 100644
--- a/data/db/schema.mysql
+++ b/data/db/schema.mysql
@@ -17,6 +17,7 @@
   , typeENUM('partial', 'full', 'either') DEFAULT NULL
   , chapteragreeTINYINT(1) NOT NULL DEFAULT '0'
   , separatejuryTINYINT(1) NOT NULL DEFAULT '0'
+  , scholarorgs VARCHAR(255) DEFAULT NULL
   , fname   VARCHAR(32) DEFAULT NULL
   , lname   VARCHAR(32) DEFAULT NULL
   , email   VARCHAR(64) DEFAULT NULL
diff --git a/data/i18n/en.json b/data/i18n/en.json
index 261706d..c1a8974 100644
--- a/data/i18n/en.json
+++ b/data/i18n/en.json
@@ -31,12 +31,12 @@
 
"deadline-passed": "Scholarship application deadline was February 
20, 23:59 UTC.\nWe will notify applicants in April 2018 about the result 
of their application.\nPlease see the scholarships
 page on the wiki for more details.",
 
-   "form-intro": "This is the application for sponsorship to attend https://wikimania2018.wikimedia.org/wiki/Special:MyLanguage/Main_Page\;>Wikimania
 2018, the annual international conference centered on Wikimedia projects. 
Awardees will receive a scholarship which will cover conference registration 
fees, hotel, and roundtrip travel to Wikimania in Cape Town, South Africa, July 
18-22, 2018.\nApplications may be submitted in any language, but 
every applicant must provide evidence of English language abilities that 
are at a level which would enable them to participate in Wikimania, a 
conference which is primarily conducted in English. Sufficient English 
abilities could be demonstrated in the application itself or 
elsewhere.\nThis is not a scholarship for university study. Applications 
not obviously related to the conference will be discarded.\nPlease 
carefully consider your financial needs before applying for a scholarship to 
attend Wikimania. There are limited funds available and many applicants do not 
have the financial means to attend Wikimania without this opportunity. Thank 
you.\nPlease note that if you need more then 10 minutes to 
complete this application, please draft your answers in a text editor, 
reload this page and then copy-paste your answers into corresponding fields 
before submitting. This application may give an error (\"Missing or invalid 
CSRF token\") if it is open for more then 15 minutes before 
submitting.\nThe deadline to apply is February 20, 23:59 
UTC. ",
+   "form-intro": "This is the application for sponsorship to attend https://wikimania2018.wikimedia.org/wiki/Special:MyLanguage/Main_Page\;>Wikimania
 2018, the annual international conference centered on Wikimedia projects. 
Awardees will receive a scholarship which will cover conference registration 
fees, hotel, and roundtrip travel to Wikimania in Cape Town, South Africa, July 
18-22, 2018.\nApplications may be submitted in any language, but 
every applicant must provide evidence of English language abilities that 
are at a level which would enable them to participate in Wikimania, a 
conference which is primarily conducted in English. Sufficient English 
abilities could be demonstrated in the application itself or 
elsewhere.\nPlease carefully consider your financial needs before 
applying for a scholarship to attend Wikimania. There are limited funds 
available and many applicants do not have the financial means to attend 
Wikimania without this opportunity. Thank you.\nPlease note that 
if you need more then 10 minutes to complete this application, please 
draft your answers in a text editor, reload this page and then copy 
and paste your answers into corresponding fields before submitting. This 
application may give 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Change EnqueueJob docs to discourage obsolete use-cases

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

Change subject: Change EnqueueJob docs to discourage obsolete use-cases
..


Change EnqueueJob docs to discourage obsolete use-cases

Bug: T181216
Change-Id: I9332d26ae9a74c3721cff9c497d5356f05efb428
---
M includes/jobqueue/jobs/EnqueueJob.php
1 file changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/includes/jobqueue/jobs/EnqueueJob.php 
b/includes/jobqueue/jobs/EnqueueJob.php
index 5ffb01b..ea7a8d7 100644
--- a/includes/jobqueue/jobs/EnqueueJob.php
+++ b/includes/jobqueue/jobs/EnqueueJob.php
@@ -24,11 +24,10 @@
 /**
  * Router job that takes jobs and enqueues them to their proper queues
  *
- * This can be used for several things:
- *   - a) Making multi-job enqueues more robust by atomically enqueueing
- *a single job that pushes the actual jobs (with retry logic)
- *   - b) Masking the latency of pushing jobs to different queues/wikis
- *   - c) Low-latency enqueues to push jobs from warm to hot datacenters
+ * This can be used for getting sets of multiple jobs or sets of jobs intended 
for multiple
+ * queues to be inserted more robustly. This is a single job that, upon 
running, enqueues the
+ * wrapped jobs. If some of those fail to enqueue then the EnqueueJob will be 
retried. Due to
+ * the possibility of duplicate enqueues, the wrapped jobs should be 
idempotent.
  *
  * @ingroup JobQueue
  * @since 1.25

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/py...

2017-12-13 Thread Dvorapa (Code Review)
Dvorapa has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398208 )

Change subject: Merge branch 'master' of 
ssh://gerrit.wikimedia.org:29418/pywikibot/core into 
review/dvorapa/solve_disambiguation
..

Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/pywikibot/core into 
review/dvorapa/solve_disambiguation

Change-Id: I11d13c2de7b4e010948cfba2a8d9bd387b006c33
---
M scripts/solve_disambiguation.py
1 file changed, 19 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/08/398208/1

diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index efbf41b..8fa42b6 100755
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -107,26 +107,26 @@
r'[Ll]etter-Number[ _]Combination[ _]Disambiguation',
r'[Mm]il-unit-dis', r'[Nn]umberdis', r'.+?[ _]disambiguation'],
 'haw': [r'[Hh]uaʻōlelo[ _]puana[ _]like'],
-'no': [r'[Pp]eker', r'[Ee]tternavn', r'[Dd]isambig',
-   r'[Tt]obokstavsforkortelse', r'[Tt]rebokstavsforkortelse',
-   r'[Ff]lertydig', r'[Pp]ekerside'],
+'no':  [r'[Pp]eker', r'[Ee]tternavn', r'[Dd]isambig',
+r'[Tt]obokstavsforkortelse', r'[Tt]rebokstavsforkortelse',
+r'[Ff]lertydig', r'[Pp]ekerside'],
 'nov': [r'[Dd]esambig'],
-'qr': [r"[Ss]ut'ichana[ _]qillqa", r'[Dd]isambig', r'SJM'],
+'qr':  [r"[Ss]ut'ichana[ _]qillqa", r'[Dd]isambig', r'SJM'],
 'rmy': [r'[Dd]udalipen'],
-'sk': [r'[Dd]isambig', r'[Rr]ozlišovacia[ _]stránka',
-   r'[Dd]isambiguation'],
-'tg': [r'Ибҳомзудоӣ', r'[Dd]isambig', r'Рафъи[ _]ибҳом',
-   r'[Dd]isambiguation'],
-'tr': [r'[Aa]nlam[ _]ayrım', r'[Dd]isambig', r'[Aa]nlam[ _]ayrımı',
-   r'[Kk]işi[ _]adları[ _]\(anlam[ _]ayrımı\)',
-   r'[Yy]erleşim[ _]yerleri[ _]\(anlam[ _]ayrımı\)',
-   r'[Kk]ısaltmalar[ _]\(anlam[ _]ayrımı\)',
-   r'[Cc]oğrafya[ _]\(anlam[ _]ayrımı\)',
-   r'[Yy]erleşim[ _]yerleri[ _]\(anlam[ _]ayrımı\)',
-   r'[Ss]ayılar[ _]\(anlam[ _]ayrımı\)',
-   r"ABD'deki[ _]iller[ _]\(anlam[ _]ayrımı\)"],
-'wo': [r'[Bb]okktekki'],
-'yi': [r'באדייטען'],
+'sk':  [r'[Dd]isambig', r'[Rr]ozlišovacia[ _]stránka',
+r'[Dd]isambiguation'],
+'tg':  [r'Ибҳомзудоӣ', r'[Dd]isambig', r'Рафъи[ _]ибҳом',
+r'[Dd]isambiguation'],
+'tr':  [r'[Aa]nlam[ _]ayrım', r'[Dd]isambig', r'[Aa]nlam[ _]ayrımı',
+r'[Kk]işi[ _]adları[ _]\(anlam[ _]ayrımı\)',
+r'[Yy]erleşim[ _]yerleri[ _]\(anlam[ _]ayrımı\)',
+r'[Kk]ısaltmalar[ _]\(anlam[ _]ayrımı\)',
+r'[Cc]oğrafya[ _]\(anlam[ _]ayrımı\)',
+r'[Yy]erleşim[ _]yerleri[ _]\(anlam[ _]ayrımı\)',
+r'[Ss]ayılar[ _]\(anlam[ _]ayrımı\)',
+r"ABD'deki[ _]iller[ _]\(anlam[ _]ayrımı\)"],
+'wo':  [r'[Bb]okktekki'],
+'yi':  [r'באדייטען'],
 'zea': [r'[Dd]p', r'[Dd]eurverwiespagina'],
 'zh-classical': [r'釋義', r'消歧義', r'[Dd]isambig'],
 },
@@ -1006,8 +1006,6 @@
 
 def getDisambiguationLinks(self, disambPage):
 """
-Get links from disambiguation page excluding links from
-disamb_templates.
 
 @param disambText: the disambiguation page text
 @type disambText: pywikibot.Page.text
@@ -1023,10 +1021,7 @@
 for exc in exc_regexes:
 stripped_text = textlib.replaceExcept(stripped_text, exc, r'', 
[])
 for template in site_disamb_templates:
-template_regex = re.compile(
-r'\{\{ *(?:' + r':|'.join(self.site.namespaces[10]) +
-r':)?' + template + r' *(\}\}|\|)'
-)
+template_regex = re.compile(r'\{\{ *(?:' + 
r':|'.join(self.site.namespaces[10]) + r':)?' + template + r' *(\}\}|\|)')
 stripped_text = textlib.replaceExcept(stripped_text, 
template_regex, r'', [])
 disambPage.text = stripped_text
 full_text = disambPage.expand_text()

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: ClippableElement: Fix JS error when Floatable is mixed in bu...

2017-12-13 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398207 )

Change subject: ClippableElement: Fix JS error when Floatable is mixed in but 
disabled
..

ClippableElement: Fix JS error when Floatable is mixed in but disabled

Follow-up to I0d1846e4a68b, which called #computePosition without
checking if positioning was enabled.

Bug: T182359
Change-Id: Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988
---
M src/mixins/ClippableElement.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/src/mixins/ClippableElement.js b/src/mixins/ClippableElement.js
index 43c2220..512e5a8 100644
--- a/src/mixins/ClippableElement.js
+++ b/src/mixins/ClippableElement.js
@@ -204,7 +204,7 @@
  * @return {string} 'left' or 'right'
  */
 OO.ui.mixin.ClippableElement.prototype.getHorizontalAnchorEdge = function () {
-   if ( this.computePosition && this.computePosition().right !== '' ) {
+   if ( this.computePosition && this.positioning && 
this.computePosition().right !== '' ) {
return 'right';
}
return 'left';
@@ -226,7 +226,7 @@
  * @return {string} 'top' or 'bottom'
  */
 OO.ui.mixin.ClippableElement.prototype.getVerticalAnchorEdge = function () {
-   if ( this.computePosition && this.computePosition().bottom !== '' ) {
+   if ( this.computePosition && this.positioning && 
this.computePosition().bottom !== '' ) {
return 'bottom';
}
return 'top';

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Don't load JS or redirect when transcluding

2017-12-13 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398206 )

Change subject: RCFilters: Don't load JS or redirect when transcluding
..

RCFilters: Don't load JS or redirect when transcluding

We were changing the URL on every page that contained
{{Special:Recentchanges}}.

Bug: T181032
Change-Id: Ib4a0d3c1733da0bd0076aa43b91fc06939c51b75
---
M includes/specialpage/ChangesListSpecialPage.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/06/398206/1

diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index b6d1028..5993d10 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -624,7 +624,7 @@
 * redirect properly with all necessary query parameters.
 */
protected function considerActionsForDefaultSavedQuery() {
-   if ( !$this->isStructuredFilterUiEnabled() ) {
+   if ( !$this->isStructuredFilterUiEnabled() || 
$this->including() ) {
return;
}
 
@@ -697,7 +697,7 @@
 */
protected function includeRcFiltersApp() {
$out = $this->getOutput();
-   if ( $this->isStructuredFilterUiEnabled() ) {
+   if ( $this->isStructuredFilterUiEnabled() && 
!$this->including() ) {
$jsData = $this->getStructuredFilterJsData();
 
$messages = [];
@@ -1642,7 +1642,7 @@
] );
$out->addModules( 'mediawiki.special.changeslist.legend.js' );
 
-   if ( $this->isStructuredFilterUiEnabled() ) {
+   if ( $this->isStructuredFilterUiEnabled() && 
!$this->including() ) {
$out->addModules( 'mediawiki.rcfilters.filters.ui' );
$out->addModuleStyles( 
'mediawiki.rcfilters.filters.base.styles' );
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix manual IN queries in checkStorage.php

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

Change subject: Fix manual IN queries in checkStorage.php
..


Fix manual IN queries in checkStorage.php

Bug: T182689
Change-Id: Ifca7bd6d0385dd470cddc483f4641eeb2832580c
---
M maintenance/storage/checkStorage.php
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/maintenance/storage/checkStorage.php 
b/maintenance/storage/checkStorage.php
index 4071a06..6348e96 100644
--- a/maintenance/storage/checkStorage.php
+++ b/maintenance/storage/checkStorage.php
@@ -208,7 +208,9 @@
$blobsTable = $this->dbStore->getTable( 
$extDb );
$res = $extDb->select( $blobsTable,
[ 'blob_id' ],
-   [ 'blob_id IN( ' . implode( 
',', $blobIds ) . ')' ], __METHOD__ );
+   [ 'blob_id' => $blobIds ],
+   __METHOD__
+   );
foreach ( $res as $row ) {
unset( $xBlobIds[$row->blob_id] 
);
}
@@ -410,7 +412,9 @@
$headerLength = strlen( self::CONCAT_HEADER );
$res = $extDb->select( $blobsTable,
[ 'blob_id', "LEFT(blob_text, $headerLength) AS 
header" ],
-   [ 'blob_id IN( ' . implode( ',', $blobIds ) . 
')' ], __METHOD__ );
+   [ 'blob_id' => $blobIds ],
+   __METHOD__
+   );
foreach ( $res as $row ) {
if ( strcasecmp( $row->header, 
self::CONCAT_HEADER ) ) {
$this->addError(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifca7bd6d0385dd470cddc483f4641eeb2832580c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Pppery 
Gerrit-Reviewer: Parent5446 
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...GraphViz[master]: GraphViz depends on ImageMap

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

Change subject: GraphViz depends on ImageMap
..


GraphViz depends on ImageMap

Depends-On: 4d3bde030021f3e06f613167148caad74e3e3597
Change-Id: If76f5457de6563b2193f8a2275bd77ce528571fd
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/GraphViz.php
4 files changed, 4 insertions(+), 8 deletions(-)

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



diff --git a/extension.json b/extension.json
index 7e01f70..45d5d36 100644
--- a/extension.json
+++ b/extension.json
@@ -13,7 +13,10 @@
"descriptionmsg": "graphviz-desc",
"license-name": "GPL-2.0+",
"requires": {
-   "MediaWiki": ">= 1.29.0"
+   "MediaWiki": ">= 1.29.0",
+   "extensions": {
+   "ImageMap": "*"
+   }
},
"AutoloadClasses": {
"MediaWiki\\Extension\\GraphViz\\GraphViz": 
"includes/GraphViz.php",
diff --git a/i18n/en.json b/i18n/en.json
index 7b35939..10d772f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,7 +8,6 @@
"graphviz-desc": "Allows embedding [http://www.graphviz.org Graphviz] 
markup and generates inline images",
"graphviz-reload": "Graph image source changed. Reload page to display 
updated graph image.",
"graphviz-no-input": "Graph source is missing.",
-   "graphviz-no-imagemap-class": "The ImageMap extension is not 
installed.",
"graphviz-dot-invalid-image": "The dot $1 attribute must be the name of 
an uploaded file.",
"graphviz-dot-attr-forbidden": "The dot $1 attribute is forbidden.",
"graphviz-read-src-failed": "Unable to read the graph text from the 
file system.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 2caf2ec..a8267e8 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -9,7 +9,6 @@
"graphviz-desc": 
"{{desc|name=GraphViz|url=https://www.mediawiki.org/wiki/Extension:Graphviz}};,
"graphviz-reload": "Used as an informational message to inform the user 
to reload the wiki page.",
"graphviz-no-input": "Used as error message",
-   "graphviz-no-imagemap-class": "Used as error message",
"graphviz-dot-invalid-image": "Used as error message.  Parameters:\n* 
$1 - attribute name",
"graphviz-dot-attr-forbidden": "Used as an error message.  
Parameters:\n* $1 - attribute name",
"graphviz-read-src-failed": "Used as error message.",
diff --git a/includes/GraphViz.php b/includes/GraphViz.php
index 58d97eb..97fcc8b 100644
--- a/includes/GraphViz.php
+++ b/includes/GraphViz.php
@@ -487,11 +487,6 @@
return self::i18nErrorMessageHTML( 'graphviz-no-input' 
);
}
 
-   // make sure the ImageMap extension is installed
-   if ( !class_exists( 'ImageMap' ) ) {
-   return self::i18nErrorMessageHTML( 
'graphviz-no-imagemap-class' );
-   }
-
// get title text
$title = $parser->getTitle();
$titleText = $title->getFulltext();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If76f5457de6563b2193f8a2275bd77ce528571fd
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/GraphViz
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Reedy 
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/core[master]: Fix manual IN queries in checkStorage, php

2017-12-13 Thread Pppery (Code Review)
Pppery has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398205 )

Change subject: Fix manual IN queries in checkStorage,php
..

Fix manual IN queries in checkStorage,php

Bug: T182689
Change-Id: Ifca7bd6d0385dd470cddc483f4641eeb2832580c
---
M maintenance/storage/checkStorage.php
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/05/398205/1

diff --git a/maintenance/storage/checkStorage.php 
b/maintenance/storage/checkStorage.php
index 4071a06..6348e96 100644
--- a/maintenance/storage/checkStorage.php
+++ b/maintenance/storage/checkStorage.php
@@ -208,7 +208,9 @@
$blobsTable = $this->dbStore->getTable( 
$extDb );
$res = $extDb->select( $blobsTable,
[ 'blob_id' ],
-   [ 'blob_id IN( ' . implode( 
',', $blobIds ) . ')' ], __METHOD__ );
+   [ 'blob_id' => $blobIds ],
+   __METHOD__
+   );
foreach ( $res as $row ) {
unset( $xBlobIds[$row->blob_id] 
);
}
@@ -410,7 +412,9 @@
$headerLength = strlen( self::CONCAT_HEADER );
$res = $extDb->select( $blobsTable,
[ 'blob_id', "LEFT(blob_text, $headerLength) AS 
header" ],
-   [ 'blob_id IN( ' . implode( ',', $blobIds ) . 
')' ], __METHOD__ );
+   [ 'blob_id' => $blobIds ],
+   __METHOD__
+   );
foreach ( $res as $row ) {
if ( strcasecmp( $row->header, 
self::CONCAT_HEADER ) ) {
$this->addError(

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Start the bin/rt launched Parsoid logging at "info"

2017-12-13 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398203 )

Change subject: Start the bin/rt launched Parsoid logging at "info"
..

Start the bin/rt launched Parsoid logging at "info"

On ruthenium we pass at parsoidURL so that remains unaffected.  This is
just for command line use.

Change-Id: Ic9fc002b5391801a72ff5dba67b47a307b049518
---
M bin/roundtrip-test.js
M tests/serviceWrapper.js
2 files changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js
index 76a544b..f544359 100755
--- a/bin/roundtrip-test.js
+++ b/bin/roundtrip-test.js
@@ -760,7 +760,9 @@
if (argv.parsoidURL) { return; }
// Start our own Parsoid server
var serviceWrapper = 
require('../tests/serviceWrapper.js');
-   var serverOpts = {};
+   var serverOpts = {
+   logging: { level: 'info' },
+   };
if (argv.apiURL) {
serverOpts.mockURL = argv.apiURL;
argv.domain = 'customwiki';
diff --git a/tests/serviceWrapper.js b/tests/serviceWrapper.js
index bf4e087..feb6283 100644
--- a/tests/serviceWrapper.js
+++ b/tests/serviceWrapper.js
@@ -100,6 +100,7 @@
num_workers: 1,
worker_heartbeat_timeout: 2 * 60 * 1000,
services: services,
+   logging: options.logging,
})
.then(function() {
return ret;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9fc002b5391801a72ff5dba67b47a307b049518
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] mediawiki...parsoid[master]: Give the rt client a user agent

2017-12-13 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398204 )

Change subject: Give the rt client a user agent
..

Give the rt client a user agent

Change-Id: I12c8c1a965ae978e4c0a541eb0c636869800ebeb
---
M bin/roundtrip-test.js
1 file changed, 10 insertions(+), 6 deletions(-)


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

diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js
index f544359..2743392 100755
--- a/bin/roundtrip-test.js
+++ b/bin/roundtrip-test.js
@@ -465,10 +465,15 @@
return results;
 };
 
+var UA = 'Roundtrip-Test';
+
 function parsoidPost(profile, options) {
var httpOptions = {
method: 'POST',
body: options.data,
+   headers: {
+   'User-Agent': UA,
+   },
};
 
var uri = options.uri + 'transform/';
@@ -480,17 +485,13 @@
httpOptions.body.scrub_wikitext = true;
// We want to encode the request but *not* decode the response.
httpOptions.body = JSON.stringify(httpOptions.body);
-   httpOptions.headers = {
-   'Content-Type': 'application/json',
-   };
+   httpOptions.headers['Content-Type'] = 'application/json';
} else {  // wt2html
uri += 'wikitext/to/pagebundle/' + options.title;
if (options.oldid) {
uri += '/' + options.oldid;
}
-   httpOptions.headers = {
-   Accept: apiUtils.pagebundleContentType(null, 
options.contentVersion),
-   };
+   httpOptions.headers.Accept = 
apiUtils.pagebundleContentType(null, options.contentVersion);
// setting json here encodes the request *and* decodes the 
response.
httpOptions.json = true;
}
@@ -608,6 +609,9 @@
return Util.retryingHTTPRequest(10, {
method: 'GET',
uri: uri2,
+   headers: {
+   'User-Agent': UA,
+   },
});
}).spread(function(res, body) {
profile.start = Date.now();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12c8c1a965ae978e4c0a541eb0c636869800ebeb
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] mediawiki...MobileFrontend[master]: Disable RCFilters in mobile view

2017-12-13 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398202 )

Change subject: Disable RCFilters in mobile view
..

Disable RCFilters in mobile view

Bug: T181545
Depends-On: I3a0a139e994a1447b1e783081bcc14e6daee21a1
Change-Id: I2cb6954a3a62d4ea9106784351506967bcb1873a
---
M extension.json
M includes/MobileFrontend.hooks.php
2 files changed, 19 insertions(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index d650d4d..0fc400a 100644
--- a/extension.json
+++ b/extension.json
@@ -1217,6 +1217,9 @@
],
"TitleSquidURLs": [
"MobileFrontendHooks::onTitleSquidURLs"
+   ],
+   "ChangesListSpecialPageStructuredFilterUiEnabled": [
+   
"MobileFrontendHooks::onChangesListSpecialPageStructuredFilterUiEnabled"
]
},
"config": {
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 359e956..8ca7113 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1277,4 +1277,20 @@
$ctx = MobileContext::singleton();
$result['mobileserver'] = $ctx->getMobileUrl( 
$wgCanonicalServer );
}
+
+   /**
+* Disable the structured filters UI (RCFilters) in mobile view.
+* @param ChangesListSpecialPage $special
+* @param bool $enabled Whether to enable the structured filters UI
+* @return bool
+*/
+   public static function 
onChangesListSpecialPageStructuredFilterUiEnabled(
+   ChangesListSpecialPage $special, &$enabled
+   ) {
+   // Disable structured filters in mobile view
+   if ( MobileContext::singleton()->shouldDisplayMobileView() ) {
+   $enabled = false;
+   return false;
+   }
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cb6954a3a62d4ea9106784351506967bcb1873a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: icons: Add 'stop' icon to Apex theme

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

Change subject: icons: Add 'stop' icon to Apex theme
..


icons: Add 'stop' icon to Apex theme

Bug: T170730
Change-Id: I4f4e9bc943f6c7d6f931478edfa5f5a458993d01
---
M src/themes/apex/icons-media.json
A src/themes/apex/images/icons/stop.svg
2 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/src/themes/apex/icons-media.json b/src/themes/apex/icons-media.json
index dc4ca10..f7d9411 100644
--- a/src/themes/apex/icons-media.json
+++ b/src/themes/apex/icons-media.json
@@ -11,6 +11,7 @@
"play": { "file": {
"ltr": "images/icons/play-ltr.svg",
"rtl": "images/icons/play-rtl.svg"
-   } }
+   } },
+   "stop": { "file": "images/icons/stop.svg" }
}
 }
diff --git a/src/themes/apex/images/icons/stop.svg 
b/src/themes/apex/images/icons/stop.svg
new file mode 100644
index 000..f7c7c63
--- /dev/null
+++ b/src/themes/apex/images/icons/stop.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+   
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f4e9bc943f6c7d6f931478edfa5f5a458993d01
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Petar.petkovic 
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]: Fix blurry text on PanelLayout promoted to GPU in Safari

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

Change subject: Fix blurry text on PanelLayout promoted to GPU in Safari
..


Fix blurry text on PanelLayout promoted to GPU in Safari

Fixing blurry text in Safari on element promoted to GPU composite layer
through `.oo-ui-force-gpu-composite-layer()` by applying
a `background-color`.

Bug: T176837
Change-Id: Iaefb4670371a4a48d7cf7c69aacaafc4be905524
---
M src/themes/apex/layouts.less
M src/themes/wikimediaui/layouts.less
2 files changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/src/themes/apex/layouts.less b/src/themes/apex/layouts.less
index 4f13a2b..c5dc5f3 100644
--- a/src/themes/apex/layouts.less
+++ b/src/themes/apex/layouts.less
@@ -190,6 +190,14 @@
&-padded&-framed {
margin: 1em 0;
}
+
+   // Support Safari (Webkit), see T176837:
+   // When promoted to GPU composite layer through
+   // `.oo-ui-force-gpu-composite-layer()` while not applying a 
`background-color`
+   // results in blurry text
+   &-scrollable {
+   background-color: @background-color-main;
+   }
 }
 
 .theme-oo-ui-tabPanelLayout () {}
diff --git a/src/themes/wikimediaui/layouts.less 
b/src/themes/wikimediaui/layouts.less
index 8a4f8a2..11be561 100644
--- a/src/themes/wikimediaui/layouts.less
+++ b/src/themes/wikimediaui/layouts.less
@@ -254,6 +254,14 @@
&-padded&-framed {
margin: 1em 0;
}
+
+   // Support Safari (Webkit), see T176837:
+   // When promoted to GPU composite layer through
+   // `.oo-ui-force-gpu-composite-layer()` while not applying a 
`background-color`
+   // results in blurry text
+   &-scrollable {
+   background-color: @background-color-base;
+   }
 }
 
 .theme-oo-ui-tabPanelLayout () {}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaefb4670371a4a48d7cf7c69aacaafc4be905524
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Sjoerddebruin 
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]: labsdb.zone: typo fix to the tools.db cname

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

Change subject: labsdb.zone: typo fix to the tools.db cname
..


labsdb.zone: typo fix to the tools.db cname

Change-Id: Ib04e08c8e0ac6cedd5df9804420ee4cf94ee2035
---
M modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone 
b/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
index 3f7987d..8b325a0 100644
--- a/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
+++ b/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
@@ -5,7 +5,7 @@
 c1 1H  IN  A   10.64.4.11
 c3 1H  IN  A   10.64.37.5
 
-tools  1H  IN  CNAME   tools.db.svc.eqiad.wmflabs
+tools  1H  IN  CNAME   tools.db.svc.eqiad.wmflabs.
 
 s1 1H  IN  CNAME   s1.web.db.svc.eqiad.wmflabs.
 enwiki 1H  IN  CNAME   s1.web.db.svc.eqiad.wmflabs.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ChangesListSpecialPage: Add hook to disable structured filte...

2017-12-13 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398200 )

Change subject: ChangesListSpecialPage: Add hook to disable structured filters 
UI
..

ChangesListSpecialPage: Add hook to disable structured filters UI

Extensions can use the ChangesListSpecialPageStructuredFilterUiEnabled
hook to force the structured filters UI to be disabled or enabled.

Bug: T181545
Change-Id: I3a0a139e994a1447b1e783081bcc14e6daee21a1
---
M docs/hooks.txt
M includes/specialpage/ChangesListSpecialPage.php
2 files changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/00/398200/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index 29883b2..b3fb92e 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1028,6 +1028,13 @@
 fields.
 $special: ChangesListSpecialPage instance
 
+'ChangesListSpecialPageStructuredFilterUiEnabled': Called to allow extensions 
to
+force-disable or force-enable the structured filters UI. To force-enable, set
+$enabled to true and return false. To force-disable, set $enabled to false and
+return false.
+$special: ChangesListSpecialPage instance
+$enabled: Whether the structured filters UI should be enabled (initially null)
+
 'ChangeTagAfterDelete': Called after a change tag has been deleted (that is,
 removed from all revisions and log entries to which it was applied). This gives
 extensions a chance to take it off their books.
diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index b6d1028..8936b1e 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -1778,6 +1778,13 @@
return true;
}
 
+   // Allow extensions to disable the structured filter UI
+   $enabled = null;
+   Hooks::run( 'ChangesListSpecialPageStructuredFilterUiEnabled', 
[ $this, &$enabled ] );
+   if ( $enabled !== null ) {
+   return (bool)$enabled;
+   }
+
return static::checkStructuredFilterUiEnabled(
$this->getConfig(),
$this->getUser()

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labsdb.zone: typo fix to the tools.db cname

2017-12-13 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398201 )

Change subject: labsdb.zone: typo fix to the tools.db cname
..

labsdb.zone: typo fix to the tools.db cname

Change-Id: Ib04e08c8e0ac6cedd5df9804420ee4cf94ee2035
---
M modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone 
b/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
index 3f7987d..8b325a0 100644
--- a/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
+++ b/modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
@@ -5,7 +5,7 @@
 c1 1H  IN  A   10.64.4.11
 c3 1H  IN  A   10.64.37.5
 
-tools  1H  IN  CNAME   tools.db.svc.eqiad.wmflabs
+tools  1H  IN  CNAME   tools.db.svc.eqiad.wmflabs.
 
 s1 1H  IN  CNAME   s1.web.db.svc.eqiad.wmflabs.
 enwiki 1H  IN  CNAME   s1.web.db.svc.eqiad.wmflabs.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: OOjs UI: Fix font size for default overlay

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

Change subject: OOjs UI: Fix font size for default overlay
..

OOjs UI: Fix font size for default overlay

Menus/popups inside the default overlay suffer from the same issue as
dialogs, as described in the comment here.

Bug: T182602
Change-Id: I53888581f9e1da3b036166613c46cbc1085aa55e
---
M resources/src/oojs-ui-local.css
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/398198/1

diff --git a/resources/src/oojs-ui-local.css b/resources/src/oojs-ui-local.css
index 57e0d8d..148c4c7 100644
--- a/resources/src/oojs-ui-local.css
+++ b/resources/src/oojs-ui-local.css
@@ -1,6 +1,8 @@
-/* HACK: Set sane font-size for OOjs UI dialogs, in the most common case. This 
should be skin's
-   responsibility, but alas our skins tend to have the weirdest font-sizes on 
body. This shall be
-   removed when we make the MediaWiki skins bundled with tarball sane. 
(T91152) */
-body > .oo-ui-windowManager {
+/* HACK: Set sane font-size for OOjs UI dialogs (and menus/popups inside the 
default overlay), in
+   the most common case. This should be skin's responsibility, but alas our 
skins tend to have the
+   weirdest font-sizes on body. This shall be removed when we make the 
MediaWiki skins bundled with
+   tarball sane. (T91152) */
+body > .oo-ui-windowManager,
+.oo-ui-defaultOverlay {
font-size: 0.8rem;
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: OOjs UI: Fix z-index and font size for default overlay

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

Change subject: OOjs UI: Fix z-index and font size for default overlay
..

OOjs UI: Fix z-index and font size for default overlay

Override default font size for .oo-ui-defaultOverlay (0.8em) to the
same as content in Vector (0.875em).

Make it appear on top of the personal menu too.

Bug: T182602
Change-Id: I459aad271c0c15248e54e312b8bdc44ed244733b
---
M skinStyles/ooui.less
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector 
refs/changes/99/398199/1

diff --git a/skinStyles/ooui.less b/skinStyles/ooui.less
index e9f5961..1d2b3d8 100644
--- a/skinStyles/ooui.less
+++ b/skinStyles/ooui.less
@@ -1,6 +1,13 @@
+@import '../variables.less';
+
 .oo-ui-windowManager-modal,
+.oo-ui-defaultOverlay,
 .skin-vector .mw-rcfilters-ui-overlay,
 .skin-vector .ve-ui-overlay-global {
z-index: 101;
position: relative;
 }
+
+.oo-ui-defaultOverlay {
+   font-size: @content-font-size;
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I459aad271c0c15248e54e312b8bdc44ed244733b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Vector
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add PUT to list of allowed characters

2017-12-13 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398197 )

Change subject: Add PUT to list of allowed characters
..

Add PUT to list of allowed characters

HTTP PUT is used by the reading lists REST API to update list
metadata.

Bug: T182825
Change-Id: I6f7fba56731da3d72dab34f8eb6b3eebc57f4879
---
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/97/398197/1

diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index 2a14a7c..89fd4ba 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -340,7 +340,7 @@
 
// To pass this check, the method must be in allowed_methods (even 
OPTIONS must be there to be supported),
// Additionally, if OPTIONS is allowed, it must be accompanied by 
Origin:
-   if (req.method !~ "<%= @vcl_config.fetch("allowed_methods", 
"^(GET|HEAD|POST|OPTIONS|PURGE)$") %>"
+   if (req.method !~ "<%= @vcl_config.fetch("allowed_methods", 
"^(GET|HEAD|POST|PUT|OPTIONS|PURGE)$") %>"
|| (req.method == "OPTIONS" && !req.http.Origin)) {
return (synth(405, "Method not allowed"));
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f7fba56731da3d72dab34f8eb6b3eebc57f4879
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: DropdownWidget: Remove stray use of this.$()

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

Change subject: DropdownWidget: Remove stray use of this.$()
..

DropdownWidget: Remove stray use of this.$()

this.$() is deprecated since c38a54272fd7df5ef7aeea4d131d1716ac986a9d,
which also removed all uses of it in this repo. This instance was
erroneously reintroduced in fe8e2f5a485727e2c8c24008ca096c39a6f47abd,
probably due to a carelessly resolved merge conflict.

Change-Id: Ief573eea8b5ec91dc5bb424545458a798329d527
---
M src/widgets/DropdownWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/94/398194/1

diff --git a/src/widgets/DropdownWidget.js b/src/widgets/DropdownWidget.js
index 09a157f..f81fb31 100644
--- a/src/widgets/DropdownWidget.js
+++ b/src/widgets/DropdownWidget.js
@@ -62,7 +62,7 @@
OO.ui.DropdownWidget.parent.call( this, config );
 
// Properties (must be set before TabIndexedElement constructor call)
-   this.$handle = this.$( '' );
+   this.$handle = $( '' );
this.$overlay = config.$overlay || this.$element;
 
// Mixin constructors

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief573eea8b5ec91dc5bb424545458a798329d527
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Override OO.ui.getViewportSpacing in PHP demo too

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

Change subject: demos: Override OO.ui.getViewportSpacing in PHP demo too
..

demos: Override OO.ui.getViewportSpacing in PHP demo too

The widgets should not overlap the fixed header when they are infused.
Follow-up to 85bcb4d71.

Change-Id: I32258e263460b8791e20098b55ada6dbaa1a3039
---
M demos/infusion.js
1 file changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/93/398193/1

diff --git a/demos/infusion.js b/demos/infusion.js
index dcf8c12..1374b9a 100644
--- a/demos/infusion.js
+++ b/demos/infusion.js
@@ -1,7 +1,7 @@
 // Demonstrate JavaScript 'infusion' of PHP-generated widgets.
 // Used by widgets.php.
 
-var infuseButton;
+var infuseButton, $demoMenu;
 
 // Helper function to get high resolution profiling data, where available.
 function now() {
@@ -24,6 +24,17 @@
infuseButton.setDisabled( true );
 }
 
+$demoMenu = $( '.demo-menu' );
+
+OO.ui.getViewportSpacing = function () {
+   return {
+   top: $demoMenu.outerHeight(),
+   right: 0,
+   bottom: 0,
+   left: 0
+   };
+};
+
 // More typical usage: we take the existing server-side
 // button group and do things to it, here adding a new button.
 infuseButton = new OO.ui.ButtonWidget( { label: 'Infuse' } )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32258e263460b8791e20098b55ada6dbaa1a3039
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Introduce OO.ui.getDefaultOverlay

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

Change subject: Introduce OO.ui.getDefaultOverlay
..

Introduce OO.ui.getDefaultOverlay

Widgets that support overlays now use the default overlay
when passed `$overlay: true` in configuration options.
(We can't use it really by default, because that would break
overlay-less widgets used in dialogs.)

Bug: T182602
Change-Id: Ied0541209c4a9d7bf8c0574b0a864ba09fff1b70
---
M demos/pages/widgets.js
M src/core.js
M src/mixins/LookupElement.js
M src/styles/core.less
M src/widgets/CapsuleMultiselectWidget.js
M src/widgets/ComboBoxInputWidget.js
M src/widgets/DropdownWidget.js
M src/widgets/MenuTagMultiselectWidget.js
M src/widgets/PopupButtonWidget.js
M src/widgets/PopupTagMultiselectWidget.js
10 files changed, 62 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/95/398195/1

diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 713f536..1380214 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -1310,6 +1310,36 @@
new OO.ui.FieldLayout(
new OO.ui.DropdownWidget( {
label: 'Select one',
+   $overlay: true,
+   menu: {
+   items: [
+   new 
OO.ui.MenuOptionWidget( {
+   data: 
'a',
+   label: 
'First'
+   } ),
+   new 
OO.ui.MenuOptionWidget( {
+   data: 
'b',
+   label: 
'Second'
+   } ),
+   new 
OO.ui.MenuOptionWidget( {
+   data: 
'c',
+   label: 
'Third'
+   } ),
+   new 
OO.ui.MenuOptionWidget( {
+   data: 
'd',
+   label: 
'Fourth'
+   } )
+   ]
+   }
+   } ),
+   {
+   label: 'DropdownWidget (using 
default overlay)\u200E',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.DropdownWidget( {
+   label: 'Select one',
$overlay: $overlay,
menu: {
items: [
@@ -1333,7 +1363,7 @@
}
} ),
{
-   label: 'DropdownWidget (using 
overlay)\u200E',
+   label: 'DropdownWidget (using 
custom overlay)\u200E',
align: 'top'
}
),
@@ -2957,6 +2987,9 @@
$overlay.appendTo( 'body' );
 
demo.once( 'destroy', function () {
+   // We are removing all of the widgets from the page, so also 
remove their "detached"
+   // menus and stuff, otherwise they can remain visible forever.
$overlay.remove();
+   OO.ui.$defaultOverlay.empty();
} );
 };
diff --git a/src/core.js b/src/core.js
index c2b11e1..1dbc5c4 100644
--- a/src/core.js
+++ b/src/core.js
@@ -541,3 +541,17 @@
left: 0
};
 };
+
+/**
+ * Get the default overlay, which is used by various widgets when they are 
passed `$overlay: true`.
+ * See .
+ *
+ * @return {jQuery} Default overlay node
+ */

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Put menus/popups of infused widgets into the default overlay

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

Change subject: Put menus/popups of infused widgets into the default overlay
..

Put menus/popups of infused widgets into the default overlay

Bug: T182602
Change-Id: Iab929d30a1b75daec3683ee1feb97f833fb7f4c3
---
M php/layouts/FieldLayout.php
M php/layouts/FieldsetLayout.php
M php/widgets/ComboBoxInputWidget.php
M php/widgets/DropdownInputWidget.php
4 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/96/398196/1

diff --git a/php/layouts/FieldLayout.php b/php/layouts/FieldLayout.php
index e070605..0160a4e 100644
--- a/php/layouts/FieldLayout.php
+++ b/php/layouts/FieldLayout.php
@@ -247,6 +247,7 @@
if ( $this->help !== '' ) {
$config['help'] = $this->help->getTitle();
}
+   $config['$overlay'] = true;
return parent::getConfig( $config );
}
 }
diff --git a/php/layouts/FieldsetLayout.php b/php/layouts/FieldsetLayout.php
index a161008..d69d2ff 100644
--- a/php/layouts/FieldsetLayout.php
+++ b/php/layouts/FieldsetLayout.php
@@ -46,4 +46,9 @@
$this->addItems( $config['items'] );
}
}
+
+   public function getConfig( &$config ) {
+   $config['$overlay'] = true;
+   return parent::getConfig( $config );
+   }
 }
diff --git a/php/widgets/ComboBoxInputWidget.php 
b/php/widgets/ComboBoxInputWidget.php
index c2f8d34..d2fe471 100644
--- a/php/widgets/ComboBoxInputWidget.php
+++ b/php/widgets/ComboBoxInputWidget.php
@@ -74,6 +74,7 @@
if ( $this->forceAutocomplete ) {
$config['autocomplete'] = true;
}
+   $config['$overlay'] = true;
return parent::getConfig( $config );
}
 }
diff --git a/php/widgets/DropdownInputWidget.php 
b/php/widgets/DropdownInputWidget.php
index 83430f5..0b04c23 100644
--- a/php/widgets/DropdownInputWidget.php
+++ b/php/widgets/DropdownInputWidget.php
@@ -107,6 +107,7 @@
}
}
$config['options'] = $o;
+   $config['dropdown'] = [ '$overlay' => true ];
return parent::getConfig( $config );
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab929d30a1b75daec3683ee1feb97f833fb7f4c3
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Silently drop unknown titles in completion search

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

Change subject: Silently drop unknown titles in completion search
..

Silently drop unknown titles in completion search

This mimics how full text works by silenty dropping results returned from
search that no longer exist. This could be because the search index is slightly
out of sync with reality, or the search engine could simply be broken.

Only silent from the users perspective. We maintain a count in statsd of
the number of titles dropped. This can be monitored over time to
recognize any increases.

Bug: T115756
Change-Id: I2f29d73e258cd448a14d35a2b4902a4fb6f61c68
---
M includes/search/SearchEngine.php
M includes/search/SearchSuggestionSet.php
2 files changed, 31 insertions(+), 1 deletion(-)


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

diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 3c8fe60..94e0d80 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -580,6 +580,16 @@
$lb->setCaller( __METHOD__ );
$lb->execute();
 
+   $before = $suggestions->count();
+   $suggestions = $suggestions->filter( function ( 
SearchSuggestion $sugg ) {
+   return $sugg->getSuggestedTitle()->isKnown();
+   } );
+   $after = $suggestions->count();
+   if ( $before !== $after ) {
+   MediaWikiServices::getInstance()->getStatsdDataFactory()
+   ->updateCount( 'search.completion.missing', 
$before - $after );
+   }
+
$results = $suggestions->map( function ( SearchSuggestion $sugg 
) {
return $sugg->getSuggestedTitle()->getPrefixedText();
} );
diff --git a/includes/search/SearchSuggestionSet.php 
b/includes/search/SearchSuggestionSet.php
index aced5e1..7c4b484 100644
--- a/includes/search/SearchSuggestionSet.php
+++ b/includes/search/SearchSuggestionSet.php
@@ -23,7 +23,7 @@
  * A set of search suggestions.
  * The set is always ordered by score, with the best match first.
  */
-class SearchSuggestionSet {
+class SearchSuggestionSet implements Countable {
/**
 * @var SearchSuggestion[]
 */
@@ -73,6 +73,19 @@
return array_map( $callback, $this->suggestions );
}
 
+   /**
+* Filter the suggestions array
+* @param callback $callback
+* @return self
+*/
+   public function filter( $callback ) {
+   $suggestions = array_filter( $this->suggestions, $callback );
+   if ( count( $suggestions ) === count( $this->suggestions ) ) {
+   return $this;
+   } else {
+   return new self( $suggestions );
+   }
+   }
/**
 * Add a new suggestion at the end.
 * If the score of the new suggestion is greater than the worst one,
@@ -171,6 +184,13 @@
}
 
/**
+* @return int The number of suggestions held
+*/
+   public function count() {
+   return count( $this->suggestions );
+   }
+
+   /**
 * Builds a new set of suggestion based on a title array.
 * Useful when using a backend that supports only Titles.
 *

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: icons: Add 'stop' icon to Apex theme

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

Change subject: icons: Add 'stop' icon to Apex theme
..

icons: Add 'stop' icon to Apex theme

Bug: T170730
Change-Id: I4f4e9bc943f6c7d6f931478edfa5f5a458993d01
---
M src/themes/apex/icons-media.json
A src/themes/apex/images/icons/stop.svg
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/91/398191/1

diff --git a/src/themes/apex/icons-media.json b/src/themes/apex/icons-media.json
index dc4ca10..f7d9411 100644
--- a/src/themes/apex/icons-media.json
+++ b/src/themes/apex/icons-media.json
@@ -11,6 +11,7 @@
"play": { "file": {
"ltr": "images/icons/play-ltr.svg",
"rtl": "images/icons/play-rtl.svg"
-   } }
+   } },
+   "stop": { "file": "images/icons/stop.svg" }
}
 }
diff --git a/src/themes/apex/images/icons/stop.svg 
b/src/themes/apex/images/icons/stop.svg
new file mode 100644
index 000..f7c7c63
--- /dev/null
+++ b/src/themes/apex/images/icons/stop.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+   
+

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Greetings fixes (already upstreamed)

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

Change subject: Greetings fixes (already upstreamed)
..

Greetings fixes (already upstreamed)

https://github.com/civicrm/civicrm-core/pull/11313/commits

CRM-21471 remove unused core function CRM_Core_Pseudoconstant::greetingDefaults

Bug: T156193
Change-Id: I26e7800e2ad1850aeda9731b989f2deeffe87b59
---
M CRM/Contact/BAO/Contact.php
M CRM/Core/PseudoConstant.php
2 files changed, 11 insertions(+), 75 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/90/398190/1

diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php
index f9edbba..5689082 100644
--- a/CRM/Contact/BAO/Contact.php
+++ b/CRM/Contact/BAO/Contact.php
@@ -2687,15 +2687,8 @@
*
* @param object $contact
*   Contact object after save.
-   * @param bool $useDefaults
-   *   Use default greeting values.
*/
-  public static function processGreetings(&$contact, $useDefaults = FALSE) {
-if ($useDefaults) {
-  //retrieve default greetings
-  $defaultGreetings = CRM_Core_PseudoConstant::greetingDefaults();
-  $contactDefaults = $defaultGreetings[$contact->contact_type];
-}
+  public static function processGreetings(&$contact) {
 
 // note that contact object not always has required greeting related
 // fields that are required to calculate greeting and
@@ -2729,14 +2722,7 @@
   $updateQueryString[] = " email_greeting_custom = NULL ";
 }
 else {
-  if ($useDefaults) {
-reset($contactDefaults['email_greeting']);
-$emailGreetingID = key($contactDefaults['email_greeting']);
-$emailGreetingString = 
$contactDefaults['email_greeting'][$emailGreetingID];
-$updateQueryString[] = " email_greeting_id = $emailGreetingID ";
-$updateQueryString[] = " email_greeting_custom = NULL ";
-  }
-  elseif ($contact->email_greeting_custom) {
+  if ($contact->email_greeting_custom) {
 $updateQueryString[] = " email_greeting_display = NULL ";
   }
 }
@@ -2765,14 +2751,7 @@
   $updateQueryString[] = " postal_greeting_custom = NULL ";
 }
 else {
-  if ($useDefaults) {
-reset($contactDefaults['postal_greeting']);
-$postalGreetingID = key($contactDefaults['postal_greeting']);
-$postalGreetingString = 
$contactDefaults['postal_greeting'][$postalGreetingID];
-$updateQueryString[] = " postal_greeting_id = $postalGreetingID ";
-$updateQueryString[] = " postal_greeting_custom = NULL ";
-  }
-  elseif ($contact->postal_greeting_custom) {
+  if ($contact->postal_greeting_custom) {
 $updateQueryString[] = " postal_greeting_display = NULL ";
   }
 }
@@ -2802,14 +2781,7 @@
   $updateQueryString[] = " addressee_custom = NULL ";
 }
 else {
-  if ($useDefaults) {
-reset($contactDefaults['addressee']);
-$addresseeID = key($contactDefaults['addressee']);
-$addresseeString = $contactDefaults['addressee'][$addresseeID];
-$updateQueryString[] = " addressee_id = $addresseeID ";
-$updateQueryString[] = " addressee_custom = NULL ";
-  }
-  elseif ($contact->addressee_custom) {
+  if ($contact->addressee_custom) {
 $updateQueryString[] = " addressee_display = NULL ";
   }
 }
diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php
index abf51f1..96fa655 100644
--- a/CRM/Core/PseudoConstant.php
+++ b/CRM/Core/PseudoConstant.php
@@ -156,12 +156,6 @@
   private static $greeting;
 
   /**
-   * Default Greetings
-   * @var array
-   */
-  private static $greetingDefaults;
-
-  /**
* Extensions of type module
* @var array
*/
@@ -1679,6 +1673,10 @@
*   array reference of all greetings.
*/
   public static function greeting($filter, $columnName = 'label') {
+if (!isset(Civi::$statics[__CLASS__]['greeting'])) {
+  Civi::$statics[__CLASS__]['greeting'] = array();
+}
+
 $index = $filter['greeting_type'] . '_' . $columnName;
 
 // also add contactType to the array
@@ -1687,11 +1685,7 @@
   $index .= '_' . $contactType;
 }
 
-if (NULL === self::$greeting) {
-  self::$greeting = array();
-}
-
-if (!CRM_Utils_Array::value($index, self::$greeting)) {
+if (!CRM_Utils_Array::value($index, 
Civi::$statics[__CLASS__]['greeting'])) {
   $filterCondition = NULL;
   if ($contactType) {
 $filterVal = 'v.filter =';
@@ -1711,40 +1705,10 @@
 $filterCondition .= "AND (v.filter = 0 OR {$filterVal}) ";
   }
 
-  self::$greeting[$index] = 
CRM_Core_OptionGroup::values($filter['greeting_type'], NULL, NULL, NULL, 
$filterCondition, $columnName);
+  Civi::$statics[__CLASS__]['greeting'][$index] = 
CRM_Core_OptionGroup::values($filter['greeting_type'], NULL, NULL, NULL, 
$filterCondition, $columnName);
 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Template syntax w/ empty link target shouldn't be considered...

2017-12-13 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398189 )

Change subject: Template syntax w/ empty link target shouldn't be considered 
broken
..

Template syntax w/ empty link target shouldn't be considered broken

The spec at https://www.mediawiki.org/wiki/Preprocessor_ABNF says the
link target can be zero or more xml characters.

This improves both the render and parse time for enwiki/User:Pdebee

Bug: T143378
Change-Id: Iaf7221571b79dfbe5d1f32be9476ff0b2d8ac821
---
M lib/wt2html/pegTokenizer.pegjs
M tests/parserTests.txt
2 files changed, 14 insertions(+), 1 deletion(-)


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

diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index e1bd3f9..17495b2 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -890,7 +890,7 @@
   params.unshift(new KV(tu.flattenIfArray(target.tokens), '', 
target.srcOffsets));
   var obj = new SelfclosingTagTk('template', params, { tsr: tsrOffsets(), 
src: text() });
   return obj;
-} / $('{{' space_or_newline+ '}}')
+} / $('{{' space_or_newline* '}}')
 
 tplarg
   = stopLen:("" { return stops.push('preproc', /* {{ */'}}'); })
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index c729776..0e234de 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -12633,6 +12633,19 @@
 
 !! end
 
+!! test
+Preprocessor precedence 17: template w/o target shouldn't prevent closing
+!! options
+parsoid=wt2html
+!! wikitext
+{{echo|hi {{
+!! html/php
+hi {{}}
+
+!! html/parsoid
+hi {{}}
+!! end
+
 ###
 ### Token Stream Patcher tests
 ###

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf7221571b79dfbe5d1f32be9476ff0b2d8ac821
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] wikimedia...civicrm[master]: Greetings fixes to support contact type change.

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

Change subject: Greetings fixes to support contact type change.
..

Greetings fixes to support contact type change.

2 commits from https://github.com/civicrm/civicrm-core/pull/11310

CRM-21466 - Fix (obscure) enotice when updating greeting for contact, add test
CRM-21466 follow up, add unit test to ensure custom fields can be populated.

This involves fixing the caching to be flushed during testing

Change-Id: Ic296f2b37a8ea169b93df314b95d2502d2e2b3f1
---
M CRM/Core/OptionGroup.php
M CRM/Core/PseudoConstant.php
M CRM/Utils/Token.php
M api/v3/Contact.php
4 files changed, 16 insertions(+), 11 deletions(-)


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

diff --git a/CRM/Core/OptionGroup.php b/CRM/Core/OptionGroup.php
index 89c8eb1..250c93c 100644
--- a/CRM/Core/OptionGroup.php
+++ b/CRM/Core/OptionGroup.php
@@ -676,6 +676,12 @@
 );
   }
 
+  /**
+   * Flush all the places where option values are cached.
+   *
+   * Note that this is called from CRM_Core_PseudoConstant::flush() so we 
should resist
+   * the intuitive urge to flush that class.
+   */
   public static function flushAll() {
 self::$_values = array();
 self::$_cache = array();
diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php
index 75793c8..abf51f1 100644
--- a/CRM/Core/PseudoConstant.php
+++ b/CRM/Core/PseudoConstant.php
@@ -594,6 +594,9 @@
 }
 if ($name == 'cache') {
   CRM_Core_OptionGroup::flushAll();
+  if (isset(\Civi::$statics[__CLASS__])) {
+unset(\Civi::$statics[__CLASS__]);
+  }
 }
   }
 
diff --git a/CRM/Utils/Token.php b/CRM/Utils/Token.php
index 257a1b1..8e43fd2 100644
--- a/CRM/Utils/Token.php
+++ b/CRM/Utils/Token.php
@@ -657,17 +657,14 @@
 $returnBlankToken = FALSE,
 $escapeSmarty = FALSE
   ) {
+// Refresh contact tokens in case they have changed. There is heavy caching
+// in exportable fields so there is no benefit in doing this conditionally.
+self::$_tokens['contact'] = array_merge(
+  array_keys(CRM_Contact_BAO_Contact::exportableFields('All')),
+  array('checksum', 'contact_id')
+);
+
 $key = 'contact';
-if (self::$_tokens[$key] == NULL) {
-  // This should come from UF
-
-  self::$_tokens[$key]
-= array_merge(
-  array_keys(CRM_Contact_BAO_Contact::exportableFields('All')),
-  array('checksum', 'contact_id')
-);
-}
-
 // here we intersect with the list of pre-configured valid tokens
 // so that we remove anything we do not recognize
 // I hope to move this step out of here soon and
diff --git a/api/v3/Contact.php b/api/v3/Contact.php
index 2d1da21..b671106 100644
--- a/api/v3/Contact.php
+++ b/api/v3/Contact.php
@@ -623,7 +623,6 @@
 
 $nullValue = FALSE;
 $filter = array(
-  'contact_type' => $params['contact_type'],
   'greeting_type' => "{$key}{$greeting}",
 );
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Allow resetting highlight query back to null

2017-12-13 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398187 )

Change subject: Allow resetting highlight query back to null
..

Allow resetting highlight query back to null

Change-Id: Ia40a7c0c9e016ee2a9883b66da094ad3c1b7bd90
---
M includes/Search/SearchContext.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/Search/SearchContext.php 
b/includes/Search/SearchContext.php
index cbdc984..b656fa9 100644
--- a/includes/Search/SearchContext.php
+++ b/includes/Search/SearchContext.php
@@ -529,7 +529,7 @@
 * @param AbstractQuery $query Query that should be used for 
highlighting if different
 *  from the query used for selecting.
 */
-   public function setHighlightQuery( AbstractQuery $query ) {
+   public function setHighlightQuery( AbstractQuery $query = null ) {
$this->isDirty = true;
$this->highlightQuery = $query;
}

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: parsercache: remove ganglia from parsercache nodes

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

Change subject: parsercache: remove ganglia from parsercache nodes
..


parsercache: remove ganglia from parsercache nodes

follow-up and same intention as c1dbcd85f19ad6e941223,
but we can't apply things to pc* hosts via role
because they don't use the role keyword in site.pp
so we have to do this for each hostname.

Bug: T177225
Change-Id: I479a0bea968d4b114abc1ee8e015a6ee365166b4
---
A hieradata/hosts/pc1004.yaml
A hieradata/hosts/pc1005.yaml
A hieradata/hosts/pc1006.yaml
A hieradata/hosts/pc2004.yaml
A hieradata/hosts/pc2005.yaml
A hieradata/hosts/pc2006.yaml
6 files changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/hieradata/hosts/pc1004.yaml b/hieradata/hosts/pc1004.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc1004.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false
diff --git a/hieradata/hosts/pc1005.yaml b/hieradata/hosts/pc1005.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc1005.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false
diff --git a/hieradata/hosts/pc1006.yaml b/hieradata/hosts/pc1006.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc1006.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false
diff --git a/hieradata/hosts/pc2004.yaml b/hieradata/hosts/pc2004.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc2004.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false
diff --git a/hieradata/hosts/pc2005.yaml b/hieradata/hosts/pc2005.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc2005.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false
diff --git a/hieradata/hosts/pc2006.yaml b/hieradata/hosts/pc2006.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc2006.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I479a0bea968d4b114abc1ee8e015a6ee365166b4
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
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]: Track which namespaces edit conflicts are resolved in

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

Change subject: Track which namespaces edit conflicts are resolved in
..


Track which namespaces edit conflicts are resolved in

This is similar to the tracking of the occourance of
edit conflicts but tracks the resolution of the conflicts.

Bug: T182011
Change-Id: I9a0c05dc921946fb6e0580b56b663783ca0b1b6e
---
M includes/editpage/TextConflictHelper.php
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  WMDE-Fisch: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/editpage/TextConflictHelper.php 
b/includes/editpage/TextConflictHelper.php
index b1eaa4b..6e7e7ee 100644
--- a/includes/editpage/TextConflictHelper.php
+++ b/includes/editpage/TextConflictHelper.php
@@ -140,6 +140,15 @@
 */
public function incrementResolvedStats() {
$this->stats->increment( 'edit.failures.conflict.resolved' );
+   // Only include 'standard' namespaces to avoid creating unknown 
numbers of statsd metrics
+   if (
+   $this->title->getNamespace() >= NS_MAIN &&
+   $this->title->getNamespace() <= NS_CATEGORY_TALK
+   ) {
+   $this->stats->increment(
+   
'edit.failures.conflict.resolved.byNamespaceId.' . $this->title->getNamespace()
+   );
+   }
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a0c05dc921946fb6e0580b56b663783ca0b1b6e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: WMDE-Fisch 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: parsercache: remove ganglia from parsercache nodes

2017-12-13 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398186 )

Change subject: parsercache: remove ganglia from parsercache nodes
..

parsercache: remove ganglia from parsercache nodes

follow-up and same intention as c1dbcd85f19ad6e941223,
but we can't apply things to pc* hosts via role
because they don't use the role keyword in site.pp
so we have to do this for each hostname.

Bug: T177225
Change-Id: I479a0bea968d4b114abc1ee8e015a6ee365166b4
---
A hieradata/hosts/pc1004.yaml
A hieradata/hosts/pc1005.yaml
A hieradata/hosts/pc1006.yaml
A hieradata/hosts/pc2004.yaml
A hieradata/hosts/pc2005.yaml
A hieradata/hosts/pc2006.yaml
6 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/398186/1

diff --git a/hieradata/hosts/pc1004.yaml b/hieradata/hosts/pc1004.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc1004.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false
diff --git a/hieradata/hosts/pc1005.yaml b/hieradata/hosts/pc1005.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc1005.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false
diff --git a/hieradata/hosts/pc1006.yaml b/hieradata/hosts/pc1006.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc1006.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false
diff --git a/hieradata/hosts/pc2004.yaml b/hieradata/hosts/pc2004.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc2004.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false
diff --git a/hieradata/hosts/pc2005.yaml b/hieradata/hosts/pc2005.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc2005.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false
diff --git a/hieradata/hosts/pc2006.yaml b/hieradata/hosts/pc2006.yaml
new file mode 100644
index 000..49549d1
--- /dev/null
+++ b/hieradata/hosts/pc2006.yaml
@@ -0,0 +1 @@
+standard::has_ganglia: false

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I479a0bea968d4b114abc1ee8e015a6ee365166b4
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...MobileFrontend[master]: Don't make small slider icons on MMV overlay

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

Change subject: Don't make small slider icons on MMV overlay
..

Don't make small slider icons on MMV overlay

Slider icons on MMV overlay should be bigger regarding older
design template.

Bug: T108657
Change-Id: If049386428017aeb0db2aa7db90cc84e2bc8a492
---
M resources/mobile.mediaViewer/ImageOverlay.js
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/resources/mobile.mediaViewer/ImageOverlay.js 
b/resources/mobile.mediaViewer/ImageOverlay.js
index c4f90f8..80925e0 100644
--- a/resources/mobile.mediaViewer/ImageOverlay.js
+++ b/resources/mobile.mediaViewer/ImageOverlay.js
@@ -52,12 +52,10 @@
licenseLinkMsg: mw.msg( 
'mobile-frontend-media-license-link' ),
thumbnails: [],
slideLeftButton: new Icon( {
-   isSmall: true,
rotation: 90,
name: 'arrow-invert'
} ).toHtmlString(),
slideRightButton: new Icon( {
-   isSmall: true,
rotation: -90,
name: 'arrow-invert'
} ).toHtmlString()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If049386428017aeb0db2aa7db90cc84e2bc8a492
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] operations/puppet[production]: mariadb::parsercache: remove ganglia

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

Change subject: mariadb::parsercache: remove ganglia
..


mariadb::parsercache: remove ganglia

Bug: T177225
Change-Id: I54861dd045cbf0da97a8d412b78aeac969d647fb
---
M hieradata/role/common/mariadb/parsercache.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/role/common/mariadb/parsercache.yaml 
b/hieradata/role/common/mariadb/parsercache.yaml
index 4bfa7b0..1648372 100644
--- a/hieradata/role/common/mariadb/parsercache.yaml
+++ b/hieradata/role/common/mariadb/parsercache.yaml
@@ -1 +1,2 @@
 monitor_screens: false
+standard::has_ganglia: false

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add unit test for logging the warning if section validation ...

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

Change subject: Add unit test for logging the warning if section validation 
fails
..


Add unit test for logging the warning if section validation fails

Bug: T182774
Change-Id: I4d1711b7f49fd43ae54d0b6ee56e850f9d039017
---
M lib/parsoidSectionsUsingSectionTags.js
M test/lib/parsoid/parsoid-sections-section-elements-tests.js
2 files changed, 24 insertions(+), 5 deletions(-)

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



diff --git a/lib/parsoidSectionsUsingSectionTags.js 
b/lib/parsoidSectionsUsingSectionTags.js
index c25b7e4..a30d537 100644
--- a/lib/parsoidSectionsUsingSectionTags.js
+++ b/lib/parsoidSectionsUsingSectionTags.js
@@ -135,6 +135,7 @@
 getSectionsText,
 testing: {
 parseSections: traverseDF,
-shouldLogInvalidSectionWarning
+shouldLogInvalidSectionWarning,
+validatePreviousSection
 }
 };
diff --git a/test/lib/parsoid/parsoid-sections-section-elements-tests.js 
b/test/lib/parsoid/parsoid-sections-section-elements-tests.js
index ecfb94c..36d8644 100644
--- a/test/lib/parsoid/parsoid-sections-section-elements-tests.js
+++ b/test/lib/parsoid/parsoid-sections-section-elements-tests.js
@@ -4,8 +4,10 @@
 
 const assert = require('../../utils/assert.js');
 const domino = require('domino');
+const sinon = require('sinon');
 const parsoidSectionsUsingSectionTags = 
require('../../../lib/parsoidSectionsUsingSectionTags');
 const shouldWarn = 
parsoidSectionsUsingSectionTags.testing.shouldLogInvalidSectionWarning;
+const validatePreviousSection = 
parsoidSectionsUsingSectionTags.testing.validatePreviousSection;
 
 describe('lib:parsoid-sections (section elements)', function() {
 
@@ -126,9 +128,9 @@
 assert.ok(!shouldWarn(allSections[0]));
 });
 
-it('should warn for non-lead section without heading tag', () => {
-const allSections = [ { id: 0 }, { id: 1 } ];
-assert.ok(shouldWarn(allSections[1]));
+it('should warn for non-lead section without heading properties', () => {
+const allSectionsWithoutHeadingProps = [ { id: 0 }, { id: 1 } ];
+assert.ok(shouldWarn(allSectionsWithoutHeadingProps[1]));
 });
 
 it('should not warn if id & anchor are found for all sections after the 
lead section', () => {
@@ -136,7 +138,7 @@
 assert.ok(!shouldWarn(allSections[1]));
 });
 
-it('should not warn for non-lead non-editable section without heading 
tag', () => {
+it('should not warn for non-lead non-editable section without heading 
properties', () => {
 const allSections = [ { id: 0 }, { id: -1 } ];
 assert.ok(!shouldWarn(allSections[1]));
 });
@@ -149,4 +151,20 @@
 it('should throw if sectionObj is invalid', () => {
 assert.throws(() => { shouldWarn(undefined); }, /TypeError/);
 });
+
+it('validatePreviousSection should log a warning if appropriate', () => {
+const logger = {
+log: sinon.stub()
+};
+const allSectionsWarn = [ { id: 0 }, { id: 1 } ];
+
+validatePreviousSection(logger, allSectionsWarn);
+assert.ok(logger.log.calledOnce);
+assert.deepEqual(logger.log.args,
+[[ 'warn', {
+warning: 'invalid_section',
+title: 'Found section without expected heading',
+detail: 'Cannot find heading for section number 1.'
+}]]);
+});
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d1711b7f49fd43ae54d0b6ee56e850f9d039017
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Ppchelko 
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...mobileapps[master]: Include H1 tags when evaluating sections

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

Change subject: Include H1 tags when evaluating sections
..


Include H1 tags when evaluating sections

After excluding sections with -1 and -2 IDs from warnings, all of the
remaining warnings I've seen involve sections with H1 headers, which we've
been excluding.  These are rare in the main namespace (with at least one
exception [1]) but rather common in other namespaces.[2]

This expands the logic to include H1 as well.

[1] https://ru.wikipedia.org/api/rest_v1/page/html/Kawasaki_Ki-61_Hien

[2]
https://en.wikipedia.org/api/rest_v1/page/html/Draft:West_Virginia_High_School_Football_State_Championships
https://en.wikipedia.org/api/rest_v1/page/html/User:Sarahj2107/Dashboard
https://en.wikipedia.org/api/rest_v1/page/html/User:Vicenarian/State_of_the_Wiki

Bug: T182774
Change-Id: I871225870eec478f4e6281b35b9d432a7f63b63e
---
M lib/parsoidSectionsUsingSectionTags.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/parsoidSectionsUsingSectionTags.js 
b/lib/parsoidSectionsUsingSectionTags.js
index 6fb3b72..c25b7e4 100644
--- a/lib/parsoidSectionsUsingSectionTags.js
+++ b/lib/parsoidSectionsUsingSectionTags.js
@@ -79,7 +79,7 @@
 allSections.push(sectionObj);
 state.pauseDescent = false;
 } else if (sectionObj && !sectionObj.anchor // heading info not yet filled 
out
-&& /^H[2-6]$/.test(node.tagName) // we're at a heading tag
+&& /^H[1-6]$/.test(node.tagName) // we're at a heading tag
 && node.parentNode.tagName === 'SECTION') { // direct descendant 
of a section
 sectionObj.toclevel = parseInt(node.tagName.charAt(1), 10) - 1;
 sectionObj.line = node.innerHTML.trim();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I871225870eec478f4e6281b35b9d432a7f63b63e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Ppchelko 
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...mobileapps[master]: Add unit test for logging the warning if section validation ...

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

Change subject: Add unit test for logging the warning if section validation 
fails
..

Add unit test for logging the warning if section validation fails

Bug: T182774
Change-Id: I4d1711b7f49fd43ae54d0b6ee56e850f9d039017
---
M lib/parsoidSectionsUsingSectionTags.js
M test/lib/parsoid/parsoid-sections-section-elements-tests.js
2 files changed, 24 insertions(+), 5 deletions(-)


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

diff --git a/lib/parsoidSectionsUsingSectionTags.js 
b/lib/parsoidSectionsUsingSectionTags.js
index 6fb3b72..39d53c9 100644
--- a/lib/parsoidSectionsUsingSectionTags.js
+++ b/lib/parsoidSectionsUsingSectionTags.js
@@ -135,6 +135,7 @@
 getSectionsText,
 testing: {
 parseSections: traverseDF,
-shouldLogInvalidSectionWarning
+shouldLogInvalidSectionWarning,
+validatePreviousSection
 }
 };
diff --git a/test/lib/parsoid/parsoid-sections-section-elements-tests.js 
b/test/lib/parsoid/parsoid-sections-section-elements-tests.js
index ecfb94c..36d8644 100644
--- a/test/lib/parsoid/parsoid-sections-section-elements-tests.js
+++ b/test/lib/parsoid/parsoid-sections-section-elements-tests.js
@@ -4,8 +4,10 @@
 
 const assert = require('../../utils/assert.js');
 const domino = require('domino');
+const sinon = require('sinon');
 const parsoidSectionsUsingSectionTags = 
require('../../../lib/parsoidSectionsUsingSectionTags');
 const shouldWarn = 
parsoidSectionsUsingSectionTags.testing.shouldLogInvalidSectionWarning;
+const validatePreviousSection = 
parsoidSectionsUsingSectionTags.testing.validatePreviousSection;
 
 describe('lib:parsoid-sections (section elements)', function() {
 
@@ -126,9 +128,9 @@
 assert.ok(!shouldWarn(allSections[0]));
 });
 
-it('should warn for non-lead section without heading tag', () => {
-const allSections = [ { id: 0 }, { id: 1 } ];
-assert.ok(shouldWarn(allSections[1]));
+it('should warn for non-lead section without heading properties', () => {
+const allSectionsWithoutHeadingProps = [ { id: 0 }, { id: 1 } ];
+assert.ok(shouldWarn(allSectionsWithoutHeadingProps[1]));
 });
 
 it('should not warn if id & anchor are found for all sections after the 
lead section', () => {
@@ -136,7 +138,7 @@
 assert.ok(!shouldWarn(allSections[1]));
 });
 
-it('should not warn for non-lead non-editable section without heading 
tag', () => {
+it('should not warn for non-lead non-editable section without heading 
properties', () => {
 const allSections = [ { id: 0 }, { id: -1 } ];
 assert.ok(!shouldWarn(allSections[1]));
 });
@@ -149,4 +151,20 @@
 it('should throw if sectionObj is invalid', () => {
 assert.throws(() => { shouldWarn(undefined); }, /TypeError/);
 });
+
+it('validatePreviousSection should log a warning if appropriate', () => {
+const logger = {
+log: sinon.stub()
+};
+const allSectionsWarn = [ { id: 0 }, { id: 1 } ];
+
+validatePreviousSection(logger, allSectionsWarn);
+assert.ok(logger.log.calledOnce);
+assert.deepEqual(logger.log.args,
+[[ 'warn', {
+warning: 'invalid_section',
+title: 'Found section without expected heading',
+detail: 'Cannot find heading for section number 1.'
+}]]);
+});
 });

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix Logger usage

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

Change subject: Fix Logger usage
..


Fix Logger usage

Change-Id: I2b037f5c98edf8c964548c011973924aa6ae14cb
---
M lib/parsoidSectionsUsingSectionTags.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/parsoidSectionsUsingSectionTags.js 
b/lib/parsoidSectionsUsingSectionTags.js
index ce27178..6fb3b72 100644
--- a/lib/parsoidSectionsUsingSectionTags.js
+++ b/lib/parsoidSectionsUsingSectionTags.js
@@ -53,7 +53,7 @@
 }
 
 if (shouldLogInvalidSectionWarning(sectionObj)) {
-logger.warn({
+logger.log('warn', {
 warning: 'invalid_section',
 title: 'Found section without expected heading',
 detail: `Cannot find heading for section number ${sectionObj.id}.`

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b037f5c98edf8c964548c011973924aa6ae14cb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add upload_by_url to extended uploaders on Commons

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

Change subject: Add upload_by_url to extended uploaders on Commons
..


Add upload_by_url to extended uploaders on Commons

Bug: T182534
Change-Id: Iaf9c3d7325d2ee493ec1252f58a72069cac76f75
---
M wmf-config/InitialiseSettings.php
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index e9bb750..b23109b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8263,7 +8263,12 @@
'autopatrolled' => [ 'autopatrol' => true ],
'filemover' => [ 'movefile' => true ],
'Image-reviewer' => [ 'autopatrol' => true, 'upload_by_url' => 
true ],
-   'extended-uploader' => [ 'autoconfirmed' => true, 'upload' => 
true, 'reupload' => true ],
+   'extended-uploader' => [
+   'autoconfirmed' => true,
+   'upload' => true,
+   'reupload' => true,
+   'upload_by_url' => true, // T182534
+   ],
'sysop' => [
'changetags' => true, // T134196
'upload_by_url' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf9c3d7325d2ee493ec1252f58a72069cac76f75
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jon Harald Søby 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jon Harald Søby 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Steinsplitter 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add Icelandic dictionary for ORES on iswiki

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

Change subject: Add Icelandic dictionary for ORES on iswiki
..


Add Icelandic dictionary for ORES on iswiki

Bug: T181099
Change-Id: I8d530766382da3467db640b94f721b8ad44e1f34
---
M modules/ores/manifests/base.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/ores/manifests/base.pp b/modules/ores/manifests/base.pp
index 2a8d811..8fb1d7a 100644
--- a/modules/ores/manifests/base.pp
+++ b/modules/ores/manifests/base.pp
@@ -32,6 +32,7 @@
 'myspell-fr',
 'myspell-he',
 'myspell-hu',
+'aspell-is',
 'myspell-it',
 'myspell-lv',
 'myspell-nb',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d530766382da3467db640b94f721b8ad44e1f34
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Awight 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Halfak 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Update en/i18n message for multiple-unclosed-formatting-tags

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

Change subject: Update en/i18n message for multiple-unclosed-formatting-tags
..


Update en/i18n message for multiple-unclosed-formatting-tags

* Looks like I missed other instances :(

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

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



diff --git a/i18n/en.json b/i18n/en.json
index e6a9b10..2ef9756 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -52,8 +52,8 @@
"linter-category-html5-misnesting-desc": "These misnested tags will 
behave differently in HTML5 compared to HTML4.",
"linter-category-tidy-font-bug": "Tidy bug affecting font tags wrapping 
links",
"linter-category-tidy-font-bug-desc": "Tidy moves these font tags 
inside links to change link colour",
-   "linter-category-multiple-unclosed-formatting-tags": "Multiple unclosed 
small or big tags",
-   "linter-category-multiple-unclosed-formatting-tags-desc": "These pages 
have multiple unclosed small or big tags",
+   "linter-category-multiple-unclosed-formatting-tags": "Multiple unclosed 
formatting tags",
+   "linter-category-multiple-unclosed-formatting-tags-desc": "These pages 
have multiple unclosed formatting tags",
"linter-category-unclosed-quotes-in-heading": "Unclosed quote in 
heading",
"linter-category-unclosed-quotes-in-heading-desc": "These pages have an 
unclosed quote in a heading, which then leaks out of the table of contents.",
"linter-category-multiline-html-table-in-list": "Multiline table in 
list",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If28d3127ca93af575d8b7c2b8e1539efde0639c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Revert "Revert "Update section validation logic""

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

Change subject: Revert "Revert "Update section validation logic""
..


Revert "Revert "Update section validation logic""

This reverts commit ebb87374b3c69ff6a3a71dffaf4e1e64af9b.

It's easier to see what has changed from the previous solution
if we split up the changes into two commits. I'm also going to add
a unit test for the log call.

Change-Id: I2394ee5d14b7cb83f329c7f17e735a8f8d6342f9
---
M lib/parsoid-access.js
M lib/parsoidSections.js
M lib/parsoidSectionsUsingSectionTags.js
M test/lib/parsoid/parsoid-sections-section-elements-tests.js
4 files changed, 57 insertions(+), 31 deletions(-)

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



diff --git a/lib/parsoid-access.js b/lib/parsoid-access.js
index 338ce33..3ae3308 100644
--- a/lib/parsoid-access.js
+++ b/lib/parsoid-access.js
@@ -119,7 +119,7 @@
 transforms.stripUnneededMarkup(doc, legacy);
 parsoidSections.addSectionDivs(doc);
 
-page.sections = parsoidSections.getSectionsText(doc);
+page.sections = parsoidSections.getSectionsText(doc, req.logger);
 return page;
 });
 }
diff --git a/lib/parsoidSections.js b/lib/parsoidSections.js
index dcdbb72..f8e21d6 100644
--- a/lib/parsoidSections.js
+++ b/lib/parsoidSections.js
@@ -27,13 +27,14 @@
  * Gets the sections array, including HTML string and metadata for all sections
  * (id, anchor, line, toclevel).
  * @param {!document} doc the parsed DOM Document of the Parsoid output
+ * @param {!Logger} logger the app's bunyan logger
  * @return {!sections[]} an array of section JSON elements
  */
-function getSectionsText(doc) {
+function getSectionsText(doc, logger) {
 if (!hasParsoidSections(doc)) {
 return parsoidSectionsUsingDivs.getSectionsText(doc);
 } else {
-return parsoidSectionsUsingSectionTags.getSectionsText(doc);
+return parsoidSectionsUsingSectionTags.getSectionsText(doc, logger);
 }
 }
 
diff --git a/lib/parsoidSectionsUsingSectionTags.js 
b/lib/parsoidSectionsUsingSectionTags.js
index 76e471d..ce27178 100644
--- a/lib/parsoidSectionsUsingSectionTags.js
+++ b/lib/parsoidSectionsUsingSectionTags.js
@@ -1,8 +1,6 @@
 'use strict';
 
 const parsoidDomUtils = require('parsoid-dom-utils');
-// const sUtil = require('./util');
-// const HTTPError = sUtil.HTTPError;
 const NodeType = require('./nodeType');
 
 /**
@@ -39,7 +37,13 @@
 }
 }
 
-/* function throwIfPreviousSectionIsIncomplete(allSections, sectionObj) {
+// skip lead sections since they don't have headings;
+// no line and no anchor means incomplete section
+function shouldLogInvalidSectionWarning(sectionObj) {
+return sectionObj.id >= 1 && !sectionObj.line && !sectionObj.anchor;
+}
+
+function validatePreviousSection(logger, allSections, sectionObj) {
 if (allSections.length === 0) {
 return;
 }
@@ -47,30 +51,29 @@
 if (!sectionObj) {
 sectionObj = allSections[allSections.length - 1];
 }
-// skip lead sections since they don't have headings;
-// no line and no anchor means incomplete section
-if (allSections.length > 1 && !sectionObj.line && !sectionObj.anchor) {
-throw new HTTPError({
-status: 502,
-type: 'unsupported_section',
-title: 'Section structure not supported',
+
+if (shouldLogInvalidSectionWarning(sectionObj)) {
+logger.warn({
+warning: 'invalid_section',
+title: 'Found section without expected heading',
 detail: `Cannot find heading for section number ${sectionObj.id}.`
 });
 }
-} */
+}
 
 /**
  * Visits one DOM node. Do the stuff that needs to be done when a single DOM 
node is handled.
  * In this case, starts a new section object when a  tag is 
encountered that is a
  * direct descendant
+ * @param {!Logger} logger the app's bunyan logger
  * @param {!DOMNode} node the node to visit
  * @param {!Object[]} allSections the array containing the results
  * @param {!Object} state some state to pass around
  */
-function visit(node, allSections, state) {
+function visit(logger, node, allSections, state) {
 let sectionObj = allSections.length > 0 ? allSections[allSections.length - 
1] : undefined;
 if (node.tagName === 'SECTION') {
-// throwIfPreviousSectionIsIncomplete(allSections, sectionObj);
+validatePreviousSection(logger, allSections, sectionObj);
 
 sectionObj = { id: getSectionNumber(node), text: '' };
 allSections.push(sectionObj);
@@ -99,16 +102,17 @@
  * This started out with a traditional iterative DFS algorithm but added a 
boolean to stop
  * descending so we don't duplicate content since elsewhere outerHTML is used 
(which contains
  * content of sub-nodes).
+ * @param {!Logger} logger the app's bunyan logger
  * @param 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Revert "Revert "Update section validation logic""

2017-12-13 Thread BearND (Code Review)
Hello jenkins-bot, Mholloway,

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

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

to review the following change.


Change subject: Revert "Revert "Update section validation logic""
..

Revert "Revert "Update section validation logic""

This reverts commit ebb87374b3c69ff6a3a71dffaf4e1e64af9b.

It's easier to see what has changed from the previous solution
if we split up the changes into two commits. I'm also going to add
a unit test for the log call.

Change-Id: I2394ee5d14b7cb83f329c7f17e735a8f8d6342f9
---
M lib/parsoid-access.js
M lib/parsoidSections.js
M lib/parsoidSectionsUsingSectionTags.js
M test/lib/parsoid/parsoid-sections-section-elements-tests.js
4 files changed, 57 insertions(+), 31 deletions(-)


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

diff --git a/lib/parsoid-access.js b/lib/parsoid-access.js
index 338ce33..3ae3308 100644
--- a/lib/parsoid-access.js
+++ b/lib/parsoid-access.js
@@ -119,7 +119,7 @@
 transforms.stripUnneededMarkup(doc, legacy);
 parsoidSections.addSectionDivs(doc);
 
-page.sections = parsoidSections.getSectionsText(doc);
+page.sections = parsoidSections.getSectionsText(doc, req.logger);
 return page;
 });
 }
diff --git a/lib/parsoidSections.js b/lib/parsoidSections.js
index dcdbb72..f8e21d6 100644
--- a/lib/parsoidSections.js
+++ b/lib/parsoidSections.js
@@ -27,13 +27,14 @@
  * Gets the sections array, including HTML string and metadata for all sections
  * (id, anchor, line, toclevel).
  * @param {!document} doc the parsed DOM Document of the Parsoid output
+ * @param {!Logger} logger the app's bunyan logger
  * @return {!sections[]} an array of section JSON elements
  */
-function getSectionsText(doc) {
+function getSectionsText(doc, logger) {
 if (!hasParsoidSections(doc)) {
 return parsoidSectionsUsingDivs.getSectionsText(doc);
 } else {
-return parsoidSectionsUsingSectionTags.getSectionsText(doc);
+return parsoidSectionsUsingSectionTags.getSectionsText(doc, logger);
 }
 }
 
diff --git a/lib/parsoidSectionsUsingSectionTags.js 
b/lib/parsoidSectionsUsingSectionTags.js
index 76e471d..ce27178 100644
--- a/lib/parsoidSectionsUsingSectionTags.js
+++ b/lib/parsoidSectionsUsingSectionTags.js
@@ -1,8 +1,6 @@
 'use strict';
 
 const parsoidDomUtils = require('parsoid-dom-utils');
-// const sUtil = require('./util');
-// const HTTPError = sUtil.HTTPError;
 const NodeType = require('./nodeType');
 
 /**
@@ -39,7 +37,13 @@
 }
 }
 
-/* function throwIfPreviousSectionIsIncomplete(allSections, sectionObj) {
+// skip lead sections since they don't have headings;
+// no line and no anchor means incomplete section
+function shouldLogInvalidSectionWarning(sectionObj) {
+return sectionObj.id >= 1 && !sectionObj.line && !sectionObj.anchor;
+}
+
+function validatePreviousSection(logger, allSections, sectionObj) {
 if (allSections.length === 0) {
 return;
 }
@@ -47,30 +51,29 @@
 if (!sectionObj) {
 sectionObj = allSections[allSections.length - 1];
 }
-// skip lead sections since they don't have headings;
-// no line and no anchor means incomplete section
-if (allSections.length > 1 && !sectionObj.line && !sectionObj.anchor) {
-throw new HTTPError({
-status: 502,
-type: 'unsupported_section',
-title: 'Section structure not supported',
+
+if (shouldLogInvalidSectionWarning(sectionObj)) {
+logger.warn({
+warning: 'invalid_section',
+title: 'Found section without expected heading',
 detail: `Cannot find heading for section number ${sectionObj.id}.`
 });
 }
-} */
+}
 
 /**
  * Visits one DOM node. Do the stuff that needs to be done when a single DOM 
node is handled.
  * In this case, starts a new section object when a  tag is 
encountered that is a
  * direct descendant
+ * @param {!Logger} logger the app's bunyan logger
  * @param {!DOMNode} node the node to visit
  * @param {!Object[]} allSections the array containing the results
  * @param {!Object} state some state to pass around
  */
-function visit(node, allSections, state) {
+function visit(logger, node, allSections, state) {
 let sectionObj = allSections.length > 0 ? allSections[allSections.length - 
1] : undefined;
 if (node.tagName === 'SECTION') {
-// throwIfPreviousSectionIsIncomplete(allSections, sectionObj);
+validatePreviousSection(logger, allSections, sectionObj);
 
 sectionObj = { id: getSectionNumber(node), text: '' };
 allSections.push(sectionObj);
@@ -99,16 +102,17 @@
  * This started out with a traditional iterative DFS algorithm but added a 
boolean to stop
  * descending so we don't duplicate content since elsewhere outerHTML is used 
(which contains
  * content 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labsdb: Point DNS at equivalent web.db.svc.eqiad.wmflabs hosts

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

Change subject: labsdb: Point DNS at equivalent web.db.svc.eqiad.wmflabs hosts
..


labsdb: Point DNS at equivalent web.db.svc.eqiad.wmflabs hosts

Replace templated labsdb zone file with a static file that maps all
current wiki names from the wikimedia-config s*.dblist files as CNAMEs
of the appropriate s*.web.db.svc.eqiad.wmflabs service name.

Bug: T142807
Change-Id: Ib0351f0b8f12ef0476c8baf69153433722b8a182
---
D hieradata/common/profile/openstack/base/pdns/labsdb.yaml
A modules/profile/files/openstack/base/pdns/recursor/labsdb.zone
M modules/profile/manifests/openstack/base/pdns/recursor/service.pp
D modules/role/templates/labs/dns/db_aliases.erb
4 files changed, 938 insertions(+), 913 deletions(-)

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



diff --git a/hieradata/common/profile/openstack/base/pdns/labsdb.yaml 
b/hieradata/common/profile/openstack/base/pdns/labsdb.yaml
deleted file mode 100644
index fd17098..000
--- a/hieradata/common/profile/openstack/base/pdns/labsdb.yaml
+++ /dev/null
@@ -1,899 +0,0 @@
-# There are two old school replica servers (c1, c3 -- c2 is dead now).  The 
mapping of
-# "shards" (s1, etc.) and databases (enwiki, etc.) to these is
-# arbitrary in so much as all replicas have all the same data
-#  and can be adjusted to depool a server or redistribute load.
-
-profile::openstack::base::pdns::labsdb::c1:
-  - c1
-
-profile::openstack::base::pdns::labsdb::c2:
-  - c2
-
-profile::openstack::base::pdns::labsdb::c3:
-  - bgwiki
-  - bgwiktionary
-  - commonswiki
-  - cswiki
-  - enwiki
-  - enwikiquote
-  - enwiktionary
-  - eowiki
-  - fiwiki
-  - idwiki
-  - itwiki
-  - nlwiki
-  - nowiki
-  - plwiki
-  - ptwiki
-  - s1
-  - s2
-  - s4
-  - svwiki
-  - thwiki
-  - trwiki
-  - zhwiki
-  - aawiki
-  - aawikibooks
-  - aawiktionary
-  - abwiki
-  - abwiktionary
-  - acewiki
-  - advisorywiki
-  - adywiki
-  - afwiki
-  - afwikibooks
-  - afwikiquote
-  - afwiktionary
-  - akwiki
-  - akwikibooks
-  - akwiktionary
-  - alswiki
-  - alswikibooks
-  - alswikiquote
-  - alswiktionary
-  - amwiki
-  - amwikimedia
-  - amwikiquote
-  - amwiktionary
-  - angwiki
-  - angwikibooks
-  - angwikiquote
-  - angwikisource
-  - angwiktionary
-  - anwiki
-  - anwiktionary
-  - arcwiki
-  - arwiki
-  - arwikibooks
-  - arwikimedia
-  - arwikinews
-  - arwikiquote
-  - arwikisource
-  - arwikiversity
-  - arwiktionary
-  - arzwiki
-  - astwiki
-  - astwikibooks
-  - astwikiquote
-  - astwiktionary
-  - aswiki
-  - aswikibooks
-  - aswikisource
-  - aswiktionary
-  - atjwiki
-  - avwiki
-  - avwiktionary
-  - aywiki
-  - aywikibooks
-  - aywiktionary
-  - azbwiki
-  - azwiki
-  - azwikibooks
-  - azwikiquote
-  - azwikisource
-  - azwiktionary
-  - barwiki
-  - bat_smgwiki
-  - bawiki
-  - bawikibooks
-  - bclwiki
-  - bdwikimedia
-  - be_x_oldwiki
-  - betawikiversity
-  - bewiki
-  - bewikibooks
-  - bewikimedia
-  - bewikiquote
-  - bewikisource
-  - bewiktionary
-  - bgwikibooks
-  - bgwikinews
-  - bgwikiquote
-  - bgwikisource
-  - bhwiki
-  - bhwiktionary
-  - biwiki
-  - biwikibooks
-  - biwiktionary
-  - bjnwiki
-  - bmwiki
-  - bmwikibooks
-  - bmwikiquote
-  - bmwiktionary
-  - bnwiki
-  - bnwikibooks
-  - bnwikisource
-  - bnwiktionary
-  - bowiki
-  - bowikibooks
-  - bowiktionary
-  - bpywiki
-  - brwiki
-  - brwikimedia
-  - brwikiquote
-  - brwikisource
-  - brwiktionary
-  - bswiki
-  - bswikibooks
-  - bswikinews
-  - bswikiquote
-  - bswikisource
-  - bswiktionary
-  - bugwiki
-  - bxrwiki
-  - c3
-  - cawiki
-  - cawikibooks
-  - cawikimedia
-  - cawikinews
-  - cawikiquote
-  - cawikisource
-  - cawiktionary
-  - cbk_zamwiki
-  - cdowiki
-  - cebwiki
-  - centralauth
-  - cewiki
-  - chowiki
-  - chrwiki
-  - chrwiktionary
-  - chwiki
-  - chwikibooks
-  - chwiktionary
-  - chywiki
-  - ckbwiki
-  - cnwikimedia
-  - cowiki
-  - cowikibooks
-  - cowikimedia
-  - cowikiquote
-  - cowiktionary
-  - crhwiki
-  - crwiki
-  - crwikiquote
-  - crwiktionary
-  - csbwiki
-  - csbwiktionary
-  - cswikibooks
-  - cswikinews
-  - cswikiquote
-  - cswikisource
-  - cswikiversity
-  - cswiktionary
-  - cuwiki
-  - cvwiki
-  - cvwikibooks
-  - cywiki
-  - cywikibooks
-  - cywikiquote
-  - cywikisource
-  - cywiktionary
-  - dawiki
-  - dawikibooks
-  - dawikiquote
-  - dawikisource
-  - dawiktionary
-  - dewiki
-  - dewikibooks
-  - dewikinews
-  - dewikiquote
-  - dewikisource
-  - dewikiversity
-  - dewikivoyage
-  - dewiktionary
-  - diqwiki
-  - dkwikimedia
-  - donatewiki
-  - dsbwiki
-  - dtywiki
-  - dvwiki
-  - dvwiktionary
-  - dzwiki
-  - dzwiktionary
-  - eewiki
-  - elwiki
-  - elwikibooks
-  - elwikinews
-  - elwikiquote
-  - elwikisource
-  - elwikiversity
-  - elwikivoyage
-  - elwiktionary
-  - emlwiki
-  - enwikibooks
-  - enwikinews
-  - enwikisource
-  - enwikiversity
-  

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Include H1 tags when evaluating sections

2017-12-13 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398182 )

Change subject: Include H1 tags when evaluating sections
..

Include H1 tags when evaluating sections

After excluding sections with -1 and -2 IDs from warnings, all of the
remaining cases I've seen involve sections with H1 headers, which we've
been excluding.  These are rare in the main namespace (with at least one
exception [1]) but rather common in other namespaces.[2]

This expands the logic to include H1 as well.

[1] https://ru.wikipedia.org/api/rest_v1/page/html/Kawasaki_Ki-61_Hien

[2]
https://en.wikipedia.org/api/rest_v1/page/html/Draft:West_Virginia_High_School_Football_State_Championships
https://en.wikipedia.org/api/rest_v1/page/html/User:Sarahj2107/Dashboard
https://en.wikipedia.org/api/rest_v1/page/html/User:Vicenarian/State_of_the_Wiki

Bug: T182774
Change-Id: I871225870eec478f4e6281b35b9d432a7f63b63e
---
M lib/parsoidSectionsUsingSectionTags.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/parsoidSectionsUsingSectionTags.js 
b/lib/parsoidSectionsUsingSectionTags.js
index 6fb3b72..c25b7e4 100644
--- a/lib/parsoidSectionsUsingSectionTags.js
+++ b/lib/parsoidSectionsUsingSectionTags.js
@@ -79,7 +79,7 @@
 allSections.push(sectionObj);
 state.pauseDescent = false;
 } else if (sectionObj && !sectionObj.anchor // heading info not yet filled 
out
-&& /^H[2-6]$/.test(node.tagName) // we're at a heading tag
+&& /^H[1-6]$/.test(node.tagName) // we're at a heading tag
 && node.parentNode.tagName === 'SECTION') { // direct descendant 
of a section
 sectionObj.toclevel = parseInt(node.tagName.charAt(1), 10) - 1;
 sectionObj.line = node.innerHTML.trim();

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Update section validation logic, take 2

2017-12-13 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398181 )

Change subject: Update section validation logic, take 2
..

Update section validation logic, take 2

Updated to use the bunyan Logger class correctly! ;)

1) Log warnings rather than throwing errors, and
2) Only for sections with IDs >= 0 (i.e., not non-editable or pseudo-
   sections).

Bug: T182774
Change-Id: I2b037f5c98edf8c964548c011973924aa6ae14cb
---
M lib/parsoid-access.js
M lib/parsoidSections.js
M lib/parsoidSectionsUsingSectionTags.js
M test/lib/parsoid/parsoid-sections-section-elements-tests.js
4 files changed, 57 insertions(+), 31 deletions(-)


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

diff --git a/lib/parsoid-access.js b/lib/parsoid-access.js
index 338ce33..3ae3308 100644
--- a/lib/parsoid-access.js
+++ b/lib/parsoid-access.js
@@ -119,7 +119,7 @@
 transforms.stripUnneededMarkup(doc, legacy);
 parsoidSections.addSectionDivs(doc);
 
-page.sections = parsoidSections.getSectionsText(doc);
+page.sections = parsoidSections.getSectionsText(doc, req.logger);
 return page;
 });
 }
diff --git a/lib/parsoidSections.js b/lib/parsoidSections.js
index dcdbb72..f8e21d6 100644
--- a/lib/parsoidSections.js
+++ b/lib/parsoidSections.js
@@ -27,13 +27,14 @@
  * Gets the sections array, including HTML string and metadata for all sections
  * (id, anchor, line, toclevel).
  * @param {!document} doc the parsed DOM Document of the Parsoid output
+ * @param {!Logger} logger the app's bunyan logger
  * @return {!sections[]} an array of section JSON elements
  */
-function getSectionsText(doc) {
+function getSectionsText(doc, logger) {
 if (!hasParsoidSections(doc)) {
 return parsoidSectionsUsingDivs.getSectionsText(doc);
 } else {
-return parsoidSectionsUsingSectionTags.getSectionsText(doc);
+return parsoidSectionsUsingSectionTags.getSectionsText(doc, logger);
 }
 }
 
diff --git a/lib/parsoidSectionsUsingSectionTags.js 
b/lib/parsoidSectionsUsingSectionTags.js
index 76e471d..6fb3b72 100644
--- a/lib/parsoidSectionsUsingSectionTags.js
+++ b/lib/parsoidSectionsUsingSectionTags.js
@@ -1,8 +1,6 @@
 'use strict';
 
 const parsoidDomUtils = require('parsoid-dom-utils');
-// const sUtil = require('./util');
-// const HTTPError = sUtil.HTTPError;
 const NodeType = require('./nodeType');
 
 /**
@@ -39,7 +37,13 @@
 }
 }
 
-/* function throwIfPreviousSectionIsIncomplete(allSections, sectionObj) {
+// skip lead sections since they don't have headings;
+// no line and no anchor means incomplete section
+function shouldLogInvalidSectionWarning(sectionObj) {
+return sectionObj.id >= 1 && !sectionObj.line && !sectionObj.anchor;
+}
+
+function validatePreviousSection(logger, allSections, sectionObj) {
 if (allSections.length === 0) {
 return;
 }
@@ -47,30 +51,29 @@
 if (!sectionObj) {
 sectionObj = allSections[allSections.length - 1];
 }
-// skip lead sections since they don't have headings;
-// no line and no anchor means incomplete section
-if (allSections.length > 1 && !sectionObj.line && !sectionObj.anchor) {
-throw new HTTPError({
-status: 502,
-type: 'unsupported_section',
-title: 'Section structure not supported',
+
+if (shouldLogInvalidSectionWarning(sectionObj)) {
+logger.log('warn', {
+warning: 'invalid_section',
+title: 'Found section without expected heading',
 detail: `Cannot find heading for section number ${sectionObj.id}.`
 });
 }
-} */
+}
 
 /**
  * Visits one DOM node. Do the stuff that needs to be done when a single DOM 
node is handled.
  * In this case, starts a new section object when a  tag is 
encountered that is a
  * direct descendant
+ * @param {!Logger} logger the app's bunyan logger
  * @param {!DOMNode} node the node to visit
  * @param {!Object[]} allSections the array containing the results
  * @param {!Object} state some state to pass around
  */
-function visit(node, allSections, state) {
+function visit(logger, node, allSections, state) {
 let sectionObj = allSections.length > 0 ? allSections[allSections.length - 
1] : undefined;
 if (node.tagName === 'SECTION') {
-// throwIfPreviousSectionIsIncomplete(allSections, sectionObj);
+validatePreviousSection(logger, allSections, sectionObj);
 
 sectionObj = { id: getSectionNumber(node), text: '' };
 allSections.push(sectionObj);
@@ -99,16 +102,17 @@
  * This started out with a traditional iterative DFS algorithm but added a 
boolean to stop
  * descending so we don't duplicate content since elsewhere outerHTML is used 
(which contains
  * content of sub-nodes).
+ * @param {!Logger} logger the app's bunyan logger
  * @param {!DOMElement} 

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Update en/i18n message for multiple-unclosed-formatting-tags

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

Change subject: Update en/i18n message for multiple-unclosed-formatting-tags
..

Update en/i18n message for multiple-unclosed-formatting-tags

* Looks like I missed other instances :(

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Linter 
refs/changes/80/398180/1

diff --git a/i18n/en.json b/i18n/en.json
index e6a9b10..2ef9756 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -52,8 +52,8 @@
"linter-category-html5-misnesting-desc": "These misnested tags will 
behave differently in HTML5 compared to HTML4.",
"linter-category-tidy-font-bug": "Tidy bug affecting font tags wrapping 
links",
"linter-category-tidy-font-bug-desc": "Tidy moves these font tags 
inside links to change link colour",
-   "linter-category-multiple-unclosed-formatting-tags": "Multiple unclosed 
small or big tags",
-   "linter-category-multiple-unclosed-formatting-tags-desc": "These pages 
have multiple unclosed small or big tags",
+   "linter-category-multiple-unclosed-formatting-tags": "Multiple unclosed 
formatting tags",
+   "linter-category-multiple-unclosed-formatting-tags-desc": "These pages 
have multiple unclosed formatting tags",
"linter-category-unclosed-quotes-in-heading": "Unclosed quote in 
heading",
"linter-category-unclosed-quotes-in-heading-desc": "These pages have an 
unclosed quote in a heading, which then leaks out of the table of contents.",
"linter-category-multiline-html-table-in-list": "Multiline table in 
list",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If28d3127ca93af575d8b7c2b8e1539efde0639c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Change findHighlightedItem due to deprecation

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

Change subject: RCFilters: Change findHighlightedItem due to deprecation
..


RCFilters: Change findHighlightedItem due to deprecation

SelectWidget's getHighlightedItem was deprecated and switched with
findHighlightedItem, see T76630

Change-Id: I90535c9f72d9a63e8e8d4184cc85aaf77e7b454c
---
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
index 22c176f..5438589 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
@@ -332,7 +332,7 @@
 */
mw.rcfilters.ui.MenuSelectWidget.prototype.onKeyDown = function ( e ) {
var nextItem,
-   currentItem = this.getHighlightedItem() || 
this.getSelectedItem();
+   currentItem = this.findHighlightedItem() || 
this.getSelectedItem();
 
// Call parent

mw.rcfilters.ui.MenuSelectWidget.parent.prototype.onKeyDown.call( this, e );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90535c9f72d9a63e8e8d4184cc85aaf77e7b454c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[wmf/1.31.0-wmf.12]: Fix CheckUser type check thingy

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

Change subject: Fix CheckUser type check thingy
..


Fix CheckUser type check thingy

CheckUser changed in I39c60b2d059d1cb2c1c0d3a4206232d961536697

Bug: T182834
Change-Id: Id2634a5789c0fcb15bc551a08613a5d681d0ad85
---
M Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Hooks.php b/Hooks.php
index 0034c0b..7d22c40 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -556,7 +556,7 @@
}
}
 
-   public static function onSpecialCheckUserGetLinksFromRow( CheckUser 
$checkUser, $row, &$links ) {
+   public static function onSpecialCheckUserGetLinksFromRow( 
SpecialCheckUser $checkUser, $row, &$links ) {
if ( !$row->cuc_type == RC_FLOW ) {
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2634a5789c0fcb15bc551a08613a5d681d0ad85
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.31.0-wmf.12
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: icinga: fix check_disk options on lawrencium

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

Change subject: icinga: fix check_disk options on lawrencium
..


icinga: fix check_disk options on lawrencium

lawrencium is a (docker) test server, using role(test),
so it doesn't get custom check_disk options for docker
servers but because it has docker there will be an Icinga
alert for DISK space. See ticket.

Bug: T178454
Change-Id: Ifa008aa4e4c5fe3f3075fb7e240b3ecded7ffd26
---
M hieradata/hosts/lawrencium.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/hosts/lawrencium.yaml b/hieradata/hosts/lawrencium.yaml
index 7e96ec6..d7c3d2e 100644
--- a/hieradata/hosts/lawrencium.yaml
+++ b/hieradata/hosts/lawrencium.yaml
@@ -1,2 +1,3 @@
+profile::base::check_disk_options: -w 10% -c 5% -W 6% -K 3% -l -e -A -i 
/var/lib/docker/* -i /run/docker/netns/* --exclude-type=tracefs
 admin::groups:
   - perf-team

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[wmf/1.31.0-wmf.12]: Fix CheckUser type check thingy

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

Change subject: Fix CheckUser type check thingy
..

Fix CheckUser type check thingy

CheckUser changed in I39c60b2d059d1cb2c1c0d3a4206232d961536697

Bug: T182834
Change-Id: Id2634a5789c0fcb15bc551a08613a5d681d0ad85
---
M Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/Hooks.php b/Hooks.php
index 0034c0b..7d22c40 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -556,7 +556,7 @@
}
}
 
-   public static function onSpecialCheckUserGetLinksFromRow( CheckUser 
$checkUser, $row, &$links ) {
+   public static function onSpecialCheckUserGetLinksFromRow( 
SpecialCheckUser $checkUser, $row, &$links ) {
if ( !$row->cuc_type == RC_FLOW ) {
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2634a5789c0fcb15bc551a08613a5d681d0ad85
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.31.0-wmf.12
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Fix CheckUser type check thingy

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

Change subject: Fix CheckUser type check thingy
..

Fix CheckUser type check thingy

CheckUser changed in I39c60b2d059d1cb2c1c0d3a4206232d961536697

Bug: T182834
Change-Id: Id2634a5789c0fcb15bc551a08613a5d681d0ad85
---
M Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/Hooks.php b/Hooks.php
index 0034c0b..7d22c40 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -556,7 +556,7 @@
}
}
 
-   public static function onSpecialCheckUserGetLinksFromRow( CheckUser 
$checkUser, $row, &$links ) {
+   public static function onSpecialCheckUserGetLinksFromRow( 
SpecialCheckUser $checkUser, $row, &$links ) {
if ( !$row->cuc_type == RC_FLOW ) {
return true;
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Convert includes/Feed.php to Mustache templates

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

Change subject: Convert includes/Feed.php to Mustache templates
..


Convert includes/Feed.php to Mustache templates

Bug: T182212
Change-Id: Ic198efb6a46ecc2d8b8b49ab594205d69a03efdb
---
M includes/Feed.php
A includes/templates/AtomHeader.mustache
A includes/templates/AtomItem.mustache
A includes/templates/RSSHeader.mustache
A includes/templates/RSSItem.mustache
5 files changed, 169 insertions(+), 71 deletions(-)

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



diff --git a/includes/Feed.php b/includes/Feed.php
index 35f2ce9..0e715df 100644
--- a/includes/Feed.php
+++ b/includes/Feed.php
@@ -84,13 +84,23 @@
}
 
/**
-* Get the unique id of this item
-*
+* Get the unique id of this item; already xml-encoded
 * @return string
 */
-   public function getUniqueId() {
+   public function getUniqueID() {
+   $id = $this->getUniqueIDUnescaped();
+   if ( $id ) {
+   return $this->xmlEncode( $id );
+   }
+   }
+
+   /**
+* Get the unique id of this item, without any escaping
+* @return string
+*/
+   public function getUniqueIdUnescaped() {
if ( $this->uniqueId ) {
-   return $this->xmlEncode( wfExpandUrl( $this->uniqueId, 
PROTO_CURRENT ) );
+   return wfExpandUrl( $this->uniqueId, PROTO_CURRENT );
}
}
 
@@ -123,6 +133,14 @@
return $this->xmlEncode( $this->url );
}
 
+   /** Get the URL of this item without any escaping
+*
+* @return string
+*/
+   public function getUrlUnescaped() {
+   return $this->url;
+   }
+
/**
 * Get the description of this item; already xml-encoded
 *
@@ -130,6 +148,14 @@
 */
public function getDescription() {
return $this->xmlEncode( $this->description );
+   }
+
+   /**
+* Get the description of this item without any escaping
+*
+*/
+   public function getDescriptionUnescaped() {
+   return $this->description;
}
 
/**
@@ -161,12 +187,30 @@
}
 
/**
+* Get the author of this item without any escaping
+*
+* @return string
+*/
+   public function getAuthorUnescaped() {
+   return $this->author;
+   }
+
+   /**
 * Get the comment of this item; already xml-encoded
 *
 * @return string
 */
public function getComments() {
return $this->xmlEncode( $this->comments );
+   }
+
+   /**
+* Get the comment of this item without any escaping
+*
+* @return string
+*/
+   public function getCommentsUnescaped() {
+   return $this->comments;
}
 
/**
@@ -187,6 +231,23 @@
  * @ingroup Feed
  */
 abstract class ChannelFeed extends FeedItem {
+
+   /** @var TemplateParser */
+   protected $templateParser;
+
+   /**
+* @param string|Title $title Feed's title
+* @param string $description
+* @param string $url URL uniquely designating the feed.
+* @param string $date Feed's date
+* @param string $author Author's user name
+* @param string $comments
+*/
+   function __construct( $title, $description, $url, $date = '', $author = 
'', $comments = '' ) {
+   parent::__construct( $title, $description, $url, $date, 
$author, $comments );
+   $this->templateParser = new TemplateParser();
+   }
+
/**
 * Generate Header of the feed
 * @par Example:
@@ -279,13 +340,15 @@
 class RSSFeed extends ChannelFeed {
 
/**
-* Format a date given a timestamp
+* Format a date given a timestamp. If a timestamp is not given, 
nothing is returned
 *
-* @param int $ts Timestamp
-* @return string Date string
+* @param int|null $ts Timestamp
+* @return string|null Date string
 */
function formatTime( $ts ) {
-   return gmdate( 'D, d M Y H:i:s \G\M\T', wfTimestamp( TS_UNIX, 
$ts ) );
+   if ( $ts ) {
+   return gmdate( 'D, d M Y H:i:s \G\M\T', wfTimestamp( 
TS_UNIX, $ts ) );
+   }
}
 
/**
@@ -295,15 +358,17 @@
global $wgVersion;
 
$this->outXmlHeader();
-   ?>http://purl.org/dc/elements/1.1/;>
-   
-   getTitle() ?>
-   getUrl(), PROTO_CURRENT ) 
?>
-   getDescription() 
?>
-   getLanguage() ?>
-   MediaWiki 
-   formatTime( 

[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Revert "Rename classes to match file names"

2017-12-13 Thread Reedy (Code Review)
Hello Umherirrender, Huji, jenkins-bot, Thiemo Mättig (WMDE),

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

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

to review the following change.


Change subject: Revert "Rename classes to match file names"
..

Revert "Rename classes to match file names"

This reverts commit 6ab26d6e47f7526708c4a9da52f6ff79373be328.

Bug: T182834
Change-Id: Ifaca2fed59c578e937212ad91c0c7622fd8b0918
---
M .phpcs.xml
R CheckUser.hooks.php
M api/ApiQueryCheckUser.php
M extension.json
M maintenance/purgeOldData.php
M specials/SpecialCheckUser.php
R tests/phpunit/CheckUserTest.php
7 files changed, 19 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser 
refs/changes/77/398177/1

diff --git a/.phpcs.xml b/.phpcs.xml
index 124ea83..68a2c86 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -7,9 +7,8 @@



-   
-   
-   */maintenance/*
+   
+   


CheckUser\.alias\.php
diff --git a/CheckUserHooks.php b/CheckUser.hooks.php
similarity index 100%
rename from CheckUserHooks.php
rename to CheckUser.hooks.php
diff --git a/api/ApiQueryCheckUser.php b/api/ApiQueryCheckUser.php
index 8d3e0e7..de9d53f 100644
--- a/api/ApiQueryCheckUser.php
+++ b/api/ApiQueryCheckUser.php
@@ -90,7 +90,7 @@
$resultIPs[] = $data;
}
 
-   SpecialCheckUser::addLogEntry( 'userips', 
'user', $target, $reason, $user_id );
+   CheckUser::addLogEntry( 'userips', 'user', 
$target, $reason, $user_id );
$result->addValue( [
'query', $this->getModuleName() ], 
'userips', $resultIPs );
$result->addIndexedTagName( [
@@ -99,7 +99,7 @@
 
case 'edits':
if ( IP::isIPAddress( $target ) ) {
-   $cond = SpecialCheckUser::getIpConds( 
$db, $target, isset( $xff ) );
+   $cond = CheckUser::getIpConds( $db, 
$target, isset( $xff ) );
if ( !$cond ) {
if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
$this->dieWithError( 
'apierror-badip', 'invalidip' );
@@ -162,7 +162,7 @@
$edits[] = $edit;
}
 
-   SpecialCheckUser::addLogEntry( $log_type[0], 
$log_type[1],
+   CheckUser::addLogEntry( $log_type[0], 
$log_type[1],
$target, $reason, isset( $user_id ) ? 
$user_id : '0' );
$result->addValue( [
'query', $this->getModuleName() ], 
'edits', $edits );
@@ -172,7 +172,7 @@
 
case 'ipusers':
if ( IP::isIPAddress( $target ) ) {
-   $cond = SpecialCheckUser::getIpConds( 
$db, $target, isset( $xff ) );
+   $cond = CheckUser::getIpConds( $db, 
$target, isset( $xff ) );
$this->addWhere( $cond );
$log_type = 'ipusers';
if ( isset( $xff ) ) {
@@ -224,7 +224,7 @@
$resultUsers[] = $userData;
}
 
-   SpecialCheckUser::addLogEntry( $log_type, 'ip', 
$target, $reason );
+   CheckUser::addLogEntry( $log_type, 'ip', 
$target, $reason );
$result->addValue( [
'query', $this->getModuleName() ], 
'ipusers', $resultUsers );
$result->addIndexedTagName( [
diff --git a/extension.json b/extension.json
index efc162a..4ecf9ce 100644
--- a/extension.json
+++ b/extension.json
@@ -105,13 +105,13 @@
"checkuser-log"
],
"SpecialPages": {
-   "CheckUser": "SpecialCheckUser",
+   "CheckUser": "CheckUser",
"CheckUserLog": "SpecialCheckUserLog"
},
"AutoloadClasses": {
-   "CheckUserHooks": "CheckUserHooks.php",
+   "CheckUser": "specials/SpecialCheckUser.php",
+   "CheckUserHooks": "CheckUser.hooks.php",
"CheckUserLogPager": "CheckUserLogPager.php",
-   "SpecialCheckUser": "specials/SpecialCheckUser.php",
"SpecialCheckUserLog": "specials/SpecialCheckUserLog.php",

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add extension to change contact types

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

Change subject: Add extension to change contact types
..

Add extension to change contact types

Bug: T156193
Change-Id: I7c34be4225c04ac112d74891035607144178fd5f
---
M phpunit.xml
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
A 
sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php
A 
sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php
A 
sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/Form/ContactTypeChange.php
A sites/default/civicrm/extensions/org.wikimedia.contacteditor/LICENSE.txt
A sites/default/civicrm/extensions/org.wikimedia.contacteditor/README.md
A 
sites/default/civicrm/extensions/org.wikimedia.contacteditor/contacteditor.civix.php
A sites/default/civicrm/extensions/org.wikimedia.contacteditor/contacteditor.php
A sites/default/civicrm/extensions/org.wikimedia.contacteditor/info.xml
A sites/default/civicrm/extensions/org.wikimedia.contacteditor/phpunit.xml.dist
A 
sites/default/civicrm/extensions/org.wikimedia.contacteditor/templates/CRM/Contacteditor/Form/ContactTypeChange.tpl
A 
sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/BaseUnitTestClass.php
A 
sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/ContactEditorTest.php
A 
sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/bootstrap.php
A 
sites/default/civicrm/extensions/org.wikimedia.contacteditor/xml/Menu/contacteditor.xml
16 files changed, 2,144 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/76/398176/1

diff --git a/phpunit.xml b/phpunit.xml
index 5507958..5731077 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -49,5 +49,8 @@
   
 
sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit
   
+  
+
sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit
+  
 
 
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 543b696..581a38d 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -69,6 +69,7 @@
   wmf_civicrm_update_7526();
   wmf_civicrm_update_7530();
   wmf_civicrm_update_7590();
+  wmf_civicrm_update_7595();
 }
 
 /**
@@ -3438,3 +3439,14 @@
   civicrm_initialize();
   wmf_civicrm_create_option_values('payment_instrument', array('Stripe'));
 }
+
+/**
+ * Add contact type editor extension.
+ *
+ * Bug: TT156193
+ */
+function wmf_civicrm_update_7595() {
+  civicrm_initialize();
+  civicrm_api3('extension', 'refresh', array());
+  civicrm_api3('extension', 'install', array('key' => 
'org.wikimedia.contacteditor'));
+}
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php
 
b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php
new file mode 100644
index 000..5914128
--- /dev/null
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php
@@ -0,0 +1,14 @@
+ array(
+'name' => 'Contact Type Changed',
+'entity' => 'OptionValue',
+'params' => array(
+  'version' => 3,
+  'option_group_id' => 'activity_type',
+  'label' => 'Contact Type Changed',
+  'name' => 'contact_type_changed',
+  'description' => 'Contact type changed',
+),
+  ),
+);
\ No newline at end of file
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php
 
b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php
new file mode 100644
index 000..0f68625
--- /dev/null
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php
@@ -0,0 +1,303 @@
+getApiRequest();
+if ($request['entity'] !== 'Contact' || $request['action']  !== 'create') {
+  return;
+}
+if (empty($request['params']['id']) || 
empty($request['params']['contact_type'])) {
+  // Hook is only interested in changes that update contact type.
+  return;
+}
+$contactID = $request['params']['id'];
+$newContactType = $request['params']['contact_type'];
+// Usually we will return after getting this - if we proceed past here we 
do more extensive data gathering as it is 'the real deal'.
+$existingContactType = civicrm_api3('Contact', 'getvalue', ['id' => 
$contactID, 'return' => 'contact_type']);
+if ($existingContactType ===  $newContactType) {
+  return;
+}
+if (!CRM_Core_Permission::check(array('Change CiviCRM contact type'))) {
+  throw new CRM_Core_Exception('You do have not permission to change the 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Test a Set for trace/debug/dump flags.

2017-12-13 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398175 )

Change subject: Test a Set for trace/debug/dump flags.
..

Test a Set for trace/debug/dump flags.

This reads more naturally than repeated indexOf() operations against
an array, and folds the null check into the has() test as well.

Change-Id: I6531dda9d525702c76e4fe1f2911dea9a665b270
---
M bin/parserTests.js
M lib/config/ParsoidConfig.js
M lib/html2wt/SelectiveSerializer.js
M lib/html2wt/WikitextSerializer.js
M lib/logger/ParsoidLogger.js
M lib/wt2html/DOMPostProcessor.js
M lib/wt2html/TokenTransformManager.js
M lib/wt2html/pp/processors/computeDSR.js
M lib/wt2html/pp/processors/wrapSections.js
M lib/wt2html/pp/processors/wrapTemplates.js
M lib/wt2html/tokenizer.js
M lib/wt2html/tt/TemplateHandler.js
12 files changed, 35 insertions(+), 35 deletions(-)


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

diff --git a/bin/parserTests.js b/bin/parserTests.js
index 9fe93e6..e6ac079 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -366,8 +366,7 @@
}
}
 
-   if (this.env.conf.parsoid.dumpFlags &&
-   this.env.conf.parsoid.dumpFlags.indexOf("dom:post-changes") !== 
-1) {
+   if (this.env.conf.parsoid.dumpFlagSet().has("dom:post-changes")) {
DU.dumpDOM(body, 'Original DOM');
}
 
@@ -381,8 +380,7 @@
applyChangesInternal(body, item.changes);
}
 
-   if (this.env.conf.parsoid.dumpFlags &&
-   this.env.conf.parsoid.dumpFlags.indexOf("dom:post-changes") !== 
-1) {
+   if (this.env.conf.parsoid.dumpFlagSet().has("dom:post-changes")) {
console.warn("Change tree : " + JSON.stringify(item.changes));
DU.dumpDOM(body, 'Edited DOM');
}
diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index 48383e2..0b3371c 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -212,6 +212,19 @@
 ParsoidConfig.prototype.dumpFlags = null;
 
 /**
+ * Convenience function to allow us to access these arrays as a Set.
+ */
+['trace', 'debug', 'dump'].forEach(function(method) {
+var backingSet = null;
+ParsoidConfig.prototype[method+'FlagSet'] = function() {
+if (backingSet === null) {
+backingSet = new Set(this[method+'Flags'] || []);
+}
+return backingSet;
+};
+});
+
+/**
  * @property {boolean} fetchTemplates Whether we should request templates from 
a wiki, or just use cached versions.
  */
 ParsoidConfig.prototype.fetchTemplates = true;
diff --git a/lib/html2wt/SelectiveSerializer.js 
b/lib/html2wt/SelectiveSerializer.js
index 66f286d..2e632a2 100644
--- a/lib/html2wt/SelectiveSerializer.js
+++ b/lib/html2wt/SelectiveSerializer.js
@@ -29,8 +29,7 @@
this.wts = options.wts || new WikitextSerializer(options);
 
// Debug options
-   this.trace = this.env.conf.parsoid.traceFlags &&
-   (this.env.conf.parsoid.traceFlags.indexOf("selser") !== 
-1);
+   this.trace = this.env.conf.parsoid.traceFlagSet().has("selser");
 
// Performance Timing option
this.metrics = this.env.conf.parsoid.metrics;
@@ -96,8 +95,7 @@
// Nothing was modified, just re-use the original source
p = Promise.resolve(this.env.page.src);
} else {
-   if (this.trace || (this.env.conf.parsoid.dumpFlags &&
-   
this.env.conf.parsoid.dumpFlags.indexOf('dom:post-dom-diff') !== -1)) {
+   if (this.trace || 
this.env.conf.parsoid.dumpFlagSet().has('dom:post-dom-diff')) {
DU.dumpDOM(body, 'DOM after running DOMDiff', {
storeDiffMark: true,
env: this.env,
diff --git a/lib/html2wt/WikitextSerializer.js 
b/lib/html2wt/WikitextSerializer.js
index bdaba5e..04907f3 100644
--- a/lib/html2wt/WikitextSerializer.js
+++ b/lib/html2wt/WikitextSerializer.js
@@ -1429,7 +1429,7 @@
(new Normalizer(state)).normalizeDOM(body);
 
var psd = this.env.conf.parsoid;
-   if (psd.dumpFlags && (psd.dumpFlags.indexOf("dom:post-normal") !== -1)) 
{
+   if (psd.dumpFlagSet().has("dom:post-normal")) {
DU.dumpDOM(body, 'DOM: post-normal');
}
 
diff --git a/lib/logger/ParsoidLogger.js b/lib/logger/ParsoidLogger.js
index 63b2db4..d44690d 100644
--- a/lib/logger/ParsoidLogger.js
+++ b/lib/logger/ParsoidLogger.js
@@ -90,13 +90,9 @@
// TRACE / DEBUG: Make trace / debug regexp with appropriate postfixes,
// depending on the command-line options passed in.
function buildTraceOrDebugFlag(parsoidFlags, logType) {
-   if (Array.isArray(parsoidFlags)) {
-   var 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Added Localization for CX Translation Trend Graph

2017-12-13 Thread Ryan10145 (Code Review)
Ryan10145 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398174 )

Change subject: Added Localization for CX Translation Trend Graph
..

Added Localization for CX Translation Trend Graph

Bug: T94020
Change-Id: I24e74564b8ec8bbad7248462aea8f8a9ddd313b6
---
M modules/stats/ext.cx.stats.js
1 file changed, 40 insertions(+), 4 deletions(-)


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

diff --git a/modules/stats/ext.cx.stats.js b/modules/stats/ext.cx.stats.js
index 17c22d9..52af9b6 100644
--- a/modules/stats/ext.cx.stats.js
+++ b/modules/stats/ext.cx.stats.js
@@ -19,6 +19,7 @@
this.languageTranslationTrend = null;
this.$highlights = null;
this.$graph = null;
+   this.chartOptions = {};
}
 
CXStats.prototype.init = function () {
@@ -47,6 +48,41 @@
self.renderHighlights();
self.render();
} );
+
+   this.chartOptions = {
+   scales: {
+xAxes: [
+{
+ticks: {
+   callback: function( value, index, values ) {
+   return moment( value ).format( 'L' );
+   }
+}
+}
+],
+yAxes: [
+   {
+ticks: {
+   callback: function( value, index, values ) {
+   var convertedValue = 
mw.language.covertNumber( Number( value ) );
+   return convertedValue;
+   }
+}
+   }
+]
+   },
+   tooltips: {
+callbacks: {
+title: function( tooltipItems, data ) {
+   return moment( tooltipItems[ 0 ].xLabel ).format( 'L' );
+},
+label: function( tooltipItem, data ) {
+   var convertedValue = mw.language.convertNumber( Number( 
tooltipItem.yLabel ) );
+   return convertedValue + ' :' + data.datasets[ 
tooltipItem.datasetIndex ].label;
+}
+},
+   }
+   };
};
 
/**
@@ -596,7 +632,7 @@
new Chart( ctx, {
type: 'line',
data: data,
-   options: {}
+   options: this.chartOptions
} );
};
 
@@ -653,7 +689,7 @@
new Chart( ctx, {
type: 'line',
data: data,
-   options: {}
+   options: this.chartOptions
} );
};
 
@@ -691,7 +727,7 @@
new Chart( ctx, {
type: 'bar',
data: data,
-   options: {}
+   options: this.chartOptions
} );
};
 
@@ -739,7 +775,7 @@
new Chart( ctx, {
type: 'bar',
data: data,
-   options: {}
+   options: this.chartOptions
} );
};
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24e74564b8ec8bbad7248462aea8f8a9ddd313b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Ryan10145 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Change findHighlightedItem due to deprecation

2017-12-13 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398173 )

Change subject: RCFilters: Change findHighlightedItem due to deprecation
..

RCFilters: Change findHighlightedItem due to deprecation

SelectWidget's getHighlightedItem was deprecated and switched with
findHighlightedItem, see T76630

Change-Id: I90535c9f72d9a63e8e8d4184cc85aaf77e7b454c
---
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/398173/1

diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
index 22c176f..5438589 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
@@ -332,7 +332,7 @@
 */
mw.rcfilters.ui.MenuSelectWidget.prototype.onKeyDown = function ( e ) {
var nextItem,
-   currentItem = this.getHighlightedItem() || 
this.getSelectedItem();
+   currentItem = this.findHighlightedItem() || 
this.getSelectedItem();
 
// Call parent

mw.rcfilters.ui.MenuSelectWidget.parent.prototype.onKeyDown.call( this, e );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90535c9f72d9a63e8e8d4184cc85aaf77e7b454c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] operations/puppet[production]: icinga: fix check_disk options on lawrencium

2017-12-13 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398172 )

Change subject: icinga: fix check_disk options on lawrencium
..

icinga: fix check_disk options on lawrencium

lawrencium is a (docker) test server, using role(test),
so it doesn't get custom check_disk options for docker
servers but because it has docker there will be an Icinga
alert for DISK space. See ticket.

Bug: T178454
Change-Id: Ifa008aa4e4c5fe3f3075fb7e240b3ecded7ffd26
---
M hieradata/hosts/lawrencium.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/398172/1

diff --git a/hieradata/hosts/lawrencium.yaml b/hieradata/hosts/lawrencium.yaml
index 7e96ec6..d7c3d2e 100644
--- a/hieradata/hosts/lawrencium.yaml
+++ b/hieradata/hosts/lawrencium.yaml
@@ -1,2 +1,3 @@
+profile::base::check_disk_options: -w 10% -c 5% -W 6% -K 3% -l -e -A -i 
/var/lib/docker/* -i /run/docker/netns/* --exclude-type=tracefs
 admin::groups:
   - perf-team

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa008aa4e4c5fe3f3075fb7e240b3ecded7ffd26
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]: openstack: sane class dependency handling for labtest[n]

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

Change subject: openstack: sane class dependency handling for labtest[n]
..


openstack: sane class dependency handling for labtest[n]

Bug: T171494
Change-Id: I6f235999ff42c91637d845c2c1a457e59ab6099f
---
M modules/profile/manifests/openstack/base/nova/api/service.pp
M modules/profile/manifests/openstack/base/nova/compute/service.pp
M modules/profile/manifests/openstack/base/nova/conductor/service.pp
M modules/profile/manifests/openstack/base/nova/fullstack/service.pp
M modules/profile/manifests/openstack/base/nova/network/service.pp
M modules/profile/manifests/openstack/base/nova/scheduler/service.pp
M modules/profile/manifests/openstack/base/nova/spiceproxy/service.pp
M modules/profile/manifests/openstack/labtest/clientlib.pp
M modules/profile/manifests/openstack/labtest/cloudrepo.pp
M modules/profile/manifests/openstack/labtest/designate/service.pp
M modules/profile/manifests/openstack/labtest/glance.pp
M modules/profile/manifests/openstack/labtest/horizon/dashboard.pp
M modules/profile/manifests/openstack/labtest/keystone/service.pp
M modules/profile/manifests/openstack/labtest/nova/api/service.pp
M modules/profile/manifests/openstack/labtest/nova/common.pp
M modules/profile/manifests/openstack/labtest/nova/compute/service.pp
M modules/profile/manifests/openstack/labtest/nova/conductor/service.pp
M modules/profile/manifests/openstack/labtest/nova/network/service.pp
M modules/profile/manifests/openstack/labtest/nova/scheduler/service.pp
M modules/profile/manifests/openstack/labtest/nova/spiceproxy/service.pp
M modules/profile/manifests/openstack/labtest/observerenv.pp
M modules/profile/manifests/openstack/labtest/pdns/dns_floating_ip_updater.pp
M modules/profile/manifests/openstack/labtest/rabbitmq.pp
M modules/profile/manifests/openstack/labtestn/clientlib.pp
24 files changed, 33 insertions(+), 2 deletions(-)

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



diff --git a/modules/profile/manifests/openstack/base/nova/api/service.pp 
b/modules/profile/manifests/openstack/base/nova/api/service.pp
index f1b5993..35a40f2 100644
--- a/modules/profile/manifests/openstack/base/nova/api/service.pp
+++ b/modules/profile/manifests/openstack/base/nova/api/service.pp
@@ -5,8 +5,10 @@
 class {'::openstack::nova::api::service':
 active => ($::fqdn == $nova_api_host),
 }
+contain '::openstack::nova::api::service'
 
 class {'::openstack::nova::api::monitor':
 active => ($::fqdn == $nova_api_host),
 }
+contain '::openstack::nova::api::monitor'
 }
diff --git a/modules/profile/manifests/openstack/base/nova/compute/service.pp 
b/modules/profile/manifests/openstack/base/nova/compute/service.pp
index 1764deb..27fc19a 100644
--- a/modules/profile/manifests/openstack/base/nova/compute/service.pp
+++ b/modules/profile/manifests/openstack/base/nova/compute/service.pp
@@ -56,4 +56,5 @@
 certname => $certname,
 ca_target=> $ca_target,
 }
+contain '::openstack::nova::compute::service'
 }
diff --git a/modules/profile/manifests/openstack/base/nova/conductor/service.pp 
b/modules/profile/manifests/openstack/base/nova/conductor/service.pp
index a6eeeb0..a0462ff 100644
--- a/modules/profile/manifests/openstack/base/nova/conductor/service.pp
+++ b/modules/profile/manifests/openstack/base/nova/conductor/service.pp
@@ -5,4 +5,5 @@
 class {'::openstack::nova::conductor::service':
 active => $::fqdn == $nova_controller,
 }
+contain '::openstack::nova::conductor::service'
 }
diff --git a/modules/profile/manifests/openstack/base/nova/fullstack/service.pp 
b/modules/profile/manifests/openstack/base/nova/fullstack/service.pp
index ca83640..dbb95e1 100644
--- a/modules/profile/manifests/openstack/base/nova/fullstack/service.pp
+++ b/modules/profile/manifests/openstack/base/nova/fullstack/service.pp
@@ -7,4 +7,5 @@
 active   => ($::fqdn == $nova_api_host),
 password => $osstackcanary_pass,
 }
+contain '::openstack::nova::fullstack::service'
 }
diff --git a/modules/profile/manifests/openstack/base/nova/network/service.pp 
b/modules/profile/manifests/openstack/base/nova/network/service.pp
index 355f1d0..f952115 100644
--- a/modules/profile/manifests/openstack/base/nova/network/service.pp
+++ b/modules/profile/manifests/openstack/base/nova/network/service.pp
@@ -34,4 +34,5 @@
 dns_recursor   => $dns_recursor,
 dns_recursor_secondary => $dns_recursor_secondary,
 }
+contain '::openstack::nova::network::service'
 }
diff --git a/modules/profile/manifests/openstack/base/nova/scheduler/service.pp 
b/modules/profile/manifests/openstack/base/nova/scheduler/service.pp
index d6ad90d..61da5d8 100644
--- a/modules/profile/manifests/openstack/base/nova/scheduler/service.pp
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Remove long obsolete comment from 29362cc

2017-12-13 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398170 )

Change subject: Remove long obsolete comment from 29362cc
..

Remove long obsolete comment from 29362cc

Change-Id: Ib5d10f75e1c07ab2c16621e9599973a9b707819c
---
M lib/wt2html/parser.js
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/lib/wt2html/parser.js b/lib/wt2html/parser.js
index caf40ce..3d63eb2 100644
--- a/lib/wt2html/parser.js
+++ b/lib/wt2html/parser.js
@@ -13,8 +13,6 @@
 
 var Promise = require('../utils/promise.js');
 
-// make this global for now
-// XXX: figure out a way to get away without a global for PEG actions!
 var PegTokenizer = require('./tokenizer.js').PegTokenizer;
 var TokenTransformManager = require('./TokenTransformManager.js');
 var ExtensionHandler = require('./tt/ExtensionHandler.js').ExtensionHandler;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5d10f75e1c07ab2c16621e9599973a9b707819c
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] mediawiki...parsoid[master]: [WIP] Tokenize noincludeonly content asynchronously

2017-12-13 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398171 )

Change subject: [WIP] Tokenize noincludeonly content asynchronously
..

[WIP] Tokenize noincludeonly content asynchronously

Bug: T143378
Change-Id: I465a618eba89bbcf8d4afe8e01610278d2453c75
---
M lib/wt2html/parser.js
M lib/wt2html/pegTokenizer.pegjs
M lib/wt2html/tokenizer.js
M lib/wt2html/tt/NoIncludeOnly.js
4 files changed, 64 insertions(+), 19 deletions(-)


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

diff --git a/lib/wt2html/parser.js b/lib/wt2html/parser.js
index 3d63eb2..82e9bc2 100644
--- a/lib/wt2html/parser.js
+++ b/lib/wt2html/parser.js
@@ -38,9 +38,9 @@
 var IncludeOnly = NoIncludeOnly.IncludeOnly;
 var NoInclude = NoIncludeOnly.NoInclude;
 var OnlyInclude = NoIncludeOnly.OnlyInclude;
+var TokenizeInclude = NoIncludeOnly.TokenizeInclude;
 var WikiLinkHandler = LinkHandler.WikiLinkHandler;
 var ExternalLinkHandler = LinkHandler.ExternalLinkHandler;
-
 
 var ParserPipeline; // forward declaration
 var globalPipelineId = 0;
@@ -81,6 +81,13 @@
// a fully expanded token stream ready for consumption by the
// tokens/expanded pipeline.
'tokens/x-mediawiki': [
+   [
+   AsyncTokenTransformManager,
+   [ 0, 'tokens/x-mediawiki' ],
+   [
+   TokenizeInclude,  // 0.001
+   ],
+   ],
// Synchronous in-order per input
[
SyncTokenTransformManager,
diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index e1bd3f9..09a916a 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -15,7 +15,6 @@
 var DU = pegIncludes.DOMUtils;
 var Util = pegIncludes.Util;
 var JSUtils = pegIncludes.JSUtils;
-var PegTokenizer = pegIncludes.PegTokenizer;
 var defines = pegIncludes.defines;
 var constants = pegIncludes.constants;
 var tu = pegIncludes.tu;
@@ -239,13 +238,15 @@
 ], dp);
 } else if (isIncludeTag) {
 // Parse ext-content, strip eof, and shift tsr
-var extContent = dp.src.substring(dp.tagWidths[0], dp.src.length - 
dp.tagWidths[1]);
-var extContentToks = (new 
PegTokenizer(env)).tokenizeSync(extContent);
-if (dp.tagWidths[1] > 0) {
-extContentToks = Util.stripEOFTkfromTokens(extContentToks);
-}
-Util.shiftTokenTSR(extContentToks, dp.tsr[0] + dp.tagWidths[0]);
-return [t].concat(extContentToks);
+dp.tmp = (dp.tmp || {});
+dp.tmp.toTokenize = {
+content: dp.src.substring(dp.tagWidths[0], dp.src.length - 
dp.tagWidths[1]),
+shift: dp.tsr[0] + dp.tagWidths[0],
+stripEOF: dp.tagWidths[1] > 0,
+name: tagName,
+};
+t.name = 'tokenizeinclude';
+return t;
 } else {
 console.assert(false, 'Should not be reachable.');
 }
@@ -2182,16 +2183,17 @@
 }
 
 // Tokenize include content in a new tokenizer
-var inclContentToks = (new PegTokenizer(env)).tokenizeSync(inclContent);
-inclContentToks = Util.stripEOFTkfromTokens(inclContentToks);
-
-// Shift tsr
-Util.shiftTokenTSR(inclContentToks, endOffset());
+dp.toTokenize = {
+content: inclContent,
+shift: endOffset(),
+stripEOF: true,
+name: name,
+};
 
 // Skip past content
 peg$currPos += inclContent.length;
 
-return [new TagTk(name, [], dp)].concat(inclContentToks);
+return new TagTk('tokenizeinclude', [], dp);
   }) & { return !!il; } { return il; }
 
 // Start of file
diff --git a/lib/wt2html/tokenizer.js b/lib/wt2html/tokenizer.js
index 4318ed9..8eacedd 100644
--- a/lib/wt2html/tokenizer.js
+++ b/lib/wt2html/tokenizer.js
@@ -36,8 +36,6 @@
DOMUtils: require('../utils/DOMUtils.js').DOMUtils,
JSUtils: JSUtils,
Util: require('../utils/Util.js').Util,
-   // defined below to satisfy JSHint
-   PegTokenizer: null,
 };
 
 /**
@@ -56,8 +54,6 @@
this.options = options || {};
this.offsets = {};
 }
-
-pegIncludes.PegTokenizer = PegTokenizer;
 
 // Inherit from EventEmitter
 util.inherits(PegTokenizer, events.EventEmitter);
diff --git a/lib/wt2html/tt/NoIncludeOnly.js b/lib/wt2html/tt/NoIncludeOnly.js
index 66bce5c..de7db72 100644
--- a/lib/wt2html/tt/NoIncludeOnly.js
+++ b/lib/wt2html/tt/NoIncludeOnly.js
@@ -8,6 +8,8 @@
 var coreutil = require('util');
 var TokenHandler = require('./TokenHandler.js');
 var TokenCollector = require('./TokenCollector.js').TokenCollector;
+var PegTokenizer = require('../tokenizer.js').PegTokenizer;
+var Util = require('../../utils/Util.js').Util;
 var defines = 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: openstack: sane class dependency handling for labtest[n]

2017-12-13 Thread Rush (Code Review)
Rush has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398169 )

Change subject: openstack: sane class dependency handling for labtest[n]
..

openstack: sane class dependency handling for labtest[n]

Bug: T171494
Change-Id: I6f235999ff42c91637d845c2c1a457e59ab6099f
---
M modules/profile/manifests/openstack/base/nova/api/service.pp
M modules/profile/manifests/openstack/base/nova/compute/service.pp
M modules/profile/manifests/openstack/base/nova/conductor/service.pp
M modules/profile/manifests/openstack/base/nova/fullstack/service.pp
M modules/profile/manifests/openstack/base/nova/network/service.pp
M modules/profile/manifests/openstack/base/nova/scheduler/service.pp
M modules/profile/manifests/openstack/base/nova/spiceproxy/service.pp
M modules/profile/manifests/openstack/labtest/clientlib.pp
M modules/profile/manifests/openstack/labtest/cloudrepo.pp
M modules/profile/manifests/openstack/labtest/designate/service.pp
M modules/profile/manifests/openstack/labtest/glance.pp
M modules/profile/manifests/openstack/labtest/horizon/dashboard.pp
M modules/profile/manifests/openstack/labtest/keystone/service.pp
M modules/profile/manifests/openstack/labtest/nova/api/service.pp
M modules/profile/manifests/openstack/labtest/nova/common.pp
M modules/profile/manifests/openstack/labtest/nova/compute/service.pp
M modules/profile/manifests/openstack/labtest/nova/conductor/service.pp
M modules/profile/manifests/openstack/labtest/nova/network/service.pp
M modules/profile/manifests/openstack/labtest/nova/scheduler/service.pp
M modules/profile/manifests/openstack/labtest/nova/spiceproxy/service.pp
M modules/profile/manifests/openstack/labtest/observerenv.pp
M modules/profile/manifests/openstack/labtest/pdns/dns_floating_ip_updater.pp
M modules/profile/manifests/openstack/labtest/rabbitmq.pp
M modules/profile/manifests/openstack/labtestn/clientlib.pp
24 files changed, 33 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/398169/1

diff --git a/modules/profile/manifests/openstack/base/nova/api/service.pp 
b/modules/profile/manifests/openstack/base/nova/api/service.pp
index f1b5993..35a40f2 100644
--- a/modules/profile/manifests/openstack/base/nova/api/service.pp
+++ b/modules/profile/manifests/openstack/base/nova/api/service.pp
@@ -5,8 +5,10 @@
 class {'::openstack::nova::api::service':
 active => ($::fqdn == $nova_api_host),
 }
+contain '::openstack::nova::api::service'
 
 class {'::openstack::nova::api::monitor':
 active => ($::fqdn == $nova_api_host),
 }
+contain '::openstack::nova::api::monitor'
 }
diff --git a/modules/profile/manifests/openstack/base/nova/compute/service.pp 
b/modules/profile/manifests/openstack/base/nova/compute/service.pp
index 1764deb..27fc19a 100644
--- a/modules/profile/manifests/openstack/base/nova/compute/service.pp
+++ b/modules/profile/manifests/openstack/base/nova/compute/service.pp
@@ -56,4 +56,5 @@
 certname => $certname,
 ca_target=> $ca_target,
 }
+contain '::openstack::nova::compute::service'
 }
diff --git a/modules/profile/manifests/openstack/base/nova/conductor/service.pp 
b/modules/profile/manifests/openstack/base/nova/conductor/service.pp
index a6eeeb0..a0462ff 100644
--- a/modules/profile/manifests/openstack/base/nova/conductor/service.pp
+++ b/modules/profile/manifests/openstack/base/nova/conductor/service.pp
@@ -5,4 +5,5 @@
 class {'::openstack::nova::conductor::service':
 active => $::fqdn == $nova_controller,
 }
+contain '::openstack::nova::conductor::service'
 }
diff --git a/modules/profile/manifests/openstack/base/nova/fullstack/service.pp 
b/modules/profile/manifests/openstack/base/nova/fullstack/service.pp
index ca83640..dbb95e1 100644
--- a/modules/profile/manifests/openstack/base/nova/fullstack/service.pp
+++ b/modules/profile/manifests/openstack/base/nova/fullstack/service.pp
@@ -7,4 +7,5 @@
 active   => ($::fqdn == $nova_api_host),
 password => $osstackcanary_pass,
 }
+contain '::openstack::nova::fullstack::service'
 }
diff --git a/modules/profile/manifests/openstack/base/nova/network/service.pp 
b/modules/profile/manifests/openstack/base/nova/network/service.pp
index 355f1d0..f952115 100644
--- a/modules/profile/manifests/openstack/base/nova/network/service.pp
+++ b/modules/profile/manifests/openstack/base/nova/network/service.pp
@@ -34,4 +34,5 @@
 dns_recursor   => $dns_recursor,
 dns_recursor_secondary => $dns_recursor_secondary,
 }
+contain '::openstack::nova::network::service'
 }
diff --git a/modules/profile/manifests/openstack/base/nova/scheduler/service.pp 
b/modules/profile/manifests/openstack/base/nova/scheduler/service.pp
index d6ad90d..61da5d8 100644
--- a/modules/profile/manifests/openstack/base/nova/scheduler/service.pp
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Pseudo-section marker takes precedence over uneditable marker

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

Change subject: Pseudo-section marker takes precedence over uneditable marker
..


Pseudo-section marker takes precedence over uneditable marker

* Sections without headings should always be marked as pseudo-sections,
  even if they are also uneditable.

  See https://phabricator.wikimedia.org/T182774#3835499

* Added a parser test to verify this assertion

Bug: T182774
Change-Id: I423fbaee3e18ff598837a97ccb7100bf8b57e5ac
---
M lib/wt2html/pp/processors/wrapSections.js
M tests/parserTests.txt
2 files changed, 25 insertions(+), 3 deletions(-)

Approvals:
  C. Scott Ananian: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/wt2html/pp/processors/wrapSections.js 
b/lib/wt2html/pp/processors/wrapSections.js
index f453d23..ab25dc5 100644
--- a/lib/wt2html/pp/processors/wrapSections.js
+++ b/lib/wt2html/pp/processors/wrapSections.js
@@ -66,10 +66,10 @@
 *
 * The code here handles uneditable sections because of templating.
 */
-   if (state.inTemplate) {
-   section.container.setAttribute('data-mw-section-id', -1);
-   } else if (pseudoSection) {
+   if (pseudoSection) {
section.container.setAttribute('data-mw-section-id', -2);
+   } else if (state.inTemplate) {
+   section.container.setAttribute('data-mw-section-id', -1);
} else {
section.container.setAttribute('data-mw-section-id', 
state.sectionNumber);
}
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 72ee550..c729776 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -30608,3 +30608,25 @@
  2 
 b
 !! end
+
+!! test
+Pseudo-sections emitted by templates should have id -2 
+!! options
+parsoid={
+  "wrapSections": true
+}
+!! wikitext
+foo
+{{echo|
+== a ==
+== b ==
+
+}}
+!! html/parsoid
+foo
+
+ a 
+ b 
+
+
+!! end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I423fbaee3e18ff598837a97ccb7100bf8b57e5ac
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: C. Scott Ananian 
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] operations...docker-pkg[master]: Restrict setup.py to python 3.4 or later

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

Change subject: Restrict setup.py to python 3.4 or later
..


Restrict setup.py to python 3.4 or later

The software is python3 only, though when installing with pip (python2)
there is nothing preventing the installation.  Installed that way,
docker-pkg fails to run.

Bails out early by checking the python version in setup.py

Change-Id: I4e29b1af7fbaa9cd96ede519401bc79c51a6fdb0
---
M setup.py
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/setup.py b/setup.py
index 6fd0d51..62e5f76 100755
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,11 @@
 #!/usr/bin/env python
 """Package configuration."""
 
+import sys
 from setuptools import find_packages, setup
 
+if sys.version_info < (3, 4):
+sys.exit('docker-pkg requires Python 3.4 or later')
 
 long_description = """
 docker-pkg-images builds docker images from templates.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e29b1af7fbaa9cd96ede519401bc79c51a6fdb0
Gerrit-PatchSet: 4
Gerrit-Project: operations/docker-images/docker-pkg
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: openstack: labtest and labtestn roles for net

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

Change subject: openstack: labtest and labtestn roles for net
..


openstack: labtest and labtestn roles for net

* labtestneutron2001 apply labtestn net role
   (with standard in the role)
* labtestnet2002 apply wmcs::openstack::labtest::net_standby
* create role::wmcs::openstack::labtest::net_standby to match main
* clientlib for role::wmcs::openstack::labtestn::net

Change-Id: I5fef57e3a59cc0f0f03c108fe9c5f99163ad9552
---
M manifests/site.pp
A modules/role/manifests/wmcs/openstack/labtest/net_standby.pp
M modules/role/manifests/wmcs/openstack/labtestn/net.pp
3 files changed, 11 insertions(+), 6 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 13a40eb..d058f15 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1000,7 +1000,6 @@
 
 node 'labtestneutron2001.codfw.wmnet' {
 role(wmcs::openstack::labtestn::net)
-include ::standard
 }
 
 node /^labtestvirt200[1-3]\.codfw\.wmnet$/ {
@@ -1015,9 +1014,7 @@
 }
 
 node 'labtestnet2002.codfw.wmnet' {
-# WIP
-include ::standard
-include ::base::firewall
+role(wmcs::openstack::labtest::net_standby)
 }
 
 node 'labtestneutron2002.codfw.wmnet' {
diff --git a/modules/role/manifests/wmcs/openstack/labtest/net_standby.pp 
b/modules/role/manifests/wmcs/openstack/labtest/net_standby.pp
new file mode 100644
index 000..acbfbf4
--- /dev/null
+++ b/modules/role/manifests/wmcs/openstack/labtest/net_standby.pp
@@ -0,0 +1,7 @@
+class role::wmcs::openstack::labtest::net_standby {
+system::role { $name: }
+include ::standard
+include ::profile::openstack::labtest::cloudrepo
+include ::profile::openstack::labtest::clientlib
+include ::profile::openstack::labtest::observerenv
+}
diff --git a/modules/role/manifests/wmcs/openstack/labtestn/net.pp 
b/modules/role/manifests/wmcs/openstack/labtestn/net.pp
index 948e3c0..100cbe3 100644
--- a/modules/role/manifests/wmcs/openstack/labtestn/net.pp
+++ b/modules/role/manifests/wmcs/openstack/labtestn/net.pp
@@ -1,5 +1,6 @@
 class role::wmcs::openstack::labtestn::net {
 system::role { $name: }
-include ::profile::openstack::labtestn::cloudrepo
-include ::profile::openstack::labtestn::nova::common
+# Do not add base firewall
+include ::standard
+include ::profile::openstack::labtestn::clientlib
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5fef57e3a59cc0f0f03c108fe9c5f99163ad9552
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Restore location data to start/complete parse logs

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

Change subject: Restore location data to start/complete parse logs
..


Restore location data to start/complete parse logs

This was an oversight from e7997dd.

Change-Id: I9804f55c9446b911bf12ac3ed0696b725ee0aa80
---
M lib/api/apiUtils.js
M lib/api/routes.js
M lib/parse.js
3 files changed, 11 insertions(+), 14 deletions(-)

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



diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index 2b855e3..e3dc5bc 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -2,7 +2,6 @@
 
 require('../../core-upgrade.js');
 
-var util = require('util');
 var semver = require('semver');
 var qs = require('querystring');
 var cType = require('content-type');
@@ -164,12 +163,6 @@
err.suppressLoggingStack = true;
}
env.log('fatal/request', err);
-};
-
-apiUtils.logTime = function(processLogger, res, str) {
-   processLogger.log('info', util.format(
-   'completed %s in %sms', str, Date.now() - res.locals.start
-   ));
 };
 
 // To support the 'subst' API parameter, we need to prefix each
diff --git a/lib/api/routes.js b/lib/api/routes.js
index d36b083..7fa5a49 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -313,8 +313,6 @@
}
}
 
-   processLogger.log('info', 'started parsing');
-
var envOptions = Object.assign({
pageBundle: pageBundle,
// Set data-parsoid to be discarded, so that 
the subst'ed
@@ -395,7 +393,6 @@
}
metrics.endTiming('wt2html.total', 
startTimers.get('wt2html.total'));
}
-   apiUtils.logTime(processLogger, res, 'parsing');
});
});
});
@@ -410,8 +407,6 @@
 
// Performance Timing options
var startTimers = new Map();
-
-   processLogger.log('info', 'started serializing');
 
if (metrics) {
startTimers.set('html2wt.init', Date.now());
@@ -538,7 +533,6 @@
startTimers.get('html2wt.total'));
metrics.timing('html2wt.size.output', 
out.wt.length);
}
-   apiUtils.logTime(processLogger, res, 'serializing');
apiUtils.plainResponse(res, out.wt, undefined, 
apiUtils.wikitextContentType(env));
});
});
diff --git a/lib/parse.js b/lib/parse.js
index 8dd4a6f..b7a2995 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -2,6 +2,8 @@
 
 require('../core-upgrade.js');
 
+var util = require('util');
+
 var ParserEnv = require('./config/MWParserEnvironment.js').MWParserEnvironment;
 var ParsoidConfig = require('./config/ParsoidConfig.js').ParsoidConfig;
 var TemplateRequest = require('./mw/ApiRequest.js').TemplateRequest;
@@ -135,11 +137,15 @@
}
}
 
+   var env;
return ParserEnv.getParserEnv(parsoidConfig, obj.envOptions)
-   .then(function(env) {
+   .then(function(_env) {
+   env = _env;
+
env.startTime = start;
var s1 = Date.now();
env.bumpTimeUse("Setup Environment", s1 - start);
+   env.log('info', 'started ' + obj.mode);
 
if (obj.oldid) {
env.page.meta.revision.revid = obj.oldid;
@@ -202,5 +208,9 @@
});
}
})
+   .tap(function() {
+   var end = Date.now() - start;
+   env.log('info', util.format('completed %s in %sms', obj.mode, 
end));
+   })
.nodify(cb);
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9804f55c9446b911bf12ac3ed0696b725ee0aa80
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
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]: Revert "Use a Set for trace/debug/dump flags."

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

Change subject: Revert "Use a Set for trace/debug/dump flags."
..


Revert "Use a Set for trace/debug/dump flags."

Looks like this breaks tracing - can revisit post deploy tomorrow.

This reverts commit fff22b4dd951faf3f1d521e46abe1a189633c28f.

Change-Id: I4d5a68cbb77e63aeebb951171e28722a195910f0
---
M bin/parserTests.js
M lib/html2wt/SelectiveSerializer.js
M lib/html2wt/WikitextSerializer.js
M lib/logger/ParsoidLogger.js
M lib/utils/Util.js
M lib/wt2html/DOMPostProcessor.js
M lib/wt2html/TokenTransformManager.js
M lib/wt2html/pp/processors/computeDSR.js
M lib/wt2html/pp/processors/wrapSections.js
M lib/wt2html/pp/processors/wrapTemplates.js
M lib/wt2html/tokenizer.js
M lib/wt2html/tt/TemplateHandler.js
12 files changed, 32 insertions(+), 32 deletions(-)

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



diff --git a/bin/parserTests.js b/bin/parserTests.js
index cab20f8..9fe93e6 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -367,7 +367,7 @@
}
 
if (this.env.conf.parsoid.dumpFlags &&
-   this.env.conf.parsoid.dumpFlags.has("dom:post-changes")) {
+   this.env.conf.parsoid.dumpFlags.indexOf("dom:post-changes") !== 
-1) {
DU.dumpDOM(body, 'Original DOM');
}
 
@@ -382,7 +382,7 @@
}
 
if (this.env.conf.parsoid.dumpFlags &&
-   this.env.conf.parsoid.dumpFlags.has("dom:post-changes")) {
+   this.env.conf.parsoid.dumpFlags.indexOf("dom:post-changes") !== 
-1) {
console.warn("Change tree : " + JSON.stringify(item.changes));
DU.dumpDOM(body, 'Edited DOM');
}
diff --git a/lib/html2wt/SelectiveSerializer.js 
b/lib/html2wt/SelectiveSerializer.js
index 0844c8a..66f286d 100644
--- a/lib/html2wt/SelectiveSerializer.js
+++ b/lib/html2wt/SelectiveSerializer.js
@@ -30,7 +30,7 @@
 
// Debug options
this.trace = this.env.conf.parsoid.traceFlags &&
-   this.env.conf.parsoid.traceFlags.has("selser");
+   (this.env.conf.parsoid.traceFlags.indexOf("selser") !== 
-1);
 
// Performance Timing option
this.metrics = this.env.conf.parsoid.metrics;
@@ -97,7 +97,7 @@
p = Promise.resolve(this.env.page.src);
} else {
if (this.trace || (this.env.conf.parsoid.dumpFlags &&
-   
this.env.conf.parsoid.dumpFlags.has('dom:post-dom-diff'))) {
+   
this.env.conf.parsoid.dumpFlags.indexOf('dom:post-dom-diff') !== -1)) {
DU.dumpDOM(body, 'DOM after running DOMDiff', {
storeDiffMark: true,
env: this.env,
diff --git a/lib/html2wt/WikitextSerializer.js 
b/lib/html2wt/WikitextSerializer.js
index 0e8ac71..bdaba5e 100644
--- a/lib/html2wt/WikitextSerializer.js
+++ b/lib/html2wt/WikitextSerializer.js
@@ -1429,7 +1429,7 @@
(new Normalizer(state)).normalizeDOM(body);
 
var psd = this.env.conf.parsoid;
-   if (psd.dumpFlags && psd.dumpFlags.has("dom:post-normal")) {
+   if (psd.dumpFlags && (psd.dumpFlags.indexOf("dom:post-normal") !== -1)) 
{
DU.dumpDOM(body, 'DOM: post-normal');
}
 
diff --git a/lib/logger/ParsoidLogger.js b/lib/logger/ParsoidLogger.js
index d44690d..63b2db4 100644
--- a/lib/logger/ParsoidLogger.js
+++ b/lib/logger/ParsoidLogger.js
@@ -90,9 +90,13 @@
// TRACE / DEBUG: Make trace / debug regexp with appropriate postfixes,
// depending on the command-line options passed in.
function buildTraceOrDebugFlag(parsoidFlags, logType) {
-   var escapedFlags = 
Array.from(parsoidFlags).map(Util.escapeRegExp);
-   var combinedFlag = logType + "\/(" + escapedFlags.join("|") + 
")(\\/|$)";
-   return new RegExp(combinedFlag);
+   if (Array.isArray(parsoidFlags)) {
+   var escapedFlags = parsoidFlags.map(Util.escapeRegExp);
+   var combinedFlag = logType + "\/(" + 
escapedFlags.join("|") + ")(\\/|$)";
+   return new RegExp(combinedFlag);
+   } else {
+   return null;
+   }
}
 
// Register separate backend for tracing / debugging events.
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index 0ca4085..f8cbc7e 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -79,12 +79,8 @@
console.warn("Warning: Generic tracing is no 
longer supported. Ignoring --trace flag. Please provide handler-specific 
tracing flags, e.g. '--trace pre,html5', to turn it on.");
} else {
// Add any new trace 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: openstack: labtest and labtestn roles for net

2017-12-13 Thread Rush (Code Review)
Rush has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398145 )

Change subject: openstack: labtest and labtestn roles for net
..

openstack: labtest and labtestn roles for net

* labtestneutron2001 apply labtestn net role
   (with standard in the role)
* labtestnet2002 apply wmcs::openstack::labtest::net_standby
* create role::wmcs::openstack::labtest::net_standby to match main
* clientlib for role::wmcs::openstack::labtestn::net

Change-Id: I5fef57e3a59cc0f0f03c108fe9c5f99163ad9552
---
M manifests/site.pp
A modules/role/manifests/wmcs/openstack/labtest/net_standby.pp
M modules/role/manifests/wmcs/openstack/labtestn/net.pp
3 files changed, 11 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/398145/1

diff --git a/manifests/site.pp b/manifests/site.pp
index d0f9935..3af0cb7 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1000,7 +1000,6 @@
 
 node 'labtestneutron2001.codfw.wmnet' {
 role(wmcs::openstack::labtestn::net)
-include ::standard
 }
 
 node /^labtestvirt200[1-3]\.codfw\.wmnet$/ {
@@ -1015,9 +1014,7 @@
 }
 
 node 'labtestnet2002.codfw.wmnet' {
-# WIP
-include ::standard
-include ::base::firewall
+role(wmcs::openstack::labtest::net_standby)
 }
 
 node 'labtestneutron2002.codfw.wmnet' {
diff --git a/modules/role/manifests/wmcs/openstack/labtest/net_standby.pp 
b/modules/role/manifests/wmcs/openstack/labtest/net_standby.pp
new file mode 100644
index 000..acbfbf4
--- /dev/null
+++ b/modules/role/manifests/wmcs/openstack/labtest/net_standby.pp
@@ -0,0 +1,7 @@
+class role::wmcs::openstack::labtest::net_standby {
+system::role { $name: }
+include ::standard
+include ::profile::openstack::labtest::cloudrepo
+include ::profile::openstack::labtest::clientlib
+include ::profile::openstack::labtest::observerenv
+}
diff --git a/modules/role/manifests/wmcs/openstack/labtestn/net.pp 
b/modules/role/manifests/wmcs/openstack/labtestn/net.pp
index 948e3c0..100cbe3 100644
--- a/modules/role/manifests/wmcs/openstack/labtestn/net.pp
+++ b/modules/role/manifests/wmcs/openstack/labtestn/net.pp
@@ -1,5 +1,6 @@
 class role::wmcs::openstack::labtestn::net {
 system::role { $name: }
-include ::profile::openstack::labtestn::cloudrepo
-include ::profile::openstack::labtestn::nova::common
+# Do not add base firewall
+include ::standard
+include ::profile::openstack::labtestn::clientlib
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Revert "Use a Set for trace/debug/dump flags."

2017-12-13 Thread Subramanya Sastry (Code Review)
Hello C. Scott Ananian, Sbailey, jenkins-bot, Arlolra,

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

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

to review the following change.


Change subject: Revert "Use a Set for trace/debug/dump flags."
..

Revert "Use a Set for trace/debug/dump flags."

Looks like this breaks tracing - can revisit post deploy tomorrow.

This reverts commit fff22b4dd951faf3f1d521e46abe1a189633c28f.

Change-Id: I4d5a68cbb77e63aeebb951171e28722a195910f0
---
M bin/parserTests.js
M lib/html2wt/SelectiveSerializer.js
M lib/html2wt/WikitextSerializer.js
M lib/logger/ParsoidLogger.js
M lib/utils/Util.js
M lib/wt2html/DOMPostProcessor.js
M lib/wt2html/TokenTransformManager.js
M lib/wt2html/pp/processors/computeDSR.js
M lib/wt2html/pp/processors/wrapSections.js
M lib/wt2html/pp/processors/wrapTemplates.js
M lib/wt2html/tokenizer.js
M lib/wt2html/tt/TemplateHandler.js
12 files changed, 32 insertions(+), 32 deletions(-)


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

diff --git a/bin/parserTests.js b/bin/parserTests.js
index cab20f8..9fe93e6 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -367,7 +367,7 @@
}
 
if (this.env.conf.parsoid.dumpFlags &&
-   this.env.conf.parsoid.dumpFlags.has("dom:post-changes")) {
+   this.env.conf.parsoid.dumpFlags.indexOf("dom:post-changes") !== 
-1) {
DU.dumpDOM(body, 'Original DOM');
}
 
@@ -382,7 +382,7 @@
}
 
if (this.env.conf.parsoid.dumpFlags &&
-   this.env.conf.parsoid.dumpFlags.has("dom:post-changes")) {
+   this.env.conf.parsoid.dumpFlags.indexOf("dom:post-changes") !== 
-1) {
console.warn("Change tree : " + JSON.stringify(item.changes));
DU.dumpDOM(body, 'Edited DOM');
}
diff --git a/lib/html2wt/SelectiveSerializer.js 
b/lib/html2wt/SelectiveSerializer.js
index 0844c8a..66f286d 100644
--- a/lib/html2wt/SelectiveSerializer.js
+++ b/lib/html2wt/SelectiveSerializer.js
@@ -30,7 +30,7 @@
 
// Debug options
this.trace = this.env.conf.parsoid.traceFlags &&
-   this.env.conf.parsoid.traceFlags.has("selser");
+   (this.env.conf.parsoid.traceFlags.indexOf("selser") !== 
-1);
 
// Performance Timing option
this.metrics = this.env.conf.parsoid.metrics;
@@ -97,7 +97,7 @@
p = Promise.resolve(this.env.page.src);
} else {
if (this.trace || (this.env.conf.parsoid.dumpFlags &&
-   
this.env.conf.parsoid.dumpFlags.has('dom:post-dom-diff'))) {
+   
this.env.conf.parsoid.dumpFlags.indexOf('dom:post-dom-diff') !== -1)) {
DU.dumpDOM(body, 'DOM after running DOMDiff', {
storeDiffMark: true,
env: this.env,
diff --git a/lib/html2wt/WikitextSerializer.js 
b/lib/html2wt/WikitextSerializer.js
index 0e8ac71..bdaba5e 100644
--- a/lib/html2wt/WikitextSerializer.js
+++ b/lib/html2wt/WikitextSerializer.js
@@ -1429,7 +1429,7 @@
(new Normalizer(state)).normalizeDOM(body);
 
var psd = this.env.conf.parsoid;
-   if (psd.dumpFlags && psd.dumpFlags.has("dom:post-normal")) {
+   if (psd.dumpFlags && (psd.dumpFlags.indexOf("dom:post-normal") !== -1)) 
{
DU.dumpDOM(body, 'DOM: post-normal');
}
 
diff --git a/lib/logger/ParsoidLogger.js b/lib/logger/ParsoidLogger.js
index d44690d..63b2db4 100644
--- a/lib/logger/ParsoidLogger.js
+++ b/lib/logger/ParsoidLogger.js
@@ -90,9 +90,13 @@
// TRACE / DEBUG: Make trace / debug regexp with appropriate postfixes,
// depending on the command-line options passed in.
function buildTraceOrDebugFlag(parsoidFlags, logType) {
-   var escapedFlags = 
Array.from(parsoidFlags).map(Util.escapeRegExp);
-   var combinedFlag = logType + "\/(" + escapedFlags.join("|") + 
")(\\/|$)";
-   return new RegExp(combinedFlag);
+   if (Array.isArray(parsoidFlags)) {
+   var escapedFlags = parsoidFlags.map(Util.escapeRegExp);
+   var combinedFlag = logType + "\/(" + 
escapedFlags.join("|") + ")(\\/|$)";
+   return new RegExp(combinedFlag);
+   } else {
+   return null;
+   }
}
 
// Register separate backend for tracing / debugging events.
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index 0ca4085..f8cbc7e 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -79,12 +79,8 @@
console.warn("Warning: Generic tracing is no 
longer supported. Ignoring --trace flag. Please provide handler-specific 
tracing flags, e.g. '--trace pre,html5', to 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: openstack: consistent style for ensure present

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

Change subject: openstack: consistent style for ensure present
..


openstack: consistent style for ensure present

present => 'present'

Change-Id: Ic9f75873e07dcfcc5dda4024ade8636a817d9179
---
M modules/openstack/manifests/clientlib.pp
M modules/openstack/manifests/designate/dns_floating_ip_updater.pp
M modules/openstack/manifests/glance/image_sync.pp
M modules/openstack/manifests/glance/service.pp
M modules/openstack/manifests/keystone/service.pp
M modules/openstack/manifests/nova/api/service.pp
M modules/openstack/manifests/nova/compute/service.pp
M modules/openstack/manifests/nova/conductor/service.pp
M modules/openstack/manifests/nova/network/service.pp
M modules/openstack/manifests/nova/spiceproxy/service.pp
M modules/openstack/manifests/util/admin_scripts.pp
M modules/openstack/manifests/wikitech/openstack_manager.pp
12 files changed, 27 insertions(+), 27 deletions(-)

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



diff --git a/modules/openstack/manifests/clientlib.pp 
b/modules/openstack/manifests/clientlib.pp
index d1e5ee1..85eda78 100644
--- a/modules/openstack/manifests/clientlib.pp
+++ b/modules/openstack/manifests/clientlib.pp
@@ -18,7 +18,7 @@
 
 # Wrapper python class to easily query openstack clients
 file { '/usr/lib/python2.7/dist-packages/mwopenstackclients.py':
-ensure => present,
+ensure => 'present',
 source => 
'puppet:///modules/openstack/clientlib/mwopenstackclients.py',
 mode   => '0755',
 owner  => 'root',
diff --git a/modules/openstack/manifests/designate/dns_floating_ip_updater.pp 
b/modules/openstack/manifests/designate/dns_floating_ip_updater.pp
index 9e284b0..1863946 100644
--- a/modules/openstack/manifests/designate/dns_floating_ip_updater.pp
+++ b/modules/openstack/manifests/designate/dns_floating_ip_updater.pp
@@ -21,7 +21,7 @@
 }
 
 file { '/etc/labs-floating-ips-dns-config.yaml':
-ensure  => present,
+ensure  => 'present',
 owner   => 'root',
 group   => 'root',
 mode=> '0440',
@@ -29,7 +29,7 @@
 }
 
 file { '/etc/dns-floating-ip-updater.py':
-ensure  => present,
+ensure  => 'present',
 owner   => 'root',
 group   => 'root',
 mode=> '0750',
diff --git a/modules/openstack/manifests/glance/image_sync.pp 
b/modules/openstack/manifests/glance/image_sync.pp
index dfa6a1c..f96be67 100644
--- a/modules/openstack/manifests/glance/image_sync.pp
+++ b/modules/openstack/manifests/glance/image_sync.pp
@@ -17,7 +17,7 @@
 
 # Set up a keypair and rsync image files between active and standby
 user { 'glancesync':
-ensure => present,
+ensure => 'present',
 name   => 'glancesync',
 shell  => '/bin/sh',
 comment=> 'glance rsync user',
@@ -28,7 +28,7 @@
 }
 
 ssh::userkey { 'glancesync':
-ensure  => present,
+ensure  => 'present',
 require => User['glancesync'],
 content => secret('ssh/glancesync/glancesync.pub'),
 }
diff --git a/modules/openstack/manifests/glance/service.pp 
b/modules/openstack/manifests/glance/service.pp
index 5c2d4e8..29bd89c 100644
--- a/modules/openstack/manifests/glance/service.pp
+++ b/modules/openstack/manifests/glance/service.pp
@@ -14,7 +14,7 @@
 ) {
 
 package { 'glance':
-ensure  => present,
+ensure  => 'present',
 }
 
 file { $glance_data:
diff --git a/modules/openstack/manifests/keystone/service.pp 
b/modules/openstack/manifests/keystone/service.pp
index bbbdce7..44f8dfc 100644
--- a/modules/openstack/manifests/keystone/service.pp
+++ b/modules/openstack/manifests/keystone/service.pp
@@ -58,7 +58,7 @@
 
 if $token_driver == 'redis' {
 package { 'python-keystone-redis':
-ensure => present;
+ensure => 'present';
 }
 }
 
diff --git a/modules/openstack/manifests/nova/api/service.pp 
b/modules/openstack/manifests/nova/api/service.pp
index d7fe098..8011e9b 100644
--- a/modules/openstack/manifests/nova/api/service.pp
+++ b/modules/openstack/manifests/nova/api/service.pp
@@ -7,7 +7,7 @@
 require openstack::nova::common
 
 package { 'nova-api':
-ensure  => present,
+ensure  => 'present',
 }
 
 service { 'nova-api':
diff --git a/modules/openstack/manifests/nova/compute/service.pp 
b/modules/openstack/manifests/nova/compute/service.pp
index aad8727..15f5f07 100644
--- a/modules/openstack/manifests/nova/compute/service.pp
+++ b/modules/openstack/manifests/nova/compute/service.pp
@@ -24,14 +24,14 @@
 # was split from the bridge kernel module into a separate module 
(br_netfilter)
 if (versioncmp($::kernelversion, '3.18') >= 0) {
 kmod::module { 'br_netfilter':
-ensure => present,
+

[MediaWiki-commits] [Gerrit] labs...wikibugs2[master]: If its not working break it more.

2017-12-13 Thread Zppix (Code Review)
Zppix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398143 )

Change subject: If its not working break it more.
..

If its not working break it more.

Change-Id: Ic260bb976fb3d8ba7390d972d3a2086c97b93778
---
M channels.yaml
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 
refs/changes/43/398143/2

diff --git a/channels.yaml b/channels.yaml
index c25d575..6d65fff 100644
--- a/channels.yaml
+++ b/channels.yaml
@@ -279,8 +279,9 @@
 - Tool-Zppixbot
 - QuarryBot-enwiki
 - VPS-project-icinga2
+
 "#ZppixBot":
- - Tool-ZppixBot
+ - Tool-Zppixbot
 
 "#wikimedia-ops":
 - wikimedia-irc-freenode

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic260bb976fb3d8ba7390d972d3a2086c97b93778
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Zppix 
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...docker-pkg[master]: Do not lint .eggs/*

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

Change subject: Do not lint .eggs/*
..


Do not lint .eggs/*

It is a setuptools cache directory, there is no point in linting it.

Signed-off-by: Tyler Cipriani 
Change-Id: Ibfa9532b253500319b8db9e4610d63076c437a82
---
M tox.ini
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tox.ini b/tox.ini
index 9f9a395..74f1e09 100644
--- a/tox.ini
+++ b/tox.ini
@@ -18,6 +18,6 @@
 
 [flake8]
 # I couldn't care less about linting tests
-exclude = docker_pkg/tests/*, .tox/*
+exclude = docker_pkg/tests/*, .eggs/*, .tox/*
 # We're in 2017, we don't work on serial terminals anymore
 max-line-length=100

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfa9532b253500319b8db9e4610d63076c437a82
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/docker-pkg
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...jobqueue-deploy[master]: Update change-propagation to 341eb53

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

Change subject: Update change-propagation to 341eb53
..


Update change-propagation to 341eb53

List of changes:
341eb53 Fixed sha1-based deduplication and added dedupe tests

Change-Id: Idb06ff2a9becacbf1f8bd760b2d57a5185cf42dd
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src b/src
index 929bf07..341eb53 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 929bf07e8e13e6afce42388bdd812f4592806481
+Subproject commit 341eb536f5565c2f6bf52ad81b3d5f1c967b0dc8

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb06ff2a9becacbf1f8bd760b2d57a5185cf42dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/jobqueue-deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 

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


[MediaWiki-commits] [Gerrit] mediawiki...jobqueue-deploy[master]: Update change-propagation to 341eb53

2017-12-13 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398142 )

Change subject: Update change-propagation to 341eb53
..

Update change-propagation to 341eb53

List of changes:
341eb53 Fixed sha1-based deduplication and added dedupe tests

Change-Id: Idb06ff2a9becacbf1f8bd760b2d57a5185cf42dd
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/jobqueue-deploy
 refs/changes/42/398142/1

diff --git a/src b/src
index 929bf07..341eb53 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 929bf07e8e13e6afce42388bdd812f4592806481
+Subproject commit 341eb536f5565c2f6bf52ad81b3d5f1c967b0dc8

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb06ff2a9becacbf1f8bd760b2d57a5185cf42dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/jobqueue-deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] labs...wikibugs2[master]: I promise I understand how to write code and change configs....

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

Change subject: I promise I understand how to write code and change configs... 
it may take me 430 patchsets first.
..


I promise I understand how to write code and change configs... it may take me 
430 patchsets first.

Change-Id: I3df3ae93fa4b9b67793cdbf34755c4d39780d2e1
---
M channels.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/channels.yaml b/channels.yaml
index 61b61fc..c25d575 100644
--- a/channels.yaml
+++ b/channels.yaml
@@ -279,7 +279,7 @@
 - Tool-Zppixbot
 - QuarryBot-enwiki
 - VPS-project-icinga2
-"ZppixBot":
+"#ZppixBot":
  - Tool-ZppixBot
 
 "#wikimedia-ops":

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3df3ae93fa4b9b67793cdbf34755c4d39780d2e1
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Zppix 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: openstack: consistent style for ensure present

2017-12-13 Thread Rush (Code Review)
Rush has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398140 )

Change subject: openstack: consistent style for ensure present
..

openstack: consistent style for ensure present

present => 'present'

Change-Id: Ic9f75873e07dcfcc5dda4024ade8636a817d9179
---
M modules/openstack/manifests/clientlib.pp
M modules/openstack/manifests/designate/dns_floating_ip_updater.pp
M modules/openstack/manifests/glance/image_sync.pp
M modules/openstack/manifests/glance/service.pp
M modules/openstack/manifests/keystone/service.pp
M modules/openstack/manifests/nova/api/service.pp
M modules/openstack/manifests/nova/compute/service.pp
M modules/openstack/manifests/nova/conductor/service.pp
M modules/openstack/manifests/nova/network/service.pp
M modules/openstack/manifests/nova/spiceproxy/service.pp
M modules/openstack/manifests/util/admin_scripts.pp
M modules/openstack/manifests/wikitech/openstack_manager.pp
12 files changed, 27 insertions(+), 27 deletions(-)


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

diff --git a/modules/openstack/manifests/clientlib.pp 
b/modules/openstack/manifests/clientlib.pp
index d1e5ee1..85eda78 100644
--- a/modules/openstack/manifests/clientlib.pp
+++ b/modules/openstack/manifests/clientlib.pp
@@ -18,7 +18,7 @@
 
 # Wrapper python class to easily query openstack clients
 file { '/usr/lib/python2.7/dist-packages/mwopenstackclients.py':
-ensure => present,
+ensure => 'present',
 source => 
'puppet:///modules/openstack/clientlib/mwopenstackclients.py',
 mode   => '0755',
 owner  => 'root',
diff --git a/modules/openstack/manifests/designate/dns_floating_ip_updater.pp 
b/modules/openstack/manifests/designate/dns_floating_ip_updater.pp
index 9e284b0..1863946 100644
--- a/modules/openstack/manifests/designate/dns_floating_ip_updater.pp
+++ b/modules/openstack/manifests/designate/dns_floating_ip_updater.pp
@@ -21,7 +21,7 @@
 }
 
 file { '/etc/labs-floating-ips-dns-config.yaml':
-ensure  => present,
+ensure  => 'present',
 owner   => 'root',
 group   => 'root',
 mode=> '0440',
@@ -29,7 +29,7 @@
 }
 
 file { '/etc/dns-floating-ip-updater.py':
-ensure  => present,
+ensure  => 'present',
 owner   => 'root',
 group   => 'root',
 mode=> '0750',
diff --git a/modules/openstack/manifests/glance/image_sync.pp 
b/modules/openstack/manifests/glance/image_sync.pp
index dfa6a1c..f96be67 100644
--- a/modules/openstack/manifests/glance/image_sync.pp
+++ b/modules/openstack/manifests/glance/image_sync.pp
@@ -17,7 +17,7 @@
 
 # Set up a keypair and rsync image files between active and standby
 user { 'glancesync':
-ensure => present,
+ensure => 'present',
 name   => 'glancesync',
 shell  => '/bin/sh',
 comment=> 'glance rsync user',
@@ -28,7 +28,7 @@
 }
 
 ssh::userkey { 'glancesync':
-ensure  => present,
+ensure  => 'present',
 require => User['glancesync'],
 content => secret('ssh/glancesync/glancesync.pub'),
 }
diff --git a/modules/openstack/manifests/glance/service.pp 
b/modules/openstack/manifests/glance/service.pp
index 5c2d4e8..29bd89c 100644
--- a/modules/openstack/manifests/glance/service.pp
+++ b/modules/openstack/manifests/glance/service.pp
@@ -14,7 +14,7 @@
 ) {
 
 package { 'glance':
-ensure  => present,
+ensure  => 'present',
 }
 
 file { $glance_data:
diff --git a/modules/openstack/manifests/keystone/service.pp 
b/modules/openstack/manifests/keystone/service.pp
index bbbdce7..44f8dfc 100644
--- a/modules/openstack/manifests/keystone/service.pp
+++ b/modules/openstack/manifests/keystone/service.pp
@@ -58,7 +58,7 @@
 
 if $token_driver == 'redis' {
 package { 'python-keystone-redis':
-ensure => present;
+ensure => 'present';
 }
 }
 
diff --git a/modules/openstack/manifests/nova/api/service.pp 
b/modules/openstack/manifests/nova/api/service.pp
index d7fe098..8011e9b 100644
--- a/modules/openstack/manifests/nova/api/service.pp
+++ b/modules/openstack/manifests/nova/api/service.pp
@@ -7,7 +7,7 @@
 require openstack::nova::common
 
 package { 'nova-api':
-ensure  => present,
+ensure  => 'present',
 }
 
 service { 'nova-api':
diff --git a/modules/openstack/manifests/nova/compute/service.pp 
b/modules/openstack/manifests/nova/compute/service.pp
index aad8727..15f5f07 100644
--- a/modules/openstack/manifests/nova/compute/service.pp
+++ b/modules/openstack/manifests/nova/compute/service.pp
@@ -24,14 +24,14 @@
 # was split from the bridge kernel module into a separate module 
(br_netfilter)
 if (versioncmp($::kernelversion, '3.18') >= 0) {
 kmod::module { 'br_netfilter':
-ensure => present,
+   

[MediaWiki-commits] [Gerrit] labs...wikibugs2[master]: I promise I understand how to write code and change configs....

2017-12-13 Thread Zppix (Code Review)
Zppix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398139 )

Change subject: I promise I understand how to write code and change configs... 
it may take me 430 patchsets first.
..

I promise I understand how to write code and change configs... it may take me 
430 patchsets first.

Change-Id: I3df3ae93fa4b9b67793cdbf34755c4d39780d2e1
---
M channels.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 
refs/changes/39/398139/2

diff --git a/channels.yaml b/channels.yaml
index 61b61fc..c25d575 100644
--- a/channels.yaml
+++ b/channels.yaml
@@ -279,7 +279,7 @@
 - Tool-Zppixbot
 - QuarryBot-enwiki
 - VPS-project-icinga2
-"ZppixBot":
+"#ZppixBot":
  - Tool-ZppixBot
 
 "#wikimedia-ops":

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3df3ae93fa4b9b67793cdbf34755c4d39780d2e1
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Zppix 
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 mobileapps to ddddebb

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

Change subject: Update mobileapps to ebb
..


Update mobileapps to ebb

List of changes:
ebb Revert "Update section validation logic"
xxx Update node module dependencies

Change-Id: I329e1dff15f292808fffe25fb8e6db82b13364d9
---
M node_modules/kad/package.json
M node_modules/swagger-ui/package.json
M src
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/node_modules/kad/package.json b/node_modules/kad/package.json
index 9652936..addd045 100644
--- a/node_modules/kad/package.json
+++ b/node_modules/kad/package.json
@@ -49,7 +49,7 @@
 "/limitation"
   ],
   "_resolved": 
"git+https://github.com/gwicke/kad.git#936c91652d757ea6f9dd30e44698afb0daaa1d17;,
-  "_shasum": "e42470adf4cfc56fb00c7247c83db58bc9f1f2f5",
+  "_shasum": "2e09b771675fb9e5c4217ed5bdace8a8037cd064",
   "_shrinkwrap": null,
   "_spec": "kad@git+https://github.com/gwicke/kad.git#master;,
   "_where": "/opt/service/node_modules/limitation",
diff --git a/node_modules/swagger-ui/package.json 
b/node_modules/swagger-ui/package.json
index 556514d..45cb420 100644
--- a/node_modules/swagger-ui/package.json
+++ b/node_modules/swagger-ui/package.json
@@ -49,7 +49,7 @@
 "/"
   ],
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;,
-  "_shasum": "1d9bdaaab8aacc0dfb3ae106d1dfe829b0149c49",
+  "_shasum": "5e1c8e74520bc57bfa0f542d2b0fdd21fa83800e",
   "_shrinkwrap": null,
   "_spec": "swagger-ui@git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_where": "/opt/service",
diff --git a/src b/src
index bf67c97..ebb 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit bf67c970253ca701fde856330e0347581cd57063
+Subproject commit ebb87374b3c69ff6a3a71dffaf4e1e64af9b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I329e1dff15f292808fffe25fb8e6db82b13364d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/deploy
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: Mholloway 

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


  1   2   3   4   >