[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Do not try to process same change ID twice

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

Change subject: Do not try to process same change ID twice
..


Do not try to process same change ID twice

Bug: T153932
Change-Id: I5c970930b0da99f6567279ce0ebfbba040bd7f91
---
M tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
M 
tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
M 
tools/src/test/java/org/wikidata/query/rdf/tool/change/RecentChangesPollerUnitTest.java
3 files changed, 46 insertions(+), 29 deletions(-)

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



diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
index 611dc55..b93a952 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
@@ -315,6 +315,7 @@
 }
 } while (batch == null);
 log.debug("{} changes in batch", batch.changes().size());
+Date oldDate = null;
 while (true) {
 try {
 handleChanges(batch);
@@ -326,7 +327,11 @@
  * have some updates.
  */
 leftOffDate = new Date(batch.leftOffDate().getTime() - 
SECONDS.toMillis(1));
-rdfRepository.updateLeftOffTime(leftOffDate);
+if (oldDate == null || !oldDate.equals(leftOffDate)) {
+// Do not update repo with the same date
+oldDate = leftOffDate;
+rdfRepository.updateLeftOffTime(leftOffDate);
+}
 }
 // TODO wrap all retry-able exceptions in a special exception
 batchAdvanced.mark(batch.advanced());
@@ -435,10 +440,11 @@
  * @throws InterruptedException if the process was interrupted while 
waiting
  * during the pollDelay or waiting on something else
  */
-private B nextBatch(B batch) throws InterruptedException {
+private B nextBatch(B prevBatch) throws InterruptedException {
+B batch;
 while (true) {
 try {
-batch = changeSource.nextBatch(batch);
+batch = changeSource.nextBatch(prevBatch);
 } catch (RetryableException e) {
 log.warn("Retryable error fetching next batch.  Retrying.", e);
 continue;
diff --git 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
index 489ef9c..09ca176 100644
--- 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
+++ 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
@@ -4,8 +4,10 @@
 
 import java.text.DateFormat;
 import java.util.Date;
+import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Set;
 
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
@@ -51,7 +53,7 @@
 
 @Override
 public Batch nextBatch(Batch lastBatch) throws RetryableException {
-return batch(lastBatch.leftOffDate, lastBatch.nextContinue);
+return batch(lastBatch.leftOffDate, lastBatch);
 }
 
 /**
@@ -62,20 +64,21 @@
  * The date where we last left off.
  */
 private final Date leftOffDate;
+
 /**
- * The continue object that must be sent to wikibase to continue where
- * we left off.
+ * The set of the rcid's this batch seen.
+ * Note that some IDs may be seen but not processed
+ * due to duplicates, etc.
  */
-private final JSONObject nextContinue;
+private final Set seenIDs;
 
 /**
  * A batch that will next continue using the continue parameter.
  */
-private Batch(ImmutableList changes, long advanced, String 
leftOff, Date nextStartTime,
-JSONObject nextContinue) {
+private Batch(ImmutableList changes, long advanced, String 
leftOff, Date nextStartTime, Set seenIDs) {
 super(changes, advanced, leftOff);
 leftOffDate = nextStartTime;
-this.nextContinue = nextContinue;
+this.seenIDs = seenIDs;
 }
 
 @Override
@@ -90,8 +93,16 @@
 
 @Override
 public String leftOffHuman() {
-return leftOffDate.toString() + " (next: " + 
nextContinue.get("rccontinue").toString()
-+ ")";
+return WikibaseRepository.inputDateFormat().format(leftOffDate);
+// + " (next: " + nextContinue.get("rccontinue").toString() + ")";
+}
+
+/**
+ * Get the list of IDs this batch has seen.
+ * @return

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Extension:Babel's category on cswikiversity

2017-01-05 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330847 )

Change subject: Enable Extension:Babel's category on cswikiversity
..

Enable Extension:Babel's category on cswikiversity

Bug: T67211
Change-Id: Ie366d04c35a3e8d007c305ad6797cc9f34f42b43
---
M wmf-config/InitialiseSettings.php
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b31c679..5c65fe6 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14862,6 +14862,15 @@
'5' => false,
'N' => 'Usuaris %code%-N',
],
+   'cswikiversity' => [ // T67211
+   '0' => 'Uživatel %code%-0',
+   '1' => 'Uživatel %code%-1',
+   '2' => 'Uživatel %code%-2',
+   '3' => 'Uživatel %code%-3',
+   '4' => 'Uživatel %code%-4',
+   '5' => 'Uživatel %code%-5',
+   'N' => 'Uživatel %code%-N',
+   ],
'cawiktionary' => [ // T49287
'0' => false,
'1' => 'Usuaris %code%-1',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Explicitely check for method structure before using

2017-01-05 Thread Samwilson (Code Review)
Samwilson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330846 )

Change subject: Explicitely check for method structure before using
..

Explicitely check for method structure before using

This makes sure a couple of array keys exist before using them.

Bug: T154731
Change-Id: I29bc999ed4ae8dec3e672bea3d394362af8c50a7
---
M MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer 
refs/changes/46/330846/1

diff --git a/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php 
b/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
index b1e3260..de84420 100644
--- a/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
+++ b/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
@@ -108,8 +108,13 @@
&& $stackPtr < $this->eligableCls['scope_end']
) {
if ( $currToken['code'] === T_FUNCTION ) {
+   // If this is a function, make sure it's 
eligible
+   // (i.e. not static or abstract, and has a 
body).
$methodProps = $phpcsFile->getMethodProperties( 
$stackPtr );
-   if ( !$methodProps['is_static'] && 
!$methodProps['is_abstract'] ) {
+   $isStaticOrAbstract = $methodProps['is_static'] 
|| $methodProps['is_abstract'];
+   $hasBody = isset( $currToken['scope_opener'] )
+   && isset( $currToken['scope_closer'] );
+   if ( !$isStaticOrAbstract && $hasBody ) {
$funcNamePtr = $phpcsFile->findNext( 
T_STRING, $stackPtr );
$this->eligableFunc = [
'name' => 
$tokens[$funcNamePtr]['content'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29bc999ed4ae8dec3e672bea3d394362af8c50a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: Samwilson 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add tagging support to imagerotate, revisiondelete, and tag ...

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

Change subject: Add tagging support to imagerotate, revisiondelete, and tag API 
modules
..


Add tagging support to imagerotate, revisiondelete, and tag API modules

Adds a tags parameter. This allows a user with the applychangetags right to tag 
the log entry corresponding to the action.

Bug: T97720
Change-Id: I11418d22ee780944e92d82e32b271b8276c396bf
---
M includes/api/ApiImageRotate.php
M includes/api/ApiRevisionDelete.php
M includes/api/ApiTag.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
M includes/revisiondelete/RevDelList.php
6 files changed, 69 insertions(+), 7 deletions(-)

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



diff --git a/includes/api/ApiImageRotate.php b/includes/api/ApiImageRotate.php
index 72fb16d..71bda6d 100644
--- a/includes/api/ApiImageRotate.php
+++ b/includes/api/ApiImageRotate.php
@@ -42,6 +42,14 @@
'invalidTitles', 'special', 'missingIds', 
'missingRevIds', 'interwikiTitles',
] );
 
+   // Check if user can add tags
+   if ( count( $params['tags'] ) ) {
+   $ableToTag = ChangeTags::canAddTagsAccompanyingChange( 
$params['tags'], $this->getUser() );
+   if ( !$ableToTag->isOK() ) {
+   $this->dieStatus( $ableToTag );
+   }
+   }
+
foreach ( $pageSet->getTitles() as $title ) {
$r = [];
$r['id'] = $title->getArticleID();
@@ -104,8 +112,16 @@
$comment = wfMessage(
'rotate-comment'
)->numParams( $rotation 
)->inContentLanguage()->text();
-   $status = $file->upload( $dstPath,
-   $comment, $comment, 0, false, false, 
$this->getUser() );
+   $status = $file->upload(
+   $dstPath,
+   $comment,
+   $comment,
+   0,
+   false,
+   false,
+   $this->getUser(),
+   $params['tags'] ?: []
+   );
if ( $status->isGood() ) {
$r['result'] = 'Success';
} else {
@@ -157,6 +173,10 @@
'continue' => [
ApiBase::PARAM_HELP_MSG => 
'api-help-param-continue',
],
+   'tags' => [
+   ApiBase::PARAM_TYPE => 'tags',
+   ApiBase::PARAM_ISMULTI => true,
+   ],
];
if ( $flags ) {
$result += $this->getPageSet()->getFinalParams( $flags 
);
diff --git a/includes/api/ApiRevisionDelete.php 
b/includes/api/ApiRevisionDelete.php
index 763aef5..4896e7e 100644
--- a/includes/api/ApiRevisionDelete.php
+++ b/includes/api/ApiRevisionDelete.php
@@ -46,6 +46,14 @@
$this->dieWithError( [ 'apierror-paramempty', 'ids' ], 
'paramempty_ids' );
}
 
+   // Check if user can add tags
+   if ( count( $params['tags'] ) ) {
+   $ableToTag = ChangeTags::canAddTagsAccompanyingChange( 
$params['tags'], $user );
+   if ( !$ableToTag->isOK() ) {
+   $this->dieStatus( $ableToTag );
+   }
+   }
+
$hide = $params['hide'] ?: [];
$show = $params['show'] ?: [];
if ( array_intersect( $hide, $show ) ) {
@@ -90,9 +98,12 @@
$list = RevisionDeleter::createList(
$params['type'], $this->getContext(), $targetObj, 
$params['ids']
);
-   $status = $list->setVisibility(
-   [ 'value' => $bitfield, 'comment' => $params['reason'], 
'perItemStatus' => true ]
-   );
+   $status = $list->setVisibility( [
+   'value' => $bitfield,
+   'comment' => $params['reason'],
+   'perItemStatus' => true,
+   'tags' => $params['tags']
+   ] );
 
$result = $this->getResult();
$data = $this->extractStatusInfo( $status );
@@ -165,6 +176,10 @@
ApiBase::PARAM_DFLT => 'nochange',
  

[MediaWiki-commits] [Gerrit] integration/config[master]: Fixup operations-mw-config-composer-jessie job

2017-01-05 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330845 )

Change subject: Fixup operations-mw-config-composer-jessie job
..

Fixup operations-mw-config-composer-jessie job

- Embed fetch script since nodepool doesn't have the latest
  slave-scripts yet.

- Run on contintLabsSlave because operations/mediawik-config
  requires slim/slim which requires php-mcript, which nodepool
  instances don't have.

Change-Id: Ibf89840764a12672d959ca3b04b20e681714f136
---
M jjb/macro.yaml
M jjb/operations-misc.yaml
2 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/45/330845/1

diff --git a/jjb/macro.yaml b/jjb/macro.yaml
index 70e2702..37caa2a 100644
--- a/jjb/macro.yaml
+++ b/jjb/macro.yaml
@@ -487,7 +487,11 @@
 - builder:
 name: fetch-composer-dev
 builders:
- - shell: 
"/srv/deployment/integration/slave-scripts/bin/fetch-composer-dev.sh"
+ - shell: |
+#!/bin/bash -eu
+# Load require-dev packages on top of vendor (T92605, T112895)
+set -o pipefail
+node 
/srv/deployment/integration/slave-scripts/tools/composer-dev-args.js 
"composer.json" | xargs composer require --dev --ansi --no-progress 
--prefer-dist -v
 
 - builder:
 name: mw-run-update-script
diff --git a/jjb/operations-misc.yaml b/jjb/operations-misc.yaml
index 9d70479..82cb6f7 100644
--- a/jjb/operations-misc.yaml
+++ b/jjb/operations-misc.yaml
@@ -56,13 +56,13 @@
 
 - job:
 name: 'operations-mw-config-composer-jessie'
-node: ci-jessie-wikimedia
+node: contintLabsSlave && UbuntuTrusty
 defaults: use-remoteonly-zuul
 concurrent: true
 triggers:
  - zuul
 builders:
  - composer-validate:
-dir: '.'
+ dir: '.'
  - fetch-composer-dev
  - composer-test

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T152633: Fix crasher from ConstrainedText

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

Change subject: T152633: Fix crasher from ConstrainedText
..


T152633: Fix crasher from ConstrainedText

 * `undefined` values, like the occasional dp.src, are creeping into
   ContrainedText.text, which is assumed to always be a string.

 * One instance is closed here, but log some warnings to suss out other
   potential sources.

 * We should only ever be emitting strings.

Change-Id: I0c071d3a6a121582c9b6b53eab897a450069cb47
---
M lib/html2wt/ConstrainedText.js
M lib/html2wt/DOMHandlers.js
M lib/html2wt/SerializerState.js
3 files changed, 15 insertions(+), 6 deletions(-)

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



diff --git a/lib/html2wt/ConstrainedText.js b/lib/html2wt/ConstrainedText.js
index 4224eaf..cd0e8c2 100644
--- a/lib/html2wt/ConstrainedText.js
+++ b/lib/html2wt/ConstrainedText.js
@@ -107,7 +107,7 @@
  */
 ConstrainedText.cast = function(o, node) {
if (o instanceof ConstrainedText) { return o; }
-   return new ConstrainedText({ text: o, node: node });
+   return new ConstrainedText({ text: o || '', node: node });
 };
 /**
  * Use the provided `state`, which gives context and access to the entire
diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js
index 306188c..172cc1f 100644
--- a/lib/html2wt/DOMHandlers.js
+++ b/lib/html2wt/DOMHandlers.js
@@ -1071,7 +1071,7 @@
} else if (type) {
switch (type) {
case 'mw:Includes/IncludeOnly':
-   state.emitChunk(dp.src, node);
+   state.emitChunk(dp.src || '', 
node);
break;
case 'mw:Includes/IncludeOnly/End':
// Just ignore.
diff --git a/lib/html2wt/SerializerState.js b/lib/html2wt/SerializerState.js
index edac27e..d8419f3 100644
--- a/lib/html2wt/SerializerState.js
+++ b/lib/html2wt/SerializerState.js
@@ -254,29 +254,38 @@
 /**
  */
 SSP.push = function(text, node) {
-   this.currLine.chunks.push(ConstrainedText.cast(text, node));
+   console.assert(text instanceof ConstrainedText);
+   this.currLine.chunks.push(text);
 };
 
 /**
  */
 SSP.pushSep = function(sep, node, debugPrefix) {
+   if (!(sep instanceof String)) {
+   this.env.log('warning', 'Emitting non-string value: ' + 
String(sep));
+   }
+   sep = ConstrainedText.cast(sep, node);
+
// Replace newlines if we're in a single-line context
if (this.singleLineContext.enforced()) {
-   sep = sep.replace(/\n/g, ' ');
+   sep.text = sep.text.replace(/\n/g, ' ');
}
 
this.push(sep, node);
 
// Reset separator state
this.sep = {};
-   this.sepIntroducedSOL(sep || '');
+   this.sepIntroducedSOL(sep.text);
 
this.env.log(this.serializer.logType,
"--->", debugPrefix,
-   function() { return JSON.stringify(sep); });
+   function() { return JSON.stringify(sep.text); });
 };
 
 SSP.emitChunk = function(res, node) {
+   if (!(res instanceof String)) {
+   this.env.log('warning', 'Emitting non-string value: ' + 
String(res));
+   }
res = ConstrainedText.cast(res, node);
 
// Replace newlines if we're in a single-line context

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c071d3a6a121582c9b6b53eab897a450069cb47
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Fix parameter alignment

2017-01-05 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330844 )

Change subject: Fix parameter alignment
..

Fix parameter alignment

See: https://doc.wikimedia.org/puppet/puppet_classes/apertium.html
Change-Id: Ie1fa9bbebda7d308136cf88e9f54800b4d0d1511
---
M modules/apertium/manifests/init.pp
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/330844/1

diff --git a/modules/apertium/manifests/init.pp 
b/modules/apertium/manifests/init.pp
index bf0fbe5..b807167 100644
--- a/modules/apertium/manifests/init.pp
+++ b/modules/apertium/manifests/init.pp
@@ -6,13 +6,13 @@
 # === Parameters
 #
 # [*num_of_processes*]
-# Number of APY instance processes to run
+#   Number of APY instance processes to run.
 # [*max_idle_seconds*]
-# Seconds to wait before shutdown idle process
+#   Seconds to wait before shutdown idle process.
 # [*uid*]
-# The username apertium-apy will run with
+#   The username apertium-apy will run with.
 # [*gid*]
-# The group apertium-apy will run with
+#   The group apertium-apy will run with.
 class apertium(
 $num_of_processes = 1,
 $max_idle_seconds = 300,

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add operations-mw-config-composer-jessie job

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

Change subject: Add operations-mw-config-composer-jessie job
..


Add operations-mw-config-composer-jessie job

- Used by I185823ca6b77c2e5eb8 in operations/mediawiki-config.git
- fetch-composer-fetch introduced in IX in integration/jenkins.git

Bug: T92605
Bug: T85947
Change-Id: I8639ff9d8b23156175924a474bf959646dfe69ba
---
M jjb/macro.yaml
M jjb/operations-misc.yaml
M zuul/layout.yaml
3 files changed, 19 insertions(+), 3 deletions(-)

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



diff --git a/jjb/macro.yaml b/jjb/macro.yaml
index 98c6e99..70e2702 100644
--- a/jjb/macro.yaml
+++ b/jjb/macro.yaml
@@ -485,6 +485,11 @@
  - shell: 
"/srv/deployment/integration/slave-scripts/bin/mw-fetch-composer-dev.sh"
 
 - builder:
+name: fetch-composer-dev
+builders:
+ - shell: 
"/srv/deployment/integration/slave-scripts/bin/fetch-composer-dev.sh"
+
+- builder:
 name: mw-run-update-script
 builders:
 - shell: 
"/srv/deployment/integration/slave-scripts/bin/mw-run-update-script.sh"
diff --git a/jjb/operations-misc.yaml b/jjb/operations-misc.yaml
index 8810906..9d70479 100644
--- a/jjb/operations-misc.yaml
+++ b/jjb/operations-misc.yaml
@@ -53,3 +53,16 @@
 shallow-clone: true
 submodule:
 disable: false
+
+- job:
+name: 'operations-mw-config-composer-jessie'
+node: ci-jessie-wikimedia
+defaults: use-remoteonly-zuul
+concurrent: true
+triggers:
+ - zuul
+builders:
+ - composer-validate:
+dir: '.'
+ - fetch-composer-dev
+ - composer-test
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 724b441..47b5c02 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2400,9 +2400,7 @@
   - operations-mw-config-phpunit
   - operations-mw-config-typos
 experimental:
-  - composer-php55-trusty
-  - composer-hhvm-trusty
-  - composer-hhvm-jessie
+  - operations-mw-config-composer-jessie
 postmerge:
   - beta-mediawiki-config-update-eqiad
 

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

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

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


[MediaWiki-commits] [Gerrit] integration/jenkins[master]: Add fetch-composer-dev.sh script (derived from mw-fetch-comp...

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

Change subject: Add fetch-composer-dev.sh script (derived from 
mw-fetch-composer-dev.sh)
..


Add fetch-composer-dev.sh script (derived from mw-fetch-composer-dev.sh)

- Used by I8639ff9d in integration/config.git

Also fix unrelated warnings from flake that apparently got enabled
without a commit in this repo.

Bug: T92605
Bug: T85947
Change-Id: I9d39e6a0e4b24fefdb904f105abec7734051d25d
---
A bin/fetch-composer-dev.sh
M bin/mw-api-siteinfo.py
M bin/mw-create-composer-local.py
3 files changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/bin/fetch-composer-dev.sh b/bin/fetch-composer-dev.sh
new file mode 100644
index 000..12f2053
--- /dev/null
+++ b/bin/fetch-composer-dev.sh
@@ -0,0 +1,7 @@
+#!/bin/bash -eu
+
+# Load require-dev packages on top of mediawiki/vendor (T112895)
+# Once jq 1.4 is available, the following may be used instead:
+# > jq -r '.["require-dev"]|to_entries|map([.key,.value])[]|join("=")' 
../composer.json
+set -o pipefail
+node $(dirname $0)/../tools/composer-dev-args.js "composer.json" | xargs 
composer require --dev --ansi --no-progress --prefer-dist -v
diff --git a/bin/mw-api-siteinfo.py b/bin/mw-api-siteinfo.py
index 1e74c3b..0f5bee8 100755
--- a/bin/mw-api-siteinfo.py
+++ b/bin/mw-api-siteinfo.py
@@ -88,5 +88,6 @@
 for field in options.fields:
 print(getattr(mwresponse.query.general, field))
 
+
 if __name__ == '__main__':
 main()
diff --git a/bin/mw-create-composer-local.py b/bin/mw-create-composer-local.py
index fd63709..b57b0a6 100755
--- a/bin/mw-create-composer-local.py
+++ b/bin/mw-create-composer-local.py
@@ -32,6 +32,7 @@
 
 print('Created composer.local.json.')
 
+
 if __name__ == '__main__':
 if len(sys.argv) != 3:
 print('Invalid number of arguments provided')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d39e6a0e4b24fefdb904f105abec7734051d25d
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add operations-mw-config-composer-jessie job

2017-01-05 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330843 )

Change subject: Add operations-mw-config-composer-jessie job
..

Add operations-mw-config-composer-jessie job

- Used by I185823ca6b77c2e5eb8 in operations/mediawiki-config.git
- fetch-composer-fetch introduced in IX in integration/jenkins.git

Bug: T92605
Bug: T85947
Change-Id: I8639ff9d8b23156175924a474bf959646dfe69ba
---
M jjb/macro.yaml
M jjb/operations-misc.yaml
M zuul/layout.yaml
3 files changed, 19 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/43/330843/1

diff --git a/jjb/macro.yaml b/jjb/macro.yaml
index 98c6e99..70e2702 100644
--- a/jjb/macro.yaml
+++ b/jjb/macro.yaml
@@ -485,6 +485,11 @@
  - shell: 
"/srv/deployment/integration/slave-scripts/bin/mw-fetch-composer-dev.sh"
 
 - builder:
+name: fetch-composer-dev
+builders:
+ - shell: 
"/srv/deployment/integration/slave-scripts/bin/fetch-composer-dev.sh"
+
+- builder:
 name: mw-run-update-script
 builders:
 - shell: 
"/srv/deployment/integration/slave-scripts/bin/mw-run-update-script.sh"
diff --git a/jjb/operations-misc.yaml b/jjb/operations-misc.yaml
index 8810906..9d70479 100644
--- a/jjb/operations-misc.yaml
+++ b/jjb/operations-misc.yaml
@@ -53,3 +53,16 @@
 shallow-clone: true
 submodule:
 disable: false
+
+- job:
+name: 'operations-mw-config-composer-jessie'
+node: ci-jessie-wikimedia
+defaults: use-remoteonly-zuul
+concurrent: true
+triggers:
+ - zuul
+builders:
+ - composer-validate:
+dir: '.'
+ - fetch-composer-dev
+ - composer-test
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 724b441..47b5c02 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2400,9 +2400,7 @@
   - operations-mw-config-phpunit
   - operations-mw-config-typos
 experimental:
-  - composer-php55-trusty
-  - composer-hhvm-trusty
-  - composer-hhvm-jessie
+  - operations-mw-config-composer-jessie
 postmerge:
   - beta-mediawiki-config-update-eqiad
 

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

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

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


[MediaWiki-commits] [Gerrit] integration/jenkins[master]: Add fetch-composer-dev.sh script (derived from mw-fetch-comp...

2017-01-05 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330842 )

Change subject: Add fetch-composer-dev.sh script (derived from 
mw-fetch-composer-dev.sh)
..

Add fetch-composer-dev.sh script (derived from mw-fetch-composer-dev.sh)

- Used by I8639ff9d in integration/config.git

Bug: T92605
Bug: T85947
Change-Id: I9d39e6a0e4b24fefdb904f105abec7734051d25d
---
A bin/fetch-composer-dev.sh
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/42/330842/1

diff --git a/bin/fetch-composer-dev.sh b/bin/fetch-composer-dev.sh
new file mode 100644
index 000..12f2053
--- /dev/null
+++ b/bin/fetch-composer-dev.sh
@@ -0,0 +1,7 @@
+#!/bin/bash -eu
+
+# Load require-dev packages on top of mediawiki/vendor (T112895)
+# Once jq 1.4 is available, the following may be used instead:
+# > jq -r '.["require-dev"]|to_entries|map([.key,.value])[]|join("=")' 
../composer.json
+set -o pipefail
+node $(dirname $0)/../tools/composer-dev-args.js "composer.json" | xargs 
composer require --dev --ansi --no-progress --prefer-dist -v

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: icinga: Include challenge-apache.conf, exclude acme from pro...

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

Change subject: icinga: Include challenge-apache.conf, exclude acme from proto 
redirect
..


icinga: Include challenge-apache.conf, exclude acme from proto redirect

In order to use Letsencrypt certs we need to make the
.well-known/acme-chellenge/ path available where LE gets
the challenge response file to check we control this domain.

The snippet that were are including here gets generated by puppet
but we need to include it and exempt it from the http->https redirect.

Bug:T133717
Change-Id: I07c91d70076326a57708e9f3ac09f87da0205d18
---
M modules/icinga/templates/icinga.wikimedia.org.erb
1 file changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/modules/icinga/templates/icinga.wikimedia.org.erb 
b/modules/icinga/templates/icinga.wikimedia.org.erb
index fe8829b..3d49e38 100644
--- a/modules/icinga/templates/icinga.wikimedia.org.erb
+++ b/modules/icinga/templates/icinga.wikimedia.org.erb
@@ -87,9 +87,12 @@
 ServerAdmin n...@wikimedia.org
 DocumentRoot /usr/share/icinga/htdocs
 
-RewriteEngine on
-RewriteCond %{SERVER_PORT} !^443$
-RewriteRule ^/(.*)$ https://icinga.wikimedia.org/$1 [L,R=301]
+Include /etc/acme/challenge-apache.conf
+
+RewriteEngine on
+RewriteCond %{SERVER_PORT} !^443$
+RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
+RewriteRule ^/(.*)$ https://icinga.wikimedia.org/$1 [L,R=301]
 
 ErrorLog /var/log/apache2/icinga.log
 LogLevel warn

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: icinga: Include challenge-apache.conf, exclude acme from pro...

2017-01-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330841 )

Change subject: icinga: Include challenge-apache.conf, exclude acme from proto 
redirect
..

icinga: Include challenge-apache.conf, exclude acme from proto redirect

In order to use Letsencrypt certs we need to make the
.well-known/acme-chellenge/ path available where LE gets
the challenge response file to check we control this domain.

The snippet that were are including here gets generated by puppet
but we need to include it and exempt it from the http->https redirect.

Bug:T133717
Change-Id: I07c91d70076326a57708e9f3ac09f87da0205d18
---
M modules/icinga/templates/icinga.wikimedia.org.erb
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/41/330841/1

diff --git a/modules/icinga/templates/icinga.wikimedia.org.erb 
b/modules/icinga/templates/icinga.wikimedia.org.erb
index fe8829b..3d49e38 100644
--- a/modules/icinga/templates/icinga.wikimedia.org.erb
+++ b/modules/icinga/templates/icinga.wikimedia.org.erb
@@ -87,9 +87,12 @@
 ServerAdmin n...@wikimedia.org
 DocumentRoot /usr/share/icinga/htdocs
 
-RewriteEngine on
-RewriteCond %{SERVER_PORT} !^443$
-RewriteRule ^/(.*)$ https://icinga.wikimedia.org/$1 [L,R=301]
+Include /etc/acme/challenge-apache.conf
+
+RewriteEngine on
+RewriteCond %{SERVER_PORT} !^443$
+RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
+RewriteRule ^/(.*)$ https://icinga.wikimedia.org/$1 [L,R=301]
 
 ErrorLog /var/log/apache2/icinga.log
 LogLevel warn

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Video[master]: Replaced usage of Linker::getLinkAttributesInternal

2017-01-05 Thread Awu42 (Code Review)
Awu42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330840 )

Change subject: Replaced usage of Linker::getLinkAttributesInternal
..

Replaced usage of Linker::getLinkAttributesInternal

Bug: T61113
Change-Id: Ib54938428a0c0d941e5f226e27b2c8f03c1a4edd
---
M VideoPage.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Video 
refs/changes/40/330840/1

diff --git a/VideoPage.php b/VideoPage.php
index 92d3699..8ab77e5 100644
--- a/VideoPage.php
+++ b/VideoPage.php
@@ -265,9 +265,9 @@
$userlink = Linker::userLink( $user_id, $user_name ) .
Linker::userToolLinks( $user_id, $user_name );
 
-   $style = Linker::getInternalLinkAttributes( $url, $datetime );
+   $style = htmlspecialchars( strtr( urldecode( $url ), '_', ' '));
 
-   $s = "({$rlink}) {$datetime} 
. . ({$type}) . . {$userlink}";
+   $s = "({$rlink}) {$datetime} . . ({$type}) . . {$userlink}";
 
$s .= Linker::commentBlock( /*$description*/'', $title );
$s .= "\n";

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib54938428a0c0d941e5f226e27b2c8f03c1a4edd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Video
Gerrit-Branch: master
Gerrit-Owner: Awu42 <9922y...@gmail.com>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: icinga: unbreak dependency cycle with Apache site and cert

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

Change subject: icinga: unbreak dependency cycle with Apache site and cert
..


icinga: unbreak dependency cycle with Apache site and cert

Error: Could not apply complete catalog: Found 1 dependency cycle:

(Exec[acme-setup-acme-icinga] => Letsencrypt::Cert::Integrated[icinga]
=> Apache::Site[icinga.wikimedia.org] => Apache::Conf[icinga.wikimedia.org]
=> File[/etc/apache2/sites-available/50-icinga-wikimedia-org.conf]
=> Service[apache2] => Exec[acme-setup-acme-icinga])

Breaking that cycle.

Change-Id: I8a67375dcfddf930af5257f733df4c1c68e47d3c
---
M modules/icinga/manifests/web.pp
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/modules/icinga/manifests/web.pp b/modules/icinga/manifests/web.pp
index b6f90a1..58afd68 100644
--- a/modules/icinga/manifests/web.pp
+++ b/modules/icinga/manifests/web.pp
@@ -51,7 +51,6 @@
 
 apache::site { 'icinga.wikimedia.org':
 content => template('icinga/icinga.wikimedia.org.erb'),
-require => Letsencrypt::Cert::Integrated['icinga'],
 }
 
 # remove icinga default config

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: icinga: unbreak dependency cycle with Apache site and cert

2017-01-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330839 )

Change subject: icinga: unbreak dependency cycle with Apache site and cert
..

icinga: unbreak dependency cycle with Apache site and cert

Error: Could not apply complete catalog: Found 1 dependency cycle:

(Exec[acme-setup-acme-icinga] => Letsencrypt::Cert::Integrated[icinga]
=> Apache::Site[icinga.wikimedia.org] => Apache::Conf[icinga.wikimedia.org]
=> File[/etc/apache2/sites-available/50-icinga-wikimedia-org.conf]
=> Service[apache2] => Exec[acme-setup-acme-icinga])

Breaking that cycle.

Change-Id: I8a67375dcfddf930af5257f733df4c1c68e47d3c
---
M modules/icinga/manifests/web.pp
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/modules/icinga/manifests/web.pp b/modules/icinga/manifests/web.pp
index b6f90a1..58afd68 100644
--- a/modules/icinga/manifests/web.pp
+++ b/modules/icinga/manifests/web.pp
@@ -51,7 +51,6 @@
 
 apache::site { 'icinga.wikimedia.org':
 content => template('icinga/icinga.wikimedia.org.erb'),
-require => Letsencrypt::Cert::Integrated['icinga'],
 }
 
 # remove icinga default config

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Include JS variable for NewPP report

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

Change subject: Include JS variable for NewPP report
..


Include JS variable for NewPP report

Adapted from reverted commit b7c4c8717f9.

Bug: T110763
Change-Id: If249b679c534879bfac622592a1d2fa913a0cf9d
---
M RELEASE-NOTES-1.29
M includes/OutputPage.php
M includes/parser/Parser.php
M includes/parser/ParserOutput.php
4 files changed, 64 insertions(+), 5 deletions(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 72c82de..b886738 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -37,6 +37,8 @@
   dnsbls, are now indicated as such and use a new i18n message when displayed.
 * Added new $wgHTTPImportTimeout setting. Sets timeout for
   downloading the XML dump during a transwiki import in seconds.
+* Parser limit report is now available in machine-readable format to JavaScript
+  via mw.config.get('wgPageParseReport').
 
 === External library changes in 1.29 ===
 
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index f140f54..211f44b 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -299,6 +299,9 @@
 */
private $copyrightUrl;
 
+   /** @var array Profiling data */
+   private $limitReportJSData = [];
+
/**
 * Constructor for OutputPage. This should not be called directly.
 * Instead a new RequestContext should be created and it will 
implicitly create
@@ -1804,9 +1807,14 @@
}
}
 
-   // enable OOUI if requested via ParserOutput
+   // Enable OOUI if requested via ParserOutput
if ( $parserOutput->getEnableOOUI() ) {
$this->enableOOUI();
+   }
+
+   // Include parser limit report
+   if ( !$this->limitReportJSData ) {
+   $this->limitReportJSData = 
$parserOutput->getLimitReportJSData();
}
 
// Link flags are ignored for now, but may in the future be
@@ -3005,6 +3013,14 @@
}
}
 
+   if ( $this->limitReportJSData ) {
+   $chunks[] = ResourceLoader::makeInlineScript(
+   ResourceLoader::makeConfigSetScript(
+   [ 'wgPageParseReport' => 
$this->limitReportJSData ]
+   )
+   );
+   }
+
return self::combineWrappedStrings( $chunks );
}
 
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 0e9aa59..157946c 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -547,18 +547,32 @@
$limitReport = str_replace( [ '-', '&' ], [ '‐', 
'' ], $limitReport );
$text .= "\n\n";
 
-   // Add on template profiling data
+   // Add on template profiling data in human/machine 
readable way
$dataByFunc = $this->mProfiler->getFunctionStats();
uasort( $dataByFunc, function ( $a, $b ) {
return $a['real'] < $b['real']; // descending 
order
} );
-   $profileReport = "Transclusion expansion time report 
(%,ms,calls,template)\n";
+   $profileReport = [];
foreach ( array_slice( $dataByFunc, 0, 10 ) as $item ) {
-   $profileReport .= sprintf( "%6.2f%% %8.3f %6d - 
%s\n",
+   $profileReport[] = sprintf( "%6.2f%% %8.3f %6d 
%s",
$item['%real'], $item['real'], 
$item['calls'],
htmlspecialchars( $item['name'] ) );
}
-   $text .= "\n\n";
+   $text .= "\n";
+
+   $this->mOutput->setLimitReportData( 
'limitreport-timingprofile', $profileReport );
+
+   // Add other cache related metadata
+   if ( $wgShowHostnames ) {
+   $this->mOutput->setLimitReportData( 
'cachereport-origin', wfHostname() );
+   }
+   $this->mOutput->setLimitReportData( 
'cachereport-timestamp',
+   $this->mOutput->getCacheTime() );
+   $this->mOutput->setLimitReportData( 'cachereport-ttl',
+   $this->mOutput->getCacheExpiry() );
+   $this->mOutput->setLimitReportData( 
'cachereport-transientcontent',
+   $this->mOutput->hasDynamicContent() );
 
if ( 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: icinga: use Letsencrypt for SSL cert, spend less donor money...

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

Change subject: icinga: use Letsencrypt for SSL cert, spend less donor money on 
prime numbers
..


icinga: use Letsencrypt for SSL cert, spend less donor money on prime numbers

On 2017-02-06 the icinga.wikimedia.org cert will expire.

Instead of renewing and paying for a new icinga SSL cert
as we did in the past, start using Letsencrypt for Icinga.

We have been using Letsencrypt for Gerrit and RT for a while
now and haven't had any complaints or problems.

This saves money and having to deal with the cert renewal at all.

Also see general tracking task to make all the things use LE.

Bug: T133717
Change-Id: I39abcfcc26461933e9afeb93bd229ce1f25d1266
---
M modules/icinga/manifests/web.pp
M modules/icinga/templates/icinga.wikimedia.org.erb
2 files changed, 11 insertions(+), 4 deletions(-)

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



diff --git a/modules/icinga/manifests/web.pp b/modules/icinga/manifests/web.pp
index 9e09932..b6f90a1 100644
--- a/modules/icinga/manifests/web.pp
+++ b/modules/icinga/manifests/web.pp
@@ -41,10 +41,17 @@
 include ::apache::mod::authnz_ldap
 
 $ssl_settings = ssl_ciphersuite('apache', 'mid', true)
-sslcert::certificate { 'icinga.wikimedia.org': }
+
+letsencrypt::cert::integrated { 'icinga':
+subjects   => 'icinga.wikimedia.org',
+puppet_svc => 'apache2',
+system_svc => 'apache2',
+require=> Class['apache::mod::ssl']
+}
 
 apache::site { 'icinga.wikimedia.org':
 content => template('icinga/icinga.wikimedia.org.erb'),
+require => Letsencrypt::Cert::Integrated['icinga'],
 }
 
 # remove icinga default config
diff --git a/modules/icinga/templates/icinga.wikimedia.org.erb 
b/modules/icinga/templates/icinga.wikimedia.org.erb
index 0d054c2..fe8829b 100644
--- a/modules/icinga/templates/icinga.wikimedia.org.erb
+++ b/modules/icinga/templates/icinga.wikimedia.org.erb
@@ -20,9 +20,9 @@
 # https://httpoxy.org/
 RequestHeader unset Proxy early
 SSLEngine On
-SSLCertificateFile /etc/ssl/localcerts/icinga.wikimedia.org.crt
-SSLCertificateChainFile /etc/ssl/localcerts/icinga.wikimedia.org.chain.crt
-SSLCertificateKeyFile /etc/ssl/private/icinga.wikimedia.org.key
+SSLCertificateFile /etc/acme/cert/icinga.crt
+SSLCertificateChainFile /etc/acme/cert/icinga.chain.crt
+SSLCertificateKeyFile /etc/acme/key/icinga.key
 <%= @ssl_settings.join("\n") %>
 
 DocumentRoot /usr/share/icinga/htdocs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I39abcfcc26461933e9afeb93bd229ce1f25d1266
Gerrit-PatchSet: 9
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: RobH 
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]: Keystone: Add more uwsgi api processes

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

Change subject: Keystone:  Add more uwsgi api processes
..


Keystone:  Add more uwsgi api processes

I'm seeing some refused connections with just 10 processes per
service.

Change-Id: Id184fd25e5be34f62df3a8aec8592b6495076fc5
---
M modules/openstack/manifests/keystone/service.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/openstack/manifests/keystone/service.pp 
b/modules/openstack/manifests/keystone/service.pp
index 51df3d4..2228754 100644
--- a/modules/openstack/manifests/keystone/service.pp
+++ b/modules/openstack/manifests/keystone/service.pp
@@ -105,7 +105,7 @@
 config  => {
 wsgi-file => '/usr/bin/keystone-wsgi-admin',
 name  => 'keystone',
-processes => '10',
+processes => '20',
 threads   => '2',
 logto => '/var/log/keystone/uwsgi/keystone-admin.log',
 logger=> 
'file:/var/log/keystone/uwsgi/keystone-admin-uwsgi.log',
@@ -118,7 +118,7 @@
 config  => {
 wsgi-file => '/usr/bin/keystone-wsgi-public',
 name  => 'keystone',
-processes => '10',
+processes => '20',
 threads   => '2',
 logto => '/var/log/keystone/uwsgi/keystone-public.log',
 logger=> 
'file:/var/log/keystone/uwsgi/keystone-public-uwsgi.log',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Keystone: Add more uwsgi api processes

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

Change subject: Keystone:  Add more uwsgi api processes
..

Keystone:  Add more uwsgi api processes

I'm seeing some refused connections with just 10 processes per
service.

Change-Id: Id184fd25e5be34f62df3a8aec8592b6495076fc5
---
M modules/openstack/manifests/keystone/service.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/37/330837/1

diff --git a/modules/openstack/manifests/keystone/service.pp 
b/modules/openstack/manifests/keystone/service.pp
index 51df3d4..2228754 100644
--- a/modules/openstack/manifests/keystone/service.pp
+++ b/modules/openstack/manifests/keystone/service.pp
@@ -105,7 +105,7 @@
 config  => {
 wsgi-file => '/usr/bin/keystone-wsgi-admin',
 name  => 'keystone',
-processes => '10',
+processes => '20',
 threads   => '2',
 logto => '/var/log/keystone/uwsgi/keystone-admin.log',
 logger=> 
'file:/var/log/keystone/uwsgi/keystone-admin-uwsgi.log',
@@ -118,7 +118,7 @@
 config  => {
 wsgi-file => '/usr/bin/keystone-wsgi-public',
 name  => 'keystone',
-processes => '10',
+processes => '20',
 threads   => '2',
 logto => '/var/log/keystone/uwsgi/keystone-public.log',
 logger=> 
'file:/var/log/keystone/uwsgi/keystone-public-uwsgi.log',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Nova: turn off ec2 api

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

Change subject: Nova:  turn off ec2 api
..

Nova:  turn off ec2 api

Change-Id: I4aeb7485db0bf2bd9717319e9c34fbbeeb05f89d
---
M modules/openstack/templates/liberty/nova/nova.conf.erb
M modules/openstack/templates/mitaka/nova/nova.conf.erb
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/330838/1

diff --git a/modules/openstack/templates/liberty/nova/nova.conf.erb 
b/modules/openstack/templates/liberty/nova/nova.conf.erb
index cfe349f..3e0709c 100644
--- a/modules/openstack/templates/liberty/nova/nova.conf.erb
+++ b/modules/openstack/templates/liberty/nova/nova.conf.erb
@@ -12,6 +12,9 @@
 wmf_scheduler_hosts_pool=<%= @novaconfig["scheduler_pool"].join(",") %>
 
scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,AggregateInstanceExtraSpecsFilter,AvailabilityZoneFilter,SchedulerPoolFilter,DiskFilter
 
+# Turn off ec2 APIs
+enabled_apis=['osapi_compute', 'metadata']
+
 # Don't allow duplicate instance names
 osapi_compute_unique_server_name_scope='global'
 
diff --git a/modules/openstack/templates/mitaka/nova/nova.conf.erb 
b/modules/openstack/templates/mitaka/nova/nova.conf.erb
index fb0c14a..b217c81 100644
--- a/modules/openstack/templates/mitaka/nova/nova.conf.erb
+++ b/modules/openstack/templates/mitaka/nova/nova.conf.erb
@@ -12,6 +12,9 @@
 wmf_scheduler_hosts_pool=<%= @novaconfig["scheduler_pool"].join(",") %>
 
scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,AggregateInstanceExtraSpecsFilter,AvailabilityZoneFilter,SchedulerPoolFilter,DiskFilter
 
+# Turn off ec2 APIs
+enabled_apis=['osapi_compute', 'metadata']
+
 # Don't allow duplicate instance names
 osapi_compute_unique_server_name_scope='global'
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: New: add last 5 days of pageviews to most-read response

2017-01-05 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330836 )

Change subject: New: add last 5 days of pageviews to most-read response
..

New: add last 5 days of pageviews to most-read response

Bug: T148445
Change-Id: Ie450eb77b855fc2ecb18aebccaca0c833499f326
---
M lib/dateUtil.js
M lib/feed/most-read.js
A lib/pageviews.js
M spec.yaml
M test/features/most-read/most-read.js
M test/lib/dateUtil/date-util-test.js
6 files changed, 235 insertions(+), 36 deletions(-)


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

diff --git a/lib/dateUtil.js b/lib/dateUtil.js
index 6c19363..f349d75 100644
--- a/lib/dateUtil.js
+++ b/lib/dateUtil.js
@@ -51,11 +51,29 @@
 return `${req.params.}-${req.params.mm}-${req.params.dd}Z`;
 };
 
+/**
+ * @param {!string} str e.g., 2016122800
+ * @return {!string} e.g., 2016-12-28T00Z
+ */
+dateUtil.iso8601DateFromMMDDHH = function(str) {
+return str.replace(/(\d{4})(\d{2})(\d{2})(\d{2})/g, '$1-$2-$3T$4:00Z');
+};
+
 dateUtil.pad = function(number) {
 if (number < 10) {
 return `0${number}`;
 }
 return number;
+};
+
+/**
+ @param {!Date} date
+ @param {!number} days
+ */
+dateUtil.addDays = (date, days) => {
+const copy = new Date(date);
+copy.setDate(copy.getDate() + days);
+return copy;
 };
 
 /**
@@ -73,6 +91,14 @@
 }-${dateUtil.pad(date.getUTCDate())}`;
 };
 
+/**
+ * @param {!Date} date
+ * @return {!String} e.g., 20160516
+ */
+dateUtil.formatMMDD = (date) => {
+return dateUtil.formatISODate(date).replace(/-/g, '');
+};
+
 // Validate the input date by checking whether UTC-format constructed from the
 // input components matches the values actually provided.
 dateUtil.isValidDate = function(dateString, year, month, day) {
diff --git a/lib/feed/most-read.js b/lib/feed/most-read.js
index 1394b34..bacd2b9 100644
--- a/lib/feed/most-read.js
+++ b/lib/feed/most-read.js
@@ -10,7 +10,18 @@
 const mwapi = require('../mwapi');
 const filter = require('./most-read-filter');
 const dateUtil = require('../dateUtil');
+const pageviews = require('../pageviews'); // todo: add require requires
 
+/**
+ * @public {!string} date ISO 8601 timestamp of pageviews recorded
+ * @public {!number} views Integer pageviews on date
+ */
+class DatedPageviews {
+constructor(date, views) {
+this.date = date;
+this.views = views;
+}
+}
 
 /**
  * Construct a list of title strings from the array of good article objects.
@@ -23,31 +34,24 @@
 return result;
 }
 
-function getTopPageviews(app, req, aggregated) {
-const yesterday = new Date(dateUtil.getRequestedDate(req) - 
dateUtil.ONE_DAY);
-const year = aggregated ? yesterday.getUTCFullYear() : req.params.;
-const month = aggregated ? dateUtil.pad(yesterday.getUTCMonth() + 1) : 
req.params.mm;
-const day = aggregated ? dateUtil.pad(yesterday.getUTCDate()) : 
req.params.dd;
+function getTopPageviews(app, req, domain, date) {
 const apiDomain = 'wikimedia.org';
-const targetDomain = 
mUtil.removeTLD(mUtil.mobileToCanonical(req.params.domain));
-const basePath = 'metrics/pageviews/top/%proj/%platform/%y/%m/%d'
-.replace('%proj', targetDomain)
-.replace('%y', year)
-.replace('%m', month)
-.replace('%d', day);
-
-const desktopPath = basePath.replace('%platform', 'desktop');
-const combinedPath = basePath.replace('%platform', 'all-access');
-
 const restReq = {
 headers: { accept: 'application/json; charset=utf-8' }
 };
+const client = new pageviews.Client(app, apiDomain, restReq);
 
+// todo: remove manual bot filtering when a user agent parameter is 
available for top as in the
+//   per-article endpoint
 return BBPromise.props({
-desktop: api.restApiGet(app, apiDomain, desktopPath, restReq),
-combined: api.restApiGet(app, apiDomain, combinedPath, restReq)
-}).then(api.checkResponseStatus).then((response) => {
-return response;
+desktop: client.reqTop(domain, pageviews.Platform.DESKTOP_WEB, date),
+combined: client.reqTop(domain, pageviews.Platform.ALL, date)
+});
+}
+
+function pageviewsPageRspToDatedPageviews(rsp) {
+return rsp.body.items.map((item) => {
+return new 
DatedPageviews(dateUtil.iso8601DateFromMMDDHH(item.timestamp), item.views);
 });
 }
 
@@ -63,7 +67,12 @@
 dateUtil.throwDateError();
 }
 
-return getTopPageviews(app, req, aggregated)
+const targetDomain = 
mUtil.removeTLD(mUtil.mobileToCanonical(req.params.domain));
+
+const reqDate = dateUtil.getRequestedDate(req);
+const date = aggregated ? dateUtil.addDays(reqDate, -1) : reqDate;
+
+return getTopPageviews(app, req, targetDomain, date)
 .then((response) => {
 // We're working mainly with the overall list of top 

[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Prevent abstract functions being marked eligible

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

Change subject: Prevent abstract functions being marked eligible
..


Prevent abstract functions being marked eligible

For abstract functions, 'scope_opener' doesn't exist, so a undefined
index notice was being generated.

Tests updated to confirm.

Bug: T154731
Change-Id: Ica991cbe209e0d137d993ec677c15fc3e35430f6
---
M MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
M MediaWiki/Tests/files/Usage/extend_class_usage.php
M MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
3 files changed, 8 insertions(+), 3 deletions(-)

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



diff --git a/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php 
b/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
index b49dee1..b1e3260 100644
--- a/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
+++ b/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
@@ -109,7 +109,7 @@
) {
if ( $currToken['code'] === T_FUNCTION ) {
$methodProps = $phpcsFile->getMethodProperties( 
$stackPtr );
-   if ( !$methodProps['is_static'] ) {
+   if ( !$methodProps['is_static'] && 
!$methodProps['is_abstract'] ) {
$funcNamePtr = $phpcsFile->findNext( 
T_STRING, $stackPtr );
$this->eligableFunc = [
'name' => 
$tokens[$funcNamePtr]['content'],
diff --git a/MediaWiki/Tests/files/Usage/extend_class_usage.php 
b/MediaWiki/Tests/files/Usage/extend_class_usage.php
index 56fec82..194f704 100644
--- a/MediaWiki/Tests/files/Usage/extend_class_usage.php
+++ b/MediaWiki/Tests/files/Usage/extend_class_usage.php
@@ -72,7 +72,12 @@
}
 }
 
-class RequestTest extends ContextSource {
+abstract class RequestTest extends ContextSource {
+
+   /**
+* @return mixed
+*/
+   abstract public function abstractFunctionExample();
 
/**
 * @return object the request information.
diff --git a/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect 
b/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
index 2faf03f..82aca99 100644
--- a/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
+++ b/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
@@ -7,7 +7,7 @@
 | | wfMessage() .
  64 | WARNING | Should use function $this->getUser() rather than
 | | variable $wgUser .
- 88 | WARNING | Should use function $this->getRequest() rather than
+ 93 | WARNING | Should use function $this->getRequest() rather than
 | | variable $wgRequest .
 --
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica991cbe209e0d137d993ec677c15fc3e35430f6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: Samwilson 
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] operations/mediawiki-config[master]: Unassign 'transcode-reset' from Commons autoconfirmed and sy...

2017-01-05 Thread Zhuyifei1999 (Code Review)
Zhuyifei1999 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330835 )

Change subject: Unassign 'transcode-reset' from Commons autoconfirmed and sysop 
groups
..

Unassign 'transcode-reset' from Commons autoconfirmed and sysop groups

This is a temporary measure to stop ongoing abuse. Queue has been
increasing for two days.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b31c679..166bf11 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7760,10 +7760,14 @@
'sysop' => [
'changetags' => true, // T134196
'upload_by_url' => true,
+   'transcode-reset' => false, // T154733
],
'bot' => [
'changetags' => true, // T134196
'upload_by_url' => true, // T145010
+   ],
+   'autoconfirmed' => [
+   'transcode-reset' => false, // T154733
]
],
'dawiki' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Prevent abstract functions being marked eligable

2017-01-05 Thread Samwilson (Code Review)
Samwilson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330834 )

Change subject: Prevent abstract functions being marked eligable
..

Prevent abstract functions being marked eligable

For abstract functions, 'scope_opener' doesn't exist, so a undefined
index notice was being generated.

Tests updated to confirm.

Bug: T154731
Change-Id: Ica991cbe209e0d137d993ec677c15fc3e35430f6
---
M MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
M MediaWiki/Tests/files/Usage/extend_class_usage.php
M MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
3 files changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer 
refs/changes/34/330834/1

diff --git a/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php 
b/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
index b49dee1..b1e3260 100644
--- a/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
+++ b/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
@@ -109,7 +109,7 @@
) {
if ( $currToken['code'] === T_FUNCTION ) {
$methodProps = $phpcsFile->getMethodProperties( 
$stackPtr );
-   if ( !$methodProps['is_static'] ) {
+   if ( !$methodProps['is_static'] && 
!$methodProps['is_abstract'] ) {
$funcNamePtr = $phpcsFile->findNext( 
T_STRING, $stackPtr );
$this->eligableFunc = [
'name' => 
$tokens[$funcNamePtr]['content'],
diff --git a/MediaWiki/Tests/files/Usage/extend_class_usage.php 
b/MediaWiki/Tests/files/Usage/extend_class_usage.php
index 56fec82..194f704 100644
--- a/MediaWiki/Tests/files/Usage/extend_class_usage.php
+++ b/MediaWiki/Tests/files/Usage/extend_class_usage.php
@@ -72,7 +72,12 @@
}
 }
 
-class RequestTest extends ContextSource {
+abstract class RequestTest extends ContextSource {
+
+   /**
+* @return mixed
+*/
+   abstract public function abstractFunctionExample();
 
/**
 * @return object the request information.
diff --git a/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect 
b/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
index 2faf03f..82aca99 100644
--- a/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
+++ b/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect
@@ -7,7 +7,7 @@
 | | wfMessage() .
  64 | WARNING | Should use function $this->getUser() rather than
 | | variable $wgUser .
- 88 | WARNING | Should use function $this->getRequest() rather than
+ 93 | WARNING | Should use function $this->getRequest() rather than
 | | variable $wgRequest .
 --
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica991cbe209e0d137d993ec677c15fc3e35430f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: Samwilson 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] Refactor RCFeed configuration (backwards compatible)

2017-01-05 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330833 )

Change subject: [WIP] Refactor RCFeed configuration (backwards compatible)
..

[WIP] Refactor RCFeed configuration (backwards compatible)

Previously:
* Engines had to be registered in $wgRCEngines.
* The RCFeedEngine classes took no constructor arguments and
  were expected to send whatever text is previously formatted
  without any information about it. This generic design was
  flexible in allowing one to use any formatter with any engine
  with minimal configuration and no need for additional classes.
* Each feed configured their destination by setting a 'uri'
  option that encodes the name of the engine in PHP as the uri
  scheme. Other uri components had to be used for any other
  parameters to the engine (host, port, path). While fairly
  limited, it was sufficient for the default engines in core.

Changes:
* Allow feed classes to be directly associated with a feed in $wgRCFeeds
  via a new 'class' option - without the indirection of 'uri' and
  $wgRCEngines. All options are passed to the given class constructor.
  This matches the design used elsewhere in MediaWiki. (ObjectCache,
  FileRepo, FileBackend, JobQueue, LBFactory, etc.)

  This means we no longer enforce a 1:1 mapping of internet protocols
  to a specific feed engine, and it allows settings to be passed
  without being encoded as a URI neccecarily.

  Main use case for this refactor is EventBus (see I7edc4d57fa),

  Interestingly, this matches the (then incorrect) documentation
  written for $wgRCFeeds in 2961884b43 (which mentions an 'engine'
  property that would do the same thing).

* Move the default 'omit' filters and unrestricted 'formatter' handling
  to a new FormattedRCFeed class, which remains the default.

* Remove RecentChange::getEngine() in favour of RCFeed::factory().
  Not used outside anywhere in Wikimedia Git.

* Document wgRCEngines as "@since 1.22". Follows 2961884b43, ffc71cb6af.

Change-Id: I8be497c623c5d928762e3d3406a388f4d91add9a
---
M autoload.php
M includes/DefaultSettings.php
M includes/changes/RecentChange.php
A includes/rcfeed/FormattedRCFeed.php
A includes/rcfeed/RCFeed.php
M includes/rcfeed/RCFeedEngine.php
M includes/rcfeed/RCFeedFormatter.php
7 files changed, 185 insertions(+), 70 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/330833/1

diff --git a/autoload.php b/autoload.php
index a38fca2..3a44406 100644
--- a/autoload.php
+++ b/autoload.php
@@ -507,6 +507,7 @@
'FormSpecialPage' => __DIR__ . 
'/includes/specialpage/FormSpecialPage.php',
'FormatJson' => __DIR__ . '/includes/json/FormatJson.php',
'FormatMetadata' => __DIR__ . '/includes/media/FormatMetadata.php',
+   'FormattedRCFeed' => __DIR__ . '/includes/rcfeed/FormattedRCFeed.php',
'FormlessAction' => __DIR__ . '/includes/actions/FormlessAction.php',
'GIFHandler' => __DIR__ . '/includes/media/GIF.php',
'GIFMetadataExtractor' => __DIR__ . 
'/includes/media/GIFMetadataExtractor.php',
@@ -1139,6 +1140,7 @@
'RCCacheEntry' => __DIR__ . '/includes/changes/RCCacheEntry.php',
'RCCacheEntryFactory' => __DIR__ . 
'/includes/changes/RCCacheEntryFactory.php',
'RCDatabaseLogEntry' => __DIR__ . '/includes/logging/LogEntry.php',
+   'RCFeed' => __DIR__ . '/includes/rcfeed/RCFeed.php',
'RCFeedEngine' => __DIR__ . '/includes/rcfeed/RCFeedEngine.php',
'RCFeedFormatter' => __DIR__ . '/includes/rcfeed/RCFeedFormatter.php',
'RESTBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/RESTBagOStuff.php',
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 449e1c2..98177f5 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6589,51 +6589,63 @@
 $wgRCLinkDays = [ 1, 3, 7, 14, 30 ];
 
 /**
- * Destinations to which notifications about recent changes
- * should be sent.
+ * Configuration for feeds to which notifications about recent changes will be 
sent.
  *
- * As of MediaWiki 1.22, there are 2 supported 'engine' parameter option in 
core:
- *   * 'UDPRCFeedEngine', which is used to send recent changes over UDP to the
- *  specified server.
- *   * 'RedisPubSubFeedEngine', which is used to send recent changes to Redis.
+ * The following feed classes are available by default:
+ * - 'UDPRCFeedEngine' - sends recent changes over UDP to the specified server.
+ * - 'RedisPubSubFeedEngine' - send recent changes to Redis.
  *
- * The common options are:
- *   * 'uri' -- the address to which the notices are to be sent.
- *   * 'formatter' -- the class name (implementing RCFeedFormatter) which will
- * produce the text to send. This can also be an object of the class.
- *   * 'omit_bots' -- whether the bot edits should be in the feed
- *   * 'omit_anon' -- whether anonymous edits should be in the feed
- *   * 'omit_user' 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Enable logstash in gerrit

2017-01-05 Thread Paladox (Code Review)
Hello Chad, Hashar, BryanDavis, jenkins-bot, Gehel, Dzahn,

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

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

to review the following change.


Change subject: Gerrit: Enable logstash in gerrit
..

Gerrit: Enable logstash in gerrit

We are doing this so more users can help debug a problem (read logs)
since currently debugging (reading logs) requires server access, so the access
will be limited whereas allowing users to read the logs in kibana will help 
releng.

Bug: T141324
Change-Id: Ia188741c0a699ce9f238f85cd3ec710f7ec7d414
---
M hieradata/role/common/gerrit/server.yaml
M modules/gerrit/manifests/jetty.pp
M modules/gerrit/templates/log4j.properties.erb
3 files changed, 16 insertions(+), 1 deletion(-)


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

diff --git a/hieradata/role/common/gerrit/server.yaml 
b/hieradata/role/common/gerrit/server.yaml
index 4303f62..dd902c8 100644
--- a/hieradata/role/common/gerrit/server.yaml
+++ b/hieradata/role/common/gerrit/server.yaml
@@ -21,3 +21,4 @@
 - '+refs/heads/*:refs/heads/*'
 - '+refs/tags/*:refs/tags/*'
 role::gerrit::server::bacula: 'srv-gerrit-git'
+gerrit::jetty::log_host: 'logstash1002.eqiad.wmnet'
diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index 0605bf0..875c60d 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -9,6 +9,8 @@
 $heap_limit = '28g',
 $slave = false,
 $java_home = '/usr/lib/jvm/java-8-openjdk-amd64/jre',
+$log_host = undef,
+$log_port = '4560'
 ) {
 
 include nrpe
diff --git a/modules/gerrit/templates/log4j.properties.erb 
b/modules/gerrit/templates/log4j.properties.erb
index 2f1b556..f899661 100644
--- a/modules/gerrit/templates/log4j.properties.erb
+++ b/modules/gerrit/templates/log4j.properties.erb
@@ -13,13 +13,25 @@
 # limitations under the License.
 #
 
-log4j.rootLogger=DEBUG, error_log
+log4j.rootLogger=DEBUG, error_log<% if @log_host %>, tcp<% end %>
 log4j.logger.com.google.gerrit.sshd.SshLog=DEBUG, sshd_log
 log4j.logger.com.google.gerrit.pgm.http.jetty.HttpLog=DEBUG, httpd_log
 log4j.logger.gc_log=DEBUG, gc_log
 # Prevent gc_log from outputting to error_log
 log4j.additivity.gc_log=false
 
+<% if @log_host %>
+### Logstash
+
+log4j.appender.tcp=org.apache.log4j.net.SocketAppender
+log4j.appender.tcp.Port=<%= @log_port %>
+log4j.appender.tcp.RemoteHost=<%= @log_host %>
+log4j.appender.tcp.ReconnectionDelay=1
+log4j.appender.tcp.Application=playground
+<% end %>
+
+###
+
 # Configure log appenders as defaults
 log4j.appender.error_log=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.error_log.File=/var/lib/gerrit2/review_site/logs/error_log

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia188741c0a699ce9f238f85cd3ec710f7ec7d414
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Gehel 
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]: Revert "Gerrit: Enable logstash in gerrit"

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

Change subject: Revert "Gerrit: Enable logstash in gerrit"
..


Revert "Gerrit: Enable logstash in gerrit"

This reverts commit 8e75f19eb27ec3d95f4a1a48a109c5455e0bfe75.

Change-Id: I5898864f8ef1e2001595a9dc594f2573a329ea65
---
M hieradata/role/common/gerrit/server.yaml
M modules/gerrit/manifests/jetty.pp
M modules/gerrit/templates/log4j.properties.erb
3 files changed, 1 insertion(+), 16 deletions(-)

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



diff --git a/hieradata/role/common/gerrit/server.yaml 
b/hieradata/role/common/gerrit/server.yaml
index dd902c8..4303f62 100644
--- a/hieradata/role/common/gerrit/server.yaml
+++ b/hieradata/role/common/gerrit/server.yaml
@@ -21,4 +21,3 @@
 - '+refs/heads/*:refs/heads/*'
 - '+refs/tags/*:refs/tags/*'
 role::gerrit::server::bacula: 'srv-gerrit-git'
-gerrit::jetty::log_host: 'logstash1002.eqiad.wmnet'
diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index 875c60d..0605bf0 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -9,8 +9,6 @@
 $heap_limit = '28g',
 $slave = false,
 $java_home = '/usr/lib/jvm/java-8-openjdk-amd64/jre',
-$log_host = undef,
-$log_port = '4560'
 ) {
 
 include nrpe
diff --git a/modules/gerrit/templates/log4j.properties.erb 
b/modules/gerrit/templates/log4j.properties.erb
index f899661..2f1b556 100644
--- a/modules/gerrit/templates/log4j.properties.erb
+++ b/modules/gerrit/templates/log4j.properties.erb
@@ -13,24 +13,12 @@
 # limitations under the License.
 #
 
-log4j.rootLogger=DEBUG, error_log<% if @log_host %>, tcp<% end %>
+log4j.rootLogger=DEBUG, error_log
 log4j.logger.com.google.gerrit.sshd.SshLog=DEBUG, sshd_log
 log4j.logger.com.google.gerrit.pgm.http.jetty.HttpLog=DEBUG, httpd_log
 log4j.logger.gc_log=DEBUG, gc_log
 # Prevent gc_log from outputting to error_log
 log4j.additivity.gc_log=false
-
-<% if @log_host %>
-### Logstash
-
-log4j.appender.tcp=org.apache.log4j.net.SocketAppender
-log4j.appender.tcp.Port=<%= @log_port %>
-log4j.appender.tcp.RemoteHost=<%= @log_host %>
-log4j.appender.tcp.ReconnectionDelay=1
-log4j.appender.tcp.Application=playground
-<% end %>
-
-###
 
 # Configure log appenders as defaults
 log4j.appender.error_log=org.apache.log4j.DailyRollingFileAppender

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5898864f8ef1e2001595a9dc594f2573a329ea65
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Gerrit: Enable logstash in gerrit"

2017-01-05 Thread Chad (Code Review)
Hello Paladox, Hashar, BryanDavis, jenkins-bot, Gehel, Dzahn,

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

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

to review the following change.


Change subject: Revert "Gerrit: Enable logstash in gerrit"
..

Revert "Gerrit: Enable logstash in gerrit"

Caused massive timeouts in production

This reverts commit 8e75f19eb27ec3d95f4a1a48a109c5455e0bfe75.

Change-Id: I28b4bcfef9255ad1627bc9560f1fbe1582bf55e1
---
M hieradata/role/common/gerrit/server.yaml
M modules/gerrit/manifests/jetty.pp
M modules/gerrit/templates/log4j.properties.erb
3 files changed, 1 insertion(+), 16 deletions(-)


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

diff --git a/hieradata/role/common/gerrit/server.yaml 
b/hieradata/role/common/gerrit/server.yaml
index dd902c8..4303f62 100644
--- a/hieradata/role/common/gerrit/server.yaml
+++ b/hieradata/role/common/gerrit/server.yaml
@@ -21,4 +21,3 @@
 - '+refs/heads/*:refs/heads/*'
 - '+refs/tags/*:refs/tags/*'
 role::gerrit::server::bacula: 'srv-gerrit-git'
-gerrit::jetty::log_host: 'logstash1002.eqiad.wmnet'
diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index 875c60d..0605bf0 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -9,8 +9,6 @@
 $heap_limit = '28g',
 $slave = false,
 $java_home = '/usr/lib/jvm/java-8-openjdk-amd64/jre',
-$log_host = undef,
-$log_port = '4560'
 ) {
 
 include nrpe
diff --git a/modules/gerrit/templates/log4j.properties.erb 
b/modules/gerrit/templates/log4j.properties.erb
index f899661..2f1b556 100644
--- a/modules/gerrit/templates/log4j.properties.erb
+++ b/modules/gerrit/templates/log4j.properties.erb
@@ -13,24 +13,12 @@
 # limitations under the License.
 #
 
-log4j.rootLogger=DEBUG, error_log<% if @log_host %>, tcp<% end %>
+log4j.rootLogger=DEBUG, error_log
 log4j.logger.com.google.gerrit.sshd.SshLog=DEBUG, sshd_log
 log4j.logger.com.google.gerrit.pgm.http.jetty.HttpLog=DEBUG, httpd_log
 log4j.logger.gc_log=DEBUG, gc_log
 # Prevent gc_log from outputting to error_log
 log4j.additivity.gc_log=false
-
-<% if @log_host %>
-### Logstash
-
-log4j.appender.tcp=org.apache.log4j.net.SocketAppender
-log4j.appender.tcp.Port=<%= @log_port %>
-log4j.appender.tcp.RemoteHost=<%= @log_host %>
-log4j.appender.tcp.ReconnectionDelay=1
-log4j.appender.tcp.Application=playground
-<% end %>
-
-###
 
 # Configure log appenders as defaults
 log4j.appender.error_log=org.apache.log4j.DailyRollingFileAppender

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28b4bcfef9255ad1627bc9560f1fbe1582bf55e1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Gerrit: Enable logstash in gerrit"

2017-01-05 Thread Dzahn (Code Review)
Hello Paladox, Chad, Hashar, BryanDavis, jenkins-bot, Gehel,

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

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

to review the following change.


Change subject: Revert "Gerrit: Enable logstash in gerrit"
..

Revert "Gerrit: Enable logstash in gerrit"

This reverts commit 8e75f19eb27ec3d95f4a1a48a109c5455e0bfe75.

Change-Id: I5898864f8ef1e2001595a9dc594f2573a329ea65
---
M hieradata/role/common/gerrit/server.yaml
M modules/gerrit/manifests/jetty.pp
M modules/gerrit/templates/log4j.properties.erb
3 files changed, 1 insertion(+), 16 deletions(-)


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

diff --git a/hieradata/role/common/gerrit/server.yaml 
b/hieradata/role/common/gerrit/server.yaml
index dd902c8..4303f62 100644
--- a/hieradata/role/common/gerrit/server.yaml
+++ b/hieradata/role/common/gerrit/server.yaml
@@ -21,4 +21,3 @@
 - '+refs/heads/*:refs/heads/*'
 - '+refs/tags/*:refs/tags/*'
 role::gerrit::server::bacula: 'srv-gerrit-git'
-gerrit::jetty::log_host: 'logstash1002.eqiad.wmnet'
diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index 875c60d..0605bf0 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -9,8 +9,6 @@
 $heap_limit = '28g',
 $slave = false,
 $java_home = '/usr/lib/jvm/java-8-openjdk-amd64/jre',
-$log_host = undef,
-$log_port = '4560'
 ) {
 
 include nrpe
diff --git a/modules/gerrit/templates/log4j.properties.erb 
b/modules/gerrit/templates/log4j.properties.erb
index f899661..2f1b556 100644
--- a/modules/gerrit/templates/log4j.properties.erb
+++ b/modules/gerrit/templates/log4j.properties.erb
@@ -13,24 +13,12 @@
 # limitations under the License.
 #
 
-log4j.rootLogger=DEBUG, error_log<% if @log_host %>, tcp<% end %>
+log4j.rootLogger=DEBUG, error_log
 log4j.logger.com.google.gerrit.sshd.SshLog=DEBUG, sshd_log
 log4j.logger.com.google.gerrit.pgm.http.jetty.HttpLog=DEBUG, httpd_log
 log4j.logger.gc_log=DEBUG, gc_log
 # Prevent gc_log from outputting to error_log
 log4j.additivity.gc_log=false
-
-<% if @log_host %>
-### Logstash
-
-log4j.appender.tcp=org.apache.log4j.net.SocketAppender
-log4j.appender.tcp.Port=<%= @log_port %>
-log4j.appender.tcp.RemoteHost=<%= @log_host %>
-log4j.appender.tcp.ReconnectionDelay=1
-log4j.appender.tcp.Application=playground
-<% end %>
-
-###
 
 # Configure log appenders as defaults
 log4j.appender.error_log=org.apache.log4j.DailyRollingFileAppender

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5898864f8ef1e2001595a9dc594f2573a329ea65
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Enable logstash in gerrit

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

Change subject: Gerrit: Enable logstash in gerrit
..


Gerrit: Enable logstash in gerrit

We are doing this so more users can help debug a problem (read logs)
since currently debugging (reading logs) requires server access, so the access
will be limited whereas allowing users to read the logs in kibana will help 
releng.

Bug: T141324
Change-Id: I4262d85e4bd54c1190cdd2d12d839cf9a285d2ed
---
M hieradata/role/common/gerrit/server.yaml
M modules/gerrit/manifests/jetty.pp
M modules/gerrit/templates/log4j.properties.erb
3 files changed, 16 insertions(+), 1 deletion(-)

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



diff --git a/hieradata/role/common/gerrit/server.yaml 
b/hieradata/role/common/gerrit/server.yaml
index 4303f62..dd902c8 100644
--- a/hieradata/role/common/gerrit/server.yaml
+++ b/hieradata/role/common/gerrit/server.yaml
@@ -21,3 +21,4 @@
 - '+refs/heads/*:refs/heads/*'
 - '+refs/tags/*:refs/tags/*'
 role::gerrit::server::bacula: 'srv-gerrit-git'
+gerrit::jetty::log_host: 'logstash1002.eqiad.wmnet'
diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index 0605bf0..875c60d 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -9,6 +9,8 @@
 $heap_limit = '28g',
 $slave = false,
 $java_home = '/usr/lib/jvm/java-8-openjdk-amd64/jre',
+$log_host = undef,
+$log_port = '4560'
 ) {
 
 include nrpe
diff --git a/modules/gerrit/templates/log4j.properties.erb 
b/modules/gerrit/templates/log4j.properties.erb
index 2f1b556..f899661 100644
--- a/modules/gerrit/templates/log4j.properties.erb
+++ b/modules/gerrit/templates/log4j.properties.erb
@@ -13,13 +13,25 @@
 # limitations under the License.
 #
 
-log4j.rootLogger=DEBUG, error_log
+log4j.rootLogger=DEBUG, error_log<% if @log_host %>, tcp<% end %>
 log4j.logger.com.google.gerrit.sshd.SshLog=DEBUG, sshd_log
 log4j.logger.com.google.gerrit.pgm.http.jetty.HttpLog=DEBUG, httpd_log
 log4j.logger.gc_log=DEBUG, gc_log
 # Prevent gc_log from outputting to error_log
 log4j.additivity.gc_log=false
 
+<% if @log_host %>
+### Logstash
+
+log4j.appender.tcp=org.apache.log4j.net.SocketAppender
+log4j.appender.tcp.Port=<%= @log_port %>
+log4j.appender.tcp.RemoteHost=<%= @log_host %>
+log4j.appender.tcp.ReconnectionDelay=1
+log4j.appender.tcp.Application=playground
+<% end %>
+
+###
+
 # Configure log appenders as defaults
 log4j.appender.error_log=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.error_log.File=/var/lib/gerrit2/review_site/logs/error_log

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4262d85e4bd54c1190cdd2d12d839cf9a285d2ed
Gerrit-PatchSet: 26
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Pass the filtered request headers to Thumbor

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

Change subject: Pass the filtered request headers to Thumbor
..


Pass the filtered request headers to Thumbor

Bug: T151066
Change-Id: I798260c0635919417b834cf293d716d7371da905
---
M modules/swift/files/SwiftMedia/wmf/rewrite.py
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/modules/swift/files/SwiftMedia/wmf/rewrite.py 
b/modules/swift/files/SwiftMedia/wmf/rewrite.py
index 8dd76e8..35dec2c 100644
--- a/modules/swift/files/SwiftMedia/wmf/rewrite.py
+++ b/modules/swift/files/SwiftMedia/wmf/rewrite.py
@@ -101,6 +101,9 @@
'Accept', 'Accept-Encoding', 'X-Original-URI']:
 if reqorig.headers.get(header_to_pass) is not None:
 opener.addheaders.append((header_to_pass, 
reqorig.headers.get(header_to_pass)))
+
+thumbor_opener.addheaders = opener.addheaders
+
 # At least in theory, we shouldn't be handing out links to originals
 # that we don't have (or in the case of thumbs, can't generate).
 # However, someone may have a formerly valid link to a file, so we

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I798260c0635919417b834cf293d716d7371da905
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add PoolCounter configuration to Thumbor

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

Change subject: Add PoolCounter configuration to Thumbor
..


Add PoolCounter configuration to Thumbor

Bug: T151066
This will only take effect when the Thumbor plugins are updated to their next 
version

Change-Id: Ia955a11797e1644c5f8c725514364dbff1ddb8b3
---
M modules/thumbor/templates/server.conf.erb
1 file changed, 31 insertions(+), 0 deletions(-)

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



diff --git a/modules/thumbor/templates/server.conf.erb 
b/modules/thumbor/templates/server.conf.erb
index 32fed94..ffcf9bb 100644
--- a/modules/thumbor/templates/server.conf.erb
+++ b/modules/thumbor/templates/server.conf.erb
@@ -142,6 +142,37 @@
 # Overrides the community core class in order to install manhole
 APP_CLASS = 'wikimedia_thumbor.app.App'
 
+# PoolCounter configuration
+
+POOLCOUNTER_SERVER = 'poolcounter1001.eqiad.wmnet'
+POOLCOUNTER_PORT = 7531
+POOLCOUNTER_RELEASE_TIMEOUT = 120
+
+# Up to "workers" thumbnails can be generated at once for a given IP
+# address, with up to "maxqueue" thumbnails queued per IP
+POOLCOUNTER_CONFIG_PER_IP = {
+'workers': 32,
+'maxqueue': 500,
+'timeout': 8
+}
+
+# Up to "workers" thumbnails can be generated at once for the same original
+# with up to a "maxqueue" other thumbnail requests for that original queued
+POOLCOUNTER_CONFIG_PER_ORIGINAL = {
+'workers': 2,
+'maxqueue': 100,
+'timeout': 8
+}
+
+# An absolute maximum of "workers" expensive thumbnails can be processed at 
the same time,
+# queueing up to "maxqueue" other expensive thumbnails
+POOLCOUNTER_CONFIG_EXPENSIVE = {
+'workers': 16,
+'maxqueue': 100,
+'timeout': 8,
+'extensions': ['xcf', 'djvu', 'pdf', 'tiff']
+}
+
 
 ### Logging ##
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia955a11797e1644c5f8c725514364dbff1ddb8b3
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Filippo Giunchedi 
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]: tendril: use Letsencrypt for SSL cert

2017-01-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330829 )

Change subject: tendril: use Letsencrypt for SSL cert
..

tendril: use Letsencrypt for SSL cert

Since we are doing this for Icinga in Change-Id: I39abcfcc264619
and tendril is on the same host (for now, it will move
eventually to "dbmonitor1001/2001), we should do both
at the same time, to avoid mixing both certificate
methods on the same host.

Bug: T133717
Change-Id: I4188411f611b6a24a5888507fcb70eb0f0a34c21
---
M modules/role/manifests/tendril.pp
M modules/tendril/manifests/init.pp
M modules/tendril/templates/apache/tendril.wikimedia.org.erb
3 files changed, 13 insertions(+), 5 deletions(-)


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

diff --git a/modules/role/manifests/tendril.pp 
b/modules/role/manifests/tendril.pp
index de587c0..839e135 100644
--- a/modules/role/manifests/tendril.pp
+++ b/modules/role/manifests/tendril.pp
@@ -7,9 +7,15 @@
 
 system::role { 'role::tendril': description => 'tendril server' }
 
-sslcert::certificate { 'tendril.wikimedia.org': }
 $ssl_settings = ssl_ciphersuite('apache', 'mid', true)
 
+letsencrypt::cert::integrated { 'tendril':
+subjects   => 'tendril.wikimedia.org',
+puppet_svc => 'apache2',
+system_svc => 'apache2',
+require=> Class['apache::mod::ssl']
+}
+
 monitoring::service { 'https-tendril':
 description   => 'HTTPS-tendril',
 check_command => 'check_ssl_http!tendril.wikimedia.org',
diff --git a/modules/tendril/manifests/init.pp 
b/modules/tendril/manifests/init.pp
index 4848210..f14d79e 100644
--- a/modules/tendril/manifests/init.pp
+++ b/modules/tendril/manifests/init.pp
@@ -23,8 +23,10 @@
 include ::apache::mod::authnz_ldap
 
 apache::site { $site_name:
-content => template("tendril/apache/${site_name}.erb");
+content => template("tendril/apache/${site_name}.erb"),
+require => Letsencrypt::Cert::Integrated['tendril'],
 }
+
 require_package('php5-mysql')
 
 file { '/srv/tendril':
diff --git a/modules/tendril/templates/apache/tendril.wikimedia.org.erb 
b/modules/tendril/templates/apache/tendril.wikimedia.org.erb
index 519f5c4..c93189a 100644
--- a/modules/tendril/templates/apache/tendril.wikimedia.org.erb
+++ b/modules/tendril/templates/apache/tendril.wikimedia.org.erb
@@ -6,9 +6,9 @@
 # https://httpoxy.org/
 RequestHeader unset Proxy early
 SSLEngine On
-SSLCertificateFile /etc/ssl/localcerts/tendril.wikimedia.org.crt
-SSLCertificateChainFile /etc/ssl/localcerts/tendril.wikimedia.org.chain.crt
-SSLCertificateKeyFile /etc/ssl/private/tendril.wikimedia.org.key
+SSLCertificateFile /etc/acme/cert/tendril.crt
+SSLCertificateChainFile /etc/acme/cert/tendril.chain.crt
+SSLCertificateKeyFile /etc/acme/key/tendril.key
 <%= @ssl_settings.join("\n") %>
 DocumentRoot <%= @docroot %>
 php_admin_flag short_open_tag on

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ExtensionDistributor[master]: Update Maintenance scripts to use $this->requireExtension()

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

Change subject: Update Maintenance scripts to use $this->requireExtension()
..


Update Maintenance scripts to use $this->requireExtension()

Bug: T152139
Change-Id: I5119b6dc0d7f2f657ef0fbb668b1b63fe98c21cc
---
M maintenance/purgeCachedStats.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/maintenance/purgeCachedStats.php b/maintenance/purgeCachedStats.php
index 8f7f287..24cc901 100644
--- a/maintenance/purgeCachedStats.php
+++ b/maintenance/purgeCachedStats.php
@@ -17,6 +17,7 @@
public function __construct() {
parent::__construct();
$this->mDescription = "Purge cached ExtensionDistributor stats";
+   $this->requireExtension( 'ExtensionDistributor' );
}
 
public function execute() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5119b6dc0d7f2f657ef0fbb668b1b63fe98c21cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExtensionDistributor
Gerrit-Branch: master
Gerrit-Owner: Georggi199 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Removed some ES6 bits incompatible with production node vers...

2017-01-05 Thread Mhurd (Code Review)
Mhurd has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330828 )

Change subject: Removed some ES6 bits incompatible with production node version.
..

Removed some ES6 bits incompatible with production node version.

Downgraded my local node version to 4.6.1

Meant I had to remove destructuring lines. Very sad. Was so much
less verbose :(

Also had to use Bluebird promise instead of plain ES6 promise in
one spot.

After we update production node we should probably revert this commit.

Change-Id: If8d50f35b37fa8f3a433104785d12a7c53b33eea
---
M routes/on-this-day.js
1 file changed, 14 insertions(+), 3 deletions(-)


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

diff --git a/routes/on-this-day.js b/routes/on-this-day.js
index ced5ad0..272c4d1 100644
--- a/routes/on-this-day.js
+++ b/routes/on-this-day.js
@@ -8,6 +8,7 @@
 const dateUtil = require('../lib/dateUtil');
 const mUtil = require('../lib/mobile-util');
 const parsoid = require('../lib/parsoid-access');
+const BBPromise = require('bluebird');
 
 let app;
 
@@ -376,7 +377,9 @@
  */
 function fetchAndRespond(req, res, uriFunction, extractionFunction) {
 return fetchDocAndEtagRevision(req, uriFunction)
-.then(([doc, etagRevision]) => {
+.then(docAndEtagRevision => {
+const doc = docAndEtagRevision[0];
+const etagRevision = docAndEtagRevision[1];
 const output = extractionFunction(doc);
 endResponseWithOutput(res, output, req.params.domain, etagRevision);
 });
@@ -433,11 +436,19 @@
  * Example: http://localhost:6927/en.wikipedia.org/v1/onthisday/all/01/30
  */
 router.get('/all/:mm/:dd', (req, res) => {
-return Promise.all([
+return BBPromise.all([
 fetchDocAndEtagRevision(req, uriForDayPageRequest),
 fetchDocAndEtagRevision(req, uriForSelectedPageRequest)
 ])
-.then(([[dayDoc, dayEtagRevision], [selectionsDoc, 
selectionsEtagRevision]]) => {
+.then(docsAndEtagRevisions => {
+const dayDocAndEtagRevision = docsAndEtagRevisions[0];
+const dayDoc = dayDocAndEtagRevision[0];
+const dayEtagRevision = dayDocAndEtagRevision[1];
+
+const selectionsDocAndEtagRevision = docsAndEtagRevisions[1];
+const selectionsDoc = selectionsDocAndEtagRevision[0];
+const selectionsEtagRevision = selectionsDocAndEtagRevision[1];
+
 const etag = Math.max(dayEtagRevision, selectionsEtagRevision);
 const output = everythingInDayAndSelectionsDocs(dayDoc, selectionsDoc);
 endResponseWithOutput(res, output, req.params.domain, etag);

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ExtensionDistributor[master]: Update Maintenance scripts to use $this->requireExtension()

2017-01-05 Thread Georggi199 (Code Review)
Georggi199 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330827 )

Change subject: Update Maintenance scripts to use $this->requireExtension()
..

Update Maintenance scripts to use $this->requireExtension()

Bug: T152139
Change-Id: I5119b6dc0d7f2f657ef0fbb668b1b63fe98c21cc
---
M maintenance/purgeCachedStats.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/maintenance/purgeCachedStats.php b/maintenance/purgeCachedStats.php
index 8f7f287..24cc901 100644
--- a/maintenance/purgeCachedStats.php
+++ b/maintenance/purgeCachedStats.php
@@ -17,6 +17,7 @@
public function __construct() {
parent::__construct();
$this->mDescription = "Purge cached ExtensionDistributor stats";
+   $this->requireExtension( 'ExtensionDistributor' );
}
 
public function execute() {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Update Maintenance scripts to use $this->requireExtension()

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

Change subject: Update Maintenance scripts to use $this->requireExtension()
..


Update Maintenance scripts to use $this->requireExtension()

Bug: T152139
Change-Id: I15dcecfccbf06b3a5d676f01c83d75621ca6a9f1
---
M maintenance/CleanCNTranslateMetadata.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/maintenance/CleanCNTranslateMetadata.php 
b/maintenance/CleanCNTranslateMetadata.php
index 0e22607..11479b2 100644
--- a/maintenance/CleanCNTranslateMetadata.php
+++ b/maintenance/CleanCNTranslateMetadata.php
@@ -20,6 +20,11 @@
 class CleanCNTranslateMetadata extends Maintenance {
protected $ttag;
 
+   public function __construct() {
+   parent::__construct();
+   $this->requireExtension( 'CentralNotice' );
+   }
+
public function execute() {
$this->ttag = RevTag::getType( 'banner:translate' );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15dcecfccbf06b3a5d676f01c83d75621ca6a9f1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Georggi199 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtendedSearch[master]: Update Maintenance scripts to use $this->requireExtension()

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

Change subject: Update Maintenance scripts to use $this->requireExtension()
..


Update Maintenance scripts to use $this->requireExtension()

Bug: T152139
Change-Id: I637bbe9d09386f2bd20cfa278c6dec431eb8ef82
---
M maintenance/initBackends.php
M maintenance/rebuildIndex.php
2 files changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/maintenance/initBackends.php b/maintenance/initBackends.php
index ce3b603..fe551d9 100644
--- a/maintenance/initBackends.php
+++ b/maintenance/initBackends.php
@@ -5,6 +5,10 @@
 require_once( "$IP/maintenance/Maintenance.php" );
 
 class initBackends extends Maintenance {
+   public function __construct() {
+   parent::__construct();
+   $this->requireExtension( 'BlueSpiceExtendedSearch' );
+   }
 
public function execute() {
$this->output( 'This will delete and recreate all registered 
indices! Starting in ... ' );
diff --git a/maintenance/rebuildIndex.php b/maintenance/rebuildIndex.php
index 1fad096..2bbfc50 100644
--- a/maintenance/rebuildIndex.php
+++ b/maintenance/rebuildIndex.php
@@ -11,6 +11,7 @@
public function __construct() {
parent::__construct();
$this->addOption( 'sources', "Only these sources will be 
re-indexed. Need to be specified in form of '/'", false, true );
+   $this->requireExtension( 'BlueSpiceExtendedSearch' );
}
 
public function execute() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I637bbe9d09386f2bd20cfa278c6dec431eb8ef82
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/BlueSpiceExtendedSearch
Gerrit-Branch: master
Gerrit-Owner: Georggi199 
Gerrit-Reviewer: Filip 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Phantom42 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetmaster: fail on private post-commit hook

2017-01-05 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330824 )

Change subject: puppetmaster: fail on private post-commit hook
..

puppetmaster: fail on private post-commit hook

Also send the announce email last. Avoid spam in case the hook needs to
be ran again e.g. manually.

Change-Id: I5b7030cbb840f952a05e7c9efaf71800325d
---
M modules/puppetmaster/templates/git-master-postcommit.erb
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/24/330824/1

diff --git a/modules/puppetmaster/templates/git-master-postcommit.erb 
b/modules/puppetmaster/templates/git-master-postcommit.erb
index c7b60fe..4292281 100755
--- a/modules/puppetmaster/templates/git-master-postcommit.erb
+++ b/modules/puppetmaster/templates/git-master-postcommit.erb
@@ -1,7 +1,7 @@
 #!/bin/sh
-#
-# announce this change
-git log --pretty=format:'From %H %cd%nFrom: %ae%nTo: o...@wikimedia.org%nDate: 
%ad%nSubject: [puppet-private] (%h) %s%n%b%n' -1 --name-status | sendmail -i 
o...@wikimedia.org
+
+set -e
+set -u
 
 # Refresh the local copy
 su -c 'cd /var/lib/git/operations/private && git pull' gitpuppet
@@ -16,3 +16,6 @@
 su -c "export GIT_SSH=/srv/private/.git/ssh_wrapper.sh ; git push ssh://<%= 
workerhash['worker'] %>/srv/private master" gitpuppet
 <%- end -%>
 <%- end -%>
+
+# Finally, announce this change
+git log --pretty=format:'From %H %cd%nFrom: %ae%nTo: o...@wikimedia.org%nDate: 
%ad%nSubject: [puppet-private] (%h) %s%n%b%n' -1 --name-status | sendmail -i 
o...@wikimedia.org

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Redirect https://toolserver.org/~magnus/

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

Change subject: Redirect https://toolserver.org/~magnus/
..


Redirect https://toolserver.org/~magnus/

To any reviewer - I am very new in MediaWiki development. My two
questions are whether I should remove the other magnus redirects which
would remain the same and if the Regexp would work. Thanks.

Bug: T113696
Change-Id: Ia54cffc4c45670292bbfd20297d04bf41256fe78
---
M modules/toolserver_legacy/templates/www.toolserver.org.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/toolserver_legacy/templates/www.toolserver.org.erb 
b/modules/toolserver_legacy/templates/www.toolserver.org.erb
index 72f922a..c4756cc 100644
--- a/modules/toolserver_legacy/templates/www.toolserver.org.erb
+++ b/modules/toolserver_legacy/templates/www.toolserver.org.erb
@@ -214,6 +214,7 @@
 Redirect 301 /~magnus/geohack https://tools.wmflabs.org/geohack
 Redirect 301 /~magnus/geo https://tools.wmflabs.org/geohack
 Redirect 301 /~magnus/joanjoc/sugart.php 
https://tools.wmflabs.org/joanjoc/sugart.php
+RedirectMatch 301 \/~magnus\/(.*) https://tools.wmflabs.org/magnustools/$1
 Redirect 301 /~master https://tools.wmflabs.org/wiwosm
 Redirect 303 /~mathbot https://tools.wmflabs.org/mathbot/
 Redirect 301 /~multichill/coordinates.php 
https://tools.wmflabs.org/locator/coordinates.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia54cffc4c45670292bbfd20297d04bf41256fe78
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: DatGuy 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Tim Landscheidt 
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...prince[master]: Add geo breakdowns

2017-01-05 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327139 )

Change subject: Add geo breakdowns
..


Add geo breakdowns

Bug: T138107
Bug: T153716
Bug: T153715
Change-Id: I7a4d371f40fbb4ec822008ae3866870688621154
---
M functions.R
M server.R
A tab_documentation/first_visit_geo.md
A tab_documentation/last_action_geo.md
A tab_documentation/most_common_geo.md
A tab_documentation/traffic_ctr_geo.md
M ui.R
M www/stylesheet.css
8 files changed, 1,588 insertions(+), 10 deletions(-)

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



diff --git a/functions.R b/functions.R
index 7ee1f65..1dbda32 100644
--- a/functions.R
+++ b/functions.R
@@ -1,9 +1,21 @@
 library(polloi)
+library(ggplot2)
 library(data.table)
 library(reshape2)
 library(magrittr)
+library(toOrdinal)
+library(xts)
+library(dplyr)
+library(tidyr)
 
 source("extras.R")
+
+# Capitalize the first letter
+simpleCap <- function(x) {
+  s <- strsplit(x, " ")[[1]]
+  paste(toupper(substring(s, 1,1)), substring(s, 2),
+sep="", collapse=" ")
+}
 
 # Read in the traffic data
 read_clickthrough <- function(){
@@ -129,6 +141,163 @@
 
 }
 
+read_geo <- function() {
+
+  all_country_data <- polloi::read_dataset("portal/all_country_data.tsv", 
col_types = "Dcididid")
+  first_visits_country <- 
polloi::read_dataset("portal/first_visits_country.tsv", col_types = "Dccid")
+  last_action_country <- 
polloi::read_dataset("portal/last_action_country.tsv", col_types = "Dccid")
+  most_common_country <- 
polloi::read_dataset("portal/most_common_country.tsv", col_types = "Dccid")
+  all_country_data$country[all_country_data$country=="Cape Verde"] <- "Cabo 
Verde"
+  first_visits_country$country[first_visits_country$country=="Cape Verde"] <- 
"Cabo Verde"
+  last_action_country$country[last_action_country$country=="Cape Verde"] <- 
"Cabo Verde"
+  most_common_country$country[most_common_country$country=="Cape Verde"] <- 
"Cabo Verde"
+  all_country_data$country[all_country_data$country=="Czechia"] <- "Czech 
Republic"
+  first_visits_country$country[first_visits_country$country=="Czechia"] <- 
"Czech Republic"
+  last_action_country$country[last_action_country$country=="Czechia"] <- 
"Czech Republic"
+  most_common_country$country[most_common_country$country=="Czechia"] <- 
"Czech Republic"
+  data("countrycode_data", package="countrycode")
+  countrycode_data$country.name[c(54,143)] <- c("Congo, The Democratic 
Republic of the", "Macedonia, Republic of" )
+  countrycode_data$continent[countrycode_data$country.name %in% c("British 
Indian Ocean Territory","Christmas Island","Taiwan, Province of China")] <- 
"Asia"
+  countrycode_data$continent[countrycode_data$region == "South America"] <- 
"South America"
+  countrycode_data$continent[countrycode_data$continent == "Americas"] <- 
"North America"
+
+
+  all_country_data <- 
all_country_data[!duplicated(all_country_data[,1:2],fromLast=T),]
+  all_country_data_prop <- all_country_data %>%
+group_by(date) %>%
+mutate(event_prop=round(events/sum(events),4)*100, 
visit_prop=round(n_visit/sum(n_visit),4)*100, 
session_prop=round(n_session/sum(n_session),4)*100) %>%
+
select(date,country,event_prop,ctr,visit_prop,ctr_visit,session_prop,ctr_session)
 %>% ungroup()
+  us_mask <- grepl("^U\\.S\\.", all_country_data$country)
+  us_data <- all_country_data[us_mask,]
+  all_country_data <- us_data %>%
+mutate(clicks = events*ctr, click_v=n_visit*ctr_visit, 
click_s=n_session*ctr_session) %>%
+group_by(date) %>%
+summarise(country="United States", events=sum(events), 
ctr=round(sum(clicks)/sum(events),4),
+  n_visit=sum(n_visit), 
ctr_visit=round(sum(click_v)/sum(n_visit),4),
+  n_session=sum(n_session), 
ctr_session=round(sum(click_s)/sum(n_session),4)) %>%
+rbind(all_country_data[!us_mask,]) %>%
+arrange(date, country)
+  us_mask <- grepl("^U\\.S\\.", all_country_data_prop$country)
+  us_data_prop <- all_country_data_prop[us_mask,]
+  all_country_data_prop <- us_data_prop %>%
+group_by(date) %>%
+summarise(country="United States", event_prop=sum(event_prop),
+  visit_prop=sum(visit_prop), session_prop=sum(session_prop)) %>%
+left_join(all_country_data[, 
c("date","country","ctr","ctr_visit","ctr_session")], by=c("date","country")) 
%>%
+rbind(all_country_data_prop[!us_mask,]) %>%
+
select(date,country,event_prop,ctr,visit_prop,ctr_visit,session_prop,ctr_session)
 %>%
+arrange(date, country)
+  colnames(all_country_data) <- c("Date", "Country", "Number of Events",
+  "Overall Clickthrough Rate", "Number of 
Visits", "Clickthrough Rate Per Visit",
+  "Number of Sessions", "Clickthrough Rate Per 
Session")
+  colnames(all_country_data_prop) <- c("Date", "Country", "Number of Events",
+   "Overall Clickthrough Rate", "Number of 

[MediaWiki-commits] [Gerrit] research...wheels[master]: Bumps revscoring to 1.3.3. and pywikibase to 0.0.3

2017-01-05 Thread Halfak (Code Review)
Halfak has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330823 )

Change subject: Bumps revscoring to 1.3.3. and pywikibase to 0.0.3
..

Bumps revscoring to 1.3.3. and pywikibase to 0.0.3

Change-Id: Id6dcda250717c2c1ef17c4ee91cf2e54cfd98376
---
D pywikibase-0.0.3-py3-none-any.whl
A pywikibase-0.0.4-py3-none-any.whl
R revscoring-1.3.3-py2.py3-none-any.whl
3 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels 
refs/changes/23/330823/1

diff --git a/pywikibase-0.0.3-py3-none-any.whl 
b/pywikibase-0.0.3-py3-none-any.whl
deleted file mode 100644
index 5e6e4e6..000
--- a/pywikibase-0.0.3-py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/pywikibase-0.0.4-py3-none-any.whl 
b/pywikibase-0.0.4-py3-none-any.whl
new file mode 100644
index 000..17a4508
--- /dev/null
+++ b/pywikibase-0.0.4-py3-none-any.whl
Binary files differ
diff --git a/revscoring-1.3.1-py2.py3-none-any.whl 
b/revscoring-1.3.3-py2.py3-none-any.whl
similarity index 81%
rename from revscoring-1.3.1-py2.py3-none-any.whl
rename to revscoring-1.3.3-py2.py3-none-any.whl
index 0382c6d..f4e381e 100644
--- a/revscoring-1.3.1-py2.py3-none-any.whl
+++ b/revscoring-1.3.3-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6dcda250717c2c1ef17c4ee91cf2e54cfd98376
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: site: add restbase-dev100[1-3]

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

Change subject: site: add restbase-dev100[1-3]
..


site: add restbase-dev100[1-3]

Bug: T153880
Change-Id: Iebf4fb540d7eed74dffc433c2461032a8e86f32f
---
M manifests/site.pp
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 9cae403..9bf2cbf 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2518,6 +2518,11 @@
 role(restbase::server, cassandra)
 }
 
+# cassandra/restbase dev cluster
+node /^restbase-dev100[1-3]\.eqiad\.wmnet$/ {
+role(restbase::server, cassandra)
+}
+
 # network insights (netflow/pmacct, etc.)
 node 'rhenium.wikimedia.org' {
 role(pmacct)

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Do not try to process same change ID twice

2017-01-05 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330822 )

Change subject: Do not try to process same change ID twice
..

Do not try to process same change ID twice

Bug: T153932
Change-Id: I5c970930b0da99f6567279ce0ebfbba040bd7f91
---
M tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
M 
tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
M 
tools/src/test/java/org/wikidata/query/rdf/tool/change/RecentChangesPollerUnitTest.java
3 files changed, 46 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/22/330822/1

diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
index 611dc55..b93a952 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
@@ -315,6 +315,7 @@
 }
 } while (batch == null);
 log.debug("{} changes in batch", batch.changes().size());
+Date oldDate = null;
 while (true) {
 try {
 handleChanges(batch);
@@ -326,7 +327,11 @@
  * have some updates.
  */
 leftOffDate = new Date(batch.leftOffDate().getTime() - 
SECONDS.toMillis(1));
-rdfRepository.updateLeftOffTime(leftOffDate);
+if (oldDate == null || !oldDate.equals(leftOffDate)) {
+// Do not update repo with the same date
+oldDate = leftOffDate;
+rdfRepository.updateLeftOffTime(leftOffDate);
+}
 }
 // TODO wrap all retry-able exceptions in a special exception
 batchAdvanced.mark(batch.advanced());
@@ -435,10 +440,11 @@
  * @throws InterruptedException if the process was interrupted while 
waiting
  * during the pollDelay or waiting on something else
  */
-private B nextBatch(B batch) throws InterruptedException {
+private B nextBatch(B prevBatch) throws InterruptedException {
+B batch;
 while (true) {
 try {
-batch = changeSource.nextBatch(batch);
+batch = changeSource.nextBatch(prevBatch);
 } catch (RetryableException e) {
 log.warn("Retryable error fetching next batch.  Retrying.", e);
 continue;
diff --git 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
index 489ef9c..09ca176 100644
--- 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
+++ 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
@@ -4,8 +4,10 @@
 
 import java.text.DateFormat;
 import java.util.Date;
+import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Set;
 
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
@@ -51,7 +53,7 @@
 
 @Override
 public Batch nextBatch(Batch lastBatch) throws RetryableException {
-return batch(lastBatch.leftOffDate, lastBatch.nextContinue);
+return batch(lastBatch.leftOffDate, lastBatch);
 }
 
 /**
@@ -62,20 +64,21 @@
  * The date where we last left off.
  */
 private final Date leftOffDate;
+
 /**
- * The continue object that must be sent to wikibase to continue where
- * we left off.
+ * The set of the rcid's this batch seen.
+ * Note that some IDs may be seen but not processed
+ * due to duplicates, etc.
  */
-private final JSONObject nextContinue;
+private final Set seenIDs;
 
 /**
  * A batch that will next continue using the continue parameter.
  */
-private Batch(ImmutableList changes, long advanced, String 
leftOff, Date nextStartTime,
-JSONObject nextContinue) {
+private Batch(ImmutableList changes, long advanced, String 
leftOff, Date nextStartTime, Set seenIDs) {
 super(changes, advanced, leftOff);
 leftOffDate = nextStartTime;
-this.nextContinue = nextContinue;
+this.seenIDs = seenIDs;
 }
 
 @Override
@@ -90,8 +93,16 @@
 
 @Override
 public String leftOffHuman() {
-return leftOffDate.toString() + " (next: " + 
nextContinue.get("rccontinue").toString()
-+ ")";
+return WikibaseRepository.inputDateFormat().format(leftOffDate);
+// + " (next: " + nextContinue.get("rccontinue").toString() + ")";
+}
+
+/**
+ * Get the list of IDs this batch has seen.
+ * 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: site: add restbase-dev100[1-3]

2017-01-05 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330821 )

Change subject: site: add restbase-dev100[1-3]
..

site: add restbase-dev100[1-3]

Bug: T153880
Change-Id: Iebf4fb540d7eed74dffc433c2461032a8e86f32f
---
M manifests/site.pp
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/330821/1

diff --git a/manifests/site.pp b/manifests/site.pp
index a99a4cc..a518d50 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2543,6 +2543,11 @@
 role(restbase::server, cassandra)
 }
 
+# cassandra/restbase dev cluster
+node /^restbase-dev100[1-3]\.eqiad\.wmnet$/ {
+role(restbase::server, cassandra)
+}
+
 # network insights (netflow/pmacct, etc.)
 node 'rhenium.wikimedia.org' {
 role(pmacct)

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Enable Cassandra on restbase-dev100[1-3]

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

Change subject: Enable Cassandra on restbase-dev100[1-3]
..


Enable Cassandra on restbase-dev100[1-3]

* Renames the existing hosts to restbase-dev100[1-3], (see also:
  https://gerrit.wikimedia.org/r/330588)
* Another changeset to add keys will also be needed

Bug: T153880
Change-Id: Ief72465bd0b7f2e7c2fd065737951d191aba2ca2
---
M hieradata/common.yaml
M hieradata/common/monitoring.yaml
A hieradata/hosts/restbase-dev1001.yaml
A hieradata/hosts/restbase-dev1002.yaml
A hieradata/hosts/restbase-dev1003.yaml
M hieradata/regex.yaml
6 files changed, 118 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 16ea298..a5a7925 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -275,6 +275,11 @@
 id: 58
 sites:
   codfw: []
+  restbase_dev:
+description: "Services development test"
+id: 59
+sites:
+  eqiad: []
 puppetmaster: "puppet"
 active_labstore_host: 'labstore1001'
 statistics_servers:
diff --git a/hieradata/common/monitoring.yaml b/hieradata/common/monitoring.yaml
index 927dea3..9f436b9 100644
--- a/hieradata/common/monitoring.yaml
+++ b/hieradata/common/monitoring.yaml
@@ -194,6 +194,8 @@
 description: Restbase test/staging eqiad
   restbase_test_codfw:
 description: Restbase test/staging codfw
+  restbase_dev_eqiad:
+description: Services development testing eqiad
 
 # Service Clusters
   sca_eqiad:
diff --git a/hieradata/hosts/restbase-dev1001.yaml 
b/hieradata/hosts/restbase-dev1001.yaml
new file mode 100644
index 000..b904902
--- /dev/null
+++ b/hieradata/hosts/restbase-dev1001.yaml
@@ -0,0 +1,13 @@
+cassandra::instances:
+  a:
+jmx_port: 7189
+listen_address: 10.64.0.36
+rpc_address: 10.64.0.36
+rpc_interface: eth0
+#  b:
+#jmx_port: 7190
+#listen_address: 10.64.0.37
+#rpc_address: 10.64.0.37
+#rpc_interface: eth0
+
+do_paging: false
diff --git a/hieradata/hosts/restbase-dev1002.yaml 
b/hieradata/hosts/restbase-dev1002.yaml
new file mode 100644
index 000..025eced
--- /dev/null
+++ b/hieradata/hosts/restbase-dev1002.yaml
@@ -0,0 +1,13 @@
+#cassandra::instances:
+#  a:
+#jmx_port: 7189
+#listen_address: 10.64.32.159
+#rpc_address: 10.64.32.159
+#rpc_interface: eth0
+#  b:
+#jmx_port: 7190
+#listen_address: 10.64.32.160
+#rpc_address: 10.64.32.160
+#rpc_interface: eth0
+
+do_paging: false
diff --git a/hieradata/hosts/restbase-dev1003.yaml 
b/hieradata/hosts/restbase-dev1003.yaml
new file mode 100644
index 000..8a95351
--- /dev/null
+++ b/hieradata/hosts/restbase-dev1003.yaml
@@ -0,0 +1,13 @@
+#cassandra::instances:
+#  a:
+#jmx_port: 7189
+#listen_address: 10.64.48.117
+#rpc_address: 10.64.48.117
+#rpc_interface: eth0
+#  b:
+#jmx_port: 7190
+#listen_address: 10.64.48.118
+#rpc_address: 10.64.48.118
+#rpc_interface: eth0
+
+do_paging: false
diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index f18e091..d136761 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -278,6 +278,78 @@
   cassandra::start_rpc: 'true'
   cassandra::target_version: '2.2'
 
+restbase_dev_eqiad:
+  __regex: !ruby/regexp /^restbase-dev100[1-3]\.eqiad\.wmnet$/
+  cluster: restbase_dev
+  cassandra::seeds:
+  - restbase-dev1001.eqiad.wmnet
+  - restbase-dev1001-a.eqiad.wmnet
+  - restbase-dev1001-b.eqiad.wmnet
+  - restbase-dev1002.eqiad.wmnet
+  - restbase-dev1002-a.eqiad.wmnet
+  - restbase-dev1002-b.eqiad.wmnet
+  - restbase-dev1003.eqiad.wmnet
+  - restbase-dev1003-a.eqiad.wmnet
+  - restbase-dev1003-b.eqiad.wmnet
+  restbase::seeds:
+  - restbase-dev1001-a.eqiad.wmnet
+  - restbase-dev1001-b.eqiad.wmnet
+  - restbase-dev1002-a.eqiad.wmnet
+  - restbase-dev1002-b.eqiad.wmnet
+  - restbase-dev1003-a.eqiad.wmnet
+  - restbase-dev1003-b.eqiad.wmnet
+  restbase::hosts:
+- restbase-dev1001.eqiad.wmnet
+- restbase-dev1002.eqiad.wmnet
+- restbase-dev1003.eqiad.wmnet
+  restbase::cassandra_datacenters:
+  - eqiad
+  restbase::statsd_prefix: restbase-dev
+  cassandra::max_heap_size: 12g
+  cassandra::cluster_name: services-dev
+  cassandra::tls_cluster_name: services-dev
+  cassandra::internode_encryption: dc
+  cassandra::application_username: restb
+  cassandra::application_password: "%{passwords::cassandra::restbase}"
+  restbase::cassandra_user: restb
+  restbase::cassandra_password: "%{passwords::cassandra::restbase}"
+  cassandra::metrics::whitelist:
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorReadLatency\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorScanLatency\..*$
+- 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: grafana: add 503 breakdown to varnish-http-errors

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

Change subject: grafana: add 503 breakdown to varnish-http-errors
..


grafana: add 503 breakdown to varnish-http-errors

Distinguish 500s and 503s in the main errors graph, makes it easier to
see what's causing a generalized 5xx spike.

Change-Id: Ie23644933a487bb5c2a41045cb5a7be32e22a984
---
M modules/grafana/files/dashboards/varnish-http-errors
1 file changed, 263 insertions(+), 162 deletions(-)

Approvals:
  Ema: Looks good to me, but someone else must approve
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/modules/grafana/files/dashboards/varnish-http-errors 
b/modules/grafana/files/dashboards/varnish-http-errors
index 60a29af..d06d8f0 100644
--- a/modules/grafana/files/dashboards/varnish-http-errors
+++ b/modules/grafana/files/dashboards/varnish-http-errors
@@ -15,10 +15,10 @@
 ]
   },
   "editable": true,
+  "gnetId": null,
   "hideControls": true,
   "id": 92,
   "links": [],
-  "originalTitle": "Varnish: HTTP Errors",
   "refresh": "5m",
   "rows": [
 {
@@ -37,6 +37,13 @@
   ],
   "datasource": "graphite",
   "format": "percent",
+  "gauge": {
+"maxValue": 100,
+"minValue": 0,
+"show": false,
+"thresholdLabels": false,
+"thresholdMarkers": true
+  },
   "height": "",
   "hideTimeOverride": true,
   "id": 18,
@@ -49,6 +56,17 @@
   "type": "dashboard"
 }
   ],
+  "mappingType": 1,
+  "mappingTypes": [
+{
+  "name": "value to text",
+  "value": 1
+},
+{
+  "name": "range to text",
+  "value": 2
+}
+  ],
   "maxDataPoints": "",
   "nullPointMode": "connected",
   "nullText": null,
@@ -56,6 +74,13 @@
   "postfixFontSize": "50%",
   "prefix": "",
   "prefixFontSize": "50%",
+  "rangeMaps": [
+{
+  "from": "null",
+  "text": "N/A",
+  "to": "null"
+}
+  ],
   "span": 4,
   "sparkline": {
 "fillColor": "rgba(31, 118, 189, 0.18)",
@@ -90,17 +115,35 @@
   "colorBackground": false,
   "colorValue": true,
   "colors": [
-"rgba(129, 237, 0, 0.7)",
+"rgba(245, 54, 54, 0.7)",
 "rgba(237, 129, 40, 0.7)",
-"rgba(245, 54, 54, 0.7)"
+"rgba(129, 237, 0, 0.7)"
   ],
   "datasource": "graphite",
   "format": "short",
+  "gauge": {
+"maxValue": 100,
+"minValue": 0,
+"show": false,
+"thresholdLabels": false,
+"thresholdMarkers": true
+  },
   "height": "",
   "hideTimeOverride": true,
   "id": 12,
   "interval": null,
   "links": [],
+  "mappingType": 1,
+  "mappingTypes": [
+{
+  "name": "value to text",
+  "value": 1
+},
+{
+  "name": "range to text",
+  "value": 2
+}
+  ],
   "maxDataPoints": "",
   "nullPointMode": "connected",
   "nullText": null,
@@ -108,9 +151,16 @@
   "postfixFontSize": "50%",
   "prefix": "HTTP 5xx",
   "prefixFontSize": "50%",
+  "rangeMaps": [
+{
+  "from": "null",
+  "text": "N/A",
+  "to": "null"
+}
+  ],
   "span": 4,
   "sparkline": {
-"fillColor": "rgba(31, 118, 189, 0.18)",
+"fillColor": "rgba(193, 221, 252, 0.18)",
 "full": true,
 "lineColor": "rgb(31, 120, 193)",
 "show": true
@@ -146,11 +196,29 @@
   ],
   "datasource": "graphite",
   "format": "short",
+  "gauge": {
+"maxValue": 100,
+"minValue": 0,
+"show": false,
+"thresholdLabels": false,
+"thresholdMarkers": true
+  },
   "height": "",
   "hideTimeOverride": true,
   "id": 11,
   "interval": null,
   "links": [],
+  "mappingType": 1,
+  "mappingTypes": [
+{
+  "name": "value to text",
+  "value": 1
+},
+{
+  "name": "range to text",
+  "value": 2
+}
+  ],
   "maxDataPoints": "",
   "nullPointMode": "connected",
   "nullText": null,
@@ -158,9 +226,16 @@
   "postfixFontSize": "50%",
   "prefix": "HTTP 500",
   "prefixFontSize": "50%",
+  "rangeMaps": [
+  

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Enwiki "On This Day" endpoints.

2017-01-05 Thread Mhurd (Code Review)
Mhurd has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330820 )

Change subject: Enwiki "On This Day" endpoints.
..

Enwiki "On This Day" endpoints.

T143408

Endpoints:
 - 'births'
 - 'deaths'
 - 'events'
 - 'selected'
 - 'holidays'
 - 'all'

Includes:
 - 'title hydration'
 - eTags

Uses Parsoid html.

Background:
 On enwiki there are pages for each day of the year such as:
   https://en.m.wikipedia.org/wiki/May_20

 These pages contain lists of events, births, deaths and holidays.

 Editors also curate a smaller list of 'selected' items:
   https://en.m.wikipedia.org/wiki/Wikipedia%3ASelected_anniversaries%2FMay_20

Change-Id: I21565e73269b4ed5e717f692aebe2084401673a6
---
M lib/dateUtil.js
M lib/mobile-util.js
A routes/on-this-day.js
A test/features/onthisday/onthisday.js
4 files changed, 864 insertions(+), 0 deletions(-)


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

diff --git a/lib/dateUtil.js b/lib/dateUtil.js
index 6c19363..1795509 100644
--- a/lib/dateUtil.js
+++ b/lib/dateUtil.js
@@ -9,6 +9,8 @@
 
 const dateUtil = {};
 
+dateUtil.monthNames = monthNames;
+
 dateUtil.ONE_DAY = 8640;
 
 /**
diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 11daa2c..eea6c6d 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -14,6 +14,8 @@
 
 announcements: { name: 'announcements', version: '0.1.0' },
 
+onthisday: { name: 'onthisday', version: '0.1.0' },
+
 unpublished: { name: 'unpublished', version: '0.0.0' }
 };
 
diff --git a/routes/on-this-day.js b/routes/on-this-day.js
new file mode 100644
index 000..ced5ad0
--- /dev/null
+++ b/routes/on-this-day.js
@@ -0,0 +1,473 @@
+
+'use strict';
+
+const domino = require('domino');
+const sUtil = require('../lib/util');
+const router = sUtil.router();
+const preq = require('preq');
+const dateUtil = require('../lib/dateUtil');
+const mUtil = require('../lib/mobile-util');
+const parsoid = require('../lib/parsoid-access');
+
+let app;
+
+/* eslint-disable arrow-parens, max-len */
+
+
+/**
+ * Gets English day page titles, which are formatted as follows: 'May_20'
+ * @param  {String} monthNumberString String for month number ranging from '1' 
to '12'
+ * @param  {String} dayNumberString   String number for day of month
+ * @return {String}   Day page title. Example, inputs ('5', 
'20') returns 'May_20'
+ */
+function titleForDayPageFromMonthDayNumberStrings(monthNumberString, 
dayNumberString) {
+return `${dateUtil.monthNames[parseInt(monthNumberString) - 
1]}_${parseInt(dayNumberString)}`;
+}
+
+
+/**
+ * Gets day page Parsoid URI for day pages such as 
https://en.m.wikipedia.org/wiki/May_20
+ * @param  {Request} req Request containing month (req.params.mm) and day 
(req.params.dd) number string params
+ * @return {String}  Day page URI for month and day number. Example, input 
mm '5' dd '20 returns https://en.wikipedia.org/api/rest_v1/page/html/May_20
+ */
+function uriForDayPageRequest(req) {
+const date = titleForDayPageFromMonthDayNumberStrings(req.params.mm, 
req.params.dd);
+return `https://${req.params.domain}/api/rest_v1/page/html/${date}`;
+}
+
+
+/**
+ * Gets selected page Parsoid URI for selected pages such as 
https://en.m.wikipedia.org/wiki/Wikipedia%3ASelected_anniversaries%2FMay_20
+ * ( These pages are also where 'Today' page 
https://en.m.wikipedia.org/wiki/Wikipedia:On_this_day/Today content comes from )
+ * @param  {Request} req Request containing month (req.params.mm) and day 
(req.params.dd) number string params
+ * @return {String}  Selected page URI for month and day number. Example, 
input mm '5' dd '20 returns 
https://en.wikipedia.org/api/rest_v1/page/html/Wikipedia%3ASelected_anniversaries%2FMay_20
+ */
+function uriForSelectedPageRequest(req) {
+const date = titleForDayPageFromMonthDayNumberStrings(req.params.mm, 
req.params.dd);
+return 
`https://${req.params.domain}/api/rest_v1/page/html/Wikipedia%3ASelected_anniversaries%2F${date}`;
+}
+
+
+/**
+ * WMFPage models a link to a page
+ * @param  {String} title   Page title, i.e. 'Goat'
+ * @param  {Boolean}isTopic Events can have multiple links to pages, if 
this particular link is bolded, such as those seen on 
https://en.m.wikipedia.org/wiki/Wikipedia:On_this_day/Today, isTopic will be 
true.
+ */
+class WMFPage {
+constructor(title, isTopic) {
+this.title = title;
+this.isTopic = isTopic;
+}
+}
+
+
+/**
+ * WMFEvent models an historical event
+ * @param  {String} textEvent description
+ * @param  {Array}  pages   Array of WMFPage's for the event
+ * @param  {String} yearYear. As string because some events occured 'BC', 
sometimes also denoted 'BCE' - i.e. '32 BC' or '200 BCE'
+ */
+class WMFEvent {
+constructor(text, pages, year) {
+this.text = text;
+this.pages = pages;
+this.year = year;
+}
+}
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppet_compiler: less verbose compiler-update-facts

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

Change subject: puppet_compiler: less verbose compiler-update-facts
..


puppet_compiler: less verbose compiler-update-facts

Change-Id: Ie186bd0a8394f164920a5e7a07bed0b6123ab7ff
---
M modules/puppet_compiler/files/compiler-update-facts
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/modules/puppet_compiler/files/compiler-update-facts 
b/modules/puppet_compiler/files/compiler-update-facts
index 767fa27..d6aed85 100755
--- a/modules/puppet_compiler/files/compiler-update-facts
+++ b/modules/puppet_compiler/files/compiler-update-facts
@@ -3,16 +3,17 @@
 
 set -e
 set -u
+set -x
 
 master=${PUPPET_MASTER:-rhodium.eqiad.wmnet}
 compiler=${PUPPET_COMPILER:-compiler02.puppet3-diffs.eqiad.wmflabs}
 
-ssh $master 'sudo /usr/local/bin/puppet-facts-export'
+ssh $master 'sudo /usr/local/bin/puppet-facts-export 1>/dev/null'
 # tunnel via your localhost without ever the file touching the disk
 ssh $master cat /tmp/puppet-facts-export.tar.xz | \
 ssh $compiler 'cat > puppet-facts-export.tar.xz'
 ssh $master 'sudo rm /tmp/puppet-facts-export.tar.xz'
-ssh $compiler 'sudo tar Jxvf puppet-facts-export.tar.xz \
+ssh $compiler 'sudo tar Jxf puppet-facts-export.tar.xz \
 --directory /var/lib/catalog-differ/puppet \
 && rm puppet-facts-export.tar.xz'
 ssh $compiler 'sudo chown -R jenkins-deploy:wikidev 
/var/lib/catalog-differ/puppet/yaml'

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Get wikibase item ID in MW API page lead requests

2017-01-05 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330819 )

Change subject: Get wikibase item ID in MW API page lead requests
..

Get wikibase item ID in MW API page lead requests

RESTBase page lead responses already return the wikibase ID, if present.

This adds logic to do the same for MW API requests so that we can have
feature parity for the two loading methods.

This should complement (and not conflict with, at least in the current
iteration) Ie1b18879dfe634241ce09913959b5b53056f840e.

Depends on a change in MobileFrontend to do for empty pageprops result
sets what I20bc5a43c2f348925584b8473f95abb87c623974 did for empty
protection result sets, so we don't have to add complex and fragile logic
to conditionally handle empty arrays.

Bug: T154032
Change-Id: I11b37fa6f27adf64fd1f41e10d4127bdc0ad422d
Depends-On: I5dacdaf356bfb4d85a62a7e8972b5e6e14f22458
---
M app/src/main/java/org/wikipedia/page/PageProperties.java
M app/src/main/java/org/wikipedia/server/PageLeadProperties.java
M app/src/main/java/org/wikipedia/server/mwapi/MwPageLead.java
M app/src/main/java/org/wikipedia/server/mwapi/MwPageService.java
4 files changed, 39 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/19/330819/1

diff --git a/app/src/main/java/org/wikipedia/page/PageProperties.java 
b/app/src/main/java/org/wikipedia/page/PageProperties.java
index 52e22fe..8130c44 100644
--- a/app/src/main/java/org/wikipedia/page/PageProperties.java
+++ b/app/src/main/java/org/wikipedia/page/PageProperties.java
@@ -42,6 +42,7 @@
 private final String leadImageName;
 @Nullable private final String titlePronunciationUrl;
 @Nullable private final Location geo;
+@Nullable private final String wikiBaseItem;
 
 /**
  * True if the user who first requested this page can edit this page
@@ -78,6 +79,7 @@
 
 isMainPage = core.isMainPage();
 isDisambiguationPage = core.isDisambiguation();
+wikiBaseItem = core.getWikiBaseItem();
 }
 
 /**
@@ -123,6 +125,7 @@
 
 isMainPage = json.has("mainpage");
 isDisambiguationPage = json.has("disambiguation");
+wikiBaseItem = json.optString("wikibase_item");
 }
 
 public int getPageId() {
@@ -188,6 +191,11 @@
 return leadImageName;
 }
 
+@Nullable
+public String getWikiBaseItem() {
+return wikiBaseItem;
+}
+
 @Override
 public int describeContents() {
 return 0;
@@ -209,6 +217,7 @@
 parcel.writeInt(isDisambiguationPage ? 1 : 0);
 parcel.writeString(leadImageUrl);
 parcel.writeString(leadImageName);
+parcel.writeString(wikiBaseItem);
 }
 
 private PageProperties(Parcel in) {
@@ -226,6 +235,7 @@
 isDisambiguationPage = in.readInt() == 1;
 leadImageUrl = in.readString();
 leadImageName = in.readString();
+wikiBaseItem = in.readString();
 }
 
 public static final Parcelable.Creator CREATOR
@@ -265,7 +275,8 @@
 && isDisambiguationPage == that.isDisambiguationPage
 && TextUtils.equals(editProtectionStatus, 
that.editProtectionStatus)
 && TextUtils.equals(leadImageUrl, that.leadImageUrl)
-&& TextUtils.equals(leadImageName, that.leadImageName);
+&& TextUtils.equals(leadImageName, that.leadImageName)
+&& TextUtils.equals(wikiBaseItem, that.wikiBaseItem);
 }
 
 @Override
@@ -280,6 +291,7 @@
 result = 31 * result + (isDisambiguationPage ? 1 : 0);
 result = 31 * result + (leadImageUrl != null ? leadImageUrl.hashCode() 
: 0);
 result = 31 * result + (leadImageName != null ? 
leadImageName.hashCode() : 0);
+result = 31 * result + (wikiBaseItem != null ? wikiBaseItem.hashCode() 
: 0);
 result = 31 * result + (canEdit ? 1 : 0);
 result = 31 * result + pageId;
 result = 31 * result + namespace.code();
@@ -302,6 +314,7 @@
 json.put("displaytitle", displayTitleText);
 json.put(JSON_NAME_TITLE_PRONUNCIATION_URL, titlePronunciationUrl);
 json.put(JSON_NAME_GEO, GeoMarshaller.marshal(geo));
+json.put("wikibase_item", wikiBaseItem);
 if (editProtectionStatus == null) {
 json.put("protection", new JSONArray());
 } else {
diff --git a/app/src/main/java/org/wikipedia/server/PageLeadProperties.java 
b/app/src/main/java/org/wikipedia/server/PageLeadProperties.java
index 2d4e119..c24ef5f 100644
--- a/app/src/main/java/org/wikipedia/server/PageLeadProperties.java
+++ b/app/src/main/java/org/wikipedia/server/PageLeadProperties.java
@@ -43,6 +43,9 @@
 String getNormalizedTitle();
 
 @Nullable
+String getWikiBaseItem();
+
+@Nullable
 String getDescription();
 
 /**
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Follow-up 873d3c9ff: make RCFilters widget input use interfa...

2017-01-05 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330818 )

Change subject: Follow-up 873d3c9ff: make RCFilters widget input use interface 
directionality
..

Follow-up 873d3c9ff: make RCFilters widget input use interface directionality

MediaWiki has CSS forcing inputs and textareas to use the directionality
of the content language. This normally makes sense, but not for this input.

Change-Id: Ic4d0007e8b177241a86e487fe70c2bf4ca86a520
---
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
index a610e8f..d4d17b8 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
@@ -24,6 +24,11 @@
&-search {
max-width: none;
margin-top: -0.5em;
+
+   input {
+   // Make sure this uses the interface direction, not the 
content direction
+   direction: ltr;
+   }
}
 
&-capsule-invalid-filter {

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

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

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


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

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

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


ganglia: switch eqiad aggregator from carbon to install1001

We want to stop using carbon for this. In codfw we use
install2001 for it, so it seems to makes sense to also
use install1001 for eqiad.

Bug: T123733
Bug: T132757
Change-Id: Ib2db17637711e5ae22ee4c07dcb558e6b13dca27
---
M hieradata/eqiad.yaml
M manifests/site.pp
M modules/ganglia/manifests/configuration.pp
3 files changed, 6 insertions(+), 7 deletions(-)

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



diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index ccf9c4c..37ca9a9 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -24,7 +24,7 @@
 #
 # Ganglia
 #
-ganglia_aggregators: carbon.wikimedia.org:9649
+ganglia_aggregators: install1001.wikimedia.org:9649
 
 # Eventlogging
 eventlogging_host: 10.64.32.167 # eventlog1001
diff --git a/manifests/site.pp b/manifests/site.pp
index 00b474a..9cae403 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -234,11 +234,6 @@
 interface::add_ip6_mapped { 'main':
 interface => 'eth0',
 }
-
-class { 'ganglia::monitor::aggregator':
-sites =>  'eqiad',
-}
-
 }
 
 # cerium, praseodymium and xenon are Cassandra test hosts
@@ -1318,6 +1313,10 @@
 interface::add_ip6_mapped { 'main':
 interface => 'eth0',
 }
+
+class { 'ganglia::monitor::aggregator':
+sites =>  'eqiad',
+}
 }
 
 node 'install2001.wikimedia.org' {
diff --git a/modules/ganglia/manifests/configuration.pp 
b/modules/ganglia/manifests/configuration.pp
index 721548e..2576e83 100644
--- a/modules/ganglia/manifests/configuration.pp
+++ b/modules/ganglia/manifests/configuration.pp
@@ -6,7 +6,7 @@
 $url = 'http://ganglia.wikimedia.org'
 $gmetad_hosts = [ '208.80.154.53']
 $aggregator_hosts = {
-'eqiad' => [ ipresolve('carbon.wikimedia.org') ],
+'eqiad' => [ ipresolve('install1001.wikimedia.org') ],
 'esams' => [ ipresolve('bast3001.wikimedia.org') ],
 'codfw' => [ ipresolve('install2001.wikimedia.org') ],
 'ulsfo' => [ ipresolve('bast4001.wikimedia.org') ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2db17637711e5ae22ee4c07dcb558e6b13dca27
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: parser: Update outdated comment about ImageGallery

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

Change subject: parser: Update outdated comment about ImageGallery
..


parser: Update outdated comment about ImageGallery

Follows-up f90634a6.

Change-Id: Ic17dc03cc37b85f222f3bb525e4cb39afc6f22ae
---
M includes/parser/Parser.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 1ca9dac..f279af2 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -4990,7 +4990,7 @@
$descQuery = false;
Hooks::run( 'BeforeParserFetchFileAndTitle',
[ $this, $title, &$options, &$descQuery ] );
-   # Don't register it now, as ImageGallery does that 
later.
+   # Don't register it now, as TraditionalImageGallery 
does that later.
$file = $this->fetchFileNoRegister( $title, $options );
$handler = $file ? $file->getHandler() : false;
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Foxway[master]: Migrate away from UtfNormal in core to external UtfNormal li...

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

Change subject: Migrate away from UtfNormal in core to external UtfNormal 
library
..


Migrate away from UtfNormal in core to external UtfNormal library

In MediaWiki version 1.25, the UtfNormal library was split into a separate 
wikimedia/utfnormal package.
This patch changes the code to reflect this change.

Disable testRun_echo_intval_12 phpunit test as it was failing

Remove unnecesary jQuery dependancy from Resource Loader module

Bug: T153994
Change-Id: I8371572b70ae95b227fb6d22119a4dc47b379044
---
M Foxway.body.php
M Foxway.php
M tests/phpunit/includes/InterpreterTest.php
3 files changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/Foxway.body.php b/Foxway.body.php
index 62f63c3..4f7879a 100644
--- a/Foxway.body.php
+++ b/Foxway.body.php
@@ -7,6 +7,9 @@
  * @author Pavel Astakhov 
  * @licence GNU General Public Licence 2.0 or later
  */
+
+use UtfNormal\Validator;
+
 class Foxway {
 
static $DebugLoops = false;
@@ -47,7 +50,7 @@
$return = implode($result);
 
self::$time += microtime(true) - self::$startTime;
-   return \UtfNormal::cleanUp($return);
+   return Validator::cleanUp($return);
}
 
public static function render($input, array $args, Parser $parser, 
PPFrame $frame) {
@@ -82,7 +85,7 @@
}
 
self::$time += microtime(true) - self::$startTime;
-   return \UtfNormal::cleanUp($return);
+   return Validator::cleanUp($return);
}
 
public static function isBanned(PPFrame $frame) {
diff --git a/Foxway.php b/Foxway.php
index d2eb733..53ee92c 100644
--- a/Foxway.php
+++ b/Foxway.php
@@ -92,7 +92,6 @@
 
 $wgResourceModules['ext.Foxway.DebugLoops'] = array(
'scripts' => 'resources/ext.foxway.debugloops.js',
-   'dependencies' => 'jquery',
'localBasePath' => __DIR__,
'remoteExtPath' => 'Foxway'
 );
diff --git a/tests/phpunit/includes/InterpreterTest.php 
b/tests/phpunit/includes/InterpreterTest.php
index 2d5c4b1..0c057cf 100644
--- a/tests/phpunit/includes/InterpreterTest.php
+++ b/tests/phpunit/includes/InterpreterTest.php
@@ -1212,6 +1212,7 @@
);
}
public function testRun_echo_intval_12() {
+   $this->markTestSkipped( 'broken' );
$this->assertEquals(
Interpreter::run('echo 
intval(42000);'),
array('0')
@@ -2011,6 +2012,7 @@
}
 
public function testRun_RString_similar_text() {
+   $this->markTestSkipped( 'broken' );
$this->assertEquals(
Interpreter::run('$var_1 = "PHP IS GREAT"; 
$var_2 = "WITH MYSQL"; similar_text($var_1, $var_2, $percent); echo $percent;'),
array('27.272727272727')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8371572b70ae95b227fb6d22119a4dc47b379044
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Foxway
Gerrit-Branch: master
Gerrit-Owner: MtDu 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppet_compiler: less verbose compiler-update-facts

2017-01-05 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330817 )

Change subject: puppet_compiler: less verbose compiler-update-facts
..

puppet_compiler: less verbose compiler-update-facts

Change-Id: Ie186bd0a8394f164920a5e7a07bed0b6123ab7ff
---
M modules/puppet_compiler/files/compiler-update-facts
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/330817/1

diff --git a/modules/puppet_compiler/files/compiler-update-facts 
b/modules/puppet_compiler/files/compiler-update-facts
index 767fa27..d6aed85 100755
--- a/modules/puppet_compiler/files/compiler-update-facts
+++ b/modules/puppet_compiler/files/compiler-update-facts
@@ -3,16 +3,17 @@
 
 set -e
 set -u
+set -x
 
 master=${PUPPET_MASTER:-rhodium.eqiad.wmnet}
 compiler=${PUPPET_COMPILER:-compiler02.puppet3-diffs.eqiad.wmflabs}
 
-ssh $master 'sudo /usr/local/bin/puppet-facts-export'
+ssh $master 'sudo /usr/local/bin/puppet-facts-export 1>/dev/null'
 # tunnel via your localhost without ever the file touching the disk
 ssh $master cat /tmp/puppet-facts-export.tar.xz | \
 ssh $compiler 'cat > puppet-facts-export.tar.xz'
 ssh $master 'sudo rm /tmp/puppet-facts-export.tar.xz'
-ssh $compiler 'sudo tar Jxvf puppet-facts-export.tar.xz \
+ssh $compiler 'sudo tar Jxf puppet-facts-export.tar.xz \
 --directory /var/lib/catalog-differ/puppet \
 && rm puppet-facts-export.tar.xz'
 ssh $compiler 'sudo chown -R jenkins-deploy:wikidev 
/var/lib/catalog-differ/puppet/yaml'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...NamespacePopups[master]: testing code, do not use

2017-01-05 Thread VictorPorton (Code Review)
VictorPorton has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330813 )

Change subject: testing code, do not use
..

testing code, do not use

Change-Id: I1c8aa3b9e4056e10af4924d0abbef68a7139f894
---
M NamespacePopups.hooks.php
M extension.json
2 files changed, 29 insertions(+), 7 deletions(-)


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

diff --git a/NamespacePopups.hooks.php b/NamespacePopups.hooks.php
index 69053f4..7d74e27 100644
--- a/NamespacePopups.hooks.php
+++ b/NamespacePopups.hooks.php
@@ -2,6 +2,15 @@
 
 // use MediaWiki\Title;
 
+function var_dump_ret($mixed = null) {
+  ob_start();
+  var_dump($mixed);
+  $content = ob_get_contents();
+  ob_end_clean();
+  return $content;
+}
+
+
 class NamespacePopupsHooks {
public static function onHtmlPageLinkRendererEnd( $renderer, $target, 
$isKnown, &$text, &$attribs, &$ret ) {
 global $wgNamespacePopupsNamespaceMap, 
$wgNamespacePopupsAnchor, $wgArticlePath;
@@ -41,12 +50,25 @@
 return false;
}
 
-   public static function onLinksUpdateConstructed( LinksUpdate &$updater 
) {
+   public static function onOutputPageParserOutput( OutputPage $page, 
$parserOutput ) {
 global $wgNamespacePopupsNamespaceMap;
 
 if(!$wgNamespacePopupsNamespaceMap) return;
 
-$oldLinks = $updater->mLinks;
+$parserOutput->addLink(Title::newFromText( 'B:WithoutSpaces' 
));
+wfDebugLog( 'namespacepopups', var_dump_ret( 
$page->getPageTitle() ) );
+try {
+$update = new LinksUpdate( Title::newFromText( 
$page->getPageTitle() ), $parserOutput );
+$update->doUpdate(); // TODO: Isn't it redundant (and 
thus inefficient) to call here?
+} catch( InvalidArgumentException $e ) { // for example, 
rendering "edit" page
+return; // FIXME: return value?
+}
+return;
+
+$oldLinks = $parserOutput->getLinks(); // FIXME
+
+wfDebugLog( 'namespacepopups', var_dump_ret($oldLinks) );
+return;
 
 foreach(array_keys($oldLinks) as $linkPage) {
 if(preg_match( '|^([^:/]+):(.*)|', $linkPage, $m )) {
@@ -63,9 +85,9 @@
 } else {
 $popupPage = $popupNS === '' ? $remains : 
"$popupNS:$remains";
 }
-// FIXME: What's about spaces and underscores?
-if(!isset($updater->mLinks[$popupPage])) // cache
-$updater->mLinks[$popupPage] = 
Title::newFromDBkey($popupPage)->getArticleID();
+wfDebugLog( 'namespacepopups', 
var_dump_ret($popupPage) );
+
+$parserOutput->addLink($popupPage);
 }
}
 }
diff --git a/extension.json b/extension.json
index 5e969a0..50a54fb 100644
--- a/extension.json
+++ b/extension.json
@@ -19,8 +19,8 @@
"HtmlPageLinkRendererEnd": [
"NamespacePopupsHooks::onHtmlPageLinkRendererEnd"
],
-   "LinksUpdateConstructed": [
-"NamespacePopupsHooks::onLinksUpdateConstructed"
+   "OutputPageParserOutput": [
+"NamespacePopupsHooks::onOutputPageParserOutput"
]
},
"ResourceFileModulePaths": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c8aa3b9e4056e10af4924d0abbef68a7139f894
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NamespacePopups
Gerrit-Branch: master
Gerrit-Owner: VictorPorton 

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


[MediaWiki-commits] [Gerrit] mediawiki...NamespacePopups[master]: finished a stage of my buggy code

2017-01-05 Thread VictorPorton (Code Review)
VictorPorton has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330816 )

Change subject: finished a stage of my buggy code
..

finished a stage of my buggy code

Change-Id: Ib2cc011e29544966baf418fbd1241a875464c1dd
---
M NamespacePopups.hooks.php
1 file changed, 1 insertion(+), 9 deletions(-)


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

diff --git a/NamespacePopups.hooks.php b/NamespacePopups.hooks.php
index c629b90..2b27988 100644
--- a/NamespacePopups.hooks.php
+++ b/NamespacePopups.hooks.php
@@ -2,14 +2,6 @@
 
 // use MediaWiki\Title;
 
-function var_dump_ret($mixed = null) {
-  ob_start();
-  var_dump($mixed);
-  $content = ob_get_contents();
-  ob_end_clean();
-  return $content;
-}
-
 class NamespacePopupsHooks {
public static function onHtmlPageLinkRendererEnd( $renderer, $target, 
$isKnown, &$text, &$attribs, &$ret ) {
 global $wgNamespacePopupsNamespaceMap, 
$wgNamespacePopupsAnchor, $wgArticlePath;
@@ -49,7 +41,7 @@
 return false;
}
 
-   // FIXME: Works every odd time
+   // FIXME: Works every odd edit and does not work at even edits (or vice 
versa)
public static function onOutputPageParserOutput( OutputPage $page, 
$parserOutput ) {
 global $wgNamespacePopupsNamespaceMap;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2cc011e29544966baf418fbd1241a875464c1dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NamespacePopups
Gerrit-Branch: master
Gerrit-Owner: VictorPorton 

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


[MediaWiki-commits] [Gerrit] mediawiki...NamespacePopups[master]: created a version which works once per twice :-(

2017-01-05 Thread VictorPorton (Code Review)
VictorPorton has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330814 )

Change subject: created a version which works once per twice :-(
..

created a version which works once per twice :-(

Change-Id: I167268a23cdea3817bfd942358f8427a03043d1b
---
M NamespacePopups.hooks.php
1 file changed, 23 insertions(+), 31 deletions(-)


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

diff --git a/NamespacePopups.hooks.php b/NamespacePopups.hooks.php
index 7d74e27..cf51ee9 100644
--- a/NamespacePopups.hooks.php
+++ b/NamespacePopups.hooks.php
@@ -2,15 +2,6 @@
 
 // use MediaWiki\Title;
 
-function var_dump_ret($mixed = null) {
-  ob_start();
-  var_dump($mixed);
-  $content = ob_get_contents();
-  ob_end_clean();
-  return $content;
-}
-
-
 class NamespacePopupsHooks {
public static function onHtmlPageLinkRendererEnd( $renderer, $target, 
$isKnown, &$text, &$attribs, &$ret ) {
 global $wgNamespacePopupsNamespaceMap, 
$wgNamespacePopupsAnchor, $wgArticlePath;
@@ -50,34 +41,24 @@
 return false;
}
 
+   // FIXME: Works every odd time
public static function onOutputPageParserOutput( OutputPage $page, 
$parserOutput ) {
 global $wgNamespacePopupsNamespaceMap;
 
 if(!$wgNamespacePopupsNamespaceMap) return;
 
-$parserOutput->addLink(Title::newFromText( 'B:WithoutSpaces' 
));
-wfDebugLog( 'namespacepopups', var_dump_ret( 
$page->getPageTitle() ) );
-try {
-$update = new LinksUpdate( Title::newFromText( 
$page->getPageTitle() ), $parserOutput );
-$update->doUpdate(); // TODO: Isn't it redundant (and 
thus inefficient) to call here?
-} catch( InvalidArgumentException $e ) { // for example, 
rendering "edit" page
-return; // FIXME: return value?
+$flag = FALSE;
+$oldLinks = [];
+// The below algorithm enumerates all links. This may be a 
little inefficient
+foreach($parserOutput->getLinks() as $linkNSid => $linksArray) 
{
+$linkNS = MWNamespace::getCanonicalName( $linkNSid );
+foreach(array_keys($linksArray) as $remains)
+$oldLinks[] = [ $linkNS, $remains ];
 }
-return;
 
-$oldLinks = $parserOutput->getLinks(); // FIXME
+foreach($oldLinks as $linkInfo) {
+list($linkNS, $remains) = $linkInfo;
 
-wfDebugLog( 'namespacepopups', var_dump_ret($oldLinks) );
-return;
-
-foreach(array_keys($oldLinks) as $linkPage) {
-if(preg_match( '|^([^:/]+):(.*)|', $linkPage, $m )) {
-$linkNS = $m[1];
-$remains = $m[2];
-} else {
-$linkNS = '';
-$remains = $linkPage;
-}
 $popupNS = @$wgNamespacePopupsNamespaceMap[$linkNS] ?: 
@$wgNamespacePopupsNamespaceMap['*'];
 if(!$popupNS) continue;
 if($popupNS === '*') {
@@ -85,9 +66,20 @@
 } else {
 $popupPage = $popupNS === '' ? $remains : 
"$popupNS:$remains";
 }
-wfDebugLog( 'namespacepopups', 
var_dump_ret($popupPage) );
 
-$parserOutput->addLink($popupPage);
+$parserOutput->addLink( 
Title::newFromDBkey($popupPage) );
+$flag = TRUE;
 }
+
+// if(!$flag) return; // update nothing
+
+try {
+$ourTitle = $page->getPageTitle();
+if(!$ourTitle) return;
+$update = new LinksUpdate( Title::newFromText( 
$ourTitle ), $parserOutput );
+} catch( InvalidArgumentException $e ) { // for example, 
rendering "edit" page
+return;
+}
+$update->doUpdate(); // TODO: Isn't it redundant (and thus 
inefficient) to call here?
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I167268a23cdea3817bfd942358f8427a03043d1b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NamespacePopups
Gerrit-Branch: master
Gerrit-Owner: VictorPorton 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] mediawiki...NamespacePopups[master]: which works once per twice :-(

2017-01-05 Thread VictorPorton (Code Review)
VictorPorton has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330815 )

Change subject: which works once per twice :-(
..

which works once per twice :-(

Change-Id: I1f2a101e219f3228cbced6f3078f256b0ecc4800
---
M NamespacePopups.hooks.php
1 file changed, 10 insertions(+), 1 deletion(-)


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

diff --git a/NamespacePopups.hooks.php b/NamespacePopups.hooks.php
index cf51ee9..c629b90 100644
--- a/NamespacePopups.hooks.php
+++ b/NamespacePopups.hooks.php
@@ -2,6 +2,14 @@
 
 // use MediaWiki\Title;
 
+function var_dump_ret($mixed = null) {
+  ob_start();
+  var_dump($mixed);
+  $content = ob_get_contents();
+  ob_end_clean();
+  return $content;
+}
+
 class NamespacePopupsHooks {
public static function onHtmlPageLinkRendererEnd( $renderer, $target, 
$isKnown, &$text, &$attribs, &$ret ) {
 global $wgNamespacePopupsNamespaceMap, 
$wgNamespacePopupsAnchor, $wgArticlePath;
@@ -69,9 +77,10 @@
 
 $parserOutput->addLink( 
Title::newFromDBkey($popupPage) );
 $flag = TRUE;
+wfDebugLog( 'namespacepopups', "[[$popupPage]]" );
 }
 
-// if(!$flag) return; // update nothing
+if(!$flag) return; // update nothing
 
 try {
 $ourTitle = $page->getPageTitle();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f2a101e219f3228cbced6f3078f256b0ecc4800
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NamespacePopups
Gerrit-Branch: master
Gerrit-Owner: VictorPorton 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: API: Make empty pageprops array associative

2017-01-05 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330812 )

Change subject: API: Make empty pageprops array associative
..

API: Make empty pageprops array associative

Same as T69054, but for an empty pageprops result.

Explicitly set the result array type to associative, so that an empty
array is sent in JSON as a JSON object and not an array.  This removes
the need for complex and fragile client-side handling of multiple data
types for the same key.

Adds a test for both the current change and T69054, which is currently
untested.

Change-Id: I5dacdaf356bfb4d85a62a7e8972b5e6e14f22458
---
M includes/api/ApiMobileView.php
M tests/phpunit/api/ApiMobileViewTest.php
2 files changed, 31 insertions(+), 0 deletions(-)


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

diff --git a/includes/api/ApiMobileView.php b/includes/api/ApiMobileView.php
index 66af090..07f2a4c 100644
--- a/includes/api/ApiMobileView.php
+++ b/includes/api/ApiMobileView.php
@@ -128,6 +128,7 @@
$propNames = explode( '|', $propNames );
$pageProps = array_intersect_key( 
$data['pageprops'], array_flip( $propNames ) );
}
+   ApiResult::setArrayType( $pageProps, 'assoc' );
$resultObj->addValue( null, $moduleName,
[ 'pageprops' => $pageProps ]
);
diff --git a/tests/phpunit/api/ApiMobileViewTest.php 
b/tests/phpunit/api/ApiMobileViewTest.php
index db20904..ca7794d 100644
--- a/tests/phpunit/api/ApiMobileViewTest.php
+++ b/tests/phpunit/api/ApiMobileViewTest.php
@@ -413,4 +413,34 @@
);
}
}
+
+   public function testEmptyResultArraysAreAssociative() {
+   $this->setMwGlobals( 'wgAPIModules', [ 'mobileview' => 
'MockApiMobileView' ] );
+
+   $request = new FauxRequest( [
+   'action' => 'mobileview',
+   'page' => 'Foo',
+   'text' => 'foo',
+   'onlyrequestedsections' => '',
+   'sections' => 1,
+   'prop' => 'protection|pageprops',
+   'pageprops' => 'foo', // intentionally nonexistent
+   ] );
+
+   $context = new RequestContext();
+   $context->setRequest( $request );
+   $api = new MockApiMobileView( new ApiMain( $context ), 
'mobileview' );
+
+   $api->execute();
+
+   $result = $api->getResult()->getResultData();
+
+   $protection = $result['mobileview']['protection'];
+   $pageprops = $result['mobileview']['pageprops'];
+
+   $this->assertTrue( $protection[ApiResult::META_TYPE] === 
'assoc' );
+   $this->assertTrue( count( $protection ) === 1); // the only 
element is the array type flag
+   $this->assertTrue( $pageprops[ApiResult::META_TYPE] === 'assoc' 
);
+   $this->assertTrue( count( $pageprops ) === 1); // the only 
element is the array type flag
+   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: DHCP: Add dhcp entries for elastic2025-elastic2036 Bug:T154251

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

Change subject: DHCP: Add dhcp entries for elastic2025-elastic2036 Bug:T154251
..


DHCP: Add dhcp entries for elastic2025-elastic2036
Bug:T154251

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

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



diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 77d21ad..f416015 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -2286,6 +2286,66 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host elastic2025 {
+hardware ethernet 94:18:82:6f:08:f4;
+fixed-address elastic2025.codfw.wmnet;
+}
+
+host elastic2026 {
+hardware ethernet 94:18:82:6f:28:b8;
+fixed-address elastic2026.codfw.wmnet;
+}
+
+host elastic2027 {
+hardware ethernet 94:18:82:6f:28:10;
+fixed-address elastic2027.codfw.wmnet;
+}
+
+host elastic2028 {
+hardware ethernet 94:18:82:6f:08:b8;
+fixed-address elastic2028.codfw.wmnet;
+}
+
+host elastic2029 {
+hardware ethernet 94:18:82:6f:18:44;
+fixed-address elastic2029.codfw.wmnet;
+}
+
+host elastic2030 {
+hardware ethernet 94:18:82:6f:08:fc;
+fixed-address elastic2030.codfw.wmnet;
+}
+
+host elastic2031 {
+hardware ethernet 94:18:82:6f:38:28;
+fixed-address elastic2031.codfw.wmnet;
+}
+
+host elastic2032 {
+hardware ethernet 94:18:82:6f:18:f4;
+fixed-address elastic2032.codfw.wmnet;
+}
+
+host elastic2033 {
+hardware ethernet 94:18:82:6f:18:1c;
+fixed-address elastic2033.codfw.wmnet;
+}
+
+host elastic2034 {
+hardware ethernet 94:18:82:6f:08:e4;
+fixed-address elastic2034.codfw.wmnet;
+}
+
+host elastic2035 {
+hardware ethernet 94:18:82:69:bc:d0;
+fixed-address elastic2035.codfw.wmnet;
+}
+
+host elastic2036 {
+hardware ethernet 94:18:82:6f:18:34;
+fixed-address elastic2036.codfw.wmnet;
+}
+
 host es1011 {
 hardware ethernet 44:A8:42:35:6C:73;
 fixed-address es1011.eqiad.wmnet;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I858db5652c7fe8c2a0f361fc9beb30700ee4adb2
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: RobH 
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]: Adding install params for elastic2025-elastic2036 Bug:T154251

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

Change subject: Adding install params for elastic2025-elastic2036 Bug:T154251
..


Adding install params for elastic2025-elastic2036
Bug:T154251

Change-Id: Ic4c0b90e0e01fd230890bd845cfa44da860623a6
---
M modules/install_server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 3d2af50..8ceb798 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -70,7 +70,7 @@
 druid100[123]) echo partman/druid-4ssd-raid10.cfg ;; \
 eeden|maerlant|multatuli|nescio) echo partman/raid1-1partition.cfg ;; \
 elastic101[7-9]|elastic102[0-9]|elastic103[0-1]) echo 
partman/elasticsearch-raid0.cfg ;; \
-elastic103[2-9]|elastic104[0-9]|elastic20[0-2][0-9]|elastic203[0-1]) 
echo partman/elasticsearch-raid1.cfg ;; \
+elastic103[2-9]|elastic104[0-9]|elastic20[0-2][0-9]|elastic203[0-6]) 
echo partman/elasticsearch-raid1.cfg ;; \
 labmon1001|mwlog[12]001|relforge100[12]|scb200[1-4]) echo 
partman/raid10-gpt-srv-lvm-ext4.cfg ;; \
 analytics1003|cobalt|thorium) echo partman/raid10-gpt-srv-lvm-ext4.cfg 
;; \
 
aluminium|argon|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|meitnerium|mendelevium|mwdebug100[12]|nihal|nitrogen|planet[12]001|pollux|rutherfordium|sca[12]00[34]|seaborgium|serpens|alsafi|kraz|install1001|ununpentium|zosma)
 echo partman/flat.cfg virtual.cfg ;; \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4c0b90e0e01fd230890bd845cfa44da860623a6
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: RobH 
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...ActiveAbstract[master]: Migrate away from UtfNormal in core to external UtfNormal li...

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

Change subject: Migrate away from UtfNormal in core to external UtfNormal 
library
..


Migrate away from UtfNormal in core to external UtfNormal library

In MediaWiki version 1.25, the UtfNormal library was split into a separate 
wikimedia/utfnormal package.
This patch changes the code to reflect this change.

Bug: T153994
Change-Id: Ideff34ca76fff35100d820ccad83e027c0864881
---
M AbstractFilter.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/AbstractFilter.php b/AbstractFilter.php
index 78b2466..3782569 100644
--- a/AbstractFilter.php
+++ b/AbstractFilter.php
@@ -15,6 +15,8 @@
  *   --filter=abstract:variant=zh-cn
  */
 
+use UtfNormal\Validator;
+
 /**
  * Tosses away the MediaWiki XML and generates new output
  */
@@ -120,7 +122,7 @@
$extract = $this->extractStart( $stripped );
$clipped = substr( $extract, 0, 1024 ); // not too long pls
 
-   return UtfNormal::cleanUp( $clipped );
+   return Validator::cleanUp( $clipped );
}
 
/**
@@ -222,7 +224,7 @@
for ( $i = 1; $i < $secsCount; $i += 2 ) {
$inside = preg_replace( '/^=+\s*(.*?)\s*=+/', '$1', 
$secs[$i] );
$stripped = $this->stripMarkup( $inside ); // strip 
internal markup and 
-   $header = UtfNormal::cleanUp( $stripped );
+   $header = Validator::cleanUp( $stripped );
$anchor = $wgParser->guessSectionNameFromWikiText( 
$header );
$url = $this->title->getCanonicalUrl() . $anchor;
$headers[$header] = $url;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ideff34ca76fff35100d820ccad83e027c0864881
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ActiveAbstract
Gerrit-Branch: master
Gerrit-Owner: MtDu 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...LiquidThreads[master]: Migrate away from UtfNormal in core to external UtfNormal li...

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

Change subject: Migrate away from UtfNormal in core to external UtfNormal 
library
..


Migrate away from UtfNormal in core to external UtfNormal library

In MediaWiki version 1.25, the UtfNormal library was split into a separate 
wikimedia/utfnormal package.
This patch changes the code to reflect this change.

Bug: T153994
Change-Id: I9d46ba835726e7099aab39e032ab29a2a9f86e02
---
M classes/Hooks.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/classes/Hooks.php b/classes/Hooks.php
index 2598c21..18aebbc 100644
--- a/classes/Hooks.php
+++ b/classes/Hooks.php
@@ -1,6 +1,7 @@
 https://gerrit.wikimedia.org/r/330728
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d46ba835726e7099aab39e032ab29a2a9f86e02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: MtDu 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...AntiSpoof[master]: Migrate away from UtfNormal in core to external UtfNormal li...

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

Change subject: Migrate away from UtfNormal in core to external UtfNormal 
library
..


Migrate away from UtfNormal in core to external UtfNormal library

In MediaWiki version 1.25, the UtfNormal library was split into a separate 
wikimedia/utfnormal package.
This patch changes the code to reflect this change.

Bug: T153994
Change-Id: I6d70d5fbb463ff6812421998fbfe26348f71c405
---
M AntiSpoof_body.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/AntiSpoof_body.php b/AntiSpoof_body.php
index 50b7706..6ac03c9 100644
--- a/AntiSpoof_body.php
+++ b/AntiSpoof_body.php
@@ -29,6 +29,8 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
 # USA
 
+use UtfNormal\Validator;
+
 class AntiSpoof {
# Define script tag codes for various Unicode codepoint ranges
# If it does not have a code here, it does not have a script assignment
@@ -341,7 +343,7 @@
}
 
# Perform Unicode _compatibility_ decomposition
-   $testName = UtfNormal::toNFKD( $testName );
+   $testName = Validator::toNFKD( $testName );
$testChars = self::stringToList( $testName );
 
# Be paranoid: check again, just in case Unicode normalization 
code changes...

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d70d5fbb463ff6812421998fbfe26348f71c405
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AntiSpoof
Gerrit-Branch: master
Gerrit-Owner: MtDu 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Update PHP_CodeSniffer to 2.7.1

2017-01-05 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330785 )

Change subject: Update PHP_CodeSniffer to 2.7.1
..

Update PHP_CodeSniffer to 2.7.1

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer 
refs/changes/85/330785/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d05decacd06aa91411973f65e5f40823d0164ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/codesniffer
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...Echo[wmf/1.29.0-wmf.7]: Pass 2 parameters to addDeprecation

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

Change subject: Pass 2 parameters to addDeprecation
..


Pass 2 parameters to addDeprecation

Change-Id: I891f94d32d64296fdb121d632e94dfba4b09070f
---
M includes/api/ApiEchoMarkSeen.php
M includes/api/ApiEchoNotifications.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/api/ApiEchoMarkSeen.php b/includes/api/ApiEchoMarkSeen.php
index c122757..d06852a 100644
--- a/includes/api/ApiEchoMarkSeen.php
+++ b/includes/api/ApiEchoMarkSeen.php
@@ -20,7 +20,7 @@
$outputTimestamp = wfTimestamp( TS_ISO_8601, $timestamp 
);
} else {
// MW
-   $this->addDeprecation( 
'apiwarn-echo-deprecation-timestampformat' );
+   $this->addDeprecation( 
'apiwarn-echo-deprecation-timestampformat', 
'action=echomarkseen=MW' );
 
$outputTimestamp = $timestamp;
}
diff --git a/includes/api/ApiEchoNotifications.php 
b/includes/api/ApiEchoNotifications.php
index cd9d37c..f5b63b8 100644
--- a/includes/api/ApiEchoNotifications.php
+++ b/includes/api/ApiEchoNotifications.php
@@ -23,9 +23,9 @@
 
/* @deprecated */
if ( $params['format'] === 'flyout' ) {
-   $this->addDeprecation( 
'apiwarn-echo-deprecation-flyout' );
+   $this->addDeprecation( 
'apiwarn-echo-deprecation-flyout', 
'action=query=notifications=flyout' );
} elseif ( $params['format'] === 'html' ) {
-   $this->addDeprecation( 'apiwarn-echo-deprecation-html' 
);
+   $this->addDeprecation( 'apiwarn-echo-deprecation-html', 
'action=query=notifications=html' );
}
 
if ( $this->allowCrossWikiNotifications() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I891f94d32d64296fdb121d632e94dfba4b09070f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.29.0-wmf.7
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Chad 
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.29.0-wmf.7]: Don't allow $section to be unset

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

Change subject: Don't allow $section to be unset
..


Don't allow $section to be unset

Change-Id: I46a36a08fc2e98aeb35774af8b26ebee313965f3
(cherry picked from commit ab78f52fa9fc2afca27bf27734f6c03ffc481784)
---
M ApiVisualEditor.php
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index d52cdbe..5524a71 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -241,9 +241,7 @@
'rvprop' => 
'content|ids'
];
 
-   if ( isset( $params['section'] 
) ) {
-   $section = 
$params['section'];
-   }
+   $section = isset( 
$params['section'] ) ? $params['section'] : null;
 
if ( $section === 'new' ) {
$content = '';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46a36a08fc2e98aeb35774af8b26ebee313965f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.7
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
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...Foxway[master]: DO NOT MERGE (Testing the tests)

2017-01-05 Thread MtDu (Code Review)
MtDu has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330745 )

Change subject: DO NOT MERGE (Testing the tests)
..

DO NOT MERGE (Testing the tests)

Change-Id: I141980633be33a307dda7f64eaad1e15adc27f4f
---
M Foxway.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/Foxway.php b/Foxway.php
index d2eb733..facbbdb 100644
--- a/Foxway.php
+++ b/Foxway.php
@@ -36,7 +36,7 @@
 $wgExtensionMessagesFiles['FoxwayMagic'] = $dir . '/Foxway.i18n.magic.php';
 
 // Include the settings file.
-//require_once $dir . '/Settings.php';
+// require_once $dir . '/Settings.php';
 
 // Specify the function that will initialize the parser function.
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I141980633be33a307dda7f64eaad1e15adc27f4f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Foxway
Gerrit-Branch: master
Gerrit-Owner: MtDu 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.29.0-wmf.7]: ApiVisualEditorEditor#postData: Use isset on oldid post param

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

Change subject: ApiVisualEditorEditor#postData: Use isset on oldid post param
..


ApiVisualEditorEditor#postData: Use isset on oldid post param

Bug: T154559
Change-Id: I83907f7df9360bb6fcc03615ec9e5d1d5856250b
(cherry picked from commit 7f7ffbb1beb1176c443a0ef19558cbe99a7a4c7e)
---
M ApiVisualEditorEdit.php
1 file changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/ApiVisualEditorEdit.php b/ApiVisualEditorEdit.php
index 999d494..5a9e503 100644
--- a/ApiVisualEditorEdit.php
+++ b/ApiVisualEditorEdit.php
@@ -183,11 +183,8 @@
}
 
protected function postData( $path, $title, $data, $parserParams, $etag 
) {
-   if ( $parserParams['oldid'] === 0 ) {
-   $parserParams['oldid'] = '';
-   }
$path .= urlencode( $title->getPrefixedDBkey() );
-   if ( $parserParams['oldid'] ) {
+   if ( isset( $parserParams['oldid'] ) && $parserParams['oldid'] 
) {
$path .= '/' . $parserParams['oldid'];
}
return $this->requestRestbase(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I83907f7df9360bb6fcc03615ec9e5d1d5856250b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.7
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Chad 
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]: Pass 2 parameters to addDeprecation

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

Change subject: Pass 2 parameters to addDeprecation
..


Pass 2 parameters to addDeprecation

Change-Id: I891f94d32d64296fdb121d632e94dfba4b09070f
---
M includes/api/ApiEchoMarkSeen.php
M includes/api/ApiEchoNotifications.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/api/ApiEchoMarkSeen.php b/includes/api/ApiEchoMarkSeen.php
index c122757..d06852a 100644
--- a/includes/api/ApiEchoMarkSeen.php
+++ b/includes/api/ApiEchoMarkSeen.php
@@ -20,7 +20,7 @@
$outputTimestamp = wfTimestamp( TS_ISO_8601, $timestamp 
);
} else {
// MW
-   $this->addDeprecation( 
'apiwarn-echo-deprecation-timestampformat' );
+   $this->addDeprecation( 
'apiwarn-echo-deprecation-timestampformat', 
'action=echomarkseen=MW' );
 
$outputTimestamp = $timestamp;
}
diff --git a/includes/api/ApiEchoNotifications.php 
b/includes/api/ApiEchoNotifications.php
index cd9d37c..f5b63b8 100644
--- a/includes/api/ApiEchoNotifications.php
+++ b/includes/api/ApiEchoNotifications.php
@@ -23,9 +23,9 @@
 
/* @deprecated */
if ( $params['format'] === 'flyout' ) {
-   $this->addDeprecation( 
'apiwarn-echo-deprecation-flyout' );
+   $this->addDeprecation( 
'apiwarn-echo-deprecation-flyout', 
'action=query=notifications=flyout' );
} elseif ( $params['format'] === 'html' ) {
-   $this->addDeprecation( 'apiwarn-echo-deprecation-html' 
);
+   $this->addDeprecation( 'apiwarn-echo-deprecation-html', 
'action=query=notifications=html' );
}
 
if ( $this->allowCrossWikiNotifications() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I891f94d32d64296fdb121d632e94dfba4b09070f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Get rid of the rest of the !important modifiers in forms.css

2017-01-05 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330742 )

Change subject: Get rid of the rest of the !important modifiers in forms.css
..

Get rid of the rest of the !important modifiers in forms.css

FIXME: still something wrong with card alignment in mobile

Except the one that we need to push the form up the page, and
the one that hides things.

Change-Id: I5ce8985001b685221f71e73dfd9ce6dd6da32153
---
M gateway_forms/mustache/forms.css
1 file changed, 47 insertions(+), 48 deletions(-)


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

diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index 1f9882f..0cf91d5 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -2,7 +2,6 @@
max-width: 100px;
 }
 div#payment_gateway-donate-submessage {
-   font-size: 90%;
line-height: 120%;
 }
 div#payment_gateway-donate-submessage img {
@@ -54,14 +53,14 @@
background-color: transparent;
 }
 div#content {
-   background-color: transparent !important;
-   background-image: none !important;
+   background-color: transparent;
+   background-image: none;
 }
 div#mw-head-base {
-   background-image: none !important;
+   background-image: none;
 }
 #footer {
-   background-image: none !important;
+   background-image: none;
 }
 
 /* Hiding stuff we don't need */
@@ -71,8 +70,8 @@
 
 /* NEW STUFF */
 ul#moreinfolinks li{
-list-style: none !important;
-list-style-image: none !important;
+list-style: none;
+list-style-image: none;
 }
 .form .options-h {
 margin: 0;
@@ -120,17 +119,17 @@
 opacity: 1;
 }
 #donate {
-  min-width: 32em !important;
-  padding: 1em !important;
+  min-width: 32em;
+  padding: 1em;
 }
 
 
 #greenBackground {
-  background-color: #e2e2e2 !important;
-  position: relative !important;
-  padding: 1.6em !important;
-  border: 0 !important;
-  width: auto !important;
+  background-color: #e2e2e2;
+  position: relative;
+  padding: 1.6em;
+  border: 0;
+  width: auto;
 }
 
 #greenBackground:before {
@@ -183,8 +182,8 @@
 margin-left: 8px;
 }
 
-div.donor { width: auto !important; }
-div.donor { width: 100% !important; }
+div.donor { width: auto; }
+div.donor { width: 100%; }
 
 #payment-table-donor input[type="text"],
 #payment-table-donor input[type="number"],
@@ -192,7 +191,7 @@
 #payment-table-donor input[type="email"],
 #payment-table-donor select {
   background-color: #f6f6f6;
-  padding: 1em !important;
+  padding: 1em;
   -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, 
.1);
   -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 
0, .1);
   box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, .1);
@@ -227,7 +226,7 @@
   box-shadow: inset 0 1px 3px rgba(0,0,1,.5), inset 0 0 0 1px rgba(0,0,0,.1);
 }
 
-#payment-table-donor select { padding: .9em 1em !important; line-height: 40px; 
}
+#payment-table-donor select { padding: .9em 1em; line-height: 40px; }
 
 #amount_input * {
 vertical-align: top;
@@ -239,7 +238,7 @@
 
 .mw-donate-submessage {
   text-transform: uppercase;
-  font-size: .75em !important;
+  font-size: 0.75em;
   color: #7c7c7c;
   text-align: center;
 }
@@ -256,7 +255,7 @@
 #cards:after { clear: both; }
 #cards li {
 background: #d1d1d1;
-margin: 0 .7% .7% 0 !important;
+margin: 0 .7% .7% 0;
 float: left;
 text-align: center;
 -moz-border-radius: 4px;
@@ -298,8 +297,8 @@
 #cards li input {
 display: block;
 width: 100%;
-margin: 0 0 .7em !important;
-box-shadow: none !important;
+margin: 0 0 .7em;
+box-shadow: none;
 }
 #cards li label {
 cursor: pointer;
@@ -307,20 +306,20 @@
 display: block;
 }
 #cards li label img {
-margin: 0 auto !important;
-height: auto !important;
+margin: 0 auto;
+height: auto;
 }
 #cards li.has_sub_text label {
 margin-top: 0;
 }
 #cards li.has_sub_text input {
-margin-bottom: 0.1em !important;
+margin-bottom: 0.1em;
 }
 #cards li label p.card_sub_text {
 margin: -0.5em auto;
 }
 #paymentContinue, #paymentSubmit {
