[MediaWiki-commits] [Gerrit] Add delaycompress to ganglia-web's logrotate to avoid daily ... - change (operations/puppet)

2016-04-18 Thread Elukey (Code Review)
Elukey has uploaded a new change for review.

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

Change subject: Add delaycompress to ganglia-web's logrotate to avoid daily 
cronspam.
..

Add delaycompress to ganglia-web's logrotate to avoid daily cronspam.

Bug: T132324
Change-Id: I68ff88177644fab8c54badc241e7a264dac3e56a
---
M modules/graphite/files/graphite-web-logrotate
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/graphite/files/graphite-web-logrotate 
b/modules/graphite/files/graphite-web-logrotate
index 206988e..75e7927 100644
--- a/modules/graphite/files/graphite-web-logrotate
+++ b/modules/graphite/files/graphite-web-logrotate
@@ -10,6 +10,7 @@
 /var/log/graphite-web/*.log {
 daily
 compress
+delaycompress
 size 300M
 rotate 0
 missingok

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

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

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


[MediaWiki-commits] [Gerrit] Change limit of 96 to 32 in CIDR calculator for IPv6 - change (mediawiki...CheckUser)

2016-04-18 Thread Glaisher (Code Review)
Glaisher has uploaded a new change for review.

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

Change subject: Change limit of 96 to 32 in CIDR calculator for IPv6
..

Change limit of 96 to 32 in CIDR calculator for IPv6

I don't know why 96 is the limit here but 96 is too small
to be useful and as far as I can tell, this does the
calculations correctly even for these ranges. Previously,
this was 64 but was changed in 
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/47240
which doesn't state any reason.

Bug: T132893
Change-Id: Ic047ba1f1faed853759bc7313c8a022ca71e876c
---
M modules/ext.checkuser.cidr.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ext.checkuser.cidr.js b/modules/ext.checkuser.cidr.js
index c305273..8c4eb3f 100644
--- a/modules/ext.checkuser.cidr.js
+++ b/modules/ext.checkuser.cidr.js
@@ -177,7 +177,7 @@
// Build the IP in CIDR form
prefixCidr = binPrefix.length;
// CIDR too small?
-   if ( prefixCidr < 96 ) {
+   if ( prefixCidr < 32 ) {
showResults( '!', '>' + Math.pow( 2, 128 - 
prefixCidr ) );
return; // too big
}
@@ -256,4 +256,4 @@
updateCIDRresult();
} );
 } );
-} )( mediaWiki, jQuery );
\ No newline at end of file
+} )( mediaWiki, jQuery );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic047ba1f1faed853759bc7313c8a022ca71e876c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: Glaisher 

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


[MediaWiki-commits] [Gerrit] Revert "ganglia-web: don't send Content-Disposition header w... - change (operations/puppet)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Revert "ganglia-web: don't send Content-Disposition header with 
JSON / CSV data"
..


Revert "ganglia-web: don't send Content-Disposition header with JSON / CSV data"

This reverts commit 941412303. Responses with a content
disposition of "inline" should actually be viewed by the browser.
Not sure why Chrome is refusing to do that.

Change-Id: Ie4c18c3c181ea7cf2bd92324104f38a563877e6e
---
M modules/ganglia/manifests/web.pp
1 file changed, 0 insertions(+), 10 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/modules/ganglia/manifests/web.pp b/modules/ganglia/manifests/web.pp
index 4b25cd9..1d46619 100644
--- a/modules/ganglia/manifests/web.pp
+++ b/modules/ganglia/manifests/web.pp
@@ -50,16 +50,6 @@
 require => Package['ganglia-webfrontend'],
 }
 
-# Comment out the lines that add the 'Content-Disposition: inline; 
filename=...'
-# header to responses to requests for CSV or JSON data. This should be a 
patch
-# in the ganglia-webfrontend package, probably. -- Ori 18-Apr-2016
-exec { 'comment_out_content_disposition_headers':
-command => '/bin/sed -i "/header(\"Content-Disposition/s/^/#/" 
graph.php',
-onlyif  => '/bin/grep -q "^header(\"Content-Disposition" 
graph.php',
-cwd => '/usr/share/ganglia-webfrontend',
-require => Package['ganglia-webfrontend'],
-}
-
 # Increase the default memory limit
 file_line { 'php.ini-memory':
 line   => 'memory_limit = 768M',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4c18c3c181ea7cf2bd92324104f38a563877e6e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Revert "ganglia-web: don't send Content-Disposition header w... - change (operations/puppet)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Revert "ganglia-web: don't send Content-Disposition header with 
JSON / CSV data"
..

Revert "ganglia-web: don't send Content-Disposition header with JSON / CSV data"

This reverts commit 941412303. Responses with a content
disposition of "inline" should actually be viewed by the browser.
Not sure why Chrome is refusing to do that.

Change-Id: Ie4c18c3c181ea7cf2bd92324104f38a563877e6e
---
M modules/ganglia/manifests/web.pp
1 file changed, 0 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/284131/1

diff --git a/modules/ganglia/manifests/web.pp b/modules/ganglia/manifests/web.pp
index 4b25cd9..1d46619 100644
--- a/modules/ganglia/manifests/web.pp
+++ b/modules/ganglia/manifests/web.pp
@@ -50,16 +50,6 @@
 require => Package['ganglia-webfrontend'],
 }
 
-# Comment out the lines that add the 'Content-Disposition: inline; 
filename=...'
-# header to responses to requests for CSV or JSON data. This should be a 
patch
-# in the ganglia-webfrontend package, probably. -- Ori 18-Apr-2016
-exec { 'comment_out_content_disposition_headers':
-command => '/bin/sed -i "/header(\"Content-Disposition/s/^/#/" 
graph.php',
-onlyif  => '/bin/grep -q "^header(\"Content-Disposition" 
graph.php',
-cwd => '/usr/share/ganglia-webfrontend',
-require => Package['ganglia-webfrontend'],
-}
-
 # Increase the default memory limit
 file_line { 'php.ini-memory':
 line   => 'memory_limit = 768M',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4c18c3c181ea7cf2bd92324104f38a563877e6e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] ganglia-web: don't send Content-Disposition header with JSON... - change (operations/puppet)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: ganglia-web: don't send Content-Disposition header with JSON / 
CSV data
..


ganglia-web: don't send Content-Disposition header with JSON / CSV data

Make Ganglia not send a "Content-Disposition: inline; filename=..." header when
responding to requests for CSV or JSON data, so that such data could be more
easily viewed in the browser.

Change-Id: I626eb3020f1e4eb5d4d648cc563c9e391227558d
---
M modules/ganglia/manifests/web.pp
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ganglia/manifests/web.pp b/modules/ganglia/manifests/web.pp
index 1d46619..4b25cd9 100644
--- a/modules/ganglia/manifests/web.pp
+++ b/modules/ganglia/manifests/web.pp
@@ -50,6 +50,16 @@
 require => Package['ganglia-webfrontend'],
 }
 
+# Comment out the lines that add the 'Content-Disposition: inline; 
filename=...'
+# header to responses to requests for CSV or JSON data. This should be a 
patch
+# in the ganglia-webfrontend package, probably. -- Ori 18-Apr-2016
+exec { 'comment_out_content_disposition_headers':
+command => '/bin/sed -i "/header(\"Content-Disposition/s/^/#/" 
graph.php',
+onlyif  => '/bin/grep -q "^header(\"Content-Disposition" 
graph.php',
+cwd => '/usr/share/ganglia-webfrontend',
+require => Package['ganglia-webfrontend'],
+}
+
 # Increase the default memory limit
 file_line { 'php.ini-memory':
 line   => 'memory_limit = 768M',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I626eb3020f1e4eb5d4d648cc563c9e391227558d
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Increase php memory-limit for ganglia-web from 256 to 768 - change (operations/puppet)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Increase php memory-limit for ganglia-web from 256 to 768
..


Increase php memory-limit for ganglia-web from 256 to 768

ganglia-web is sluggish and uranium has the RAM.

Change-Id: I8359ebca799e646800bae02520ae044489ec
---
M modules/ganglia/manifests/web.pp
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ganglia/manifests/web.pp b/modules/ganglia/manifests/web.pp
index f3197cd..1d46619 100644
--- a/modules/ganglia/manifests/web.pp
+++ b/modules/ganglia/manifests/web.pp
@@ -52,7 +52,8 @@
 
 # Increase the default memory limit
 file_line { 'php.ini-memory':
-line   => 'memory_limit = 256M',
+line   => 'memory_limit = 768M',
+match  => '^memory_limit\s*=',
 path   => '/etc/php5/apache2/php.ini',
 notify => Class['::apache']
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8359ebca799e646800bae02520ae044489ec
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ganglia-web: don't send Content-Disposition header with JSON... - change (operations/puppet)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: ganglia-web: don't send Content-Disposition header with JSON / 
CSV data
..

ganglia-web: don't send Content-Disposition header with JSON / CSV data

Make Ganglia not send a "Content-Disposition: inline; filename=..." header when
responding to requests for CSV or JSON data, so that such data could be more
easily viewed in the browser.

Change-Id: I626eb3020f1e4eb5d4d648cc563c9e391227558d
---
M modules/ganglia/manifests/web.pp
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/284130/1

diff --git a/modules/ganglia/manifests/web.pp b/modules/ganglia/manifests/web.pp
index 1d46619..ded0a45 100644
--- a/modules/ganglia/manifests/web.pp
+++ b/modules/ganglia/manifests/web.pp
@@ -50,6 +50,16 @@
 require => Package['ganglia-webfrontend'],
 }
 
+# Comment out the lines that add the 'Content-Disposition: inline; 
filename=...'
+# header to responses to requests for CSV or JSON data. This should be a 
patch
+# in the ganglia-webfrontend package, probably. -- Ori 18-Apr-2016
+exec { 'comment_out_content_disposition_headers':
+command => '/bin/sed -i "/header(\"Content-Disposition/s/^/#/" 
graph.php',
+onlyif  => '/bin/grep -q "^header(\"Content-Disposition" 
graph.php',
+cwd => '/usr/share/ganglia-webfrontend'
+require => Package['ganglia-webfrontend'],
+}
+
 # Increase the default memory limit
 file_line { 'php.ini-memory':
 line   => 'memory_limit = 768M',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I626eb3020f1e4eb5d4d648cc563c9e391227558d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Increase php memory-limit for ganglia-web from 256 to 768 - change (operations/puppet)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Increase php memory-limit for ganglia-web from 256 to 768
..

Increase php memory-limit for ganglia-web from 256 to 768

ganglia-web is sluggish and uranium has the RAM.

Change-Id: I8359ebca799e646800bae02520ae044489ec
---
M modules/ganglia/manifests/web.pp
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/modules/ganglia/manifests/web.pp b/modules/ganglia/manifests/web.pp
index f3197cd..1d46619 100644
--- a/modules/ganglia/manifests/web.pp
+++ b/modules/ganglia/manifests/web.pp
@@ -52,7 +52,8 @@
 
 # Increase the default memory limit
 file_line { 'php.ini-memory':
-line   => 'memory_limit = 256M',
+line   => 'memory_limit = 768M',
+match  => '^memory_limit\s*=',
 path   => '/etc/php5/apache2/php.ini',
 notify => Class['::apache']
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8359ebca799e646800bae02520ae044489ec
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Add a simple script to run all the sorted errors in one go - change (analytics/limn-language-data)

2016-04-18 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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

Change subject: Add a simple script to run all the sorted errors in one go
..

Add a simple script to run all the sorted errors in one go

Change-Id: Id246c8adf73b3138b7c71a4b1ed668cede82bcdd
---
A bash/srp.sh
1 file changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-language-data 
refs/changes/28/284128/1

diff --git a/bash/srp.sh b/bash/srp.sh
new file mode 100755
index 000..4027cc7
--- /dev/null
+++ b/bash/srp.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+yesterday=`date --date=yesterday +%Y%m%d`
+week_ago=`date --date="a week ago" +%Y%m%d`
+
+echo Save:
+./sorted_save_events.py $yesterday
+
+echo Restore
+./sorted_restore_events.py $yesterday
+
+echo Publish
+./sorted_publish_events.py $yesterday
+
+echo What was published yesterday
+./what_was_published.py $yesterday
+
+echo What was published a week ago
+./what_was_published.py $week_ago
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id246c8adf73b3138b7c71a4b1ed668cede82bcdd
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-language-data
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] Add missing properties and methods to maint classes - change (mediawiki...CirrusSearch)

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

Change subject: Add missing properties and methods to maint classes
..


Add missing properties and methods to maint classes

There were a few undefined properties we just magic into place, and
one method that somehow doesn't exist. Not sure how we havn't hit
an undefined method warning there yet...

It also turns out runSearch only worked with full text search, light
refactoring has fixed that and made prefix and completion search work
again.

Bug: T132625
Change-Id: If24f72e514535190369958dde6323d340ad88ea6
---
M includes/Sanity/Checker.php
M maintenance/forceSearchIndex.php
M maintenance/runSearch.php
M maintenance/saneitize.php
M maintenance/updateSuggesterIndex.php
5 files changed, 84 insertions(+), 21 deletions(-)

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



diff --git a/includes/Sanity/Checker.php b/includes/Sanity/Checker.php
index eec49f0..f8b3718 100644
--- a/includes/Sanity/Checker.php
+++ b/includes/Sanity/Checker.php
@@ -28,9 +28,24 @@
  */
 
 class Checker {
+   /**
+* @var Connection
+*/
private $connection;
+
+   /**
+* @var Searcher Used for fetching data, so we can check the content.
+*/
private $searcher;
+
+   /**
+* @var Remediator Do something with the problems we found
+*/
private $remediator;
+
+   /**
+* @var bool Should we log id's that are found to have no problems
+*/
private $logSane;
 
/**
@@ -39,9 +54,9 @@
 * @param Remediator $remediator the remediator to which to send titles
 *   that are insane
 * @param Searcher $searcher searcher to use for fetches
-* @param boolean $logSane should we log sane ids
+* @param bool $logSane should we log sane ids
 */
-   public function __construct( Connection $connection, $remediator, 
$searcher, $logSane ) {
+   public function __construct( Connection $connection, Remediator 
$remediator, Searcher $searcher, $logSane ) {
$this->connection = $connection;
$this->remediator = $remediator;
$this->searcher = $searcher;
@@ -50,6 +65,7 @@
 
/**
 * Check if a title is insane.
+*
 * @param int $pageId page to check
 * @return Status status of the operation
 */
diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php
index ac6af80..d7914ee 100644
--- a/maintenance/forceSearchIndex.php
+++ b/maintenance/forceSearchIndex.php
@@ -460,7 +460,7 @@
private function findDeletes( $minUpdate, $minNamespace, $minTitle, 
$maxUpdate ) {
$dbr = $this->getDB( DB_SLAVE );
$minUpdate = $dbr->addQuotes( $dbr->timestamp( $minUpdate ) );
-   $minNamespace = $dbr->addQuotes( $minNamespace );
+   $minNamespace = $dbr->addQuotes( (string) $minNamespace );
$minTitle = $dbr->addQuotes( $minTitle );
$maxUpdate = $dbr->addQuotes( $dbr->timestamp( $maxUpdate ) );
$where = array(
diff --git a/maintenance/runSearch.php b/maintenance/runSearch.php
index a008b03..17aa313 100644
--- a/maintenance/runSearch.php
+++ b/maintenance/runSearch.php
@@ -6,6 +6,7 @@
 use CirrusSearch\Searcher;
 use CirrusSearch\Search\ResultSet;
 use RequestContext;
+use SearchSuggestionSet;
 use Status;
 
 /**
@@ -135,16 +136,21 @@
);
$result = $value->next();
}
-   } elseif ( is_array ($value ) ) {
+   } elseif ( $value instanceof SearchSuggestionSet ) {
// these are suggestion results
-   $data['totalHits'] = count( $value );
-   foreach ( $value as $row ) {
+   $data['totalHits'] = $value->getSize();
+   foreach ( $value->getSuggestions() as 
$suggestion ) {
$data['rows'][] = array(
-   'pageId' => $row['pageId'],
-   'title' => 
$row['title']->getPrefixedText(),
+   'pageId' => 
$suggestion->getSuggestedTitleID(),
+   'title' => 
$suggestion->getSuggestedTitle()->getPrefixedText(),
'snippets' => array(),
);
}
+   } else {
+   throw new \RuntimeException(
+   "Unkno

[MediaWiki-commits] [Gerrit] Add log action filtering for gblblock - change (mediawiki...GlobalBlocking)

2016-04-18 Thread Glaisher (Code Review)
Glaisher has submitted this change and it was merged.

Change subject: Add log action filtering for gblblock
..


Add log action filtering for gblblock

Bug: T109270
Change-Id: Id314c8d9e69499ab90dd29617689a8e63433507f
---
M GlobalBlocking.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 21 insertions(+), 2 deletions(-)

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



diff --git a/GlobalBlocking.php b/GlobalBlocking.php
index f7e8473..fd280b1 100644
--- a/GlobalBlocking.php
+++ b/GlobalBlocking.php
@@ -65,6 +65,13 @@
 $wgLogActions['gblblock/whitelist'] = 'globalblocking-whitelist-logentry';
 $wgLogActions['gblblock/dwhitelist'] = 'globalblocking-dewhitelist-logentry'; 
// Stupid logging table doesn't like >16 chars
 $wgLogActions['gblblock/modify'] = 'globalblocking-modify-logentry';
+$wgActionFilteredLogs['gblblock'] = array(
+   'gblock' => array( 'gblock', 'gblock2' ),
+   'gunblock' => array( 'gunblock' ),
+   'modify' => array( 'modify' ),
+   'whitelist' => array( 'whitelist' ),
+   'dwhitelist' => array( 'dwhitelist' )
+);
 
 ## Permissions
 $wgGroupPermissions['steward']['globalblock'] = true;
diff --git a/i18n/en.json b/i18n/en.json
index 029fe1d..6579241 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -109,5 +109,11 @@
"apihelp-query+globalblocks-param-limit": "The maximum amount of blocks 
to list.",
"apihelp-query+globalblocks-param-prop": "Which properties to get.",
"apihelp-query+globalblocks-example-1": "List all global blocks",
-   "apihelp-query+globalblocks-example-2": "List global blocks applying to 
IP address 192.0.2.18"
+   "apihelp-query+globalblocks-example-2": "List global blocks applying to 
IP address 192.0.2.18",
+   "log-action-filter-gblblock": "Type of global block:",
+   "log-action-filter-gblblock-gblock": "Global block",
+   "log-action-filter-gblblock-gunblock": "Global unblock",
+   "log-action-filter-gblblock-modify": "Global block modification",
+   "log-action-filter-gblblock-whitelist": "Global block whitelist 
addition",
+   "log-action-filter-gblblock-dwhitelist": "Global block whitelist 
removal"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 8a07ea7..49e7f57 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -134,5 +134,11 @@
"apihelp-query+globalblocks-param-limit": 
"{{doc-apihelp-param|query+globalblocks|limit}}",
"apihelp-query+globalblocks-param-prop": 
"{{doc-apihelp-param|query+globalblocks|prop}}",
"apihelp-query+globalblocks-example-1": 
"{{doc-apihelp-example|query+globalblocks}}",
-   "apihelp-query+globalblocks-example-2": 
"{{doc-apihelp-example|query+globalblocks}}"
+   "apihelp-query+globalblocks-example-2": 
"{{doc-apihelp-example|query+globalblocks}}",
+   "log-action-filter-gblblock": "{{doc-log-action-filter-type|gblblock}}",
+   "log-action-filter-gblblock-gblock": 
"{{doc-log-action-filter-action|gblblock|gblock}}",
+   "log-action-filter-gblblock-gunblock": 
"{{doc-log-action-filter-action|gblblock|gunblock}}",
+   "log-action-filter-gblblock-modify": 
"{{doc-log-action-filter-action|gblblock|modify}}",
+   "log-action-filter-gblblock-whitelist": 
"{{doc-log-action-filter-action|gblblock|whitelist}}",
+   "log-action-filter-gblblock-dwhitelist": 
"{{doc-log-action-filter-action|gblblock|dwhitelist}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id314c8d9e69499ab90dd29617689a8e63433507f
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/GlobalBlocking
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Glaisher 
Gerrit-Reviewer: MGChecker 
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] CRM-17983, CRM-18401 sanitise post params on activity tab - change (wikimedia...civicrm)

2016-04-18 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17983, CRM-18401 sanitise post params on activity tab
..

CRM-17983, CRM-18401 sanitise post params on activity tab

Change-Id: Ie26a0a89e0b830d1c41a7cbc989d769b9cc70ef7
---
M CRM/Activity/Page/AJAX.php
1 file changed, 24 insertions(+), 3 deletions(-)


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

diff --git a/CRM/Activity/Page/AJAX.php b/CRM/Activity/Page/AJAX.php
index 9c79eae..63f59b2 100644
--- a/CRM/Activity/Page/AJAX.php
+++ b/CRM/Activity/Page/AJAX.php
@@ -474,7 +474,12 @@
 $sort = isset($_REQUEST['iSortCol_0']) ? 
CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 
'Integer'), $sortMapper) : NULL;
 $sortOrder = isset($_REQUEST['sSortDir_0']) ? 
CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
 
-$params = $_POST;
+$params = self::getWhiteListedParametersFromPost(array(
+  'contact_id' => 'Integer',
+  'activity_type_exclude_id' => 'Integer',
+  'activity_type_id' => 'Integer',
+));
+
 if ($sort && $sortOrder) {
   $params['sortBy'] = $sort . ' ' . $sortOrder;
 }
@@ -497,8 +502,7 @@
 }
 
 // store the activity filter preference CRM-11761
-$session = CRM_Core_Session::singleton();
-$userID = $session->get('userID');
+$userID = CRM_Core_Session::singleton()->getLoggedInContactID();;
 if ($userID) {
   //flush cache before setting filter to account for global cache 
(memcache)
   $domainID = CRM_Core_Config::domainID();
@@ -548,4 +552,21 @@
 CRM_Utils_System::civiExit();
   }
 
+  /**
+   * Get parameters from the POST according to a specified white list.
+   * @param $postParams
+   * @return array
+   */
+  protected static function getWhiteListedParametersFromPost($postParams) {
+$params = array();
+foreach ($postParams as $postParam => $paramType) {
+  // Note that as all the existing ones are Integers they do not need 
escaping.
+  $params[$postParam] = CRM_Utils_Request::retrieve($postParam, 
$paramType);
+  if ($params[$postParam] && $paramType != 'Integer') {
+$params[$postParam] = CRM_Utils_Type::escape($postParam, $paramType);
+  }
+}
+return $params;
+  }
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie26a0a89e0b830d1c41a7cbc989d769b9cc70ef7
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] CRM-18409 fix inability to view activity if source contact i... - change (wikimedia...civicrm)

2016-04-18 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18409 fix inability to view activity if source contact id 
is deleted.
..

CRM-18409 fix inability to view activity if source contact id is deleted.

This fix adds the ability to access activities through the api with the same 
permission checks as in the BAO if 'id' is passed in (and contact_id is not for 
'supporting legacy stuff reasons').

Note that the api functionality is a good thing, but it is actually being added 
primarily for the purposes of being able to add a test fix for the change

Upstream PR includes the tests:

https://github.com/civicrm/civicrm-core/pull/8170

Change-Id: Ie420ba08e506fab6d7647a4f9ae7315b4abc7dc2
---
M CRM/Activity/BAO/Activity.php
M CRM/Core/DAO/permissions.php
M api/v3/Activity.php
3 files changed, 34 insertions(+), 0 deletions(-)


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

diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php
index f42e030..72486b0 100644
--- a/CRM/Activity/BAO/Activity.php
+++ b/CRM/Activity/BAO/Activity.php
@@ -2417,6 +2417,9 @@
   if ($sourceContactId) {
 $allow = CRM_Contact_BAO_Contact_Permission::allow($sourceContactId, 
$permission);
   }
+  else {
+$allow = TRUE;
+  }
 }
 
 //check for target and assignee contacts.
diff --git a/CRM/Core/DAO/permissions.php b/CRM/Core/DAO/permissions.php
index 66012a5..d6af45a 100644
--- a/CRM/Core/DAO/permissions.php
+++ b/CRM/Core/DAO/permissions.php
@@ -145,6 +145,12 @@
   'access CiviCRM',
   'delete activities',
 ),
+'get' => array(
+  'access CiviCRM',
+  // Note that view all activities is also required within the api
+  // if the id is not passed in. Where the id is passed in the activity
+  // specific check functions are used and tested.
+),
 'default' => array(
   'access CiviCRM',
   'view all activities',
diff --git a/api/v3/Activity.php b/api/v3/Activity.php
index bbdeca3..186713a 100644
--- a/api/v3/Activity.php
+++ b/api/v3/Activity.php
@@ -230,8 +230,33 @@
  *   Array per getfields documentation.
  *
  * @return array
+ *   API result array
+ *
+ * @throws \API_Exception
+ * @throws \CiviCRM_API3_Exception
+ * @throws \Civi\API\Exception\UnauthorizedException
  */
 function civicrm_api3_activity_get($params) {
+  if (!empty($params['check_permissions']) && 
!CRM_Core_Permission::check('view all activities')) {
+// In absence of view all activities permission it's possible to see a 
specific activity by ACL.
+// Note still allowing view all activities to override ACLs is based on 
the 'don't change too much
+// if you are not sure principle' and it could be argued that the ACLs 
should always be applied.
+if (empty($params['id']) || !empty($params['contact_id'])) {
+  // We fall back to the original blunt permissions if we don't have an id 
to check or we are about
+  // to go to the weird place that the legacy 'contact_id' parameter takes 
us to.
+  throw new \Civi\API\Exception\UnauthorizedException(
+"Cannot access activities. Required permission: 'view all activities''"
+  );
+}
+else {
+  if (!CRM_Activity_BAO_Activity::checkPermission($params['id'], 
CRM_Core_Action::VIEW)) {
+throw new \Civi\API\Exception\UnauthorizedException(
+  'You do not have permission to view this activity'
+);
+  }
+}
+  }
+
   if (!empty($params['contact_id'])) {
 $activities = 
CRM_Activity_BAO_Activity::getContactActivity($params['contact_id']);
 // BAO function doesn't actually return a contact ID - hack api for now & 
add to test so when api re-write

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie420ba08e506fab6d7647a4f9ae7315b4abc7dc2
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] Repool pc1006 and pc2006 - change (operations/mediawiki-config)

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

Change subject: Repool pc1006 and pc2006
..


Repool pc1006 and pc2006

Change-Id: I2de91d2180c0de3be32c2314a4e80a248e934f93
---
M wmf-config/db-codfw.php
M wmf-config/db-eqiad.php
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jcrespo: Looks good to me, approved
  Ori.livneh: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 85ac0f8..f1cbd61 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -10,7 +10,7 @@
 $wmgParserCacheDBs = array(
'10.64.0.12'   => '10.192.16.170', # pc2004
'10.64.32.72'  => '10.192.32.128', # pc2005
-#  '10.64.48.128' => '10.192.48.39',  # pc2006
+   '10.64.48.128' => '10.192.48.39',  # pc2006
 );
 
 $wmgOldExtTemplate = array(
diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 3d9c965..7d1f1b8 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -10,7 +10,7 @@
 $wmgParserCacheDBs = array(
'10.64.0.12'   => '10.64.0.12',   # pc1004
'10.64.32.72'  => '10.64.32.72',  # pc1005
-#  '10.64.48.128' => '10.64.48.128', # pc1006
+   '10.64.48.128' => '10.64.48.128', # pc1006
 );
 
 $wmgOldExtTemplate = array(

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

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

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


[MediaWiki-commits] [Gerrit] Unlisted special page for displaying notification configuration - change (mediawiki...Echo)

2016-04-18 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Unlisted special page for displaying notification configuration
..

Unlisted special page for displaying notification configuration

This provides a simple unlisted special page,
Special:DisplayNotificationsConfiguration, to document how the
notifications are structured and configured.  It shows:

* Which types are in each category
* Which notify types (web/email) can be enabled for each category
* Which notify types are mandatory for each category
* Which notify types are enabled by default:
** For existing users
** For new users

Bug: T132127
Change-Id: I25b447a69a7c984941dfd703345d7977cbfe
---
M Echo.alias.php
M Echo.php
M autoload.php
M i18n/en.json
M i18n/qqq.json
A includes/special/SpecialDisplayNotificationsConfiguration.php
6 files changed, 292 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/25/284125/1

diff --git a/Echo.alias.php b/Echo.alias.php
index 99098ad..1aaedd3 100644
--- a/Echo.alias.php
+++ b/Echo.alias.php
@@ -12,6 +12,7 @@
 /** English (English) */
 $specialPageAliases['en'] = array(
'Notifications' => array( 'Notifications' ),
+   'DisplayNotificationsConfiguration' => array( 
'DisplayNotificationsConfiguration' ),
 );
 
 /** Arabic (العربية) */
diff --git a/Echo.php b/Echo.php
index 912398e..52fc854 100644
--- a/Echo.php
+++ b/Echo.php
@@ -62,6 +62,7 @@
 
 // Special page
 $wgSpecialPages['Notifications'] = 'SpecialNotifications';
+$wgSpecialPages['DisplayNotificationsConfiguration'] = 
'SpecialDisplayNotificationsConfiguration';
 
 // Housekeeping hooks
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'EchoHooks::onLoadExtensionSchemaUpdates';
diff --git a/autoload.php b/autoload.php
index 6d636c6..96a163f 100644
--- a/autoload.php
+++ b/autoload.php
@@ -107,6 +107,7 @@
'MWEchoNotificationEmailBundleJob' => __DIR__ . 
'/includes/jobs/NotificationEmailBundleJob.php',
'NotificationControllerTest' => __DIR__ . 
'/tests/phpunit/controller/NotificationControllerTest.php',
'NotificationsTest' => __DIR__ . '/tests/NotificationsTest.php',
+   'SpecialDisplayNotificationsConfiguration' => __DIR__ . 
'/includes/special/SpecialDisplayNotificationsConfiguration.php',
'SpecialNotifications' => __DIR__ . 
'/includes/special/SpecialNotifications.php',
'SpecialNotificationsFormatter' => __DIR__ . 
'/includes/formatters/SpecialNotificationsFormatter.php',
'SuppressionMaintenanceTest' => __DIR__ . 
'/tests/phpunit/maintenance/SupressionMaintenanceTest.php',
diff --git a/i18n/en.json b/i18n/en.json
index 258e31e..3e79afe 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -80,6 +80,17 @@
"notifications": "Notifications",
"tooltip-pt-notifications-alert": "{{GENDER:|Your}} alerts",
"tooltip-pt-notifications-message": "{{GENDER:|Your}} messages",
+   "echo-displaynotificationsconfiguration": "Display Notifications 
configuration",
+   "echo-displaynotificationsconfiguration-summary": "This is an overview 
of how Notifications are configured on this wiki.",
+   
"echo-displaynotificationsconfiguration-notifications-by-category-header": 
"Notifications by category",
+   
"echo-displaynotificationsconfiguration-available-notification-methods-header": 
"Allowed notification methods",
+   
"echo-displaynotificationsconfiguration-available-notification-methods-by-category-legend":
 "Which notification methods are supported for each category",
+   
"echo-displaynotificationsconfiguration-available-notification-methods-by-type-legend":
 "Which notification methods are supported for each type; only applies to types 
within categories that are hidden from preferences",
+   "echo-displaynotificationsconfiguration-enabled-default-header": 
"Enabled by default",
+   
"echo-displaynotificationsconfiguration-enabled-default-existing-users-legend": 
"Existing users",
+   
"echo-displaynotificationsconfiguration-enabled-default-new-users-legend": "New 
users",
+   
"echo-displaynotificationsconfiguration-mandatory-notification-methods-header": 
"Required notification methods",
+   
"echo-displaynotificationsconfiguration-mandatory-notification-methods-by-category-legend":
 "Which notification methods are mandatory for each category",
"echo-specialpage": "Notifications",
"echo-anon": "To receive notifications, [$1 create an account] or [$2 
log in].",
"echo-none": "You have no notifications.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ecfd82b..375f84f 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -69,6 +69,17 @@
"echo-no-title": "Shown in place of a page title in a notification if 
the notification has no specified page title.",
"echo-error-no-formatter": "Error message displayed when no formatting 
has 

[MediaWiki-commits] [Gerrit] WIP: BREAKING CHANGE: Change $wgEchoDefaultNotificationTypes... - change (mediawiki...Echo)

2016-04-18 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: WIP: BREAKING CHANGE: Change $wgEchoDefaultNotificationTypes to 
be logical
..

WIP: BREAKING CHANGE: Change $wgEchoDefaultNotificationTypes to be logical

Despite claiming to be about categories, $wgEchoDefaultNotificationTypes
was actually configuring both categories and types (which go inside
categories).

For example, 'thank-you-edit' is a type, but 'emailuser' is both
a category and a type (when used as a category, this has special
effects at Special:Preferences).

Since types and categories can and do have the same names, this leaves
no way to properly and unambiguously configure them.  It also makes it
difficult to document what is going on (as required by T132127).

Split into three variables:

$wgDefaultNotifyTypeAvailability - Applies unless overriden

$wgNotifyTypeAvailabilityByCategory - By category; this can and is
displayed at Special:Preferences

$wgNotifyTypeAvailabilityByNotificationType - By type; this can not
be displayed at Special:Preferences.  To avoid confusing the user,
we introduce a restriction (which was previously followed in practice,
AFAICT) that types can only be overriden if the category is not
displayed in preferences.

Otherwise, it can look to the user like a category is on/off, but the
types within might have the opposite state.

Due to this configuration change, this is a breaking change, and needs
coordinated deployments.

This also lays the groundwork for T132127

Also change terminology to consistently use "notify type" for web/email.

It was mixing between that and output format (which unfortunately
sounds like the API format, e.g. 'model').

Bug: T132820
Bug: T132127
Change-Id: I09f39f5fc5f13f3253af9f7819bca81f1601da93
---
M Echo.php
M Hooks.php
M includes/AttributeManager.php
M includes/controller/NotificationController.php
M tests/phpunit/AttributeManagerTest.php
M tests/phpunit/controller/NotificationControllerTest.php
6 files changed, 248 insertions(+), 67 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/24/284124/1

diff --git a/Echo.php b/Echo.php
index 7499560..912398e 100644
--- a/Echo.php
+++ b/Echo.php
@@ -171,23 +171,43 @@
 // notification popup
 $wgEchoFooterNoticeURL = '';
 
-// Define which output formats are available for each notification category
-$wgEchoDefaultNotificationTypes = array(
-   'all' => array(
+// Allowed notify types for all notifications and categories, unless overriden
+// on a per-category or per-type basis.
+// All of the keys from $wgEchoNotifiers must also be keys here.
+$wgDefaultNotifyTypeAvailability = array(
+   'web' => true,
+   'email' => true,
+);
+
+// Define which notify types are available for each notification category
+// If any notify types are omitted, it defaults to 
$wgDefaultNotifyTypeAvailability.
+$wgNotifyTypeAvailabilityByCategory = array(
+   // Otherwise, a user->user email could trigger an additional redundant
+   // notification email.
+   'emailuser' => array(
'web' => true,
-   'email' => true,
+   'email' => false,
),
+);
+
+// Define which notifier (e.g. web/email) types are available for each 
notification type
+// (e.g. welcome).  Notification types are the keys of 
$wgEchoNotificationCategories.
+//
+// This is *ONLY* considered if the category is 'no-dismiss'.  Otherwise,
+// use $wgNotifyTypeAvailabilityByCategory
+//
+// Without this constraint, we would have no way to display this information
+// on Special:Preferences in a non-misleading way.
+//
+// If any notify types are omitted, it defaults to 
$wgNotifyTypeAvailabilityByCategory
+// which itself defaults to $wgDefaultNotifyTypeAvailability.
+$wgNotifyTypeAvailabilityByNotificationType = array(
// Only send web notification for welcome event
'welcome' => array(
'email' => false,
),
// … and for edit threshold events
'thank-you-edit' => array(
-   'email' => false,
-   ),
-   // No need to get a email when another user sends to me
-   'emailuser' => array(
-   'web' => true,
'email' => false,
),
 );
@@ -219,20 +239,26 @@
 $wgEchoUseCrossWikiBetaFeature = false;
 
 // Define the categories that notifications can belong to. Categories can be
-// assigned the following parameters: priority, nodismiss, tooltip, and 
usergroups.
+// assigned the following parameters: priority, no-dismiss, tooltip, and 
usergroups.
+//
 // All parameters are optional.
+//
 // If a notifications type doesn't have a category parameter, it is
 // automatically assigned to the 'other' category which is lowest priority and
 // has no preferences or dismissibility.
+//
 // The priority parameter controls the order in which notifications are
 // displayed in p

[MediaWiki-commits] [Gerrit] Repool pc1006 and pc2006 - change (operations/mediawiki-config)

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

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

Change subject: Repool pc1006 and pc2006
..

Repool pc1006 and pc2006

Change-Id: I2de91d2180c0de3be32c2314a4e80a248e934f93
---
M wmf-config/db-codfw.php
M wmf-config/db-eqiad.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 85ac0f8..f1cbd61 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -10,7 +10,7 @@
 $wmgParserCacheDBs = array(
'10.64.0.12'   => '10.192.16.170', # pc2004
'10.64.32.72'  => '10.192.32.128', # pc2005
-#  '10.64.48.128' => '10.192.48.39',  # pc2006
+   '10.64.48.128' => '10.192.48.39',  # pc2006
 );
 
 $wmgOldExtTemplate = array(
diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 3d9c965..7d1f1b8 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -10,7 +10,7 @@
 $wmgParserCacheDBs = array(
'10.64.0.12'   => '10.64.0.12',   # pc1004
'10.64.32.72'  => '10.64.32.72',  # pc1005
-#  '10.64.48.128' => '10.64.48.128', # pc1006
+   '10.64.48.128' => '10.64.48.128', # pc1006
 );
 
 $wmgOldExtTemplate = array(

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

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

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


[MediaWiki-commits] [Gerrit] Segment stash edit cache stats by basis for hit/miss - change (mediawiki/core)

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

Change subject: Segment stash edit cache stats by basis for hit/miss
..


Segment stash edit cache stats by basis for hit/miss

Instead of just counting cache hits and misses, segment the counts by reason,
so we can differentiate (for example) timestamp-based cache hits from
staleness-check-survivor cache hits. I want this data so I can determine
whether increasing the cutoff for timestamp-based hits from 3 to 5 seconds has
a substantial enough impact to warrant the slightly weaker consistency.

Also changed 'cache-hit' to 'cache_hit'. MediaWiki normalizes the dash to an
underscore anyway, but the normalization is there for dynamically-constructed
key names (or name segments). In the case of hard-coded values, it is desirable
for the code to be as close as possible to the final form of the metric name,
to simplify metric lookup.

Change-Id: I0cd61da9746e3ca3695e23200f698b8b1371798c
(cherry picked from commit 0f1ffa4da707217ab2dc1efae68c8ced24500548)
---
M includes/api/ApiStashEdit.php
1 file changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 3c02c9c..cc8e390 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -272,18 +272,18 @@
}
 
$timeMs = 1000 * max( 0, microtime( true ) - $start );
-   $stats->timing( 'editstash.lock-wait-time', $timeMs );
+   $stats->timing( 'editstash.lock_wait_time', $timeMs );
}
 
if ( !is_object( $editInfo ) || !$editInfo->output ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 'editstash.cache_misses.no_stash' );
$logger->debug( "No cache value for key '$key'." );
return false;
}
 
$time = wfTimestamp( TS_UNIX, $editInfo->output->getTimestamp() 
);
if ( ( time() - $time ) <= 3 ) {
-   $stats->increment( 'editstash.cache-hits' );
+   $stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Timestamp-based cache hit for key 
'$key'." );
return $editInfo; // assume nothing changed
}
@@ -312,7 +312,7 @@
}
 
if ( $changed || $res->numRows() != $templateUses ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 
'editstash.cache_misses.proven_stale' );
$logger->info( "Stale cache for key '$key'; 
template changed." );
return false;
}
@@ -336,13 +336,13 @@
}
 
if ( $changed || $res->numRows() != count( $files ) ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 
'editstash.cache_misses.proven_stale' );
$logger->info( "Stale cache for key '$key'; 
file changed." );
return false;
}
}
 
-   $stats->increment( 'editstash.cache-hits' );
+   $stats->increment( 'editstash.cache_hits.proven_fresh' );
$logger->debug( "Cache hit for key '$key'." );
 
return $editInfo;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cd61da9746e3ca3695e23200f698b8b1371798c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.21
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c8359c9..55bd71d - change (mediawiki/extensions)

2016-04-18 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: c8359c9..55bd71d
..

Syncronize VisualEditor: c8359c9..55bd71d

Change-Id: Ic90bf30e7796285d1aa2795207d7230066722c8d
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/22/284122/1

diff --git a/VisualEditor b/VisualEditor
index c8359c9..55bd71d 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c8359c9c5d7b36d38a2109469c7cb98c7609e735
+Subproject commit 55bd71d164ab009095f960ef0cf08c173ff05334

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic90bf30e7796285d1aa2795207d7230066722c8d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c8359c9..55bd71d - change (mediawiki/extensions)

2016-04-18 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: c8359c9..55bd71d
..


Syncronize VisualEditor: c8359c9..55bd71d

Change-Id: Ic90bf30e7796285d1aa2795207d7230066722c8d
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index c8359c9..55bd71d 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c8359c9c5d7b36d38a2109469c7cb98c7609e735
+Subproject commit 55bd71d164ab009095f960ef0cf08c173ff05334

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic90bf30e7796285d1aa2795207d7230066722c8d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (d6c6a85) - change (mediawiki...VisualEditor)

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

Change subject: Update VE core submodule to master (d6c6a85)
..


Update VE core submodule to master (d6c6a85)

New changes:
c48d7cc Add support for placing a toolbar dialog in the side margin
ee7e14b FindAndReplaceDialog#renderFragments: Protect against null surface
fc61463 Fix dm.Surface#getHistory to not return undone items
f1dff2f Introduce ve.Range#overlapsRange method
f608958 Introduce dm.Surface#getModifiedRanges
db114ed Move debugging data-url GIFs to a debug only file
1dd8194 Update RangeFix to 0.2.0
706ff4e Add 'Support: [browser]' to browser hack comments
4f52afc Inline slugs: Limit Firefox hack to versions <38
bf73326 Add classList polyfill for IE9
59d78aa Fix access of iframe-created document in IE9
a886ae1 Hide borders on linked images in IE9
5293974 Fix double-click to edit table cells in IE9
a49a02f Add some more Support: comments

Depends-On: I9c5cea3e8df1fae001d4d98c0782a04dec803776
Change-Id: I460368f509a213464e57bb95f2d726305ef608de
---
M .jsduck/eg-iframe.html
M extension.json
M lib/ve
A modules/ve-mw/init/classListSkipFunction.js
4 files changed, 26 insertions(+), 0 deletions(-)

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



diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index 0867b1a..bc6045e 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -123,6 +123,9 @@


 
+   
+   
+


 
diff --git a/extension.json b/extension.json
index 2ed1fb8..6651133 100644
--- a/extension.json
+++ b/extension.json
@@ -239,6 +239,14 @@
"mobile"
]
},
+   "dom-classlist-shim": {
+   "scripts": "lib/ve/lib/classList/classList.js",
+   "targets": [
+   "desktop",
+   "mobile"
+   ],
+   "skipFunction": 
"modules/ve-mw/init/classListSkipFunction.js"
+   },
"rangefix": {
"scripts": "lib/ve/lib/rangefix/rangefix.js",
"targets": [
@@ -860,6 +868,7 @@
"unicodejs",
"rangefix",
"papaparse",
+   "dom-classlist-shim",
"jquery.client",
"ext.visualEditor.base",
"ext.visualEditor.supportCheck"
diff --git a/lib/ve b/lib/ve
index f8be8c3..d6c6a85 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit f8be8c372ee9e12023c7d9687fe35f9509a609b0
+Subproject commit d6c6a850a5720a587758faec3efcb8d4c4a0f88f
diff --git a/modules/ve-mw/init/classListSkipFunction.js 
b/modules/ve-mw/init/classListSkipFunction.js
new file mode 100644
index 000..4be1da4
--- /dev/null
+++ b/modules/ve-mw/init/classListSkipFunction.js
@@ -0,0 +1,14 @@
+/*!
+ *
+ * VisualEditor skip function for classList.js.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see 
http://ve.mit-license.org
+ * Adapted from 
http://purl.eligrey.com/github/classList.js/blob/master/classList.js
+ */
+return !!(
+'classList' in document.createElement( '_' ) &&
+!(
+document.createElementNS &&
+!( 'classList' in document.createElementNS( 
'http://www.w3.org/2000/svg', 'g' ) )
+)
+);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I460368f509a213464e57bb95f2d726305ef608de
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
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] build: Bump various devDependencies to latest - change (mediawiki...VisualEditor)

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

Change subject: build: Bump various devDependencies to latest
..


build: Bump various devDependencies to latest

 grunt  0.4.5  →  1.0.1
 grunt-cli 0.1.13  →  1.2.0
 grunt-banana-checker   0.4.0  →  0.5.0

Change-Id: Idcd66807d03c85005ca97f5563251e814d15813b
---
M package.json
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/package.json b/package.json
index 8e91e7b..de4266a 100644
--- a/package.json
+++ b/package.json
@@ -9,10 +9,10 @@
 "postdoc": "grunt copy:jsduck"
   },
   "devDependencies": {
-"grunt": "0.4.5",
-"grunt-cli": "0.1.13",
+"grunt": "1.0.1",
+"grunt-cli": "1.2.0",
 "grunt-jsonlint": "1.0.7",
-"grunt-banana-checker": "0.4.0",
+"grunt-banana-checker": "0.5.0",
 "grunt-contrib-copy": "1.0.0",
 "grunt-contrib-csslint": "1.0.0",
 "grunt-contrib-jshint": "1.0.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idcd66807d03c85005ca97f5563251e814d15813b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
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] secure CP cookie - change (operations/puppet)

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

Change subject: secure CP cookie
..


secure CP cookie

Bug: T119576
Change-Id: Ie6dd296869468d8ca173b8fb9d3fb5de80fbbae8
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, but someone else must approve
  Reedy: Looks good to me, but someone else must approve
  BBlack: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 74a7a46..f0e19e0 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -340,13 +340,13 @@
// Set CP ('Connection Properties') cookie
if (req.http.X-Connection-Properties ~ "SPDY=3|H2=1") {
if (req.http.X-Orig-Cookie !~ "(^|;\s*)CP=H2" && 
req.http.Cookie !~ "(^|;\s*)CP=H2") {
-   header.append(resp.http.Set-Cookie, "CP=H2; Path=/");
+   header.append(resp.http.Set-Cookie, "CP=H2; Path=/; 
secure");
}
} else {
// Explicitly unset the cookie if it exists. Support for SPDY 
in a browser session can
// flip if a device moves networks and thus behind a proxy.
if (req.http.X-Orig-Cookie ~ "(^|;\s*)CP=H2" || req.http.Cookie 
~ "(^|;\s*)CP=H2") {
-   header.append(resp.http.Set-Cookie, "CP=H1; 
Expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/");
+   header.append(resp.http.Set-Cookie, "CP=H1; 
Expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/; secure");
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6dd296869468d8ca173b8fb9d3fb5de80fbbae8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: Ori.livneh 
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] Segment stash edit cache stats by basis for hit/miss - change (mediawiki/core)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Segment stash edit cache stats by basis for hit/miss
..

Segment stash edit cache stats by basis for hit/miss

Instead of just counting cache hits and misses, segment the counts by reason,
so we can differentiate (for example) timestamp-based cache hits from
staleness-check-survivor cache hits. I want this data so I can determine
whether increasing the cutoff for timestamp-based hits from 3 to 5 seconds has
a substantial enough impact to warrant the slightly weaker consistency.

Also changed 'cache-hit' to 'cache_hit'. MediaWiki normalizes the dash to an
underscore anyway, but the normalization is there for dynamically-constructed
key names (or name segments). In the case of hard-coded values, it is desirable
for the code to be as close as possible to the final form of the metric name,
to simplify metric lookup.

Change-Id: I0cd61da9746e3ca3695e23200f698b8b1371798c
(cherry picked from commit 0f1ffa4da707217ab2dc1efae68c8ced24500548)
---
M includes/api/ApiStashEdit.php
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 3c02c9c..cc8e390 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -272,18 +272,18 @@
}
 
$timeMs = 1000 * max( 0, microtime( true ) - $start );
-   $stats->timing( 'editstash.lock-wait-time', $timeMs );
+   $stats->timing( 'editstash.lock_wait_time', $timeMs );
}
 
if ( !is_object( $editInfo ) || !$editInfo->output ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 'editstash.cache_misses.no_stash' );
$logger->debug( "No cache value for key '$key'." );
return false;
}
 
$time = wfTimestamp( TS_UNIX, $editInfo->output->getTimestamp() 
);
if ( ( time() - $time ) <= 3 ) {
-   $stats->increment( 'editstash.cache-hits' );
+   $stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Timestamp-based cache hit for key 
'$key'." );
return $editInfo; // assume nothing changed
}
@@ -312,7 +312,7 @@
}
 
if ( $changed || $res->numRows() != $templateUses ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 
'editstash.cache_misses.proven_stale' );
$logger->info( "Stale cache for key '$key'; 
template changed." );
return false;
}
@@ -336,13 +336,13 @@
}
 
