[MediaWiki-commits] [Gerrit] integration/config[master]: Add mwext-doxygen-publish generic job

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

Change subject: Add mwext-doxygen-publish generic job
..


Add mwext-doxygen-publish generic job

$DOC_BASENAME will have the same effect for MobileFrontend.

Change-Id: I7c0421e115ced5e9d9fbfdea59aa56b1c7a71c22
---
M jjb/mediawiki-extensions.yaml
M zuul/layout.yaml
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index ebbf18e..c9aded3 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -323,7 +323,7 @@
  - global-teardown
 
 - job:
-name: 'mwext-MobileFrontend-doxygen-publish'
+name: 'mwext-doxygen-publish'
 node: contintLabsSlave && UbuntuTrusty
 defaults: use-remote-zuul-shallow-clone
 concurrent: false
@@ -334,7 +334,7 @@
  - doxygen
  - doc-publish:
 docsrc: 'docs/php'
-docdest: 'MobileFrontend/$DOC_SUBPATH/php'
+docdest: '$DOC_BASENAME/$DOC_SUBPATH/php'
 publishers:
  - global-teardown
 
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 0fb5445..394e7fd 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3799,7 +3799,7 @@
   - php53lint
 postmerge:
   - mwext-jsduck-publish
-  - mwext-MobileFrontend-doxygen-publish
+  - mwext-doxygen-publish
 
   - name: mediawiki/extensions/MobileApp
 template:

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Publish Doxygen and jsduck documentation for Kartographer

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

Change subject: Publish Doxygen and jsduck documentation for Kartographer
..


Publish Doxygen and jsduck documentation for Kartographer

Bug: T140657
Change-Id: I6d84f72994e70460b55861c411a90ab3dab5431b
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 394e7fd..728c6cf 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3623,6 +3623,9 @@
 check:
   - jsonlint
   - jshint
+postmerge:
+  - mwext-doxygen-publish
+  - mwext-jsduck-publish
 
   - name: mediawiki/extensions/LabeledSectionTransclusion
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d84f72994e70460b55861c411a90ab3dab5431b
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add mwext-doxygen-publish generic job

2016-09-06 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Add mwext-doxygen-publish generic job
..

Add mwext-doxygen-publish generic job

$DOC_BASENAME will have the same effect for MobileFrontend.

Change-Id: I7c0421e115ced5e9d9fbfdea59aa56b1c7a71c22
---
M jjb/mediawiki-extensions.yaml
M zuul/layout.yaml
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/32/308932/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index ebbf18e..c9aded3 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -323,7 +323,7 @@
  - global-teardown
 
 - job:
-name: 'mwext-MobileFrontend-doxygen-publish'
+name: 'mwext-doxygen-publish'
 node: contintLabsSlave && UbuntuTrusty
 defaults: use-remote-zuul-shallow-clone
 concurrent: false
@@ -334,7 +334,7 @@
  - doxygen
  - doc-publish:
 docsrc: 'docs/php'
-docdest: 'MobileFrontend/$DOC_SUBPATH/php'
+docdest: '$DOC_BASENAME/$DOC_SUBPATH/php'
 publishers:
  - global-teardown
 
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 0fb5445..394e7fd 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3799,7 +3799,7 @@
   - php53lint
 postmerge:
   - mwext-jsduck-publish
-  - mwext-MobileFrontend-doxygen-publish
+  - mwext-doxygen-publish
 
   - name: mediawiki/extensions/MobileApp
 template:

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

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

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


[MediaWiki-commits] [Gerrit] integration/jenkins[master]: Get rid of manual PHP_BIN handling

2016-09-06 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Get rid of manual PHP_BIN handling
..

Get rid of manual PHP_BIN handling

The original implementation of PHP_BIN involved replacing each
invocation of `php` with `$PHP_BIN`, but we soon switched to using the
altneratives system, with a wrapper that picked the right PHP version
from the environment variable.

This cleans up after that initial implementation by replacing the manual
$PHP_BIN invocations with `php` so everything goes through one
consistent entry-point.

Change-Id: Ifa800aa640049460cff186e9cf570fc1855e7f45
---
M bin/global-set-env.sh
M bin/mw-apply-settings.sh
M bin/mw-install-mysql.sh
M bin/mw-install-sqlite.sh
M bin/mw-phpunit.sh
M bin/mw-run-phpunit-allexts.sh
M bin/mw-run-update-script.sh
M bin/mw-send-to-coveralls.sh
8 files changed, 8 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/31/308931/1

diff --git a/bin/global-set-env.sh b/bin/global-set-env.sh
index d5d1d4d..5955979 100755
--- a/bin/global-set-env.sh
+++ b/bin/global-set-env.sh
@@ -25,9 +25,6 @@
 # https://github.com/karma-runner/karma-chrome-launcher/pull/41
 export CHROME_BIN=`which chromium-browser`
 
-# Set PHP_BIN to a default if it's not already set by Zuul
-export PHP_BIN="${PHP_BIN:=php5}"
-
 # Shut up composer xdebug warnings: 
 # They're not useful to us and are distractions in logs
 export COMPOSER_DISABLE_XDEBUG_WARN=1
diff --git a/bin/mw-apply-settings.sh b/bin/mw-apply-settings.sh
index 0d8e3eb..066f4c8 100755
--- a/bin/mw-apply-settings.sh
+++ b/bin/mw-apply-settings.sh
@@ -14,7 +14,7 @@
 # No PHP tags since _join.php inject them
 echo -en "\$wgTmpDirectory = '${MW_TMPDIR}';\n" >> "$LOCAL_SETTINGS"
 
-$PHP_BIN "$MEDIAWIKI_D/_join.php" >> "$LOCAL_SETTINGS"
+php "$MEDIAWIKI_D/_join.php" >> "$LOCAL_SETTINGS"
 
 echo "Making sure $LOCAL_SETTINGS is still valid"
-$PHP_BIN -l "$LOCAL_SETTINGS"
+php -l "$LOCAL_SETTINGS"
diff --git a/bin/mw-install-mysql.sh b/bin/mw-install-mysql.sh
index 2c044c1..0ce58c4 100755
--- a/bin/mw-install-mysql.sh
+++ b/bin/mw-install-mysql.sh
@@ -10,7 +10,7 @@
 
 # Run MediaWiki installer
 cd "$MW_INSTALL_PATH"
-$PHP_BIN maintenance/install.php \
+php maintenance/install.php \
--confpath "$MW_INSTALL_PATH" \
--dbtype=mysql \
--dbserver="$MW_DB_HOST:$MW_DB_PORT" \
diff --git a/bin/mw-install-sqlite.sh b/bin/mw-install-sqlite.sh
index a33d40f..4fcc187 100755
--- a/bin/mw-install-sqlite.sh
+++ b/bin/mw-install-sqlite.sh
@@ -4,7 +4,7 @@
 
 # Run MediaWiki installer
 cd "$MW_INSTALL_PATH"
-$PHP_BIN maintenance/install.php \
+php maintenance/install.php \
--confpath "$MW_INSTALL_PATH" \
--dbtype=sqlite \
--dbpath="$MW_TMPDIR" \
diff --git a/bin/mw-phpunit.sh b/bin/mw-phpunit.sh
index c845a34..ec0e112 100755
--- a/bin/mw-phpunit.sh
+++ b/bin/mw-phpunit.sh
@@ -36,6 +36,6 @@
 set -x
 cd "${MW_INSTALL_PATH}/tests/phpunit"
 
-$PHP_BIN phpunit.php \
+php phpunit.php \
--log-junit $JUNIT_DEST \
"${phpunit_args[@]:-}"
diff --git a/bin/mw-run-phpunit-allexts.sh b/bin/mw-run-phpunit-allexts.sh
index 3ced940..21ca073 100755
--- a/bin/mw-run-phpunit-allexts.sh
+++ b/bin/mw-run-phpunit-allexts.sh
@@ -17,7 +17,7 @@
 set -x
 cd "${MW_INSTALL_PATH}/tests/phpunit"
 
-$PHP_BIN -dzend.enable_gc=0 \
+php -dzend.enable_gc=0 \
phpunit.php \
--log-junit "$JUNIT_DEST" \
--testsuite extensions
diff --git a/bin/mw-run-update-script.sh b/bin/mw-run-update-script.sh
index e46660e..7ea2eff 100755
--- a/bin/mw-run-update-script.sh
+++ b/bin/mw-run-update-script.sh
@@ -7,5 +7,5 @@
 then
ARGS="$ARGS --skip-external-dependencies"
 fi
-$PHP_BIN "$MW_INSTALL_PATH/maintenance/update.php" $ARGS
+php "$MW_INSTALL_PATH/maintenance/update.php" $ARGS
 
diff --git a/bin/mw-send-to-coveralls.sh b/bin/mw-send-to-coveralls.sh
index 3a1b782..00e0246 100755
--- a/bin/mw-send-to-coveralls.sh
+++ b/bin/mw-send-to-coveralls.sh
@@ -18,4 +18,4 @@
 echo "json_path: log/coveralls-upload.json" >> .coveralls.yml
 
 # Actually run coveralls!
-$PHP_BIN vendor/bin/coveralls --verbose
+php vendor/bin/coveralls --verbose

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa800aa640049460cff186e9cf570fc1855e7f45
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Pass the job transaction name to MergeUser

2016-09-06 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Pass the job transaction name to MergeUser
..

Pass the job transaction name to MergeUser

This maintains join transaction ownership for the later.

Also cleanup the $fnameTrxOwner code to pass it down
from run() -> doRun() instead of using get_class().

Change-Id: Iacffca67e6f7b18e6f4ed4a6fd78e1bab2632e71
---
M includes/LocalRenameJob/LocalRenameJob.php
M includes/LocalRenameJob/LocalRenameUserJob.php
M includes/LocalRenameJob/LocalUserMergeJob.php
3 files changed, 6 insertions(+), 7 deletions(-)


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