-  margin-top: 1em !important;
+  margin-top: 1em;
   clear: both;
   display: none;
 }
@@ -328,21 +327,21 @@
 display:block;
 }
 .btn {
-  background-color: #757575 !important;
-  color: #fff !important;
+  background-color: #757575;
+  color: #fff;
   width: 100%;
   text-transform: uppercase;
   font-size: 1.3em;
   -moz-border-radius: 4px;
   -webkit-border-radius: 4px;
   border-radius: 4px;
-  padding: .6em !important;
+  padding: .6em;
 }
 .btn.enabled {
-  background-color: #367fb4 !important;
+  background-color: #367fb4;
   cursor: pointer;
 }
-.btn.enabled:hover { background-color: #1d5278 !important; }
+.btn.enabled:hover { background-color: #1d5278; }
 .btn:active {
   

[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Update composer.json file to match vector's, also add phpcs

2017-01-05 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330741 )

Change subject: Update composer.json file to match vector's, also add phpcs
..

Update composer.json file to match vector's, also add phpcs

Change-Id: Ie962710774289c4f77ed5298b92a78609638d1bf
---
M composer.json
A phpcs.xml
2 files changed, 44 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/41/330741/1

diff --git a/composer.json b/composer.json
index fbffbaf..b304350 100644
--- a/composer.json
+++ b/composer.json
@@ -1,10 +1,44 @@
 {
+   "name": "mediawiki/timeless-skin",
+   "type": "mediawiki-skin",
+   "description": "A timeless skin designed after the Winter prototype by 
Brandon Harris, and various styles by the Wikimedia Foundation.",
+   "keywords": [
+   "wiki",
+   "MediaWiki",
+   "skin"
+   ],
+   "homepage": "https://www.mediawiki.org/wiki/Skin:Timeless;,
+   "license": "GPL-2.0+",
+   "authors": [
+   {
+   "name": "Isarra"
+   }
+   ],
+   "support": {
+   "wiki": "https://www.mediawiki.org/wiki/Skin:Timeless;,
+   "forum": "https://www.mediawiki.org/wiki/Skin_talk:Timeless;,
+   "source": "https://phabricator.wikimedia.org/diffusion/STIM/;,
+   "irc": "irc://irc.freenode.org/mediawiki"
+   },
+   "require": {
+   "php": ">=5.5.9",
+   "composer/installers": ">1.0.12"
+   },
+   "extra": {
+   "branch-alias": {
+   "dev-master": "1.x-dev"
+   },
+   "installer-name": "Timeless"
+   },
"require-dev": {
-   "jakub-onderka/php-parallel-lint": "0.9"
+   "jakub-onderka/php-parallel-lint": "0.9.*",
+   "mediawiki/mediawiki-codesniffer": "0.7.2"
},
"scripts": {
+   "fix": "phpcbf",
"test": [
-   "parallel-lint . --exclude node_modules --exclude 
vendor"
+   "parallel-lint . --exclude vendor",
+   "phpcs -p -s"
]
}
 }
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 000..d81a292
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,8 @@
+
+
+   
+   .
+   
+   
+   vendor
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie962710774289c4f77ed5298b92a78609638d1bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
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...VisualEditor[wmf/1.29.0-wmf.7]: ApiVisualEditorEditor#postData: Use isset on oldid post param

2017-01-05 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330744 )

Change subject: ApiVisualEditorEditor#postData: Use isset on oldid post param
..

ApiVisualEditorEditor#postData: Use isset on oldid post param

Bug: T154559
Change-Id: I83907f7df9360bb6fcc03615ec9e5d1d5856250b
(cherry picked from commit 7f7ffbb1beb1176c443a0ef19558cbe99a7a4c7e)
---
M ApiVisualEditorEdit.php
1 file changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/ApiVisualEditorEdit.php b/ApiVisualEditorEdit.php
index 999d494..5a9e503 100644
--- a/ApiVisualEditorEdit.php
+++ b/ApiVisualEditorEdit.php
@@ -183,11 +183,8 @@
}
 
protected function postData( $path, $title, $data, $parserParams, $etag 
) {
-   if ( $parserParams['oldid'] === 0 ) {
-   $parserParams['oldid'] = '';
-   }
$path .= urlencode( $title->getPrefixedDBkey() );
-   if ( $parserParams['oldid'] ) {
+   if ( isset( $parserParams['oldid'] ) && $parserParams['oldid'] 
) {
$path .= '/' . $parserParams['oldid'];
}
return $this->requestRestbase(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83907f7df9360bb6fcc03615ec9e5d1d5856250b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.7
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.29.0-wmf.7]: Pass 2 parameters to addDeprecation

2017-01-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330743 )

Change subject: Pass 2 parameters to addDeprecation
..

Pass 2 parameters to addDeprecation

Change-Id: I891f94d32d64296fdb121d632e94dfba4b09070f
---
M includes/api/ApiEchoMarkSeen.php
M includes/api/ApiEchoNotifications.php
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/api/ApiEchoMarkSeen.php b/includes/api/ApiEchoMarkSeen.php
index c122757..d06852a 100644
--- a/includes/api/ApiEchoMarkSeen.php
+++ b/includes/api/ApiEchoMarkSeen.php
@@ -20,7 +20,7 @@
$outputTimestamp = wfTimestamp( TS_ISO_8601, $timestamp 
);
} else {
// MW
-   $this->addDeprecation( 
'apiwarn-echo-deprecation-timestampformat' );
+   $this->addDeprecation( 
'apiwarn-echo-deprecation-timestampformat', 
'action=echomarkseen=MW' );
 
$outputTimestamp = $timestamp;
}
diff --git a/includes/api/ApiEchoNotifications.php 
b/includes/api/ApiEchoNotifications.php
index cd9d37c..f5b63b8 100644
--- a/includes/api/ApiEchoNotifications.php
+++ b/includes/api/ApiEchoNotifications.php
@@ -23,9 +23,9 @@
 
/* @deprecated */
if ( $params['format'] === 'flyout' ) {
-   $this->addDeprecation( 
'apiwarn-echo-deprecation-flyout' );
+   $this->addDeprecation( 
'apiwarn-echo-deprecation-flyout', 
'action=query=notifications=flyout' );
} elseif ( $params['format'] === 'html' ) {
-   $this->addDeprecation( 'apiwarn-echo-deprecation-html' 
);
+   $this->addDeprecation( 'apiwarn-echo-deprecation-html', 
'action=query=notifications=html' );
}
 
if ( $this->allowCrossWikiNotifications() ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I891f94d32d64296fdb121d632e94dfba4b09070f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.29.0-wmf.7
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.29.0-wmf.7]: Don't allow $section to be unset

2017-01-05 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330740 )