if ( $changed || $res->numRows() != count( $files ) ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 
'editstash.cache_misses.proven_stale' );
$logger->info( "Stale cache for key '$key'; 
file changed." );
return false;
}
}
 
-   $stats->increment( 'editstash.cache-hits' );
+   $stats->increment( 'editstash.cache_hits.proven_fresh' );
$logger->debug( "Cache hit for key '$key'." );
 
return $editInfo;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cd61da9746e3ca3695e23200f698b8b1371798c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.21
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Segment stash edit cache stats by basis for hit/miss - change (mediawiki/core)

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

Change subject: Segment stash edit cache stats by basis for hit/miss
..


Segment stash edit cache stats by basis for hit/miss

Instead of just counting cache hits and misses, segment the counts by reason,
so we can differentiate (for example) timestamp-based cache hits from
staleness-check-survivor cache hits. I want this data so I can determine
whether increasing the cutoff for timestamp-based hits from 3 to 5 seconds has
a substantial enough impact to warrant the slightly weaker consistency.

Also changed 'cache-hit' to 'cache_hit'. MediaWiki normalizes the dash to an
underscore anyway, but the normalization is there for dynamically-constructed
key names (or name segments). In the case of hard-coded values, it is desirable
for the code to be as close as possible to the final form of the metric name,
to simplify metric lookup.

Change-Id: I0cd61da9746e3ca3695e23200f698b8b1371798c
---
M includes/api/ApiStashEdit.php
1 file changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 3c02c9c..cc8e390 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -272,18 +272,18 @@
}
 
$timeMs = 1000 * max( 0, microtime( true ) - $start );
-   $stats->timing( 'editstash.lock-wait-time', $timeMs );
+   $stats->timing( 'editstash.lock_wait_time', $timeMs );
}
 