diff --git a/includes/LocalRenameJob/LocalRenameJob.php 
b/includes/LocalRenameJob/LocalRenameJob.php
index f1aa170..dc88927 100644
--- a/includes/LocalRenameJob/LocalRenameJob.php
+++ b/includes/LocalRenameJob/LocalRenameJob.php
@@ -47,7 +47,7 @@
} );
}
try {
-   $this->doRun();
+   $this->doRun( __METHOD__ );
$this->addTeardownCallback( [ $this, 'scheduleNextWiki' 
] );
} catch ( Exception $e ) {
// This will lock the user out of their account until a 
sysadmin intervenes
@@ -62,8 +62,9 @@
 
/**
 * Actually do the work for the job class
+* @param string $fnameTrxOwner Caller name
 */
-   abstract protected function doRun();
+   abstract protected function doRun( $fnameTrxOwner );
 
protected function setRenameUserStatus( GlobalRenameUserStatus $status 
) {
$this->renameuserStatus = $status;
diff --git a/includes/LocalRenameJob/LocalRenameUserJob.php 
b/includes/LocalRenameJob/LocalRenameUserJob.php
index 89f8eb5..f65085b 100644
--- a/includes/LocalRenameJob/LocalRenameUserJob.php
+++ b/includes/LocalRenameJob/LocalRenameUserJob.php
@@ -27,7 +27,7 @@
parent::__construct( 'LocalRenameUserJob', $title, $params, $id 
);
}
 
-   public function doRun() {
+   public function doRun( $fnameTrxOwner ) {
if ( !class_exists( 'RenameuserSQL' ) ) {
throw new Exception( 'Extension:Renameuser is not 
installed' );
}
@@ -36,7 +36,6 @@
 
$this->updateStatus( 'inprogress' );
// Make the status update visible to all other transactions 
immediately
-   $fnameTrxOwner = __CLASS__ . '::run'; // ownership delegated 
from run()
$factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
$factory->commitMasterChanges( $fnameTrxOwner );
 
diff --git a/includes/LocalRenameJob/LocalUserMergeJob.php 
b/includes/LocalRenameJob/LocalUserMergeJob.php
index 735500d..b72900a 100755
--- a/includes/LocalRenameJob/LocalUserMergeJob.php
+++ b/includes/LocalRenameJob/LocalUserMergeJob.php
@@ -16,7 +16,7 @@
parent::__construct( 'LocalUserMergeJob', $title, $params, $id 
);
}
 
-   public function doRun() {
+   public function doRun( $fnameTrxOwner ) {
if ( !class_exists( 'MergeUser' ) ) {
throw new Exception( 'Extension:UserMerge is not 
installed' );
}
@@ -25,7 +25,6 @@
 
$this->updateStatus( 'inprogress' );
// Make the status update visible to all other transactions 
immediately
-   $fnameTrxOwner = __CLASS__ . '::run'; // ownership delegated 
from run()
$factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
$factory->commitMasterChanges( $fnameTrxOwner );
 
@@ -48,7 +47,7 @@
new UserMergeLogger(),
MergeUser::USE_MULTI_COMMIT
);
-   $um->merge( $renamingUser );
+   $um->merge( $renamingUser, $fnameTrxOwner );
$um->delete( $renamingUser, 'wfMessage' );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacffca67e6f7b18e6f4ed4a6fd78e1bab2632e71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki...UserMerge[master]: Pass the job transaction name to MergeUser

2016-09-06 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Pass the job transaction name to MergeUser
..

Pass the job transaction name to MergeUser

This maintains join transaction ownership for the later.

Change-Id: I7c5e0f26a4019f39eff3f46ce0129f0e449ab012
---
M MergeUser.php
M SpecialUserMerge.php
2 files changed, 8 insertions(+), 5 deletions(-)


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

diff --git a/MergeUser.php b/MergeUser.php
index cc2ea99..79409ed 100755
--- a/MergeUser.php
+++ b/MergeUser.php
@@ -40,10 +40,11 @@
 
/**
 * @param User $performer
+* @param string $fnameTrxOwner
 */
-   public function merge( User $performer ) {
+   public function merge( User $performer, $fnameTrxOwner = __METHOD__ ) {
$this->mergeEditcount();
-   $this->mergeDatabaseTables();
+   $this->mergeDatabaseTables( $fnameTrxOwner );
$this->logger->addMergeEntry( $performer, $this->oldUser, 
$this->newUser );
}
 
@@ -197,8 +198,10 @@
 *
 * Merges database references from one user ID or username to another 
user ID or username
 * to preserve referential integrity.
+*
+* @param string $fnameTrxOwner
 */
-   private function mergeDatabaseTables() {
+   private function mergeDatabaseTables( $fnameTrxOwner ) {
// Fields to update with the format:
// array(
//tableName, idField, textField,
@@ -230,7 +233,7 @@
 
if ( $this->flags & self::USE_MULTI_COMMIT ) {
// Flush prior writes; this actives the non-transaction 
path in the loop below.
-   $lbFactory->commitMasterChanges( __METHOD__ );
+   $lbFactory->commitMasterChanges( $fnameTrxOwner );
}
 
foreach ( $updateFields as $fieldInfo ) {
diff --git a/SpecialUserMerge.php b/SpecialUserMerge.php
index 69b7bfd..9180b73 100644
--- a/SpecialUserMerge.php
+++ b/SpecialUserMerge.php
@@ -133,7 +133,7 @@
 
// Validation passed, let's merge the user now.
$um = new MergeUser( $oldUser, $newUser, new UserMergeLogger() 
);
-   $um->merge( $this->getUser() );
+   $um->merge( $this->getUser(), __METHOD__ );
 
$out = $this->getOutput();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c5e0f26a4019f39eff3f46ce0129f0e449ab012
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserMerge
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Provide message a title context where we know it

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

Change subject: Provide message a title context where we know it
..


Provide message a title context where we know it

Change-Id: I746f7b6ceb2c231c7e5eb40543bfd22ad58eea21
---
M includes/page/EditPagePage.php
M includes/page/PageContent.php
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/includes/page/EditPagePage.php b/includes/page/EditPagePage.php
index 6c9a169..5d4f422 100644
--- a/includes/page/EditPagePage.php
+++ b/includes/page/EditPagePage.php
@@ -181,7 +181,7 @@
$html .
Html::closeElement( 'span' ) .
Html::OpenElement( 'label', [ 'for' => 
'wpQuality-container' ] ) .
-   wfMessage( 'proofreadpage_page_status' 
)->parse() .
+   wfMessage( 'proofreadpage_page_status' 
)->title( $this->getTitle() )->parse() .
Html::closeElement( 'label' );
}
 
diff --git a/includes/page/PageContent.php b/includes/page/PageContent.php
index 5417b22..346371c 100644
--- a/includes/page/PageContent.php
+++ b/includes/page/PageContent.php
@@ -240,7 +240,8 @@
 
// html container
$html = Html::openElement( 'div', [ 'class' => 
'prp-page-qualityheader quality' . $this->level->getLevel() ] ) .
-   wfMessage( 'proofreadpage_quality' . 
$this->level->getLevel() . '_message' )->inContentLanguage()->parse() .
+   wfMessage( 'proofreadpage_quality' . 
$this->level->getLevel() . '_message' )
+   ->title( $title )->inContentLanguage()->parse() 
.
Html::closeElement( 'div' ) .
Html::openElement( 'div', [ 'class' => 'pagetext' ] ) .
$parserOutput->getText() .

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I746f7b6ceb2c231c7e5eb40543bfd22ad58eea21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace unused LoadBalancer::waitTimeout() method with a con...

2016-09-06 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Replace unused LoadBalancer::waitTimeout() method with a config 
setting
..

Replace unused LoadBalancer::waitTimeout() method with a config setting

Change-Id: Ide390738be0ff537580002501c380a0507dab1e5
---
M includes/db/loadbalancer/LoadBalancer.php
1 file changed, 4 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/28/308928/1

diff --git a/includes/db/loadbalancer/LoadBalancer.php 
b/includes/db/loadbalancer/LoadBalancer.php
index 71286a9..16774b7 100644
--- a/includes/db/loadbalancer/LoadBalancer.php
+++ b/includes/db/loadbalancer/LoadBalancer.php
@@ -94,6 +94,7 @@
 *  - servers : Required. Array of server info structures.
 *  - loadMonitor : Name of a class used to fetch server lag and load.
 *  - readOnlyReason : Reason the master DB is read-only if so 
[optional]
+*  - waitTimeout : Maximum time to wait for replicas for consistency 
[optional]
 *  - srvCache : BagOStuff object [optional]
 *  - wanCache : WANObjectCache object [optional]
 * @throws MWException
@@ -103,7 +104,9 @@
throw new MWException( __CLASS__ . ': missing servers 
parameter' );
}
$this->mServers = $params['servers'];
-   $this->mWaitTimeout = self::POS_WAIT_TIMEOUT;
+   $this->mWaitTimeout = isset( $params['waitTimeout'] )
+   ? $params['waitTimeout']
+   : self::POS_WAIT_TIMEOUT;
 
$this->mReadIndex = -1;
$this->mWriteIndex = -1;
@@ -1411,14 +1414,6 @@
}
 
return $fnames;
-   }
-
-   /**
-* @param mixed $value
-* @return mixed
-*/
-   public function waitTimeout( $value = null ) {
-   return wfSetVar( $this->mWaitTimeout, $value );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide390738be0ff537580002501c380a0507dab1e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove return-by-reference PHP4-ism from getExternalLB()

2016-09-06 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Remove return-by-reference PHP4-ism from getExternalLB()
..

Remove return-by-reference PHP4-ism from getExternalLB()

Change-Id: Id6184a4a543196c4253dc9d930ac8ac0a9a5b0b0
---
M includes/db/loadbalancer/LBFactory.php
M includes/db/loadbalancer/LBFactoryFake.php
M includes/db/loadbalancer/LBFactoryMulti.php
M includes/db/loadbalancer/LBFactorySimple.php
M includes/db/loadbalancer/LBFactorySingle.php
5 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/27/308927/1

diff --git a/includes/db/loadbalancer/LBFactory.php 
b/includes/db/loadbalancer/LBFactory.php
index 2d91bb7..a3e5cb6 100644
--- a/includes/db/loadbalancer/LBFactory.php
+++ b/includes/db/loadbalancer/LBFactory.php
@@ -185,7 +185,7 @@
 * @param bool|string $wiki Wiki ID, or false for the current wiki
 * @return LoadBalancer
 */
-   abstract public function ( $cluster, $wiki = false );
+   abstract public function getExternalLB( $cluster, $wiki = false );
 
/**
 * Execute a function for each tracked load balancer
diff --git a/includes/db/loadbalancer/LBFactoryFake.php 
b/includes/db/loadbalancer/LBFactoryFake.php
index 33ee250..5cd1d4b 100644
--- a/includes/db/loadbalancer/LBFactoryFake.php
+++ b/includes/db/loadbalancer/LBFactoryFake.php
@@ -40,7 +40,7 @@
throw new DBAccessError;
}
 
-   public function ( $cluster, $wiki = false ) {
+   public function getExternalLB( $cluster, $wiki = false ) {
throw new DBAccessError;
}
 
diff --git a/includes/db/loadbalancer/LBFactoryMulti.php 
b/includes/db/loadbalancer/LBFactoryMulti.php
index 17e01b9..e56631d 100644
--- a/includes/db/loadbalancer/LBFactoryMulti.php
+++ b/includes/db/loadbalancer/LBFactoryMulti.php
@@ -293,7 +293,7 @@
 * @param bool|string $wiki Wiki ID, or false for the current wiki
 * @return LoadBalancer
 */
-   public function ( $cluster, $wiki = false ) {
+   public function getExternalLB( $cluster, $wiki = false ) {
if ( !isset( $this->extLBs[$cluster] ) ) {
$this->extLBs[$cluster] = $this->newExternalLB( 
$cluster, $wiki );
$this->extLBs[$cluster]->parentInfo( [ 'id' => 
"ext-$cluster" ] );
diff --git a/includes/db/loadbalancer/LBFactorySimple.php 
b/includes/db/loadbalancer/LBFactorySimple.php
index 262b0d9..4632b0a 100644
--- a/includes/db/loadbalancer/LBFactorySimple.php
+++ b/includes/db/loadbalancer/LBFactorySimple.php
@@ -122,7 +122,7 @@
 * @param bool|string $wiki
 * @return array
 */
-   public function ( $cluster, $wiki = false ) {
+   public function getExternalLB( $cluster, $wiki = false ) {
if ( !isset( $this->extLBs[$cluster] ) ) {
$this->extLBs[$cluster] = $this->newExternalLB( 
$cluster, $wiki );
$this->extLBs[$cluster]->parentInfo( [ 'id' => 
"ext-$cluster" ] );
diff --git a/includes/db/loadbalancer/LBFactorySingle.php 
b/includes/db/loadbalancer/LBFactorySingle.php
index 14c1c28..14cec0e 100644
--- a/includes/db/loadbalancer/LBFactorySingle.php
+++ b/includes/db/loadbalancer/LBFactorySingle.php
@@ -73,7 +73,7 @@
 * @param bool|string $wiki Wiki ID, or false for the current wiki
 * @return LoadBalancerSingle
 */
-   public function ( $cluster, $wiki = false ) {
+   public function getExternalLB( $cluster, $wiki = false ) {
return $this->lb;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6184a4a543196c4253dc9d930ac8ac0a9a5b0b0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Don't render cursor holders outside of active node

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

Change subject: Don't render cursor holders outside of active node
..


Don't render cursor holders outside of active node

Bug: T70306
Change-Id: I940fdc772d5932b6413e9d7934e600ba429134dc
---
M src/ce/ve.ce.Surface.js
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 058bb2f..6e1167b 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -3046,7 +3046,8 @@
  * @return {Node|null} Potentially cursor-adjacent uneditable branch node, or 
null
  */
 ve.ce.Surface.prototype.findAdjacentUneditableBranchNode = function ( 
direction ) {
-   var node,
+   var node, viewNode,
+   activeNode = this.getActiveNode(),
forward = direction > 0;
 
node = $( this.nativeSelection.focusNode ).closest(
@@ -3083,6 +3084,13 @@
return null;
}
if ( $( node ).is( 
'.ve-ce-focusableNode,.ve-ce-tableNode' ) ) {
+   if ( activeNode ) {
+   viewNode = $( node ).data( 'view' );
+   if ( 
!activeNode.getRange().containsRange( viewNode.getRange() ) ) {
+   // Node is outside the active 
node
+   return null;
+   }
+   }
return node;
}
if ( !node.childNodes || node.childNodes.length === 0 ) 
{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I940fdc772d5932b6413e9d7934e600ba429134dc
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: DLynch 
Gerrit-Reviewer: Divec 
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] mediawiki...Kartographer[master]: PHP code cleanup

2016-09-06 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: PHP code cleanup
..

PHP code cleanup

Followed idea's code suggestions.

TODO:
* Is private State::version still being used?  Comments seem to indicate some 
sort of serialization
* JsonSchema\Validator has two implementations:

mediawiki/extensions/Kartographer/vendor/justinrainbow/json-schema/src/JsonSchema/Validator.php
mediawiki/vendor/justinrainbow/json-schema/src/JsonSchema/Validator.php

Change-Id: I70cd8e05cd687576efb4f7204cf92afbf6b3c16b
---
M includes/ApiSanitizeMapData.php
M includes/Hooks.php
M includes/SpecialMap.php
M includes/State.php
M includes/Tag/TagHandler.php
5 files changed, 5 insertions(+), 10 deletions(-)


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

diff --git a/includes/ApiSanitizeMapData.php b/includes/ApiSanitizeMapData.php
index cd5067a..b0b1148 100644
--- a/includes/ApiSanitizeMapData.php
+++ b/includes/ApiSanitizeMapData.php
@@ -37,6 +37,7 @@
}
 
private function sanitizeJson( Title $title, $text ) {
+   /** @var Parser $wgParser */
global $wgParser;
 
$parser = $wgParser->getFreshParser();
diff --git a/includes/Hooks.php b/includes/Hooks.php
index c934c66..4dbf3b0 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -14,11 +14,6 @@
 use ParserOutput;
 
 class Hooks {
-   private static $tags = [
-   'mapframe' => 'Kartographer\Tag\MapFrame::entryPoint',
-   'maplink' => 'Kartographer\Tag\MapLink::entryPoint',
-   ];
-
/**
 * ParserFirstCallInit hook handler
 * @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
@@ -55,7 +50,7 @@
 * @return bool
 */
/*public static function onRejectParserCacheValue( ParserOutput $po ) {
-   // One of these should be prsent in any output with old version 
of data
+   // One of these should be present in any output with old 
version of data
if ( $po->getExtensionData( 'kartographer_valid' )
 || $po->getExtensionData( 'kartographer_broken' )
) {
diff --git a/includes/SpecialMap.php b/includes/SpecialMap.php
index 5203b9a..867d905 100644
--- a/includes/SpecialMap.php
+++ b/includes/SpecialMap.php
@@ -40,7 +40,7 @@
}
 
$attributions = Html::rawElement( 'div', [ 'id' => 
'mw-specialMap-attributions' ],
-   wfMessage( 'kartographer-attribution' )->title( 
$this->getTitle() )->parse() );
+   wfMessage( 'kartographer-attribution' )->title( 
$this->getPageTitle() )->parse() );
 
$this->getOutput()->addHTML(
Html::openElement( 'div', [ 'id' => 
'mw-specialMap-container', 'class' => 'thumb' ] )
diff --git a/includes/State.php b/includes/State.php
index f90741a..5c05e28 100644
--- a/includes/State.php
+++ b/includes/State.php
@@ -13,7 +13,7 @@
const VERSION = 1;
 
/** @var int Version of this class, for checking after deserialization 
*/
-   private $version = self::VERSION;
+   private /** @noinspection PhpUnusedPrivateFieldInspection */ $version = 
self::VERSION;
 
private $valid = false;
private $broken = false;
@@ -23,7 +23,7 @@
private $data = [];
 
/**
-* Retrieves an instance of self from ParserOutout, if present
+* Retrieves an instance of self from ParserOutput, if present
 *
 * @param ParserOutput $output
 * @return self|null
diff --git a/includes/Tag/TagHandler.php b/includes/Tag/TagHandler.php
index f467fd0..00264b6 100644
--- a/includes/Tag/TagHandler.php
+++ b/includes/Tag/TagHandler.php
@@ -16,7 +16,6 @@
 use Kartographer\State;
 use Language;
 use Parser;
-use ParserOutput;
 use PPFrame;
 use Status;
 use stdClass;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70cd8e05cd687576efb4f7204cf92afbf6b3c16b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
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] VisualEditor/VisualEditor[master]: Make ve.dm.Transaction plain data by removing the .doc property

2016-09-06 Thread Divec (Code Review)
Divec has uploaded a new change for review.

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

Change subject: Make ve.dm.Transaction plain data by removing the .doc property
..

Make ve.dm.Transaction plain data by removing the .doc property

Also clarify the required state for ve.dm.Document parameters

Change-Id: Idf7c69ffe5cc54506fee3730a6290c1ae61cedc2
---
M src/dm/ve.dm.Surface.js
M src/dm/ve.dm.SurfaceFragment.js
M src/dm/ve.dm.Transaction.js
M tests/dm/ve.dm.Document.test.js
M tests/dm/ve.dm.MetaList.test.js
M tests/dm/ve.dm.Transaction.test.js
M tests/dm/ve.dm.TransactionProcessor.test.js
7 files changed, 51 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/25/308925/1

diff --git a/src/dm/ve.dm.Surface.js b/src/dm/ve.dm.Surface.js
index cefc7ac..7e6ac5f 100644
--- a/src/dm/ve.dm.Surface.js
+++ b/src/dm/ve.dm.Surface.js
@@ -1004,7 +1004,7 @@
 
this.getHistory().forEach( function ( stackItem ) {
stackItem.transactions.forEach( function ( tx ) {
-   var newRange = tx.getModifiedRange();
+   var newRange = tx.getModifiedRange( this.documentModel 
);
// newRange will by null for no-ops
if ( newRange ) {
// Translate previous ranges by the current 
transaction
diff --git a/src/dm/ve.dm.SurfaceFragment.js b/src/dm/ve.dm.SurfaceFragment.js
index 837ddd1..5326aea 100644
--- a/src/dm/ve.dm.SurfaceFragment.js
+++ b/src/dm/ve.dm.SurfaceFragment.js
@@ -777,7 +777,7 @@
tx = ve.dm.Transaction.newFromInsertion( doc, offset, content );
// Set the range to cover the inserted content; the offset 
translation will be wrong
// if newFromInsertion() decided to move the insertion point
-   newRange = tx.getModifiedRange();
+   newRange = tx.getModifiedRange( doc );
this.change( tx, newRange ? new ve.dm.LinearSelection( doc, 
newRange ) : new ve.dm.NullSelection( doc ) );
}
 
@@ -845,7 +845,7 @@
if ( !tx.isNoOp() ) {
// Set the range to cover the inserted content; the offset 
translation will be wrong
// if newFromInsertion() decided to move the insertion point
-   newRange = tx.getModifiedRange();
+   newRange = tx.getModifiedRange( doc );
this.change( tx, newRange ? new ve.dm.LinearSelection( doc, 
newRange ) : new ve.dm.NullSelection( doc ) );
if ( annotations && annotations.getLength() > 0 ) {
this.annotateContent( 'set', annotations );
diff --git a/src/dm/ve.dm.Transaction.js b/src/dm/ve.dm.Transaction.js
index 2d37988..22ae957 100644
--- a/src/dm/ve.dm.Transaction.js
+++ b/src/dm/ve.dm.Transaction.js
@@ -9,13 +9,11 @@
  *
  * @class
  * @constructor
- * @param {ve.dm.Document} doc The document to which this transaction applies
  * @param {Object[]} [operations] The operations comprising this transaction; 
default []
  */
-ve.dm.Transaction = function VeDmTransaction( doc, operations ) {
+ve.dm.Transaction = function VeDmTransaction( operations ) {
this.operations = operations || [];
this.applied = false;
-   this.doc = doc;
 };
 
 /* Static Methods */
@@ -24,7 +22,7 @@
  * Generate a transaction that replaces data in a range.
  *
  * @method
- * @param {ve.dm.Document} doc Document to create transaction for
+ * @param {ve.dm.Document} doc Document in pre-transaction state
  * @param {ve.Range} range Range of data to remove
  * @param {Array} data Data to insert
  * @param {boolean} [removeMetadata=false] Remove metadata instead of 
collapsing it
@@ -33,7 +31,7 @@
  */
 ve.dm.Transaction.newFromReplacement = function ( doc, range, data, 
removeMetadata ) {
var endOffset,
-   tx = new ve.dm.Transaction( doc );
+   tx = new ve.dm.Transaction();
endOffset = tx.pushRemoval( doc, 0, range, removeMetadata );
endOffset = tx.pushInsertion( doc, endOffset, endOffset, data );
tx.pushFinalRetain( doc, endOffset );
@@ -45,13 +43,13 @@
  *
  * @static
  * @method
- * @param {ve.dm.Document} doc Document to create transaction for
+ * @param {ve.dm.Document} doc Document in pre-transaction state
  * @param {number} offset Offset to insert at
  * @param {Array} data Data to insert
  * @return {ve.dm.Transaction} Transaction that inserts data
  */
 ve.dm.Transaction.newFromInsertion = function ( doc, offset, data ) {
-   var tx = new ve.dm.Transaction( doc ),
+   var tx = new ve.dm.Transaction(),
endOffset = tx.pushInsertion( doc, 0, offset, data );
// Retain to end of document, if needed (for completeness)
tx.pushFinalRetain( doc, endOffset );
@@ -77,14 +75,14 @@
  * 3. Merges take place at the highest common ancestor
  *
  * @method
- * 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Tweak fullscreen styles for API sandbox

2016-09-06 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Tweak fullscreen styles for API sandbox
..

Tweak fullscreen styles for API sandbox

Change-Id: I69ae300c00931d6a4fff3920645b2c6ff6708284
---
M resources/src/mediawiki.special/mediawiki.special.apisandbox.css
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/24/308924/1

diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.css 
b/resources/src/mediawiki.special/mediawiki.special.apisandbox.css
index 2517605..99f6c13 100644
--- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.css
+++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.css
@@ -27,6 +27,11 @@
z-index: 100;
 }
 
+.mw-apisandbox-fullscreen .mw-apisandbox-container {
+   border-width: 1px 0 0 0;
+   border-radius: 0;
+}
+
 .mw-apisandbox-spacer {
display: inline-block;
height: 1px;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fix parent constructor call

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

Change subject: Fix parent constructor call
..


Fix parent constructor call

Got broken in switch to using 'super'.

Change-Id: Icea95b49ad48849af857bfa3b301d3bcf6039036
---
M modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
index 6523ca2..afb5afc 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
@@ -25,7 +25,7 @@
}, config );
 
// Parent constructor
-   ve.ui.MWParameterPage.super.apply( this, arguments );
+   ve.ui.MWParameterPage.super.call( this, name, config );
 
// Properties
this.edited = false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icea95b49ad48849af857bfa3b301d3bcf6039036
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.28.0-wmf.18]: Add method to get local unread notifications in the manager

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

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

Change subject: Add method to get local unread notifications in the manager
..

Add method to get local unread notifications in the manager

Bug: T141404
Change-Id: I90aa4b83cdc1f3c1c793f8ca88b532a428c7b0af
(cherry picked from commit 93f4f2a460582c9c80acdeed66b4e953823b8d45)
---
M modules/model/mw.echo.dm.ModelManager.js
1 file changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/modules/model/mw.echo.dm.ModelManager.js 
b/modules/model/mw.echo.dm.ModelManager.js
index cc7ecb1..706413d 100644
--- a/modules/model/mw.echo.dm.ModelManager.js
+++ b/modules/model/mw.echo.dm.ModelManager.js
@@ -288,6 +288,18 @@
};
 
/**
+* Get local unread notifications
+*
+* @return {mw.echo.dm.NotificationItem[]} Local unread notifications
+*/
+   mw.echo.dm.ModelManager.prototype.getLocalUnread = function () {
+   var isUnread = function ( item ) {
+   return !item.isRead();
+   };
+
+   return this.getLocalNotifications().filter( isUnread );
+   };
+   /**
 * Check whether there are talk notifications, and emit an event
 * in case there aren't any left.
 *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90aa4b83cdc1f3c1c793f8ca88b532a428c7b0af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.18
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Mooeypoo 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[wmf/1.28.0-wmf.18]: Count local unread notifications when mark-all-read is clicked

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

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

Change subject: Count local unread notifications when mark-all-read is clicked
..

Count local unread notifications when mark-all-read is clicked

Rather than counting all local notifications, which was an error.
Depends on the Echo commit I90aa4b83cdc

Bug: T141404
Change-Id: I94b7f1099da1754f82e6e6807a106a35b00dd58d
Depends-On: I90aa4b83cdc1f3c1c793f8ca88b532a428c7b0af
(cherry picked from commit 2aa948ef92650796c8a3403b1daaad3660bc3861)
---
M resources/mobile.notifications.overlay/NotificationsOverlay.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/mobile.notifications.overlay/NotificationsOverlay.js 
b/resources/mobile.notifications.overlay/NotificationsOverlay.js
index 6db8e3b..a670f49 100644
--- a/resources/mobile.notifications.overlay/NotificationsOverlay.js
+++ b/resources/mobile.notifications.overlay/NotificationsOverlay.js
@@ -141,7 +141,7 @@
 */
onMarkAllReadButtonClick: function () {
var overlay = this,
-   numNotifications = 
this.controller.manager.getLocalNotifications().length;
+   numNotifications = 
this.controller.manager.getLocalUnread().length;
 
this.controller.markLocalNotificationsRead()
.then( function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I94b7f1099da1754f82e6e6807a106a35b00dd58d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.28.0-wmf.18
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Mooeypoo 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Use createLoaderURL() in getStartupModulesUrl()

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

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

Change subject: resourceloader: Use createLoaderURL() in getStartupModulesUrl()
..

resourceloader: Use createLoaderURL() in getStartupModulesUrl()

Avoid manually crafting a url. The packing logic and key sorting logic
is already in this method and keeps it central that way.

Test plan:
* Check output of /w/load.php?modules=startup=scripts.
  This is used to construct the url to 'jquery%2Cmediawiki'.
  No change in output.

Change-Id: I51ba51b6e74d78761108341c0ee318699ca7952f
---
M includes/resourceloader/ResourceLoaderStartUpModule.php
1 file changed, 8 insertions(+), 11 deletions(-)


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

diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php 
b/includes/resourceloader/ResourceLoaderStartUpModule.php
index eb9788c..c854fa2 100644
--- a/includes/resourceloader/ResourceLoaderStartUpModule.php
+++ b/includes/resourceloader/ResourceLoaderStartUpModule.php
@@ -313,17 +313,14 @@
$rl = $context->getResourceLoader();
$moduleNames = self::getStartupModules();
 
-   $query = [
-   'modules' => ResourceLoader::makePackedModulesString( 
$moduleNames ),
-   'only' => 'scripts',
-   'lang' => $context->getLanguage(),
-   'skin' => $context->getSkin(),
-   'debug' => $context->getDebug() ? 'true' : 'false',
-   'version' => $rl->getCombinedVersion( $context, 
$moduleNames ),
-   ];
-   // Ensure uniform query order
-   ksort( $query );
-   return wfAppendQuery( wfScript( 'load' ), $query );
+   $derivative = new DerivativeResourceLoaderContext( $context );
+   $derivative->setModules( $moduleNames );
+   $derivative->setOnly( 'scripts' );
+   $derivative->setVersion(
+   $rl->getCombinedVersion( $context, $moduleNames )
+   );
+
+   return $rl->createLoaderURL( 'local', $derivative );
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fix parent constructor call

2016-09-06 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Fix parent constructor call
..

Fix parent constructor call

Got broken in switch to using 'super'.

Change-Id: Icea95b49ad48849af857bfa3b301d3bcf6039036
---
M modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
index 6523ca2..afb5afc 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
@@ -25,7 +25,7 @@
}, config );
 
// Parent constructor
-   ve.ui.MWParameterPage.super.apply( this, arguments );
+   ve.ui.MWParameterPage.super.call( this, name, config );
 
// Properties
this.edited = false;

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix 'new ve.dm.Transaction.newFromDocumentInsertion' typo

2016-09-06 Thread Divec (Code Review)
Divec has uploaded a new change for review.

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

Change subject: Fix 'new ve.dm.Transaction.newFromDocumentInsertion' typo
..

Fix 'new ve.dm.Transaction.newFromDocumentInsertion' typo

Seems to originate in Iaddc4a7e7cc42a468a62ae550637f3eaacb64e07 . It was 
harmless because
the function returned an object which supplants the spurious one 'new' creates.

Change-Id: I40b39815f0b39e1a57a2d32f58f8a1a0b454cbcb
---
M src/dm/ve.dm.SurfaceFragment.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/19/308919/1

diff --git a/src/dm/ve.dm.SurfaceFragment.js b/src/dm/ve.dm.SurfaceFragment.js
index 837ddd1..f56087f 100644
--- a/src/dm/ve.dm.SurfaceFragment.js
+++ b/src/dm/ve.dm.SurfaceFragment.js
@@ -841,7 +841,7 @@
.getAnnotationsFromOffset( offset === 0 ? 0 : offset - 
1 );
}
 
-   tx = new ve.dm.Transaction.newFromDocumentInsertion( doc, offset, 
newDoc, newDocRange );
+   tx = ve.dm.Transaction.newFromDocumentInsertion( doc, offset, newDoc, 
newDocRange );
if ( !tx.isNoOp() ) {
// Set the range to cover the inserted content; the offset 
translation will be wrong
// if newFromInsertion() decided to move the insertion point

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40b39815f0b39e1a57a2d32f58f8a1a0b454cbcb
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: contint: Add PHP 7 packages from packages.sury.org

2016-09-06 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: contint: Add PHP 7 packages from packages.sury.org
..

contint: Add PHP 7 packages from packages.sury.org

This uses the packages.sury.org Debian repository to provide and install
packages for PHP 7 on jessie contint machines in labs.

Bug: T144872
Change-Id: I14e1b61f38082c8a0ae859dbb9939682515588ca
---
A modules/contint/files/sury-php.gpg
M modules/contint/manifests/packages/apt.pp
M modules/contint/manifests/packages/php.pp
3 files changed, 43 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/18/308918/1

diff --git a/modules/contint/files/sury-php.gpg 
b/modules/contint/files/sury-php.gpg
new file mode 100644
index 000..dc4d282
--- /dev/null
+++ b/modules/contint/files/sury-php.gpg
Binary files differ
diff --git a/modules/contint/manifests/packages/apt.pp 
b/modules/contint/manifests/packages/apt.pp
index ea422b5..d632dde 100644
--- a/modules/contint/manifests/packages/apt.pp
+++ b/modules/contint/manifests/packages/apt.pp
@@ -14,4 +14,18 @@
 # lint:endignore
 }
 
+if os_version('debian == jessie') {
+# Sanity check: only enable in labs
+requires_realm('labs')
+# Enable deb.sury.org PHP packages for jessie only
+apt::repository { 'sury-php':
+uri=> 'https://packages.sury.org/php/',
+dist   => $::lsbdistcodename,
+components => 'main',
+source => false,
+keyfile=> 'puppet:///modules/contint/sury-php.gpg',
+}
+}
+
+
 }
diff --git a/modules/contint/manifests/packages/php.pp 
b/modules/contint/manifests/packages/php.pp
index d84ad82..99b6f64 100644
--- a/modules/contint/manifests/packages/php.pp
+++ b/modules/contint/manifests/packages/php.pp
@@ -16,6 +16,35 @@
 ensure => absent,
 }
 
+if os_version('debian == jessie') {
+package { [
+// PHP 7.0 version of packages in mediawiki::packages::php5
+'php7.0-cli',
+'php7.0-cli-dbgsym',
+'php7.0-common',
+'php7.0-common-dbgsym',
+// Note: Missing luasandbox and wikidiff2
+// PHP extensions
+'php7.0-curl',
+// missing geoip
+'php7.0-intl',
+// missing memcached
+'php7.0-mysql',
+// missing redis
+'php7.0-xmlrpc',
+// CI packages from above
+'php7.0-dev',
+'php7.0-ldap',
+'php7.0-gd',
+'php7.0-pgsql',
+'php7.0-sqlite3',
+'php7.0-tidy',
+// missing xdebug
+]:
+ensure => latest,
+require => Apt::Repository['sury-php'],
+}
+
 if os_version('ubuntu < trusty') {
 # Disable APC entirely it gets confused when files changes often
 file { '/etc/php5/conf.d/apc.ini':

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Switch from NWE to VE using 'Edit' tab

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

Change subject: Switch from NWE to VE using 'Edit' tab
..


Switch from NWE to VE using 'Edit' tab

Bug: T143577
Change-Id: I19d942c879c9ccf70e95beb5f8de589eb6363039
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index 5fa6bfa..ce5c9ad 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -570,7 +570,15 @@
if ( isLoading ) {
return;
}
-   init.activateVe( 'visual' );
+   if ( active ) {
+   targetPromise.done( function ( target ) {
+   if ( target.mode === 'source' ) {
+   target.switchToVisualEditor();
+   }
+   } );
+   } else {
+   init.activateVe( 'visual' );
+   }
},
 
onEditSourceTabClick: function ( e ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19d942c879c9ccf70e95beb5f8de589eb6363039
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revision: Simplify loadText() with nested getWithSetCallback

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

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

Change subject: Revision: Simplify loadText() with nested getWithSetCallback
..

Revision: Simplify loadText() with nested getWithSetCallback

The logic was a bit hard to follow as there were two layers of
caching and a conditional (expiry being set).

* Move fetch logic for revision text to a private method.
* Call directly when cache is disabled.
* Simplify cache has/get/set by using getWithSetCallback.

Change-Id: Icd74cd8e944266c20dc7c5cb25f56300636dce1e
---
M includes/Revision.php
1 file changed, 26 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/17/308917/1

diff --git a/includes/Revision.php b/includes/Revision.php
index 03c3e6d..3c78830 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -1079,13 +1079,14 @@
}
 
/**
-* Fetch original serialized data without regard for view restrictions
+* Get original serialized data (without checking view restrictions)
 *
 * @since 1.21
 * @return string
 */
public function getSerializedData() {
if ( $this->mText === null ) {
+   // Revision is immutable. Load on demand.
$this->mText = $this->loadText();
}
 
@@ -1103,17 +1104,14 @@
 */
protected function getContentInternal() {
if ( $this->mContent === null ) {
-   // Revision is immutable. Load on demand:
-   if ( $this->mText === null ) {
-   $this->mText = $this->loadText();
-   }
+   $text = $this->getSerializedData();
 
-   if ( $this->mText !== null && $this->mText !== false ) {
+   if ( $text !== null && $text !== false ) {
// Unserialize content
$handler = $this->getContentHandler();
$format = $this->getContentFormat();
 
-   $this->mContent = $handler->unserializeContent( 
$this->mText, $format );
+   $this->mContent = $handler->unserializeContent( 
$text, $format );
}
}
 
@@ -1576,29 +1574,37 @@
 *
 * @return string|bool The revision's text, or false on failure
 */
-   protected function loadText() {
+   private function loadText() {
// Caching may be beneficial for massive use of external storage
global $wgRevisionCacheExpiry;
static $processCache = null;
+
+   if ( !$wgRevisionCacheExpiry ) {
+   return $this->fetchText();
+   }
 
if ( !$processCache ) {
$processCache = new MapCacheLRU( 10 );
}
 
$cache = ObjectCache::getMainWANInstance();
-   $textId = $this->getTextId();
-   $key = wfMemcKey( 'revisiontext', 'textid', $textId );
+   $key = $cache->makeKey( 'revisiontext', 'textid', 
$this->getTextId() );
 
-   if ( $wgRevisionCacheExpiry ) {
-   if ( $processCache->has( $key ) ) {
-   return $processCache->get( $key );
-   }
-   $text = $cache->get( $key );
-   if ( is_string( $text ) ) {
-   $processCache->set( $key, $text );
-   return $text;
-   }
+   // No negative caching; negative hits on text rows may be due 
to corrupted replica DBs
+   if ( $processCache->has( $key ) ) {
+   return $processCache->get( $key );
}
+   $text = $cache->getWithSetCallback( $key, 
$wgRevisionCacheExpiry, function () {
+   return $this->fetchText();
+   } );
+   if ( $text !== false ) {
+   $processCache->set( $key, $text );
+   }
+   return $text;
+   }
+
+   private function fetchText() {
+   $textId = $this->getTextId();
 
// If we kept data for lazy extraction, use it now...
if ( $this->mTextRow !== null ) {
@@ -1638,13 +1644,7 @@
wfDebugLog( 'Revision', "No blob for text row '$textId' 
(revision {$this->getId()})." );
}
 
-   # No negative caching -- negative hits on text rows may be due 
to corrupted replica DB servers
-   if ( $wgRevisionCacheExpiry && $text !== false ) {
-   $processCache->set( $key, $text );
-   $cache->set( $key, $text, 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Delete from pending db once the transaction is completed

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

Change subject: Delete from pending db once the transaction is completed
..


Delete from pending db once the transaction is completed

Bug: T143945
Change-Id: I60580e79da3568812aecc919530436bcd47e0dfe
---
M sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git 
a/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php 
b/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
index 6c0a8f9..03e618a 100644
--- a/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
@@ -24,6 +24,11 @@
$id = 0;
$inserting = true;
 
+   // Delete corresponding pending rows if this message is 
finished.
+   if ( in_array( $message['payments_final_status'], array( 
'completed', 'failed' ) ) ) {
+   PendingDatabase::get()->deleteMessage( $message );
+   }
+
$dbs = wmf_civicrm_get_dbs();
$dbs->push( 'fredge' );
$query = 'SELECT id FROM payments_initial

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Drop and re-create the index

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

Change subject: Drop and re-create the index
..


Drop and re-create the index

MySQL will give an error if you just change to a blob
Error: 1170 BLOB/TEXT column 'ref_target' used in key specification without 
a key length

Bug: T110446
Change-Id: Icfc080768005a314970498e94861a1ab9c068549
---
M db_patches/patch-ref_target_not_null.sql
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/db_patches/patch-ref_target_not_null.sql 
b/db_patches/patch-ref_target_not_null.sql
index da88d32..eb84e5f 100644
--- a/db_patches/patch-ref_target_not_null.sql
+++ b/db_patches/patch-ref_target_not_null.sql
@@ -1 +1,4 @@
+ALTER TABLE /*_*/flow_ext_ref DROP KEY flow_ext_ref_idx_v2;
 ALTER TABLE /*_*/flow_ext_ref CHANGE ref_target ref_target BLOB NOT NULL;
+CREATE INDEX /*i*/flow_ext_ref_idx_v2 ON /*_*/flow_ext_ref
+   (ref_src_wiki, ref_src_namespace, ref_src_title, ref_type, 
ref_target(255), ref_src_object_type, ref_src_object_id);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icfc080768005a314970498e94861a1ab9c068549
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Springle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Cleanup rename/merge Job transaction ownership

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

Change subject: Cleanup rename/merge Job transaction ownership
..


Cleanup rename/merge Job transaction ownership

Use the "run" method for $fname instead of __METHOD__.

Change-Id: I9bfce94d17e14c65224e611a2ddcd3751604605c
---
M includes/LocalRenameJob/LocalRenameUserJob.php
M includes/LocalRenameJob/LocalUserMergeJob.php
2 files changed, 14 insertions(+), 10 deletions(-)

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



diff --git a/includes/LocalRenameJob/LocalRenameUserJob.php 
b/includes/LocalRenameJob/LocalRenameUserJob.php
index 91bd6bc..89f8eb5 100644
--- a/includes/LocalRenameJob/LocalRenameUserJob.php
+++ b/includes/LocalRenameJob/LocalRenameUserJob.php
@@ -36,8 +36,9 @@
 
$this->updateStatus( 'inprogress' );
// Make the status update visible to all other transactions 
immediately
+   $fnameTrxOwner = __CLASS__ . '::run'; // ownership delegated 
from run()
$factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-   $factory->commitMasterChanges( __METHOD__ );
+   $factory->commitMasterChanges( $fnameTrxOwner );
 
if ( isset( $this->params['force'] ) && $this->params['force'] 
) {
// If we're dealing with an invalid username, load the 
data ourselves to avoid
diff --git a/includes/LocalRenameJob/LocalUserMergeJob.php 
b/includes/LocalRenameJob/LocalUserMergeJob.php
index 9cd2535..735500d 100755
--- a/includes/LocalRenameJob/LocalUserMergeJob.php
+++ b/includes/LocalRenameJob/LocalUserMergeJob.php
@@ -25,10 +25,19 @@
 
$this->updateStatus( 'inprogress' );
// Make the status update visible to all other transactions 
immediately
+   $fnameTrxOwner = __CLASS__ . '::run'; // ownership delegated 
from run()
$factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-   $factory->commitMasterChanges( __METHOD__ );
+   $factory->commitMasterChanges( $fnameTrxOwner );
 
$toUser = $this->maybeCreateNewUser( $to );
+   if ( $toUser instanceof Status ) {
+   $factory->rollbackMasterChanges( $fnameTrxOwner );
+   $this->updateStatus( 'failed' );
+   // Make the status update visible to all other 
transactions immediately
+   $factory->commitMasterChanges( $fnameTrxOwner );
+   throw new RuntimeException( "autoCreateUser failed for 
'{$to}': " .
+   $toUser->getWikiText( null, null, 'en' ) );
+   }
 
$renamingUser = $this->getRenameUser();
foreach ( $from as $olduser ) {
@@ -61,8 +70,7 @@
 * then merge into it.
 *
 * @param string $newName
-* @return User
-* @throws Exception
+* @return User|Status Returns status on failure
 */
private function maybeCreateNewUser( $newName ) {
$user = User::newFromName( $newName );
@@ -73,12 +81,7 @@
 
$status = Status::wrap( CentralAuthUtils::autoCreateUser( $user 
) );
if ( !$status->isGood() ) {
-   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-   $factory->rollbackMasterChanges( __METHOD__ );
-   $this->updateStatus( 'failed' );
-   $factory->commitMasterChanges( __METHOD__ );
-   throw new Exception( "autoCreateUser failed for 
$newName: " .
-   $status->getWikiText( null, null, 'en' ) );
+   return $status;
}
 
return $user;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9bfce94d17e14c65224e611a2ddcd3751604605c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Cleanup rename/merge Job transaction ownership

2016-09-06 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Cleanup rename/merge Job transaction ownership
..

Cleanup rename/merge Job transaction ownership

Use the "run" method for $fname instead of __METHOD__.

Change-Id: I9bfce94d17e14c65224e611a2ddcd3751604605c
---
M includes/LocalRenameJob/LocalRenameUserJob.php
M includes/LocalRenameJob/LocalUserMergeJob.php
2 files changed, 14 insertions(+), 9 deletions(-)


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

diff --git a/includes/LocalRenameJob/LocalRenameUserJob.php 
b/includes/LocalRenameJob/LocalRenameUserJob.php
index 91bd6bc..89f8eb5 100644
--- a/includes/LocalRenameJob/LocalRenameUserJob.php
+++ b/includes/LocalRenameJob/LocalRenameUserJob.php
@@ -36,8 +36,9 @@
 
$this->updateStatus( 'inprogress' );
// Make the status update visible to all other transactions 
immediately
+   $fnameTrxOwner = __CLASS__ . '::run'; // ownership delegated 
from run()
$factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-   $factory->commitMasterChanges( __METHOD__ );
+   $factory->commitMasterChanges( $fnameTrxOwner );
 
if ( isset( $this->params['force'] ) && $this->params['force'] 
) {
// If we're dealing with an invalid username, load the 
data ourselves to avoid
diff --git a/includes/LocalRenameJob/LocalUserMergeJob.php 
b/includes/LocalRenameJob/LocalUserMergeJob.php
index 9cd2535..3551719 100755
--- a/includes/LocalRenameJob/LocalUserMergeJob.php
+++ b/includes/LocalRenameJob/LocalUserMergeJob.php
@@ -25,10 +25,19 @@
 
$this->updateStatus( 'inprogress' );
// Make the status update visible to all other transactions 
immediately
+   $fnameTrxOwner = __CLASS__ . '::run'; // ownership delegated 
from run()
$factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-   $factory->commitMasterChanges( __METHOD__ );
+   $factory->commitMasterChanges( $fnameTrxOwner );
 
$toUser = $this->maybeCreateNewUser( $to );
+   if ( $toUser instanceof Status ) {
+   $factory->rollbackMasterChanges( $fnameTrxOwner );
+   $this->updateStatus( 'failed' );
+   // Make the status update visible to all other 
transactions immediately
+   $factory->commitMasterChanges( $fnameTrxOwner );
+   throw new RuntimeException( "autoCreateUser failed for 
'{$to}': " .
+   $toUser->getWikiText( null, null, 'en' ) );
+   }
 
$renamingUser = $this->getRenameUser();
foreach ( $from as $olduser ) {
@@ -61,7 +70,7 @@
 * then merge into it.
 *
 * @param string $newName
-* @return User
+* @return User|Status Returns status on failure
 * @throws Exception
 */
private function maybeCreateNewUser( $newName ) {
@@ -73,12 +82,7 @@
 
$status = Status::wrap( CentralAuthUtils::autoCreateUser( $user 
) );
if ( !$status->isGood() ) {
-   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-   $factory->rollbackMasterChanges( __METHOD__ );
-   $this->updateStatus( 'failed' );
-   $factory->commitMasterChanges( __METHOD__ );
-   throw new Exception( "autoCreateUser failed for 
$newName: " .
-   $status->getWikiText( null, null, 'en' ) );
+   return $status;
}
 
return $user;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bfce94d17e14c65224e611a2ddcd3751604605c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Revert "Update jquery.uls to a9dc11b"

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

Change subject: Revert "Update jquery.uls to a9dc11b"
..


Revert "Update jquery.uls to a9dc11b"

Breaks VisualEditor by throwing exceptions on most key
presses and selection changes, which causes Enter and Tab
to behave very badly in VE.

This reverts commit 3499b0a1b90351740c6a1c94a7f5a9446051b595.

Bug: T144871
Change-Id: I0518b056e6946341cf29eb3f16378702d37086a5
---
M lib/jquery.uls/css/jquery.uls.css
M lib/jquery.uls/css/jquery.uls.lcd.css
M lib/jquery.uls/css/jquery.uls.mobile.css
M lib/jquery.uls/i18n/ar.json
M lib/jquery.uls/i18n/dty.json
M lib/jquery.uls/i18n/en.json
M lib/jquery.uls/i18n/glk.json
M lib/jquery.uls/i18n/oc.json
M lib/jquery.uls/i18n/qqq.json
M lib/jquery.uls/i18n/sa.json
M lib/jquery.uls/i18n/sc.json
M lib/jquery.uls/i18n/th.json
M lib/jquery.uls/i18n/vi.json
M lib/jquery.uls/src/jquery.uls.core.js
M lib/jquery.uls/src/jquery.uls.lcd.js
M resources/css/ext.uls.css
M resources/css/ext.uls.languagesettings.css
17 files changed, 139 insertions(+), 135 deletions(-)

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



diff --git a/lib/jquery.uls/css/jquery.uls.css 
b/lib/jquery.uls/css/jquery.uls.css
index 3f83f83..6c895eb 100644
--- a/lib/jquery.uls/css/jquery.uls.css
+++ b/lib/jquery.uls/css/jquery.uls.css
@@ -1,3 +1,4 @@
+
 .uls-trigger {
/* @embed */
background: transparent url('../images/icon-language.png') no-repeat 
scroll left center;
@@ -50,9 +51,64 @@
min-width: 150px;
 }
 
+.uls-title-region a {
+   padding-left: 15px;
+}
+.uls-menu .uls-title {
+   font-weight: normal;
+   border: none;
+   padding-left: 15px;
+   font-size: 18pt;
+   line-height: 1.25em;
+   color: #555;
+}
+.uls-menu .uls-no-results-found-title {
+   font-size: 16pt;
+   font-weight: bold;
+   line-height: 1.5em;
+   padding-left: 6px;
+   padding-top: 10px;
+   margin-top: 0;
+   margin-bottom: 15px;
+   border-bottom: none;
+   color: #555;
+}
+.uls-menu .uls-lcd-region-section .uls-lcd-region-title {
+   color: #777;
+   font-size: 14pt;
+   font-weight: lighter;
+   line-height: 1.5em;
+   padding-left: 0;
+   margin-top: 0;
+   margin-bottom: 10px;
+   border-bottom: none;
+}
+div.uls-region {
+   cursor: pointer;
+   padding: 0;
+   margin: 0;
+   height: 120px;
+   border-bottom-color: transparent;
+   border-bottom-style: solid;
+   border-bottom-width: 2px;
+}
+
+.uls-region a {
+   bottom: 2px;
+   left: 2px;
+   padding: 0;
+   position: absolute;
+   font-size: 13px;
+   line-height: 1.2em;
+   text-decoration: none;
+   overflow: hidden;
+   text-overflow: ellipsis;
+   width: 99%;
+}
+
 .uls-search {
background-color: white;
-   padding: 5px 16px;
+   padding: 5px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #DDD;
@@ -65,7 +121,7 @@
 /* Make space for magnifying class on the front */
 .uls-search-wrapper {
position: relative;
-   padding-left: 44px;
+   padding-left: 40px;
margin-right: 5px;
height: 32px;
 }
@@ -75,10 +131,10 @@
background-image: -webkit-linear-gradient(transparent, transparent), 
url('../images/search.svg');
/* @embed */
background-image: linear-gradient(transparent, transparent), 
url('../images/search.svg');
-   background-size: 20px;
+   background-size: 28px;
background-position: center center;
height: 32px;
-   width: 44px;
+   width: 40px;
display: block;
position: absolute;
left: 0;
@@ -91,7 +147,7 @@
 
 /* There are two input boxes. This class applies to both of them */
 .uls-filterinput {
-   font-size: 16px;
+   font-size: 18px;
height: 32px;
width: 100%;
/* For the custom clear (X) icon */
diff --git a/lib/jquery.uls/css/jquery.uls.lcd.css 
b/lib/jquery.uls/css/jquery.uls.lcd.css
index 529b8bc..d35fc19 100644
--- a/lib/jquery.uls/css/jquery.uls.lcd.css
+++ b/lib/jquery.uls/css/jquery.uls.lcd.css
@@ -1,12 +1,13 @@
-/*
- * Language Category Display (LCD) consists of multiple sections:
- * - one to display when there are no search results (which might display 
suggested languages)
- * - one for each region of the world, plus regions for world languages and 
suggested languages
- * The regions consist of one or more rows (blocks) which consist of 
one-to-four columns. Each
- * column is an ul element, and contains up to 8 li elements, each containing 
a link.
- */
+.uls-lcd-region-section ul li:hover {
+   background-color: #eaeff7;
+}
 
-.uls-lcd {
+.uls-lcd-region-section {
+   margin-top: 10px;
+}
+
+/* Language list */
+.uls-language-list {
height: 20em;
/* Work around Chrome bug where it places 

[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[wmf/1.28.0-wmf.18]: Revert "Update jquery.uls to a9dc11b"

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

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

Change subject: Revert "Update jquery.uls to a9dc11b"
..

Revert "Update jquery.uls to a9dc11b"

Breaks VisualEditor by throwing exceptions on most key
presses and selection changes, which causes Enter and Tab
to behave very badly in VE.

This reverts commit 3499b0a1b90351740c6a1c94a7f5a9446051b595.

Bug: T144871
Change-Id: I0518b056e6946341cf29eb3f16378702d37086a5
---
M lib/jquery.uls/css/jquery.uls.css
M lib/jquery.uls/css/jquery.uls.lcd.css
M lib/jquery.uls/css/jquery.uls.mobile.css
M lib/jquery.uls/i18n/ar.json
M lib/jquery.uls/i18n/dty.json
M lib/jquery.uls/i18n/en.json
M lib/jquery.uls/i18n/glk.json
M lib/jquery.uls/i18n/oc.json
M lib/jquery.uls/i18n/qqq.json
M lib/jquery.uls/i18n/sa.json
M lib/jquery.uls/i18n/sc.json
M lib/jquery.uls/i18n/th.json
M lib/jquery.uls/i18n/vi.json
M lib/jquery.uls/src/jquery.uls.core.js
M lib/jquery.uls/src/jquery.uls.lcd.js
M resources/css/ext.uls.css
M resources/css/ext.uls.languagesettings.css
17 files changed, 139 insertions(+), 135 deletions(-)


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

diff --git a/lib/jquery.uls/css/jquery.uls.css 
b/lib/jquery.uls/css/jquery.uls.css
index 3f83f83..6c895eb 100644
--- a/lib/jquery.uls/css/jquery.uls.css
+++ b/lib/jquery.uls/css/jquery.uls.css
@@ -1,3 +1,4 @@
+
 .uls-trigger {
/* @embed */
background: transparent url('../images/icon-language.png') no-repeat 
scroll left center;
@@ -50,9 +51,64 @@
min-width: 150px;
 }
 
+.uls-title-region a {
+   padding-left: 15px;
+}
+.uls-menu .uls-title {
+   font-weight: normal;
+   border: none;
+   padding-left: 15px;
+   font-size: 18pt;
+   line-height: 1.25em;
+   color: #555;
+}
+.uls-menu .uls-no-results-found-title {
+   font-size: 16pt;
+   font-weight: bold;
+   line-height: 1.5em;
+   padding-left: 6px;
+   padding-top: 10px;
+   margin-top: 0;
+   margin-bottom: 15px;
+   border-bottom: none;
+   color: #555;
+}
+.uls-menu .uls-lcd-region-section .uls-lcd-region-title {
+   color: #777;
+   font-size: 14pt;
+   font-weight: lighter;
+   line-height: 1.5em;
+   padding-left: 0;
+   margin-top: 0;
+   margin-bottom: 10px;
+   border-bottom: none;
+}
+div.uls-region {
+   cursor: pointer;
+   padding: 0;
+   margin: 0;
+   height: 120px;
+   border-bottom-color: transparent;
+   border-bottom-style: solid;
+   border-bottom-width: 2px;
+}
+
+.uls-region a {
+   bottom: 2px;
+   left: 2px;
+   padding: 0;
+   position: absolute;
+   font-size: 13px;
+   line-height: 1.2em;
+   text-decoration: none;
+   overflow: hidden;
+   text-overflow: ellipsis;
+   width: 99%;
+}
+
 .uls-search {
background-color: white;
-   padding: 5px 16px;
+   padding: 5px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #DDD;
@@ -65,7 +121,7 @@
 /* Make space for magnifying class on the front */
 .uls-search-wrapper {
position: relative;
-   padding-left: 44px;
+   padding-left: 40px;
margin-right: 5px;
height: 32px;
 }
@@ -75,10 +131,10 @@
background-image: -webkit-linear-gradient(transparent, transparent), 
url('../images/search.svg');
/* @embed */
background-image: linear-gradient(transparent, transparent), 
url('../images/search.svg');
-   background-size: 20px;
+   background-size: 28px;
background-position: center center;
height: 32px;
-   width: 44px;
+   width: 40px;
display: block;
position: absolute;
left: 0;
@@ -91,7 +147,7 @@
 
 /* There are two input boxes. This class applies to both of them */
 .uls-filterinput {
-   font-size: 16px;
+   font-size: 18px;
height: 32px;
width: 100%;
/* For the custom clear (X) icon */
diff --git a/lib/jquery.uls/css/jquery.uls.lcd.css 
b/lib/jquery.uls/css/jquery.uls.lcd.css
index 529b8bc..d35fc19 100644
--- a/lib/jquery.uls/css/jquery.uls.lcd.css
+++ b/lib/jquery.uls/css/jquery.uls.lcd.css
@@ -1,12 +1,13 @@
-/*
- * Language Category Display (LCD) consists of multiple sections:
- * - one to display when there are no search results (which might display 
suggested languages)
- * - one for each region of the world, plus regions for world languages and 
suggested languages
- * The regions consist of one or more rows (blocks) which consist of 
one-to-four columns. Each
- * column is an ul element, and contains up to 8 li elements, each containing 
a link.
- */
+.uls-lcd-region-section ul li:hover {
+   background-color: #eaeff7;
+}
 
-.uls-lcd {
+.uls-lcd-region-section {
+   margin-top: 10px;
+}
+
+/* Language list */
+.uls-language-list {
 

[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Revert "Update jquery.uls to a9dc11b"

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

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

Change subject: Revert "Update jquery.uls to a9dc11b"
..

Revert "Update jquery.uls to a9dc11b"

Breaks VisualEditor by throwing exceptions on most key
presses and selection changes, which causes Enter and Tab
to behave very badly in VE.

This reverts commit 3499b0a1b90351740c6a1c94a7f5a9446051b595.

Bug: T144871
Change-Id: I0518b056e6946341cf29eb3f16378702d37086a5
---
M lib/jquery.uls/css/jquery.uls.css
M lib/jquery.uls/css/jquery.uls.lcd.css
M lib/jquery.uls/css/jquery.uls.mobile.css
M lib/jquery.uls/i18n/ar.json
M lib/jquery.uls/i18n/dty.json
M lib/jquery.uls/i18n/en.json
M lib/jquery.uls/i18n/glk.json
M lib/jquery.uls/i18n/oc.json
M lib/jquery.uls/i18n/qqq.json
M lib/jquery.uls/i18n/sa.json
M lib/jquery.uls/i18n/sc.json
M lib/jquery.uls/i18n/th.json
M lib/jquery.uls/i18n/vi.json
M lib/jquery.uls/src/jquery.uls.core.js
M lib/jquery.uls/src/jquery.uls.lcd.js
M resources/css/ext.uls.css
M resources/css/ext.uls.languagesettings.css
17 files changed, 139 insertions(+), 135 deletions(-)


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

diff --git a/lib/jquery.uls/css/jquery.uls.css 
b/lib/jquery.uls/css/jquery.uls.css
index 3f83f83..6c895eb 100644
--- a/lib/jquery.uls/css/jquery.uls.css
+++ b/lib/jquery.uls/css/jquery.uls.css
@@ -1,3 +1,4 @@
+
 .uls-trigger {
/* @embed */
background: transparent url('../images/icon-language.png') no-repeat 
scroll left center;
@@ -50,9 +51,64 @@
min-width: 150px;
 }
 
+.uls-title-region a {
+   padding-left: 15px;
+}
+.uls-menu .uls-title {
+   font-weight: normal;
+   border: none;
+   padding-left: 15px;
+   font-size: 18pt;
+   line-height: 1.25em;
+   color: #555;
+}
+.uls-menu .uls-no-results-found-title {
+   font-size: 16pt;
+   font-weight: bold;
+   line-height: 1.5em;
+   padding-left: 6px;
+   padding-top: 10px;
+   margin-top: 0;
+   margin-bottom: 15px;
+   border-bottom: none;
+   color: #555;
+}
+.uls-menu .uls-lcd-region-section .uls-lcd-region-title {
+   color: #777;
+   font-size: 14pt;
+   font-weight: lighter;
+   line-height: 1.5em;
+   padding-left: 0;
+   margin-top: 0;
+   margin-bottom: 10px;
+   border-bottom: none;
+}
+div.uls-region {
+   cursor: pointer;
+   padding: 0;
+   margin: 0;
+   height: 120px;
+   border-bottom-color: transparent;
+   border-bottom-style: solid;
+   border-bottom-width: 2px;
+}
+
+.uls-region a {
+   bottom: 2px;
+   left: 2px;
+   padding: 0;
+   position: absolute;
+   font-size: 13px;
+   line-height: 1.2em;
+   text-decoration: none;
+   overflow: hidden;
+   text-overflow: ellipsis;
+   width: 99%;
+}
+
 .uls-search {
background-color: white;
-   padding: 5px 16px;
+   padding: 5px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #DDD;
@@ -65,7 +121,7 @@
 /* Make space for magnifying class on the front */
 .uls-search-wrapper {
position: relative;
-   padding-left: 44px;
+   padding-left: 40px;
margin-right: 5px;
height: 32px;
 }
@@ -75,10 +131,10 @@
background-image: -webkit-linear-gradient(transparent, transparent), 
url('../images/search.svg');
/* @embed */
background-image: linear-gradient(transparent, transparent), 
url('../images/search.svg');
-   background-size: 20px;
+   background-size: 28px;
background-position: center center;
height: 32px;
-   width: 44px;
+   width: 40px;
display: block;
position: absolute;
left: 0;
@@ -91,7 +147,7 @@
 
 /* There are two input boxes. This class applies to both of them */
 .uls-filterinput {
-   font-size: 16px;
+   font-size: 18px;
height: 32px;
width: 100%;
/* For the custom clear (X) icon */
diff --git a/lib/jquery.uls/css/jquery.uls.lcd.css 
b/lib/jquery.uls/css/jquery.uls.lcd.css
index 529b8bc..d35fc19 100644
--- a/lib/jquery.uls/css/jquery.uls.lcd.css
+++ b/lib/jquery.uls/css/jquery.uls.lcd.css
@@ -1,12 +1,13 @@
-/*
- * Language Category Display (LCD) consists of multiple sections:
- * - one to display when there are no search results (which might display 
suggested languages)
- * - one for each region of the world, plus regions for world languages and 
suggested languages
- * The regions consist of one or more rows (blocks) which consist of 
one-to-four columns. Each
- * column is an ul element, and contains up to 8 li elements, each containing 
a link.
- */
+.uls-lcd-region-section ul li:hover {
+   background-color: #eaeff7;
+}
 
-.uls-lcd {
+.uls-lcd-region-section {
+   margin-top: 10px;
+}
+
+/* Language list */
+.uls-language-list {
 

[MediaWiki-commits] [Gerrit] mediawiki...UserMerge[master]: Cleanup LBFactory code and use commitAndWaitForReplication()

2016-09-06 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Cleanup LBFactory code and use commitAndWaitForReplication()
..

Cleanup LBFactory code and use commitAndWaitForReplication()

Change-Id: Iec6dd9493447ef7d1ef26a7e0c8f483a105cf192
---
M MergeUser.php
1 file changed, 6 insertions(+), 3 deletions(-)


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

diff --git a/MergeUser.php b/MergeUser.php
index cc2ea99..9c0791a 100755
--- a/MergeUser.php
+++ b/MergeUser.php
@@ -1,4 +1,5 @@
 getDBLoadBalancerFactory();
+   $ticket = $lbFactory->getEmptyTransactionTicket( __METHOD__ );
 
$this->deduplicateWatchlistEntries( $dbw );
$this->mergeBlocks( $dbw );
@@ -281,8 +283,9 @@
$options
);
}
-   $lbFactory->commitMasterChanges( 
__METHOD__ );
-   wfWaitForSlaves( $checkSince, false, 
'*' );
+   // Wait for replication to catch up
+   $opts = [ 'ifWritesSince' => 
$checkSince ];
+   
$lbFactory->commitAndWaitForReplication( __METHOD__, $ticket, $opts );
} while ( count( $keyValues ) >= $limit );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec6dd9493447ef7d1ef26a7e0c8f483a105cf192
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserMerge
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: filecache: Remove unused ObjectFileCache class

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

Change subject: filecache: Remove unused ObjectFileCache class
..


filecache: Remove unused ObjectFileCache class

This was originally intended for use by ResourceLoader but it was
incomplete and not actually used by ResourceLoader at first.

Then 93d358cd added support for FileCache to ResourceLoader with
a separate ResourceFileCache class.

Also fixed typo in HTMLFileCache from 6559b8bf.

ObjectFileCache is not mentioned anywhere else in Wikimedia Git.

Change-Id: I69cca27ee7cd922da12f1793660432709c273be6
---
M autoload.php
M includes/cache/HTMLFileCache.php
D includes/cache/ObjectFileCache.php
3 files changed, 3 insertions(+), 56 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 0c63ba5..71f1809 100644
--- a/autoload.php
+++ b/autoload.php
@@ -981,7 +981,6 @@
'ORAResult' => __DIR__ . '/includes/db/DatabaseOracle.php',
'ObjectCache' => __DIR__ . '/includes/objectcache/ObjectCache.php',
'ObjectFactory' => __DIR__ . '/includes/libs/ObjectFactory.php',
-   'ObjectFileCache' => __DIR__ . '/includes/cache/ObjectFileCache.php',
'OldChangesList' => __DIR__ . '/includes/changes/OldChangesList.php',
'OldLocalFile' => __DIR__ . '/includes/filerepo/file/OldLocalFile.php',
'OracleInstaller' => __DIR__ . 
'/includes/installer/OracleInstaller.php',
diff --git a/includes/cache/HTMLFileCache.php b/includes/cache/HTMLFileCache.php
index ea2e20b..1bab0f5 100644
--- a/includes/cache/HTMLFileCache.php
+++ b/includes/cache/HTMLFileCache.php
@@ -30,13 +30,13 @@
  */
 class HTMLFileCache extends FileCacheBase {
/**
-* Construct an ObjectFileCache from a Title and an action
+* Construct an HTMLFileCache object from a Title and an action
+*
+* @deprecated since 1.24, instantiate this class directly
 * @param Title|string $title Title object or prefixed DB key string
 * @param string $action
 * @throws MWException
 * @return HTMLFileCache
-*
-* @deprecated Since 1.24, instantiate this class directly
 */
public static function newFromTitle( $title, $action ) {
return new self( $title, $action );
diff --git a/includes/cache/ObjectFileCache.php 
b/includes/cache/ObjectFileCache.php
deleted file mode 100644
index c7ef044..000
--- a/includes/cache/ObjectFileCache.php
+++ /dev/null
@@ -1,52 +0,0 @@
-http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Cache
- */
-
-/**
- * Object cache in the file system.
- *
- * @ingroup Cache
- */
-class ObjectFileCache extends FileCacheBase {
-   /**
-* Construct an ObjectFileCache from a key and a type
-* @param string $key
-* @param string $type
-* @return ObjectFileCache
-*/
-   public static function newFromKey( $key, $type ) {
-   $cache = new self();
-
-   $cache->mKey = (string)$key;
-   $cache->mType = (string)$type;
-
-   return $cache;
-   }
-
-   /**
-* Get the base file cache directory
-* @return string
-*/
-   protected function cacheDirectory() {
-   return $this->baseCacheDirectory() . '/object';
-   }
-}

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: Generate invoke source and click position aggregates

2016-09-06 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Generate invoke source and click position aggregates
..


Generate invoke source and click position aggregates

To be added to search metrics dashboard

Bug: T143726
Change-Id: Ib4fde72c1d3a898eab9256be89409790ff34afcd
---
M search/app.R
1 file changed, 34 insertions(+), 15 deletions(-)

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



diff --git a/search/app.R b/search/app.R
index c82f0bf..553309c 100644
--- a/search/app.R
+++ b/search/app.R
@@ -6,7 +6,7 @@
 main <- function(date = NULL){
 
   # Retrieve data using the query builder in ./common.R
-  data <- rbind(wmf::build_query(fields = "SELECT SUBSTRING(timestamp, 1, 8) 
AS date,
+  data1 <- wmf::build_query(fields = "SELECT SUBSTRING(timestamp, 1, 8) AS 
date,
CASE event_action WHEN 'click' THEN 'clickthroughs'
WHEN 'start' THEN 'search sessions'
WHEN 'results' THEN 'Result pages opened' END AS 
action,
@@ -14,29 +14,46 @@
userAgent",
date = date,
table = "MobileWikiAppSearch_10641988",
-   conditionals = "event_action IN 
('click','start','results')"),
-wmf::build_query(fields = "SELECT SUBSTRING(timestamp, 1, 8) 
AS date,
+   conditionals = "event_action IN 
('click','start','results')")
+  data2 <- wmf::build_query(fields = "SELECT SUBSTRING(timestamp, 1, 8) AS 
date,
CASE event_action WHEN 'click' THEN 'clickthroughs'
WHEN 'start' THEN 'search sessions'
WHEN 'results' THEN 'Result pages opened' END AS 
action,
event_timeToDisplayResults AS load_time,
-   userAgent",
+   userAgent,
+  event_source AS 
invoke_source,
+  event_position AS 
click_position",
date = date,
table = "MobileWikiAppSearch_15729321",
-   conditionals = "event_action IN 
('click','start','results')"))
+   conditionals = "event_action IN 
('click','start','results')")
   # See https://phabricator.wikimedia.org/T143447 for more info on why we're 
combining
   # events from these two different schema revisions.
-  data <- data.table::as.data.table(data)
-  data$date <- lubridate::ymd(data$date)
-  data$platform[grepl(x = data$userAgent, pattern = "Android", fixed = TRUE)] 
<- "Android"
-  data$platform[is.na(data$platform)] <- "iOS"
-  data <- data[,userAgent := NULL,]
-
+  data1 <- data.table::as.data.table(rbind(data1, data2[,!(names(data2) %in% 
c("invoke_source", "click_position"))]))
+  data1$date <- lubridate::ymd(data1$date)
+  data1$platform[grepl(x = data1$userAgent, pattern = "Android", fixed = 
TRUE)] <- "Android"
+  data1$platform[is.na(data1$platform)] <- "iOS"
+  data1 <- data1[,userAgent := NULL,]
+  
+  data2 <- data.table::as.data.table(data2)
+  data2$date <- lubridate::ymd(data2$date)
+  data2$platform[grepl(x = data2$userAgent, pattern = "Android", fixed = 
TRUE)] <- "Android"
+  data2$platform[is.na(data2$platform)] <- "iOS"
+  data2 <- data2[,c("userAgent","load_time"):=NULL,]
+  
   # Generate aggregates
-  app_results <- data[,j = list(events = .N), by = c("date", "action", 
"platform")]
-
+  app_results <- data1[,j = list(events = .N), by = c("date", "action", 
"platform")]  
+  data2$click_position <- as.numeric(data2$click_position)+1
+  data2$click_position <- ifelse(data2$click_position>=10 & 
data2$click_position<20, '10-19', 
+ifelse(data2$click_position>=20 & 
data2$click_position <=100, '20-100',
+   
ifelse(data2$click_position>100, '100+', data2$click_position)))

+  position_count <- data2[action=='clickthroughs', j = list(events = .N), by = 
c("date","click_position")]
+  source_count <- data2[action=='search sessions', j = list(events = .N), by = 
c("date","invoke_source")]
+  source_count$invoke_source <- dplyr::recode(source_count$invoke_source, 
+   '0'='Main article toolbar', 
'1'='Widget', '2'='Share intent','3'='Process-text intent',
+   
'4'='Floating search bar in the feed', '5'='Voice search query')
+  
   # Produce load time data
-  load_times <- data[data$action == "Result pages opened", {
+  load_times <- data1[data1$action == "Result pages opened", {
 output <- data.frame(t(quantile(load_time, c(0.5, 0.95, 0.99
 

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Drop and re-create the index

2016-09-06 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review.

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

Change subject: Drop and re-create the index
..

Drop and re-create the index

MySQL will give an error if you just change to a blob
Error: 1170 BLOB/TEXT column 'ref_target' used in key specification without 
a key length

Bug: T110446
Change-Id: Icfc080768005a314970498e94861a1ab9c068549
---
M db_patches/patch-ref_target_not_null.sql
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/db_patches/patch-ref_target_not_null.sql 
b/db_patches/patch-ref_target_not_null.sql
index da88d32..eb84e5f 100644
--- a/db_patches/patch-ref_target_not_null.sql
+++ b/db_patches/patch-ref_target_not_null.sql
@@ -1 +1,4 @@
+ALTER TABLE /*_*/flow_ext_ref DROP KEY flow_ext_ref_idx_v2;
 ALTER TABLE /*_*/flow_ext_ref CHANGE ref_target ref_target BLOB NOT NULL;
+CREATE INDEX /*i*/flow_ext_ref_idx_v2 ON /*_*/flow_ext_ref
+   (ref_src_wiki, ref_src_namespace, ref_src_title, ref_type, 
ref_target(255), ref_src_object_type, ref_src_object_id);

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: filecache: Remove unused ObjectFileCache class

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

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

Change subject: filecache: Remove unused ObjectFileCache class
..

filecache: Remove unused ObjectFileCache class

This was originally intended for use by ResourceLoader but it was
incomplete and not actually used by ResourceLoader at first.

Then 93d358cd added support for FileCache to ResourceLoader with
a separate ResourceFileCache class.

Also fixed typo in HTMLFileCache from 6559b8bf.

ObjectFileCache is not mentioned anywhere else in Wikimedia Git.

Change-Id: I69cca27ee7cd922da12f1793660432709c273be6
---
M autoload.php
M includes/cache/HTMLFileCache.php
D includes/cache/ObjectFileCache.php
3 files changed, 3 insertions(+), 56 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/308911/1

diff --git a/autoload.php b/autoload.php
index 0c63ba5..71f1809 100644
--- a/autoload.php
+++ b/autoload.php
@@ -981,7 +981,6 @@
'ORAResult' => __DIR__ . '/includes/db/DatabaseOracle.php',
'ObjectCache' => __DIR__ . '/includes/objectcache/ObjectCache.php',
'ObjectFactory' => __DIR__ . '/includes/libs/ObjectFactory.php',
-   'ObjectFileCache' => __DIR__ . '/includes/cache/ObjectFileCache.php',
'OldChangesList' => __DIR__ . '/includes/changes/OldChangesList.php',
'OldLocalFile' => __DIR__ . '/includes/filerepo/file/OldLocalFile.php',
'OracleInstaller' => __DIR__ . 
'/includes/installer/OracleInstaller.php',
diff --git a/includes/cache/HTMLFileCache.php b/includes/cache/HTMLFileCache.php
index ea2e20b..1bab0f5 100644
--- a/includes/cache/HTMLFileCache.php
+++ b/includes/cache/HTMLFileCache.php
@@ -30,13 +30,13 @@
  */
 class HTMLFileCache extends FileCacheBase {
/**
-* Construct an ObjectFileCache from a Title and an action
+* Construct an HTMLFileCache object from a Title and an action
+*
+* @deprecated since 1.24, instantiate this class directly
 * @param Title|string $title Title object or prefixed DB key string
 * @param string $action
 * @throws MWException
 * @return HTMLFileCache
-*
-* @deprecated Since 1.24, instantiate this class directly
 */
public static function newFromTitle( $title, $action ) {
return new self( $title, $action );
diff --git a/includes/cache/ObjectFileCache.php 
b/includes/cache/ObjectFileCache.php
deleted file mode 100644
index c7ef044..000
--- a/includes/cache/ObjectFileCache.php
+++ /dev/null
@@ -1,52 +0,0 @@
-http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Cache
- */
-
-/**
- * Object cache in the file system.
- *
- * @ingroup Cache
- */
-class ObjectFileCache extends FileCacheBase {
-   /**
-* Construct an ObjectFileCache from a key and a type
-* @param string $key
-* @param string $type
-* @return ObjectFileCache
-*/
-   public static function newFromKey( $key, $type ) {
-   $cache = new self();
-
-   $cache->mKey = (string)$key;
-   $cache->mType = (string)$type;
-
-   return $cache;
-   }
-
-   /**
-* Get the base file cache directory
-* @return string
-*/
-   protected function cacheDirectory() {
-   return $this->baseCacheDirectory() . '/object';
-   }
-}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Treat list items as inline

2016-09-06 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Treat list items as inline
..

Treat list items as inline

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


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

diff --git a/resources/skins.minerva.base.styles/images.less 
b/resources/skins.minerva.base.styles/images.less
index f594c3a..a9cdfee 100644
--- a/resources/skins.minerva.base.styles/images.less
+++ b/resources/skins.minerva.base.styles/images.less
@@ -7,6 +7,8 @@
 .lazy-image-placeholder {
// If the placeholder itself is inside an inline element do not use 
block
// See https://phabricator.wikimedia.org/T143558
+   // and https://phabricator.wikimedia.org/T144567
+   li &,
span & {
display: inline;
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Improve handling of images without dimensions

2016-09-06 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Improve handling of images without dimensions
..

Improve handling of images without dimensions

Currently these are loading unconditionally.
Instead of testing height we should check if the section it is
contained in is visible since we know this is display: block

Bug: T144734
Change-Id: I7609ed08dee4b63ac9e9d1b74cce2c46a12aec2c
---
M resources/mobile.startup/Skin.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js
index 783c8ae..98fd586 100644
--- a/resources/mobile.startup/Skin.js
+++ b/resources/mobile.startup/Skin.js
@@ -222,8 +222,8 @@
if (

mw.viewport.isElementCloseToViewport( placeholder, offset ) &&
// If a placeholder is an 
inline element without a height attribute set it will record as hidden
-   // to circumvent this we also 
need to test the height (see T143768).
-   ( $placeholder.is( ':visible' ) 
|| $placeholder.height() === 0 )
+   // to circumvent this we also 
need to check if the containing block (if any) is visible
+   ( $placeholder.is( ':visible' ) 
|| $placeholder.parents( '.collapsible-block' ).is( ':visible' ) )
) {
self.loadImage( $placeholder );
return false;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: Delete puppetvar stuff

2016-09-06 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Delete puppetvar stuff
..

Delete puppetvar stuff

Bug: T101447
Change-Id: I0c850263bcde2e6f5c1b73137f596a4eae4e9ea1
---
M OpenStackManager.php
M i18n/en.json
M nova/OpenStackNovaHost.php
M nova/OpenStackNovaInstance.php
M nova/OpenStackNovaPrivateHost.php
M nova/OpenStackNovaPuppetGroup.php
M openstack.sql
M special/SpecialNovaInstance.php
M special/SpecialNovaPuppetGroup.php
9 files changed, 15 insertions(+), 523 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager 
refs/changes/08/308908/1

diff --git a/OpenStackManager.php b/OpenStackManager.php
index fa62101..d633c73 100644
--- a/OpenStackManager.php
+++ b/OpenStackManager.php
@@ -114,11 +114,10 @@
'expiry' => '86400',
'minimum' => '7200'
);
-// Default classes and variables to apply to instances when created
+// Default classes to apply to instances when created
 $wgOpenStackManagerPuppetOptions = array(
'enabled' => false,
-   'defaultclasses' => array(),
-   'defaultvariables' => array()
+   'defaultclasses' => array()
);
 // User data to inject into instances when created
 $wgOpenStackManagerInstanceUserData = array(
diff --git a/i18n/en.json b/i18n/en.json
index ca6e793..af23795 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -370,15 +370,6 @@
"openstackmanager-modifypuppetgroup": "Modify Puppet group",
"openstackmanager-modifiedpuppetgroup": "Modified Puppet group.",
"openstackmanager-failedtomodifypuppetgroup": "Failed to modify Puppet 
group.",
-   "openstackmanager-puppetvars": "Variables",
-   "openstackmanager-addpuppetvar": "Add variable",
-   "openstackmanager-puppetvarname": "Variable name",
-   "openstackmanager-puppetvarposition": "Variable position",
-   "openstackmanager-addedpuppetvar": "Added Puppet variable.",
-   "openstackmanager-failedtoaddpuppetvar": "Failed to add Puppet 
variable.",
-   "openstackmanager-modifypuppetvar": "Modify Puppet variable",
-   "openstackmanager-modifiedpuppetvar": "Modified Puppet variable.",
-   "openstackmanager-failedtomodifypuppetvar": "Failed to modify Puppet 
variable.",
"openstackmanager-puppetgroupname": "Puppet group name",
"openstackmanager-puppetgroupposition": "Puppet group position",
"openstackmanager-modifypuppetclass": "Modify Puppet class",
@@ -390,10 +381,6 @@
"openstackmanager-removepuppetclassconfirm": "Are you sure you would 
like to delete this Puppet class?",
"openstackmanager-deletedpuppetclass": "Deleted Puppet class.",
"openstackmanager-failedtodeletepuppetclass": "Failed to delete Puppet 
class.",
-   "openstackmanager-removepuppetvar": "Delete Puppet variable",
-   "openstackmanager-removepuppetvarconfirm": "Are you sure you would like 
to delete this Puppet variable?",
-   "openstackmanager-deletedpuppetvar": "Deleted Puppet variable.",
-   "openstackmanager-failedtodeletepuppetvar": "Failed to delete Puppet 
variable.",
"openstackmanager-email-subject": "Your instance is ready to be logged 
into.",
"openstackmanager-email-body": "The following instance has been 
created, and is ready to be logged into:",
"openstackmanager-twofactorrequired": "Two-factor authentication 
required",
diff --git a/nova/OpenStackNovaHost.php b/nova/OpenStackNovaHost.php
index 438e561..d2963b2 100644
--- a/nova/OpenStackNovaHost.php
+++ b/nova/OpenStackNovaHost.php
@@ -336,25 +336,11 @@
foreach ( 
$wgOpenStackManagerPuppetOptions['defaultclasses'] as $class ) {
$hostEntry['puppetclass'][] = $class;
}
-   foreach ( 
$wgOpenStackManagerPuppetOptions['defaultvariables'] as $variable => $value ) {
-   $hostEntry['puppetvar'][] = $variable . '=' . 
$value;
-   }
-   if ( $puppetinfo ) {
-   if ( isset( $puppetinfo['classes'] ) ) {
-   foreach ( $puppetinfo['classes'] as 
$class ) {
-   $hostEntry['puppetclass'][] = 
$class;
-   }
-   }
-   if ( isset( $puppetinfo['variables'] ) ) {
-   foreach ( $puppetinfo['variables'] as 
$variable => $value ) {
-   if ( $value ) {
-   
$hostEntry['puppetvar'][] = $variable . '=' . $value;
-   }
-   }
+   if ( $puppetinfo && isset( $puppetinfo['classes'] ) ) {
+

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Switch from NWE to VE using 'Edit' tab

2016-09-06 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Switch from NWE to VE using 'Edit' tab
..

Switch from NWE to VE using 'Edit' tab

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


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index 5fa6bfa..cd4efb7 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -570,6 +570,13 @@
if ( isLoading ) {
return;
}
+   if ( active ) {
+   targetPromise.done( function ( target ) {
+   if ( target.mode === 'source' ) {
+   target.switchToVisualEditor();
+   }
+   } );
+   }
init.activateVe( 'visual' );
},
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...latex_renderer[master]: Add `\FloatBarrier`s after articles

2016-09-06 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Add `\FloatBarrier`s after articles
..

Add `\FloatBarrier`s after articles

 * For a book like enwiki/User:DennisDaniels/Books/Medical_Laboratory_Basics
   the user is setting their own chapters so the page doesn't have a
   chance to clear for a long while.

 * There's a large picture on https://en.wikipedia.org/wiki/Pipette
   https://en.wikipedia.org/wiki/Pipette#/media/File:Vollpipetten.jpg
   that wants to take up an entire column and so never gets a chance to
   be inserted and all kinds of figures pile up behind it (58, where the
   max latex allows is 52) and we eventually crash with,
   "! LaTeX Error: Too many unprocessed floats."

 * Flushing floats after articles seems like a safe way to prevent this,
   although maybe handling of large images like that should be improved.

 * Also note that the bundler -c flag doesn't generate a metabook.json
   with the chapters the user inserted, so debugging this took a bit of
   time to find out why it didn't crash for me locally.

Change-Id: I54cc82cefdabf0656d456d485288a329f29b10c3
---
M lib/index.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
 refs/changes/06/308906/1

diff --git a/lib/index.js b/lib/index.js
index 5eacdb8..0fddb63 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -90,7 +90,7 @@
'',
'\\documentclass[10pt,twocolumn,twoside,fleqn]{article}',
'\\pagestyle{headings}',
-   '\\usepackage{fontspec, xunicode, polyglossia, graphicx, xltxtra}',
+   '\\usepackage{fontspec, xunicode, polyglossia, graphicx, xltxtra, 
placeins}',
'\\usepackage{amsmath,amsthm,amstext,amssymb}',
// Allow list nesting deeper than 4
// See: 
http://stackoverflow.com/questions/1935952/maximum-nesting-level-of-lists-in-latex
@@ -1931,6 +1931,7 @@
visitor.visit(document.body);
visitor.usedLanguages.forEach(function(l) { 
usedLanguages.add(l); });
format.paragraphBreak();
+   format._writeRaw('\\FloatBarrier\n');
return format.flush().then(function() {
return P.call(format.stream.end, format.stream, 
'');
});

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54cc82cefdabf0656d456d485288a329f29b10c3
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: pybal: Fix optional parameter listed before required parameter

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

Change subject: pybal: Fix optional parameter listed before required parameter
..


pybal: Fix optional parameter listed before required parameter

Bug: T93645
Change-Id: I09cc342039205b3efa9ab2d511bca2abadf23445
---
M modules/pybal/manifests/configuration.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/pybal/manifests/configuration.pp 
b/modules/pybal/manifests/configuration.pp
index e941b06..de7882f 100644
--- a/modules/pybal/manifests/configuration.pp
+++ b/modules/pybal/manifests/configuration.pp
@@ -1,9 +1,9 @@
 class pybal::configuration(
-$global_options={},
 $lvs_services,
 $lvs_class_hosts,
 $site,
 $config='http',
+$global_options={},
 $config_host="config-master.${site}.wmnet",
 ) {
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09cc342039205b3efa9ab2d511bca2abadf23445
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ZeroBanner[master]: Remove outdated CSS selectors

2016-09-06 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Remove outdated CSS selectors
..

Remove outdated CSS selectors

None of these css selectors do anything.
They relate to old class names that no longer exist in
MobileFrontend.

Change-Id: I5360272638a2e2883a29ceb8008919fc29bfce12
---
M modules/interstitial.js
M modules/redux.less
2 files changed, 2 insertions(+), 31 deletions(-)


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

diff --git a/modules/interstitial.js b/modules/interstitial.js
index 2dc60ae..bdce6d1 100644
--- a/modules/interstitial.js
+++ b/modules/interstitial.js
@@ -21,13 +21,6 @@
};
} )();
 
-   $( '#page-secondary-actions' ).find( '.languageSelector' 
).off();
-
-   if ( isMdot ) {
-   /* CSS isn't working for this element, and !important 
breaks stuff */
-   $( '.icon-settings' ).show();
-   }
-
/*
In the future state with ESI, we may need to revisit approach.
But for now, we'll have Varnish send a cookie.
@@ -35,24 +28,7 @@
the config API as a last resort.
*/
if ( settings.get( 'zerodontask', true ) ) {
-   $( '.icon-watchlist,.icon-loginout,#page-actions' 
).show();
-   $( '.hlist > li:not(.new)' ).css( 'display', 
'inline-block' );
-   if ( !isMdot ) {
-   /* the previous display: inline-block needs a 
tweak */
-   $( '#ca-upload' ).hide();
-   } else {
-   /*
-FIXME: jdlrobson in change 83133 - "Maybe 
MobileFrontend can make this
-easier by marking these links with a shared 
class so you can do something
-like $( '.httpsLink' ).show();"
-*/
-   $( '.icon-uploads,#ca-upload' ).show();
-   }
-   // Theoretically, cookies could be turned off, but it's 
unlikely.
-   // We decided to avoid hitting the API in this case.
-   } else {
-   /* We should avoid !important for these */
-   $( '.icon-uploads,.edit-page' ).hide();
+   $( '#page-actions' ).show();
}
 
// Disable other click event handlers for images/thumbnails, 
for example, the
diff --git a/modules/redux.less b/modules/redux.less
index 81bc7d9..851bbe1 100644
--- a/modules/redux.less
+++ b/modules/redux.less
@@ -18,12 +18,7 @@
 turn them back on when using !important,
 per http://api.jquery.com/show/.
 */
-.icon-settings,
-.icon-uploads,
-.icon-watchlist,
-.icon-loginout,
 .edit-page,
-#page-actions,
-#ca-upload {
+#page-actions {
   display:none;
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: lvs: Fix optional parameter listed before required parameter

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

Change subject: lvs: Fix optional parameter listed before required parameter
..


lvs: Fix optional parameter listed before required parameter

Bug: T93645
Change-Id: Ie946603eee038ac642501cdf559a75c0cb70b9c8
---
M modules/lvs/manifests/balancer.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/lvs/manifests/balancer.pp 
b/modules/lvs/manifests/balancer.pp
index 3e7f81a..3300f74 100644
--- a/modules/lvs/manifests/balancer.pp
+++ b/modules/lvs/manifests/balancer.pp
@@ -8,11 +8,11 @@
 #   - $pybal_global_options: A configuration hash of PyBal global options
 #   - $site: Site name used in PyBal configuration
 class lvs::balancer(
-$service_ips=[],
 $lvs_services,
 $lvs_class_hosts,
 $pybal_global_options,
-$site
+$site,
+$service_ips=[]
 ) {
 
 include pybal

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie946603eee038ac642501cdf559a75c0cb70b9c8
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Update doc comment on mediawiki::packages::php5

2016-09-06 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Update doc comment on mediawiki::packages::php5
..

Update doc comment on mediawiki::packages::php5

Only 2 years out of date ;-)

Change-Id: I72cee49a64972d2e3e3755ee217a1f955bf45cd3
---
M modules/mediawiki/manifests/packages/php5.pp
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/modules/mediawiki/manifests/packages/php5.pp 
b/modules/mediawiki/manifests/packages/php5.pp
index 4dbf33b..c6203da 100644
--- a/modules/mediawiki/manifests/packages/php5.pp
+++ b/modules/mediawiki/manifests/packages/php5.pp
@@ -1,9 +1,8 @@
 # === Class mediawiki::packages::php5
 #
 # This class declares packages that make up Wikimedia's PHP5-based
-# MediaWiki deployment stack. As of August 2014, this is the most common
-# configuration in production, but new installs are configured for HHVM
-# instead.
+# MediaWiki deployment stack. As of August 2016, most installs are
+# configured for HHVM, but a few are still using PHP5 (T86081).
 #
 class mediawiki::packages::php5 {
 requires_os('ubuntu >= trusty || Debian >= jessie')

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set User namespace aliases on sk.wikipedia

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

Change subject: Set User namespace aliases on sk.wikipedia
..


Set User namespace aliases on sk.wikipedia

Default Slovak language MediaWiki localisation offers
Užívateľ as the canonical User namespace name.

We apply this standard default name also on sk.wikipedia.

This is a follow-up for cdadfad241b8.

Bug: T143472
Change-Id: I5e3cadd8b43ae7948b15bab12cd13b056c0cc194
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c7284aa..1864c5c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -3640,6 +3640,10 @@
'+siwiktionary' => [
'Wiktionary_talk' => NS_PROJECT_TALK,
],
+   '+skwiki' => [
+   'Užívateľ' => NS_USER, // T143472
+   'Diskusia_s_užívateľom' => NS_USER_TALK,
+   ],
'+skwikibooks' => [
'Wikibooks_talk' => NS_PROJECT_TALK,
],

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Kill references to $::instancename

2016-09-06 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Kill references to $::instancename
..

Kill references to $::instancename

Bug: T101447
Change-Id: I954ac93e29f80e22bebe73a5804b07338dd2
---
M hieradata/labs/deployment-prep/common.yaml
M modules/base/manifests/environment.pp
M modules/role/manifests/ci/slave/labs/common.pp
M modules/role/manifests/racktables/server.pp
4 files changed, 8 insertions(+), 10 deletions(-)


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

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index c143946..5702c9d 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -126,7 +126,7 @@
 "varnish::packages::version": latest
 "keyholder::trusted_groups":
- wikidev
-"base::environment::core_dump_pattern": 
'/data/project/cores/%{::instancename}-core.%h.%e.%p.%t'
+"base::environment::core_dump_pattern": 
'/data/project/cores/%{::hostname}-core.%h.%e.%p.%t'
 
 # T100509 Java7 on gallium does not support the hardned sshd MAC and KEX setup
 # causing slaves to be unreacheable.
diff --git a/modules/base/manifests/environment.pp 
b/modules/base/manifests/environment.pp
index 48bde33..3599a92 100644
--- a/modules/base/manifests/environment.pp
+++ b/modules/base/manifests/environment.pp
@@ -50,13 +50,11 @@
 group   => 'root',
 mode=> '0644',
 }
-if( $::instancename ) {
-file { '/etc/wmflabs-instancename':
-owner   => 'root',
-group   => 'root',
-mode=> '0444',
-content => "${::instancename}\n",
-}
+file { '/etc/wmflabs-instancename':
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+content => "${::hostname}\n",
 }
 if( $::labsproject ) {
 file { '/etc/wmflabs-project':
diff --git a/modules/role/manifests/ci/slave/labs/common.pp 
b/modules/role/manifests/ci/slave/labs/common.pp
index 0d2b08e..19ecaf0 100644
--- a/modules/role/manifests/ci/slave/labs/common.pp
+++ b/modules/role/manifests/ci/slave/labs/common.pp
@@ -66,7 +66,7 @@
 settings => {
 'user' => {
 'name'  => 'Wikimedia Jenkins Deploy',
-'email' => 
"jenkins-deploy@${::instancename}.${::site}.wmflabs",
+'email' => "jenkins-deploy@${::fqdn}",
 },  # end of [user] section
 },  # end of settings
 require  => File['/mnt/home/jenkins-deploy'],
diff --git a/modules/role/manifests/racktables/server.pp 
b/modules/role/manifests/racktables/server.pp
index 63e7db4..e8e051a 100644
--- a/modules/role/manifests/racktables/server.pp
+++ b/modules/role/manifests/racktables/server.pp
@@ -14,7 +14,7 @@
 # be flexible about labs vs. prod
 case $::realm {
 'labs': {
-$racktables_host = "${::instancename}.${::domain}"
+$racktables_host = $::fqdn
 }
 'production': {
 $racktables_host = 'racktables.wikimedia.org'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I954ac93e29f80e22bebe73a5804b07338dd2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set User namespace aliases on sk.wikipedia

2016-09-06 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Set User namespace aliases on sk.wikipedia
..

Set User namespace aliases on sk.wikipedia

Default Slovak language MediaWiki localisation offers
Užívateľ as the canonical User namespace name.

We apply this standard default name also on sk.wikipedia.

This is a follow-up for cdadfad241b8.

Bug: T143472
Change-Id: I5e3cadd8b43ae7948b15bab12cd13b056c0cc194
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c7284aa..1864c5c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -3640,6 +3640,10 @@
'+siwiktionary' => [
'Wiktionary_talk' => NS_PROJECT_TALK,
],
+   '+skwiki' => [
+   'Užívateľ' => NS_USER, // T143472
+   'Diskusia_s_užívateľom' => NS_USER_TALK,
+   ],
'+skwikibooks' => [
'Wikibooks_talk' => NS_PROJECT_TALK,
],

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: statsd_proxy: Fix optional parameter listed before required ...

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

Change subject: statsd_proxy: Fix optional parameter listed before required 
parameter
..


statsd_proxy: Fix optional parameter listed before required parameter

Bug: T93645
Change-Id: I8bc0529c0e4e15df4d13ec483ae38241954c0b1f
---
M modules/statsd_proxy/manifests/init.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/statsd_proxy/manifests/init.pp 
b/modules/statsd_proxy/manifests/init.pp
index 69d0719..0a2f98e 100644
--- a/modules/statsd_proxy/manifests/init.pp
+++ b/modules/statsd_proxy/manifests/init.pp
@@ -26,10 +26,10 @@
 #  }
 #
 class statsd_proxy(
-$ensure = present,
-$threads = 4,
 $server_port,
 $backend_ports,
+$ensure = present,
+$threads = 4,
 ) {
 validate_ensure($ensure)
 validate_array($backend_ports)

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Feed endpoints: Allow the client to request aggregated parts

2016-09-06 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Feed endpoints: Allow the client to request aggregated parts
..


Feed endpoints: Allow the client to request aggregated parts

The individual feed endpoints do not throw errors if a request has been
made to the aggregated endpoint. Since RESTBase will be using the
individual endpoints by sending them requests in parallel and then
assembling the response, enable it to signal them that the response
should be in the same format as when the aggregated endpoint is
contacted by allowing the `aggregated` query flag to be passed in.

Note that, in production, this will be available only to RESTBase, if an
external client passes it in, RESTBase will remove it from the request
when forwarding it to MCS.

Bug: T143912
Change-Id: I3ba040853e36ca53ddbf5590afd0b4430cda5749
---
M lib/feed/featured-image.js
M lib/feed/featured.js
M lib/feed/most-read.js
M lib/feed/news.js
M routes/aggregated.js
5 files changed, 20 insertions(+), 12 deletions(-)

Approvals:
  BearND: Looks good to me, approved
  Mobrovac: Verified



diff --git a/lib/feed/featured-image.js b/lib/feed/featured-image.js
index 8a0b83b..93e9514 100644
--- a/lib/feed/featured-image.js
+++ b/lib/feed/featured-image.js
@@ -101,9 +101,11 @@
 && page.pageid + '/' + mwapi.getRevisionFromExtract(page);
 }
 
-function promise(app, req, dontThrow) {
+function promise(app, req) {
 dateUtil.validate(dateUtil.hyphenDelimitedDateString(req));
-return requestPictureOfTheDay(app, req.params.domain, 
dateUtil.getRequestedDate(req), dontThrow)
+var aggregated = !!req.query.aggregated;
+return requestPictureOfTheDay(app, req.params.domain,
+dateUtil.getRequestedDate(req), aggregated)
 .then(function (response) {
 mwapi.checkForQueryPagesInResponse(req, response);
 var page = getPageObject(response);
@@ -115,7 +117,7 @@
 };
 }).catch(function(err) {
 if (err.status === 504) {
-if (dontThrow) {
+if (aggregated) {
 return { payload: undefined, meta: undefined };
 }
 throw new HTTPError({
diff --git a/lib/feed/featured.js b/lib/feed/featured.js
index a3e697b..46e3772 100644
--- a/lib/feed/featured.js
+++ b/lib/feed/featured.js
@@ -71,10 +71,11 @@
 return extract;
 }
 
-function promise(app, req, dontThrow) {
+function promise(app, req) {
 dateUtil.validate(dateUtil.hyphenDelimitedDateString(req));
+var aggregated = !!req.query.aggregated;
 if (req.params.domain.indexOf('en') !== 0) {
-if (dontThrow) {
+if (aggregated) {
 return {};
 } else {
 throw new HTTPError({
diff --git a/lib/feed/most-read.js b/lib/feed/most-read.js
index b7d090a..a996ba8 100644
--- a/lib/feed/most-read.js
+++ b/lib/feed/most-read.js
@@ -22,7 +22,8 @@
 return result;
 }
 
-function getTopPageviews(app, req, aggregated) {
+function getTopPageviews(app, req) {
+var aggregated = !!req.query.aggregated;
 var yesterday = new Date(dateUtil.getRequestedDate(req) - 
dateUtil.ONE_DAY);
 var year = aggregated ? yesterday.getUTCFullYear() : req.params.;
 var month = aggregated ? dateUtil.pad(yesterday.getUTCMonth() + 1) : 
req.params.mm;
diff --git a/lib/feed/news.js b/lib/feed/news.js
index 6003724..081c268 100644
--- a/lib/feed/news.js
+++ b/lib/feed/news.js
@@ -35,10 +35,11 @@
 pushTitleIfNew(linkTitles, story, removeFragment(href.slice(1)));
 }
 
-function promise(app, req, dontThrow) {
+function promise(app, req) {
 var lang = req.params.domain.split('.')[0];
+var aggregated = !!req.query.aggregated;
 if (!newsTemplates[lang]) {
-if (dontThrow) {
+if (aggregated) {
 return { payload: undefined, meta: undefined };
 }
 throw new HTTPError({
diff --git a/routes/aggregated.js b/routes/aggregated.js
index afa3719..35afaee 100644
--- a/routes/aggregated.js
+++ b/routes/aggregated.js
@@ -32,12 +32,15 @@
  */
 router.get('/featured/:/:mm/:dd', function (req, res) {
 var dateString = dateUtil.dateStringFrom(req);
+// signal that this is a request for aggregated resources
+req.query = req.query || {};
+req.query.aggregated = true;
 return BBPromise.props({
-tfa: featured.promise(app, req, true),
-mostread: mostRead.promise(app, req, true),
+tfa: featured.promise(app, req),
+mostread: mostRead.promise(app, req),
 random: random.promise(app, req),
-news: news.promise(app, req, true),
-image: featuredImage.promise(app, req, true)
+news: news.promise(app, req),
+image: featuredImage.promise(app, req)
 }) .then(function (response) {
 var aggregate = {
 tfa: response.tfa.payload,

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

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Restore Redaktor namespace on sk.wikipedia

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

Change subject: Restore Redaktor namespace on sk.wikipedia
..


Restore Redaktor namespace on sk.wikipedia

Previously, the Redaktor namespace, a choice specific for sk.wikipedia,
was hardcoded in the general Slovak language localisation.

It was renamed to a more universal Užívateľ in 4f12dc25e773.

Meanwhile, for the sk.wikipedia specific configuration, we improved
the localisation of Redaktor / Redaktora by genre in 9e7831fc935a.

But the configuration never included Redaktor as the canonical User
namespace, so this namespace has been Užívateľ since 1.28.0-wmf.17.

This configuration change applies what should have been done from
the start instead of edit the core Slovak localisation: define
Redaktor as the canonical User namespace for sk.wikipedia.

Bug: T143472
Change-Id: Ic1f043159ed76fc4e45f96d45e5f935cf64786e7
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b2c5d36..c7284aa 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5289,6 +5289,8 @@
'shwiki' => [ 100 => 'Portal', 101 => 'Razgovor_o_portalu' ], // T32928
'siwiki' => [ 100 => 'ද්වාරය', 101 => 'ද්වාරය_සාකච්ඡාව' ], // T8435, 
T26936
'skwiki' => [
+   NS_USER => 'Redaktor', // T143472
+   NS_USER_TALK => 'Diskusia_s_redaktorom',
100 => 'Portál',
101 => 'Diskusia_k_portálu',
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1f043159ed76fc4e45f96d45e5f935cf64786e7
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Expand array to allow future changes

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

Change subject: Expand array to allow future changes
..


Expand array to allow future changes

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 95bf18c..b2c5d36 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5288,7 +5288,10 @@
],
'shwiki' => [ 100 => 'Portal', 101 => 'Razgovor_o_portalu' ], // T32928
'siwiki' => [ 100 => 'ද්වාරය', 101 => 'ද්වාරය_සාකච්ඡාව' ], // T8435, 
T26936
-   'skwiki' => [ 100 => 'Portál', 101 => 'Diskusia_k_portálu' ],
+   'skwiki' => [
+   100 => 'Portál',
+   101 => 'Diskusia_k_portálu',
+   ],
'slwiki' => [ 100 => 'Portal', 101 => 'Pogovor_o_portalu' ],
'sowiki' => [ 100 => 'Portal', 101 => 'Portal_talk' ], // T51600
'sqwiki' => [ 100 => 'Portal', 101 => 'Portal_diskutim' ],

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: lvs: Fix indentation of =>

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

Change subject: lvs: Fix indentation of =>
..


lvs: Fix indentation of =>

Bug: T93645
Change-Id: I42a704f38512a5e56f7d7fde3e1da170471e9432
---
M modules/lvs/manifests/balancer/runcommand.pp
1 file changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/modules/lvs/manifests/balancer/runcommand.pp 
b/modules/lvs/manifests/balancer/runcommand.pp
index 72f3786..2836c46 100644
--- a/modules/lvs/manifests/balancer/runcommand.pp
+++ b/modules/lvs/manifests/balancer/runcommand.pp
@@ -7,18 +7,18 @@
 file {
 '/etc/pybal/runcommand':
 ensure => directory,
-owner => root,
-group => root,
-mode => '0755';
+owner  => root,
+group  => root,
+mode   => '0755';
 '/etc/pybal/runcommand/check-apache':
-owner => root,
-group => root,
-mode => '0555',
+owner  => root,
+group  => root,
+mode   => '0555',
 source => "puppet:///modules/${module_name}/pybal/check-apache";
 '/root/.ssh/pybal-check':
-owner => root,
-group => root,
-mode => '0600',
+owner   => root,
+group   => root,
+mode=> '0600',
 content => secret('pybal/pybal-check');
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42a704f38512a5e56f7d7fde3e1da170471e9432
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Wikidata descriptions on all wikipedias

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

Change subject: Enable Wikidata descriptions on all wikipedias
..


Enable Wikidata descriptions on all wikipedias

Bug: T143345
Change-Id: I4a5183792e260d9155bf02e89905deb9a6661f04
---
M dblists/nowikidatadescriptiontaglines.dblist
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/dblists/nowikidatadescriptiontaglines.dblist 
b/dblists/nowikidatadescriptiontaglines.dblist
index 6c1b5cd..bad3a2f 100644
--- a/dblists/nowikidatadescriptiontaglines.dblist
+++ b/dblists/nowikidatadescriptiontaglines.dblist
@@ -1,8 +1,2 @@
-ruwiki
-frwiki
-dewiki
-eswiki
-jawiki
-enwiki
 mediawikiwiki
 metawiki
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a5183792e260d9155bf02e89905deb9a6661f04
Gerrit-PatchSet: 7
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Do not show Wikidata descriptions on meta or mediawiki.org

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

Change subject: Do not show Wikidata descriptions on meta or mediawiki.org
..


Do not show Wikidata descriptions on meta or mediawiki.org

Showing them in MediaWiki and Meta wiki is not entirely useful
https://meta.m.wikimedia.org/wiki/Steward_requests/Bot_status

Change-Id: Id18e8a4c31bba7142a5d30ad606c5c3aafa5bd5b
---
M dblists/nowikidatadescriptiontaglines.dblist
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/dblists/nowikidatadescriptiontaglines.dblist 
b/dblists/nowikidatadescriptiontaglines.dblist
index e2c80b9..6c1b5cd 100644
--- a/dblists/nowikidatadescriptiontaglines.dblist
+++ b/dblists/nowikidatadescriptiontaglines.dblist
@@ -4,3 +4,5 @@
 eswiki
 jawiki
 enwiki
+mediawikiwiki
+metawiki
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id18e8a4c31bba7142a5d30ad606c5c3aafa5bd5b
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Restore Redaktor namespace on sk.wikipedia

2016-09-06 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Restore Redaktor namespace on sk.wikipedia
..

Restore Redaktor namespace on sk.wikipedia

Previously, the Redaktor namespace, a choice specific for sk.wikipedia,
was hardcoded in the general Slovak language localisation.

It was was renamed to a more universal Užívateľ in 4f12dc25e773.

Meanwhile, for the sk.wikipedia specific configuration, we improved
the localisation of Redaktor / Redaktora by genre.

But the configuration never contained Redaktor as the canonical User
namespace, so this namespace has been Užívateľ since 1.28.0-wmf.17.

This configuration change applies what should have been done from
the start instead of edit the core Slovak localisation: define
Redaktor as the canonical User namespace for sk.wikipedia.

Bug: T143472
Change-Id: Ic1f043159ed76fc4e45f96d45e5f935cf64786e7
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b2c5d36..c7284aa 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5289,6 +5289,8 @@
'shwiki' => [ 100 => 'Portal', 101 => 'Razgovor_o_portalu' ], // T32928
'siwiki' => [ 100 => 'ද්වාරය', 101 => 'ද්වාරය_සාකච්ඡාව' ], // T8435, 
T26936
'skwiki' => [
+   NS_USER => 'Redaktor', // T143472
+   NS_USER_TALK => 'Diskusia_s_redaktorom',
100 => 'Portál',
101 => 'Diskusia_k_portálu',
],

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Expand array to allow future changes

2016-09-06 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Expand array to allow future changes
..

Expand array to allow future changes

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 95bf18c..b2c5d36 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5288,7 +5288,10 @@
],
'shwiki' => [ 100 => 'Portal', 101 => 'Razgovor_o_portalu' ], // T32928
'siwiki' => [ 100 => 'ද්වාරය', 101 => 'ද්වාරය_සාකච්ඡාව' ], // T8435, 
T26936
-   'skwiki' => [ 100 => 'Portál', 101 => 'Diskusia_k_portálu' ],
+   'skwiki' => [
+   100 => 'Portál',
+   101 => 'Diskusia_k_portálu',
+   ],
'slwiki' => [ 100 => 'Portal', 101 => 'Pogovor_o_portalu' ],
'sowiki' => [ 100 => 'Portal', 101 => 'Portal_talk' ], // T51600
'sqwiki' => [ 100 => 'Portal', 101 => 'Portal_diskutim' ],

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Do not use $wgExtensionFunctions to set globals

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

Change subject: Do not use $wgExtensionFunctions to set globals
..


Do not use $wgExtensionFunctions to set globals

The beta and production cluster both use metawiki as the central OAuth
wiki so the extension functions hack from 28cde3d3 is not needed
anymore, and it can result in extension initialization happening before
the relevant configuration has been set.

Also, do not set some group permissions on non-central wikis since they
are never going to be needed there.

Bug: T143055
Change-Id: I0ecf1e2859578fd4ebec9d68a769d456b3861ed7
---
M wmf-config/CommonSettings.php
1 file changed, 7 insertions(+), 11 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 4ffe4f2..a8b7936 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3131,23 +3131,19 @@
}
$wgMWOAuthSecureTokenTransfer = true;
 
-   $wgGroupPermissions['autoconfirmed']['mwoauthproposeconsumer'] = true;
-   $wgGroupPermissions['autoconfirmed']['mwoauthupdateownconsumer'] = true;
+   if ( $wgDBname === $wgMWOAuthCentralWiki ) {
+   // management interfaces are only available on the central wiki
+   $wgGroupPermissions['autoconfirmed']['mwoauthproposeconsumer'] 
= true;
+   
$wgGroupPermissions['autoconfirmed']['mwoauthupdateownconsumer'] = true;
+   $wgGroupPermissions['oauthadmin']['mwoauthmanageconsumer'] = 
true;
+   $wgOAuthGroupsToNotify = ['oauthadmin'];
+   }
 
$wgHooks['OAuthReplaceMessage'][] = function( &$msgKey ) {
if ( $msgKey === 'mwoauth-form-privacypolicy-link' ) {
$msgKey = 'wikimedia-oauth-privacy-link';
}
return true;
-   };
-
-   $wgExtensionFunctions[] = function() {
-   global $wgDBname, $wgMWOAuthCentralWiki, $wgGroupPermissions, 
$wgOAuthGroupsToNotify;
-   if ( $wgDBname === $wgMWOAuthCentralWiki ) {
-   // Only needed on the central wiki.
-   
$wgGroupPermissions['oauthadmin']['mwoauthmanageconsumer'] = true;
-   $wgOAuthGroupsToNotify = ['oauthadmin'];
-   }
};
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ecf1e2859578fd4ebec9d68a769d456b3861ed7
Gerrit-PatchSet: 6
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Dpatrick 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Temporarily trigger revslider.diffreload to re-add Thanks JS...

2016-09-06 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review.

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

Change subject: Temporarily trigger revslider.diffreload to re-add Thanks JS 
code
..

Temporarily trigger revslider.diffreload to re-add Thanks JS code

In order to properly fix problems reported in T142636, core hook
triggered on diff change (on diff page) will be added in
I5aad7cc10a0db869d7c25d41f7db056885dad69b.
When that change is merged, Thanks extension will be listening
to this hook and not to RevisionSlider-specific revslider.diffreload.

This adds temporary code fixing RevisionSlider's and Thanks' interaction
before hook introduced in I5aad7cc10a0db869d7c25d41f7db056885dad69b is
available. After it gets merged, the code added here should be replaced
by firing the new core hook.

Change-Id: I5dd6c592165ed30244ac8bff37bb6e4949c8bc4a
---
M modules/ext.RevisionSlider.DiffPage.js
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/modules/ext.RevisionSlider.DiffPage.js 
b/modules/ext.RevisionSlider.DiffPage.js
index 70e1515..4ada71a 100644
--- a/modules/ext.RevisionSlider.DiffPage.js
+++ b/modules/ext.RevisionSlider.DiffPage.js
@@ -74,6 +74,11 @@
self.reInitWikEdDiff();
}
 
+   // Following code is deprecated and will be 
removed soon. Revision Slider should
+   // trigger general (core) hook instead of its 
own hook. Extensions do not have to
+   // be aware of Revision Slider to interact 
properly with it.
+   mw.hook( 'revslider.diffreload' ).fire( 
$contentText );
+
}, function ( xhr ) {
$( 'table.diff[data-mw="interface"]' 
).removeClass( 'mw-revslider-diff-loading' );
if ( xhr.statusText !== 'abort' ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix IDEA errors in JobRunner

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

Change subject: Fix IDEA errors in JobRunner
..


Fix IDEA errors in JobRunner

Change-Id: I15939326afa80139a4d1000e43057b61cd374f18
---
M includes/jobqueue/JobRunner.php
1 file changed, 15 insertions(+), 12 deletions(-)

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



diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index f0d5ece..dfaf972 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -23,6 +23,7 @@
 
 use MediaWiki\MediaWikiServices;
 use MediaWiki\Logger\LoggerFactory;
+use Liuggio\StatsdClient\Factory\StatsdDataFactory;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
 
@@ -114,16 +115,17 @@
$response['reached'] = 'read-only';
return $response;
}
+
+   $lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
// Bail out if there is too much DB lag.
// This check should not block as we want to try other wiki 
queues.
-   list( , $maxLag ) = wfGetLB( wfWikiID() )->getMaxLag();
+   list( , $maxLag ) = $lbFactory->getMainLB( wfWikiID() 
)->getMaxLag();
if ( $maxLag >= self::MAX_ALLOWED_LAG ) {
$response['reached'] = 'replica-lag-limit';
return $response;
}
 
// Flush any pending DB writes for sanity
-   $lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
$lbFactory->commitAll( __METHOD__ );
 
// Catch huge single updates that lead to replica DB lag
@@ -137,7 +139,7 @@
$wait = 'wait'; // block to read backoffs the first time
 
$group = JobQueueGroup::singleton();
-   $stats = RequestContext::getMain()->getStats();
+   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
$jobsPopped = 0;
$timeMsTotal = 0;
$startTime = microtime( true ); // time since jobs started 
running
@@ -159,6 +161,7 @@
} else {
$job = $group->pop( $type ); // job from a 
single queue
}
+   $lbFactory->commitMasterChanges( __METHOD__ ); // flush 
any JobQueueDB writes
 
if ( $job ) { // found a job
++$jobsPopped;
@@ -178,7 +181,6 @@
$backoffs = $this->syncBackoffDeltas( 
$backoffs, $backoffDeltas, $wait );
}
 
-   $lbFactory->commitMasterChanges( __METHOD__ ); 
// flush any JobQueueDB writes
$info = $this->executeJob( $job, $stats, 
$popTime );
if ( $info['status'] !== false || 
!$job->allowRetries() ) {
$group->ack( $job ); // succeeded or 
job cannot be retried
@@ -252,7 +254,7 @@
 
/**
 * @param Job $job
-* @param BufferingStatsdDataFactory $stats
+* @param StatsdDataFactory $stats
 * @param float $popTime
 * @return array Map of status/error/timeMs
 */
@@ -269,10 +271,10 @@
try {
$status = $job->run();
$error = $job->getLastError();
-   $this->commitMasterChanges( $job );
+   $this->commitMasterChanges( $lbFactory, $job );
 
DeferredUpdates::doUpdates();
-   $this->commitMasterChanges( $job );
+   $this->commitMasterChanges( $lbFactory, $job );
} catch ( Exception $e ) {
MWExceptionHandler::rollbackMasterChangesAndLog( $e );
$status = false;
@@ -291,7 +293,7 @@
// Note that jobs are still responsible for handling replica DB 
lag.
$lbFactory->flushReplicaSnapshots( __METHOD__ );
// Clear out title cache data from prior snapshots
-   LinkCache::singleton()->clear();
+   MediaWikiServices::getInstance()->getLinkCache()->clear();
$timeMs = intval( ( microtime( true ) - $jobStartTime ) * 1000 
);
$rssEnd = $this->getMaxRssKb();
 
@@ -493,13 +495,14 @@
 * local wiki's replica DBs to catch up. See the documentation for
 * $wgJobSerialCommitThreshold for more.
 *
+* @param LBFactory $lbFactory
 * @param Job $job
 * @throws DBError
 */
-   private function commitMasterChanges( Job $job ) {
+   private function commitMasterChanges( LBFactory $lbFactory, Job $job ) {
 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Remove useless stopediting event

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

Change subject: Remove useless stopediting event
..


Remove useless stopediting event

Change-Id: Ic573855ad2a735c78b8cbae7257147679f2511c2
---
M view/resources/jquery/ui/jquery.ui.EditableTemplatedWidget.js
M 
view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js
M view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.js
M view/resources/jquery/wikibase/jquery.wikibase.entitytermsview.js
M view/resources/jquery/wikibase/jquery.wikibase.referenceview.js
M view/resources/jquery/wikibase/jquery.wikibase.sitelinkview.js
M view/resources/jquery/wikibase/jquery.wikibase.snaklistview.js
M view/resources/jquery/wikibase/jquery.wikibase.statementview.js
M view/resources/jquery/wikibase/snakview/snakview.js
M view/tests/qunit/jquery/wikibase/jquery.wikibase.snaklistview.tests.js
10 files changed, 5 insertions(+), 125 deletions(-)

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



diff --git a/view/resources/jquery/ui/jquery.ui.EditableTemplatedWidget.js 
b/view/resources/jquery/ui/jquery.ui.EditableTemplatedWidget.js
index c95789e..5625a88 100644
--- a/view/resources/jquery/ui/jquery.ui.EditableTemplatedWidget.js
+++ b/view/resources/jquery/ui/jquery.ui.EditableTemplatedWidget.js
@@ -21,12 +21,6 @@
  *Triggered after having started the widget's edit mode and edit mode 
has been rendered.
  *- {jQuery.Event}
  *
- * @event stopediting
- *Triggered when stopping the widget's edit mode, immediately before 
re-drawing.
- *- {jQuery.Event}
- *- {boolean} dropValue
- *  Whether the widget's value will be reset to the one from before 
starting edit mode.
- *
  * @event afterstopediting
  *Triggered after having stopped the widget's edit mode and non-edit 
mode is redrawn.
  *- {jQuery.Event}
@@ -122,7 +116,6 @@
if ( !this.isInEditMode() ) {
return done;
}
-   this._trigger( 'stopediting', null, [dropValue] );
this._afterStopEditing( dropValue );
return done;
},
diff --git 
a/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js
 
b/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js
index d23e8d7..41cd29e 100644
--- 
a/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js
+++ 
b/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js
@@ -25,11 +25,6 @@
  * @event afterstartediting
  *   - {jQuery.Event}
  *
- * @event stopediting
- *- {jQuery.Event}
- *- {boolean} Whether to drop the value.
- *- {Function} Callback function.
- *
  * @event afterstopediting
  *- {jQuery.Event}
  *- {boolean} Whether to drop the value.
@@ -169,7 +164,6 @@
[
prefix + 'create.' + this.widgetName,
prefix + 'afterstartediting.' + this.widgetName,
-   prefix + 'stopediting.' + this.widgetName,
prefix + 'afterstopediting.' + this.widgetName,
prefix + 'disable.' + this.widgetName
].join( ' ' ),
@@ -402,8 +396,6 @@
if ( !this._isInEditMode ) {
return deferred.resolve().promise();
}
-
-   this._trigger( 'stopediting', null, [dropValue] );
 
this.disable();
 
diff --git 
a/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.js
index 630d829..b4e4a89 100644
--- 
a/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.js
+++ 
b/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.js
@@ -28,11 +28,6 @@
  * @event afterstartediting
  *   - {jQuery.Event}
  *
- * @event stopediting
- *- {jQuery.Event}
- *- {boolean} Whether to drop the value.
- *- {Function} Callback function.
- *
  * @event afterstopediting
  *- {jQuery.Event}
  *- {boolean} Whether to drop the value.
@@ -155,7 +150,6 @@
[
widgetName + 'create.' + 
self.widgetName,
widgetName + 'afterstartediting.' + 
self.widgetName,
-   widgetName + 'stopediting.' + 
self.widgetName,
widgetName + 'afterstopediting.' + 
self.widgetName,
widgetName + 'disable.' + 
self.widgetName
].join( 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Delete from pending db once the transaction is completed

2016-09-06 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Delete from pending db once the transaction is completed
..

Delete from pending db once the transaction is completed

Bug: T143945
Change-Id: I60580e79da3568812aecc919530436bcd47e0dfe
---
M sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/98/308898/1

diff --git 
a/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php 
b/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
index 6c0a8f9..03e618a 100644
--- a/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
@@ -24,6 +24,11 @@
$id = 0;
$inserting = true;
 
+   // Delete corresponding pending rows if this message is 
finished.
+   if ( in_array( $message['payments_final_status'], array( 
'completed', 'failed' ) ) ) {
+   PendingDatabase::get()->deleteMessage( $message );
+   }
+
$dbs = wmf_civicrm_get_dbs();
$dbs->push( 'fredge' );
$query = 'SELECT id FROM payments_initial

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: test do not merge

2016-09-06 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: test do not merge
..

test do not merge

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/308714/1


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Use an array for an empty quickList, not false

2016-09-06 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Use an array for an empty quickList, not false
..

Use an array for an empty quickList, not false

Needed after 3499b0a1b90351740c6a1c94a7f5a9446051b595.

Bug: T144871
Change-Id: If662c8ca70438526881b36abc8418d58b8e5645d
---
M lib/jquery.uls/src/jquery.uls.core.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/jquery.uls/src/jquery.uls.core.js 
b/lib/jquery.uls/src/jquery.uls.core.js
index d92008a..13731f5 100644
--- a/lib/jquery.uls/src/jquery.uls.core.js
+++ b/lib/jquery.uls/src/jquery.uls.core.js
@@ -260,7 +260,7 @@
languages: this.languages,
columns: columnsOptions[ this.getMenuWidth() ],
 
-   quickList: languagesCount > 12 ? 
this.options.quickList : false,
+   quickList: languagesCount > 12 ? 
this.options.quickList : [],
clickhandler: $.proxy( this.select, this ),
source: this.$languageFilter,
showRegions: this.options.showRegions,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If662c8ca70438526881b36abc8418d58b8e5645d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Cirrus: Support document versioning

2016-09-06 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Cirrus: Support document versioning
..

Cirrus: Support document versioning

Turns on the feature flag for document versioning which will prevent
race conditions in the update process due to re-ordering of writes in
the job queue due to retries, or whatever else.

Must not be deployed until the production and beta cluster search
clusters have had a cluster restart with the new version of search-extra
plugin supporting this change.

Bug: T144039
Change-Id: Ibe3fbffde2dd42739c9e1386fd75998c08df9fe1
---
M wmf-config/CirrusSearch-common.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index 21e8a0b..cf92d95 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -377,6 +377,7 @@
],
'super_detect_noop' => true,
'id_hash_mod_filter' => true,
+   'documentVersion' => true,
 ];
 
 # Enable the "experimental" highlighter on all wikis

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Support document versioning via super_detect_noop

2016-09-06 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Support document versioning via super_detect_noop
..

Support document versioning via super_detect_noop

Adds support for document versioning, added to super_detect_noop
in Ib697b5e5. This replaces the prior incomplete version handling
that we found wasn't being utilized due to the _update API in
elasticsearch not supporting native elasticsearch versioning.

Change-Id: If022e2cfb6c91ccbb8ac0629e546036a684c2717
---
M CirrusSearch.php
M includes/Maintenance/MappingConfigBuilder.php
M includes/Updater.php
3 files changed, 13 insertions(+), 3 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index d424981..15e3a63 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -149,6 +149,10 @@
 // wikimedia-extra versions 1.3.1, 1.4.2, 1.5.0, and greater:
 // $wgCirrusSearchWikimediaExtraPlugin[ 'super_detect_noop' ] = true;
 //
+// This turns on document level noop-detection for updates based on revision
+// ids and is compatible with wikimedia-extra versions 2.3.4.1 and greater:
+// $wgCirrusSearchWikimediaExtraPlugin[ 'documentVersion' ] = true
+//
 // This allows forking on reindexing and is compatible with wikimedia-extra
 // versions 1.3.1, 1.4.2, 1.5.0, and greater:
 // $wgCirrusSearchWikimediaExtraPlugin[ 'id_hash_mod_filter' ] = true;
diff --git a/includes/Maintenance/MappingConfigBuilder.php 
b/includes/Maintenance/MappingConfigBuilder.php
index aee0d29..32930dd 100644
--- a/includes/Maintenance/MappingConfigBuilder.php
+++ b/includes/Maintenance/MappingConfigBuilder.php
@@ -136,6 +136,7 @@
'type' => 'date',
'format' => 'dateOptionalTime',
],
+   'version' => $this->buildLongField( 'version' 
)->getMapping( $this->engine ),
'wiki' => $this->buildKeywordField( 'wiki' 
)->getMapping( $this->engine ),
'namespace' => $this->buildLongField( 
'namespace' )->getMapping( $this->engine ),
'namespace_text' => $this->buildKeywordField( 
'namespace_text' )
diff --git a/includes/Updater.php b/includes/Updater.php
index 30436dc..be0eae3 100644
--- a/includes/Updater.php
+++ b/includes/Updater.php
@@ -281,7 +281,6 @@
 
$doc = new \Elastica\Document( 
$this->searchConfig->makeId( $page->getId() ), [
'version' => $page->getLatest(),
-   'version_type' => 'external',
'wiki' => wfWikiID(),
'namespace' => $title->getNamespace(),
'namespace_text' => Util::getNamespaceText( 
$title ),
@@ -336,10 +335,16 @@
 */
private function docToSuperDetectNoopScript( $doc ) {
$params = $doc->getParams();
-   $params[ 'source' ] = $doc->getData();
-   $params[ 'handlers' ] = [
+   $params['source'] = $doc->getData();
+   $params['handlers'] = [
'incoming_links' => 'within 20%',
];
+   // Added in search-extra 2.3.4.1, around sept 2015. This check 
can be dropped
+   // and may default sometime in the future when users are 
certain to be using
+   // a version of the search-extra plugin with document 
versioning support
+   if ( 
$this->searchConfig->getElement('CirrusSearchWikimediaExtraPlugin', 
'documentVersion') ) {
+   $params['handlers']['version'] = 'documentVersion';
+   }
 
$script = new \Elastica\Script\Script( 'super_detect_noop', 
$params, 'native' );
if ( $doc->getDocAsUpsert() ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Add document versioning to FullyFeaturedConfig.php

2016-09-06 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Add document versioning to FullyFeaturedConfig.php
..

Add document versioning to FullyFeaturedConfig.php

This must not be merged until vagrant is updated with a new version
of the search-extra plugin that supports document versioning, or
cindy will break.

Bug: T144039
Change-Id: I43f96b11b9b7bab444b2ddd6433ab4472c40225b
---
M tests/jenkins/FullyFeaturedConfig.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/tests/jenkins/FullyFeaturedConfig.php 
b/tests/jenkins/FullyFeaturedConfig.php
index 41bacb5..32cb6b8 100644
--- a/tests/jenkins/FullyFeaturedConfig.php
+++ b/tests/jenkins/FullyFeaturedConfig.php
@@ -31,6 +31,7 @@
 $wgCirrusSearchQueryStringMaxDeterminizedStates = 500;
 $wgCirrusSearchWikimediaExtraPlugin[ 'super_detect_noop' ] = true;
 $wgCirrusSearchWikimediaExtraPlugin[ 'id_hash_mod_filter' ] = true;
+$wgCirrusSearchWikimediaExtraPlugin[ 'documentVersion' ] = true;
 
 $wgCirrusSearchUseCompletionSuggester = 'yes';
 $wgCirrusSearchCompletionSuggesterUseDefaultSort = true;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Convert JobRunner to using beginMasterChanges()

2016-09-06 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Convert JobRunner to using beginMasterChanges()
..

Convert JobRunner to using beginMasterChanges()

This lets the runJobs.php $wgCommandLineMode hack be removed.

Change-Id: Ia9b91f539dc11a5c05bdac4bcd99d6615c4dc48d
---
M includes/jobqueue/JobRunner.php
M maintenance/runJobs.php
2 files changed, 8 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/93/308893/1

diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index dfaf972..7cbdfd0 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -269,12 +269,14 @@
$rssStart = $this->getMaxRssKb();
$jobStartTime = microtime( true );
try {
+   $fnameTrxOwner = get_class( $job ) . '::run';
+   $lbFactory->beginMasterChanges( $fnameTrxOwner );
$status = $job->run();
$error = $job->getLastError();
-   $this->commitMasterChanges( $lbFactory, $job );
+   $this->commitMasterChanges( $lbFactory, $job, 
$fnameTrxOwner );
 
DeferredUpdates::doUpdates();
-   $this->commitMasterChanges( $lbFactory, $job );
+   $this->commitMasterChanges( $lbFactory, $job, 
__METHOD__ );
} catch ( Exception $e ) {
MWExceptionHandler::rollbackMasterChangesAndLog( $e );
$status = false;
@@ -497,9 +499,10 @@
 *
 * @param LBFactory $lbFactory
 * @param Job $job
+* @param string $fnameTrxOwner
 * @throws DBError
 */
-   private function commitMasterChanges( LBFactory $lbFactory, Job $job ) {
+   private function commitMasterChanges( LBFactory $lbFactory, Job $job, 
$fnameTrxOwner ) {
global $wgJobSerialCommitThreshold;
 
$lb = $lbFactory->getMainLB( wfWikiID() );
@@ -521,7 +524,7 @@
}
 
if ( !$dbwSerial ) {
-   $lbFactory->commitMasterChanges( __METHOD__ );
+   $lbFactory->commitMasterChanges( $fnameTrxOwner );
return;
}
 
@@ -542,7 +545,7 @@
}
 
// Actually commit the DB master changes
-   $lbFactory->commitMasterChanges( __METHOD__ );
+   $lbFactory->commitMasterChanges( $fnameTrxOwner );
 
// Release the lock
$dbwSerial->unlock( 'jobrunner-serial-commit', __METHOD__ );
diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php
index c3c2391..2e011fe 100644
--- a/maintenance/runJobs.php
+++ b/maintenance/runJobs.php
@@ -53,8 +53,6 @@
}
 
public function execute() {
-   global $wgCommandLineMode;
-
if ( $this->hasOption( 'procs' ) ) {
$procs = intval( $this->getOption( 'procs' ) );
if ( $procs < 1 || $procs > 1000 ) {
@@ -69,10 +67,6 @@
 
$outputJSON = ( $this->getOption( 'result' ) === 'json' );
$wait = $this->hasOption( 'wait' );
-
-   // Enable DBO_TRX for atomicity; JobRunner manages transactions
-   // and works well in web server mode already (@TODO: this is a 
hack)
-   $wgCommandLineMode = false;
 
$runner = new JobRunner( LoggerFactory::getInstance( 'runJobs' 
) );
if ( !$outputJSON ) {
@@ -111,8 +105,6 @@
 
sleep( 1 );
}
-
-   $wgCommandLineMode = true;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9b91f539dc11a5c05bdac4bcd99d6615c4dc48d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix IDEA errors in JobRunner

2016-09-06 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Fix IDEA errors in JobRunner
..

Fix IDEA errors in JobRunner

Change-Id: I15939326afa80139a4d1000e43057b61cd374f18
---
M includes/jobqueue/JobRunner.php
1 file changed, 15 insertions(+), 12 deletions(-)


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

diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index f0d5ece..dfaf972 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -23,6 +23,7 @@
 
 use MediaWiki\MediaWikiServices;
 use MediaWiki\Logger\LoggerFactory;
+use Liuggio\StatsdClient\Factory\StatsdDataFactory;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
 
@@ -114,16 +115,17 @@
$response['reached'] = 'read-only';
return $response;
}
+
+   $lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
// Bail out if there is too much DB lag.
// This check should not block as we want to try other wiki 
queues.
-   list( , $maxLag ) = wfGetLB( wfWikiID() )->getMaxLag();
+   list( , $maxLag ) = $lbFactory->getMainLB( wfWikiID() 
)->getMaxLag();
if ( $maxLag >= self::MAX_ALLOWED_LAG ) {
$response['reached'] = 'replica-lag-limit';
return $response;
}
 
// Flush any pending DB writes for sanity
-   $lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
$lbFactory->commitAll( __METHOD__ );
 
// Catch huge single updates that lead to replica DB lag
@@ -137,7 +139,7 @@
$wait = 'wait'; // block to read backoffs the first time
 
$group = JobQueueGroup::singleton();
-   $stats = RequestContext::getMain()->getStats();
+   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
$jobsPopped = 0;
$timeMsTotal = 0;
$startTime = microtime( true ); // time since jobs started 
running
@@ -159,6 +161,7 @@
} else {
$job = $group->pop( $type ); // job from a 
single queue
}
+   $lbFactory->commitMasterChanges( __METHOD__ ); // flush 
any JobQueueDB writes
 
if ( $job ) { // found a job
++$jobsPopped;
@@ -178,7 +181,6 @@
$backoffs = $this->syncBackoffDeltas( 
$backoffs, $backoffDeltas, $wait );
}
 
-   $lbFactory->commitMasterChanges( __METHOD__ ); 
// flush any JobQueueDB writes
$info = $this->executeJob( $job, $stats, 
$popTime );
if ( $info['status'] !== false || 
!$job->allowRetries() ) {
$group->ack( $job ); // succeeded or 
job cannot be retried
@@ -252,7 +254,7 @@
 
/**
 * @param Job $job
-* @param BufferingStatsdDataFactory $stats
+* @param StatsdDataFactory $stats
 * @param float $popTime
 * @return array Map of status/error/timeMs
 */
@@ -269,10 +271,10 @@
try {
$status = $job->run();
$error = $job->getLastError();
-   $this->commitMasterChanges( $job );
+   $this->commitMasterChanges( $lbFactory, $job );
 
DeferredUpdates::doUpdates();
-   $this->commitMasterChanges( $job );
+   $this->commitMasterChanges( $lbFactory, $job );
} catch ( Exception $e ) {
MWExceptionHandler::rollbackMasterChangesAndLog( $e );
$status = false;
@@ -291,7 +293,7 @@
// Note that jobs are still responsible for handling replica DB 
lag.
$lbFactory->flushReplicaSnapshots( __METHOD__ );
// Clear out title cache data from prior snapshots
-   LinkCache::singleton()->clear();
+   MediaWikiServices::getInstance()->getLinkCache()->clear();
$timeMs = intval( ( microtime( true ) - $jobStartTime ) * 1000 
);
$rssEnd = $this->getMaxRssKb();
 
@@ -493,13 +495,14 @@
 * local wiki's replica DBs to catch up. See the documentation for
 * $wgJobSerialCommitThreshold for more.
 *
+* @param LBFactory $lbFactory
 * @param Job $job
 * @throws DBError
 */
-   private function commitMasterChanges( Job $job ) {
+   private function commitMasterChanges( 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Rename 'detectors' to 'handlers' in super detect noop

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

Change subject: Rename 'detectors' to 'handlers' in super detect noop
..


Rename 'detectors' to 'handlers' in super detect noop

For the super_detect_noop script to noop document updates within
20% of the original value it needs to read the configuration for the
handlers. This key was renamed in the search-extra plugin in I3e032ca3
but the change never made it's way into CirrusSearch. As such this has
basically been doing nothing for the past year and inducing more
indexing load than necessary.

Rename the 'detectors' key to 'handlers' so the plugin starts doing it's
thing again. This should, in theory, have some positive impact on the
indexing load on the search cluster.

Change-Id: I6a3be5d898d8b7e96086f0b5582b664faea5d2d5
---
M includes/Updater.php
1 file changed, 1 insertion(+), 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/Updater.php b/includes/Updater.php
index 82257d4..30436dc 100644
--- a/includes/Updater.php
+++ b/includes/Updater.php
@@ -337,7 +337,7 @@
private function docToSuperDetectNoopScript( $doc ) {
$params = $doc->getParams();
$params[ 'source' ] = $doc->getData();
-   $params[ 'detectors' ] = [
+   $params[ 'handlers' ] = [
'incoming_links' => 'within 20%',
];
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a3be5d898d8b7e96086f0b5582b664faea5d2d5
Gerrit-PatchSet: 1
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] wikimedia...analytics[master]: Rename 'detectors' to 'handlers'

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

Change subject: Rename 'detectors' to 'handlers'
..


Rename 'detectors' to 'handlers'

For the super_detect_noop script to noop document updates
within 20% of the original value, it needs to read the configuration
for the handlers. This key was renamed in the search-extra plugin
in I3e032ca3 but the change never made it's way to CirrusSearch. As
such that mistake was propogated into this repository. Rename
detectors to handlers so the script starts nooping as expected.

This should, in theory, have a noticable impact on the # of documents
written out when the weekly dump hits.

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

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



diff --git a/oozie/transfer_to_es/transferToES.py 
b/oozie/transfer_to_es/transferToES.py
index 73b3656..a289750 100644
--- a/oozie/transfer_to_es/transferToES.py
+++ b/oozie/transfer_to_es/transferToES.py
@@ -53,7 +53,7 @@
 "script": "super_detect_noop",
 "lang": "native",
 "params": {
-"detectors": {FIELD: "within " + NOOP_WITHIN + "%"},
+"handlers": {FIELD: "within " + NOOP_WITHIN + "%"},
 "source": {FIELD: document.score},
 },
 }}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I102031dfc96c3c14c465108e7786839f93f4ac68
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/analytics
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: DCausse 
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] operations/mediawiki-config[master]: Deploy Kartographer everywhere public

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

Change subject: Deploy Kartographer everywhere public
..


Deploy Kartographer everywhere public

On Wikipedia, this means only  will go live
(already restricted via $wgKartographerEnableMapFrame below)

Bug: T144062
Change-Id: I199afd35a07ae7b1fca1f17b37baa39695ee9c4a
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 13 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 544a4fa..95bf18c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17326,19 +17326,8 @@
 ],
 
 'wmgUseKartographer' => [
-   'default' => false,
-   'wikivoyage' => true,
-   'commonswiki' => true,
-   'wikidatawiki' => true,
-   'testwiki' => true,
-   'test2wiki' => true,
-   'testwikidatawiki' => true,
-   'mediawikiwiki' => true,
-   'plwikimedia' => true, // T132510
-   'metawiki' => true,
-   'cawiki' => true,
-   'hewiki' => true,
-   'mkwiki' => true,
+   'default' => true,
+   'private' => false,
 ],
 
 'wgKartographerWikivoyageMode' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I199afd35a07ae7b1fca1f17b37baa39695ee9c4a
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Reduce cronspam to root@ from zookeeper zkCleanup script

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

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

Change subject: Reduce cronspam to root@ from zookeeper zkCleanup script
..

Reduce cronspam to root@ from zookeeper zkCleanup script

The analytics hosts define the JAVA_TOOL_OPTIONS environment
variable in /etc/environment to prevent issues like T128295.
The zookeeper zkCleanup script emits messages like the following
everytime it runs in cron:
'Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8'
We want to keep informed about legitimate failures logged to stderr
but we don't care about any JAVA_TOOL_OPTIONS message.

Bug: T132324
Change-Id: I8b55c3e3e809182b3c1dbae8d25bfbb967c98c46
---
M modules/role/manifests/zookeeper/server.pp
1 file changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/modules/role/manifests/zookeeper/server.pp 
b/modules/role/manifests/zookeeper/server.pp
index ef1a867..713d6d4 100644
--- a/modules/role/manifests/zookeeper/server.pp
+++ b/modules/role/manifests/zookeeper/server.pp
@@ -23,7 +23,17 @@
 description => "${cluster_name} Cluster Zookeeper Server"
 }
 
-class { '::zookeeper::server': }
+class { '::zookeeper::server':
+# If zookeeper runs in environments where JAVA_TOOL_OPTIONS is defined,
+# (like all the analytics hosts after T128295)
+# the zkCleanup.sh script will cause cronspam to root@ due to
+# message like the following to stderr:
+# 'Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8'
+# There seems to be no elegant way to avoid the JVM spam,
+# so until somebody finds a better way we redirect stdout to /dev/null
+# and we filter out JAVA_TOOL_OPTIONS messages from stderr.
+cleanup_script_args => '-n 10 2>&1 > /dev/null | grep -v 
JAVA_TOOL_OPTIONS'
+}
 
 ferm::service { 'zookeeper':
 proto  => 'tcp',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] Command-line extension management

2016-09-06 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: [WIP] Command-line extension management
..

[WIP] Command-line extension management

Very POC right now.

Provides a maintenance script to enable/disable/fetch extensions by
writing to a JSON file with extension names.

This allows for automated extension enabling/disabling, which would be
useful for things like MediaWiki-Vagrant or system packages.

A 'fetch' command would automatically download the extension from a
configured repository (ExtensionDistributor, Gerrit, etc.) and 'update'
would see if any updates are available by comparing git hashes (or some
other mechanism like version numbers?).

Change-Id: I99588ee9db5ac6488cd2c4f12bcbeeae194b2c57
---
M autoload.php
M includes/DefaultSettings.php
M includes/Setup.php
M includes/WebStart.php
A includes/registration/ExtensionList.php
M includes/registration/ExtensionRegistry.php
M maintenance/doMaintenance.php
A maintenance/manageExtensions.php
8 files changed, 273 insertions(+), 1 deletion(-)


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

diff --git a/autoload.php b/autoload.php
index 0c63ba5..9ea6d28 100644
--- a/autoload.php
+++ b/autoload.php
@@ -421,6 +421,7 @@
'ExportProgressFilter' => __DIR__ . '/maintenance/backup.inc',
'ExportSites' => __DIR__ . '/maintenance/exportSites.php',
'ExtensionLanguages' => __DIR__ . '/maintenance/language/languages.inc',
+   'ExtensionList' => __DIR__ . '/includes/registration/ExtensionList.php',
'ExtensionProcessor' => __DIR__ . 
'/includes/registration/ExtensionProcessor.php',
'ExtensionRegistry' => __DIR__ . 
'/includes/registration/ExtensionRegistry.php',
'ExternalStore' => __DIR__ . 
'/includes/externalstore/ExternalStore.php',
@@ -786,6 +787,7 @@
'MaintenanceFormatInstallDoc' => __DIR__ . 
'/maintenance/formatInstallDoc.php',
'MakeTestEdits' => __DIR__ . '/maintenance/makeTestEdits.php',
'MalformedTitleException' => __DIR__ . 
'/includes/title/MalformedTitleException.php',
+   'ManageExtensions' => __DIR__ . '/maintenance/manageExtensions.php',
'ManualLogEntry' => __DIR__ . '/includes/logging/LogEntry.php',
'MapCacheLRU' => __DIR__ . '/includes/libs/MapCacheLRU.php',
'MappedIterator' => __DIR__ . '/includes/libs/MappedIterator.php',
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 664718a..90dac0e 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -246,6 +246,17 @@
 $wgStyleDirectory = "{$IP}/skins";
 
 /**
+ * Location of list of enabled extensions and skins
+ * Should only be manipulated with manageExtensions.php
+ *
+ * Note! You should make sure permissions are set properly on this
+ * so the webserver is unable to write to it.
+ *
+ * @since 1.28
+ */
+$wgExtensionListFile = "{$IP}/EnabledExtensions.json";
+
+/**
  * The URL path for primary article page views. This path should contain $1,
  * which is replaced by the article title.
  *
diff --git a/includes/Setup.php b/includes/Setup.php
index 97cba25..fdfd731 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -36,8 +36,13 @@
 $fname = 'Setup.php';
 $ps_setup = Profiler::instance()->scopedProfileIn( $fname );
 
-// If any extensions are still queued, force load them
+$extList = ExtensionList::getInstance();
+wfLoadExtensions( $extList->getEnabledExtensions() );
+wfLoadSkins( $extList->getEnabledSkins() );
+
+// Queue loaded extensions
 ExtensionRegistry::getInstance()->loadFromQueue();
+unset( $extList );
 
 // Check to see if we are at the file scope
 if ( !isset( $wgVersion ) ) {
diff --git a/includes/WebStart.php b/includes/WebStart.php
index d063ce3..ded8165 100644
--- a/includes/WebStart.php
+++ b/includes/WebStart.php
@@ -104,6 +104,12 @@
die( 1 );
 }
 
+if ( defined( 'MW_NO_EXTENSIONS' ) ) {
+   // This should never be set for web entry-points, but
+   // be sane and disable it if requested.
+   ExtensionRegistry::getInstance()->disable();
+}
+
 if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
# Use a callback function to configure MediaWiki
call_user_func( MW_CONFIG_CALLBACK );
diff --git a/includes/registration/ExtensionList.php 
b/includes/registration/ExtensionList.php
new file mode 100644
index 000..5af61fd
--- /dev/null
+++ b/includes/registration/ExtensionList.php
@@ -0,0 +1,130 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+class ExtensionList {
+
+   /**
+* @var string
+*/
+   private $path;
+
+   private $content;
+
+   /**
+* @return ExtensionList
+*/
+   public static function getInstance() {
+   static $instance = null;
+
+   if ( $instance === null ) {
+   global $wgExtensionListFile;
+   

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Deploy Kartographer everywhere public

2016-09-06 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Deploy Kartographer everywhere public
..

Deploy Kartographer everywhere public

On Wikipedia, this means only  will go live
(already restricted via $wgKartographerEnableTags below)

Bug: T144062
Change-Id: I199afd35a07ae7b1fca1f17b37baa39695ee9c4a
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 13 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a8a9d6d..fc4cef4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17361,19 +17361,8 @@
 ],
 
 'wmgUseKartographer' => [
-   'default' => false,
-   'wikivoyage' => true,
-   'commonswiki' => true,
-   'wikidatawiki' => true,
-   'testwiki' => true,
-   'test2wiki' => true,
-   'testwikidatawiki' => true,
-   'mediawikiwiki' => true,
-   'plwikimedia' => true, // T132510
-   'metawiki' => true,
-   'cawiki' => true,
-   'hewiki' => true,
-   'mkwiki' => true,
+   'default' => true,
+   'private' => false,
 ],
 
 'wgKartographerWikivoyageMode' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: (WIP) Puppet compile an host via rspec (WIP)

2016-09-06 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: (WIP) Puppet compile an host via rspec (WIP)
..

(WIP) Puppet compile an host via rspec (WIP)

Change-Id: Ib31cbcea02755e54e0e7157b4306a213e6013c47
---
A tests/.rspec
A tests/Rakefile
A tests/spec/examples.txt
A tests/spec/fixtures/hiera.yaml
A tests/spec/fixtures/manifests/site.pp
A tests/spec/hosts/gallium_spec.rb
A tests/spec/spec_helper.rb
7 files changed, 106 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/89/308889/1

diff --git a/tests/.rspec b/tests/.rspec
new file mode 100644
index 000..f449dae
--- /dev/null
+++ b/tests/.rspec
@@ -0,0 +1,2 @@
+--format doc
+--color
diff --git a/tests/Rakefile b/tests/Rakefile
new file mode 100644
index 000..cd3d379
--- /dev/null
+++ b/tests/Rakefile
@@ -0,0 +1 @@
+require 'puppetlabs_spec_helper/rake_tasks'
diff --git a/tests/spec/examples.txt b/tests/spec/examples.txt
new file mode 100644
index 000..9e2074c
--- /dev/null
+++ b/tests/spec/examples.txt
@@ -0,0 +1,3 @@
+example_id  | status | run_time |
+--- | -- |  |
+./spec/hosts/gallium_spec.rb[1:1:1] | failed | 4.48 seconds |
diff --git a/tests/spec/fixtures/hiera.yaml b/tests/spec/fixtures/hiera.yaml
new file mode 100644
index 000..76f4266
--- /dev/null
+++ b/tests/spec/fixtures/hiera.yaml
@@ -0,0 +1,27 @@
+# *** Auto-generated ***
+:backends:
+  - nuyaml
+  - role
+:role:
+  :datadir: /home/hashar/projects/operations/puppet/hieradata
+:nuyaml:
+  :datadir: /home/hashar/projects/operations/puppet/hieradata
+  :expand_path:
+- common
+- "%{::site}"
+:private:
+  :datadir: /home/hashar/projects/operations/puppet/private/hieradata
+:hierarchy:
+  - "hosts/%{::hostname}"
+  - "regex/%{::fqdn}"
+  - "%{::site}"
+  - "private/hosts/%{::hostname}" # TODO: Remove this once labtest realm dies. 
DO NOT USE THIS
+  - "private/%{::site}"
+  - "common"
+  - "private/common"
+
+:role_hierarchy:
+  - "%{::site}"
+  - "common"
+  - "private/%{::site}"
+  - "private/common"
diff --git a/tests/spec/fixtures/manifests/site.pp 
b/tests/spec/fixtures/manifests/site.pp
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/tests/spec/fixtures/manifests/site.pp
diff --git a/tests/spec/hosts/gallium_spec.rb b/tests/spec/hosts/gallium_spec.rb
new file mode 100644
index 000..7980445
--- /dev/null
+++ b/tests/spec/hosts/gallium_spec.rb
@@ -0,0 +1,24 @@
+require 'spec_helper'
+
+describe "gallium.wikimedia.org" do
+
+context do
+let(:facts) { {
+:interfaces => 'eth0',
+# eqiad
+:ipaddress_eth0 => '10.64.0.1',
+# Precise
+:lsbdistrelease => '12.04',
+:lsbdistid => 'Ubuntu',
+:operatingsystem => 'Ubuntu',
+} }
+before(:each) do
+Puppet::Parser::Functions.newfunction(:generate, :type => :rvalue) 
{ |args|
+return ''
+}
+end
+
+it { is_expected.to compile }
+end
+
+end
diff --git a/tests/spec/spec_helper.rb b/tests/spec/spec_helper.rb
new file mode 100644
index 000..e1f9e31
--- /dev/null
+++ b/tests/spec/spec_helper.rb
@@ -0,0 +1,49 @@
+require 'rspec-puppet'
+require 'puppetlabs_spec_helper/module_spec_helper'
+
+root_path = File.expand_path(File.join(__FILE__, '..', '..', '..'))
+fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
+
+def prepare_hiera_config(root_path, fixture_path)
+hiera_conf = File.read(
+File.join(root_path,
+  'modules/puppetmaster/files/production.hiera.yaml'))
+hiera_conf.gsub!('/etc/puppet/hieradata',
+ File.join(root_path, 'hieradata'))
+hiera_conf.gsub!('/etc/puppet/private/hieradata',
+ File.join(root_path, 'private/hieradata'))
+hiera_conf.prepend("# *** Auto-generated ***\n")
+File.write(File.join(fixture_path, 'hiera.yaml'), hiera_conf)
+end
+
+
+RSpec.configure do |c|
+  c.module_path = [
+  File.join(root_path, 'modules'),
+  File.join(root_path, 'private', 'modules'),
+  ].join(':')
+  c.manifest_dir = File.join(root_path, 'manifests')
+  c.template_dir = File.join(root_path, 'templates')
+  c.environmentpath = File.join(Dir.pwd, 'spec')
+
+  prepare_hiera_config(root_path, fixture_path)
+
+  c.hiera_config = File.join(fixture_path, 'hiera.yaml')
+
+  # For --next-failure
+  c.example_status_persistence_file_path = File.join(
+  File.dirname(__FILE__), 'examples.txt')
+
+  c.before(:each) do
+# From Max Lincoln: https://gist.github.com/maxlinc/6382696
+ENV['PUPPET_LOG'] = 'debug' if ENV['PUPPET_DEBUG']
+if ENV['PUPPET_LOG']
+levels = %w(debug info notice warning err alert emerg crit)
+if !levels.include?(ENV['PUPPET_LOG'])
+raise "Unknown 

[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[wmf/1.28.0-wmf.17]: Disable mapframe insertion conditionally

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

Change subject: Disable mapframe insertion conditionally
..


Disable mapframe insertion conditionally

Bug: T144560
Change-Id: If2e826ff4dd48c2a248f01e697cb6f3b60d4954c
(cherry picked from commit d2d56c49d4e65dd083df61f35e0a782b89effcb9)
---
M includes/DataModule.php
M modules/ve-maps/ve.ui.MWMapsTool.js
2 files changed, 12 insertions(+), 9 deletions(-)

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



diff --git a/includes/DataModule.php b/includes/DataModule.php
index e6289fb..b559ad6 100644
--- a/includes/DataModule.php
+++ b/includes/DataModule.php
@@ -25,6 +25,7 @@
'wgKartographerSrcsetScales' => $config->get( 
'KartographerSrcsetScales' ),
'wgKartographerStyles' => $config->get( 
'KartographerStyles' ),
'wgKartographerDfltStyle' => $config->get( 
'KartographerDfltStyle' ),
+   'wgKartographerEnableMapFrame' => $config->get( 
'KartographerEnableMapFrame' ),
) );
}
 
diff --git a/modules/ve-maps/ve.ui.MWMapsTool.js 
b/modules/ve-maps/ve.ui.MWMapsTool.js
index a13fceb..aa1a74e 100644
--- a/modules/ve-maps/ve.ui.MWMapsTool.js
+++ b/modules/ve-maps/ve.ui.MWMapsTool.js
@@ -31,15 +31,17 @@
 ve.ui.MWMapsDialogTool.static.modelClasses = [ ve.dm.MWMapsNode, 
ve.dm.MWInlineMapsNode ];
 ve.ui.MWMapsDialogTool.static.commandName = 'mwMaps';
 
-/* Registration */
+if ( mw.config.get( 'wgKartographerEnableMapFrame' ) ) {
+   /* Registration */
 
-ve.ui.toolFactory.register( ve.ui.MWMapsDialogTool );
+   ve.ui.toolFactory.register( ve.ui.MWMapsDialogTool );
 
-/* Commands */
+   /* Commands */
 
-ve.ui.commandRegistry.register(
-   new ve.ui.Command(
-   'mwMaps', 'window', 'open',
-   { args: [ 'mwMaps' ], supportedSelections: [ 'linear' ] }
-   )
-);
+   ve.ui.commandRegistry.register(
+   new ve.ui.Command(
+   'mwMaps', 'window', 'open',
+   { args: [ 'mwMaps' ], supportedSelections: [ 'linear' ] 
}
+   )
+   );
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2e826ff4dd48c2a248f01e697cb6f3b60d4954c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: wmf/1.28.0-wmf.17
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: [WIP] Section editing in NWE

2016-09-06 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: [WIP] Section editing in NWE
..

[WIP] Section editing in NWE

Change-Id: Ida6e721e0d980b47e3fda6a1f0744cbce1b2235a
---
M ApiVisualEditor.php
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
M modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
4 files changed, 92 insertions(+), 38 deletions(-)


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

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 9b07384..2a41012 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -356,12 +356,22 @@
$this->dieUsage( 'Error 
contacting the document server', 'docserver' );
}
} elseif ( $params['paction'] === 
'wikitext' ) {
-   $apiParams = [
-   'action' => 'query',
-   'titles' => 
$title->getPrefixedDBkey(),
-   'prop' => 'revisions',
-   'rvprop' => 'content'
-   ];
+   $section = isset( 
$params['section'] ) ? intval( $params['section'] ) : null;
+   if ( $section ) {
+   $apiParams = [
+   'action' => 
'parse',
+   'page' => 
$title->getPrefixedDBkey(),
+   'prop' => 
'sections|wikitext'
+   ];
+   } else {
+   $apiParams = [
+   'action' => 
'query',
+   'titles' => 
$title->getPrefixedDBkey(),
+   'prop' => 
'revisions',
+   'rvprop' => 
'content'
+   ];
+   }
+
$api = new ApiMain(
new DerivativeRequest(

$this->getRequest(),
@@ -372,9 +382,43 @@
);
$api->execute();
$result = $api->getResultData();
-   $content = isset( 
$result['query']['pages'][$title->getArticleID()]['revisions'][0]['*'] ) ?
-   
$result['query']['pages'][$title->getArticleID()]['revisions'][0]['*'] :
-   false;
+
+   if ( $section !== null ) {
+   $content = false;
+   $sectionsData = isset( 
$result['parse']['sections'] ) ? $result['parse']['sections'] : false;
+   if ( $sectionsData ) {
+   $fulltext = 
$result['parse']['wikitext']['*'];
+
+   if ( $section 
=== 0 ) {
+   
$startOffset = 0;
+   $level 
= 0;
+   } else if ( 
isset( $sectionsData[$section - 1] ) ) {
+   
$startOffset = $sectionsData[$section - 1]['byteoffset'];
+   $level 
= intval( $sectionsData[$section - 1]['level'] );
+   }
+
+   // Find the 
next section that isn't a subsection
+   $endSection = 
$section;
+   while ( 

[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[wmf/1.28.0-wmf.17]: Disable mapframe insertion conditionally

2016-09-06 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Disable mapframe insertion conditionally
..

Disable mapframe insertion conditionally

Bug: T144560
Change-Id: If2e826ff4dd48c2a248f01e697cb6f3b60d4954c
(cherry picked from commit d2d56c49d4e65dd083df61f35e0a782b89effcb9)
---
M includes/DataModule.php
M modules/ve-maps/ve.ui.MWMapsTool.js
2 files changed, 12 insertions(+), 9 deletions(-)


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

diff --git a/includes/DataModule.php b/includes/DataModule.php
index e6289fb..b559ad6 100644
--- a/includes/DataModule.php
+++ b/includes/DataModule.php
@@ -25,6 +25,7 @@
'wgKartographerSrcsetScales' => $config->get( 
'KartographerSrcsetScales' ),
'wgKartographerStyles' => $config->get( 
'KartographerStyles' ),
'wgKartographerDfltStyle' => $config->get( 
'KartographerDfltStyle' ),
+   'wgKartographerEnableMapFrame' => $config->get( 
'KartographerEnableMapFrame' ),
) );
}
 
diff --git a/modules/ve-maps/ve.ui.MWMapsTool.js 
b/modules/ve-maps/ve.ui.MWMapsTool.js
index a13fceb..aa1a74e 100644
--- a/modules/ve-maps/ve.ui.MWMapsTool.js
+++ b/modules/ve-maps/ve.ui.MWMapsTool.js
@@ -31,15 +31,17 @@
 ve.ui.MWMapsDialogTool.static.modelClasses = [ ve.dm.MWMapsNode, 
ve.dm.MWInlineMapsNode ];
 ve.ui.MWMapsDialogTool.static.commandName = 'mwMaps';
 
-/* Registration */
+if ( mw.config.get( 'wgKartographerEnableMapFrame' ) ) {
+   /* Registration */
 
-ve.ui.toolFactory.register( ve.ui.MWMapsDialogTool );
+   ve.ui.toolFactory.register( ve.ui.MWMapsDialogTool );
 
-/* Commands */
+   /* Commands */
 
-ve.ui.commandRegistry.register(
-   new ve.ui.Command(
-   'mwMaps', 'window', 'open',
-   { args: [ 'mwMaps' ], supportedSelections: [ 'linear' ] }
-   )
-);
+   ve.ui.commandRegistry.register(
+   new ve.ui.Command(
+   'mwMaps', 'window', 'open',
+   { args: [ 'mwMaps' ], supportedSelections: [ 'linear' ] 
}
+   )
+   );
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2e826ff4dd48c2a248f01e697cb6f3b60d4954c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: wmf/1.28.0-wmf.17
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: nfs-exports/nfs-exports-daemons settle on nfs-exportd

2016-09-06 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: labstore: nfs-exports/nfs-exports-daemons settle on nfs-exportd
..

labstore: nfs-exports/nfs-exports-daemons settle on nfs-exportd

Right now the service is nfs-exports and the main file is
nfs-exports-daemon.  Settle on nfs-exportd.

Change-Id: I82aa3a8f47c31b6f3c5be5f4a705ff3a25868729
---
M modules/labstore/files/start-nfs
M modules/labstore/manifests/fileserver/exports.pp
A modules/labstore/templates/initscripts/nfs-exportd.systemd.erb
D modules/labstore/templates/initscripts/nfs-exports.systemd.erb
4 files changed, 12 insertions(+), 12 deletions(-)


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

diff --git a/modules/labstore/files/start-nfs b/modules/labstore/files/start-nfs
index 4284c16..5661b18 100755
--- a/modules/labstore/files/start-nfs
+++ b/modules/labstore/files/start-nfs
@@ -45,7 +45,7 @@
 
 # Start service to make sure that ip addresses for each project
 # are maintained properly
-/bin/systemctl start nfs-exports
+/bin/systemctl start nfs-exportd
 
 # Setup service IP
 /sbin/ip addr add dev eth0 10.64.37.10/24
diff --git a/modules/labstore/manifests/fileserver/exports.pp 
b/modules/labstore/manifests/fileserver/exports.pp
index bc2776f..8219377 100644
--- a/modules/labstore/manifests/fileserver/exports.pp
+++ b/modules/labstore/manifests/fileserver/exports.pp
@@ -51,11 +51,11 @@
 require => File['/etc/nfs-mounts.yaml'],
 }
 
-file { '/usr/local/bin/nfs-exports-daemon':
+file { '/usr/local/bin/nfs-exportd':
 owner   => 'root',
 group   => 'root',
 mode=> '0555',
-source  => 'puppet:///modules/labstore/nfs-exports-daemon',
+source  => 'puppet:///modules/labstore/nfs-exportd',
 require => File['/usr/local/sbin/sync-exports'],
 }
 
@@ -66,9 +66,9 @@
 source => 'puppet:///modules/labstore/archive-project-volumes',
 }
 
-base::service_unit { 'nfs-exports':
+base::service_unit { 'nfs-exportd':
 systemd => true,
 declare_service => false,
-require => File['/usr/local/bin/nfs-exports-daemon'],
+require => File['/usr/local/bin/nfs-exportd'],
 }
 }
diff --git a/modules/labstore/templates/initscripts/nfs-exportd.systemd.erb 
b/modules/labstore/templates/initscripts/nfs-exportd.systemd.erb
new file mode 100644
index 000..e615dc7
--- /dev/null
+++ b/modules/labstore/templates/initscripts/nfs-exportd.systemd.erb
@@ -0,0 +1,7 @@
+[Unit]
+Description=NFS exports daemon
+
+[Service]
+ExecStart=/usr/local/bin/nfs-exportd --exports-d-path /etc/exports.d/ 
--config-path /etc/nfs-mounts.yaml
+Restart=on-failure
+User=nfsmanager
diff --git a/modules/labstore/templates/initscripts/nfs-exports.systemd.erb 
b/modules/labstore/templates/initscripts/nfs-exports.systemd.erb
deleted file mode 100644
index 0e46715..000
--- a/modules/labstore/templates/initscripts/nfs-exports.systemd.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-[Unit]
-Description=NFS exports daemon
-
-[Service]
-ExecStart=/usr/local/bin/nfs-exports-daemon --exports-d-path /etc/exports.d/ 
--config-path /etc/nfs-mounts.yaml
-Restart=on-failure
-User=nfsmanager

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82aa3a8f47c31b6f3c5be5f4a705ff3a25868729
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] operations/puppet[production]: ldap::role::client::labs: Allow restricted_from and _to fro...

2016-09-06 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: ldap::role::client::labs:  Allow restricted_from and _to from 
hiera
..


ldap::role::client::labs:  Allow restricted_from and _to from hiera

Bug: T101447
Change-Id: I1fe7f1dd89f08206f3f11d72d21c9f3e2f45ddf4
---
M modules/ldap/manifests/role/client.pp
1 file changed, 9 insertions(+), 5 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  Alex Monk: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/ldap/manifests/role/client.pp 
b/modules/ldap/manifests/role/client.pp
index 9e7918e..237769d 100644
--- a/modules/ldap/manifests/role/client.pp
+++ b/modules/ldap/manifests/role/client.pp
@@ -1,4 +1,8 @@
-class ldap::role::client::labs($ldapincludes=['openldap', 'utils']) {
+class ldap::role::client::labs(
+$ldapincludes=['openldap', 'utils'],
+$restricted_to = $::restricted_to,
+$restricted_from = $::restricted_from,
+) {
 include ldap::role::config::labs
 
 if ( $::realm == 'labs' ) {
@@ -23,16 +27,16 @@
 #   replaces the default group allowed to login
 #   (project members) with an explicitly specified one.
 #
-if ( $::restricted_from ) {
+if ( $restricted_from ) {
 security::access::config { 'labs-restrict-from':
-content  => "-:${::restricted_from}:ALL\n",
+content  => "-:${restricted_from}:ALL\n",
 priority => '98',
 }
 }
 
-if ( $::restricted_to ) {
+if ( $restricted_to ) {
 security::access::config { 'labs-restrict-to-group':
-content  => "-:ALL EXCEPT (${::restricted_to}) root:ALL\n",
+content  => "-:ALL EXCEPT (${restricted_to}) root:ALL\n",
 priority => '99',
 }
 } else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1fe7f1dd89f08206f3f11d72d21c9f3e2f45ddf4
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Disallow mismatched beginMasterChanges/commitMasterChanges

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

Change subject: Disallow mismatched beginMasterChanges/commitMasterChanges
..


Disallow mismatched beginMasterChanges/commitMasterChanges

Change-Id: I76a8424e94370dc3776fdac1e974bf61fa69f071
---
M includes/db/loadbalancer/LBFactory.php
1 file changed, 23 insertions(+), 3 deletions(-)

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



diff --git a/includes/db/loadbalancer/LBFactory.php 
b/includes/db/loadbalancer/LBFactory.php
index 6b5161b..e40001d 100644
--- a/includes/db/loadbalancer/LBFactory.php
+++ b/includes/db/loadbalancer/LBFactory.php
@@ -230,6 +230,7 @@
 *   - commitMasterChanges()
 *   - rollbackMasterChanges()
 *   - commitAll()
+*
 * This allows for custom transaction rounds from any outer transaction 
scope.
 *
 * @param string $fname
@@ -240,7 +241,7 @@
if ( $this->trxRoundId !== false ) {
throw new DBTransactionError(
null,
-   "Transaction round '{$this->trxRoundId}' 
already started."
+   "$fname: transaction round 
'{$this->trxRoundId}' already started."
);
}
$this->trxRoundId = $fname;
@@ -279,6 +280,12 @@
 * @throws Exception
 */
public function commitMasterChanges( $fname = __METHOD__, array 
$options = [] ) {
+   if ( $this->trxRoundId !== false && $this->trxRoundId !== 
$fname ) {
+   throw new DBTransactionError(
+   null,
+   "$fname: transaction round 
'{$this->trxRoundId}' still running."
+   );
+   }
// Run pre-commit callbacks and suppress post-commit callbacks, 
aborting on failure
$this->forEachLBCallMethod( 'finalizeMasterChanges' );
$this->trxRoundId = false;
@@ -509,7 +516,7 @@
 * This will commit and wait unless $ticket indicates it is unsafe to 
do so
 *
 * @param string $fname Caller name (e.g. __METHOD__)
-* @param mixed $ticket Result of getOuterTransactionScopeTicket()
+* @param mixed $ticket Result of getEmptyTransactionTicket()
 * @param array $opts Options to waitForReplication()
 * @throws DBReplicationWaitError
 * @since 1.28
@@ -521,8 +528,21 @@
return;
}
 
-   $this->commitMasterChanges( $fname );
+   $fnameEffective = $fname;
+   // The transaction owner and any caller with the empty 
transaction ticket can commit
+   // so that getEmptyTransactionTicket() callers don't risk 
seeing DBTransactionError.
+   if ( $this->trxRoundId !== false && $fname !== 
$this->trxRoundId ) {
+   $this->trxLogger->info( "$fname: committing on behalf 
of {$this->trxRoundId}." );
+   $fnameEffective = $this->trxRoundId;
+   }
+
+   $this->commitMasterChanges( $fnameEffective );
$this->waitForReplication( $opts );
+   // If a nested caller committed on behalf of $fname, start 
another empty $fname
+   // transaction, leaving the caller with the same empty 
transaction state as before.
+   if ( $fnameEffective !== $fname ) {
+   $this->beginMasterChanges( $fname );
+   }
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76a8424e94370dc3776fdac1e974bf61fa69f071
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Fix broken refs/meta/config diffusion links in access section

2016-09-06 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Fix broken refs/meta/config diffusion links in access section
..

Fix broken refs/meta/config diffusion links in access section

This dosent fix branches links yet.

Bug: T137354
Change-Id: If664c1684a943af0ddcdf21e16d9cecb045d4cfb
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/308885/2

diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index 57330b5..6d3b202 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -83,7 +83,7 @@
 revision = "/r/revision/${project};${commit}"
 project = /r/project/${project}
 branch = "/r/branch/${project};${branch}"
-filehistory = "/r/p/${project}/;history/${branch}/${file}"
+filehistory = "/r/p/${project}/;history/${file}/;${branch}"
 file = "/r/p/${project}/;browse/HEAD/${file}/;${commit}"
 roottree = "/r/p/${project}/;browse/HEAD/;${commit}"
 linkname = diffusion

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If664c1684a943af0ddcdf21e16d9cecb045d4cfb
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: LinkFilter: Fix return types in phpdoc

2016-09-06 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: LinkFilter: Fix return types in phpdoc
..

LinkFilter: Fix return types in phpdoc

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/308884/1

diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php
index d86291a..7b3d72b 100644
--- a/includes/LinkFilter.php
+++ b/includes/LinkFilter.php
@@ -89,7 +89,7 @@
 *
 * @param string $filterEntry Domainparts
 * @param string $protocol Protocol (default http://)
-* @return array Array to be passed to Database::buildLike() or false 
on error
+* @return array|bool Array to be passed to Database::buildLike() or 
false on error
 */
public static function makeLikeArray( $filterEntry, $protocol = 
'http://' ) {
$db = wfGetDB( DB_REPLICA );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Add 'canRender' check to EchoMentionStatusPresentationModel

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

Change subject: Add 'canRender' check to EchoMentionStatusPresentationModel
..


Add 'canRender' check to EchoMentionStatusPresentationModel

Change-Id: Ica338ff5810b62849d30e5b27709558f1b797c43
---
M includes/formatters/MentionStatusPresentationModel.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/formatters/MentionStatusPresentationModel.php 
b/includes/formatters/MentionStatusPresentationModel.php
index 2168fbc..d6366e0 100644
--- a/includes/formatters/MentionStatusPresentationModel.php
+++ b/includes/formatters/MentionStatusPresentationModel.php
@@ -20,6 +20,10 @@
return 'mention-failure';
}
 
+   public function canRender() {
+   return (bool)$this->event->getTitle();
+   }
+
public function getHeaderMessage() {
if ( $this->isTooManyMentionsFailure() ) {
$msg = $this->getMessageWithAgent( 
'notification-header-mention-failure-too-many' );

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: Provision /srv volume for prometheus

2016-09-06 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: tools: Provision /srv volume for prometheus
..


tools: Provision /srv volume for prometheus

Change-Id: Ie3ace1d363853761383fc085c7edc57a3654b6d3
---
M modules/role/manifests/prometheus/tools.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/role/manifests/prometheus/tools.pp 
b/modules/role/manifests/prometheus/tools.pp
index 2347b3e..32b1c52 100644
--- a/modules/role/manifests/prometheus/tools.pp
+++ b/modules/role/manifests/prometheus/tools.pp
@@ -9,6 +9,8 @@
 $master_host = hiera('k8s::master_host')
 $targets_path = '/srv/prometheus/tools/targets'
 
+require ::role::labs::lvm::srv
+
 prometheus::server { 'tools':
 listen_address   => '127.0.0.1:9902',
 scrape_configs_extra => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: Provision /srv volume for prometheus

2016-09-06 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: Provision /srv volume for prometheus
..

tools: Provision /srv volume for prometheus

Change-Id: Ie3ace1d363853761383fc085c7edc57a3654b6d3
---
M modules/role/manifests/prometheus/tools.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/83/308883/1

diff --git a/modules/role/manifests/prometheus/tools.pp 
b/modules/role/manifests/prometheus/tools.pp
index 2347b3e..32b1c52 100644
--- a/modules/role/manifests/prometheus/tools.pp
+++ b/modules/role/manifests/prometheus/tools.pp
@@ -9,6 +9,8 @@
 $master_host = hiera('k8s::master_host')
 $targets_path = '/srv/prometheus/tools/targets'
 
+require ::role::labs::lvm::srv
+
 prometheus::server { 'tools':
 listen_address   => '127.0.0.1:9902',
 scrape_configs_extra => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wmflib: os_version now fail when lsb vars are missing

2016-09-06 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: wmflib: os_version now fail when lsb vars are missing
..

wmflib: os_version now fail when lsb vars are missing

When doing testing with rspec-puppet, the lsb* facts are not set. A
manifest invoking os_version() ends up with a cryptic value.

Make os_version() to fail whenever the two lsb* variables it depends
upon are nil giving a meaningful message as a result:

 error during compilation: lsbdistrelease and/or lsbdistid not set

Change-Id: Iff6cca4f67b766f79b3df5c041e965025bc98091
---
M modules/wmflib/lib/puppet/parser/functions/os_version.rb
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/308882/1

diff --git a/modules/wmflib/lib/puppet/parser/functions/os_version.rb 
b/modules/wmflib/lib/puppet/parser/functions/os_version.rb
index badeb79..648379f 100644
--- a/modules/wmflib/lib/puppet/parser/functions/os_version.rb
+++ b/modules/wmflib/lib/puppet/parser/functions/os_version.rb
@@ -52,6 +52,13 @@
   }
 
   newfunction(:os_version, :type => :rvalue, :arity => 1) do |args|
+lsbdistrelease = lookupvar('lsbdistrelease')
+lsbdistid = lookupvar('lsbdistid')
+
+if lsbdistrelease.nil? or lsbdistid.nil?
+fail(ArgumentError, 'lsbdistrelease and/or lsbdistid not set')
+end
+
 self_release = lookupvar('lsbdistrelease').capitalize
 self_id = lookupvar('lsbdistid').capitalize
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Follow-up I65c58485: Fix style

2016-09-06 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Follow-up I65c58485: Fix style
..

Follow-up I65c58485: Fix style

Change-Id: Ib2f4c0c0630ca765c0b5c167b1a4ba4795d79553
---
M modules/openstack/files/kilo/nova/wikistatus/__init__.py
M modules/openstack/files/kilo/nova/wikistatus/wikistatus.py
M modules/openstack/files/liberty/nova/wikistatus/__init__.py
M modules/openstack/files/liberty/nova/wikistatus/wikistatus.py
M modules/openstack/files/mitaka/nova/wikistatus/__init__.py
M modules/openstack/files/mitaka/nova/wikistatus/wikistatus.py
M tox.ini
7 files changed, 4 insertions(+), 64 deletions(-)


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

diff --git a/modules/openstack/files/kilo/nova/wikistatus/__init__.py 
b/modules/openstack/files/kilo/nova/wikistatus/__init__.py
index 711e39e..e69de29 100644
--- a/modules/openstack/files/kilo/nova/wikistatus/__init__.py
+++ b/modules/openstack/files/kilo/nova/wikistatus/__init__.py
@@ -1,18 +0,0 @@
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-#Licensed under the Apache License, Version 2.0 (the "License"); you may
-#not use this file except in compliance with the License. You may obtain
-#a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-#Unless required by applicable law or agreed to in writing, software
-#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#License for the specific language governing permissions and limitations
-#under the License.
-
-import gettext
-import logging
diff --git a/modules/openstack/files/kilo/nova/wikistatus/wikistatus.py 
b/modules/openstack/files/kilo/nova/wikistatus/wikistatus.py
index 4a93285..41f4e24 100644
--- a/modules/openstack/files/kilo/nova/wikistatus/wikistatus.py
+++ b/modules/openstack/files/kilo/nova/wikistatus/wikistatus.py
@@ -12,7 +12,6 @@
 #WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #License for the specific language governing permissions and limitations
 #under the License.
-import sys
 
 import mwclient
 
@@ -24,7 +23,6 @@
 from nova import network
 from nova import objects
 from oslo_log import log as logging
-from nova import utils
 
 from oslo.config import cfg
 from oslo.messaging.notify import notifier
@@ -180,7 +178,7 @@
 template_param_dict['tenant'] = tenant_name
 template_param_dict['username'] = user_name
 
-inst = objects.Instance.get_by_uuid(ctxt, payload['instance_id'])
+inst = objects.Instance.get_by_uuid(ctxt, instance)
 
 simple_id = inst['id']
 ec2_id = 'i-%08x' % simple_id
diff --git a/modules/openstack/files/liberty/nova/wikistatus/__init__.py 
b/modules/openstack/files/liberty/nova/wikistatus/__init__.py
index 711e39e..e69de29 100644
--- a/modules/openstack/files/liberty/nova/wikistatus/__init__.py
+++ b/modules/openstack/files/liberty/nova/wikistatus/__init__.py
@@ -1,18 +0,0 @@
-# Copyright 2010 United States Government as represented by the
-# Administrator of the National Aeronautics and Space Administration.
-# All Rights Reserved.
-#
-#Licensed under the Apache License, Version 2.0 (the "License"); you may
-#not use this file except in compliance with the License. You may obtain
-#a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-#Unless required by applicable law or agreed to in writing, software
-#distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#License for the specific language governing permissions and limitations
-#under the License.
-
-import gettext
-import logging
diff --git a/modules/openstack/files/liberty/nova/wikistatus/wikistatus.py 
b/modules/openstack/files/liberty/nova/wikistatus/wikistatus.py
index 4a93285..41f4e24 100644
--- a/modules/openstack/files/liberty/nova/wikistatus/wikistatus.py
+++ b/modules/openstack/files/liberty/nova/wikistatus/wikistatus.py
@@ -12,7 +12,6 @@
 #WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #License for the specific language governing permissions and limitations
 #under the License.
-import sys
 
 import mwclient
 
@@ -24,7 +23,6 @@
 from nova import network
 from nova import objects
 from oslo_log import log as logging
-from nova import utils
 
 from oslo.config import cfg
 from oslo.messaging.notify import notifier
@@ -180,7 +178,7 @@
 template_param_dict['tenant'] = tenant_name
 template_param_dict['username'] = user_name
 
-inst = 

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Add 'canRender' check to EchoMentionStatusPresentationModel

2016-09-06 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: Add 'canRender' check to EchoMentionStatusPresentationModel
..

Add 'canRender' check to EchoMentionStatusPresentationModel

Change-Id: Ica338ff5810b62849d30e5b27709558f1b797c43
---
M includes/formatters/MentionStatusPresentationModel.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/includes/formatters/MentionStatusPresentationModel.php 
b/includes/formatters/MentionStatusPresentationModel.php
index 2168fbc..d6366e0 100644
--- a/includes/formatters/MentionStatusPresentationModel.php
+++ b/includes/formatters/MentionStatusPresentationModel.php
@@ -20,6 +20,10 @@
return 'mention-failure';
}
 
+   public function canRender() {
+   return (bool)$this->event->getTitle();
+   }
+
public function getHeaderMessage() {
if ( $this->isTooManyMentionsFailure() ) {
$msg = $this->getMessageWithAgent( 
'notification-header-mention-failure-too-many' );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.28.0-wmf.18]: Search all RDFa attributes when looking for type

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

Change subject: Search all RDFa attributes when looking for type
..


Search all RDFa attributes when looking for type

Bug: T144561
Change-Id: Ib42daa52796cd72babbd8a317bae948cff779c99
(cherry picked from commit adaa47804f9742b6b087feba4bc2647b83cc5815)
---
M modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js 
b/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
index da2e0c0..6dbd451 100644
--- a/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
+++ b/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
@@ -34,9 +34,9 @@
 ve.dm.MWExternalLinkAnnotation.static.name = 'link/mwExternal';
 
 ve.dm.MWExternalLinkAnnotation.static.matchFunction = function ( domElement ) {
-   var rel = domElement.getAttribute( 'rel' );
+   var type = domElement.getAttribute( 'rel' ) || domElement.getAttribute( 
'typeof' ) || domElement.getAttribute( 'property' );
// Match explicity mw:ExtLink, or plain RDFa-less links with an href 
(e.g. from external paste)
-   return ( !rel && domElement.hasAttribute( 'href' ) ) || rel === 
'mw:ExtLink';
+   return ( !type && domElement.hasAttribute( 'href' ) ) || type === 
'mw:ExtLink';
 };
 
 ve.dm.MWExternalLinkAnnotation.static.toDataElement = function ( domElements, 
converter ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib42daa52796cd72babbd8a317bae948cff779c99
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.28.0-wmf.18
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: exec-manage option parsing and list option

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

Change subject: tools: exec-manage option parsing and list option
..


tools: exec-manage option parsing and list option

* add list command to output possible execs
* shuffle usage into a function for reuse
* output on no args or -h

Change-Id: I7d1f705462d3aa65f875c87ed862f1cbcc6b444f
---
M modules/toollabs/files/exec-manage
1 file changed, 20 insertions(+), 5 deletions(-)

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



diff --git a/modules/toollabs/files/exec-manage 
b/modules/toollabs/files/exec-manage
index d6ec1c9..e71280d 100644
--- a/modules/toollabs/files/exec-manage
+++ b/modules/toollabs/files/exec-manage
@@ -3,11 +3,21 @@
 # This script helps manage Grid Engine exec nodes by allowing for depool,
 # repool, and check status, given an exec node hostname.
 
-# Usage: exec-manage.sh exec_host_name [status|depool|repool|test]
-# Example: ./exec-manage.sh tools-exec1001.eqiad.wmflabs status
 
 set -e
 
+function usage {
+echo -e "Usage:\n"
+echo "exec-manage exec_host_name [status|depool|repool|test]"
+echo "exec-manage [list]"
+echo ""
+echo "Example: exec-manage tools-exec1001.eqiad.wmflabs status"
+}
+
+if [[ ! "$1" || "$1" == '-h' ]]; then
+usage
+exit 0
+fi
 
 if [ "$#" -ne 2 ]; then
 echo "Wrong number of parameters"
@@ -71,6 +81,13 @@
 
 ;;
 
+list)
+
+# list all exec nodes
+/usr/bin/qconf -sel
+
+;;
+
 repool)
 
 # Enables all queues on this host
@@ -107,9 +124,7 @@
 ;;
 
 *)
-
-# Print usage
-echo "Usage: exec-manage.sh exec_host_name [status|depool|repool|test]"
+usage
 
 ;;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d1f705462d3aa65f875c87ed862f1cbcc6b444f
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Merlijn van Deen 
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] operations/puppet[production]: toollabs: Allow $::node_dedicated_tool to be set from hiera

2016-09-06 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: toollabs:  Allow $::node_dedicated_tool to be set from hiera
..


toollabs:  Allow $::node_dedicated_tool to be set from hiera

Bug: T101447
Change-Id: I61133a9c469dc98740bc81e1a866bf72cf1bad43
---
M modules/toollabs/manifests/node/compute/dedicated.pp
M modules/toollabs/templates/gridengine/queue-dedicated.erb
2 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  Alex Monk: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/toollabs/manifests/node/compute/dedicated.pp 
b/modules/toollabs/manifests/node/compute/dedicated.pp
index 25e0f6d..0ee06c8 100644
--- a/modules/toollabs/manifests/node/compute/dedicated.pp
+++ b/modules/toollabs/manifests/node/compute/dedicated.pp
@@ -10,22 +10,22 @@
 #
 # Sample Usage:
 #
-class toollabs::node::compute::dedicated {
+class toollabs::node::compute::dedicated($dedicated_tool = 
$::node_dedicated_tool) {
 
 include toollabs::node::all
 
-if $::node_dedicated_tool {
+if $dedicated_tool {
 
 system::role { 'toollabs::node::compute::dedicated':
-description => "Computation node dedicated to 
${::labsproject}.${::node_dedicated_tool}",
+description => "Computation node dedicated to 
${::labsproject}.${dedicated_tool}",
 }
 
-class { 'toollabs::queues': queues => [ $::node_dedicated_tool ] }
+class { 'toollabs::queues': queues => [ $dedicated_tool ] }
 
 # Having the collector in the instance means that, for the time
 # being, dedicated queues can have just the one one in them.
 
-gridengine::collectors::queues { $::node_dedicated_tool:
+gridengine::collectors::queues { $dedicated_tool:
 store   => "${toollabs::collectors}/queues",
 config  => 'toollabs/gridengine/queue-dedicated.erb',
 require => Class['toollabs::queues'],
diff --git a/modules/toollabs/templates/gridengine/queue-dedicated.erb 
b/modules/toollabs/templates/gridengine/queue-dedicated.erb
index ae21c2d..56bd397 100644
--- a/modules/toollabs/templates/gridengine/queue-dedicated.erb
+++ b/modules/toollabs/templates/gridengine/queue-dedicated.erb
@@ -13,8 +13,8 @@
 shell_start_mode  unix_behavior
 terminate_method  /usr/local/bin/jobkill $job_pid
 notify00:00:60
-user_list <%= @node_dedicated_tool %>
-owner_list<%= @node_dedicated_tool %>
+user_list <%= @dedicated_tool %>
+owner_list<%= @dedicated_tool %>
 prologNONE
 epilogNONE
 processorsUNDEFINED

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61133a9c469dc98740bc81e1a866bf72cf1bad43
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Merlijn van Deen 
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] mediawiki...VisualEditor[wmf/1.28.0-wmf.18]: Search all RDFa attributes when looking for type

2016-09-06 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Search all RDFa attributes when looking for type
..

Search all RDFa attributes when looking for type

Bug: T144561
Change-Id: Ib42daa52796cd72babbd8a317bae948cff779c99
(cherry picked from commit adaa47804f9742b6b087feba4bc2647b83cc5815)
(cherry picked from commit e6572deecae643739ec6870c0cabe802c6cedefc)
---
M modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js 
b/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
index da2e0c0..6dbd451 100644
--- a/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
+++ b/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
@@ -34,9 +34,9 @@
 ve.dm.MWExternalLinkAnnotation.static.name = 'link/mwExternal';
 
 ve.dm.MWExternalLinkAnnotation.static.matchFunction = function ( domElement ) {
-   var rel = domElement.getAttribute( 'rel' );
+   var type = domElement.getAttribute( 'rel' ) || domElement.getAttribute( 
'typeof' ) || domElement.getAttribute( 'property' );
// Match explicity mw:ExtLink, or plain RDFa-less links with an href 
(e.g. from external paste)
-   return ( !rel && domElement.hasAttribute( 'href' ) ) || rel === 
'mw:ExtLink';
+   return ( !type && domElement.hasAttribute( 'href' ) ) || type === 
'mw:ExtLink';
 };
 
 ve.dm.MWExternalLinkAnnotation.static.toDataElement = function ( domElements, 
converter ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib42daa52796cd72babbd8a317bae948cff779c99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.28.0-wmf.18
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.28.0-wmf.17]: Search all RDFa attributes when looking for type

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

Change subject: Search all RDFa attributes when looking for type
..


Search all RDFa attributes when looking for type

Bug: T144561
Change-Id: Ib42daa52796cd72babbd8a317bae948cff779c99
(cherry picked from commit adaa47804f9742b6b087feba4bc2647b83cc5815)
---
M modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js 
b/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
index 2196a77..89432e0 100644
--- a/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
+++ b/modules/ve-mw/dm/annotations/ve.dm.MWExternalLinkAnnotation.js
@@ -34,9 +34,9 @@
 ve.dm.MWExternalLinkAnnotation.static.name = 'link/mwExternal';
 
 ve.dm.MWExternalLinkAnnotation.static.matchFunction = function ( domElement ) {
-   var rel = domElement.getAttribute( 'rel' );
+   var type = domElement.getAttribute( 'rel' ) || domElement.getAttribute( 
'typeof' ) || domElement.getAttribute( 'property' );
// Match explicity mw:ExtLink, or plain RDFa-less links with an href 
(e.g. from external paste)
-   return ( !rel && domElement.hasAttribute( 'href' ) ) || rel === 
'mw:ExtLink';
+   return ( !type && domElement.hasAttribute( 'href' ) ) || type === 
'mw:ExtLink';
 };
 
 ve.dm.MWExternalLinkAnnotation.static.toDataElement = function ( domElements, 
converter ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib42daa52796cd72babbd8a317bae948cff779c99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.28.0-wmf.17
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Count local unread notifications when mark-all-read is clicked

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

Change subject: Count local unread notifications when mark-all-read is clicked
..


Count local unread notifications when mark-all-read is clicked

Rather than counting all local notifications, which was an error.
Depends on the Echo commit I90aa4b83cdc

Bug: T141404
Change-Id: I94b7f1099da1754f82e6e6807a106a35b00dd58d
Depends-On: I90aa4b83cdc1f3c1c793f8ca88b532a428c7b0af
---
M resources/mobile.notifications.overlay/NotificationsOverlay.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/mobile.notifications.overlay/NotificationsOverlay.js 
b/resources/mobile.notifications.overlay/NotificationsOverlay.js
index 6db8e3b..a670f49 100644
--- a/resources/mobile.notifications.overlay/NotificationsOverlay.js
+++ b/resources/mobile.notifications.overlay/NotificationsOverlay.js
@@ -141,7 +141,7 @@
 */
onMarkAllReadButtonClick: function () {
var overlay = this,
-   numNotifications = 
this.controller.manager.getLocalNotifications().length;
+   numNotifications = 
this.controller.manager.getLocalUnread().length;
 
this.controller.markLocalNotificationsRead()
.then( function () {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Add method to get local unread notifications in the manager

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

Change subject: Add method to get local unread notifications in the manager
..


Add method to get local unread notifications in the manager

Bug: T141404
Change-Id: I90aa4b83cdc1f3c1c793f8ca88b532a428c7b0af
---
M modules/model/mw.echo.dm.ModelManager.js
1 file changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/modules/model/mw.echo.dm.ModelManager.js 
b/modules/model/mw.echo.dm.ModelManager.js
index cc7ecb1..706413d 100644
--- a/modules/model/mw.echo.dm.ModelManager.js
+++ b/modules/model/mw.echo.dm.ModelManager.js
@@ -288,6 +288,18 @@
};
 
/**
+* Get local unread notifications
+*
+* @return {mw.echo.dm.NotificationItem[]} Local unread notifications
+*/
+   mw.echo.dm.ModelManager.prototype.getLocalUnread = function () {
+   var isUnread = function ( item ) {
+   return !item.isRead();
+   };
+
+   return this.getLocalNotifications().filter( isUnread );
+   };
+   /**
 * Check whether there are talk notifications, and emit an event
 * in case there aren't any left.
 *

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: thumb.php: Provide title context for error messages

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

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

Change subject: thumb.php: Provide title context for error messages
..

thumb.php: Provide title context for error messages

Change-Id: I3c854724bc9e34a2e4c1d57a084c663d654b52c6
---
M thumb.php
1 file changed, 8 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/79/308879/1

diff --git a/thumb.php b/thumb.php
index fca25c5..a8c9514 100644
--- a/thumb.php
+++ b/thumb.php
@@ -147,7 +147,7 @@
 
// Check the source file title
if ( !$img ) {
-   wfThumbError( 404, wfMessage( 'badtitletext' )->parse() );
+   wfThumbError( 404, wfMessage( 'badtitletext' )->title( $title 
)->parse() );
return;
}
 
@@ -327,10 +327,10 @@
 
$user = RequestContext::getMain()->getUser();
if ( !wfThumbIsStandard( $img, $params ) && $user->pingLimiter( 
'renderfile-nonstandard' ) ) {
-   wfThumbError( 429, wfMessage( 'actionthrottledtext' )->parse() 
);
+   wfThumbError( 429, wfMessage( 'actionthrottledtext' )->title( 
$title )->parse() );
return;
} elseif ( $user->pingLimiter( 'renderfile' ) ) {
-   wfThumbError( 429, wfMessage( 'actionthrottledtext' )->parse() 
);
+   wfThumbError( 429, wfMessage( 'actionthrottledtext' )->title( 
$title )->parse() );
return;
}
 
@@ -339,7 +339,8 @@
/** @var MediaTransformOutput|MediaTransformError|bool $thumb */
 
// Check for thumbnail generation errors...
-   $msg = wfMessage( 'thumbnail_error' );
+   $msg = wfMessage( 'thumbnail_error' )->title( $title );
+   $errorMsg = false;
$errorCode = 500;
if ( !$thumb ) {
$errorMsg = $errorMsg ?: $msg->rawParams( 'File::transform() 
returned false' )->escaped();
@@ -433,8 +434,9 @@
? $file->transform( $params, 
File::RENDER_NOW )
: false; // retry once more in 
exclusive mode
},
-   'error' => function ( Status $status ) {
-   return wfMessage( 'generic-pool-error' 
)->parse() . '' . $status->getHTML();
+   'error' => function ( Status $status ) use ( 
$title ) {
+   return wfMessage( 'generic-pool-error' 
)->title( $title )->parse() .
+   '' . $status->getHTML();
}
]
);

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rm unused 'remembermypassword' message, doc another

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

Change subject: Rm unused 'remembermypassword' message, doc another
..


Rm unused 'remembermypassword' message, doc another

* Remove unused 'remembermypassword' message
* Document parameter of 'userlogin-remembermypassword'

Bug: T68699
Change-Id: I513eff348383803d089e969707eb42559f275dcf
---
M languages/i18n/en.json
M languages/i18n/qqq.json
2 files changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index b55cb76..c8d02cc 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -408,7 +408,6 @@
"yourpasswordagain": "Retype password:",
"createacct-yourpasswordagain": "Confirm password",
"createacct-yourpasswordagain-ph": "Enter password again",
-   "remembermypassword": "Remember my login on this browser (for a maximum 
of $1 {{PLURAL:$1|day|days}})",
"userlogin-remembermypassword": "Keep me logged in",
"userlogin-signwithsecure": "Use secure connection",
"cannotloginnow-title": "Cannot log in now",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 953ebbb..419828f 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -591,8 +591,7 @@
"yourpasswordagain": "Since 1.22 no longer used in core, but may be 
used by some extensions. DEPRECATED",
"createacct-yourpasswordagain": "In create account form, label for 
field to re-enter password\n\nSee example: 
[{{canonicalurl:Special:UserLogin|type=signup}} 
Special:UserLogin?type=signup]\n{{Identical|Confirm password}}",
"createacct-yourpasswordagain-ph": "Placeholder text in create account 
form for re-enter password field.\n\nSee example: 
[{{canonicalurl:Special:UserLogin|type=signup}} Special:UserLogin?type=signup]",
-   "remembermypassword": "Used as checkbox label on 
[[Special:ChangePassword]]. Parameters:\n* $1 - number of 
days\n{{Identical|Remember my login on this computer}}",
-   "userlogin-remembermypassword": "The text for a check box in 
[[Special:UserLogin]].",
+   "userlogin-remembermypassword": "Used as checkbox label in 
[[Special:UserLogin]]. Parameters:\n* $1 - number of days the login session 
will be active if checked (Unused but used on-wiki)\n",
"userlogin-signwithsecure": "Text of link to HTTPS login form.\n\nSee 
example: [[Special:UserLogin]]",
"cannotloginnow-title": "Error page title shown when logging in is not 
possible.",
"cannotloginnow-text": "Error page text shown when logging in is not 
possible. Parameters:\n* $1 - Session type in use that makes it not possible to 
log in, from a message like 
{{msg-mw|sessionprovider-mediawiki-session-cookiesessionprovider}}.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I513eff348383803d089e969707eb42559f275dcf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Jforrester 
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] operations/puppet[production]: role::labs::lvm::mnt: Allow mount_point to be set from hiera

2016-09-06 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: role::labs::lvm::mnt:  Allow mount_point to be set from hiera
..


role::labs::lvm::mnt:  Allow mount_point to be set from hiera

Bug: T101447
Change-Id: Ia36380fe0d8436c04baaaea178290782012a41d8
---
M modules/role/manifests/labs/lvm/mnt.pp
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  Alex Monk: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/role/manifests/labs/lvm/mnt.pp 
b/modules/role/manifests/labs/lvm/mnt.pp
index 7acabe4..03b7d91 100644
--- a/modules/role/manifests/labs/lvm/mnt.pp
+++ b/modules/role/manifests/labs/lvm/mnt.pp
@@ -3,10 +3,10 @@
 # FIXME: Deprecate and kill with mild fire
 #
 # filtertags: labs-project-labtestproject
-class role::labs::lvm::mnt {
-$mount_point = $::lvm_mount_point ? {
+class role::labs::lvm::mnt($mount_point = $::lvm_mount_point) {
+$mount = $mount_point ? {
 undef   => '/mnt',
-default => $::lvm_mount_point,
+default => $mount_point,
 }
-labs_lvm::volume { 'second-local-disk': mountat => $mount_point }
+labs_lvm::volume { 'second-local-disk': mountat => $mount }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia36380fe0d8436c04baaaea178290782012a41d8
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Provide message a title context where we know it

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

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

Change subject: Provide message a title context where we know it
..

Provide message a title context where we know it

Change-Id: I746f7b6ceb2c231c7e5eb40543bfd22ad58eea21
---
M includes/page/EditPagePage.php
M includes/page/PageContent.php
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/includes/page/EditPagePage.php b/includes/page/EditPagePage.php
index 6c9a169..5d4f422 100644
--- a/includes/page/EditPagePage.php
+++ b/includes/page/EditPagePage.php
@@ -181,7 +181,7 @@
$html .
Html::closeElement( 'span' ) .
Html::OpenElement( 'label', [ 'for' => 
'wpQuality-container' ] ) .
-   wfMessage( 'proofreadpage_page_status' 
)->parse() .
+   wfMessage( 'proofreadpage_page_status' 
)->title( $this->getTitle() )->parse() .
Html::closeElement( 'label' );
}
 
diff --git a/includes/page/PageContent.php b/includes/page/PageContent.php
index 5417b22..346371c 100644
--- a/includes/page/PageContent.php
+++ b/includes/page/PageContent.php
@@ -240,7 +240,8 @@
 
// html container
$html = Html::openElement( 'div', [ 'class' => 
'prp-page-qualityheader quality' . $this->level->getLevel() ] ) .
-   wfMessage( 'proofreadpage_quality' . 
$this->level->getLevel() . '_message' )->inContentLanguage()->parse() .
+   wfMessage( 'proofreadpage_quality' . 
$this->level->getLevel() . '_message' )
+   ->title( $title )->inContentLanguage()->parse() 
.
Html::closeElement( 'div' ) .
Html::openElement( 'div', [ 'class' => 'pagetext' ] ) .
$parserOutput->getText() .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I746f7b6ceb2c231c7e5eb40543bfd22ad58eea21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Don't display place for tutorial if it is skipped

2016-09-06 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review.

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

Change subject: Don't display place for tutorial if it is skipped
..

Don't display place for tutorial if it is skipped

This only works if the global or campaign settings say to skip it.  User
prefs that skip it still show the place.

This makes sense because the user cannot use the back button to reach
the “Learn” step, so showing that the step is being skipped is confusing.

Change-Id: I126a38c8bad4077e0dc885169f9be5ff55778577
---
M resources/mw.UploadWizard.js
M resources/uploadWizard.css
2 files changed, 44 insertions(+), 39 deletions(-)


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

diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 0334cf1..3ac4b41 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -137,7 +137,7 @@
this.initialiseSteps();
 
// "select" the first step - highlight, make it 
visible, hide all others
-   this.steps.tutorial.moveTo();
+   this.steps.firstStep.moveTo();
},
 
/**
@@ -146,48 +146,54 @@
initialiseSteps: function () {
var wizard = this;
 
-   this.steps = {
-   tutorial: new uw.controller.Tutorial( this.api, 
this.config ),
+   if ( !this.config.tutorial.skip ) {
+   this.steps.tutorial = new 
uw.controller.Tutorial( this.api, this.config );
+   }
+   this.steps.file = new uw.controller.Upload( this.api, 
this.config )
+   .on( 'flickr-ui-init', function () {
+   wizard.flickrInterfaceInit();
+   uw.eventFlowLogger.logEvent( 
'flickr-upload-button-clicked' );
+   } )
 
-   file: new uw.controller.Upload( this.api, 
this.config )
-   .on( 'flickr-ui-init', function () {
-   wizard.flickrInterfaceInit();
-   uw.eventFlowLogger.logEvent( 
'flickr-upload-button-clicked' );
-   } )
+   .on( 'load', function () {
+   wizard.reset();
 
-   .on( 'load', function () {
-   wizard.reset();
+   // Check for iOS 5 Safari's lack of 
file uploads (T34328#364508).
+   // While this looks extremely unlikely 
to be right, it actually is. Blame Apple.
+   if ( $( '' ).prop( 
'disabled' ) ) {
+   $( '#mwe-upwiz-stepdiv-file' 
).replaceWith(
+   $( '' ).msg( 
'mwe-upwiz-file-upload-notcapable' )
+   );
+   $( '#mwe-upwiz-add-file' 
).hide();
+   }
+   } );
 
-   // Check for iOS 5 Safari's 
lack of file uploads (T34328#364508).
-   // While this looks extremely 
unlikely to be right, it actually is. Blame Apple.
-   if ( $( '' 
).prop( 'disabled' ) ) {
-   $( 
'#mwe-upwiz-stepdiv-file' ).replaceWith(
-   $( '' 
).msg( 'mwe-upwiz-file-upload-notcapable' )
-   );
-   $( 
'#mwe-upwiz-add-file' ).hide();
-   }
-   } ),
+   this.steps.deeds = new uw.controller.Deed( this.api, 
this.config )
+   .on( 'load', function () {
+   wizard.removeErrorUploads();
+   } );
 
-   deeds: new uw.controller.Deed( this.api, 
this.config )
-   .on( 'load', function () {
-   wizard.removeErrorUploads();
-   } ),
+   this.steps.details = new uw.controller.Details( 
this.api, this.config )
+   .on( 'details-error', function () {
+  

  1   2   3   4   5   >