Change subject: Don't allow $section to be unset
..

Don't allow $section to be unset

Change-Id: I46a36a08fc2e98aeb35774af8b26ebee313965f3
(cherry picked from commit ab78f52fa9fc2afca27bf27734f6c03ffc481784)
---
M ApiVisualEditor.php
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index d52cdbe..5524a71 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -241,9 +241,7 @@
'rvprop' => 
'content|ids'
];
 
-   if ( isset( $params['section'] 
) ) {
-   $section = 
$params['section'];
-   }
+   $section = isset( 
$params['section'] ) ? $params['section'] : null;
 
if ( $section === 'new' ) {
$content = '';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46a36a08fc2e98aeb35774af8b26ebee313965f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.29.0-wmf.7
Gerrit-Owner: Chad 
Gerrit-Reviewer: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[wmf/1.29.0-wmf.7]: Pass 2 parameters to addDeprecation

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

Change subject: Pass 2 parameters to addDeprecation
..


Pass 2 parameters to addDeprecation

Change-Id: I03288e8cbeb7bbe082a12d19cac0764c395f75ff
(cherry picked from commit c7eb272e4a7844cc5a55beb054a21deab85420ac)
---
M api/ApiQueryCodeComments.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/api/ApiQueryCodeComments.php b/api/ApiQueryCodeComments.php
index 38d287d..900d9ee 100644
--- a/api/ApiQueryCodeComments.php
+++ b/api/ApiQueryCodeComments.php
@@ -43,7 +43,8 @@
if ( isset( $this->props['revision'] ) ) {
if ( is_callable( [ $this, 'addDeprecation' ] ) ) {
$this->addDeprecation(
-   [ 
'apiwarn-deprecation-withreplacement', 'ccprop=revision', 'ccprop=status' ]
+   [ 
'apiwarn-deprecation-withreplacement', 'ccprop=revision', 'ccprop=status' ],
+   
'action=query=codecomments=revision'
);
} else {
$this->setWarning( 'ccprop=revision has been 
deprecated in favor of ccprop=status' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03288e8cbeb7bbe082a12d19cac0764c395f75ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: wmf/1.29.0-wmf.7
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: flow-board is a known contentmodel

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

Change subject: flow-board is a known contentmodel
..


flow-board is a known contentmodel

Change-Id: I0bcae1b08b97557b9d56f1e5c63564ce480e8164
---
M lib/config/MWParserEnvironment.js
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index 614a26c..21b8541 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -740,6 +740,7 @@
'wikibase-property',
'proofread-page',
'Scribunto',
+   'flow-board',
 ]);
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0bcae1b08b97557b9d56f1e5c63564ce480e8164
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[wmf/1.29.0-wmf.7]: Pass 2 parameters to addDeprecation

2017-01-05 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330739 )

Change subject: Pass 2 parameters to addDeprecation
..

Pass 2 parameters to addDeprecation

Change-Id: I03288e8cbeb7bbe082a12d19cac0764c395f75ff
(cherry picked from commit c7eb272e4a7844cc5a55beb054a21deab85420ac)
---
M api/ApiQueryCodeComments.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview 
refs/changes/39/330739/1

diff --git a/api/ApiQueryCodeComments.php b/api/ApiQueryCodeComments.php
index 38d287d..900d9ee 100644
--- a/api/ApiQueryCodeComments.php
+++ b/api/ApiQueryCodeComments.php
@@ -43,7 +43,8 @@
if ( isset( $this->props['revision'] ) ) {
if ( is_callable( [ $this, 'addDeprecation' ] ) ) {
$this->addDeprecation(
-   [ 
'apiwarn-deprecation-withreplacement', 'ccprop=revision', 'ccprop=status' ]
+   [ 
'apiwarn-deprecation-withreplacement', 'ccprop=revision', 'ccprop=status' ],
+   
'action=query=codecomments=revision'
);
} else {
$this->setWarning( 'ccprop=revision has been 
deprecated in favor of ccprop=status' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03288e8cbeb7bbe082a12d19cac0764c395f75ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: wmf/1.29.0-wmf.7
Gerrit-Owner: Chad 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[master]: Pass 2 parameters to addDeprecation

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

Change subject: Pass 2 parameters to addDeprecation
..


Pass 2 parameters to addDeprecation

Change-Id: I03288e8cbeb7bbe082a12d19cac0764c395f75ff
---
M api/ApiQueryCodeComments.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/api/ApiQueryCodeComments.php b/api/ApiQueryCodeComments.php
index 38d287d..900d9ee 100644
--- a/api/ApiQueryCodeComments.php
+++ b/api/ApiQueryCodeComments.php
@@ -43,7 +43,8 @@
if ( isset( $this->props['revision'] ) ) {
if ( is_callable( [ $this, 'addDeprecation' ] ) ) {
$this->addDeprecation(
-   [ 
'apiwarn-deprecation-withreplacement', 'ccprop=revision', 'ccprop=status' ]
+   [ 
'apiwarn-deprecation-withreplacement', 'ccprop=revision', 'ccprop=status' ],
+   
'action=query=codecomments=revision'
);
} else {
$this->setWarning( 'ccprop=revision has been 
deprecated in favor of ccprop=status' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03288e8cbeb7bbe082a12d19cac0764c395f75ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Sync parserTests with core

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

Change subject: Sync parserTests with core
..


Sync parserTests with core

Change-Id: I8c7274f01d4cce83996d1f56af21499515c80a99
---
M tests/parserTests.txt
M tools/fetch-parserTests.txt.js
2 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 23382ad..56816e1 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -20665,10 +20665,12 @@
 
 !! end
 
+# FIXME: This test is currently broken in the PHP parser T153761
 !! test
 T146304: Don't break template parsing if language converter markup is in the 
parameter.
 !! options
 language=sr variant=sr-ec
+disabled
 !! wikitext
 {{echo|-{R|foo}-}}
 !! html/php
diff --git a/tools/fetch-parserTests.txt.js b/tools/fetch-parserTests.txt.js
index 1b14d35..f801139 100755
--- a/tools/fetch-parserTests.txt.js
+++ b/tools/fetch-parserTests.txt.js
@@ -12,9 +12,9 @@
 // and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = "b9333ebe17f8d408f9c103077950226b0164fd0d";
+var expectedSHA1 = "d358d2a1401d9d9ba06099d1f8862282acf00b87";
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "12846c08cb7f721011952da0aebb95657d7d030c";
+var latestCommit = "6b97c822726c98f9b3cbc821e631dc18e52489d2";
 
 var fs = require('fs');
 var path = require('path');

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Pass 2 parameters to addDeprecation

2017-01-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330738 )

Change subject: Pass 2 parameters to addDeprecation
..

Pass 2 parameters to addDeprecation

Change-Id: I891f94d32d64296fdb121d632e94dfba4b09070f
---
M includes/api/ApiEchoMarkSeen.php
M includes/api/ApiEchoNotifications.php
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/api/ApiEchoMarkSeen.php b/includes/api/ApiEchoMarkSeen.php
index c122757..d06852a 100644
--- a/includes/api/ApiEchoMarkSeen.php
+++ b/includes/api/ApiEchoMarkSeen.php
@@ -20,7 +20,7 @@
$outputTimestamp = wfTimestamp( TS_ISO_8601, $timestamp 
);
} else {
// MW
-   $this->addDeprecation( 
'apiwarn-echo-deprecation-timestampformat' );
+   $this->addDeprecation( 
'apiwarn-echo-deprecation-timestampformat', 
'action=echomarkseen=MW' );
 
$outputTimestamp = $timestamp;
}
diff --git a/includes/api/ApiEchoNotifications.php 
b/includes/api/ApiEchoNotifications.php
index cd9d37c..c4352c9 100644
--- a/includes/api/ApiEchoNotifications.php
+++ b/includes/api/ApiEchoNotifications.php
@@ -23,9 +23,9 @@
 
/* @deprecated */
if ( $params['format'] === 'flyout' ) {
-   $this->addDeprecation( 
'apiwarn-echo-deprecation-flyout' );
+   $this->addDeprecation( 
'apiwarn-echo-deprecation-flyout', 
'action=query=notifications=flyout' );
} elseif ( $params['format'] === 'html' ) {
-   $this->addDeprecation( 'apiwarn-echo-deprecation-html' 
);
+   $this->addDeprecation( 'apiwarn-echo-deprecation-html', 
'action=query=notifications=html' );
}
 
if ( $this->allowCrossWikiNotifications() ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeEditor[master]: Replace $( document ).ready(...) by $(...)

2017-01-05 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330737 )

Change subject: Replace $( document ).ready(...) by $(...)
..

Replace $( document ).ready(...) by $(...)

In jQuery 3 $(document).ready(...) is deprecated.
https://jquery.com/upgrade-guide/3.0/#deprecated-document-ready-handlers-other-than-jquery-function

Change-Id: Id8cfdfa74c1789db1b24c39c16e51c7a0c408f11
---
M modules/ext.codeEditor.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ext.codeEditor.js b/modules/ext.codeEditor.js
index 14191a8..9f4a2aa 100644
--- a/modules/ext.codeEditor.js
+++ b/modules/ext.codeEditor.js
@@ -37,7 +37,7 @@
  * JavaScript for WikiEditor Table of Contents
  */
 
-$( document ).ready( function () {
+$( function () {
var $wpTextbox1 = $( '#wpTextbox1' );
 
// Code is supposed to be always LTR. See bug 39364.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8cfdfa74c1789db1b24c39c16e51c7a0c408f11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[master]: Pass 2 parameters to addDeprecation

2017-01-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330736 )

Change subject: Pass 2 parameters to addDeprecation
..

Pass 2 parameters to addDeprecation

Change-Id: I03288e8cbeb7bbe082a12d19cac0764c395f75ff
---
M api/ApiQueryCodeComments.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/api/ApiQueryCodeComments.php b/api/ApiQueryCodeComments.php
index 38d287d..900d9ee 100644
--- a/api/ApiQueryCodeComments.php
+++ b/api/ApiQueryCodeComments.php
@@ -43,7 +43,8 @@
if ( isset( $this->props['revision'] ) ) {
if ( is_callable( [ $this, 'addDeprecation' ] ) ) {
$this->addDeprecation(
-   [ 
'apiwarn-deprecation-withreplacement', 'ccprop=revision', 'ccprop=status' ]
+   [ 
'apiwarn-deprecation-withreplacement', 'ccprop=revision', 'ccprop=status' ],
+   
'action=query=codecomments=revision'
);
} else {
$this->setWarning( 'ccprop=revision has been 
deprecated in favor of ccprop=status' );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Sync parserTests with core

2017-01-05 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330735 )

Change subject: Sync parserTests with core
..

Sync parserTests with core

Change-Id: I8c7274f01d4cce83996d1f56af21499515c80a99
---
M tests/parserTests.txt
M tools/fetch-parserTests.txt.js
2 files changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 23382ad..56816e1 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -20665,10 +20665,12 @@
 
 !! end
 
+# FIXME: This test is currently broken in the PHP parser T153761
 !! test
 T146304: Don't break template parsing if language converter markup is in the 
parameter.
 !! options
 language=sr variant=sr-ec
+disabled
 !! wikitext
 {{echo|-{R|foo}-}}
 !! html/php
diff --git a/tools/fetch-parserTests.txt.js b/tools/fetch-parserTests.txt.js
index 1b14d35..f801139 100755
--- a/tools/fetch-parserTests.txt.js
+++ b/tools/fetch-parserTests.txt.js
@@ -12,9 +12,9 @@
 // and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = "b9333ebe17f8d408f9c103077950226b0164fd0d";
+var expectedSHA1 = "d358d2a1401d9d9ba06099d1f8862282acf00b87";
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "12846c08cb7f721011952da0aebb95657d7d030c";
+var latestCommit = "6b97c822726c98f9b3cbc821e631dc18e52489d2";
 
 var fs = require('fs');
 var path = require('path');

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

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

Change subject: Update DonationInterface submodule
..


Update DonationInterface submodule

Change-Id: I00cd30b5c83ecd6ddc34db5119399b6cf52ddc05
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 5edaa17..3dab87f 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 5edaa173de13b1a5227915af2fb630d3a5699b9e
+Subproject commit 3dab87fc01af9cae8d95b4f47949054374588a52

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00cd30b5c83ecd6ddc34db5119399b6cf52ddc05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: Ejegg 
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/core[master]: Sync up with Parsoid parserTests.

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

Change subject: Sync up with Parsoid parserTests.
..


Sync up with Parsoid parserTests.

This now aligns with Parsoid commit 974dd5b3d70acf59bb15e057dc37e3702195f3e0

Change-Id: Ia45d8e2539e7fec23503706be1b40a6eaf1f5888
---
M tests/parser/parserTests.txt
1 file changed, 37 insertions(+), 5 deletions(-)

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



diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index f6b6bce..56816e1 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -530,6 +530,8 @@
 
 !! test
 Heading with line break in nowiki
+!! options
+parsoid=wt2html
 !! wikitext
 == A B
 C ==
@@ -537,6 +539,9 @@
 A B
 C[edit]
 
+!! html/parsoid
+A B
+C 
 !! end
 
 !! test
@@ -6477,6 +6482,14 @@
 !! end
 
 !! test
+Break on | in element attribute name in template
+!! wikitext
+{{echo|ha}}
+!! html/parsoid
+div cla
+!! end
+
+!! test
 Don't break on | in extension attribute in template
 !! wikitext
 {{echo|ha}}
@@ -10933,7 +10946,8 @@
 
 !! html/parsoid
 
-[[{{{1}}}|{{{2}}}]]
+[[{{{1}}}|{{{2}}}]]
+
 !! end
 
 # See: T2553
@@ -11625,7 +11639,7 @@
 |c
 |}
 !!html/parsoid
-
+
 c
 
 !!end
@@ -12514,11 +12528,16 @@
 Templates: Parameters substituted at the top-level
 !! wikitext
 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
+
+{{{foo|bar|baz}}}
 !! html/php
 who me? never!
+bar
 
 !! html/parsoid
-who me? never!
+who me? 
never!
+
+bar
 !! end
 
 !!test
@@ -17689,6 +17708,8 @@
 # Known to produce bad XML for now
 !! test
 Fuzz testing: Parser24
+!! options
+parsoid=wt2html
 !! wikitext
 {|
 {{{|
@@ -17698,7 +17719,7 @@
 
 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
 |
-!! html
+!! html/php
 
 {{{|
  
@@ -17711,6 +17732,14 @@
 
 
 
+!! html/parsoid
+{{{|
+
+MOVE
 YOUR MOUSE CURSOR OVER THIS TEXT
+
+
+
+
 !! end
 
 # Note: the current result listed for this is not what the original one was,
@@ -17729,9 +17758,12 @@
 
 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR 
OVER HERE
-!! html
+!! html/php
 LI CLASS=blah" onmouseover="alert('hello world');" align="left"MOVE 
MOUSE CURSOR OVER HERE
 
+!! html/parsoid
+ 
+LI CLASS=blah" onmouseover="alert('hello world');" 
align="left"MOVE MOUSE CURSOR OVER HERE
 !! end
 
 !!test

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia45d8e2539e7fec23503706be1b40a6eaf1f5888
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

2017-01-05 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330734 )

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

Change-Id: I00cd30b5c83ecd6ddc34db5119399b6cf52ddc05
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/330734/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 5edaa17..3dab87f 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 5edaa173de13b1a5227915af2fb630d3a5699b9e
+Subproject commit 3dab87fc01af9cae8d95b4f47949054374588a52

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00cd30b5c83ecd6ddc34db5119399b6cf52ddc05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove me from researchers group

2017-01-05 Thread RobH (Code Review)
RobH has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/330714 )

Change subject: Remove me from researchers group
..


Remove me from researchers group

Bug: T154696
Change-Id: I5d25d7ebb5bbc543987966bcc0ccd6f828803991
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index c535f0d..15505cb 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -108,7 +108,7 @@
   nuria, ori, otto, springle, yurik, yuvipanda,
   mforns, jdlrobson, dr0ptp4kt, tgr, marktraceur, jhernandez, joal,
   daisy, tomasz, mholloway-shell, madhuvishy, ebernhardson, 
niedzielski,
-  neilpquinn-wmf, tbayer, moushira, dbrant, maxsem, srijan, 
krenair,
+  neilpquinn-wmf, tbayer, moushira, dbrant, maxsem, srijan,
   jminor, asherman, etonkovidova, sbisson, addshore, matmarex, 
elukey,
   nikerabbit, nschaaf, dstrine, joewalsh, mpany, hjiang, jsamra, 
bcohn,
   jdittrich, chelsyx, ovasileva, mtizzoni, panisson, paolotti, 
ciro, debt,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d25d7ebb5bbc543987966bcc0ccd6f828803991
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: RobH 
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...DonationInterface[deployment]: Merge branch 'master' into deployment

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

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

05c6cf9 Remove donationinterface-desc from extension.json
aa270db Rename 'zip' to 'postal_code'

Change-Id: I072225b0602fae6c6fbf1e63d24a31b70780949e
---
D tests/phpunit/Adapter/Adyen/AdyenTest.php
D tests/phpunit/Adapter/GatewayAdapterTest.php
D tests/phpunit/Adapter/GlobalCollect/GlobalCollectFormLoadTest.php
D tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
D tests/phpunit/DonationDataTest.php
D tests/phpunit/DonationInterfaceTestCase.php
D tests/phpunit/DonationQueueTest.php
D tests/phpunit/GatewayPageTest.php
D tests/phpunit/LoggingTest.php
9 files changed, 0 insertions(+), 2,994 deletions(-)

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



diff --git a/tests/phpunit/Adapter/Adyen/AdyenTest.php 
b/tests/phpunit/Adapter/Adyen/AdyenTest.php
deleted file mode 100644
index c2763b2..000
--- a/tests/phpunit/Adapter/Adyen/AdyenTest.php
+++ /dev/null
@@ -1,157 +0,0 @@
-<<< HEAD   (5edaa1 Merge branch 'master' into deployment)
-===
-testAdapterClass = 'TestingAdyenAdapter';
-   }
-
-   public function setUp() {
-   parent::setUp();
-
-   $this->setMwGlobals( array(
-   'wgAdyenGatewayEnabled' => true,
-   ) );
-   }
-
-   /**
-* Integration test to verify that the donate transaction works as 
expected when all necessary data is present.
-*/
-   function testDoTransactionDonate() {
-   $init = $this->getDonorTestData();
-   $gateway = $this->getFreshGatewayObject( $init );
-
-   $gateway->do_transaction( 'donate' );
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $ret = $exposed->buildRequestParams();
-
-   $expected = array (
-   'allowedMethods' => 'card',
-   'billingAddress.street' => $init['street'],
-   'billingAddress.city' => $init['city'],
-   'billingAddress.postalCode' => $init['postal_code'],
-   'billingAddress.stateOrProvince' => $init['state'],
-   'billingAddress.country' => $init['country'],
-   'billingAddress.houseNumberOrName' => 'NA',
-   'billingAddressType' => 2,
-   'card.cardHolderName' => $init['fname'] . ' ' . 
$init['lname'],
-   'currencyCode' => $init['currency_code'],
-   'merchantAccount' => 'wikitest',
-   'merchantReference' => $exposed->getData_Staged( 
'order_id' ),
-   'merchantSig' => $exposed->getData_Staged( 
'hpp_signature' ),
-   'paymentAmount' => ($init['amount']) * 100,
-// 'sessionValidity' => '2014-03-09T19:41:50+00:00',   
//commenting out, because this is a problem.
-// 'shipBeforeDate' => $exposed->getData_Staged( 
'expiration' ),   //this too.
-   'skinCode' => 'testskin',
-   'shopperLocale' => 'en_US',
-   'shopperEmail' => 'nob...@wikimedia.org',
-   'offset' => '52', //once we construct the 
FraudFiltersTestCase, it should land here.
-   );
-
-   //deal with problem keys.
-   //@TODO: Refactor gateway so these are more testable
-   $problems = array (
-   'sessionValidity',
-   'shipBeforeDate',
-   );
-
-   foreach ( $problems as $oneproblem ) {
-   if ( isset( $ret[$oneproblem] ) ) {
-   unset( $ret[$oneproblem] );
-   }
-   }
-
-   $this->assertEquals( $expected, $ret, 'Adyen "donate" 
transaction not constructing the expected redirect URL' );
-   $this->assertNotNull( $gateway->getData_Unstaged_Escaped( 
'order_id' ), "Adyen order_id is null, and we need one for 'merchantReference'" 
);
-   }
-
-   function testRiskScoreAddedToQueueMessage() {
-   $init = $this->getDonorTestData();
-   $gateway = $this->getFreshGatewayObject( $init );
-
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $exposed->risk_score = 57;
-   $message = $exposed->getStompTransaction();
-   $this->assertEquals( 57, $message['risk_score'], 'Risk score 
was not correctly added to queue message.' );
-   }
-
-   /**
-* Make sure language is staged correctly when qs param is uppercase
-*/
-   function testLanguageCaseSensitivity() {
-   $init = 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-01-05 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330733 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

05c6cf9 Remove donationinterface-desc from extension.json
aa270db Rename 'zip' to 'postal_code'

Change-Id: I072225b0602fae6c6fbf1e63d24a31b70780949e
---
D tests/phpunit/Adapter/Adyen/AdyenTest.php
D tests/phpunit/Adapter/GatewayAdapterTest.php
D tests/phpunit/Adapter/GlobalCollect/GlobalCollectFormLoadTest.php
D tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
D tests/phpunit/DonationDataTest.php
D tests/phpunit/DonationInterfaceTestCase.php
D tests/phpunit/DonationQueueTest.php
D tests/phpunit/GatewayPageTest.php
D tests/phpunit/LoggingTest.php
9 files changed, 0 insertions(+), 2,994 deletions(-)


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

diff --git a/tests/phpunit/Adapter/Adyen/AdyenTest.php 
b/tests/phpunit/Adapter/Adyen/AdyenTest.php
deleted file mode 100644
index c2763b2..000
--- a/tests/phpunit/Adapter/Adyen/AdyenTest.php
+++ /dev/null
@@ -1,157 +0,0 @@
-<<< HEAD   (5edaa1 Merge branch 'master' into deployment)
-===
-testAdapterClass = 'TestingAdyenAdapter';
-   }
-
-   public function setUp() {
-   parent::setUp();
-
-   $this->setMwGlobals( array(
-   'wgAdyenGatewayEnabled' => true,
-   ) );
-   }
-
-   /**
-* Integration test to verify that the donate transaction works as 
expected when all necessary data is present.
-*/
-   function testDoTransactionDonate() {
-   $init = $this->getDonorTestData();
-   $gateway = $this->getFreshGatewayObject( $init );
-
-   $gateway->do_transaction( 'donate' );
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $ret = $exposed->buildRequestParams();
-
-   $expected = array (
-   'allowedMethods' => 'card',
-   'billingAddress.street' => $init['street'],
-   'billingAddress.city' => $init['city'],
-   'billingAddress.postalCode' => $init['postal_code'],
-   'billingAddress.stateOrProvince' => $init['state'],
-   'billingAddress.country' => $init['country'],
-   'billingAddress.houseNumberOrName' => 'NA',
-   'billingAddressType' => 2,
-   'card.cardHolderName' => $init['fname'] . ' ' . 
$init['lname'],
-   'currencyCode' => $init['currency_code'],
-   'merchantAccount' => 'wikitest',
-   'merchantReference' => $exposed->getData_Staged( 
'order_id' ),
-   'merchantSig' => $exposed->getData_Staged( 
'hpp_signature' ),
-   'paymentAmount' => ($init['amount']) * 100,
-// 'sessionValidity' => '2014-03-09T19:41:50+00:00',   
//commenting out, because this is a problem.
-// 'shipBeforeDate' => $exposed->getData_Staged( 
'expiration' ),   //this too.
-   'skinCode' => 'testskin',
-   'shopperLocale' => 'en_US',
-   'shopperEmail' => 'nob...@wikimedia.org',
-   'offset' => '52', //once we construct the 
FraudFiltersTestCase, it should land here.
-   );
-
-   //deal with problem keys.
-   //@TODO: Refactor gateway so these are more testable
-   $problems = array (
-   'sessionValidity',
-   'shipBeforeDate',
-   );
-
-   foreach ( $problems as $oneproblem ) {
-   if ( isset( $ret[$oneproblem] ) ) {
-   unset( $ret[$oneproblem] );
-   }
-   }
-
-   $this->assertEquals( $expected, $ret, 'Adyen "donate" 
transaction not constructing the expected redirect URL' );
-   $this->assertNotNull( $gateway->getData_Unstaged_Escaped( 
'order_id' ), "Adyen order_id is null, and we need one for 'merchantReference'" 
);
-   }
-
-   function testRiskScoreAddedToQueueMessage() {
-   $init = $this->getDonorTestData();
-   $gateway = $this->getFreshGatewayObject( $init );
-
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $exposed->risk_score = 57;
-   $message = $exposed->getStompTransaction();
-   $this->assertEquals( 57, $message['risk_score'], 'Risk score 
was not correctly added to queue message.' );
-   }
-
-   /**
-* Make sure language is staged correctly when qs param is uppercase
-*/
-   function testLanguageCaseSensitivity() {
-   

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make drag and drop work for multi-lists

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

Change subject: Make drag and drop work for multi-lists
..


Make drag and drop work for multi-lists

Bug: T149042
Change-Id: I4e39545e34d8c283adbbfd6fa865c22f11ad978d
---
M modules/ext.CollaborationKit.list.edit.js
1 file changed, 63 insertions(+), 24 deletions(-)

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



diff --git a/modules/ext.CollaborationKit.list.edit.js 
b/modules/ext.CollaborationKit.list.edit.js
index 9f3aeaf..2ee2a54 100644
--- a/modules/ext.CollaborationKit.list.edit.js
+++ b/modules/ext.CollaborationKit.list.edit.js
@@ -152,19 +152,29 @@
 * Helper function to get ordered list of all items in list
 *
 * @param {jQuery} $elm The list of items - $( '.mw-ck-list' )
-* @return {Array}
+* @return {Array} 2D array of all items in all columns.
 */
getListOfTitles = function ( $elm ) {
var list = [];
// FIXME must be changed for multilist.
-   $elm.children().children( '.mw-ck-list-item' ).each( function 
() {
-   list[ list.length ] = $( this ).data( 
'collabkit-item-title' );
+   $elm.children( '.mw-ck-list-column' ).each( function () {
+   var $this, colId;
+   $this = $( this );
+   colId = $this.data( 'collabkit-column-id' );
+   list[ colId ] = [];
+   $this.children( '.mw-ck-list-item' ).each( function () {
+   list[ colId ][ list[ colId ].length ] = $( this 
).data( 'collabkit-item-title' );
+   } );
} );
return list;
};
 
/**
 * If the order of the list changes, save back to page
+*
+* @param {jQuery} $item List item in question
+* @param {Array} newOrder 2-D list of all items in new order
+* @param {Array} originalOrder Original order of all items as 2-D list
 */
reorderList = function ( $item, newOrder, originalOrder ) {
var $spinner = $.createSpinner( {
@@ -175,20 +185,23 @@
 
getCurrentJson( mw.config.get( 'wgArticleId' ), function ( res 
) {
var i,
+   j,
reorderedItem,
-   findItemsInResArray,
+   findItemInResArray,
resArray = [],
isEditConflict = false;
 
reorderedItem = $item.data( 'collabkit-item-title' );
 
-   if ( res.content.columns[ 0 ].items.length !== 
originalOrder.length ) {
-   isEditConflict = true;
-   } else {
-   for ( i = 0; i < originalOrder.length; i++ ) {
-   if ( res.content.columns[ 0 ].items[ i 
].title !== originalOrder[ i ] ) {
-   isEditConflict = true;
-   break;
+   outer: for ( i = 0; i < originalOrder.length; i++ ) {
+   if ( res.content.columns[ i ].items.length !== 
originalOrder[ i ].length ) {
+   isEditConflict = true;
+   } else {
+   for ( j = 0; j < originalOrder[ i 
].length; j++ ) {
+   if ( res.content.columns[ i 
].items[ j ].title !== originalOrder[ i ][ j ] ) {
+   isEditConflict = true;
+   break outer;
+   }
}
}
}
@@ -212,13 +225,22 @@
/**
 * Find an item in the result array.
 *
-* Optimized to first look in the most likely spots
+* Optimized to first look in the most likely spots.
+* Assumes that titles must be unique in a list.
+*
+* @param {string} title Title of list item to find
+* @param {int} indexGuess Where we think it might be
+* @param {int} colGuess Which column we think its in
+* @return {Object} The item object for the given title
 */
-   findItemInResArray = function ( title, indexGuess ) {
+   findItemInResArray = function ( 

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make drag and drop work for multi-lists

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

Change subject: Make drag and drop work for multi-lists
..

Make drag and drop work for multi-lists

Bug: T149042
Change-Id: I4e39545e34d8c283adbbfd6fa865c22f11ad978d
---
M modules/ext.CollaborationKit.list.edit.js
1 file changed, 63 insertions(+), 24 deletions(-)


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

diff --git a/modules/ext.CollaborationKit.list.edit.js 
b/modules/ext.CollaborationKit.list.edit.js
index 9f3aeaf..2ee2a54 100644
--- a/modules/ext.CollaborationKit.list.edit.js
+++ b/modules/ext.CollaborationKit.list.edit.js
@@ -152,19 +152,29 @@
 * Helper function to get ordered list of all items in list
 *
 * @param {jQuery} $elm The list of items - $( '.mw-ck-list' )
-* @return {Array}
+* @return {Array} 2D array of all items in all columns.
 */
getListOfTitles = function ( $elm ) {
var list = [];
// FIXME must be changed for multilist.
-   $elm.children().children( '.mw-ck-list-item' ).each( function 
() {
-   list[ list.length ] = $( this ).data( 
'collabkit-item-title' );
+   $elm.children( '.mw-ck-list-column' ).each( function () {
+   var $this, colId;
+   $this = $( this );
+   colId = $this.data( 'collabkit-column-id' );
+   list[ colId ] = [];
+   $this.children( '.mw-ck-list-item' ).each( function () {
+   list[ colId ][ list[ colId ].length ] = $( this 
).data( 'collabkit-item-title' );
+   } );
} );
return list;
};
 
/**
 * If the order of the list changes, save back to page
+*
+* @param {jQuery} $item List item in question
+* @param {Array} newOrder 2-D list of all items in new order
+* @param {Array} originalOrder Original order of all items as 2-D list
 */
reorderList = function ( $item, newOrder, originalOrder ) {
var $spinner = $.createSpinner( {
@@ -175,20 +185,23 @@
 
getCurrentJson( mw.config.get( 'wgArticleId' ), function ( res 
) {
var i,
+   j,
reorderedItem,
-   findItemsInResArray,
+   findItemInResArray,
resArray = [],
isEditConflict = false;
 
reorderedItem = $item.data( 'collabkit-item-title' );
 
-   if ( res.content.columns[ 0 ].items.length !== 
originalOrder.length ) {
-   isEditConflict = true;
-   } else {
-   for ( i = 0; i < originalOrder.length; i++ ) {
-   if ( res.content.columns[ 0 ].items[ i 
].title !== originalOrder[ i ] ) {
-   isEditConflict = true;
-   break;
+   outer: for ( i = 0; i < originalOrder.length; i++ ) {
+   if ( res.content.columns[ i ].items.length !== 
originalOrder[ i ].length ) {
+   isEditConflict = true;
+   } else {
+   for ( j = 0; j < originalOrder[ i 
].length; j++ ) {
+   if ( res.content.columns[ i 
].items[ j ].title !== originalOrder[ i ][ j ] ) {
+   isEditConflict = true;
+   break outer;
+   }
}
}
}
@@ -212,13 +225,22 @@
/**
 * Find an item in the result array.
 *
-* Optimized to first look in the most likely spots
+* Optimized to first look in the most likely spots.
+* Assumes that titles must be unique in a list.
+*
+* @param {string} title Title of list item to find
+* @param {int} indexGuess Where we think it might be
+* @param {int} colGuess Which column we think its in
+* @return {Object} The item object for the given title
 */
-   findItemInResArray = function ( title, indexGuess ) {
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Sync up with Parsoid parserTests.

2017-01-05 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330731 )

Change subject: Sync up with Parsoid parserTests.
..

Sync up with Parsoid parserTests.

This now aligns with Parsoid commit 974dd5b3d70acf59bb15e057dc37e3702195f3e0

Change-Id: Ia45d8e2539e7fec23503706be1b40a6eaf1f5888
---
M tests/parser/parserTests.txt
1 file changed, 37 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/330731/1

diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index f6b6bce..56816e1 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -530,6 +530,8 @@
 
 !! test
 Heading with line break in nowiki
+!! options
+parsoid=wt2html
 !! wikitext
 == A B
 C ==
@@ -537,6 +539,9 @@
 A B
 C[edit]
 
+!! html/parsoid
+A B
+C 
 !! end
 
 !! test
@@ -6477,6 +6482,14 @@
 !! end
 
 !! test
+Break on | in element attribute name in template
+!! wikitext
+{{echo|ha}}
+!! html/parsoid
+div cla
+!! end
+
+!! test
 Don't break on | in extension attribute in template
 !! wikitext
 {{echo|ha}}
@@ -10933,7 +10946,8 @@
 
 !! html/parsoid
 
-[[{{{1}}}|{{{2}}}]]
+[[{{{1}}}|{{{2}}}]]
+
 !! end
 
 # See: T2553
@@ -11625,7 +11639,7 @@
 |c
 |}
 !!html/parsoid
-
+
 c
 
 !!end
@@ -12514,11 +12528,16 @@
 Templates: Parameters substituted at the top-level
 !! wikitext
 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
+
+{{{foo|bar|baz}}}
 !! html/php
 who me? never!
+bar
 
 !! html/parsoid
-who me? never!
+who me? 
never!
+
+bar
 !! end
 
 !!test
@@ -17689,6 +17708,8 @@
 # Known to produce bad XML for now
 !! test
 Fuzz testing: Parser24
+!! options
+parsoid=wt2html
 !! wikitext
 {|
 {{{|
@@ -17698,7 +17719,7 @@
 
 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
 |
-!! html
+!! html/php
 
 {{{|
  
@@ -17711,6 +17732,14 @@
 
 
 
+!! html/parsoid
+{{{|
+
+MOVE
 YOUR MOUSE CURSOR OVER THIS TEXT
+
+
+
+
 !! end
 
 # Note: the current result listed for this is not what the original one was,
@@ -17729,9 +17758,12 @@
 
 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR 
OVER HERE
-!! html
+!! html/php
 LI CLASS=blah" onmouseover="alert('hello world');" align="left"MOVE 
MOUSE CURSOR OVER HERE
 
+!! html/parsoid
+ 
+LI CLASS=blah" onmouseover="alert('hello world');" 
align="left"MOVE MOUSE CURSOR OVER HERE
 !! end
 
 !!test

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia45d8e2539e7fec23503706be1b40a6eaf1f5888
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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/mediawiki-config[master]: all wikis to 1.29.0-wmf.7

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

Change subject: all wikis to 1.29.0-wmf.7
..


all wikis to 1.29.0-wmf.7

Change-Id: Ibe8d91de4a8bb80d52da00f686c667037beee6d2
---
M wikiversions.json
1 file changed, 300 insertions(+), 300 deletions(-)

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



diff --git a/wikiversions.json b/wikiversions.json
index 43234e2..cb1d034 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,40 +1,40 @@
 {
-"aawiki": "php-1.29.0-wmf.6",
+"aawiki": "php-1.29.0-wmf.7",
 "aawikibooks": "php-1.29.0-wmf.7",
 "aawiktionary": "php-1.29.0-wmf.7",
-"abwiki": "php-1.29.0-wmf.6",
+"abwiki": "php-1.29.0-wmf.7",
 "abwiktionary": "php-1.29.0-wmf.7",
-"acewiki": "php-1.29.0-wmf.6",
+"acewiki": "php-1.29.0-wmf.7",
 "advisorywiki": "php-1.29.0-wmf.7",
-"adywiki": "php-1.29.0-wmf.6",
-"afwiki": "php-1.29.0-wmf.6",
+"adywiki": "php-1.29.0-wmf.7",
+"afwiki": "php-1.29.0-wmf.7",
 "afwikibooks": "php-1.29.0-wmf.7",
 "afwikiquote": "php-1.29.0-wmf.7",
 "afwiktionary": "php-1.29.0-wmf.7",
-"akwiki": "php-1.29.0-wmf.6",
+"akwiki": "php-1.29.0-wmf.7",
 "akwikibooks": "php-1.29.0-wmf.7",
 "akwiktionary": "php-1.29.0-wmf.7",
-"alswiki": "php-1.29.0-wmf.6",
+"alswiki": "php-1.29.0-wmf.7",
 "alswikibooks": "php-1.29.0-wmf.7",
 "alswikiquote": "php-1.29.0-wmf.7",
 "alswiktionary": "php-1.29.0-wmf.7",
-"amwiki": "php-1.29.0-wmf.6",
+"amwiki": "php-1.29.0-wmf.7",
 "amwikiquote": "php-1.29.0-wmf.7",
 "amwiktionary": "php-1.29.0-wmf.7",
-"angwiki": "php-1.29.0-wmf.6",
+"angwiki": "php-1.29.0-wmf.7",
 "angwikibooks": "php-1.29.0-wmf.7",
 "angwikiquote": "php-1.29.0-wmf.7",
 "angwikisource": "php-1.29.0-wmf.7",
 "angwiktionary": "php-1.29.0-wmf.7",
-"anwiki": "php-1.29.0-wmf.6",
+"anwiki": "php-1.29.0-wmf.7",
 "anwiktionary": "php-1.29.0-wmf.7",
-"arbcom_cswiki": "php-1.29.0-wmf.6",
-"arbcom_dewiki": "php-1.29.0-wmf.6",
-"arbcom_enwiki": "php-1.29.0-wmf.6",
-"arbcom_fiwiki": "php-1.29.0-wmf.6",
-"arbcom_nlwiki": "php-1.29.0-wmf.6",
-"arcwiki": "php-1.29.0-wmf.6",
-"arwiki": "php-1.29.0-wmf.6",
+"arbcom_cswiki": "php-1.29.0-wmf.7",
+"arbcom_dewiki": "php-1.29.0-wmf.7",
+"arbcom_enwiki": "php-1.29.0-wmf.7",
+"arbcom_fiwiki": "php-1.29.0-wmf.7",
+"arbcom_nlwiki": "php-1.29.0-wmf.7",
+"arcwiki": "php-1.29.0-wmf.7",
+"arwiki": "php-1.29.0-wmf.7",
 "arwikibooks": "php-1.29.0-wmf.7",
 "arwikimedia": "php-1.29.0-wmf.7",
 "arwikinews": "php-1.29.0-wmf.7",
@@ -42,80 +42,80 @@
 "arwikisource": "php-1.29.0-wmf.7",
 "arwikiversity": "php-1.29.0-wmf.7",
 "arwiktionary": "php-1.29.0-wmf.7",
-"arzwiki": "php-1.29.0-wmf.6",
-"astwiki": "php-1.29.0-wmf.6",
+"arzwiki": "php-1.29.0-wmf.7",
+"astwiki": "php-1.29.0-wmf.7",
 "astwikibooks": "php-1.29.0-wmf.7",
 "astwikiquote": "php-1.29.0-wmf.7",
 "astwiktionary": "php-1.29.0-wmf.7",
-"aswiki": "php-1.29.0-wmf.6",
+"aswiki": "php-1.29.0-wmf.7",
 "aswikibooks": "php-1.29.0-wmf.7",
 "aswikisource": "php-1.29.0-wmf.7",
 "aswiktionary": "php-1.29.0-wmf.7",
 "auditcomwiki": "php-1.29.0-wmf.7",
-"avwiki": "php-1.29.0-wmf.6",
+"avwiki": "php-1.29.0-wmf.7",
 "avwiktionary": "php-1.29.0-wmf.7",
-"aywiki": "php-1.29.0-wmf.6",
+"aywiki": "php-1.29.0-wmf.7",
 "aywikibooks": "php-1.29.0-wmf.7",
 "aywiktionary": "php-1.29.0-wmf.7",
-"azbwiki": "php-1.29.0-wmf.6",
-"azwiki": "php-1.29.0-wmf.6",
+"azbwiki": "php-1.29.0-wmf.7",
+"azwiki": "php-1.29.0-wmf.7",
 "azwikibooks": "php-1.29.0-wmf.7",
 "azwikiquote": "php-1.29.0-wmf.7",
 "azwikisource": "php-1.29.0-wmf.7",
 "azwiktionary": "php-1.29.0-wmf.7",
-"barwiki": "php-1.29.0-wmf.6",
-"bat_smgwiki": "php-1.29.0-wmf.6",
-"bawiki": "php-1.29.0-wmf.6",
+"barwiki": "php-1.29.0-wmf.7",
+"bat_smgwiki": "php-1.29.0-wmf.7",
+"bawiki": "php-1.29.0-wmf.7",
 "bawikibooks": "php-1.29.0-wmf.7",
-"bclwiki": "php-1.29.0-wmf.6",
+"bclwiki": "php-1.29.0-wmf.7",
 "bdwikimedia": "php-1.29.0-wmf.7",
-"be_x_oldwiki": "php-1.29.0-wmf.6",
+"be_x_oldwiki": "php-1.29.0-wmf.7",
 "betawikiversity": "php-1.29.0-wmf.7",
-"bewiki": "php-1.29.0-wmf.6",
+"bewiki": "php-1.29.0-wmf.7",
 "bewikibooks": "php-1.29.0-wmf.7",
 "bewikimedia": "php-1.29.0-wmf.7",
 "bewikiquote": "php-1.29.0-wmf.7",
 "bewikisource": "php-1.29.0-wmf.7",
 "bewiktionary": "php-1.29.0-wmf.7",
-"bgwiki": "php-1.29.0-wmf.6",
+"bgwiki": "php-1.29.0-wmf.7",
 "bgwikibooks": "php-1.29.0-wmf.7",
 "bgwikinews": "php-1.29.0-wmf.7",
 "bgwikiquote": "php-1.29.0-wmf.7",
 "bgwikisource": "php-1.29.0-wmf.7",
 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: all wikis to 1.29.0-wmf.7

2017-01-05 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330730 )

Change subject: all wikis to 1.29.0-wmf.7
..

all wikis to 1.29.0-wmf.7

Change-Id: Ibe8d91de4a8bb80d52da00f686c667037beee6d2
---
M wikiversions.json
1 file changed, 300 insertions(+), 300 deletions(-)


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

diff --git a/wikiversions.json b/wikiversions.json
index 43234e2..cb1d034 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,40 +1,40 @@
 {
-"aawiki": "php-1.29.0-wmf.6",
+"aawiki": "php-1.29.0-wmf.7",
 "aawikibooks": "php-1.29.0-wmf.7",
 "aawiktionary": "php-1.29.0-wmf.7",
-"abwiki": "php-1.29.0-wmf.6",
+"abwiki": "php-1.29.0-wmf.7",
 "abwiktionary": "php-1.29.0-wmf.7",
-"acewiki": "php-1.29.0-wmf.6",
+"acewiki": "php-1.29.0-wmf.7",
 "advisorywiki": "php-1.29.0-wmf.7",
-"adywiki": "php-1.29.0-wmf.6",
-"afwiki": "php-1.29.0-wmf.6",
+"adywiki": "php-1.29.0-wmf.7",
+"afwiki": "php-1.29.0-wmf.7",
 "afwikibooks": "php-1.29.0-wmf.7",
 "afwikiquote": "php-1.29.0-wmf.7",
 "afwiktionary": "php-1.29.0-wmf.7",
-"akwiki": "php-1.29.0-wmf.6",
+"akwiki": "php-1.29.0-wmf.7",
 "akwikibooks": "php-1.29.0-wmf.7",
 "akwiktionary": "php-1.29.0-wmf.7",
-"alswiki": "php-1.29.0-wmf.6",
+"alswiki": "php-1.29.0-wmf.7",
 "alswikibooks": "php-1.29.0-wmf.7",
 "alswikiquote": "php-1.29.0-wmf.7",
 "alswiktionary": "php-1.29.0-wmf.7",
-"amwiki": "php-1.29.0-wmf.6",
+"amwiki": "php-1.29.0-wmf.7",
 "amwikiquote": "php-1.29.0-wmf.7",
 "amwiktionary": "php-1.29.0-wmf.7",
-"angwiki": "php-1.29.0-wmf.6",
+"angwiki": "php-1.29.0-wmf.7",
 "angwikibooks": "php-1.29.0-wmf.7",
 "angwikiquote": "php-1.29.0-wmf.7",
 "angwikisource": "php-1.29.0-wmf.7",
 "angwiktionary": "php-1.29.0-wmf.7",
-"anwiki": "php-1.29.0-wmf.6",
+"anwiki": "php-1.29.0-wmf.7",
 "anwiktionary": "php-1.29.0-wmf.7",
-"arbcom_cswiki": "php-1.29.0-wmf.6",
-"arbcom_dewiki": "php-1.29.0-wmf.6",
-"arbcom_enwiki": "php-1.29.0-wmf.6",
-"arbcom_fiwiki": "php-1.29.0-wmf.6",
-"arbcom_nlwiki": "php-1.29.0-wmf.6",
-"arcwiki": "php-1.29.0-wmf.6",
-"arwiki": "php-1.29.0-wmf.6",
+"arbcom_cswiki": "php-1.29.0-wmf.7",
+"arbcom_dewiki": "php-1.29.0-wmf.7",
+"arbcom_enwiki": "php-1.29.0-wmf.7",
+"arbcom_fiwiki": "php-1.29.0-wmf.7",
+"arbcom_nlwiki": "php-1.29.0-wmf.7",
+"arcwiki": "php-1.29.0-wmf.7",
+"arwiki": "php-1.29.0-wmf.7",
 "arwikibooks": "php-1.29.0-wmf.7",
 "arwikimedia": "php-1.29.0-wmf.7",
 "arwikinews": "php-1.29.0-wmf.7",
@@ -42,80 +42,80 @@
 "arwikisource": "php-1.29.0-wmf.7",
 "arwikiversity": "php-1.29.0-wmf.7",
 "arwiktionary": "php-1.29.0-wmf.7",
-"arzwiki": "php-1.29.0-wmf.6",
-"astwiki": "php-1.29.0-wmf.6",
+"arzwiki": "php-1.29.0-wmf.7",
+"astwiki": "php-1.29.0-wmf.7",
 "astwikibooks": "php-1.29.0-wmf.7",
 "astwikiquote": "php-1.29.0-wmf.7",
 "astwiktionary": "php-1.29.0-wmf.7",
-"aswiki": "php-1.29.0-wmf.6",
+"aswiki": "php-1.29.0-wmf.7",
 "aswikibooks": "php-1.29.0-wmf.7",
 "aswikisource": "php-1.29.0-wmf.7",
 "aswiktionary": "php-1.29.0-wmf.7",
 "auditcomwiki": "php-1.29.0-wmf.7",
-"avwiki": "php-1.29.0-wmf.6",
+"avwiki": "php-1.29.0-wmf.7",
 "avwiktionary": "php-1.29.0-wmf.7",
-"aywiki": "php-1.29.0-wmf.6",
+"aywiki": "php-1.29.0-wmf.7",
 "aywikibooks": "php-1.29.0-wmf.7",
 "aywiktionary": "php-1.29.0-wmf.7",
-"azbwiki": "php-1.29.0-wmf.6",
-"azwiki": "php-1.29.0-wmf.6",
+"azbwiki": "php-1.29.0-wmf.7",
+"azwiki": "php-1.29.0-wmf.7",
 "azwikibooks": "php-1.29.0-wmf.7",
 "azwikiquote": "php-1.29.0-wmf.7",
 "azwikisource": "php-1.29.0-wmf.7",
 "azwiktionary": "php-1.29.0-wmf.7",
-"barwiki": "php-1.29.0-wmf.6",
-"bat_smgwiki": "php-1.29.0-wmf.6",
-"bawiki": "php-1.29.0-wmf.6",
+"barwiki": "php-1.29.0-wmf.7",
+"bat_smgwiki": "php-1.29.0-wmf.7",
+"bawiki": "php-1.29.0-wmf.7",
 "bawikibooks": "php-1.29.0-wmf.7",
-"bclwiki": "php-1.29.0-wmf.6",
+"bclwiki": "php-1.29.0-wmf.7",
 "bdwikimedia": "php-1.29.0-wmf.7",
-"be_x_oldwiki": "php-1.29.0-wmf.6",
+"be_x_oldwiki": "php-1.29.0-wmf.7",
 "betawikiversity": "php-1.29.0-wmf.7",
-"bewiki": "php-1.29.0-wmf.6",
+"bewiki": "php-1.29.0-wmf.7",
 "bewikibooks": "php-1.29.0-wmf.7",
 "bewikimedia": "php-1.29.0-wmf.7",
 "bewikiquote": "php-1.29.0-wmf.7",
 "bewikisource": "php-1.29.0-wmf.7",
 "bewiktionary": "php-1.29.0-wmf.7",
-"bgwiki": "php-1.29.0-wmf.6",
+"bgwiki": "php-1.29.0-wmf.7",
 "bgwikibooks": "php-1.29.0-wmf.7",
 "bgwikinews": "php-1.29.0-wmf.7",
 "bgwikiquote": "php-1.29.0-wmf.7",
 "bgwikisource": "php-1.29.0-wmf.7",
 

[MediaWiki-commits] [Gerrit] mediawiki...LiquidThreads[master]: Migrate away from UtfNormal in core to external UtfNormal li...

2017-01-05 Thread MtDu (Code Review)
MtDu has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330728 )

Change subject: Migrate away from UtfNormal in core to external UtfNormal 
library
..

Migrate away from UtfNormal in core to external UtfNormal library

In MediaWiki version 1.25, the UtfNormal library was split into a separate 
wikimedia/utfnormal package.
This patch changes the code to reflect this change.

Bug: T153994
Change-Id: I9d46ba835726e7099aab39e032ab29a2a9f86e02
---
M classes/Hooks.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/classes/Hooks.php b/classes/Hooks.php
index 2598c21..18aebbc 100644
--- a/classes/Hooks.php
+++ b/classes/Hooks.php
@@ -1,6 +1,7 @@
 https://gerrit.wikimedia.org/r/330728
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d46ba835726e7099aab39e032ab29a2a9f86e02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: MtDu 

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


[MediaWiki-commits] [Gerrit] mediawiki...Foxway[master]: Migrate away from UtfNormal in core to external UtfNormal li...

2017-01-05 Thread MtDu (Code Review)
MtDu has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330727 )

Change subject: Migrate away from UtfNormal in core to external UtfNormal 
library
..

Migrate away from UtfNormal in core to external UtfNormal library

In MediaWiki version 1.25, the UtfNormal library was split into a separate 
wikimedia/utfnormal package.
This patch changes the code to reflect this change.

Bug: T153994
Change-Id: I8371572b70ae95b227fb6d22119a4dc47b379044
---
M Foxway.body.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Foxway 
refs/changes/27/330727/1

diff --git a/Foxway.body.php b/Foxway.body.php
index 62f63c3..4f7879a 100644
--- a/Foxway.body.php
+++ b/Foxway.body.php
@@ -7,6 +7,9 @@
  * @author Pavel Astakhov 
  * @licence GNU General Public Licence 2.0 or later
  */
+
+use UtfNormal\Validator;
+
 class Foxway {
 
static $DebugLoops = false;
@@ -47,7 +50,7 @@
$return = implode($result);
 
self::$time += microtime(true) - self::$startTime;
-   return \UtfNormal::cleanUp($return);
+   return Validator::cleanUp($return);
}
 
public static function render($input, array $args, Parser $parser, 
PPFrame $frame) {
@@ -82,7 +85,7 @@
}
 
self::$time += microtime(true) - self::$startTime;
-   return \UtfNormal::cleanUp($return);
+   return Validator::cleanUp($return);
}
 
public static function isBanned(PPFrame $frame) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8371572b70ae95b227fb6d22119a4dc47b379044
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Foxway
Gerrit-Branch: master
Gerrit-Owner: MtDu 

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


[MediaWiki-commits] [Gerrit] mediawiki...eventstreams[master]: Adding "; " so jshint runs clean

2017-01-05 Thread Nuria (Code Review)
Nuria has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330726 )

Change subject: Adding ";" so jshint runs clean
..

Adding ";" so jshint runs clean

Change-Id: If925732748b62115f41c4f19b77af745a112a20b
---
M routes/v2.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/eventstreams 
refs/changes/26/330726/1

diff --git a/routes/v2.js b/routes/v2.js
index a0037b5..27f8bb9 100644
--- a/routes/v2.js
+++ b/routes/v2.js
@@ -1,7 +1,7 @@
 'use strict';
 
 const kafkaSse = require('kafka-sse');
-const rdkafkaStatsd = require('node-rdkafka-statsd')
+const rdkafkaStatsd = require('node-rdkafka-statsd');
 
 const sUtil = require('../lib/util');
 const eUtil = require('../lib/eventstreams-util');

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If925732748b62115f41c4f19b77af745a112a20b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/eventstreams
Gerrit-Branch: master
Gerrit-Owner: Nuria 

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


  1   2   3   >