if ( !is_object( $editInfo ) || !$editInfo->output ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 'editstash.cache_misses.no_stash' );
$logger->debug( "No cache value for key '$key'." );
return false;
}
 
$time = wfTimestamp( TS_UNIX, $editInfo->output->getTimestamp() 
);
if ( ( time() - $time ) <= 3 ) {
-   $stats->increment( 'editstash.cache-hits' );
+   $stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Timestamp-based cache hit for key 
'$key'." );
return $editInfo; // assume nothing changed
}
@@ -312,7 +312,7 @@
}
 
if ( $changed || $res->numRows() != $templateUses ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 
'editstash.cache_misses.proven_stale' );
$logger->info( "Stale cache for key '$key'; 
template changed." );
return false;
}
@@ -336,13 +336,13 @@
}
 
if ( $changed || $res->numRows() != count( $files ) ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 
'editstash.cache_misses.proven_stale' );
$logger->info( "Stale cache for key '$key'; 
file changed." );
return false;
}
}
 
-   $stats->increment( 'editstash.cache-hits' );
+   $stats->increment( 'editstash.cache_hits.proven_fresh' );
$logger->debug( "Cache hit for key '$key'." );
 
return $editInfo;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cd61da9746e3ca3695e23200f698b8b1371798c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] registration: Support skipFunction module definitions - change (mediawiki/core)

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

Change subject: registration: Support skipFunction module definitions
..


registration: Support skipFunction module definitions

Change-Id: I9c5cea3e8df1fae001d4d98c0782a04dec803776
---
M docs/extension.schema.json
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/docs/extension.schema.json b/docs/extension.schema.json
index a743afa..370e18e 100644
--- a/docs/extension.schema.json
+++ b/docs/extension.schema.json
@@ -322,6 +322,10 @@
"type": 
"string",

"description": "Equivalent of remoteBasePath, but relative to 
$wgExtensionAssetsPath"
},
+   "skipFunction": 
{
+   "type": 
"string",
+   
"description": "Modules that provide fallback functionality can provide a 
\"skip function\". This function, if provided, will be passed along to the 
module registry on the client. When this module is loaded (either directly or 
as a dependency of another module), then this function is executed first. If 
the function returns true, the module will instantly be considered \"ready\" 
without requesting the associated module resources. The value returned here 
must be valid javascript for execution in a private function. It must not 
contain the \"function () {\" and \"}\" wrapper though."
+   },
"scripts": {
"type": 
["string", "array"],

"description": "Scripts to always include (array of file paths)",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c5cea3e8df1fae001d4d98c0782a04dec803776
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Waldir 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Inline slugs: Limit Firefox hack to versions <38 - change (VisualEditor/VisualEditor)

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

Change subject: Inline slugs: Limit Firefox hack to versions <38
..


Inline slugs: Limit Firefox hack to versions <38

Bug: T132819
Change-Id: I0ee0daaab6b27198f3239a64648d82c5c19444af
---
M src/ce/ve.ce.BranchNode.js
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/src/ce/ve.ce.BranchNode.js b/src/ce/ve.ce.BranchNode.js
index 89822b9..10e3107 100644
--- a/src/ce/ve.ce.BranchNode.js
+++ b/src/ce/ve.ce.BranchNode.js
@@ -53,7 +53,7 @@
  * @property {HTMLElement}
  */
 ve.ce.BranchNode.inlineSlugTemplate = ( function () {
-   var layout = $.client.profile().layout,
+   var profile = $.client.profile(),
// The following classes can be used here:
// ve-ce-chimera-gecko
// ve-ce-chimera-konqueror
@@ -63,15 +63,15 @@
// ve-ce-chimera-opera
// ve-ce-chimera-webkit
$img = $( '' )
-   .addClass( 've-ce-chimera ve-ce-chimera-' + layout ),
+   .addClass( 've-ce-chimera ve-ce-chimera-' + 
profile.layout ),
$span = $( '' )
.addClass( 've-ce-branchNode-slug 
ve-ce-branchNode-inlineSlug' )
.append( $img );
 
-   // Support: Firefox
+   // Support: Firefox<=37
// Firefox misbehaves if we don't set an src: 
https://bugzilla.mozilla.org/show_bug.cgi?id=989012
-   // But setting an src in Chrome is very slow, so only set it in Firefox
-   if ( layout === 'gecko' ) {
+   // Setting an src in Chrome is slow, so only set it in affected 
versions of Firefox
+   if ( profile.layout === 'gecko' && profile.versionNumber < 38 ) {
$img.prop( 'src', ve.ce.minImgDataUri );
}
return $span.get( 0 );

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

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

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


[MediaWiki-commits] [Gerrit] Add tooltips for 'mark as read' and 'more options' - change (mediawiki...Echo)

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

Change subject: Add tooltips for 'mark as read' and 'more options'
..


Add tooltips for 'mark as read' and 'more options'

Bug: T130831
Change-Id: I1533d20019157c05f9354a60661512a33920c336
---
M Resources.php
M i18n/en.json
M i18n/qqq.json
M modules/ooui/mw.echo.ui.NotificationItemWidget.js
4 files changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/Resources.php b/Resources.php
index feea1c2..df71cbc 100644
--- a/Resources.php
+++ b/Resources.php
@@ -133,6 +133,8 @@
"notification-timestamp-ago-years",
'echo-notification-markasread',
'echo-notification-markasunread',
+   'echo-notification-markasread-tooltip',
+   'echo-notification-more-options-tooltip',
'echo-notification-alert-text-only',
'echo-notification-message-text-only',
'echo-email-batch-bullet',
diff --git a/i18n/en.json b/i18n/en.json
index 258e31e..ae046ea 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -96,6 +96,8 @@
"echo-notification-popup-loginrequired": "Please log in to view your 
notifications.",
"echo-notification-markasread": "Mark as read",
"echo-notification-markasunread": "Mark as unread",
+   "echo-notification-markasread-tooltip": "Mark as read",
+   "echo-notification-more-options-tooltip": "More options",
"notification-link-text-expand-all": "View all",
"notification-link-text-expand-alert-count": "View {{PLURAL:$1|$1 
alert|$1 alerts}}",
"notification-link-text-expand-message-count": "View {{PLURAL:$1|$1 
message|$1 messages}}",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ecfd82b..7c3cb37 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -87,6 +87,8 @@
"echo-notification-popup-loginrequired": "Message that displays when an 
anonymous user attempts to view notifications in their popup after a session 
expired.",
"echo-notification-markasread": "Label for the button to mark the 
notification as read.",
"echo-notification-markasunread": "Label for the button to mark the 
notification as unread.",
+   "echo-notification-markasread-tooltip": "Tooltip for the button to mark 
the notification as read.",
+   "echo-notification-more-options-tooltip": "Tooltip for the button to 
show the hidden secondary actions.",
"notification-link-text-expand-all": "Label for the button that expands 
a bundled notification.\n{{Identical|View all}}",
"notification-link-text-expand-alert-count": "Label for the button that 
expands a bundled alert notification.\n\nParameters:\n* $1 - The count of 
messages that the bundle holds.\n{{Identical|View alert}}",
"notification-link-text-expand-message-count": "Label for the button 
that expands a bundled message notification.\n\nParameters:\n* $1 - The count 
of messages that the bundle holds.\n{{Identical|View message}}",
diff --git a/modules/ooui/mw.echo.ui.NotificationItemWidget.js 
b/modules/ooui/mw.echo.ui.NotificationItemWidget.js
index 81552ba..26621cf 100644
--- a/modules/ooui/mw.echo.ui.NotificationItemWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationItemWidget.js
@@ -32,10 +32,11 @@
this.$actions = $( '' )
.addClass( 
'mw-echo-ui-notificationItemWidget-content-actions' );
 
-   // Mark unread
+   // Mark as read
this.markAsReadButton = new OO.ui.ButtonWidget( {
icon: 'close',
framed: false,
+   title: mw.msg( 'echo-notification-markasread-tooltip' ),
classes: [ 
'mw-echo-ui-notificationItemWidget-markAsReadButton' ]
} );
 
@@ -76,6 +77,7 @@
icon: 'ellipsis',
$overlay: this.$overlay,
menuWidth: 200,
+   title: mw.msg( 'echo-notification-more-options-tooltip' 
),
classes: [ 
'mw-echo-ui-notificationItemWidget-content-actions-menu' ]
} );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1533d20019157c05f9354a60661512a33920c336
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
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] Only call getData() if the right type of Action is used - change (mediawiki...CirrusSearch)

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

Change subject: Only call getData() if the right type of Action is used
..


Only call getData() if the right type of Action is used

Bug: T132625
Change-Id: I0b46e315d9c92df29cf395751d7281c67f1e293c
---
M includes/DataSender.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/includes/DataSender.php b/includes/DataSender.php
index 9c683f9..8dcea92 100644
--- a/includes/DataSender.php
+++ b/includes/DataSender.php
@@ -355,7 +355,11 @@
} elseif ( $logCallback ) {
// This is generally not an error but we should
// log it to see how many we get
-   $id = 
$bulkResponse->getAction()->getData()->getId();
+   $action = $bulkResponse->getAction();
+   $id = 'missing';
+   if ( $action instanceof 
\Elastica\Bulk\Action\AbstractDocument ) {
+   $id = $action->getData()->getId();
+   }
call_user_func( $logCallback, $id );
}
}

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

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

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


[MediaWiki-commits] [Gerrit] Segment stash edit cache stats by basis for hit/miss - change (mediawiki/core)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Segment stash edit cache stats by basis for hit/miss
..

Segment stash edit cache stats by basis for hit/miss

Instead of just counting cache hits and misses, segment the counts by reason,
so we can differentiate (for example) timestamp-based cache hits from
staleness-check-survivor cache hits. I want this data so I can determine
whether increasing the cutoff for timestamp-based hits from 3 to 5 seconds has
a substantial enough impact to warrant the slightly weaker consistency.

Also changed 'cache-hit' to 'cache_hit'. MediaWiki normalizes the dash to an
underscore anyway, but the normalization is there for dynamically-constructed
key names (or name segments). In the case of hard-coded values, it is desirable
for the code to be as close as possible to the final form of the metric name,
to simplify metric lookup.

Change-Id: I0cd61da9746e3ca3695e23200f698b8b1371798c
---
M includes/api/ApiStashEdit.php
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/284120/1

diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 3c02c9c..4c9f0eb 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -272,18 +272,18 @@
}
 
$timeMs = 1000 * max( 0, microtime( true ) - $start );
-   $stats->timing( 'editstash.lock-wait-time', $timeMs );
+   $stats->timing( 'editstash.lock_wait_time', $timeMs );
}
 
if ( !is_object( $editInfo ) || !$editInfo->output ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 'editstash.cache_misses.no_stash' );
$logger->debug( "No cache value for key '$key'." );
return false;
}
 
$time = wfTimestamp( TS_UNIX, $editInfo->output->getTimestamp() 
);
if ( ( time() - $time ) <= 3 ) {
-   $stats->increment( 'editstash.cache-hits' );
+   $stats->increment( 
'editstash.cache_hits.timestamp_based' );
$logger->debug( "Timestamp-based cache hit for key 
'$key'." );
return $editInfo; // assume nothing changed
}
@@ -312,7 +312,7 @@
}
 
if ( $changed || $res->numRows() != $templateUses ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 
'editstash.cache_misses.template_changed' );
$logger->info( "Stale cache for key '$key'; 
template changed." );
return false;
}
@@ -336,13 +336,13 @@
}
 
if ( $changed || $res->numRows() != count( $files ) ) {
-   $stats->increment( 'editstash.cache-misses' );
+   $stats->increment( 
'editstash.cache_misses.file_changed' );
$logger->info( "Stale cache for key '$key'; 
file changed." );
return false;
}
}
 
-   $stats->increment( 'editstash.cache-hits' );
+   $stats->increment( 
'editstash.cache_hits.survived_staleness_checks' );
$logger->debug( "Cache hit for key '$key'." );
 
return $editInfo;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cd61da9746e3ca3695e23200f698b8b1371798c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Fix quotes for "mark as resolved" on history and IRC - change (mediawiki...Flow)

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

Change subject: Fix quotes for "mark as resolved" on history and IRC
..


Fix quotes for "mark as resolved" on history and IRC

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

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



diff --git a/i18n/en.json b/i18n/en.json
index c8d54fd..9ebb8b6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -235,8 +235,8 @@
"flow-rev-message-deleted-topic-irc": "$2 {{GENDER:$2|deleted}} the 
topic \"$6\" ($5)",
"flow-rev-message-suppressed-topic": "$1 {{GENDER:$2|suppressed}} the 
[$4 topic] \"$6\" ($5)",
"flow-rev-message-suppressed-topic-irc": "$2 {{GENDER:$2|suppressed}} 
the topic \"$6\" ($5)",
-   "flow-rev-message-locked-topic": "$1 {{GENDER:$2|marked}} the [$4 
topic] $6 as resolved ($5)",
-   "flow-rev-message-locked-topic-irc": "$2 {{GENDER:$2|resolved}} the 
topic $6 ($5)",
+   "flow-rev-message-locked-topic": "$1 {{GENDER:$2|marked}} the [$4 
topic] \"$6\" as resolved ($5)",
+   "flow-rev-message-locked-topic-irc": "$2 {{GENDER:$2|resolved}} the 
topic \"$6\" ($5)",
"flow-rev-message-lock-topic-reason": "marked as resolved",
"flow-rev-message-restore-topic-reason": "reopened",
"flow-rev-message-restored-topic": "$1 {{GENDER:$2|restored}} the [$4 
topic] \"$6\" ($5)",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2157fef6478b1d28afcafb6e38e8d65e2dd4f7e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Catrope 
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] Add some more Support: comments - change (VisualEditor/VisualEditor)

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

Change subject: Add some more Support: comments
..


Add some more Support: comments

Change-Id: Ieea9cfc4721c58ba57f7c7ce5075f3ee7ef402f1
---
M src/ce/styles/annotations/ve.ce.LinkAnnotation.css
M src/ve.utils.js
2 files changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/src/ce/styles/annotations/ve.ce.LinkAnnotation.css 
b/src/ce/styles/annotations/ve.ce.LinkAnnotation.css
index 4cb728b..674c4c0 100644
--- a/src/ce/styles/annotations/ve.ce.LinkAnnotation.css
+++ b/src/ce/styles/annotations/ve.ce.LinkAnnotation.css
@@ -13,6 +13,7 @@
 }
 
 .ve-ce-nail {
+   /* Support: IE9 */
/* IE9 adds borders to linked images */
border: 0;
 }
diff --git a/src/ve.utils.js b/src/ve.utils.js
index d1b75bd..12eeec2 100644
--- a/src/ve.utils.js
+++ b/src/ve.utils.js
@@ -373,6 +373,7 @@
try {
nativeSelection.removeAllRanges();
} catch ( e ) {
+   // Support: IE9
// IE9 can throw an exception if the range is invisible
}
nativeSelection.addRange( nativeRange );
@@ -824,6 +825,7 @@
newDocument.close();
// Detach the iframe
iframe.parentNode.removeChild( iframe );
+   // Support: IE9
// Prevent garbage collection of iframe as long as newDocument exists, 
as destroying
// the original iframe makes access to the document impossible in IE9
newDocument.originalIframe = iframe;

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

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

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


[MediaWiki-commits] [Gerrit] Use plaintextParams() for snippets and sections - change (mediawiki...Echo)

2016-04-18 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Use plaintextParams() for snippets and sections
..

Use plaintextParams() for snippets and sections

We ended up double-parsing section titles, which resulted
in strange behavior when the section title was something like
{{tl|infobox}}.

Bug: T132872
Change-Id: I4434624f392cd0e1df39374d45d60f7d83be7161
---
M includes/formatters/EditUserTalkPresentationModel.php
M includes/formatters/MentionPresentationModel.php
M includes/formatters/RevertedPresentationModel.php
3 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/19/284119/1

diff --git a/includes/formatters/EditUserTalkPresentationModel.php 
b/includes/formatters/EditUserTalkPresentationModel.php
index 1213720..d06222a 100644
--- a/includes/formatters/EditUserTalkPresentationModel.php
+++ b/includes/formatters/EditUserTalkPresentationModel.php
@@ -54,7 +54,7 @@
} elseif ( $this->hasSection() ) {
$msg = $this->getMessageWithAgent( 
"notification-header-{$this->type}-with-section" );
$msg->params( $this->getViewingUserForGender() );
-   $msg->params( $this->language->embedBidi( 
$this->getSectionTitleSnippet() ) );
+   $msg->plaintextParams( $this->language->embedBidi( 
$this->getSectionTitleSnippet() ) );
return $msg;
} else {
$msg = parent::getHeaderMessage();
@@ -66,7 +66,7 @@
public function getBodyMessage() {
if ( !$this->isBundled() && $this->hasSection() ) {
$msg = $this->msg( 
'notification-body-edit-user-talk-with-section' );
-   $msg->params( wfEscapeWikiText( 
$this->getRevisionSnippet() ) );
+   $msg->plaintextParams( $this->getRevisionSnippet() );
return $msg;
} else {
return false;
diff --git a/includes/formatters/MentionPresentationModel.php 
b/includes/formatters/MentionPresentationModel.php
index b0164c7..57debfb 100644
--- a/includes/formatters/MentionPresentationModel.php
+++ b/includes/formatters/MentionPresentationModel.php
@@ -73,7 +73,7 @@
 
$section = $this->getSection();
if ( $section ) {
-   $msg->params( $this->language->embedBidi(
+   $msg->plaintextParams( $this->language->embedBidi(
EchoDiscussionParser::getTextSnippet(
$section,
$this->language,
@@ -106,7 +106,7 @@
$content = $this->event->getExtraParam( 'content' );
if ( $content && $this->userCan( Revision::DELETED_TEXT ) ) {
$msg = $this->msg( 'notification-body-mention' );
-   $msg->params(
+   $msg->plaintextParams(
EchoDiscussionParser::getTextSnippet(
$content,
$this->language
diff --git a/includes/formatters/RevertedPresentationModel.php 
b/includes/formatters/RevertedPresentationModel.php
index 081477c..25caa7c 100644
--- a/includes/formatters/RevertedPresentationModel.php
+++ b/includes/formatters/RevertedPresentationModel.php
@@ -21,7 +21,7 @@
$summary = $this->event->getExtraParam( 'summary' );
if ( !$this->isAutomaticSummary( $summary ) && $this->userCan( 
Revision::DELETED_COMMENT ) ) {
$msg = $this->msg( "notification-body-{$this->type}" );
-   $msg->params( $this->formatSummary( $summary ) );
+   $msg->plaintextParams( $this->formatSummary( $summary ) 
);
return $msg;
} else {
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4434624f392cd0e1df39374d45d60f7d83be7161
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] [WIP] Support skipFunction module definitions in extension r... - change (mediawiki/core)

2016-04-18 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: [WIP] Support skipFunction module definitions in extension 
registration
..

[WIP] Support skipFunction module definitions in extension registration

Change-Id: I9c5cea3e8df1fae001d4d98c0782a04dec803776
---
M docs/extension.schema.json
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/284118/1

diff --git a/docs/extension.schema.json b/docs/extension.schema.json
index a743afa..370e18e 100644
--- a/docs/extension.schema.json
+++ b/docs/extension.schema.json
@@ -322,6 +322,10 @@
"type": 
"string",

"description": "Equivalent of remoteBasePath, but relative to 
$wgExtensionAssetsPath"
},
+   "skipFunction": 
{
+   "type": 
"string",
+   
"description": "Modules that provide fallback functionality can provide a 
\"skip function\". This function, if provided, will be passed along to the 
module registry on the client. When this module is loaded (either directly or 
as a dependency of another module), then this function is executed first. If 
the function returns true, the module will instantly be considered \"ready\" 
without requesting the associated module resources. The value returned here 
must be valid javascript for execution in a private function. It must not 
contain the \"function () {\" and \"}\" wrapper though."
+   },
"scripts": {
"type": 
["string", "array"],

"description": "Scripts to always include (array of file paths)",

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

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

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


[MediaWiki-commits] [Gerrit] Add some more Support: comments - change (VisualEditor/VisualEditor)

2016-04-18 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Add some more Support: comments
..

Add some more Support: comments

Change-Id: Ieea9cfc4721c58ba57f7c7ce5075f3ee7ef402f1
---
M src/ce/styles/annotations/ve.ce.LinkAnnotation.css
M src/ve.utils.js
2 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/17/284117/1

diff --git a/src/ce/styles/annotations/ve.ce.LinkAnnotation.css 
b/src/ce/styles/annotations/ve.ce.LinkAnnotation.css
index 4cb728b..674c4c0 100644
--- a/src/ce/styles/annotations/ve.ce.LinkAnnotation.css
+++ b/src/ce/styles/annotations/ve.ce.LinkAnnotation.css
@@ -13,6 +13,7 @@
 }
 
 .ve-ce-nail {
+   /* Support: IE9 */
/* IE9 adds borders to linked images */
border: 0;
 }
diff --git a/src/ve.utils.js b/src/ve.utils.js
index d1b75bd..12eeec2 100644
--- a/src/ve.utils.js
+++ b/src/ve.utils.js
@@ -373,6 +373,7 @@
try {
nativeSelection.removeAllRanges();
} catch ( e ) {
+   // Support: IE9
// IE9 can throw an exception if the range is invisible
}
nativeSelection.addRange( nativeRange );
@@ -824,6 +825,7 @@
newDocument.close();
// Detach the iframe
iframe.parentNode.removeChild( iframe );
+   // Support: IE9
// Prevent garbage collection of iframe as long as newDocument exists, 
as destroying
// the original iframe makes access to the document impossible in IE9
newDocument.originalIframe = iframe;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieea9cfc4721c58ba57f7c7ce5075f3ee7ef402f1
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
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] Mark intermittently failing feature - change (mediawiki...CirrusSearch)

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

Change subject: Mark intermittently failing feature
..


Mark intermittently failing feature

Change-Id: If23d534faef071461be3d706e6103b126410f7c8
---
M tests/browser/features/update_weight_api.feature
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/tests/browser/features/update_weight_api.feature 
b/tests/browser/features/update_weight_api.feature
index a5b5fbd..66dd6e5 100644
--- a/tests/browser/features/update_weight_api.feature
+++ b/tests/browser/features/update_weight_api.feature
@@ -12,6 +12,7 @@
   And a page named WeightedLink%{epoch} 1/2 exists with contents 
[[WeightedLink%{epoch} 1]]
 Then within 20 seconds api searching for WeightedLink%{epoch} yields 
WeightedLink%{epoch} 1 as the first result
 
+  @expect_failure
   Scenario: Pages weights are updated when links are removed from them
 Given a page named WeightedLinkRemoveUpdate%{epoch} 1/1 exists with 
contents [[WeightedLinkRemoveUpdate%{epoch} 1]]
   And a page named WeightedLinkRemoveUpdate%{epoch} 1/2 exists with 
contents [[WeightedLinkRemoveUpdate%{epoch} 1]]
@@ -34,6 +35,7 @@
   And a page named WeightedLinkRdir%{epoch} 1/2 exists with contents 
[[WeightedLinkRdir%{epoch} 1/Redirect]]
 Then within 20 seconds api searching for WeightedLinkRdir%{epoch} yields 
WeightedLinkRdir%{epoch} 1 as the first result
 
+  @expect_failure
   Scenario: Pages weights are updated when links are removed from their 
redirects
 Given a page named WLRURdir%{epoch} 1/1 exists with contents 
[[WLRURdir%{epoch} 1/Redirect]]
   And a page named WLRURdir%{epoch} 1/2 exists with contents 
[[WLRURdir%{epoch} 1/Redirect]]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If23d534faef071461be3d706e6103b126410f7c8
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] readme: Use for source code to unbreak doxygen - change (HtmlFormatter)

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

Change subject: readme: Use  for source code to unbreak doxygen
..


readme: Use  for source code to unbreak doxygen

Current syntax is GitHub-specific and breaks output at


Also add lang="php" for syntax highlighting (on GitHub).

Change-Id: I8de2294e15e10090972f8018062725d349bda636
---
M README.md
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/README.md b/README.md
index f6e2e1b..f602d6a 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
 Usage
 -
 
-```
+
 use HtmlFormatter\HtmlFormatter;
 // Load HTML that already has doctype and stuff
 $formatter = new HtmlFormatter( $html );
@@ -17,7 +17,7 @@
 // Only the above syntax is supported, not full CSS/jQuery selectors
 
 // These tags get replaced with their inner HTML,
-// e.g. foo --> foo
+// e.g. foo --> foo
 // Only tag names are supported here
 $formatter->flatten( 'span' );
 $formatter->flatten( [ 'code', 'pre' ] );
@@ -30,7 +30,7 @@
 
 // Get resulting HTML
 $processedHtml = $formatter->getText();
-```
+
 
 License
 ---

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8de2294e15e10090972f8018062725d349bda636
Gerrit-PatchSet: 2
Gerrit-Project: HtmlFormatter
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] kraz.codfw.wmnet -> kraz.wikimedia.org - change (operations/dns)

2016-04-18 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: kraz.codfw.wmnet -> kraz.wikimedia.org
..

kraz.codfw.wmnet -> kraz.wikimedia.org

This VM needs a public IP to replace antimony.wikimedia.org
which runs irc.wikimedia.org.

Bug:T123729
Change-Id: I2fb95df0e840d80e73f1d1ab1d4e45df4d444a19
---
M templates/10.in-addr.arpa
M templates/153.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/16/284116/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 17004fe..5f8edd5 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2834,7 +2834,6 @@
 172 1H IN PTR   es2018.codfw.wmnet.
 173 1H IN PTR   hassaleh.codfw.wmnet. ; VM on the ganeti01.svc.codfw.wmnet 
cluster
 174 1H IN PTR   furud.codfw.wmnet. ; VM on the ganeti01.svc.codfw.wmnet cluster
-175 1H IN PTR   kraz.codfw.wmnet. ; VM on the ganeti01.svc.codfw.wmnet cluster
 
 $ORIGIN 17.192.{{ zonename }}.
 1   1H IN PTR   vl2018-eth1.lvs2001.codfw.wmnet.
diff --git a/templates/153.80.208.in-addr.arpa 
b/templates/153.80.208.in-addr.arpa
index 76a680a..ae9a676 100644
--- a/templates/153.80.208.in-addr.arpa
+++ b/templates/153.80.208.in-addr.arpa
@@ -43,7 +43,7 @@
 41  1H  IN PTR  vl2002-eth1.lvs2003.codfw.wmnet.
 42  1H  IN PTR  achernar.wikimedia.org.
 43  1H  IN PTR  pollux.wikimedia.org.
-
+44  1H  IN PTR  kraz.codfw.wmnet. ; VM on the ganeti01.svc.codfw.wmnet cluster
 45  1H  IN PTR  mx2001.wikimedia.org.
 46  1H  IN PTR  wiki-mail-codfw.wikimedia.org.
 47  1H  IN PTR  labtestcontrol2001.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 6e7ee32..06cea5e 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -139,6 +139,7 @@
 1H  IN  2620:0:860:1:208:80:153:4
 iron1H  IN A208.80.154.151
 1H  IN  2620:0:861:2:208:80:154:151
+kraz1H  IN A208.80.153.44
 labcontrol1001  1H  IN A208.80.154.92
 labcontrol1002  1H  IN A208.80.154.95
 labtestweb2001  1H  IN A208.80.153.14
diff --git a/templates/wmnet b/templates/wmnet
index c3efa46..84067f6 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2315,7 +2315,6 @@
 heze1H  IN A10.192.0.31
 kafka2001   1H  IN A10.192.0.139
 kafka2002   1H  IN A10.192.16.169
-kraz1H  IN A10.192.16.175
 labstore20011H  IN A10.192.21.4
 labstore20021H  IN A10.192.21.5
 labstore20031H  IN A10.192.21.6

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

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

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


[MediaWiki-commits] [Gerrit] kraz.codfw.wmnet -> kraz.wm.org, needs public IP - change (operations/puppet)

2016-04-18 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: kraz.codfw.wmnet -> kraz.wm.org, needs public IP
..

kraz.codfw.wmnet -> kraz.wm.org, needs public IP

This VM needs a public IP to replace antimony.wikimedia.org,
running irc.wikimedia.org.

Bug:T123729
Change-Id: If856dd6141499d41d33c2590eba22ad89600d3a7
---
M manifests/site.pp
M modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/15/284115/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 0d83f80..d133ecd 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1184,7 +1184,7 @@
 }
 
 # irc.wikimedia.org (replaces argon)
-node 'kraz.codfw.wmnet' {
+node 'kraz.wikimedia.org' {
 role mw_rc_irc
 
 interface::add_ip6_mapped { 'main': }
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
index 7a8e4b1..c442d93 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
@@ -61,7 +61,7 @@
 
 host kraz {
 hardware ethernet aa:00:00:5f:b1:02;
-fixed-address kraz.codfw.wmnet;
+fixed-address kraz.wikimedia.org;
 option pxelinux.pathprefix "jessie-installer/";
 filename "jessie-installer/debian-installer/amd64/pxelinux.0";
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If856dd6141499d41d33c2590eba22ad89600d3a7
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] Update VE core submodule to master (cbedbec) - change (mediawiki...VisualEditor)

2016-04-18 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Update VE core submodule to master (cbedbec)
..

Update VE core submodule to master (cbedbec)

New changes:
c48d7cc Add support for placing a toolbar dialog in the side margin
ee7e14b FindAndReplaceDialog#renderFragments: Protect against null surface
fc61463 Fix dm.Surface#getHistory to not return undone items
f1dff2f Introduce ve.Range#overlapsRange method
f608958 Introduce dm.Surface#getModifiedRanges
db114ed Move debugging data-url GIFs to a debug only file
1dd8194 Update RangeFix to 0.2.0
706ff4e Add 'Support: [browser]' to browser hack comments
bf73326 Add classList polyfill for IE9
59d78aa Fix access of iframe-created document in IE9
a886ae1 Hide borders on linked images in IE9
5293974 Fix double-click to edit table cells in IE9

Change-Id: I460368f509a213464e57bb95f2d726305ef608de
---
M .jsduck/eg-iframe.html
M extension.json
M lib/ve
A modules/ve-mw/init/classListSkipFunction.js
4 files changed, 26 insertions(+), 0 deletions(-)


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

diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index 0867b1a..bc6045e 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -123,6 +123,9 @@


 
+   
+   
+


 
diff --git a/extension.json b/extension.json
index 2ed1fb8..6651133 100644
--- a/extension.json
+++ b/extension.json
@@ -239,6 +239,14 @@
"mobile"
]
},
+   "dom-classlist-shim": {
+   "scripts": "lib/ve/lib/classList/classList.js",
+   "targets": [
+   "desktop",
+   "mobile"
+   ],
+   "skipFunction": 
"modules/ve-mw/init/classListSkipFunction.js"
+   },
"rangefix": {
"scripts": "lib/ve/lib/rangefix/rangefix.js",
"targets": [
@@ -860,6 +868,7 @@
"unicodejs",
"rangefix",
"papaparse",
+   "dom-classlist-shim",
"jquery.client",
"ext.visualEditor.base",
"ext.visualEditor.supportCheck"
diff --git a/lib/ve b/lib/ve
index f8be8c3..cbedbec 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit f8be8c372ee9e12023c7d9687fe35f9509a609b0
+Subproject commit cbedbec9ee6eb13f4a77ff8c2b38905ebfff84ad
diff --git a/modules/ve-mw/init/classListSkipFunction.js 
b/modules/ve-mw/init/classListSkipFunction.js
new file mode 100644
index 000..4be1da4
--- /dev/null
+++ b/modules/ve-mw/init/classListSkipFunction.js
@@ -0,0 +1,14 @@
+/*!
+ *
+ * VisualEditor skip function for classList.js.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see 
http://ve.mit-license.org
+ * Adapted from 
http://purl.eligrey.com/github/classList.js/blob/master/classList.js
+ */
+return !!(
+'classList' in document.createElement( '_' ) &&
+!(
+document.createElementNS &&
+!( 'classList' in document.createElementNS( 
'http://www.w3.org/2000/svg', 'g' ) )
+)
+);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I460368f509a213464e57bb95f2d726305ef608de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] readme: Use for source code to unbreak doxygen - change (HtmlFormatter)

2016-04-18 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: readme: Use  for source code to unbreak doxygen
..

readme: Use  for source code to unbreak doxygen

Current syntax is GitHub-specific and breaks output at


Also add lang="php" for syntax highlighting (on GitHub).

Change-Id: I8de2294e15e10090972f8018062725d349bda636
---
M README.md
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/HtmlFormatter 
refs/changes/13/284113/1

diff --git a/README.md b/README.md
index f6e2e1b..ae27359 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
 Usage
 -
 
-```
+
 use HtmlFormatter\HtmlFormatter;
 // Load HTML that already has doctype and stuff
 $formatter = new HtmlFormatter( $html );
@@ -30,7 +30,7 @@
 
 // Get resulting HTML
 $processedHtml = $formatter->getText();
-```
+
 
 License
 ---

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8de2294e15e10090972f8018062725d349bda636
Gerrit-PatchSet: 1
Gerrit-Project: HtmlFormatter
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Trivial cleanup of function/class case - change (mediawiki...CirrusSearch)

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

Change subject: Trivial cleanup of function/class case
..


Trivial cleanup of function/class case

Php doesn't actually care about the case of most things, but lets make
them consistent with the declarations just to keep things nice.

Change-Id: Iafa89a74d382cf47b7f75e1fccebdaa35065c58e
---
M includes/Api/MappingDump.php
M includes/Api/SettingsDump.php
M includes/BuildDocument/PageDataBuilder.php
M includes/BuildDocument/RedirectsAndIncomingLinks.php
M includes/CirrusSearch.php
M includes/Connection.php
M includes/DataSender.php
M includes/Dump.php
M includes/ElasticsearchIntermediary.php
M includes/Extra/Filter/SourceRegex.php
M includes/Hooks.php
M includes/InterwikiSearcher.php
M includes/Job/LinksUpdate.php
M includes/Job/MassIndex.php
M includes/Job/OtherIndex.php
M includes/Sanity/Checker.php
M includes/SearchConfig.php
M includes/Searcher.php
M maintenance/cirrusNeedsToBeBuilt.php
M maintenance/copySearchIndex.php
M maintenance/dumpIndex.php
M maintenance/forceSearchIndex.php
M maintenance/indexNamespaces.php
M maintenance/runSearch.php
M maintenance/saneitize.php
M maintenance/updateOneSearchIndexConfig.php
M maintenance/updateSuggesterIndex.php
M maintenance/updateVersionIndex.php
M tests/unit/UserTestingTest.php
29 files changed, 38 insertions(+), 38 deletions(-)

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



diff --git a/includes/Api/MappingDump.php b/includes/Api/MappingDump.php
index 3b38c32..2bdb84e 100644
--- a/includes/Api/MappingDump.php
+++ b/includes/Api/MappingDump.php
@@ -24,7 +24,7 @@
public function execute() {
$conn = $this->getCirrusConnection();
foreach( $conn->getAllIndexTypes() as $index ) {
-   $mapping = $conn->getPageType( wfWikiId(), $index 
)->getMapping();
+   $mapping = $conn->getPageType( wfWikiID(), $index 
)->getMapping();
$this->getResult()->addValue( null, $index, $mapping );
$this->getResult()->addPreserveKeysList( array( $index, 
'page' ), '_all' );
}
diff --git a/includes/Api/SettingsDump.php b/includes/Api/SettingsDump.php
index 67f8357..b3ab7f9 100644
--- a/includes/Api/SettingsDump.php
+++ b/includes/Api/SettingsDump.php
@@ -25,7 +25,7 @@
$conn = $this->getCirrusConnection();
foreach( $conn->getAllIndexTypes() as $index ) {
$this->getResult()->addValue( array( $index, 'page' ), 
'index',
-   $conn->getIndex( wfWikiId(), $index 
)->getSettings()->get() );
+   $conn->getIndex( wfWikiID(), $index 
)->getSettings()->get() );
}
}
 
diff --git a/includes/BuildDocument/PageDataBuilder.php 
b/includes/BuildDocument/PageDataBuilder.php
index 1574450..0ea34fa 100644
--- a/includes/BuildDocument/PageDataBuilder.php
+++ b/includes/BuildDocument/PageDataBuilder.php
@@ -73,7 +73,7 @@
foreach ( $this->parserOutput->getLinks() as $linkedNamespace 
=> $namespaceLinks ) {
foreach ( array_keys( $namespaceLinks ) as $linkedDbKey 
) {
$outgoingLinks[] =
-   Title::makeTitle( $linkedNamespace, 
$linkedDbKey )->getPrefixedDBKey();
+   Title::makeTitle( $linkedNamespace, 
$linkedDbKey )->getPrefixedDBkey();
}
}
$this->doc->set( 'outgoing_link', $outgoingLinks );
diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php 
b/includes/BuildDocument/RedirectsAndIncomingLinks.php
index 60c45c4..d8a8aaa 100644
--- a/includes/BuildDocument/RedirectsAndIncomingLinks.php
+++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php
@@ -146,7 +146,7 @@
private function buildCount( array $titles ) {
$filter = new Terms( 'outgoing_link', $titles );
$filter->setCached( false ); // We're not going to be redoing 
this any time soon.
-   $type = $this->connection->getPageType( wfWikiId() );
+   $type = $this->connection->getPageType( wfWikiID() );
$search = new \Elastica\Search( $type->getIndex()->getClient() 
);
$search->addIndex( $type->getIndex() );
$search->addType( $type );
diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php
index 2c65a43..7114e12 100644
--- a/includes/CirrusSearch.php
+++ b/includes/CirrusSearch.php
@@ -73,7 +73,7 @@
private $request;
 
public function __construct( $baseName = null ) {
-   $this->indexBaseName = $baseName === null ? wfWikiId() : 
$baseName;
+   $this->indexBaseName = $baseName === null ? wf

[MediaWiki-commits] [Gerrit] Add more type annotations to CirrusSearch\Search namespace - change (mediawiki...CirrusSearch)

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

Change subject: Add more type annotations to CirrusSearch\Search namespace
..


Add more type annotations to CirrusSearch\Search namespace

This should cover pretty much everything in the Search namespace.

Bug: T132625
Change-Id: I1e5f3a1f2a4fe71c8957f0a74c481d654c687ee2
---
M includes/Search/Escaper.php
M includes/Search/Filters.php
M includes/Search/RescoreBuilders.php
M includes/Search/Result.php
M includes/Search/ResultSet.php
M includes/Search/ResultsType.php
M includes/Search/SearchContext.php
M includes/Search/SearchTextQueryBuilders.php
8 files changed, 254 insertions(+), 52 deletions(-)

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



diff --git a/includes/Search/Escaper.php b/includes/Search/Escaper.php
index 1c51f7b..fcf3e78 100644
--- a/includes/Search/Escaper.php
+++ b/includes/Search/Escaper.php
@@ -22,6 +22,9 @@
  */
 class Escaper {
 
+   /**
+* @var string MediaWiki language code
+*/
private $language;
 
/**
@@ -30,11 +33,19 @@
 */
private $allowLeadingWildcard;
 
+   /**
+* @param string $language MediaWiki language code
+* @param bool $allowLeadingWildcard
+*/
public function __construct( $language, $allowLeadingWildcard = true ) {
$this->language = $language;
$this->allowLeadingWildcard = $allowLeadingWildcard;
}
 
+   /**
+* @param string $text
+* @return string
+*/
public function escapeQuotes( $text ) {
if ( $this->language === 'he' ) {
// Hebrew uses the double quote (") character as a 
standin for quotation marks (“”)
@@ -59,6 +70,9 @@
 * extra index for.
 * ": Perform a phrase search for the quoted term.  If the "s aren't 
balanced we insert one
 * at the end of the term to make sure elasticsearch doesn't barf at us.
+*
+* @param string $string
+* @return string
 */
public function fixupQueryStringPart( $string ) {
// Escape characters that can be escaped with \\
@@ -84,6 +98,7 @@
 * Make sure that all operators and lucene syntax is used correctly in 
the query string
 * and store if this is a fuzzy query.
 * If it isn't then the syntax escaped so it becomes part of the query 
text.
+*
 * @param string $string
 * @return array(string, boolean) (fixedup query string, is this a 
fuzzy query?)
 */
@@ -150,14 +165,26 @@
return array( $string, $fuzzyQuery );
}
 
+   /**
+* @param string[] $matches
+* @return string
+*/
private static function escapeBadSyntax( $matches ) {
return "\\" . implode( "\\", str_split( $matches[ 0 ] ) );
}
 
+   /**
+* @param string[] $matches
+* @return string
+*/
private static function lowercaseMatched( $matches ) {
return strtolower( $matches[ 0 ] );
}
 
+   /**
+* @param string $text
+* @return string
+*/
public function balanceQuotes( $text ) {
$inQuote = false;
$inEscape = false;
@@ -183,6 +210,8 @@
 
/**
 * Is leading wildcard allowed?
+*
+* @return bool
 */
public function getAllowLeadingWildcard() {
return $this->allowLeadingWildcard;
diff --git a/includes/Search/Filters.php b/includes/Search/Filters.php
index dfeb9ba..9c7c3a4 100644
--- a/includes/Search/Filters.php
+++ b/includes/Search/Filters.php
@@ -27,6 +27,7 @@
/**
 * Merges lists of include/exclude filters into a single filter that
 * Elasticsearch will execute efficiently.
+*
 * @param AbstractFilter[] $mustFilters filters that must match all 
returned documents
 * @param AbstractFilter[] $mustNotFilters filters that must not match 
all returned documents
 * @return null|AbstractFilter null if there are no filters or one that 
will execute
@@ -78,6 +79,7 @@
 
/**
 * Unify non-script filters into a single filter.
+*
 * @param AbstractFilter[] $mustFilters filters that must be found
 * @param AbstractFilter[] $mustNotFilters filters that must not be 
found
 * @return null|AbstractFilter null if there are no filters or one that 
will execute
@@ -109,12 +111,13 @@
 * Create a filter for insource: queries.  This was extracted from the 
big
 * switch block in Searcher.php.  This function is pure, deferring state
 * changes to the reference-updating return function.
+*
 * @param Escaper $escaper
 * @param SearchCon

[MediaWiki-commits] [Gerrit] varnish redir: wmfusercontent.org -> www.wikimedia.org - change (operations/puppet)

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

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

Change subject: varnish redir: wmfusercontent.org -> www.wikimedia.org
..

varnish redir: wmfusercontent.org -> www.wikimedia.org

This is in support of STS-preload for wmfusercontent.org

Bug: T132452
Change-Id: I6f133d661674edaea16be7af0c905dab0f2a0e39
---
M templates/varnish/misc-frontend.inc.vcl.erb
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/12/284112/1

diff --git a/templates/varnish/misc-frontend.inc.vcl.erb 
b/templates/varnish/misc-frontend.inc.vcl.erb
index b843d1b..98a589f 100644
--- a/templates/varnish/misc-frontend.inc.vcl.erb
+++ b/templates/varnish/misc-frontend.inc.vcl.erb
@@ -20,6 +20,13 @@
 set req.http.X-Forwarded-Port = "443";
 }
 
+// STS-preload checker doesn't like [45]xx responses, but 3xx is OK, so
+// re-use the TLS-redirector code and send them to the wikimedia site.
+if (req.http.Host == "wmfusercontent.org") {
+set req.http.Location = "https://www.wikimedia.org";;
+<%= error_synth(751, "TLS Redirect") -%>
+}
+
 call misc_recv_pass;
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] secure WMF-Last-Access cookie - change (operations/puppet)

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

Change subject: secure WMF-Last-Access cookie
..


secure WMF-Last-Access cookie

Note I did this before, but stupidly only changed the varnish4
case, back in commit 80327148

Bug: T119576
Change-Id: I9b019f4fd5484d21fe733b64ada0f4bf267b7f2c
---
M templates/varnish/analytics.inc.vcl.erb
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/templates/varnish/analytics.inc.vcl.erb 
b/templates/varnish/analytics.inc.vcl.erb
index ca2eba1..fa2bd78 100644
--- a/templates/varnish/analytics.inc.vcl.erb
+++ b/templates/varnish/analytics.inc.vcl.erb
@@ -52,7 +52,7 @@
  * header.append(resp.http.Set-Cookie,
  * "WMF-Last-Access="
  * + req.http.X-NowDay
- * + ";Path=/;HttpOnly;Expires="
+ * + ";Path=/;HttpOnly;secure;Expires="
  * + (now + 32d)
  * );
  * However, varnish3 is buggy wrt str + (time + duration), so we're forced to
@@ -65,7 +65,7 @@
 Vmod_Func_header.append(sp, HDR_RESP, "\013Set-Cookie:",
 "WMF-Last-Access=",
 VRT_GetHdr(sp, HDR_REQ, "\011X-NowDay:"),
-";Path=/;HttpOnly;Expires=",
+";Path=/;HttpOnly;secure;Expires=",
 VRT_time_string(sp, (double)(
 ((time_t)VRT_r_now(sp) + 2764800) / 43200 * 43200
 )),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b019f4fd5484d21fe733b64ada0f4bf267b7f2c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Ema 
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] Annotate SearchResult and related classes - change (mediawiki...CirrusSearch)

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

Change subject: Annotate SearchResult and related classes
..


Annotate SearchResult and related classes

Bug: T132625
Change-Id: Ifcf08869717ce9b9bb169ea2e52bb99938565e5b
---
M includes/Search/Result.php
M includes/Search/ResultSet.php
M includes/Search/ResultsType.php
3 files changed, 157 insertions(+), 34 deletions(-)

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



diff --git a/includes/Search/Result.php b/includes/Search/Result.php
index 4908f5b..e96f1eb 100644
--- a/includes/Search/Result.php
+++ b/includes/Search/Result.php
@@ -29,17 +29,37 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 class Result extends SearchResult {
+   /** @var string */
private $titleSnippet = '';
-   private $redirectTitle = null, $redirectSnipppet = '';
-   private $sectionTitle = null, $sectionSnippet = '';
+   /** @var Title|null */
+   private $redirectTitle = null;
+   /** @var string */
+   private $redirectSnipppet = '';
+   /** @var Title|null */
+   private $sectionTitle = null;
+   /** @var string */
+   private $sectionSnippet = '';
+   /** @var string */
private $categorySnippet = '';
-   private $textSnippet = '', $isFileMatch = false;
-   private $interwiki = '', $interwikiNamespace = '';
+   /** @var string */
+   private $textSnippet;
+   /** @var bool */
+   private $isFileMatch = false;
+   /* @var string */
+   private $interwiki = '';
+   /** @var string */
+   private $interwikiNamespace = '';
+   /** @var int */
private $wordCount;
+   /** @var int */
private $byteSize;
+   /** @var string */
private $timestamp;
+   /** @var string */
private $docId;
+   /** @var float */
private $score;
+   /** @var array */
private $explanation;
 
/**
@@ -47,7 +67,7 @@
 * @param \Elastica\ResultSet $results containing all search results
 * @param \Elastica\Result $result containing the given search result
 * @param string $interwiki Interwiki prefix, if any
-* @param \Elastic\Result $result containing information about the 
result this class should represent
+* @param \Elastica\Result $result containing information about the 
result this class should represent
 */
public function __construct( $results, $result, $interwiki = '' ) {
if ( $interwiki ) {
@@ -178,8 +198,8 @@
/**
 * Build the redirect title from the highlighted redirect snippet.
 * @param string $snippet Highlighted redirect snippet
-* @param array[] $redirects Array of redirects stored as arrays with 
'title' and 'namespace' keys
-* @return Title object representing the redirect
+* @param array[]|null $redirects Array of redirects stored as arrays 
with 'title' and 'namespace' keys
+* @return Title|null object representing the redirect
 */
private function findRedirectTitle( $snippet, $redirects ) {
$title = $this->stripHighlighting( $snippet );
@@ -261,7 +281,8 @@
}
 
/**
-* @return Title|null
+* @param array
+* @return string|null
 */
public function getTextSnippet( $terms ) {
return $this->textSnippet;
@@ -331,7 +352,7 @@
}
 
/**
-* @return int
+* @return string
 */
public function getDocId() {
return $this->docId;
diff --git a/includes/Search/ResultSet.php b/includes/Search/ResultSet.php
index d0b5880..be78d67 100644
--- a/includes/Search/ResultSet.php
+++ b/includes/Search/ResultSet.php
@@ -28,13 +28,65 @@
 * @var \Elastica\ResultSet
 */
private $result;
-   private $hits, $totalHits, $suggestionQuery, $suggestionSnippet;
+
+   /**
+* @var int
+*/
+   private $hits;
+
+   /**
+* @var int
+*/
+   private $totalHits;
+
+   /**
+* @var string|null
+*/
+   private $suggestionQuery;
+
+   /**
+* @var string
+*/
+   private $suggestionSnippet;
+
+   /**
+* @var bool
+*/
private $searchContainedSyntax;
-   private $interwikiPrefix,$interwikiResults;
+
+   /**
+* @var string
+*/
+   private $interwikiPrefix;
+
+   /**
+* @var array
+*/
+   private $interwikiResults = array();
+
+   /**
+* @var string|null
+*/
private $rewrittenQuery;
+
+   /**
+* @var string|null
+*/
+   private $rewrittenQuerySnippet;
+
+   /**
+* @var \Iterator|null
+*/
private $swappedResultIter;
 
-   

[MediaWiki-commits] [Gerrit] Expand annotations in Elasticsearch\Maintenance namespace - change (mediawiki...CirrusSearch)

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

Change subject: Expand annotations in Elasticsearch\Maintenance namespace
..


Expand annotations in Elasticsearch\Maintenance namespace

Bug: T132625
Change-Id: I22b72ce1646aeb951cb2ebd8aaa1a10d84ee9b5d
---
M includes/Maintenance/AnalysisConfigBuilder.php
M includes/Maintenance/ChunkBuilder.php
M includes/Maintenance/ConfigUtils.php
M includes/Maintenance/Maintenance.php
M includes/Maintenance/MappingConfigBuilder.php
M includes/Maintenance/OrderedStreamingForkController.php
M includes/Maintenance/Reindexer.php
M includes/Maintenance/SuggesterAnalysisConfigBuilder.php
M includes/Maintenance/SuggesterMappingConfigBuilder.php
M includes/Maintenance/Validators/CacheWarmersValidator.php
M includes/Maintenance/Validators/IndexAliasValidator.php
M includes/Maintenance/Validators/IndexAllAliasValidator.php
M includes/Maintenance/Validators/MappingValidator.php
M includes/Maintenance/Validators/ShardAllocationValidator.php
M includes/Maintenance/Validators/SpecificAliasValidator.php
M includes/Maintenance/Validators/Validator.php
16 files changed, 163 insertions(+), 43 deletions(-)

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



diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index 14edb40..b34bacf 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -36,8 +36,7 @@
const VERSION = '0.10';
 
/**
-* Language code we're building analysis for
-* @var string
+* @var string Language code we're building analysis for
 */
private $language;
 
@@ -46,6 +45,9 @@
 */
private $icu;
 
+   /**
+* @var array Similarity algo (tf/idf, bm25, etc) configuration
+*/
private $similarity;
 
/**
@@ -54,12 +56,11 @@
protected $config;
 
/**
-* Constructor
 * @param string $langCode The language code to build config for
-* @param array(string) $plugins list of plugins installed in 
Elasticsearch
+* @param string[] $plugins list of plugins installed in Elasticsearch
 * @param SearchConfig $config
 */
-   public function __construct( $langCode, $plugins, $config = null ) {
+   public function __construct( $langCode, array $plugins, SearchConfig 
$config = null ) {
$this->language = $langCode;
foreach ( $this->elasticsearchLanguageAnalyzersFromPlugins as 
$plugin => $extra ) {
if ( in_array( $plugin, $plugins ) ) {
@@ -78,6 +79,7 @@
 
/**
 * Build the analysis config.
+*
 * @return array the analysis config
 */
public function buildConfig() {
@@ -88,16 +90,20 @@
 
/**
 * Build the similarity config
-* @return array the similarity config
+*
+* @return array|null the similarity config
 */
public function buildSimilarityConfig() {
if ( $this->similarity != null && isset ( 
$this->similarity['similarity'] ) ) {
return $this->similarity['similarity'];
}
+   return null;
}
 
/**
 * Build an analysis config with sane defaults.
+*
+* @return array
 */
private function defaults() {
$defaults = array(
@@ -266,6 +272,9 @@
 
/**
 * Customize the default config for the language.
+*
+* @param array $config
+* @return array
 */
private function customize( $config ) {
switch ( $this->getDefaultTextAnalyzerType() ) {
@@ -406,6 +415,7 @@
 * Pick the appropriate default analyzer based on the language.  Rather 
than think of
 * this as per language customization you should think of this as an 
effort to pick a
 * reasonably default in case CirrusSearch isn't customized for the 
language.
+*
 * @return string the analyzer type
 */
public function getDefaultTextAnalyzerType() {
@@ -437,6 +447,8 @@
 * other languages default to the default analyzer which isn't too 
good.  Note
 * that this array is sorted alphabetically by value and sourced from
 * 
http://www.elasticsearch.org/guide/reference/index-modules/analysis/lang-analyzer/
+*
+* @var string[]
 */
private $elasticsearchLanguageAnalyzers = array(
'ar' => 'arabic',
@@ -478,6 +490,10 @@
'th' => 'thai',
);
 
+
+   /**
+* @var array[]
+*/
private $elasticsearchLanguageAnalyzersFromPlugins = array(
'analysis-stempel' => array(

[MediaWiki-commits] [Gerrit] Tests for VisualEditor - change (wikidata...gui)

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

Change subject: Tests for VisualEditor
..


Tests for VisualEditor

Change-Id: Ie8c77191b016814de6302dbcc5c829bb1d314c68
---
A wikibase/tests/VisualEditor.html
A wikibase/tests/queryService/ui/visualEditor/VisualEditor.test.js
2 files changed, 118 insertions(+), 0 deletions(-)

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



diff --git a/wikibase/tests/VisualEditor.html b/wikibase/tests/VisualEditor.html
new file mode 100644
index 000..2199bf5
--- /dev/null
+++ b/wikibase/tests/VisualEditor.html
@@ -0,0 +1,30 @@
+
+
+
+  
+  
+  QUnit Tests
+  
+  
+
+
+  
+  
+ 
+ 
+   
+   
+   
+   
+   
+   
+   
+ 
+   
+   
+   
+   
+
+   
+
+
\ No newline at end of file
diff --git a/wikibase/tests/queryService/ui/visualEditor/VisualEditor.test.js 
b/wikibase/tests/queryService/ui/visualEditor/VisualEditor.test.js
new file mode 100644
index 000..e338215
--- /dev/null
+++ b/wikibase/tests/queryService/ui/visualEditor/VisualEditor.test.js
@@ -0,0 +1,88 @@
+( function ( $, QUnit, sinon, wb ) {
+   'use strict';
+
+   QUnit.module( 'wikibase.queryService.ui.visualEditor' );
+
+   var PREFIXES = '\nPREFIX wikibase: \nPREFIX 
wd: \nPREFIX wdt: 
\nPREFIX wds: 
\nPREFIX p: 
\nPREFIX wdref: 
\nPREFIX wdv: 
\nPREFIX ps: 
\nPREFIX psv: 
\nPREFIX pq: 
\nPREFIX pqv: 
\nPREFIX pr: 
\nPREFIX prv: 
\nPREFIX wdno: 
\nPREFIX wdata: 
\nPREFIX rdfs: 
\nPREFIX rdf: 
\nPREFIX owl: 
\nPREFIX skos: 
\nPREFIX xsd: 
\nPREFIX prov: 
\nPREFIX schema: \nPREFIX bd: 
\nPREFIX bds: 
\nPREFIX gas: 
\nPREFIX hint: 
\n';
+   var TEST_CASES = [
+   {
+   name: 'Cat query',
+   sparqlIn: 'SELECT ?item ?itemLabel WHERE { 
?item wdt:P31 wd:Q146 . SERVICE wikibase:label { bd:serviceParam 
wikibase:language "en" } }',
+   sparqlOut: PREFIXES
+   + 'SELECT ?item ?itemLabel 
WHERE {\n  ?item  
.\n  SERVICE 
 {  
 "en". }\n}',
+   text: 'Find instance of cat'
+   },
+   {
+   name: 'List of presidents with causes of death',
+   sparqlIn: 'SELECT ?h ?cause ?hl ?causel WHERE { 
?h wdt:P39 wd:Q11696 . ?h wdt:P509 ?cause . OPTIONAL {?h rdfs:label ?hl 
filter (lang(?hl) = "en") . } OPTIONAL {   ?cause rdfs:label ?causel filter 
(lang(?causel) = "en").  }}',
+   sparqlOut: PREFIXES
+   + 'SELECT ?h ?cause ?hl ?causel 
WHERE {\n  ?h  
.\n  ?h 
 ?cause.\n  OPTIONAL {\n?h 
 ?hl.\nFILTER((LANG(?hl)) = 
\"en\")\n  }\n  OPTIONAL {\n?cause 
 ?causel.\n
FILTER((LANG(?causel)) = "en")\n  }\n}',
+   text: 'Find position held President of the 
United States of America  Show cause of death'
+   },
+   {
+   name: 'List of actors with pictures with year 
of birth and/or death',
+   sparqlIn: 'SELECT ?human ?humanLabel ?yob ?yod 
?picture WHERE{ ?human wdt:P31 wd:Q5 ; wdt:P106 wd:Q33999 . ?human wdt:P18 
?picture . OPTIONAL { ?human wdt:P569 ?dob . ?human wdt:P570 ?dod }. 
BIND(YEAR(?dob) as ?yob) . BIND(YEAR(?dod) as ?yod) . SERVICE wikibase:label {  
bd:serviceParam wikibase:language "en" . }}LIMIT 88',
+   spa

[MediaWiki-commits] [Gerrit] secure CP cookie - change (operations/puppet)

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

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

Change subject: secure CP cookie
..

secure CP cookie

Bug: T119576
Change-Id: Ie6dd296869468d8ca173b8fb9d3fb5de80fbbae8
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/284111/1

diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 74a7a46..f0e19e0 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -340,13 +340,13 @@
// Set CP ('Connection Properties') cookie
if (req.http.X-Connection-Properties ~ "SPDY=3|H2=1") {
if (req.http.X-Orig-Cookie !~ "(^|;\s*)CP=H2" && 
req.http.Cookie !~ "(^|;\s*)CP=H2") {
-   header.append(resp.http.Set-Cookie, "CP=H2; Path=/");
+   header.append(resp.http.Set-Cookie, "CP=H2; Path=/; 
secure");
}
} else {
// Explicitly unset the cookie if it exists. Support for SPDY 
in a browser session can
// flip if a device moves networks and thus behind a proxy.
if (req.http.X-Orig-Cookie ~ "(^|;\s*)CP=H2" || req.http.Cookie 
~ "(^|;\s*)CP=H2") {
-   header.append(resp.http.Set-Cookie, "CP=H1; 
Expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/");
+   header.append(resp.http.Set-Cookie, "CP=H1; 
Expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/; secure");
}
}
 

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

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

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


[MediaWiki-commits] [Gerrit] secure WMF-Last-Access cookie - change (operations/puppet)

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

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

Change subject: secure WMF-Last-Access cookie
..

secure WMF-Last-Access cookie

Note I did this before, but stupidly only changed the varnish4
case, back in commit 80327148

Bug: T119576
Change-Id: I9b019f4fd5484d21fe733b64ada0f4bf267b7f2c
---
M templates/varnish/analytics.inc.vcl.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/284110/1

diff --git a/templates/varnish/analytics.inc.vcl.erb 
b/templates/varnish/analytics.inc.vcl.erb
index ca2eba1..fa2bd78 100644
--- a/templates/varnish/analytics.inc.vcl.erb
+++ b/templates/varnish/analytics.inc.vcl.erb
@@ -52,7 +52,7 @@
  * header.append(resp.http.Set-Cookie,
  * "WMF-Last-Access="
  * + req.http.X-NowDay
- * + ";Path=/;HttpOnly;Expires="
+ * + ";Path=/;HttpOnly;secure;Expires="
  * + (now + 32d)
  * );
  * However, varnish3 is buggy wrt str + (time + duration), so we're forced to
@@ -65,7 +65,7 @@
 Vmod_Func_header.append(sp, HDR_RESP, "\013Set-Cookie:",
 "WMF-Last-Access=",
 VRT_GetHdr(sp, HDR_REQ, "\011X-NowDay:"),
-";Path=/;HttpOnly;Expires=",
+";Path=/;HttpOnly;secure;Expires=",
 VRT_time_string(sp, (double)(
 ((time_t)VRT_r_now(sp) + 2764800) / 43200 * 43200
 )),

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

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

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


[MediaWiki-commits] [Gerrit] Fix quotes for "mark as resolved" on history and IRC - change (mediawiki...Flow)

2016-04-18 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Fix quotes for "mark as resolved" on history and IRC
..

Fix quotes for "mark as resolved" on history and IRC

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


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

diff --git a/i18n/en.json b/i18n/en.json
index c8d54fd..9ebb8b6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -235,8 +235,8 @@
"flow-rev-message-deleted-topic-irc": "$2 {{GENDER:$2|deleted}} the 
topic \"$6\" ($5)",
"flow-rev-message-suppressed-topic": "$1 {{GENDER:$2|suppressed}} the 
[$4 topic] \"$6\" ($5)",
"flow-rev-message-suppressed-topic-irc": "$2 {{GENDER:$2|suppressed}} 
the topic \"$6\" ($5)",
-   "flow-rev-message-locked-topic": "$1 {{GENDER:$2|marked}} the [$4 
topic] $6 as resolved ($5)",
-   "flow-rev-message-locked-topic-irc": "$2 {{GENDER:$2|resolved}} the 
topic $6 ($5)",
+   "flow-rev-message-locked-topic": "$1 {{GENDER:$2|marked}} the [$4 
topic] \"$6\" as resolved ($5)",
+   "flow-rev-message-locked-topic-irc": "$2 {{GENDER:$2|resolved}} the 
topic \"$6\" ($5)",
"flow-rev-message-lock-topic-reason": "marked as resolved",
"flow-rev-message-restore-topic-reason": "reopened",
"flow-rev-message-restored-topic": "$1 {{GENDER:$2|restored}} the [$4 
topic] \"$6\" ($5)",

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

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

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


[MediaWiki-commits] [Gerrit] Use transparent rather than white in icons - change (oojs/ui)

2016-04-18 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Use transparent rather than white in icons
..

Use transparent rather than white in icons

We had a few icons with white shapes painted over the black shapes,
rather than "holes" in the black shapes. They would break in funny
ways if we tried to color them. Found by grepping for 'fff'.

Change-Id: I029715235f458928669a1840bc039f1bdcf58d77
---
M src/themes/apex/images/icons/flagUndo-ltr.svg
M src/themes/apex/images/icons/flagUndo-rtl.svg
M src/themes/mediawiki/images/icons/flagUndo-ltr.svg
M src/themes/mediawiki/images/icons/flagUndo-rtl.svg
M src/themes/mediawiki/images/icons/speechBubbleAdd-ltr.svg
M src/themes/mediawiki/images/icons/speechBubbleAdd-rtl.svg
6 files changed, 6 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/08/284108/1

diff --git a/src/themes/apex/images/icons/flagUndo-ltr.svg 
b/src/themes/apex/images/icons/flagUndo-ltr.svg
index fae0da1..516a3ea 100644
--- a/src/themes/apex/images/icons/flagUndo-ltr.svg
+++ b/src/themes/apex/images/icons/flagUndo-ltr.svg
@@ -1,6 +1,4 @@
 
 http://www.w3.org/2000/svg"; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
+
 
diff --git a/src/themes/apex/images/icons/flagUndo-rtl.svg 
b/src/themes/apex/images/icons/flagUndo-rtl.svg
index 0b14c25..8ed159e 100644
--- a/src/themes/apex/images/icons/flagUndo-rtl.svg
+++ b/src/themes/apex/images/icons/flagUndo-rtl.svg
@@ -1,6 +1,4 @@
 
 http://www.w3.org/2000/svg"; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
+
 
diff --git a/src/themes/mediawiki/images/icons/flagUndo-ltr.svg 
b/src/themes/mediawiki/images/icons/flagUndo-ltr.svg
index fae0da1..516a3ea 100644
--- a/src/themes/mediawiki/images/icons/flagUndo-ltr.svg
+++ b/src/themes/mediawiki/images/icons/flagUndo-ltr.svg
@@ -1,6 +1,4 @@
 
 http://www.w3.org/2000/svg"; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
+
 
diff --git a/src/themes/mediawiki/images/icons/flagUndo-rtl.svg 
b/src/themes/mediawiki/images/icons/flagUndo-rtl.svg
index 0b14c25..8ed159e 100644
--- a/src/themes/mediawiki/images/icons/flagUndo-rtl.svg
+++ b/src/themes/mediawiki/images/icons/flagUndo-rtl.svg
@@ -1,6 +1,4 @@
 
 http://www.w3.org/2000/svg"; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
+
 
diff --git a/src/themes/mediawiki/images/icons/speechBubbleAdd-ltr.svg 
b/src/themes/mediawiki/images/icons/speechBubbleAdd-ltr.svg
index 1b0db88..c7134c3 100644
--- a/src/themes/mediawiki/images/icons/speechBubbleAdd-ltr.svg
+++ b/src/themes/mediawiki/images/icons/speechBubbleAdd-ltr.svg
@@ -1,5 +1,4 @@
 
 http://www.w3.org/2000/svg"; width="24" height="24" viewBox="0 0 24 
24">
-
-
+
 
diff --git a/src/themes/mediawiki/images/icons/speechBubbleAdd-rtl.svg 
b/src/themes/mediawiki/images/icons/speechBubbleAdd-rtl.svg
index ea9b849..08462e0 100644
--- a/src/themes/mediawiki/images/icons/speechBubbleAdd-rtl.svg
+++ b/src/themes/mediawiki/images/icons/speechBubbleAdd-rtl.svg
@@ -1,5 +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/284108
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I029715235f458928669a1840bc039f1bdcf58d77
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] gitblit: fix unit file, don't use /opt/ - change (operations/puppet)

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

Change subject: gitblit: fix unit file, don't use /opt/
..


gitblit: fix unit file, don't use /opt/

Change-Id: I21d0191f5ad6b628e611ff6c81405617859e25b9
---
M modules/gitblit/files/gitblit.service
1 file changed, 3 insertions(+), 5 deletions(-)

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



diff --git a/modules/gitblit/files/gitblit.service 
b/modules/gitblit/files/gitblit.service
index 6af6ea9..83ab913 100644
--- a/modules/gitblit/files/gitblit.service
+++ b/modules/gitblit/files/gitblit.service
@@ -5,11 +5,9 @@
 [Service]
 User=gitblit
 Group=gitblit
-Environment="ARGS=-server -Xmx8g -Djava.awt.headless=true -jar"
-EnvironmentFile=-/etc/sysconfig/gitblit
-WorkingDirectory=/opt/gitblit
-ExecStart=/usr/bin/java \$ARGS gitblit.jar --baseFolder /var/lib/gitblit/data
-ExecStop=/usr/bin/java \$ARGS gitblit.jar --baseFolder /var/lib/gitblit/data 
--stop
+WorkingDirectory=/var/lib/gitblit
+ExecStart=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -server -Xmx8g 
-Djava.awt.headless=true -jar gitblit.jar --baseFolder /var/lib/gitblit/data
+ExecStop=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -server -Xmx8g 
-Djava.awt.headless=true -jar gitblit.jar --baseFolder /var/lib/gitblit/data 
--stop
 
 [Install]
 WantedBy=multi-user.target

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

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

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


[MediaWiki-commits] [Gerrit] gitblit: fix unit file, don't use /opt/ - change (operations/puppet)

2016-04-18 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: gitblit: fix unit file, don't use /opt/
..

gitblit: fix unit file, don't use /opt/

Change-Id: I21d0191f5ad6b628e611ff6c81405617859e25b9
---
M modules/gitblit/files/gitblit.service
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/07/284107/1

diff --git a/modules/gitblit/files/gitblit.service 
b/modules/gitblit/files/gitblit.service
index 6af6ea9..83ab913 100644
--- a/modules/gitblit/files/gitblit.service
+++ b/modules/gitblit/files/gitblit.service
@@ -5,11 +5,9 @@
 [Service]
 User=gitblit
 Group=gitblit
-Environment="ARGS=-server -Xmx8g -Djava.awt.headless=true -jar"
-EnvironmentFile=-/etc/sysconfig/gitblit
-WorkingDirectory=/opt/gitblit
-ExecStart=/usr/bin/java \$ARGS gitblit.jar --baseFolder /var/lib/gitblit/data
-ExecStop=/usr/bin/java \$ARGS gitblit.jar --baseFolder /var/lib/gitblit/data 
--stop
+WorkingDirectory=/var/lib/gitblit
+ExecStart=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -server -Xmx8g 
-Djava.awt.headless=true -jar gitblit.jar --baseFolder /var/lib/gitblit/data
+ExecStop=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -server -Xmx8g 
-Djava.awt.headless=true -jar gitblit.jar --baseFolder /var/lib/gitblit/data 
--stop
 
 [Install]
 WantedBy=multi-user.target

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I21d0191f5ad6b628e611ff6c81405617859e25b9
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] Common VCL: remove wikimedia.org subdomain HTTPS redirect ex... - change (operations/puppet)

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

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

Change subject: Common VCL: remove wikimedia.org subdomain HTTPS redirect 
exception
..

Common VCL: remove wikimedia.org subdomain HTTPS redirect exception

Bug: T102826
Bug: T102827
Change-Id: Ic751f5e4ca7e439c0f38a73183bae78f78551a44
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 10 insertions(+), 15 deletions(-)


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

diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 74a7a46..35f6cdd 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -21,16 +21,13 @@
 sub https_recv_redirect {
if (req.http.X-Forwarded-Proto != "https") {
if (<%= @req_method %> == "GET" || <%= @req_method %> == 
"HEAD") {
-   // This is all of our unified cert wildcard domains 
which are TLS-clean (cert matches all extant hostnames within),
-   // as well as the separate cert for wmfusercontent.org.
-   // The lone exception now is wikimedia.org, in the next 
block
-   if (req.http.Host ~ 
"(?i)((^|\.)(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki|wmfusercontent)\.org|^w\.wiki)$")
 {
-   set req.http.Location = "https://"; + 
req.http.Host + req.url;
-   <%= error_synth(751, "TLS Redirect") -%>
-   }
-   // wikimedia.org has multi-level subdomains used for 
HTTP for which we have no certs, so they must be avoided here:
-   // Ref: T102826 + T102827
-   else if(req.http.Host ~ 
"(?i)^([^.]+\.)?(m\.)?wikimedia\.org$") {
+   // This is all of our unified cert wildcard domains, and
+   // also wmfusercontent.org which has a separate cert on
+   // cache_misc.  Note that *.planet.wikimedia.org has
+   // a separate cert on cache_misc as well, which is why
+   // this isn't a problematic subdomain in spite of it not
+   // matching the unified wildcards for wikimedia.org.
+   if (req.http.Host ~ 
"(?i)((^|\.)(wikipedia|wikimedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki|wmfusercontent)\.org|^w\.wiki)$")
 {
set req.http.Location = "https://"; + 
req.http.Host + req.url;
<%= error_synth(751, "TLS Redirect") -%>
}
@@ -55,12 +52,10 @@
 
 // *** HTTPS deliver code - domain-based HSTS headers
 sub https_deliver_hsts {
-   // The reason we don't need the stricter domain restrictions here,
-   // like we do on the recv side for redirects, is that in order for
-   // HSTS to reach a client, the client implicitly has to have already
-   // successfully reached us over HTTPS for the given domainname.
if (req.http.X-Forwarded-Proto == "https") {
-   // This is the same regex as the first one in 
https_recv_redirect (all unified except wikimedia.org, plus wmfusercontent.org)
+   // This is almost the same regex as the first one for the
+   // redirects, but not wikimedia.org which we can't
+   // includeSub/preload yet: T132685
if (req.http.Host ~ 
"(?i)((^|\.)(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki|wmfusercontent)\.org|^w\.wiki)$")
 {
set resp.http.Strict-Transport-Security = 
"max-age=31536000; includeSubDomains; preload";
}

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

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

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


[MediaWiki-commits] [Gerrit] Remove unused $wmfHostnames['bits'] configuration - change (operations/mediawiki-config)

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

Change subject: Remove unused $wmfHostnames['bits'] configuration
..


Remove unused $wmfHostnames['bits'] configuration

Checked all occurrences of "bits" or "$wmfHostnames". The only
match is the definition. No loops or variable bracket access.

Bug: T107430
Change-Id: I1547834441de858a74a1bfaa4d418aeaccaa0e72
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index bcbb42d..1a987f9 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -59,7 +59,6 @@
 # 'meta': meta wiki for user editable content
 # 'upload'  : hostname where files are hosted
 # 'wikidata': hostname for the data repository
-# 'bits': for load.php and js/css assets
 # Whenever all realms/datacenters should use the same host, do not use
 # $wmfHostnames but use the hardcoded hostname instead. A good example are the
 # spam blacklists hosted on meta.wikimedia.org which you will surely want to
@@ -67,7 +66,6 @@
 $wmfHostnames = array();
 switch( $wmfRealm ) {
 case 'labs':
-   $wmfHostnames['bits'] = 'bits.beta.wmflabs.org';
$wmfHostnames['meta'] = 'meta.wikimedia.beta.wmflabs.org';
$wmfHostnames['test'] = 'test.wikimedia.beta.wmflabs.org';
$wmfHostnames['upload']   = 'upload.beta.wmflabs.org';
@@ -75,7 +73,6 @@
break;
 case 'production':
 default:
-   $wmfHostnames['bits']   = 'bits.wikimedia.org';
$wmfHostnames['meta']   = 'meta.wikimedia.org';
$wmfHostnames['test']   = 'test.wikipedia.org';
$wmfHostnames['upload'] = 'upload.wikimedia.org';
@@ -497,7 +494,7 @@
$wgFileExtensions[] = 'dv';
$wgFileExtensions[] = 'avi';
$wgFileExtensions[] = 'mov';
-   $wgFileExtensions[] = 'mp3'; // for Jay for fundraising bits
+   $wgFileExtensions[] = 'mp3'; // for Jay for fundraising files
$wgFileExtensions[] = 'aif'; // "
$wgFileExtensions[] = 'aiff'; // "
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1547834441de858a74a1bfaa4d418aeaccaa0e72
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Reject usernames with namespace or interwiki prefixes - change (mediawiki/core)

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

Change subject: Reject usernames with namespace or interwiki prefixes
..


Reject usernames with namespace or interwiki prefixes

User::getCanonicalName silently stripped namepace/iw prefixes,
resulting in weird behavior (e.g. entering 'Template:Foo' in the
registration form username field was accepted, but user 'Foo' was
created). Explicitly reject such names instead.

Also remove leading whitespace from test cases testing for something
else.

Bug: T94656
Change-Id: Idfb22f998cb069fca24abcf5809afd6e0324b0ae
---
M includes/user/User.php
M tests/phpunit/includes/user/UserTest.php
2 files changed, 34 insertions(+), 18 deletions(-)

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



diff --git a/includes/user/User.php b/includes/user/User.php
index 04eba97..c1e096b 100644
--- a/includes/user/User.php
+++ b/includes/user/User.php
@@ -1070,9 +1070,9 @@
// Clean up name according to title rules,
// but only when validation is requested (bug 12654)
$t = ( $validate !== false ) ?
-   Title::newFromText( $name ) : Title::makeTitle( 
NS_USER, $name );
+   Title::newFromText( $name, NS_USER ) : 
Title::makeTitle( NS_USER, $name );
// Check for invalid titles
-   if ( is_null( $t ) ) {
+   if ( is_null( $t ) || $t->getNamespace() !== NS_USER || 
$t->isExternal() ) {
return false;
}
 
diff --git a/tests/phpunit/includes/user/UserTest.php 
b/tests/phpunit/includes/user/UserTest.php
index 88bb328..c9b6929 100644
--- a/tests/phpunit/includes/user/UserTest.php
+++ b/tests/phpunit/includes/user/UserTest.php
@@ -342,30 +342,46 @@
 * @covers User::getCanonicalName()
 * @dataProvider provideGetCanonicalName
 */
-   public function testGetCanonicalName( $name, $expectedArray, $msg ) {
+   public function testGetCanonicalName( $name, $expectedArray ) {
+   // fake interwiki map for the 'Interwiki prefix' testcase
+   $this->mergeMwGlobalArrayValue( 'wgHooks', [
+   'InterwikiLoadPrefix' => [
+   function ( $prefix, &$iwdata ) {
+   if ( $prefix === 'interwiki' ) {
+   $iwdata = [
+   'iw_url' => 
'http://example.com/',
+   'iw_local' => 0,
+   'iw_trans' => 0,
+   ];
+   return false;
+   }
+   },
+   ],
+   ] );
+
foreach ( $expectedArray as $validate => $expected ) {
$this->assertEquals(
$expected,
-   User::getCanonicalName( $name, $validate === 
'false' ? false : $validate ),
-   $msg . ' (' . $validate . ')'
-   );
+   User::getCanonicalName( $name, $validate === 
'false' ? false : $validate ), $validate );
}
}
 
public static function provideGetCanonicalName() {
return [
-   [ ' Trailing space ', [ 'creatable' => 'Trailing space' 
], 'Trailing spaces' ],
-   // @todo FIXME: Maybe the creatable name should be 
'Talk:Username' or false to reject?
-   [ 'Talk:Username', [ 'creatable' => 'Username', 
'usable' => 'Username',
-   'valid' => 'Username', 'false' => 
'Talk:Username' ], 'Namespace prefix' ],
-   [ ' name with # hash', [ 'creatable' => false, 'usable' 
=> false ], 'With hash' ],
-   [ 'Multi  spaces', [ 'creatable' => 'Multi spaces',
-   'usable' => 'Multi spaces' ], 'Multi spaces' ],
-   [ 'lowercase', [ 'creatable' => 'Lowercase' ], 
'Lowercase' ],
-   [ 'in[]valid', [ 'creatable' => false, 'usable' => 
false, 'valid' => false,
-   'false' => 'In[]valid' ], 'Invalid' ],
-   [ 'with / slash', [ 'creatable' => false, 'usable' => 
false, 'valid' => false,
-   'false' => 'With / slash' ], 'With slash' ],
+   'Leading space' => [ ' Leading space', [ 'creatable' => 
'Leading space' ] ],
+   'Trailing space ' => [ 'Trailing space ', [ 'creatable' 
=> 'Trailing space' ] ],
+   'Namespace prefix

[MediaWiki-commits] [Gerrit] rcstream: Add documentation link - change (operations/puppet)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: rcstream: Add documentation link
..


rcstream: Add documentation link

Add second link from official documentation that corroborates the
pattern of using ip_hash in this way.

Change-Id: I4f2fc3a460cdb127eaf0724bcac0a10b5b777ac9
---
M modules/rcstream/templates/rcstream.nginx.erb
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved
  Gilles: Looks good to me, but someone else must approve



diff --git a/modules/rcstream/templates/rcstream.nginx.erb 
b/modules/rcstream/templates/rcstream.nginx.erb
index f70ce09..eba6161 100644
--- a/modules/rcstream/templates/rcstream.nginx.erb
+++ b/modules/rcstream/templates/rcstream.nginx.erb
@@ -1,5 +1,6 @@
 # Nginx reverse-proxy for RCStream
-# See .
+# 
+# 
 # Requires Nginx 1.4+.
 <%- if ! @use_ssl -%>
 upstream websockets {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f2fc3a460cdb127eaf0724bcac0a10b5b777ac9
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adding furud as antimony replacement to git replication - change (operations/puppet)

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

Change subject: Adding furud as antimony replacement to git replication
..


Adding furud as antimony replacement to git replication

Change-Id: I1b64e766734a20643031672dc13735bbc2d48e95
---
M modules/role/manifests/gerrit/production.pp
1 file changed, 14 insertions(+), 2 deletions(-)

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



diff --git a/modules/role/manifests/gerrit/production.pp 
b/modules/role/manifests/gerrit/production.pp
index fe34494..484a938 100644
--- a/modules/role/manifests/gerrit/production.pp
+++ b/modules/role/manifests/gerrit/production.pp
@@ -54,12 +54,24 @@
 replication  => {
 # If adding a new entry, remember to add the fingerprint to 
gerrit2's known_hosts
 
-'gitblit' => {
+'gitblit'=> {
 # Note: This is in single quotes on purpose. ${name} is not
 # expected to be expanded by puppet but rather by gerrit
 #
 # lint:ignore:single_quote_string_with_variables
 'url'   => 
'gerritsl...@antimony.wikimedia.org:/var/lib/git/${name}.git',
+# lint:endignore
+'threads'   => '4',
+'authGroup' => 'mediawiki-replication',
+'push'  => '+refs/*:refs/*',
+'mirror'=> true,
+},
+'gitblitnew' => {
+# Note: This is in single quotes on purpose. ${name} is not
+# expected to be expanded by puppet but rather by gerrit
+#
+# lint:ignore:single_quote_string_with_variables
+'url'   => 
'gerritslave@furud.codfw.wmnet:/var/lib/git/${name}.git',
 # lint:endignore
 'threads'   => '4',
 'authGroup' => 'mediawiki-replication',
@@ -78,7 +90,7 @@
 #'push'  => '+refs/*:refs/*',
 #'mirror'=> true,
 #},
-'github'  => {
+'github' => {
 # Note: This is in single quotes on purpose. ${name} is not
 # expected to be expanded by puppet but rather by gerrit
 #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b64e766734a20643031672dc13735bbc2d48e95
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 
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] Also update commented-out bank code - change (mediawiki...DonationInterface)

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

Change subject: Also update commented-out bank code
..


Also update commented-out bank code

Make it easier to re-enable Knab

Bug: T131904
Change-Id: I0dfdb3c5947733d3357e65fb2b401ca646cacc25
---
M globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
M globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html 
b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
index 492f29a..06317eb 100644
--- a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
+++ b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
@@ -80,7 +80,7 @@



ASN Bank

Friesland Bank
-   

+   


RegioBank

Triodos Bank

Van Lanschot Bankiers
diff --git a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html 
b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
index b09265c..a48be1c 100644
--- a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
+++ b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
@@ -80,7 +80,7 @@



ASN Bank

Friesland Bank
-   

+   


RegioBank

Triodos Bank

Van Lanschot Bankiers

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

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

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


[MediaWiki-commits] [Gerrit] 'flow-topic-resolve' notification secondary link to board - change (mediawiki...Flow)

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

Change subject: 'flow-topic-resolve' notification secondary link to board
..


'flow-topic-resolve' notification secondary link to board

The primary link goes to the topic and the 2nd secondary link
used to also go to the topic. Changed the title associated
with the notification so the secondary link goes to the
board. This is how most flow notifications (new-topic, post-edited,
post-reply, summarize, ...) work.

Bug: T132229
Change-Id: Idaed21d44fe342da8b59e04c7617a60b43f71e11
---
M includes/Notifications/Controller.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/Notifications/Controller.php 
b/includes/Notifications/Controller.php
index 37b91e4..4e8f129 100644
--- a/includes/Notifications/Controller.php
+++ b/includes/Notifications/Controller.php
@@ -393,7 +393,7 @@
$info = array(
'type' => 'flow-topic-resolved',
'agent' => $revision->getUser(),
-   'title' => $topicWorkflow->getArticleTitle(),
+   'title' => $topicWorkflow->getOwnerTitle(),
'extra' => $extraData,
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idaed21d44fe342da8b59e04c7617a60b43f71e11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
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] Update parser cache configuration for tag-based hashing - change (operations/mediawiki-config)

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

Change subject: Update parser cache configuration for tag-based hashing
..


Update parser cache configuration for tag-based hashing

This makes sure that keys which are currently mapped to (for example) pc1004
will map to pc2004 once we do the switchover. Depends on I8830bd6bf.

Change-Id: I0ec3c015f3449a2d91d7f83e671d5b88d1d95201
---
M wmf-config/CommonSettings.php
M wmf-config/db-codfw.php
M wmf-config/db-eqiad.php
3 files changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 410f106..bcbb42d 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -322,8 +322,8 @@
 );
 
 $pcServers = array();
-foreach ( $wmgParserCacheDBs as $host ) {
-   $pcServers[] = array( 'host' => $host ) + $pcTemplate;
+foreach ( $wmgParserCacheDBs as $tag => $host ) {
+   $pcServers[$tag] = array( 'host' => $host ) + $pcTemplate;
 }
 
 $wgObjectCaches['mysql-multiwrite'] = array(
diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index ed45c1b..85ac0f8 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -8,9 +8,9 @@
 #$wgReadOnly = "Wikimedia Sites are currently read-only during maintenance, 
please try again soon.";
 
 $wmgParserCacheDBs = array(
-   '10.192.16.170', # pc2004
-   '10.192.32.128', # pc2005
-#  '10.192.48.39',  # pc2006
+   '10.64.0.12'   => '10.192.16.170', # pc2004
+   '10.64.32.72'  => '10.192.32.128', # pc2005
+#  '10.64.48.128' => '10.192.48.39',  # pc2006
 );
 
 $wmgOldExtTemplate = array(
diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index a91b852..3d9c965 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -8,9 +8,9 @@
 #$wgReadOnly = "Wikimedia Sites are currently read-only during maintenance, 
please try again soon.";
 
 $wmgParserCacheDBs = array(
-   '10.64.0.12',   # pc1004
-   '10.64.32.72',  # pc1005
-#  '10.64.48.128', # pc1006
+   '10.64.0.12'   => '10.64.0.12',   # pc1004
+   '10.64.32.72'  => '10.64.32.72',  # pc1005
+#  '10.64.48.128' => '10.64.48.128', # pc1006
 );
 
 $wmgOldExtTemplate = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ec3c015f3449a2d91d7f83e671d5b88d1d95201
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] gitblit: install openjdk-7-jre - change (operations/puppet)

2016-04-18 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: gitblit: install openjdk-7-jre
..

gitblit: install openjdk-7-jre

Bug:T123718
Change-Id: I7982496a462878d524ce7e45289bc374543f88f3
---
M modules/gitblit/manifests/init.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/284104/1

diff --git a/modules/gitblit/manifests/init.pp 
b/modules/gitblit/manifests/init.pp
index 673630c..a1fa9ed 100644
--- a/modules/gitblit/manifests/init.pp
+++ b/modules/gitblit/manifests/init.pp
@@ -19,6 +19,8 @@
 managehome => false,
 }
 
+require_package('openjdk-7-jre')
+
 file { '/var/lib/git':
 ensure => directory,
 mode   => '0644',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7982496a462878d524ce7e45289bc374543f88f3
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] template.py: local variable 'site' referenced before assignm... - change (pywikibot/core)

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

Change subject: template.py: local variable 'site' referenced before assignments
..


template.py: local variable 'site' referenced before assignments

Bug: T132857
Change-Id: I014c471e03a2cb3f536f7891c86442d2f266f8b6
---
M scripts/template.py
1 file changed, 4 insertions(+), 6 deletions(-)

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



diff --git a/scripts/template.py b/scripts/template.py
index 854533e..8f4d180 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -202,21 +202,19 @@
 params = {'list': comma.join(self.templates.keys()),
   'num': len(self.templates)}
 
-site = self.site
-
 if self.getOption('remove'):
 self.options['summary'] = i18n.twtranslate(
-site, 'template-removing', params)
+self.site, 'template-removing', params)
 elif self.getOption('subst'):
 self.options['summary'] = i18n.twtranslate(
-site, 'template-substituting', params)
+self.site, 'template-substituting', params)
 else:
 self.options['summary'] = i18n.twtranslate(
-site, 'template-changing', params)
+self.site, 'template-changing', params)
 
 replacements = []
 exceptions = {}
-builder = textlib._MultiTemplateMatchBuilder(site)
+builder = textlib._MultiTemplateMatchBuilder(self.site)
 for old, new in self.templates.items():
 templateRegex = builder.pattern(old)
 

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

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

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


[MediaWiki-commits] [Gerrit] gitblit: install openjdk-7-jre - change (operations/puppet)

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

Change subject: gitblit: install openjdk-7-jre
..


gitblit: install openjdk-7-jre

Bug:T123718
Change-Id: I7982496a462878d524ce7e45289bc374543f88f3
---
M modules/gitblit/manifests/init.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/gitblit/manifests/init.pp 
b/modules/gitblit/manifests/init.pp
index 673630c..a1fa9ed 100644
--- a/modules/gitblit/manifests/init.pp
+++ b/modules/gitblit/manifests/init.pp
@@ -19,6 +19,8 @@
 managehome => false,
 }
 
+require_package('openjdk-7-jre')
+
 file { '/var/lib/git':
 ensure => directory,
 mode   => '0644',

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

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

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


[MediaWiki-commits] [Gerrit] Also update commented-out bank code - change (mediawiki...DonationInterface)

2016-04-18 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Also update commented-out bank code
..

Also update commented-out bank code

Make it easier to re-enable Knab

Bug: T131904
Change-Id: I0dfdb3c5947733d3357e65fb2b401ca646cacc25
---
M globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
M globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html 
b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
index 492f29a..06317eb 100644
--- a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
+++ b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
@@ -80,7 +80,7 @@



ASN Bank

Friesland Bank
-   

+   


RegioBank

Triodos Bank

Van Lanschot Bankiers
diff --git a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html 
b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
index b09265c..a48be1c 100644
--- a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
+++ b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
@@ -80,7 +80,7 @@



ASN Bank

Friesland Bank
-   

+   


RegioBank

Triodos Bank

Van Lanschot Bankiers

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

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

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


[MediaWiki-commits] [Gerrit] Just do a $webservice restart - change (operations...tools-manifest)

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

Change subject: Just do a $webservice restart
..


Just do a $webservice restart

The appropriate webservice commands will read service.manifest
and do the appropriate things.

Also do not munge lighttpd-precise for v2 services.

Change-Id: Ia5b93f0a361e76e24fcedef1b99b2fb32e52f0cc
---
M debian/changelog
M tools/manifest/manifest.py
M tools/manifest/webservicemonitor.py
3 files changed, 18 insertions(+), 11 deletions(-)

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



diff --git a/debian/changelog b/debian/changelog
index 09666e5..71a4707 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tools-manifest (0.7) trusty; urgency=low
+
+  * Simplify restarting services when down
+  * Add support for lighttpd-precise naming in v2
+
+ -- Yuvi Panda   Mon, 18 Apr 2016 16:30:00 -0800
+
 tools-manifest (0.6) trusty; urgency=low
 
   * Add support for v2 service manifests
diff --git a/tools/manifest/manifest.py b/tools/manifest/manifest.py
index 9de26c7..f476303 100644
--- a/tools/manifest/manifest.py
+++ b/tools/manifest/manifest.py
@@ -53,7 +53,7 @@
 def webservice_server(self):
 if 'web' in self.data:
 # Special case lighttpd-precise as long as we support it
-if self.data['web'].startswith('lighttpd'):
+if self.version < 2 and self.data['web'].startswith('lighttpd'):
 return 'lighttpd'
 return self.data['web']
 return None
diff --git a/tools/manifest/webservicemonitor.py 
b/tools/manifest/webservicemonitor.py
index 878e11f..0c0127d 100644
--- a/tools/manifest/webservicemonitor.py
+++ b/tools/manifest/webservicemonitor.py
@@ -16,20 +16,20 @@
 
 def _start_webservice(self, manifest):
 self.log.info('Starting webservice for tool %s', manifest.tool.name)
+
+command = [
+'/usr/bin/sudo',
+'-i', '-u', manifest.tool.username
+]
 if manifest.version == 1:
-command = '/usr/local/bin/webservice'
+command.append('/usr/local/bin/webservice')
 else:
-command = '/usr/bin/webservice-new'
+command.append('/usr/bin/webservice-new')
+# Restart instead of start so they get restarted even if they are 
running in zombie state
+command.append('restart')
 manifest.record_starting()
 try:
-subprocess.check_output([
-'/usr/bin/sudo',
-'-i', '-u', manifest.tool.username,
-command,
-'--release', manifest.webservice_release,
-manifest.webservice_server,
-'restart'  # Restart instead of start so they get restarted 
even if they are running in zombie state
-], timeout=15)  # 15 second timeout!
+subprocess.check_output(command, timeout=15)  # 15 second timeout!
 self.log.info('Started webservice for %s', manifest.tool.name)
 return True
 except subprocess.CalledProcessError as e:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5b93f0a361e76e24fcedef1b99b2fb32e52f0cc
Gerrit-PatchSet: 3
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ISSUERID is alphanumeric due to SEPA - change (mediawiki...DonationInterface)

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

Change subject: ISSUERID is alphanumeric due to SEPA
..


ISSUERID is alphanumeric due to SEPA

The format of this field has changed.  I found the new values using a
GET_DIRECTORY call, and added a couple of new banks to the list.

Bug: T131904
Change-Id: I0124ae9efe598c81d75b750db9d46b0fb40377bf
---
M globalcollect_gateway/config/data_constraints.yaml
M globalcollect_gateway/config/payment_submethods.yaml
M globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
M globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
4 files changed, 34 insertions(+), 28 deletions(-)

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



diff --git a/globalcollect_gateway/config/data_constraints.yaml 
b/globalcollect_gateway/config/data_constraints.yaml
index e435831..8af0555 100644
--- a/globalcollect_gateway/config/data_constraints.yaml
+++ b/globalcollect_gateway/config/data_constraints.yaml
@@ -148,10 +148,10 @@
 user_ip:
 type: alphanumeric
 length: 32
-# ISSUERID: N4
+# ISSUERID: AN11
 issuer_id:
-type: numeric
-length: 4
+type: alphanumeric
+length: 11
 # LANGUAGECODE: AN2
 language:
 type: alphanumeric
diff --git a/globalcollect_gateway/config/payment_submethods.yaml 
b/globalcollect_gateway/config/payment_submethods.yaml
index 8948ae6..fc27c05 100644
--- a/globalcollect_gateway/config/payment_submethods.yaml
+++ b/globalcollect_gateway/config/payment_submethods.yaml
@@ -246,15 +246,17 @@
 keys:
 - ISSUERID
 issuerids:
-771: 'SNS Regio Bank'
-161: 'Van Lanschot Bankiers'
-31: 'ABN AMRO'
-761: 'ASN Bank'
-21: Rabobank
-511: 'Triodos Bank'
-721: ING
-751: 'SNS Bank'
-801: Knab
+ABNANL2A: ABN Amro
+ASNBNL21: ASN Bank
+FRBKNL2L: Friesland Bank
+INGBNL2A: ING
+KNABNL2H: Knab
+RABONL2U: Rabobank
+RBRBNL21: RegioBank
+SNSBNL2A: SNS Bank
+TRIONL2U: Triodos Bank
+FVLBNL22: Van Lanschot Bankiers
+BUNQNL2A: bunq
 rtbt_enets:
 paymentproductid: 810
 label: eNETS
diff --git a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html 
b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
index f73d55e..492f29a 100644
--- a/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
+++ b/globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
@@ -72,17 +72,19 @@



%donate_interface-rtbt-issuer_id%...


-   
ABN AMRO
-   
ING
-   
Rabobank
-   
SNS Bank
+   
ABN Amro
+   
ING
+   
Rabobank
+   
SNS Bank




-   
ASN Bank
+   
ASN Bank
+   
Friesland Bank


-   
RegioBank
-   
Triodos Bank
-   
Van Lanschot Bankiers
+   
RegioBank
+   
Triodos Bank
+   
Van Lanschot Bankiers
+ 

[MediaWiki-commits] [Gerrit] Depool pc1006 to clone it to pc2006 - change (operations/mediawiki-config)

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

Change subject: Depool pc1006 to clone it to pc2006
..


Depool pc1006 to clone it to pc2006

Change-Id: I75c84fbcda6c9b9fcd892c2842085b7e81a3c6d4
---
M wmf-config/db-codfw.php
M wmf-config/db-eqiad.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index f9d2df4..ed45c1b 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -10,7 +10,7 @@
 $wmgParserCacheDBs = array(
'10.192.16.170', # pc2004
'10.192.32.128', # pc2005
-   '10.192.48.39',  # pc2006
+#  '10.192.48.39',  # pc2006
 );
 
 $wmgOldExtTemplate = array(
diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index b6daaec..a91b852 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -10,7 +10,7 @@
 $wmgParserCacheDBs = array(
'10.64.0.12',   # pc1004
'10.64.32.72',  # pc1005
-   '10.64.48.128', # pc1006
+#  '10.64.48.128', # pc1006
 );
 
 $wmgOldExtTemplate = array(

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

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

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


[MediaWiki-commits] [Gerrit] Detect null-edit for a new topic summary - change (mediawiki...Flow)

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

Change subject: Detect null-edit for a new topic summary
..


Detect null-edit for a new topic summary

null-edit detection is in place from one revision
to the next but the first version of a topic
summary was always seen as an edit worth
notify about.

Bug: T132531
Change-Id: Ic3979d7ccd18e73c27b00892157e295925538f5e
---
M includes/Block/TopicSummary.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/Block/TopicSummary.php b/includes/Block/TopicSummary.php
index 88f5798..ef159cb 100644
--- a/includes/Block/TopicSummary.php
+++ b/includes/Block/TopicSummary.php
@@ -138,6 +138,10 @@
isset( $this->submitted['format'] ) ? 
$this->submitted['format'] : 'wikitext',
'create-topic-summary'
);
+
+   if ( !trim( $this->submitted['summary'] ) ) {
+   $this->extraCommitMetadata['null-edit'] = true;
+   }
// Edit topic summary
} else {
if ( !$this->permissions->isAllowed( 
$this->topicSummary, 'edit-topic-summary' ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3979d7ccd18e73c27b00892157e295925538f5e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
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] Update compiled handlebar templates - change (mediawiki...Flow)

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

Change subject: Update compiled handlebar templates
..


Update compiled handlebar templates

For some reasons, 2 handlebar templates are
out of sync. They appear as modified whenever
I use Flow.

Change-Id: I052d762ee870a8a2990785b9662cf973e229cc1f
---
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topiclist.handlebars.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/handlebars/compiled/flow_block_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic.handlebars.php
index 1695bf4..53d4d0a 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -220,4 +220,4 @@
 
 ';
 }
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php 
b/handlebars/compiled/flow_block_topiclist.handlebars.php
index 366ea2b..87d47de 100644
--- a/handlebars/compiled/flow_block_topiclist.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist.handlebars.php
@@ -283,4 +283,4 @@
 
 ';
 }
-?>
+?>
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I052d762ee870a8a2990785b9662cf973e229cc1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
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] Increase line-height for survey to 16px - change (mediawiki...Echo)

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

Change subject: Increase line-height for survey to 16px
..


Increase line-height for survey to 16px

Bug: T131893
Change-Id: I51e80117d810e2927b6b31f4b2c68de08d07293d
---
M modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less 
b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
index 2bb3b61..be0528e 100644
--- a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
+++ b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
@@ -5,6 +5,7 @@
padding: 0.5em;
border-bottom: 1px solid #DD;
white-space: normal;
+   line-height: 16px;
 
&-row {
display: table-row;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51e80117d810e2927b6b31f4b2c68de08d07293d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Allow horizon to query the labs puppetmaster for a list of c... - change (operations/puppet)

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

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

Change subject: Allow horizon to query the labs puppetmaster for a list of 
classes
..

Allow horizon to query the labs puppetmaster for a list of classes

Change-Id: I3d071d7396942b0846abad61ef5ee6fd754807a5
---
M modules/puppetmaster/manifests/labs.pp
A modules/puppetmaster/templates/auth-labs-master.conf.erb
M modules/role/manifests/labs/puppetmaster.pp
3 files changed, 49 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/284103/1

diff --git a/modules/puppetmaster/manifests/labs.pp 
b/modules/puppetmaster/manifests/labs.pp
index 820b03d..ca6c466 100644
--- a/modules/puppetmaster/manifests/labs.pp
+++ b/modules/puppetmaster/manifests/labs.pp
@@ -21,4 +21,11 @@
 user=> 'gitpuppet',
 minute  => '*/1',
 }
+
+file { '/etc/puppet/auth.conf':
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+content => template('puppetmaster/auth-labs-master.conf.erb'),
+}
 }
diff --git a/modules/puppetmaster/templates/auth-labs-master.conf.erb 
b/modules/puppetmaster/templates/auth-labs-master.conf.erb
new file mode 100644
index 000..2e41d29
--- /dev/null
+++ b/modules/puppetmaster/templates/auth-labs-master.conf.erb
@@ -0,0 +1,40 @@
+path ~ ^/catalog/([^/]+)$
+method find
+allow $1
+
+path ~ ^/node/([^/]+)$
+method find
+allow $1
+
+path /certificate_revocation_list/ca
+method find
+allow *
+
+path ~ ^/report/([^/]+)$
+method save
+allow $1
+
+path /file
+allow *
+
+path /certificate/ca
+auth any
+method find
+allow *
+
+path /certificate/
+auth any
+method find
+allow *
+
+path /certificate_request
+auth any
+allow *
+method find, save
+
+path /resource_type
+auth any
+allow <% 
scope.function_ipresolve([scope.function_hiera(['labs_horizon_host']), 4]) %>
+
+path /
+auth any
diff --git a/modules/role/manifests/labs/puppetmaster.pp 
b/modules/role/manifests/labs/puppetmaster.pp
index 17c5cb7..612dd43 100644
--- a/modules/role/manifests/labs/puppetmaster.pp
+++ b/modules/role/manifests/labs/puppetmaster.pp
@@ -14,10 +14,11 @@
 $labs_metal = hiera('labs_baremetal_servers', [])
 $ldapconfig = $ldap::role::config::labs::ldapconfig
 $basedn = $ldapconfig['basedn']
+$horizon_host_ip = ipresolve(hiera('labs_horizon_host'), 4)
 
 
 # Only allow puppet access from the instances
-$allow_from = flatten([$labs_ranges, '208.80.154.14', $labs_metal])
+$allow_from = flatten([$labs_ranges, '208.80.154.14', $horizon_host_ip, 
$labs_metal])
 
 class { '::puppetmaster':
 server_name=> hiera('labs_puppet_master'),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d071d7396942b0846abad61ef5ee6fd754807a5
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] Depool pc1006 to clone it to pc2006 - change (operations/mediawiki-config)

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

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

Change subject: Depool pc1006 to clone it to pc2006
..

Depool pc1006 to clone it to pc2006

Change-Id: I75c84fbcda6c9b9fcd892c2842085b7e81a3c6d4
---
M wmf-config/db-codfw.php
M wmf-config/db-eqiad.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index f9d2df4..ed45c1b 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -10,7 +10,7 @@
 $wmgParserCacheDBs = array(
'10.192.16.170', # pc2004
'10.192.32.128', # pc2005
-   '10.192.48.39',  # pc2006
+#  '10.192.48.39',  # pc2006
 );
 
 $wmgOldExtTemplate = array(
diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index b6daaec..a91b852 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -10,7 +10,7 @@
 $wmgParserCacheDBs = array(
'10.64.0.12',   # pc1004
'10.64.32.72',  # pc1005
-   '10.64.48.128', # pc1006
+#  '10.64.48.128', # pc1006
 );
 
 $wmgOldExtTemplate = array(

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

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

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


[MediaWiki-commits] [Gerrit] gitblit: add systemd unit, if jessie use it - change (operations/puppet)

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

Change subject: gitblit: add systemd unit, if jessie use it
..


gitblit: add systemd unit, if jessie use it

Bug:T123718
Change-Id: I1e1bf8c25476a77ebdaa1cbc82061a4c880adf3e
---
A modules/gitblit/files/gitblit.service
M modules/gitblit/manifests/init.pp
2 files changed, 30 insertions(+), 1 deletion(-)

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



diff --git a/modules/gitblit/files/gitblit.service 
b/modules/gitblit/files/gitblit.service
new file mode 100644
index 000..6af6ea9
--- /dev/null
+++ b/modules/gitblit/files/gitblit.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Gitblit managing, viewing, and serving Git repositories.
+After=network.target
+
+[Service]
+User=gitblit
+Group=gitblit
+Environment="ARGS=-server -Xmx8g -Djava.awt.headless=true -jar"
+EnvironmentFile=-/etc/sysconfig/gitblit
+WorkingDirectory=/opt/gitblit
+ExecStart=/usr/bin/java \$ARGS gitblit.jar --baseFolder /var/lib/gitblit/data
+ExecStop=/usr/bin/java \$ARGS gitblit.jar --baseFolder /var/lib/gitblit/data 
--stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/modules/gitblit/manifests/init.pp 
b/modules/gitblit/manifests/init.pp
index 78e2a2e..673630c 100644
--- a/modules/gitblit/manifests/init.pp
+++ b/modules/gitblit/manifests/init.pp
@@ -51,9 +51,23 @@
 source  => 'puppet:///modules/gitblit/gitblit.conf',
 }
 
+if os_version('debian >= jessie') {
+
+$gitblit_provider='systemd'
+
+file { '/etc/systemd/system/gitblit.service':
+owner  => 'root',
+group  => 'root',
+mode   => '0555',
+source => 'puppet:///modules/gitblit/gitblit.service',
+}
+} else {
+$gitblit_provider='upstart'
+}
+
 service { 'gitblit':
 ensure=> running,
-provider  => 'upstart',
+provider  => $gitblit_provider,
 subscribe => File['/var/lib/gitblit/data/gitblit.properties'],
 require   => File['/etc/init/gitblit.conf'],
 }

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

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

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


[MediaWiki-commits] [Gerrit] Remove unused $wmfHostnames['bits'] configuration - change (operations/mediawiki-config)

2016-04-18 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Remove unused $wmfHostnames['bits'] configuration
..

Remove unused $wmfHostnames['bits'] configuration

Checked all occurrences of "bits" or "$wmfHostnames". The only
match is the definition. No loops or variable bracket access.

Bug: T107430
Change-Id: I1547834441de858a74a1bfaa4d418aeaccaa0e72
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 410f106..1a8d82a 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -59,7 +59,6 @@
 # 'meta': meta wiki for user editable content
 # 'upload'  : hostname where files are hosted
 # 'wikidata': hostname for the data repository
-# 'bits': for load.php and js/css assets
 # Whenever all realms/datacenters should use the same host, do not use
 # $wmfHostnames but use the hardcoded hostname instead. A good example are the
 # spam blacklists hosted on meta.wikimedia.org which you will surely want to
@@ -67,7 +66,6 @@
 $wmfHostnames = array();
 switch( $wmfRealm ) {
 case 'labs':
-   $wmfHostnames['bits'] = 'bits.beta.wmflabs.org';
$wmfHostnames['meta'] = 'meta.wikimedia.beta.wmflabs.org';
$wmfHostnames['test'] = 'test.wikimedia.beta.wmflabs.org';
$wmfHostnames['upload']   = 'upload.beta.wmflabs.org';
@@ -75,7 +73,6 @@
break;
 case 'production':
 default:
-   $wmfHostnames['bits']   = 'bits.wikimedia.org';
$wmfHostnames['meta']   = 'meta.wikimedia.org';
$wmfHostnames['test']   = 'test.wikipedia.org';
$wmfHostnames['upload'] = 'upload.wikimedia.org';
@@ -497,7 +494,7 @@
$wgFileExtensions[] = 'dv';
$wgFileExtensions[] = 'avi';
$wgFileExtensions[] = 'mov';
-   $wgFileExtensions[] = 'mp3'; // for Jay for fundraising bits
+   $wgFileExtensions[] = 'mp3'; // for Jay for fundraising files
$wgFileExtensions[] = 'aif'; // "
$wgFileExtensions[] = 'aiff'; // "
 

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

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

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


[MediaWiki-commits] [Gerrit] noc: Use favicon from wikimedia.org instead of bits - change (operations/mediawiki-config)

2016-04-18 Thread Krinkle (Code Review)
Krinkle has submitted this change and it was merged.

Change subject: noc: Use favicon from wikimedia.org instead of bits
..


noc: Use favicon from wikimedia.org instead of bits

Similar to 536252db35 in integration/docroot.

Bug: T107430
Change-Id: I1e4894ba53554d33c6149e1962e7a6d538237137
---
M docroot/noc/conf/highlight.php
M docroot/noc/conf/index.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/docroot/noc/conf/highlight.php b/docroot/noc/conf/highlight.php
index 7ebb597..1a0ab03 100644
--- a/docroot/noc/conf/highlight.php
+++ b/docroot/noc/conf/highlight.php
@@ -85,7 +85,7 @@
 
 
 - Wikimedia configuration 
files
-   
+   

 
 
diff --git a/docroot/noc/conf/index.php b/docroot/noc/conf/index.php
index 4041f08..fc66b42 100644
--- a/docroot/noc/conf/index.php
+++ b/docroot/noc/conf/index.php
@@ -27,7 +27,7 @@
 

Wikimedia configuration files
-   
+   

 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e4894ba53554d33c6149e1962e7a6d538237137
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] gitblit: add systemd unit, if jessie use it - change (operations/puppet)

2016-04-18 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: gitblit: add systemd unit, if jessie use it
..

gitblit: add systemd unit, if jessie use it

Bug:T123718
Change-Id: I1e1bf8c25476a77ebdaa1cbc82061a4c880adf3e
---
A modules/gitblit/files/gitblit.service
M modules/gitblit/manifests/init.pp
2 files changed, 30 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/284100/1

diff --git a/modules/gitblit/files/gitblit.service 
b/modules/gitblit/files/gitblit.service
new file mode 100644
index 000..6af6ea9
--- /dev/null
+++ b/modules/gitblit/files/gitblit.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Gitblit managing, viewing, and serving Git repositories.
+After=network.target
+
+[Service]
+User=gitblit
+Group=gitblit
+Environment="ARGS=-server -Xmx8g -Djava.awt.headless=true -jar"
+EnvironmentFile=-/etc/sysconfig/gitblit
+WorkingDirectory=/opt/gitblit
+ExecStart=/usr/bin/java \$ARGS gitblit.jar --baseFolder /var/lib/gitblit/data
+ExecStop=/usr/bin/java \$ARGS gitblit.jar --baseFolder /var/lib/gitblit/data 
--stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/modules/gitblit/manifests/init.pp 
b/modules/gitblit/manifests/init.pp
index 78e2a2e..673630c 100644
--- a/modules/gitblit/manifests/init.pp
+++ b/modules/gitblit/manifests/init.pp
@@ -51,9 +51,23 @@
 source  => 'puppet:///modules/gitblit/gitblit.conf',
 }
 
+if os_version('debian >= jessie') {
+
+$gitblit_provider='systemd'
+
+file { '/etc/systemd/system/gitblit.service':
+owner  => 'root',
+group  => 'root',
+mode   => '0555',
+source => 'puppet:///modules/gitblit/gitblit.service',
+}
+} else {
+$gitblit_provider='upstart'
+}
+
 service { 'gitblit':
 ensure=> running,
-provider  => 'upstart',
+provider  => $gitblit_provider,
 subscribe => File['/var/lib/gitblit/data/gitblit.properties'],
 require   => File['/etc/init/gitblit.conf'],
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e1bf8c25476a77ebdaa1cbc82061a4c880adf3e
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] Increase line-height for survey to 16px - change (mediawiki...Echo)

2016-04-18 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Increase line-height for survey to 16px
..

Increase line-height for survey to 16px

Bug: T131893
Change-Id: I51e80117d810e2927b6b31f4b2c68de08d07293d
---
M modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/99/284099/1

diff --git a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less 
b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
index 2bb3b61..be0528e 100644
--- a/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
+++ b/modules/ooui/styles/mw.echo.ui.FooterNoticeWidget.less
@@ -5,6 +5,7 @@
padding: 0.5em;
border-bottom: 1px solid #DD;
white-space: normal;
+   line-height: 16px;
 
&-row {
display: table-row;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51e80117d810e2927b6b31f4b2c68de08d07293d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] noc: Use favicon from wikimedia.org instead of bits - change (operations/mediawiki-config)

2016-04-18 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: noc: Use favicon from wikimedia.org instead of bits
..

noc: Use favicon from wikimedia.org instead of bits

Similar to 536252db35 in integration/docroot.

Bug: T107430
Change-Id: I1e4894ba53554d33c6149e1962e7a6d538237137
---
M docroot/noc/conf/highlight.php
M docroot/noc/conf/index.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/docroot/noc/conf/highlight.php b/docroot/noc/conf/highlight.php
index 7ebb597..1a0ab03 100644
--- a/docroot/noc/conf/highlight.php
+++ b/docroot/noc/conf/highlight.php
@@ -85,7 +85,7 @@
 
 
 - Wikimedia configuration 
files
-   
+   

 
 
diff --git a/docroot/noc/conf/index.php b/docroot/noc/conf/index.php
index 4041f08..fc66b42 100644
--- a/docroot/noc/conf/index.php
+++ b/docroot/noc/conf/index.php
@@ -27,7 +27,7 @@
 

Wikimedia configuration files
-   
+   

 
 

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

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

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


[MediaWiki-commits] [Gerrit] Allow tag names for SqlBagOStuff consistent hashing - change (mediawiki/core)

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

Change subject: Allow tag names for SqlBagOStuff consistent hashing
..


Allow tag names for SqlBagOStuff consistent hashing

This is needed to avoid poor hit rates in multi-DC setups

Change-Id: I8830bd6bffa4619e31609676527282ef9af0c76c
(cherry picked from commit d5c44513800ed85b49c5a7c5c1bb930d8787a6ef)
---
M includes/libs/ArrayUtils.php
M includes/objectcache/SqlBagOStuff.php
2 files changed, 23 insertions(+), 13 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/libs/ArrayUtils.php b/includes/libs/ArrayUtils.php
index fb35801..2156bd7 100644
--- a/includes/libs/ArrayUtils.php
+++ b/includes/libs/ArrayUtils.php
@@ -28,7 +28,7 @@
 class ArrayUtils {
/**
 * Sort the given array in a pseudo-random order which depends only on 
the
-* given key and each element value. This is typically used for load
+* given key and each element value in $array. This is typically used 
for load
 * balancing between servers each with a local cache.
 *
 * Keys are preserved. The input array is modified in place.
diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index 3945094..a1394c1 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -27,10 +27,10 @@
  * @ingroup Cache
  */
 class SqlBagOStuff extends BagOStuff {
-   /** @var array */
+   /** @var array[] (server index => server config) */
protected $serverInfos;
-   /** @var array */
-   protected $serverNames;
+   /** @var string[] (server index => tag/host name) */
+   protected $serverTags;
/** @var int */
protected $numServers;
/** @var int */
@@ -58,9 +58,12 @@
 *   - server:  A server info structure in the format required by 
each
 *  element in $wgDBServers.
 *
-*   - servers: An array of server info structures describing a set 
of
-*  database servers to distribute keys to. If this is
-*  specified, the "server" option will be ignored.
+*   - servers: An array of server info structures describing a set 
of database servers
+*  to distribute keys to. If this is specified, the 
"server" option will be
+*  ignored. If string keys are used, then they will be 
used for consistent
+*  hashing *instead* of the host name (from the server 
config). This is useful
+*  when a cluster is replicated to another site (with 
different host names)
+*  but each server has a corresponding replica in the 
other cluster.
 *
 *   - purgePeriod: The average number of object cache requests in 
between
 *  garbage collection operations, where expired entries
@@ -89,11 +92,18 @@
public function __construct( $params ) {
parent::__construct( $params );
if ( isset( $params['servers'] ) ) {
-   $this->serverInfos = $params['servers'];
-   $this->numServers = count( $this->serverInfos );
-   $this->serverNames = [];
-   foreach ( $this->serverInfos as $i => $info ) {
-   $this->serverNames[$i] = isset( $info['host'] ) 
? $info['host'] : "#$i";
+   $this->serverInfos = [];
+   $this->serverTags = [];
+   $this->numServers = count( $params['servers'] );
+   $index = 0;
+   foreach ( $params['servers'] as $tag => $info ) {
+   $this->serverInfos[$index] = $info;
+   if ( is_string( $tag ) ) {
+   $this->serverTags[$index] = $tag;
+   } else {
+   $this->serverTags[$index] = isset( 
$info['host'] ) ? $info['host'] : "#$index";
+   }
+   ++$index;
}
} elseif ( isset( $params['server'] ) ) {
$this->serverInfos = [ $params['server'] ];
@@ -180,7 +190,7 @@
$tableIndex = 0;
}
if ( $this->numServers > 1 ) {
-   $sortedServers = $this->serverNames;
+   $sortedServers = $this->serverTags;
ArrayUtils::consistentHashSort( $sortedServers, $key );
reset( $sortedServers );
$serverIndex = key( $sortedServers );

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

[MediaWiki-commits] [Gerrit] Revert "Depool pc1005 and pc2005 for cloning" - change (operations/mediawiki-config)

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

Change subject: Revert "Depool pc1005 and pc2005 for cloning"
..


Revert "Depool pc1005 and pc2005 for cloning"

This reverts commit 253fab35ba4f42c9dd453374ad3f2c7344adf6eb.

Change-Id: I3984f8b47d1882c21fb653c232e280f53469a223
---
M wmf-config/db-codfw.php
M wmf-config/db-eqiad.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 28be348..f9d2df4 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -9,7 +9,7 @@
 
 $wmgParserCacheDBs = array(
'10.192.16.170', # pc2004
-#  '10.192.32.128', # pc2005
+   '10.192.32.128', # pc2005
'10.192.48.39',  # pc2006
 );
 
diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index f7d1010..b6daaec 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -9,7 +9,7 @@
 
 $wmgParserCacheDBs = array(
'10.64.0.12',   # pc1004
-#  '10.64.32.72',  # pc1005
+   '10.64.32.72',  # pc1005
'10.64.48.128', # pc1006
 );
 

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

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

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


[MediaWiki-commits] [Gerrit] Enforce $wgReadOnly for job queues - change (mediawiki/core)

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

Change subject: Enforce $wgReadOnly for job queues
..


Enforce $wgReadOnly for job queues

Bug: T130795
Change-Id: I9d8cf919de80dbe855086b9c590c0a0f20dc33b9
---
M autoload.php
M includes/jobqueue/JobQueue.php
M includes/jobqueue/JobQueueGroup.php
3 files changed, 46 insertions(+), 8 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 22411cd..b851e39 100644
--- a/autoload.php
+++ b/autoload.php
@@ -617,6 +617,7 @@
'JobQueueFederated' => __DIR__ . 
'/includes/jobqueue/JobQueueFederated.php',
'JobQueueGroup' => __DIR__ . '/includes/jobqueue/JobQueueGroup.php',
'JobQueueMemory' => __DIR__ . '/includes/jobqueue/JobQueueMemory.php',
+   'JobQueueReadOnlyError' => __DIR__ . '/includes/jobqueue/JobQueue.php',
'JobQueueRedis' => __DIR__ . '/includes/jobqueue/JobQueueRedis.php',
'JobRunner' => __DIR__ . '/includes/jobqueue/JobRunner.php',
'JobSpecification' => __DIR__ . 
'/includes/jobqueue/JobSpecification.php',
diff --git a/includes/jobqueue/JobQueue.php b/includes/jobqueue/JobQueue.php
index 5b71938..d64be3c 100644
--- a/includes/jobqueue/JobQueue.php
+++ b/includes/jobqueue/JobQueue.php
@@ -31,18 +31,16 @@
 abstract class JobQueue {
/** @var string Wiki ID */
protected $wiki;
-
/** @var string Job type */
protected $type;
-
/** @var string Job priority for pop() */
protected $order;
-
/** @var int Time to live in seconds */
protected $claimTTL;
-
/** @var int Maximum number of times to try a job */
protected $maxTries;
+   /** @var string|bool Read only rationale (or false if r/w) */
+   protected $readOnlyReason;
 
/** @var BagOStuff */
protected $dupCache;
@@ -74,6 +72,9 @@
$this->aggr = isset( $params['aggregator'] )
? $params['aggregator']
: new JobQueueAggregatorNull( [] );
+   $this->readOnlyReason = isset( $params['readOnlyReason'] )
+   ? $params['readOnlyReason']
+   : false;
}
 
/**
@@ -96,6 +97,7 @@
 *  but not acknowledged as completed after this many 
seconds. Recycling
 *  of jobs simply means re-inserting them into the 
queue. Jobs can be
 *  attempted up to three times before being discarded.
+*   - readOnlyReason : Set this to a string to make the queue 
read-only.
 *
 * Queue classes should throw an exception if they do not support the 
options given.
 *
@@ -166,6 +168,14 @@
 */
final public function delayedJobsEnabled() {
return $this->supportsDelayedJobs();
+   }
+
+   /**
+* @return string|bool Read-only rational or false if r/w
+* @since 1.27
+*/
+   public function getReadOnlyReason() {
+   return $this->readOnlyReason;
}
 
/**
@@ -307,6 +317,8 @@
 * @throws MWException
 */
final public function batchPush( array $jobs, $flags = 0 ) {
+   $this->assertNotReadOnly();
+
if ( !count( $jobs ) ) {
return; // nothing to do
}
@@ -349,6 +361,7 @@
final public function pop() {
global $wgJobClasses;
 
+   $this->assertNotReadOnly();
if ( $this->wiki !== wfWikiID() ) {
throw new MWException( "Cannot pop '{$this->type}' job 
off foreign wiki queue." );
} elseif ( !isset( $wgJobClasses[$this->type] ) ) {
@@ -392,9 +405,11 @@
 * @throws MWException
 */
final public function ack( Job $job ) {
+   $this->assertNotReadOnly();
if ( $job->getType() !== $this->type ) {
throw new MWException( "Got '{$job->getType()}' job; 
expected '{$this->type}'." );
}
+
$this->doAck( $job );
}
 
@@ -436,12 +451,12 @@
 * @return bool
 */
final public function deduplicateRootJob( IJobSpecification $job ) {
+   $this->assertNotReadOnly();
if ( $job->getType() !== $this->type ) {
throw new MWException( "Got '{$job->getType()}' job; 
expected '{$this->type}'." );
}
-   $ok = $this->doDeduplicateRootJob( $job );
 
-   return $ok;
+   return $this->doDeduplicateRootJob( $job );
}
 
/**
@@ -524,6 +539,8 @@
 * @return void
 */
final public function delete() {
+   $this->assertNotReadOnly();
+
$this->doDelete();
}
 
@@ -673,6 +690,15 @@
}
 

[MediaWiki-commits] [Gerrit] Adding furud as antimony replacement to git replication - change (operations/puppet)

2016-04-18 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: Adding furud as antimony replacement to git replication
..

Adding furud as antimony replacement to git replication

Change-Id: I1b64e766734a20643031672dc13735bbc2d48e95
---
M modules/role/manifests/gerrit/production.pp
1 file changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/modules/role/manifests/gerrit/production.pp 
b/modules/role/manifests/gerrit/production.pp
index fe34494..ccaa94d 100644
--- a/modules/role/manifests/gerrit/production.pp
+++ b/modules/role/manifests/gerrit/production.pp
@@ -66,6 +66,18 @@
 'push'  => '+refs/*:refs/*',
 'mirror'=> true,
 },
+'gitblitnew' => {
+# Note: This is in single quotes on purpose. ${name} is not
+# expected to be expanded by puppet but rather by gerrit
+#
+# lint:ignore:single_quote_string_with_variables
+'url'   => 
'gerritslave@furud.codfw.wmnet:/var/lib/git/${name}.git',
+# lint:endignore
+'threads'   => '4',
+'authGroup' => 'mediawiki-replication',
+'push'  => '+refs/*:refs/*',
+'mirror'=> true,
+},
 #'lead'=> {
 # Note: This is in single quotes on purpose. ${name} is not
 # expected to be expanded by puppet but rather by gerrit

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

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

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


[MediaWiki-commits] [Gerrit] Fix config values - change (wikidata...gui)

2016-04-18 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: Fix config values
..

Fix config values

Bug: T132979
Change-Id: I26c95b9ad5e0f8278d8860d12e4fbcad6834b86e
---
M wikibase/config.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wikibase/config.js b/wikibase/config.js
index 8de6159..c4e6989 100644
--- a/wikibase/config.js
+++ b/wikibase/config.js
@@ -13,7 +13,7 @@
}
};
 
-   var configLocal = $.extend(true, configDeploy,  {
+   var configLocal = $.extend(true, {}, configDeploy,  {
api : {
sparql : {
uri : 
'https://query.wikidata.org/bigdata/namespace/wdq/sparql'
@@ -32,4 +32,4 @@
 
return configDeploy;
 
-} )( window, jQuery );
\ No newline at end of file
+} )( window, jQuery );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26c95b9ad5e0f8278d8860d12e4fbcad6834b86e
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
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] labstore: shape NFS read for dumps traffic - change (operations/puppet)

2016-04-18 Thread Rush (Code Review)
Rush has submitted this change and it was merged.

Change subject: labstore: shape NFS read for dumps traffic
..


labstore: shape NFS read for dumps traffic

We have been having issues with hosts hammering dumps for read
and rendering the host unusable for other users.  This is
similar to measures taken elsewhere with a higher ceiling.

Change-Id: Ia323a8634bb092795de2a904435f537519e016ac
---
M modules/labstore/files/tc-setup.sh
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/modules/labstore/files/tc-setup.sh 
b/modules/labstore/files/tc-setup.sh
index f7f5082..a8982f8 100644
--- a/modules/labstore/files/tc-setup.sh
+++ b/modules/labstore/files/tc-setup.sh
@@ -13,6 +13,7 @@
 modules='act_mirr ifb'
 nfs_write='7000kbps'
 nfs_read='9500kbps'
+nfs_dumps_read='15000kbps'
 eth0_egress='3kbps'
 
 function ensure_mod {
@@ -85,6 +86,8 @@
 
 $TC class add dev ifb0 parent 1: classid 1:3 htb rate $nfs_read
 
+$TC class add dev ifb0 parent 1: classid 1:4 htb rate $nfs_dumps_read
+
 $TC filter add dev ifb0 parent 1: protocol ip prio 0 u32 \
  match ip src 10.64.37.6 flowid 1:1
 
@@ -93,3 +96,6 @@
 
 $TC filter add dev ifb0 parent 1: protocol ip prio 0 u32 \
  match ip src 10.64.37.10 flowid 1:3
+
+$TC filter add dev ifb0 parent 1: protocol ip prio 0 u32 \
+ match ip src 10.64.4.10 flowid 1:4

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

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

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


[MediaWiki-commits] [Gerrit] Allow lazy loading references via mobileview API - change (mediawiki...MobileFrontend)

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

Change subject: Allow lazy loading references via mobileview API
..


Allow lazy loading references via mobileview API

While we discuss the internals of a generic references API we
should make use of the mobileview API we already have to source
references.

Changes:
* Introduce 2 ReferencesGateway classes extending the interface class;
* Make it safe to load `mobile.references` without side effects - move
  the initialisation code into skins.minerva.scripts;
* Separate tests for all 2 gateways;
* Clicking a nested reference no longer causes scrolling to the reference

Bug: T130551
Bug: T129182
Change-Id: Iec812faf12182f80f5a2193c2bc4b9b95ea86bbe
---
M extension.json
M includes/MobileFrontend.hooks.php
A resources/mobile.references.gateway/ReferencesGateway.js
A resources/mobile.references.gateway/ReferencesHtmlScraperGateway.js
A resources/mobile.references.gateway/ReferencesMobileViewGateway.js
M resources/mobile.references/ReferencesDrawer.js
D resources/mobile.references/references.js
M resources/skins.minerva.scripts/init.js
M resources/skins.minerva.scripts/preInit.js
A resources/skins.minerva.scripts/references.js
A tests/qunit/mobile.references.gateway/test_ReferencesHtmlScraperGateway.js
A tests/qunit/mobile.references.gateway/test_ReferencesMobileViewGateway.js
D tests/qunit/mobile.references/test_references.js
A tests/qunit/tests.mobilefrontend/pageWithStrippedRefs.html
A tests/qunit/tests.mobilefrontend/refSection.html
15 files changed, 458 insertions(+), 244 deletions(-)

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



diff --git a/extension.json b/extension.json
index 0e22c35..d1d5946 100644
--- a/extension.json
+++ b/extension.json
@@ -1077,6 +1077,7 @@
"desktop"
],
"dependencies": [
+   "mobile.references.gateway",
"mobile.drawers",
"mobile.editor.api",
"mobile.references.images"
@@ -1092,8 +1093,22 @@
"Drawer.hogan": 
"resources/mobile.references/ReferencesDrawer.hogan"
},
"scripts": [
-   
"resources/mobile.references/ReferencesDrawer.js",
-   "resources/mobile.references/references.js"
+   
"resources/mobile.references/ReferencesDrawer.js"
+   ]
+   },
+   "mobile.references.gateway": {
+   "targets": [
+   "mobile",
+   "desktop"
+   ],
+   "dependencies": [
+   "mobile.startup",
+   "mobile.oo"
+   ],
+   "scripts": [
+   
"resources/mobile.references.gateway/ReferencesGateway.js",
+   
"resources/mobile.references.gateway/ReferencesHtmlScraperGateway.js",
+   
"resources/mobile.references.gateway/ReferencesMobileViewGateway.js"
]
},
"mobile.toggle": {
@@ -1593,6 +1608,7 @@
"resources/skins.minerva.scripts/init.js",

"resources/skins.minerva.scripts/initLogging.js",

"resources/skins.minerva.scripts/mobileRedirect.js",
+   "resources/skins.minerva.scripts/references.js",
"resources/skins.minerva.scripts/search.js"
]
},
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 559019c..8af7310 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -326,7 +326,9 @@
'issues.hogan' => 
'tests/qunit/tests.mobilefrontend/issues.hogan',
'page.html' => 
'tests/qunit/tests.mobilefrontend/page.html',
'page2.html' => 
'tests/qunit/tests.mobilefrontend/page2.html',
+   'pageWithStrippedRefs.html' => 
'tests/qunit/tests.mobilefrontend/pageWithStrippedRefs.html',
'references.html' => 
'tests/qunit/tests.mobilefrontend/references.html',
+   'refSection.html' => 
'tests/qunit/tests.mobilefrontend/refSection.html',
),
'localBasePath' => $localBasePath,
'remoteExtPath' => 'MobileFrontend',
diff --git a/resources/mobile.references.gateway/ReferencesGateway.js 
b/resources/mobile.references.gat

[MediaWiki-commits] [Gerrit] Allow tag names for SqlBagOStuff consistent hashing - change (mediawiki/core)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Allow tag names for SqlBagOStuff consistent hashing
..

Allow tag names for SqlBagOStuff consistent hashing

This is needed to avoid poor hit rates in multi-DC setups

Change-Id: I8830bd6bffa4619e31609676527282ef9af0c76c
(cherry picked from commit d5c44513800ed85b49c5a7c5c1bb930d8787a6ef)
---
M includes/libs/ArrayUtils.php
M includes/objectcache/SqlBagOStuff.php
2 files changed, 23 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/284095/1

diff --git a/includes/libs/ArrayUtils.php b/includes/libs/ArrayUtils.php
index fb35801..2156bd7 100644
--- a/includes/libs/ArrayUtils.php
+++ b/includes/libs/ArrayUtils.php
@@ -28,7 +28,7 @@
 class ArrayUtils {
/**
 * Sort the given array in a pseudo-random order which depends only on 
the
-* given key and each element value. This is typically used for load
+* given key and each element value in $array. This is typically used 
for load
 * balancing between servers each with a local cache.
 *
 * Keys are preserved. The input array is modified in place.
diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index 3945094..a1394c1 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -27,10 +27,10 @@
  * @ingroup Cache
  */
 class SqlBagOStuff extends BagOStuff {
-   /** @var array */
+   /** @var array[] (server index => server config) */
protected $serverInfos;
-   /** @var array */
-   protected $serverNames;
+   /** @var string[] (server index => tag/host name) */
+   protected $serverTags;
/** @var int */
protected $numServers;
/** @var int */
@@ -58,9 +58,12 @@
 *   - server:  A server info structure in the format required by 
each
 *  element in $wgDBServers.
 *
-*   - servers: An array of server info structures describing a set 
of
-*  database servers to distribute keys to. If this is
-*  specified, the "server" option will be ignored.
+*   - servers: An array of server info structures describing a set 
of database servers
+*  to distribute keys to. If this is specified, the 
"server" option will be
+*  ignored. If string keys are used, then they will be 
used for consistent
+*  hashing *instead* of the host name (from the server 
config). This is useful
+*  when a cluster is replicated to another site (with 
different host names)
+*  but each server has a corresponding replica in the 
other cluster.
 *
 *   - purgePeriod: The average number of object cache requests in 
between
 *  garbage collection operations, where expired entries
@@ -89,11 +92,18 @@
public function __construct( $params ) {
parent::__construct( $params );
if ( isset( $params['servers'] ) ) {
-   $this->serverInfos = $params['servers'];
-   $this->numServers = count( $this->serverInfos );
-   $this->serverNames = [];
-   foreach ( $this->serverInfos as $i => $info ) {
-   $this->serverNames[$i] = isset( $info['host'] ) 
? $info['host'] : "#$i";
+   $this->serverInfos = [];
+   $this->serverTags = [];
+   $this->numServers = count( $params['servers'] );
+   $index = 0;
+   foreach ( $params['servers'] as $tag => $info ) {
+   $this->serverInfos[$index] = $info;
+   if ( is_string( $tag ) ) {
+   $this->serverTags[$index] = $tag;
+   } else {
+   $this->serverTags[$index] = isset( 
$info['host'] ) ? $info['host'] : "#$index";
+   }
+   ++$index;
}
} elseif ( isset( $params['server'] ) ) {
$this->serverInfos = [ $params['server'] ];
@@ -180,7 +190,7 @@
$tableIndex = 0;
}
if ( $this->numServers > 1 ) {
-   $sortedServers = $this->serverNames;
+   $sortedServers = $this->serverTags;
ArrayUtils::consistentHashSort( $sortedServers, $key );
reset( $sortedServers );
$serverIndex = key( $sortedServers );

-- 
To view, visit https://gerri

[MediaWiki-commits] [Gerrit] labstore: shape NFS read for dumps traffic - change (operations/puppet)

2016-04-18 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: labstore: shape NFS read for dumps traffic
..

labstore: shape NFS read for dumps traffic

We have been having issues with hosts hammering dumps for read
and rendering the host unusable for other users.  This is
similar to measures taken elsewhere with a higher ceiling.

Change-Id: Ia323a8634bb092795de2a904435f537519e016ac
---
M modules/labstore/files/tc-setup.sh
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/284094/1

diff --git a/modules/labstore/files/tc-setup.sh 
b/modules/labstore/files/tc-setup.sh
index f7f5082..a8982f8 100644
--- a/modules/labstore/files/tc-setup.sh
+++ b/modules/labstore/files/tc-setup.sh
@@ -13,6 +13,7 @@
 modules='act_mirr ifb'
 nfs_write='7000kbps'
 nfs_read='9500kbps'
+nfs_dumps_read='15000kbps'
 eth0_egress='3kbps'
 
 function ensure_mod {
@@ -85,6 +86,8 @@
 
 $TC class add dev ifb0 parent 1: classid 1:3 htb rate $nfs_read
 
+$TC class add dev ifb0 parent 1: classid 1:4 htb rate $nfs_dumps_read
+
 $TC filter add dev ifb0 parent 1: protocol ip prio 0 u32 \
  match ip src 10.64.37.6 flowid 1:1
 
@@ -93,3 +96,6 @@
 
 $TC filter add dev ifb0 parent 1: protocol ip prio 0 u32 \
  match ip src 10.64.37.10 flowid 1:3
+
+$TC filter add dev ifb0 parent 1: protocol ip prio 0 u32 \
+ match ip src 10.64.4.10 flowid 1:4

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia323a8634bb092795de2a904435f537519e016ac
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] Allow tag names for SqlBagOStuff consistent hashing - change (mediawiki/core)

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

Change subject: Allow tag names for SqlBagOStuff consistent hashing
..


Allow tag names for SqlBagOStuff consistent hashing

This is needed to avoid poor hit rates in multi-DC setups

Change-Id: I8830bd6bffa4619e31609676527282ef9af0c76c
---
M includes/libs/ArrayUtils.php
M includes/objectcache/SqlBagOStuff.php
2 files changed, 23 insertions(+), 13 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/libs/ArrayUtils.php b/includes/libs/ArrayUtils.php
index fb35801..2156bd7 100644
--- a/includes/libs/ArrayUtils.php
+++ b/includes/libs/ArrayUtils.php
@@ -28,7 +28,7 @@
 class ArrayUtils {
/**
 * Sort the given array in a pseudo-random order which depends only on 
the
-* given key and each element value. This is typically used for load
+* given key and each element value in $array. This is typically used 
for load
 * balancing between servers each with a local cache.
 *
 * Keys are preserved. The input array is modified in place.
diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index 3945094..a1394c1 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -27,10 +27,10 @@
  * @ingroup Cache
  */
 class SqlBagOStuff extends BagOStuff {
-   /** @var array */
+   /** @var array[] (server index => server config) */
protected $serverInfos;
-   /** @var array */
-   protected $serverNames;
+   /** @var string[] (server index => tag/host name) */
+   protected $serverTags;
/** @var int */
protected $numServers;
/** @var int */
@@ -58,9 +58,12 @@
 *   - server:  A server info structure in the format required by 
each
 *  element in $wgDBServers.
 *
-*   - servers: An array of server info structures describing a set 
of
-*  database servers to distribute keys to. If this is
-*  specified, the "server" option will be ignored.
+*   - servers: An array of server info structures describing a set 
of database servers
+*  to distribute keys to. If this is specified, the 
"server" option will be
+*  ignored. If string keys are used, then they will be 
used for consistent
+*  hashing *instead* of the host name (from the server 
config). This is useful
+*  when a cluster is replicated to another site (with 
different host names)
+*  but each server has a corresponding replica in the 
other cluster.
 *
 *   - purgePeriod: The average number of object cache requests in 
between
 *  garbage collection operations, where expired entries
@@ -89,11 +92,18 @@
public function __construct( $params ) {
parent::__construct( $params );
if ( isset( $params['servers'] ) ) {
-   $this->serverInfos = $params['servers'];
-   $this->numServers = count( $this->serverInfos );
-   $this->serverNames = [];
-   foreach ( $this->serverInfos as $i => $info ) {
-   $this->serverNames[$i] = isset( $info['host'] ) 
? $info['host'] : "#$i";
+   $this->serverInfos = [];
+   $this->serverTags = [];
+   $this->numServers = count( $params['servers'] );
+   $index = 0;
+   foreach ( $params['servers'] as $tag => $info ) {
+   $this->serverInfos[$index] = $info;
+   if ( is_string( $tag ) ) {
+   $this->serverTags[$index] = $tag;
+   } else {
+   $this->serverTags[$index] = isset( 
$info['host'] ) ? $info['host'] : "#$index";
+   }
+   ++$index;
}
} elseif ( isset( $params['server'] ) ) {
$this->serverInfos = [ $params['server'] ];
@@ -180,7 +190,7 @@
$tableIndex = 0;
}
if ( $this->numServers > 1 ) {
-   $sortedServers = $this->serverNames;
+   $sortedServers = $this->serverTags;
ArrayUtils::consistentHashSort( $sortedServers, $key );
reset( $sortedServers );
$serverIndex = key( $sortedServers );

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

Gerrit-MessageType: m

[MediaWiki-commits] [Gerrit] Update parser cache configuration for tag-based hashing - change (operations/mediawiki-config)

2016-04-18 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Update parser cache configuration for tag-based hashing
..

Update parser cache configuration for tag-based hashing

This makes sure that keys which are currently mapped to (for example) pc1004
will map to pc2004 once we do the switchover. Depends on I8830bd6bf.

Change-Id: I0ec3c015f3449a2d91d7f83e671d5b88d1d95201
---
M wmf-config/CommonSettings.php
M wmf-config/db-codfw.php
M wmf-config/db-eqiad.php
3 files changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 410f106..bcbb42d 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -322,8 +322,8 @@
 );
 
 $pcServers = array();
-foreach ( $wmgParserCacheDBs as $host ) {
-   $pcServers[] = array( 'host' => $host ) + $pcTemplate;
+foreach ( $wmgParserCacheDBs as $tag => $host ) {
+   $pcServers[$tag] = array( 'host' => $host ) + $pcTemplate;
 }
 
 $wgObjectCaches['mysql-multiwrite'] = array(
diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 28be348..b31531a 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -8,9 +8,9 @@
 #$wgReadOnly = "Wikimedia Sites are currently read-only during maintenance, 
please try again soon.";
 
 $wmgParserCacheDBs = array(
-   '10.192.16.170', # pc2004
-#  '10.192.32.128', # pc2005
-   '10.192.48.39',  # pc2006
+   '10.64.0.12'   => '10.192.16.170', # pc2004
+#  '10.64.32.72'  => '10.192.32.128', # pc2005
+   '10.64.48.128' => '10.192.48.39',  # pc2006
 );
 
 $wmgOldExtTemplate = array(
diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index f7d1010..955e19e 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -8,9 +8,9 @@
 #$wgReadOnly = "Wikimedia Sites are currently read-only during maintenance, 
please try again soon.";
 
 $wmgParserCacheDBs = array(
-   '10.64.0.12',   # pc1004
-#  '10.64.32.72',  # pc1005
-   '10.64.48.128', # pc1006
+   '10.64.0.12'   => '10.64.0.12',   # pc1004
+#  '10.64.32.72'  => '10.64.32.72',  # pc1005
+   '10.64.48.128' => '10.64.48.128', # pc1006
 );
 
 $wmgOldExtTemplate = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ec3c015f3449a2d91d7f83e671d5b88d1d95201
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Change External Store to use 127.0.0.1 - change (mediawiki/vagrant)

2016-04-18 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Change External Store to use 127.0.0.1
..

Change External Store to use 127.0.0.1

Strangely, this works for me either way, but two people report
that it only works for them with 127.0.0.1.

Change-Id: I034b3aa9893063bae3d67d1e23bcf651645dc250
---
M puppet/hieradata/common.yaml
M puppet/modules/role/manifests/externalstore.pp
2 files changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/92/284092/1

diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index dd20ce1..69821f2 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -291,7 +291,8 @@
 
 role::elk::vhost_name: "logstash%{hiera('mwv::tld')}"
 
-role::externalstore::db_host: "%{hiera('mysql::grant_host_name')}"
+role::externalstore::grant_db_host: "%{hiera('mysql::grant_host_name')}"
+role::externalstore::db_host: "%{hiera('mediawiki::multiwiki::db_host')}"
 role::externalstore::db_user: "%{hiera('mediawiki::multiwiki::db_user')}"
 role::externalstore::db_pass: "%{hiera('mediawiki::multiwiki::db_pass')}"
 role::externalstore::db_name: 'external'
diff --git a/puppet/modules/role/manifests/externalstore.pp 
b/puppet/modules/role/manifests/externalstore.pp
index a047892..2a722de 100644
--- a/puppet/modules/role/manifests/externalstore.pp
+++ b/puppet/modules/role/manifests/externalstore.pp
@@ -6,6 +6,7 @@
 # If you disable this role, you will not be able to access content
 # that was saved when it was active.
 class role::externalstore (
+$grant_db_host,
 $db_host,
 $db_name,
 $db_user,
@@ -17,8 +18,8 @@
 dbname => 'external',
 }
 
-mysql::sql { "GRANT ALL PRIVILEGES ON ${db_name}.* TO 
${db_user}@${db_host}":
-unless  => "SELECT 1 FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES WHERE 
TABLE_SCHEMA = '${db_name}' AND GRANTEE = \"'${db_user}'@'${db_host}'\" LIMIT 
1",
+mysql::sql { "GRANT ALL PRIVILEGES ON ${db_name}.* TO 
${db_user}@${grant_grant_db_host}":
+unless  => "SELECT 1 FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES WHERE 
TABLE_SCHEMA = '${db_name}' AND GRANTEE = \"'${db_user}'@'${grant_db_host}'\" 
LIMIT 1",
 require => Mysql::User[$db_user],
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] torrus: ignore lint issue with include for tests - change (operations/puppet)

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

Change subject: torrus: ignore lint issue with include for tests
..


torrus: ignore lint issue with include for tests

Change-Id: I43b5cbbe3db6df6772a294fd031cc9edd1a40454
---
M modules/torrus/tests/cdn.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/torrus/tests/cdn.pp b/modules/torrus/tests/cdn.pp
index 100cd7a..fa64b8c 100644
--- a/modules/torrus/tests/cdn.pp
+++ b/modules/torrus/tests/cdn.pp
@@ -1,7 +1,9 @@
 #
 
 # class to satify includes
+# lint:ignore:autoloader_layout
 class role::cache::configuration {
+# lint:endignore
 $active_nodes = {
 'production' => {
 'text' => {

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

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

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


[MediaWiki-commits] [Gerrit] Revert "Don't yet allow wikidatasparql graph urls" - change (operations/mediawiki-config)

2016-04-18 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Revert "Don't yet allow wikidatasparql graph urls"
..

Revert "Don't yet allow wikidatasparql graph urls"

This reverts commit 9e550fa64e5ab33e0c1a98e911153130d68130ad.

Change-Id: Ia04e44c6a6d5bce2f924f60dea484d90ca8ab4c9
---
M wmf-config/CommonSettings-labs.php
M wmf-config/CommonSettings.php
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index d80613a..b7165a4 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -360,10 +360,7 @@
// See https://www.mediawiki.org/wiki/Extension:Graph#External_data
$wgGraphAllowedDomains['http'] = array( 'wmflabs.org' );
$wgGraphAllowedDomains['wikirawupload'][] = 'upload.beta.wmflabs.org';
-   $wgGraphAllowedDomains['wikidatasparql'] = array(
-   'query.wikidata.org',
-   'wdqs-test.wmflabs.org'
-   );
+   $wgGraphAllowedDomains['wikidatasparql'][] = 'wdqs-test.wmflabs.org';
 }
 
 if ( $wmgUseKartographer ) {
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 310b079..3db1efd 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2944,6 +2944,9 @@
'wikirawupload' => array(
'upload.wikimedia.org',
),
+   'wikidatasparql' => array(
+   'query.wikidata.org',
+   ),
);
 
if ( $wmgUseGraphWithNamespace ) {

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

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

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


[MediaWiki-commits] [Gerrit] gitblit: ensure ./data/ subdir also exists - change (operations/puppet)

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

Change subject: gitblit: ensure ./data/ subdir also exists
..


gitblit: ensure ./data/ subdir also exists

Change-Id: I25099a8760923e0528feaa6318ab32414e998325
---
M modules/gitblit/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/gitblit/manifests/init.pp 
b/modules/gitblit/manifests/init.pp
index 7c5e387..78e2a2e 100644
--- a/modules/gitblit/manifests/init.pp
+++ b/modules/gitblit/manifests/init.pp
@@ -26,7 +26,7 @@
 group  => $git_repo_owner,
 }
 
-file { '/var/lib/gitblit':
+file { [ '/var/lib/gitblit', '/var/lib/gitblit/data' ]:
 ensure => directory,
 mode   => '0644',
 owner  => 'gitblit',

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

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

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


[MediaWiki-commits] [Gerrit] Revert "Depool pc1005 and pc2005 for cloning" - change (operations/mediawiki-config)

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

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

Change subject: Revert "Depool pc1005 and pc2005 for cloning"
..

Revert "Depool pc1005 and pc2005 for cloning"

This reverts commit 253fab35ba4f42c9dd453374ad3f2c7344adf6eb.

Change-Id: I3984f8b47d1882c21fb653c232e280f53469a223
---
M wmf-config/db-codfw.php
M wmf-config/db-eqiad.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 28be348..f9d2df4 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -9,7 +9,7 @@
 
 $wmgParserCacheDBs = array(
'10.192.16.170', # pc2004
-#  '10.192.32.128', # pc2005
+   '10.192.32.128', # pc2005
'10.192.48.39',  # pc2006
 );
 
diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index f7d1010..b6daaec 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -9,7 +9,7 @@
 
 $wmgParserCacheDBs = array(
'10.64.0.12',   # pc1004
-#  '10.64.32.72',  # pc1005
+   '10.64.32.72',  # pc1005
'10.64.48.128', # pc1006
 );
 

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

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

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


[MediaWiki-commits] [Gerrit] gitblit: ensure ./data/ subdir also exists - change (operations/puppet)

2016-04-18 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: gitblit: ensure ./data/ subdir also exists
..

gitblit: ensure ./data/ subdir also exists

Change-Id: I25099a8760923e0528feaa6318ab32414e998325
---
M modules/gitblit/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/89/284089/1

diff --git a/modules/gitblit/manifests/init.pp 
b/modules/gitblit/manifests/init.pp
index 7c5e387..78e2a2e 100644
--- a/modules/gitblit/manifests/init.pp
+++ b/modules/gitblit/manifests/init.pp
@@ -26,7 +26,7 @@
 group  => $git_repo_owner,
 }
 
-file { '/var/lib/gitblit':
+file { [ '/var/lib/gitblit', '/var/lib/gitblit/data' ]:
 ensure => directory,
 mode   => '0644',
 owner  => 'gitblit',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25099a8760923e0528feaa6318ab32414e998325
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] Just do a $webservice restart - change (operations...tools-manifest)

2016-04-18 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Just do a $webservice restart
..

Just do a $webservice restart

The appropriate webservice commands will read service.manifest
and do the appropriate things.

Change-Id: Ia5b93f0a361e76e24fcedef1b99b2fb32e52f0cc
---
M tools/manifest/webservicemonitor.py
1 file changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-manifest 
refs/changes/88/284088/1

diff --git a/tools/manifest/webservicemonitor.py 
b/tools/manifest/webservicemonitor.py
index 878e11f..0c0127d 100644
--- a/tools/manifest/webservicemonitor.py
+++ b/tools/manifest/webservicemonitor.py
@@ -16,20 +16,20 @@
 
 def _start_webservice(self, manifest):
 self.log.info('Starting webservice for tool %s', manifest.tool.name)
+
+command = [
+'/usr/bin/sudo',
+'-i', '-u', manifest.tool.username
+]
 if manifest.version == 1:
-command = '/usr/local/bin/webservice'
+command.append('/usr/local/bin/webservice')
 else:
-command = '/usr/bin/webservice-new'
+command.append('/usr/bin/webservice-new')
+# Restart instead of start so they get restarted even if they are 
running in zombie state
+command.append('restart')
 manifest.record_starting()
 try:
-subprocess.check_output([
-'/usr/bin/sudo',
-'-i', '-u', manifest.tool.username,
-command,
-'--release', manifest.webservice_release,
-manifest.webservice_server,
-'restart'  # Restart instead of start so they get restarted 
even if they are running in zombie state
-], timeout=15)  # 15 second timeout!
+subprocess.check_output(command, timeout=15)  # 15 second timeout!
 self.log.info('Started webservice for %s', manifest.tool.name)
 return True
 except subprocess.CalledProcessError as e:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5b93f0a361e76e24fcedef1b99b2fb32e52f0cc
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] deployment-prep shinken: deployment-salt is no longer the pu... - change (operations/puppet)

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

Change subject: deployment-prep shinken: deployment-salt is no longer the 
puppetmaster
..


deployment-prep shinken: deployment-salt is no longer the puppetmaster

Use role::beta::puppetmaster to determine this instead of configuring it here

Change-Id: Ib13961edc5700720e80233eca33c397565d8e0e9
---
M modules/beta/files/shinken.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/beta/files/shinken.cfg b/modules/beta/files/shinken.cfg
index 20dfefd..6406ed0 100644
--- a/modules/beta/files/shinken.cfg
+++ b/modules/beta/files/shinken.cfg
@@ -71,7 +71,7 @@
 
 define service {
 service_description Long lived cherry-picks on puppetmaster
-host_name   deployment-salt
+hostgroup_name  role::beta::puppetmaster
 use generic-service
 check_command   
check_graphite_threshold!http://labmon1001.eqiad.wmnet!10!$HOSTNOTES$.$HOSTNAME$.puppetmaster.cherrypicked_commits.ops-puppet!0!0!48h!100!--over
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib13961edc5700720e80233eca33c397565d8e0e9
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Show counts in category pages - hewiki - change (operations/mediawiki-config)

2016-04-18 Thread Eranroz (Code Review)
Eranroz has uploaded a new change for review.

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

Change subject: Show counts in category pages  - hewiki
..

Show counts in category pages  - hewiki

Bug: T132972
Change-Id: Ic27459df13c784b5b9440eeb724799db800b9a8e
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c6d6fff..b9aca97 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11051,12 +11051,10 @@
 // CT_MODE_ALL = 20
 'wmgCategoryTreeCategoryPageMode' => array(
'default' => 0,
-   'hewiki' => 10,
 ),
 
 'wmgCategoryTreeCategoryPageOptions' => array(
'default' => array( 'mode' => null, 'showcount' => true ),
-   'hewiki' => array( 'mode' => 10 /*CT_MODE_PAGES*/ ), // T13776
 ),
 
 'wmgUseFundraisingTranslateWorkflow' => array(

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

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

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


  1   2   3   4   >