[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Revert "lineardoc: Add test to cover span wrapping for aroun...

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

Change subject: Revert "lineardoc: Add test to cover span wrapping for around 
linkback a tags"
..


Revert "lineardoc: Add test to cover span wrapping for around linkback a tags"

This reverts commit 414d8c147aa48bbf7e1f85244052b9ecb210f060.

Parsoid patch for this feature was reverted

Change-Id: I57657fd99b6198dd6b5487dd0b7c5f54ffbb930d
---
M test/lineardoc/LinearDoc.test.js
D test/lineardoc/data/test6-result.xhtml
D test/lineardoc/data/test6-result.xml
D test/lineardoc/data/test6.xhtml
4 files changed, 1 insertion(+), 19 deletions(-)

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



diff --git a/test/lineardoc/LinearDoc.test.js b/test/lineardoc/LinearDoc.test.js
index 2c27a97..ca397e9 100644
--- a/test/lineardoc/LinearDoc.test.js
+++ b/test/lineardoc/LinearDoc.test.js
@@ -9,7 +9,7 @@
it( 'should be possible to linearise all kind of HTML inputs', function 
() {
var parser, testXhtmlFile, resultXmlFile, resultXhtmlFile, 
testXhtml, resultXml,
resultXhtml, i,
-   numTests = 6;
+   numTests = 5;
for ( i = 1; i <= numTests; i++ ) {
testXhtmlFile = __dirname + '/data/test' + i + '.xhtml';
resultXmlFile = __dirname + '/data/test' + i + 
'-result.xml';
diff --git a/test/lineardoc/data/test6-result.xhtml 
b/test/lineardoc/data/test6-result.xhtml
deleted file mode 100644
index e6376a9..000
--- a/test/lineardoc/data/test6-result.xhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-1 2 
 foo
-
diff --git a/test/lineardoc/data/test6-result.xml 
b/test/lineardoc/data/test6-result.xml
deleted file mode 100644
index 06d0e70..000
--- a/test/lineardoc/data/test6-result.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-  1 
-  2 
-   
-  foo
-
-
-
-
diff --git a/test/lineardoc/data/test6.xhtml b/test/lineardoc/data/test6.xhtml
deleted file mode 100644
index 453b5a8..000
--- a/test/lineardoc/data/test6.xhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-1 2 
 foo
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57657fd99b6198dd6b5487dd0b7c5f54ffbb930d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: Nikerabbit 
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...cxserver[master]: Revert "lineardoc: Add test to cover span wrapping for aroun...

2017-05-24 Thread Santhosh (Code Review)
Hello KartikMistry, jenkins-bot, Nikerabbit,

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

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

to review the following change.


Change subject: Revert "lineardoc: Add test to cover span wrapping for around 
linkback a tags"
..

Revert "lineardoc: Add test to cover span wrapping for around linkback a tags"

This reverts commit 414d8c147aa48bbf7e1f85244052b9ecb210f060.

Parsoid patch for this feature was reverted

Change-Id: I57657fd99b6198dd6b5487dd0b7c5f54ffbb930d
---
M test/lineardoc/LinearDoc.test.js
D test/lineardoc/data/test6-result.xhtml
D test/lineardoc/data/test6-result.xml
D test/lineardoc/data/test6.xhtml
4 files changed, 1 insertion(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/78/355578/1

diff --git a/test/lineardoc/LinearDoc.test.js b/test/lineardoc/LinearDoc.test.js
index 2c27a97..ca397e9 100644
--- a/test/lineardoc/LinearDoc.test.js
+++ b/test/lineardoc/LinearDoc.test.js
@@ -9,7 +9,7 @@
it( 'should be possible to linearise all kind of HTML inputs', function 
() {
var parser, testXhtmlFile, resultXmlFile, resultXhtmlFile, 
testXhtml, resultXml,
resultXhtml, i,
-   numTests = 6;
+   numTests = 5;
for ( i = 1; i <= numTests; i++ ) {
testXhtmlFile = __dirname + '/data/test' + i + '.xhtml';
resultXmlFile = __dirname + '/data/test' + i + 
'-result.xml';
diff --git a/test/lineardoc/data/test6-result.xhtml 
b/test/lineardoc/data/test6-result.xhtml
deleted file mode 100644
index e6376a9..000
--- a/test/lineardoc/data/test6-result.xhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-1 2 
 foo
-
diff --git a/test/lineardoc/data/test6-result.xml 
b/test/lineardoc/data/test6-result.xml
deleted file mode 100644
index 06d0e70..000
--- a/test/lineardoc/data/test6-result.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-  1 
-  2 
-   
-  foo
-
-
-
-
diff --git a/test/lineardoc/data/test6.xhtml b/test/lineardoc/data/test6.xhtml
deleted file mode 100644
index 453b5a8..000
--- a/test/lineardoc/data/test6.xhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-1 2 
 foo
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57657fd99b6198dd6b5487dd0b7c5f54ffbb930d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: dm.Change: Update store length tracking when adding to history

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

Change subject: dm.Change: Update store length tracking when adding to history
..


dm.Change: Update store length tracking when adding to history

ve.dm.Document#storeLengthAtHistoryLength is updated by ve.dm.Document#commit,
but was not updated by ve.dm.Change#addToHistory. This caused
ve.dm.Document#getChangeSince to return an empty store after
a local rebase of a change with a non-empty store.

Change-Id: I432b072ea6364289d79db94c6d1c84b1244406ff
---
M src/dm/ve.dm.Change.js
M tests/dm/ve.dm.RebaseServer.test.js
2 files changed, 95 insertions(+), 0 deletions(-)

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



diff --git a/src/dm/ve.dm.Change.js b/src/dm/ve.dm.Change.js
index 5b15d7c..98312d1 100644
--- a/src/dm/ve.dm.Change.js
+++ b/src/dm/ve.dm.Change.js
@@ -674,10 +674,12 @@
throw new Error( 'this starts at ' + this.start +
' but history ends at ' + 
documentModel.completeHistory.length );
}
+   // FIXME this code should probably be in dm.Document
this.stores.forEach( function ( store ) {
documentModel.store.merge( store );
} );
ve.batchPush( documentModel.completeHistory, this.transactions );
+   documentModel.storeLengthAtHistoryLength[ 
documentModel.completeHistory.length ] = documentModel.store.getLength();
 };
 
 /**
diff --git a/tests/dm/ve.dm.RebaseServer.test.js 
b/tests/dm/ve.dm.RebaseServer.test.js
index ded5d52..abffd10 100644
--- a/tests/dm/ve.dm.RebaseServer.test.js
+++ b/tests/dm/ve.dm.RebaseServer.test.js
@@ -181,6 +181,97 @@
[ '2', 'receive' ],
[ '2', 'assertHist', '-(Bd)-(cA)WP' ]
]
+   },
+   {
+   name: 'Double client-side rebase with annotation',
+   initialData: [
+   { type: 'paragraph' },
+   { type: '/paragraph' },
+   { type: 'internalList' },
+   { type: '/internalList' }
+   ],
+   clients: [ '1', '2' ],
+   ops: [
+   // Client 1 applies a local change that 
introduces an annotation
+   [ '1', 'apply', {
+   start: 0,
+   transactions: [
+   {
+   operations: [
+   { type: 
'retain', length: 1 },
+   { type: 
'replace', remove: [], insert: [
+   [ 'X', 
[ 'h123' ] ],
+   [ 'Y', 
[ 'h123' ] ],
+   [ 'Z', 
[ 'h123' ] ]
+   ] },
+   { type: 
'retain', length: 3 }
+   ],
+   author: '1'
+   }
+   ],
+   stores: [
+   {
+   hashes: [ 'h123' ],
+   hashStore: {
+   h123: {
+   type: 
'annotation',
+   value: {
+   
type: 'textStyle/bold'
+   }
+   }
+   }
+   }
+   ],
+   selections: {
+   1: {
+   type: 'linear',
+   range: {
+   type: 'range',
+   from: 4,
+   to: 4
+   

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP actually split out config classes

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

Change subject: WIP actually split out config classes
..

WIP actually split out config classes

Change-Id: Ib5c810b0fd08e8c0147aaac1f75dda018f9723d2
---
M Core/Configuration.php
M Core/Context.php
M Core/DataStores/QueueWrapper.php
M Core/DataStores/SmashPigDatabase.php
A Core/GlobalConfiguration.php
M Core/Http/CurlWrapper.php
M Core/Http/OutboundRequest.php
M Core/Listeners/ListenerBase.php
M Core/Logging/LogStreams/FailmailLogStream.php
M Core/MailHandler.php
M Core/Messages/ListenerMessage.php
A Core/ProviderConfiguration.php
M Core/QueueConsumers/BaseQueueConsumer.php
M Maintenance/CreateIpnMessagesFromPendingDb.php
M Maintenance/DumpConfig.php
M Maintenance/MaintenanceBase.php
M Maintenance/doMaintenance.php
M PaymentProviders/Adyen/AdyenPaymentsAPI.php
M PaymentProviders/Adyen/Jobs/DownloadReportJob.php
M PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
M PaymentProviders/Amazon/Actions/CloseOrderReference.php
M PaymentProviders/Amazon/AmazonApi.php
M PaymentProviders/Amazon/Audit/AuditParser.php
M PaymentProviders/Amazon/Audit/ReportDownloader.php
M PaymentProviders/Ingenico/Api.php
M PaymentProviders/Ingenico/BankPaymentProvider.php
M PaymentProviders/Ingenico/IdealStatusProvider.php
M PaymentProviders/Ingenico/IngenicoPaymentProvider.php
M PaymentProviders/PayPal/Job.php
M PaymentProviders/PayPal/Listener.php
M PaymentProviders/PayPal/Message.php
M PaymentProviders/PayPal/PayPalPaymentsAPI.php
M PaymentProviders/PaymentProviderFactory.php
M config/main.yaml
34 files changed, 244 insertions(+), 180 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/77/355577/1

diff --git a/Core/Configuration.php b/Core/Configuration.php
index 89406de..d93223d 100644
--- a/Core/Configuration.php
+++ b/Core/Configuration.php
@@ -6,7 +6,7 @@
 /**
  * Cascading configuration using YAML files
  */
-class Configuration {
+abstract class Configuration {
 
/** @var array K/V array of configuration options for the initialized 
node */
protected $options = array();
@@ -14,81 +14,13 @@
/** @var array keyed on class name that stores persistent objects */
protected $objects = array();
 
-   /**
-* @var string Name of the view that generated this configuration object
-*
-* FIXME: There's still something fishy about view.
-*/
-   protected $viewName = 'default';
-
-   /**
-* Creates a configuration object for a specific configuration node.
-*
-* @param string $view Configuration view to load
-* FIXME: No reason to provide a default.
-*
-* @return Configuration or subclass
-*/
-   public static function createForView( $view = 'default' ) {
-   $config = new static();
-   $config->viewName = $view;
-   $config->loadDefaultConfig();
-
-   return $config;
-   }
-
-   /**
-* Creates a configuration object for a specific configuration node.
-*
-* FIXME: Don't provide defaults once usages are cleaned up.
-*
-* @param string $view Configuration view to load
-* @param array|string|null $overridePath  Extra configuration path(s) 
to search
-*
-* @return Configuration or subclass
-*/
-   public static function createForViewWithOverrideFile( $view = 
'default', $overridePath = null ) {
-   $config = new static();
-   $config->viewName = $view;
-
-   if ( !$overridePath ) {
-   $config->loadDefaultConfig();
-   } else {
-   $searchPath = array_merge(
-   ( array ) $overridePath,
-   $config->getDefaultSearchPath()
-   );
-   $config->loadConfigFromPaths( $searchPath );
-   }
-   return $config;
-   }
-
public function loadDefaultConfig() {
$this->loadConfigFromPaths( $this->getDefaultSearchPath() );
}
 
-   public function getDefaultSearchPath() {
-   $searchPath = array();
+   abstract public function getDefaultSearchPath();
 
-   // FIXME: The whole 'view' thing is going to go away when we 
split into
-   // GlobalConfiguration and ProviderConfiguration
-   if ( $this->viewName !== 'default' ) {
-
-   if ( isset( $_SERVER['HOME'] ) ) {
-   $searchPath[] =  
"{$_SERVER['HOME']}/.smashpig/{$this->viewName}/main.yaml";
-   }
-   $searchPath[] = 
"/etc/smashpig/{$this->viewName}/main.yaml";
-   $searchPath[] = __DIR__ . 
"/../config/{$this->viewName}/main.yaml";
-  

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Moving setting env properties closer to where they're used

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

Change subject: Moving setting env properties closer to where they're used
..

Moving setting env properties closer to where they're used

Change-Id: I3496ab7668c48f93d1a98baccdb1b5caf7ea0327
---
M lib/api/ParsoidService.js
M lib/api/apiUtils.js
M lib/api/routes.js
3 files changed, 46 insertions(+), 52 deletions(-)


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

diff --git a/lib/api/ParsoidService.js b/lib/api/ParsoidService.js
index e5d3bb6..b4d52ae 100644
--- a/lib/api/ParsoidService.js
+++ b/lib/api/ParsoidService.js
@@ -115,6 +115,15 @@
req.pipe(req.busboy);
});
 
+   // Allow cross-domain requests (CORS) so that parsoid service can be 
used
+   // by third-party sites.
+   if (parsoidConfig.allowCORS) {
+   app.use(function(req, res, next) {
+   res.set('Access-Control-Allow-Origin', 
parsoidConfig.allowCORS);
+   next();
+   });
+   }
+
// just a timer
app.use(function(req, res, next) {
res.locals.start = Date.now();
diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index 5a2f00e..4ed3168 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -556,7 +556,7 @@
  * @param {Object} pb
  */
 apiUtils.wt2htmlRes = function(env, res, html, pb) {
-   if (env.pageBundle) {
+   if (pb) {
var response = {
contentmodel: env.page.meta.revision.contentmodel,
html: {
@@ -579,3 +579,21 @@
apiUtils.htmlResponse(res, html, undefined, 
apiUtils.htmlContentType(env), true);
}
 };
+
+apiUtils.shouldScrub = function(req, def) {
+   // Check hasOwnProperty to avoid overwriting the default when
+   // this isn't set.  `scrubWikitext` was renamed in RESTBase to
+   // `scrub_wikitext`.  Support both for backwards compatibility,
+   // but prefer the newer form.
+   if (req.body.hasOwnProperty('scrub_wikitext')) {
+   return !(!req.body.scrub_wikitext || req.body.scrub_wikitext 
=== 'false');
+   } else if (req.query.hasOwnProperty('scrub_wikitext')) {
+   return !(!req.query.scrub_wikitext || req.query.scrub_wikitext 
=== 'false');
+   } else if (req.body.hasOwnProperty('scrubWikitext')) {
+   return !(!req.body.scrubWikitext || req.body.scrubWikitext === 
'false');
+   } else if (req.query.hasOwnProperty('scrubWikitext')) {
+   return !(!req.query.scrubWikitext || req.query.scrubWikitext 
=== 'false');
+   } else {
+   return def;
+   }
+};
diff --git a/lib/api/routes.js b/lib/api/routes.js
index be7a1bb..b3d1de7 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -169,11 +169,13 @@
}
res.once('finish', resolve);
apiUtils.errorResponse(res, 
logData.fullMsg(), logData.flatLogObject().httpStatus);
-   }).catch(function(e) {
+   })
+   .catch(function(e) {
console.error(e.stack || e);
res.end();
return Promise.reject(e);
-   }).nodify(callback);
+   })
+   .nodify(callback);
}
return Promise.resolve().nodify(callback);
}
@@ -184,37 +186,13 @@
reqId: req.headers['x-request-id'],
userAgent: req.headers['user-agent'],
};
-   MWParserEnv.getParserEnv(parsoidConfig, 
options).then(function(env) {
+   MWParserEnv.getParserEnv(parsoidConfig, options)
+   .then(function(env) {
env.logger.registerBackend(/fatal(\/.*)?/, errBack);
-   if (env.conf.parsoid.allowCORS) {
-   // Allow cross-domain requests (CORS) so that 
parsoid service
-   // can be used by third-party sites.
-   apiUtils.setHeader(res, 
'Access-Control-Allow-Origin',
-   env.conf.parsoid.allowCORS);
-   }
-   if (res.locals.opts && res.locals.opts.format === 
'pagebundle') {
-   env.pageBundle = true;
-   }
-   // Check hasOwnProperty to avoid overwriting the 
default when
-   // this isn't set.  `scrubWikitext` was renamed in 
RESTBase to
-   // 

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Recognize normalized values and keep them.

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

Change subject: Recognize normalized values and keep them.
..


Recognize normalized values and keep them.

Normalized values may not be picked up together with regular
values since they have different subject.

Bug: T166196
Change-Id: I849a03039975e67d0cece32025dd167f41c9ef30
---
M common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
M tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
3 files changed, 39 insertions(+), 3 deletions(-)

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



diff --git 
a/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java 
b/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
index a8222e7..1501559 100644
--- a/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
+++ b/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
@@ -177,6 +177,10 @@
  * The unit of the quantity.
  */
 public static final String UNIT = PREFIX + "Unit";
+/**
+ * Normalized value for quantity.
+ */
+public static final String NORMALIZED = PREFIX + "Normalized";
 
 private Quantity() {
 // Utility class.
diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
index b787893..aca9281 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
@@ -35,6 +35,7 @@
 import org.wikidata.query.rdf.common.WikibasePoint.CoordinateOrder;
 import org.wikidata.query.rdf.common.uri.OWL;
 import org.wikidata.query.rdf.common.uri.Ontology;
+import org.wikidata.query.rdf.common.uri.Ontology.Quantity;
 import org.wikidata.query.rdf.common.uri.Provenance;
 import org.wikidata.query.rdf.common.uri.RDF;
 import org.wikidata.query.rdf.common.uri.RDFS;
@@ -220,7 +221,6 @@
 // remove all values that we have seen as they are used by statements
 existingValues.removeAll(op.extraValidSubjects);
 existingRefs.removeAll(op.extraValidSubjects);
-return;
 }
 
 /**
@@ -722,6 +722,14 @@
 return false;
 }
 break;
+case Quantity.NORMALIZED:
+/* Keep normalized values. It's a bit tricky here since
+ * normalized value may not be used yet and when we restore
+ * regular value we may miss normalized one. So we always add
+ * normalized ones to allowed list.
+ */
+registerExtraValidSubject(statement.getObject().stringValue());
+break;
 default:
 }
 if (!extraValidSubjects.contains(subject)) {
@@ -822,8 +830,8 @@
 throw new BadSubjectException(unknownSubjects.keySet(), 
uris);
 } else {
 log.info(
-"Unrecognized subjects: {}.  Expected only 
sitelinks and subjects starting with {} and {}",
-unknownSubjects.keySet(), uris.entityData(), 
uris.entity());
+"Unrecognized subjects: {} while processing {}.  
Expected only sitelinks and subjects starting with {} and {}",
+unknownSubjects.keySet(), entityUri, 
uris.entityData(), uris.entity());
 }
 }
 if (revisionId == null) {
diff --git 
a/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java 
b/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
index a9ff440..8f0a137 100644
--- a/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
+++ b/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
@@ -178,6 +178,30 @@
 }
 
 @Test
+public void valueWithNormalized() {
+String statementUri = uris.statement() + "q1-someuuid";
+String valueUri = uris.value() + "someotheruuid";
+String valueNormUri = uris.value() + "normalizedvalue";
+entity("Q1")
+//
+.retain(statement("Q1", "P580", statementUri), //
+statement(statementUri, 
uris.property(PropertyType.STATEMENT) + "P580", new 
IntegerLiteralImpl(BigInteger.valueOf(123))),
+statement(statementUri, 
uris.property(PropertyType.STATEMENT_VALUE) + "P580", valueUri),
+statement(valueUri, Ontology.Quantity.AMOUNT, new 
IntegerLiteralImpl(BigInteger.valueOf(123))),
+statement(valueUri, Ontology.Quantity.UNIT, "Q12345"),
+statement(valueUri, 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Don't modify passed in apiConf

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

Change subject: Don't modify passed in apiConf
..

Don't modify passed in apiConf

 * It prevents reuse of parsoidOptions, relevant to an upcoming patch.

Change-Id: Ic27f1e0feba0ae5c3e172d70f0b4c2d6ec079ca2
---
M lib/config/ParsoidConfig.js
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index 8104935..7ad 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -458,11 +458,14 @@
} else if (typeof arguments[1] === 'object') {
// Note that `apiConf` is aliased to `arguments[0]`.
prefix = arguments[0];
-   apiConf = arguments[1]; // overwrites `arguments[0]`
+   apiConf = Object.assign({}, arguments[1]);  // 
overwrites `arguments[0]`
apiConf.prefix = prefix;
} else {
apiConf = { uri: arguments[0] };
}
+   } else {
+   console.assert(typeof apiConf === 'object');
+   apiConf = Object.assign({}, apiConf);  // Don't modify the 
passed in object
}
console.assert(apiConf.uri, "Action API uri is mandatory.");
if (!apiConf.prefix) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic27f1e0feba0ae5c3e172d70f0b4c2d6ec079ca2
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[master]: Use WANcache instead of $messageMemc when purging feeds

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

Change subject: Use WANcache instead of $messageMemc when purging feeds
..

Use WANcache instead of $messageMemc when purging feeds

ChangesFeed was updated in rMW3517be1cf0b7841b6f20d97fbcfa97f8645270a6
to use the WAN cache, so this change updates the purgeFeeds() function
to use the same cache.

Bug: T166195
Change-Id: I28a8d729737f03ccaf069495a59e80401c59e778
---
M maintenance/rebuildrecentchanges.php
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/74/355574/1

diff --git a/maintenance/rebuildrecentchanges.php 
b/maintenance/rebuildrecentchanges.php
index 458dacf..bcc70d2 100644
--- a/maintenance/rebuildrecentchanges.php
+++ b/maintenance/rebuildrecentchanges.php
@@ -478,15 +478,16 @@
}
 
/**
-* Purge cached feeds in $messageMemc
+* Purge cached feeds in $wanCache
 */
private function purgeFeeds() {
-   global $wgFeedClasses, $messageMemc;
+   global $wgFeedClasses;
 
$this->output( "Deleting feed timestamps.\n" );
 
+   $wanCache = ObjectCache::getMainWANInstance();
foreach ( $wgFeedClasses as $feed => $className ) {
-   $messageMemc->delete( wfMemcKey( 'rcfeed', $feed, 
'timestamp' ) ); # Good enough for now.
+   $wanCache->delete( $wanCache->makeKey( 'rcfeed', $feed, 
'timestamp' ) ); # Good enough for now.
}
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28a8d729737f03ccaf069495a59e80401c59e778
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] operations/puppet[production]: phab: comment out include of exim4::ganglia

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

Change subject: phab: comment out include of exim4::ganglia
..


phab: comment out include of exim4::ganglia

This caused LOTS of cron spam since today.

The chain of events was like:

< paladox> !log phabricator upgrading mariadb to 10.2
->
/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18: symbolic link to libmariadb.so.3
->
/usr/sbin/exim: /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18: no version 
information available (required by /usr/sbin/exim)
->
 /usr/local/bin/exim-to-gmetric" fails
 
But this cron is running every minute and then tries to send mail to
root.

/etc/aliases says that root should be r...@wikimedia.org
and then when it _tries_ to mail that sender verification fails:

550-Verification failed for "

which then causes "mail delivery failed" messages which get delivered
to all of ops.

Since Ganglia is deprecated and i wanted to find a quick stop gap
before talking about this some more, i am just commenting that class right now.

Change-Id: Iff1ce9cdd059a4239309ab93d367e1bfa790b91d
---
M modules/role/manifests/phabricator_server.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/role/manifests/phabricator_server.pp 
b/modules/role/manifests/phabricator_server.pp
index 6b777de..e75dfac 100644
--- a/modules/role/manifests/phabricator_server.pp
+++ b/modules/role/manifests/phabricator_server.pp
@@ -16,5 +16,5 @@
 include ::profile::phabricator::rsync
 include ::phabricator::monitoring
 include ::phabricator::mpm
-include ::exim4::ganglia
+# include ::exim4::ganglia
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff1ce9cdd059a4239309ab93d367e1bfa790b91d
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Dzahn 
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] wikimedia...SmashPig[master]: Route all config access through Context

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

Change subject: Route all config access through Context
..

Route all config access through Context

Gets rid of static Configuration singleton. The context will eventually
hold configs for different payment providers in addition to the global
configuration.

Bug: T143831
Change-Id: Ic59f78b92b3f2ff02532588b7122a390726a5f5c
---
M Core/Configuration.php
M Core/Context.php
M Core/QueueConsumers/BaseQueueConsumer.php
M Maintenance/CreateIpnMessagesFromPendingDb.php
M PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
M PaymentProviders/Adyen/Tests/AdyenTestConfiguration.php
M PaymentProviders/Adyen/Tests/phpunit/AuditTest.php
M PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php
M PaymentProviders/Adyen/Tests/phpunit/CaptureResponseActionTest.php
M PaymentProviders/Adyen/Tests/phpunit/PaymentCaptureActionTest.php
M PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
M PaymentProviders/Adyen/Tests/phpunit/ReportAvailableTest.php
M PaymentProviders/Adyen/Tests/phpunit/RequeueMessageTest.php
M PaymentProviders/PayPal/Job.php
M PaymentProviders/PayPal/Listener.php
M PaymentProviders/PayPal/PayPalPaymentsAPI.php
M Tests/BaseSmashPigUnitTestCase.php
M Tests/TestingConfiguration.php
18 files changed, 48 insertions(+), 77 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/73/355573/1

diff --git a/Core/Configuration.php b/Core/Configuration.php
index f499aa6..5711655 100644
--- a/Core/Configuration.php
+++ b/Core/Configuration.php
@@ -8,9 +8,6 @@
  */
 class Configuration {
 
-   /** @var Configuration the default configuration object returned when 
get_default_config is called */
-   protected static $defaultObj;
-
/** @var array K/V array of configuration options for the initialized 
node */
protected $options = array();
 
@@ -23,19 +20,6 @@
 * FIXME: There's still something fishy about view.
 */
protected $viewName = 'default';
-
-   /**
-* Obtains the current default configuration object. You should 
probably be
-* using a context call instead of this. See Context->getConfiguration()
-* FIXME: Resolve ambiguity, only provide one entry point.
-*
-* Typically the object created by index.php
-*
-* @return Configuration
-*/
-   public static function getDefaultConfig() {
-   return Configuration::$defaultObj;
-   }
 
/**
 * Creates a configuration object for a specific configuration node.
@@ -77,12 +61,6 @@
$config->loadConfigFromPaths( $searchPath );
}
return $config;
-   }
-
-   protected function __construct() {
-   // Memoize configuration.
-   // TODO It could be confusing for the ctor to nuke the stored 
config.
-   self::$defaultObj = $this;
}
 
public function loadDefaultConfig() {
diff --git a/Core/Context.php b/Core/Context.php
index c856f82..163a9ab 100644
--- a/Core/Context.php
+++ b/Core/Context.php
@@ -50,14 +50,6 @@
 * @return Context
 */
public static function get() {
-   if ( Context::$instance === null ) {
-   // Remove this once we know we aren't going to blow up
-   Logger::notice(
-   'Context being initialized as part of get() 
request. Normally should use init() first.',
-   debug_backtrace( null )
-   );
-   Context::init( Configuration::getDefaultConfig() );
-   }
return Context::$instance;
}
 
@@ -126,20 +118,10 @@
 *
 * Set the configuration using init()
 *
-* Use this instead of Configuration::getDefaultConfig();
-*
 * @return null|Configuration
 */
public function getConfiguration() {
-   if ( $this->config ) {
-   return $this->config;
-   } else {
-   Logger::notice(
-   'Context returning default configuration. 
Probably missing a setConfiguration().',
-   debug_backtrace( null )
-   );
-   return Configuration::getDefaultConfig();
-   }
+   return $this->config;
}
 
 /**
diff --git a/Core/QueueConsumers/BaseQueueConsumer.php 
b/Core/QueueConsumers/BaseQueueConsumer.php
index 4c985f9..d1f0f26 100644
--- a/Core/QueueConsumers/BaseQueueConsumer.php
+++ b/Core/QueueConsumers/BaseQueueConsumer.php
@@ -5,7 +5,7 @@
 use InvalidArgumentException;
 use PHPQueue\Interfaces\AtomicReadBuffer;
 
-use SmashPig\Core\Configuration;
+use 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: phab: comment out include of exim4::ganglia

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

Change subject: phab: comment out include of exim4::ganglia
..

phab: comment out include of exim4::ganglia

Change-Id: Iff1ce9cdd059a4239309ab93d367e1bfa790b91d
---
M modules/role/manifests/phabricator_server.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/role/manifests/phabricator_server.pp 
b/modules/role/manifests/phabricator_server.pp
index 6b777de..e75dfac 100644
--- a/modules/role/manifests/phabricator_server.pp
+++ b/modules/role/manifests/phabricator_server.pp
@@ -16,5 +16,5 @@
 include ::profile::phabricator::rsync
 include ::phabricator::monitoring
 include ::phabricator::mpm
-include ::exim4::ganglia
+# include ::exim4::ganglia
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff1ce9cdd059a4239309ab93d367e1bfa790b91d
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]: objectcache: fix bug in getMultiWithSetCallback() that resul...

2017-05-24 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355571 )

Change subject: objectcache: fix bug in getMultiWithSetCallback() that resulted 
in serial cache GETs
..

objectcache: fix bug in getMultiWithSetCallback() that resulted in serial cache 
GETs

The warmup cache was not properly prefixed and was also using the entity
IDs instead of the cache keys.

Added some unit tests for this.

Change-Id: I75b7a31214b515511856f9d95db32e8881d80ccc
---
M includes/libs/objectcache/WANObjectCache.php
M tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
2 files changed, 41 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/355571/1

diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index f0a439a..4b314c3 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -97,6 +97,8 @@
private $callbackDepth = 0;
/** @var mixed[] Temporary warm-up cache */
private $warmupCache = [];
+   /** @var integer Key fetched */
+   private $keyFetchCount = 0;
 
/** Max time expected to pass between delete() and DB commit finishing 
*/
const MAX_COMMIT_DELAY = 3;
@@ -301,7 +303,10 @@
} else {
$wrappedValues = [];
}
-   $wrappedValues += $this->cache->getMulti( $keysGet );
+   if ( $keysGet ) {
+   $this->keyFetchCount += count( $keysGet );
+   $wrappedValues += $this->cache->getMulti( $keysGet );
+   }
// Time used to compare/init "check" keys (derived after 
getMulti() to be pessimistic)
$now = microtime( true );
 
@@ -1103,16 +1108,28 @@
final public function getMultiWithSetCallback(
ArrayIterator $keyedIds, $ttl, callable $callback, array $opts 
= []
) {
-   $keysWarmUp = iterator_to_array( $keyedIds, true );
$checkKeys = isset( $opts['checkKeys'] ) ? $opts['checkKeys'] : 
[];
+
+   $keysWarmUp = [];
+   // Get all the value keys to fetch...
+   foreach ( $keyedIds as $key => $id ) {
+   $keysWarmUp[] = self::VALUE_KEY_PREFIX . $key;
+   }
+   // Get all the check keys to fetch...
foreach ( $checkKeys as $i => $checkKeyOrKeys ) {
if ( is_int( $i ) ) {
-   $keysWarmUp[] = $checkKeyOrKeys;
+   // Single check key that applies to all value 
keys
+   $keysWarmUp[] = self::TIME_KEY_PREFIX . 
$checkKeyOrKeys;
} else {
-   $keysWarmUp = array_merge( $keysWarmUp, 
$checkKeyOrKeys );
+   // List of check keys that apply to value key $i
+   $keysWarmUp = array_merge(
+   $keysWarmUp,
+   self::prefixCacheKeys( $checkKeyOrKeys, 
self::TIME_KEY_PREFIX )
+   );
}
}
 
+   $this->keyFetchCount += count( $keysWarmUp );
$this->warmupCache = $this->cache->getMulti( $keysWarmUp );
$this->warmupCache += array_fill_keys( $keysWarmUp, false );
 
@@ -1317,6 +1334,22 @@
}
 
/**
+* @return integer Could of cache keys fetched
+* @since 1.30
+*/
+   public function getKeyFetchCount() {
+   return $this->keyFetchCount;
+   }
+
+   /**
+* Clear the count of cache keys fetched
+* @since 1.30
+*/
+   public function clearKeyFetchCount() {
+   $this->keyFetchCount = 0;
+   }
+
+   /**
 * Do the actual async bus purge of a key
 *
 * This must set the key to "PURGED::"
diff --git a/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php 
b/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
index 72effd7..b570e38 100644
--- a/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
+++ b/tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
@@ -305,15 +305,19 @@
 
$wasSet = 0;
$value = "@efef$";
+   $cache->clearKeyFetchCount();
$keyedIds = new ArrayIterator( [ $keyB => 'efef' ] );
$v = $cache->getMultiWithSetCallback(
$keyedIds, 30, $genFunc, [ 'lowTTL' => 0, 'lockTSE' => 
5, ] + $extOpts );
$this->assertEquals( $value, $v[$keyB], "Value returned" );
$this->assertEquals( 1, $wasSet, "Value regenerated" );
+   $this->assertEquals( 

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Recognize normalized values and keep them.

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

Change subject: Recognize normalized values and keep them.
..

Recognize normalized values and keep them.

Bug: T166196
Change-Id: I849a03039975e67d0cece32025dd167f41c9ef30
---
M common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
M tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
3 files changed, 42 insertions(+), 3 deletions(-)


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

diff --git 
a/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java 
b/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
index a8222e7..1501559 100644
--- a/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
+++ b/common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
@@ -177,6 +177,10 @@
  * The unit of the quantity.
  */
 public static final String UNIT = PREFIX + "Unit";
+/**
+ * Normalized value for quantity.
+ */
+public static final String NORMALIZED = PREFIX + "Normalized";
 
 private Quantity() {
 // Utility class.
diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
index b787893..aca9281 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
@@ -35,6 +35,7 @@
 import org.wikidata.query.rdf.common.WikibasePoint.CoordinateOrder;
 import org.wikidata.query.rdf.common.uri.OWL;
 import org.wikidata.query.rdf.common.uri.Ontology;
+import org.wikidata.query.rdf.common.uri.Ontology.Quantity;
 import org.wikidata.query.rdf.common.uri.Provenance;
 import org.wikidata.query.rdf.common.uri.RDF;
 import org.wikidata.query.rdf.common.uri.RDFS;
@@ -220,7 +221,6 @@
 // remove all values that we have seen as they are used by statements
 existingValues.removeAll(op.extraValidSubjects);
 existingRefs.removeAll(op.extraValidSubjects);
-return;
 }
 
 /**
@@ -722,6 +722,14 @@
 return false;
 }
 break;
+case Quantity.NORMALIZED:
+/* Keep normalized values. It's a bit tricky here since
+ * normalized value may not be used yet and when we restore
+ * regular value we may miss normalized one. So we always add
+ * normalized ones to allowed list.
+ */
+registerExtraValidSubject(statement.getObject().stringValue());
+break;
 default:
 }
 if (!extraValidSubjects.contains(subject)) {
@@ -822,8 +830,8 @@
 throw new BadSubjectException(unknownSubjects.keySet(), 
uris);
 } else {
 log.info(
-"Unrecognized subjects: {}.  Expected only 
sitelinks and subjects starting with {} and {}",
-unknownSubjects.keySet(), uris.entityData(), 
uris.entity());
+"Unrecognized subjects: {} while processing {}.  
Expected only sitelinks and subjects starting with {} and {}",
+unknownSubjects.keySet(), entityUri, 
uris.entityData(), uris.entity());
 }
 }
 if (revisionId == null) {
diff --git 
a/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java 
b/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
index a9ff440..efec12a 100644
--- a/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
+++ b/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
@@ -178,6 +178,33 @@
 }
 
 @Test
+public void valueWithNormalized() {
+String statementUri = uris.statement() + "q1-someuuid";
+String valueUri = uris.value() + "someotheruuid";
+String valueNormUri = uris.value() + "normalizedvalue";
+entity("Q1")
+//
+.retain(statement("Q1", "P580", statementUri), //
+statement(statementUri, uris.value() + "P580", new 
LiteralImpl("-1379800-01-01T00:00:00Z",
+XMLSchema.DATETIME)), //
+statement(statementUri, uris.value() + "P580" + 
"-value", valueUri),
+// Currently wikibase exports the deep time values as
+// strings, not dateTime.
+statement(valueUri, Ontology.Quantity.AMOUNT, new 
IntegerLiteralImpl(BigInteger.valueOf(123))),
+statement(valueUri, Ontology.Quantity.UNIT, "Q12345"),
+ 

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Cut overlong object values down to 32k.

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

Change subject: Cut overlong object values down to 32k.
..


Cut overlong object values down to 32k.

Blazegraph would not accept objects longer than 32k, see IVUnicode.java:134.
Bug: T165834

Change-Id: Ib6fc46ba2311da590042e9ad7ba4732666437c59
---
M tools/runUpdate.sh
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
M tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
3 files changed, 52 insertions(+), 1 deletion(-)

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



diff --git a/tools/runUpdate.sh b/tools/runUpdate.sh
index dc07654..c95892c 100755
--- a/tools/runUpdate.sh
+++ b/tools/runUpdate.sh
@@ -1,4 +1,4 @@
 #!/bin/bash
 
-java -cp target/wikidata-query-tools-*-SNAPSHOT-jar-with-dependencies.jar 
org.wikidata.query.rdf.tool.Update --sparqlUrl 
http://localhost:/bigdata/namespace/kb/sparql $*
+java -cp target/wikidata-query-tools-*-SNAPSHOT-jar-with-dependencies.jar 
org.wikidata.query.rdf.tool.Update --sparqlUrl 
http://localhost:/bigdata/namespace/wdq/sparql $*
 
diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
index 740f882..b787893 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
@@ -414,6 +414,12 @@
 if (!statement()) {
 itr.remove();
 }
+// Check object length, cut if needed.
+final Statement shortStatement = checkObjectLength();
+if (shortStatement != null) {
+itr.remove();
+restoredStatements.add(shortStatement);
+}
 }
 
 statement = null;
@@ -422,6 +428,28 @@
 }
 
 /**
+ * Check whether object's length is more than 32k.
+ * If so, create new statement that cuts object down to 32k.
+ * @return New statement or null if not needed.
+ */
+private Statement checkObjectLength() {
+if (statement.getObject() instanceof Literal) {
+final Literal value = (Literal)statement.getObject();
+if (value.stringValue().length() > Short.MAX_VALUE) {
+final Literal newValue;
+if 
(value.getDatatype().equals(org.openrdf.model.vocabulary.RDF.LANGSTRING)) {
+newValue = new 
LiteralImpl(value.stringValue().substring(0, Short.MAX_VALUE), 
value.getLanguage());
+} else {
+newValue = new 
LiteralImpl(value.stringValue().substring(0, Short.MAX_VALUE), 
value.getDatatype());
+}
+return new StatementImpl(statement.getSubject(),
+statement.getPredicate(), newValue);
+}
+}
+return null;
+}
+
+/**
  * Process a statement.
  *
  * @return true to keep the statement, false to remove it
diff --git 
a/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java 
b/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
index 6275e61..a9ff440 100644
--- a/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
+++ b/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
@@ -13,6 +13,7 @@
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.commons.lang3.StringUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.openrdf.model.Statement;
@@ -343,6 +344,28 @@
 assertThat(result, hasItem(expected));
 }
 
+/**
+ * Ensure that long strings are cut to MAX_VALUE.
+ */
+@Test
+public void veryLongValue() {
+String longString = StringUtils.repeat("A", Short.MAX_VALUE);
+List result = entity("Q2223")
+.remove(statement("Q2223", uris.property(PropertyType.DIRECT) 
+ "P9", new LiteralImpl(longString + longString)))
+// With type
+.remove(statement("Q2223", uris.property(PropertyType.DIRECT) 
+ "P10", new LiteralImpl(longString + longString, OWL.DATATYPEPROPERTY)))
+// With language
+.remove(statement("Q2223", uris.property(PropertyType.DIRECT) 
+ "P11", new LiteralImpl(longString + longString, "en")))
+.testWithoutShuffle();
+Statement expected = statement("Q2223", 
uris.property(PropertyType.DIRECT) + "P9", new LiteralImpl(longString));
+assertThat(result, hasItem(expected));
+expected = statement("Q2223", uris.property(PropertyType.DIRECT) + 
"P10", new LiteralImpl(longString, OWL.DATATYPEPROPERTY));
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: authdns::server: move 'include standard' to role

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

Change subject: authdns::server: move 'include standard' to role
..


authdns::server: move 'include standard' to role

Change-Id: Ic63b1f5fdffd81a1df0153d9c6054f0f7dd6a591
---
M manifests/site.pp
M modules/role/manifests/authdns/server.pp
2 files changed, 1 insertion(+), 6 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index ac9e71f..abbd68a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -133,9 +133,7 @@
 
 node 'baham.wikimedia.org' {
 role(authdns::server)
-
 interface::add_ip6_mapped { 'main': }
-include ::standard
 }
 
 # Bastion in Virginia
@@ -896,9 +894,7 @@
 
 node 'eeden.wikimedia.org' {
 role(authdns::server)
-
 interface::add_ip6_mapped { 'main': }
-include ::standard
 }
 
 # icinga based monitoring hosts (einsteinium = eqiad, tegmen = codfw)
@@ -2317,9 +2313,7 @@
 
 node 'radon.wikimedia.org' {
 role(authdns::server)
-
 interface::add_ip6_mapped { 'main': }
-include ::standard
 }
 
 # Live Recent Changes WebSocket stream
diff --git a/modules/role/manifests/authdns/server.pp 
b/modules/role/manifests/authdns/server.pp
index 2320679..aecfe94 100644
--- a/modules/role/manifests/authdns/server.pp
+++ b/modules/role/manifests/authdns/server.pp
@@ -2,6 +2,7 @@
 class role::authdns::server {
 system::role { 'authdns': description => 'Authoritative DNS server' }
 
+include ::standard
 include ::base::firewall
 include authdns::ganglia
 include prometheus::node_gdnsd

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Switch Swift URLs to HTTPs

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

Change subject: Switch Swift URLs to HTTPs
..


Switch Swift URLs to HTTPs

Bug: T160616
Change-Id: I0740cfc68c6e7615957d07c4e01d664bceaf8d0e
---
M wmf-config/ProductionServices.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/ProductionServices.php 
b/wmf-config/ProductionServices.php
index 853a695..8f9003e 100644
--- a/wmf-config/ProductionServices.php
+++ b/wmf-config/ProductionServices.php
@@ -24,8 +24,8 @@
'upload' => 'upload.svc.eqiad.wmnet',
'cxserver' => 'http://cxserver.discovery.wmnet:8080',
'etcd' => '_etcd._tcp.eqiad.wmnet',
-   'mediaSwiftAuth' => 'http://ms-fe.svc.eqiad.wmnet/auth',
-   'mediaSwiftStore' => 'http://ms-fe.svc.eqiad.wmnet/v1/AUTH_mw'
+   'mediaSwiftAuth' => 'https://ms-fe.svc.eqiad.wmnet/auth',
+   'mediaSwiftStore' => 'https://ms-fe.svc.eqiad.wmnet/v1/AUTH_mw'
 ];
 
 $wmfAllServices['codfw'] = [
@@ -41,8 +41,8 @@
'upload' => 'upload.svc.codfw.wmnet',
'cxserver' => 'http://cxserver.discovery.wmnet:8080',
'etcd' => '_etcd._tcp.codfw.wmnet',
-   'mediaSwiftAuth' => 'http://ms-fe.svc.codfw.wmnet/auth',
-   'mediaSwiftStore' => 'http://ms-fe.svc.codfw.wmnet/v1/AUTH_mw'
+   'mediaSwiftAuth' => 'https://ms-fe.svc.codfw.wmnet/auth',
+   'mediaSwiftStore' => 'https://ms-fe.svc.codfw.wmnet/v1/AUTH_mw'
 ];
 
 ### Logstash

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0740cfc68c6e7615957d07c4e01d664bceaf8d0e
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Catrope 
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]: dnsrecursor: move 'include standard' to role

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

Change subject: dnsrecursor: move 'include standard' to role
..


dnsrecursor: move 'include standard' to role

Change-Id: I6fa652760aeafc846e6ab8541449f41f42b621a4
---
M manifests/site.pp
M modules/role/manifests/dnsrecursor.pp
2 files changed, 1 insertion(+), 5 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index d9c446c..ac9e71f 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -14,7 +14,6 @@
 
 node /^(acamar|achernar)\.wikimedia\.org$/ {
 role(dnsrecursor, ntp)
-include ::standard
 
 interface::add_ip6_mapped { 'main': }
 }
@@ -205,7 +204,6 @@
 # DNS recursor
 node 'chromium.wikimedia.org' {
 role(dnsrecursor, ntp)
-include ::standard
 
 interface::add_ip6_mapped { 'main': }
 }
@@ -1109,7 +1107,6 @@
 # DNS recursor
 node 'hydrogen.wikimedia.org' {
 role(dnsrecursor, ntp)
-include ::standard
 
 interface::add_ip6_mapped { 'main': }
 }
@@ -1774,7 +1771,6 @@
 
 node 'maerlant.wikimedia.org' {
 role(dnsrecursor, ntp)
-include ::standard
 
 interface::add_ip6_mapped { 'main': }
 }
@@ -2143,7 +2139,6 @@
 
 node 'nescio.wikimedia.org' {
 role(dnsrecursor, ntp)
-include ::standard
 
 interface::add_ip6_mapped { 'main': }
 }
diff --git a/modules/role/manifests/dnsrecursor.pp 
b/modules/role/manifests/dnsrecursor.pp
index ce743be..3a2d617 100644
--- a/modules/role/manifests/dnsrecursor.pp
+++ b/modules/role/manifests/dnsrecursor.pp
@@ -3,6 +3,7 @@
 class role::dnsrecursor {
 system::role { 'role::dnsrecursor': description => 'Recursive DNS server' }
 
+include ::standard
 include ::lvs::configuration
 include ::network::constants
 include ::base::firewall

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fa652760aeafc846e6ab8541449f41f42b621a4
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Volans 
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]: confd: use logrotate::conf for logrotate

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

Change subject: confd: use logrotate::conf for logrotate
..


confd: use logrotate::conf for logrotate

Change-Id: I772ffaa22542ca42b4bcd763895e562de7954e30
---
M modules/confd/manifests/init.pp
1 file changed, 3 insertions(+), 5 deletions(-)

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



diff --git a/modules/confd/manifests/init.pp b/modules/confd/manifests/init.pp
index ccd208f..cad675f 100644
--- a/modules/confd/manifests/init.pp
+++ b/modules/confd/manifests/init.pp
@@ -116,7 +116,7 @@
 
 # Upstart will log confd output to a dedicated file in /var/log/upstart 
already
 if $::initsystem == 'upstart' {
-file { '/etc/logrotate.d/confd':
+logrotate::conf { 'confd':
 ensure => absent,
 }
 
@@ -125,11 +125,9 @@
 }
 } else {
 # Log to a dedicated file
-file { '/etc/logrotate.d/confd':
+logrotate::conf { 'confd':
+ensure => present,
 source => 'puppet:///modules/confd/logrotate.conf',
-owner  => 'root',
-group  => 'root',
-mode   => '0444',
 }
 
 rsyslog::conf { 'confd':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I772ffaa22542ca42b4bcd763895e562de7954e30
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: Volans 
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...crm[deployment]: Merge branch 'master' into deployment

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

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

0715cc0 Audit processors can read normalized fields in logs
a23b082 Unique-ify invoice ID for recurring
c974314 Payments-init consumer can handle 'currency' message field.

Change-Id: I694d02c19ea58a6e56d96fe000c4d7cfe4c7d2b0
---
D sites/all/modules/queue2civicrm/tests/data/payments-init.json
D sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
D sites/all/modules/wmf_audit/tests/AdyenAuditTest.php
D 
sites/all/modules/wmf_audit/tests/data/Adyen/donation_new/settlement_detail_report_batch_2.csv
D sites/all/modules/wmf_audit/tests/data/logs/payments-adyen-20170218.gz
5 files changed, 0 insertions(+), 350 deletions(-)

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



diff --git a/sites/all/modules/queue2civicrm/tests/data/payments-init.json 
b/sites/all/modules/queue2civicrm/tests/data/payments-init.json
deleted file mode 100644
index 7ddcc1b..000
--- a/sites/all/modules/queue2civicrm/tests/data/payments-init.json
+++ /dev/null
@@ -1,18 +0,0 @@
-<<< HEAD   (9b7a74 Merge branch 'master' into deployment)
-===
-{
-   "contribution_tracking_id": "12345",
-   "gateway": "testgateway",
-   "order_id": "",
-   "gateway_txn_id": "",
-   "validation_action": "process",
-   "payments_final_status": "complete",
-   "payment_method": "paypal",
-   "payment_submethod": "",
-   "country": "IT",
-   "amount": "2.00",
-   "currency": "EUR",
-   "server": "testpayments1002",
-   "date": "1445990999"
-}
->>> BRANCH (c97431 Payments-init consumer can handle 'currency' message 
field.)
diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
deleted file mode 100644
index c727d87..000
--- a/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
+++ /dev/null
@@ -1,120 +0,0 @@
-<<< HEAD   (9b7a74 Merge branch 'master' into deployment)
-===
-createTable( 'test' );
-   $this->consumer = new PaymentsInitQueueConsumer(
-   'test'
-   );
-   }
-
-   public function testValidMessage() {
-   $message = $this->getMessage();
-   $this->consumer->processMessage( $message );
-
-   $this->compareMessageWithDb( $message );
-   }
-
-   /**
-* The first message for a ct_id / order_id pair needs to be complete
-*
-* @expectedException FredgeDataValidationException
-*/
-   public function testIncompleteMessage() {
-   $message = $this->getMessage();
-   unset( $message['payment_method'] );
-   $this->consumer->processMessage( $message );
-   }
-
-   /**
-* After one complete message has been inserted, a second message
-* with the same ct_id / order_id can update only selected fields
-*/
-   public function testUpdatedMessage() {
-   $message1 = $this->getMessage();
-   $message2 = $this->getMessage();
-   $message2['contribution_tracking_id'] = 
$message1['contribution_tracking_id'];
-   $message2['order_id'] = $message1['order_id'];
-
-   $message1['payments_final_status'] = 'pending';
-   $message2['payments_final_status'] = 'pending';
-   unset( $message2['payment_method'] );
-
-   $this->consumer->processMessage( $message1 );
-   $this->compareMessageWithDb( $message1 );
-
-   $this->consumer->processMessage( $message2 );
-   $updated = array_merge(
-   $message1, $message2
-   );
-   $this->compareMessageWithDb( $updated );
-   }
-
-   protected function compareMessageWithDb( $message ) {
-   $dbEntries = $this->getDbEntries(
-   $message['contribution_tracking_id'], 
$message['order_id']
-   );
-   $this->assertEquals( 1, count( $dbEntries ) );
-   $fields = array(
-   'gateway',  'gateway_txn_id', 'validation_action',
-   'payments_final_status', 'payment_method', 
'payment_submethod',
-   'country', 'amount', 'server'
-   );
-   foreach ( $fields as $field ) {
-   $this->assertEquals( $message[$field], 
$dbEntries[0][$field] );
-   }
-   $this->assertEquals( $message['currency'], 
$dbEntries[0]['currency_code'] );
-   $this->assertEquals(
-   $message['date'], wmf_common_date_civicrm_to_unix( 
$dbEntries[0]['date'] )
-

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

2017-05-24 Thread XenoRyet (Code Review)
XenoRyet has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355569 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

0715cc0 Audit processors can read normalized fields in logs
a23b082 Unique-ify invoice ID for recurring
c974314 Payments-init consumer can handle 'currency' message field.

Change-Id: I694d02c19ea58a6e56d96fe000c4d7cfe4c7d2b0
---
D sites/all/modules/queue2civicrm/tests/data/payments-init.json
D sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
D sites/all/modules/wmf_audit/tests/AdyenAuditTest.php
D 
sites/all/modules/wmf_audit/tests/data/Adyen/donation_new/settlement_detail_report_batch_2.csv
D sites/all/modules/wmf_audit/tests/data/logs/payments-adyen-20170218.gz
5 files changed, 0 insertions(+), 350 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/69/355569/1

diff --git a/sites/all/modules/queue2civicrm/tests/data/payments-init.json 
b/sites/all/modules/queue2civicrm/tests/data/payments-init.json
deleted file mode 100644
index 7ddcc1b..000
--- a/sites/all/modules/queue2civicrm/tests/data/payments-init.json
+++ /dev/null
@@ -1,18 +0,0 @@
-<<< HEAD   (9b7a74 Merge branch 'master' into deployment)
-===
-{
-   "contribution_tracking_id": "12345",
-   "gateway": "testgateway",
-   "order_id": "",
-   "gateway_txn_id": "",
-   "validation_action": "process",
-   "payments_final_status": "complete",
-   "payment_method": "paypal",
-   "payment_submethod": "",
-   "country": "IT",
-   "amount": "2.00",
-   "currency": "EUR",
-   "server": "testpayments1002",
-   "date": "1445990999"
-}
->>> BRANCH (c97431 Payments-init consumer can handle 'currency' message 
field.)
diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
deleted file mode 100644
index c727d87..000
--- a/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
+++ /dev/null
@@ -1,120 +0,0 @@
-<<< HEAD   (9b7a74 Merge branch 'master' into deployment)
-===
-createTable( 'test' );
-   $this->consumer = new PaymentsInitQueueConsumer(
-   'test'
-   );
-   }
-
-   public function testValidMessage() {
-   $message = $this->getMessage();
-   $this->consumer->processMessage( $message );
-
-   $this->compareMessageWithDb( $message );
-   }
-
-   /**
-* The first message for a ct_id / order_id pair needs to be complete
-*
-* @expectedException FredgeDataValidationException
-*/
-   public function testIncompleteMessage() {
-   $message = $this->getMessage();
-   unset( $message['payment_method'] );
-   $this->consumer->processMessage( $message );
-   }
-
-   /**
-* After one complete message has been inserted, a second message
-* with the same ct_id / order_id can update only selected fields
-*/
-   public function testUpdatedMessage() {
-   $message1 = $this->getMessage();
-   $message2 = $this->getMessage();
-   $message2['contribution_tracking_id'] = 
$message1['contribution_tracking_id'];
-   $message2['order_id'] = $message1['order_id'];
-
-   $message1['payments_final_status'] = 'pending';
-   $message2['payments_final_status'] = 'pending';
-   unset( $message2['payment_method'] );
-
-   $this->consumer->processMessage( $message1 );
-   $this->compareMessageWithDb( $message1 );
-
-   $this->consumer->processMessage( $message2 );
-   $updated = array_merge(
-   $message1, $message2
-   );
-   $this->compareMessageWithDb( $updated );
-   }
-
-   protected function compareMessageWithDb( $message ) {
-   $dbEntries = $this->getDbEntries(
-   $message['contribution_tracking_id'], 
$message['order_id']
-   );
-   $this->assertEquals( 1, count( $dbEntries ) );
-   $fields = array(
-   'gateway',  'gateway_txn_id', 'validation_action',
-   'payments_final_status', 'payment_method', 
'payment_submethod',
-   'country', 'amount', 'server'
-   );
-   foreach ( $fields as $field ) {
-   $this->assertEquals( $message[$field], 
$dbEntries[0][$field] );
-   }
-   $this->assertEquals( $message['currency'], 
$dbEntries[0]['currency_code'] );
-   $this->assertEquals(
-   $message['date'], wmf_common_date_civicrm_to_unix( 
$dbEntries[0]['date'] 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Payments-init consumer can handle 'currency' message field.

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

Change subject: Payments-init consumer can handle 'currency' message field.
..


Payments-init consumer can handle 'currency' message field.

Trying to standardize wire formats. Should fix the column name, but that's
a pretty huge table.

Bug: T165818
Change-Id: Ica71016fb92e50feb91daa5d4875241b1b885f7e
---
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
M sites/all/modules/queue2civicrm/tests/data/payments-init.json
M sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
3 files changed, 9 insertions(+), 4 deletions(-)

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



diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 593be09..a12c1d1 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -111,7 +111,12 @@
   }
 }
   }
-
+  // FIXME: schema should match wire format & frontend name
+  // renaming message field here to match column.
+  if (empty($msg['currency_code']) && !empty($msg['currency'])) {
+$msg['currency_code'] = $msg['currency'];
+unset($msg['currency']);
+  }
   $data = array();
   foreach ($schemata[$table]['fields'] as $field => $definition) {
 if (!array_key_exists($field, $msg)) {
diff --git a/sites/all/modules/queue2civicrm/tests/data/payments-init.json 
b/sites/all/modules/queue2civicrm/tests/data/payments-init.json
index d586a02..4f2a10d 100644
--- a/sites/all/modules/queue2civicrm/tests/data/payments-init.json
+++ b/sites/all/modules/queue2civicrm/tests/data/payments-init.json
@@ -1,5 +1,4 @@
 {
-   "php-message-class": 
"SmashPig\\CrmLink\\Messages\\DonationInterfaceFinalStatus",
"contribution_tracking_id": "12345",
"gateway": "testgateway",
"order_id": "",
@@ -10,7 +9,7 @@
"payment_submethod": "",
"country": "IT",
"amount": "2.00",
-   "currency_code": "EUR",
+   "currency": "EUR",
"server": "testpayments1002",
"date": "1445990999"
 }
diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
index 6e2e3f5..0bbd9c1 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
@@ -74,11 +74,12 @@
$fields = array(
'gateway',  'gateway_txn_id', 'validation_action',
'payments_final_status', 'payment_method', 
'payment_submethod',
-   'country', 'amount', 'currency_code', 'server'
+   'country', 'amount', 'server'
);
foreach ( $fields as $field ) {
$this->assertEquals( $message[$field], 
$dbEntries[0][$field] );
}
+   $this->assertEquals( $message['currency'], 
$dbEntries[0]['currency_code'] );
$this->assertEquals(
$message['date'], wmf_common_date_civicrm_to_unix( 
$dbEntries[0]['date'] )
);

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admins: add kaldari to analytics-privatedata-users

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

Change subject: admins: add kaldari to analytics-privatedata-users
..

admins: add kaldari to analytics-privatedata-users

Access to the Hadoop Cluster ("Data Lake") via host stat1002,
as requested on ticket.

Bug: T166165
Change-Id: I373087f36e00128306af6821cddd94ffe790262c
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/68/355568/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 86fe0f3..9b77958 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -240,7 +240,7 @@
   bmansurov, atgomez, amire80, kartik, pcoombe, foks, mpany, 
jsamra,
   jdlrobson, chelsyx, ovasileva, mtizzoni, panisson, paolotti, 
ciro,
   psinger, flemmerich, mkroetzsch, akrausetud, filippo, nschaaf, 
pmiazga, faidon,
-  piccardi, fdans, eevans, anomie, demon, ladsgroup, musikanimal, 
joewalsh]
+  piccardi, fdans, eevans, anomie, demon, ladsgroup, musikanimal, 
joewalsh, kaldari]
   analytics-admins:
 gid: 732
 description: Admin access to analytics cluster.

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable $wgEchoPerUserBlacklist in beta labs

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

Change subject: Enable $wgEchoPerUserBlacklist in beta labs
..


Enable $wgEchoPerUserBlacklist in beta labs

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

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



diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 5b7a033..deaff2f 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -617,5 +617,9 @@
'wgCognateReadOnly' => [
'default' => false,
],
+
+   'wgEchoPerUserBlacklist' => [
+   'default' => true,
+   ],
];
 } # wmflLabsSettings()

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Wikivoyage should allow page images outside the lead

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

Change subject: Wikivoyage should allow page images outside the lead
..


Wikivoyage should allow page images outside the lead

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index db9f6e4..01c71a7 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17191,6 +17191,8 @@
 // T152115
 'wgPageImagesLeadSectionOnly' => [
'default' => true,
+   // T166251
+   'wikivoyage' => false,
 ],
 'wmgPageImagesExpandOpenSearchXml' => [
'default' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d3600d0d7cf4f4a643654033d35110a78cd2396
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable related pages for everyone

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

Change subject: Enable related pages for everyone
..


Enable related pages for everyone

Bug: T155079
Change-Id: Ib8605dcbc7d4fa6ec203b514cbed6362b3fcc432
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4b8c53e..db9f6e4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16887,7 +16887,6 @@
 
 'wgRelatedArticlesEnabledSamplingRate' => [
'default' => 1,
-   'enwiki' => 0.9,
 ],
 
 'wmgUseRelatedSites' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8605dcbc7d4fa6ec203b514cbed6362b3fcc432
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable print styles in Minerva

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

Change subject: Enable print styles in Minerva
..


Enable print styles in Minerva

Bug: T163287
Change-Id: Iadd163d979ae6fd1717b044db5da24c5c66112bf
---
M wmf-config/InitialiseSettings.php
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 823f152..4b8c53e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15087,6 +15087,14 @@
'wikitech' => true, // Not behind Varnish
 ],
 
+// T163287
+'wgMinervaPrintStyles' => [
+   'default' => [
+   'base' => true,
+   'beta' => true,
+   ],
+],
+
 'wgMinervaCustomLogos' => [
'default' => [],
'wikipedia' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iadd163d979ae6fd1717b044db5da24c5c66112bf
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Hygiene: Remove no longer supported config flags

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

Change subject: Hygiene: Remove no longer supported config flags
..


Hygiene: Remove no longer supported config flags

MinervaBottomLanguageButton and HeaderV2 config flag
no longer exist in MobileFrontend.

Change-Id: I717e27a18d556c50f5557514af427e2f910d30ec
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 23 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1f3307b..823f152 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14961,25 +14961,6 @@
]
 ],
 
-'wgMinervaUseHeaderV2' => [
-   // T160471
-   'default' => [
-   'base' => true,
-   'beta' => true,
-   ],
-
-   // T156794: Enable the feature by default on cawiki and itwiki.
-   'cawiki' => [
-   'base' => true,
-
-   // Implied by the above.
-   //'beta' => true,
-   ],
-   'itwiki' => [
-   'base' => true,
-   ],
-],
-
 'wmgEnableTextExtracts' => [
'default' => true,
 ],
@@ -15205,10 +15186,6 @@
 
 'wgMinervaApplyKnownTemplateHacks' => [
'default' => true,
-],
-
-'wgMinervaBottomLanguageButton' => [
-   'default' => false,
 ],
 
 // Link to help Google spider associate pages on wiki with our Android app.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I717e27a18d556c50f5557514af427e2f910d30ec
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Allow absolute script path for getMediaWikiCli()

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

Change subject: Allow absolute script path for getMediaWikiCli()
..


Allow absolute script path for getMediaWikiCli()

This patch makes mwscript to use absolute path if given.
This enables to run scripts that are not in mediawiki repo via
mwscript.

This does not add security concerns since a) it's command-line only
and b) you could always do it with adding ../../../.. etc. but
with this patch you can do it with just providing absolute path.

Change-Id: I1a72aab4b2fa0580ae3603cbf4e18c8da4f66c6c
---
M multiversion/MWMultiVersion.php
1 file changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php
index 4fafd6b..9a0f10d 100644
--- a/multiversion/MWMultiVersion.php
+++ b/multiversion/MWMultiVersion.php
@@ -442,14 +442,14 @@
 * (b) Sets the MW_INSTALL_PATH environmental variable
 * (c) Changes PHP's current directory to the directory of this file.
 *
-* @param $file string File path (relative to MediaWiki dir)
+* @param $file string File path (relative to MediaWiki dir or absolute)
 * @return string Absolute file path with proper MW location
 */
public static function getMediaWikiCli( $file ) {
global $IP;
 
$multiVersion = self::getInstance();
-   if( !$multiVersion ) {
+   if ( !$multiVersion ) {
$multiVersion = self::initializeForMaintenance();
}
if ( $multiVersion->getDatabase() === 'testwiki' ) {
@@ -464,6 +464,10 @@
 
putenv( "MW_INSTALL_PATH=$IP" );
 
-   return "$IP/$file";
+   if ( $file !== "" && $file[0] === '/' ) {
+   return $file;
+   } else {
+   return "$IP/$file";
+   }
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a72aab4b2fa0580ae3603cbf4e18c8da4f66c6c
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable $wgEchoPerUserBlacklist in beta labs

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

Change subject: Enable $wgEchoPerUserBlacklist in beta labs
..

Enable $wgEchoPerUserBlacklist in beta labs

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


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

diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 5b7a033..deaff2f 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -617,5 +617,9 @@
'wgCognateReadOnly' => [
'default' => false,
],
+
+   'wgEchoPerUserBlacklist' => [
+   'default' => true,
+   ],
];
 } # wmflLabsSettings()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5588adfbe3f0bd7691f415259734639dea6850f2
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] apps...wikipedia[master]: Fix: Unbreak empty search results set handling

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

Change subject: Fix: Unbreak empty search results set handling
..

Fix: Unbreak empty search results set handling

Bug: T137116
Bug: T152402
Change-Id: Ib7d2266ad1bf858f05b5e83f915ba8e11fd529e8
---
M app/src/main/java/org/wikipedia/search/FullTextSearchClient.java
M app/src/test/java/org/wikipedia/search/FullTextSearchClientTest.java
A app/src/test/res/raw/full_text_search_results_empty.json
3 files changed, 31 insertions(+), 3 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/search/FullTextSearchClient.java 
b/app/src/main/java/org/wikipedia/search/FullTextSearchClient.java
index 47b507c..d154977 100644
--- a/app/src/main/java/org/wikipedia/search/FullTextSearchClient.java
+++ b/app/src/main/java/org/wikipedia/search/FullTextSearchClient.java
@@ -11,8 +11,6 @@
 import org.wikipedia.dataclient.retrofit.MwCachedService;
 import org.wikipedia.dataclient.retrofit.WikiCachedService;
 
-import java.io.IOException;
-
 import retrofit2.Call;
 import retrofit2.Response;
 import retrofit2.http.GET;
@@ -53,7 +51,19 @@
 // noinspection ConstantConditions
 cb.failure(call, new 
MwException(response.body().getError()));
 } else {
-cb.failure(call, new IOException("An unknown error 
occurred."));
+// A 'morelike' search query with no results will just 
return an API warning:
+//
+// {
+//   "batchcomplete": true,
+//   "warnings": {
+//  "search": {
+//"warnings": "No valid titles provided to 
'morelike'."
+//  }
+//   }
+// }
+//
+// Just return an empty SearchResults() in this case.
+cb.success(call, new SearchResults());
 }
 }
 
diff --git 
a/app/src/test/java/org/wikipedia/search/FullTextSearchClientTest.java 
b/app/src/test/java/org/wikipedia/search/FullTextSearchClientTest.java
index 6bd3e59..e31d26b 100644
--- a/app/src/test/java/org/wikipedia/search/FullTextSearchClientTest.java
+++ b/app/src/test/java/org/wikipedia/search/FullTextSearchClientTest.java
@@ -59,6 +59,16 @@
 assertCallbackSuccess(call, cb);
 }
 
+@Test public void testRequestSuccessNoResults() throws Throwable {
+enqueueFromFile("full_text_search_results_empty.json");
+
+FullTextSearchClient.Callback cb = 
mock(FullTextSearchClient.Callback.class);
+Call call = request(null, cb);
+
+server().takeRequest();
+assertCallbackSuccess(call, cb);
+}
+
 @Test public void testRequestResponseApiError() throws Throwable {
 enqueueFromFile("api_error.json");
 
diff --git a/app/src/test/res/raw/full_text_search_results_empty.json 
b/app/src/test/res/raw/full_text_search_results_empty.json
new file mode 100644
index 000..f6b209a
--- /dev/null
+++ b/app/src/test/res/raw/full_text_search_results_empty.json
@@ -0,0 +1,8 @@
+{
+  "batchcomplete": true,
+  "warnings": {
+"search": {
+  "warnings": "No valid titles provided to 'morelike'."
+}
+  }
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7d2266ad1bf858f05b5e83f915ba8e11fd529e8
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
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] wikidata...rdf[master]: Cut overlong object values down to 32k.

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

Change subject: Cut overlong object values down to 32k.
..

Cut overlong object values down to 32k.

Blazegraph would not accept objects longer than 32k, see IVUnicode.java:134.
Bug: T165834

Change-Id: Ib6fc46ba2311da590042e9ad7ba4732666437c59
---
M tools/runUpdate.sh
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
M tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
3 files changed, 53 insertions(+), 1 deletion(-)


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

diff --git a/tools/runUpdate.sh b/tools/runUpdate.sh
index dc07654..c95892c 100755
--- a/tools/runUpdate.sh
+++ b/tools/runUpdate.sh
@@ -1,4 +1,4 @@
 #!/bin/bash
 
-java -cp target/wikidata-query-tools-*-SNAPSHOT-jar-with-dependencies.jar 
org.wikidata.query.rdf.tool.Update --sparqlUrl 
http://localhost:/bigdata/namespace/kb/sparql $*
+java -cp target/wikidata-query-tools-*-SNAPSHOT-jar-with-dependencies.jar 
org.wikidata.query.rdf.tool.Update --sparqlUrl 
http://localhost:/bigdata/namespace/wdq/sparql $*
 
diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
index 740f882..ff912fe 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
@@ -33,6 +33,7 @@
 import org.slf4j.LoggerFactory;
 import org.wikidata.query.rdf.common.WikibasePoint;
 import org.wikidata.query.rdf.common.WikibasePoint.CoordinateOrder;
+import org.wikidata.query.rdf.common.uri.GeoSparql;
 import org.wikidata.query.rdf.common.uri.OWL;
 import org.wikidata.query.rdf.common.uri.Ontology;
 import org.wikidata.query.rdf.common.uri.Provenance;
@@ -414,6 +415,12 @@
 if (!statement()) {
 itr.remove();
 }
+// Check object length, cut if needed.
+Statement shortStatement = checkObjectLength();
+if(shortStatement != null) {
+itr.remove();
+restoredStatements.add(shortStatement);
+}
 }
 
 statement = null;
@@ -422,6 +429,28 @@
 }
 
 /**
+ * Check whether object's length is more than 32k.
+ * If so, create new statement that cuts object down to 32k.
+ * @return New statement or null if not needed.
+ */
+private Statement checkObjectLength() {
+if(statement.getObject() instanceof Literal) {
+Literal value = (Literal)statement.getObject();
+if (value.stringValue().length() > Short.MAX_VALUE) {
+final Literal newValue;
+
if(value.getDatatype().equals(org.openrdf.model.vocabulary.RDF.LANGSTRING)) {
+newValue = new 
LiteralImpl(value.stringValue().substring(0, Short.MAX_VALUE), 
value.getLanguage());
+} else {
+newValue = new 
LiteralImpl(value.stringValue().substring(0, Short.MAX_VALUE), 
value.getDatatype());
+}
+return new StatementImpl(statement.getSubject(),
+statement.getPredicate(), newValue);
+}
+}
+return null;
+}
+
+/**
  * Process a statement.
  *
  * @return true to keep the statement, false to remove it
diff --git 
a/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java 
b/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
index 6275e61..a9ff440 100644
--- a/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
+++ b/tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java
@@ -13,6 +13,7 @@
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.commons.lang3.StringUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.openrdf.model.Statement;
@@ -343,6 +344,28 @@
 assertThat(result, hasItem(expected));
 }
 
+/**
+ * Ensure that long strings are cut to MAX_VALUE.
+ */
+@Test
+public void veryLongValue() {
+String longString = StringUtils.repeat("A", Short.MAX_VALUE);
+List result = entity("Q2223")
+.remove(statement("Q2223", uris.property(PropertyType.DIRECT) 
+ "P9", new LiteralImpl(longString + longString)))
+// With type
+.remove(statement("Q2223", uris.property(PropertyType.DIRECT) 
+ "P10", new LiteralImpl(longString + longString, OWL.DATATYPEPROPERTY)))
+// With language
+.remove(statement("Q2223", uris.property(PropertyType.DIRECT) 
+ "P11", new LiteralImpl(longString + longString, 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: dm.Change: Update store length tracking when adding to history

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

Change subject: dm.Change: Update store length tracking when adding to history
..

dm.Change: Update store length tracking when adding to history

ve.dm.Document#storeLengthAtHistoryLength is updated by ve.dm.Document#commit,
but was not updated by ve.dm.Change#addToHistory. This caused
ve.dm.Document#getChangeSince to return an empty store after
a local rebase of a change with a non-empty store.

Change-Id: I432b072ea6364289d79db94c6d1c84b1244406ff
---
M src/dm/ve.dm.Change.js
M tests/dm/ve.dm.RebaseServer.test.js
2 files changed, 95 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/63/355563/1

diff --git a/src/dm/ve.dm.Change.js b/src/dm/ve.dm.Change.js
index 5b15d7c..98312d1 100644
--- a/src/dm/ve.dm.Change.js
+++ b/src/dm/ve.dm.Change.js
@@ -674,10 +674,12 @@
throw new Error( 'this starts at ' + this.start +
' but history ends at ' + 
documentModel.completeHistory.length );
}
+   // FIXME this code should probably be in dm.Document
this.stores.forEach( function ( store ) {
documentModel.store.merge( store );
} );
ve.batchPush( documentModel.completeHistory, this.transactions );
+   documentModel.storeLengthAtHistoryLength[ 
documentModel.completeHistory.length ] = documentModel.store.getLength();
 };
 
 /**
diff --git a/tests/dm/ve.dm.RebaseServer.test.js 
b/tests/dm/ve.dm.RebaseServer.test.js
index ded5d52..abffd10 100644
--- a/tests/dm/ve.dm.RebaseServer.test.js
+++ b/tests/dm/ve.dm.RebaseServer.test.js
@@ -181,6 +181,97 @@
[ '2', 'receive' ],
[ '2', 'assertHist', '-(Bd)-(cA)WP' ]
]
+   },
+   {
+   name: 'Double client-side rebase with annotation',
+   initialData: [
+   { type: 'paragraph' },
+   { type: '/paragraph' },
+   { type: 'internalList' },
+   { type: '/internalList' }
+   ],
+   clients: [ '1', '2' ],
+   ops: [
+   // Client 1 applies a local change that 
introduces an annotation
+   [ '1', 'apply', {
+   start: 0,
+   transactions: [
+   {
+   operations: [
+   { type: 
'retain', length: 1 },
+   { type: 
'replace', remove: [], insert: [
+   [ 'X', 
[ 'h123' ] ],
+   [ 'Y', 
[ 'h123' ] ],
+   [ 'Z', 
[ 'h123' ] ]
+   ] },
+   { type: 
'retain', length: 3 }
+   ],
+   author: '1'
+   }
+   ],
+   stores: [
+   {
+   hashes: [ 'h123' ],
+   hashStore: {
+   h123: {
+   type: 
'annotation',
+   value: {
+   
type: 'textStyle/bold'
+   }
+   }
+   }
+   }
+   ],
+   selections: {
+   1: {
+   type: 'linear',
+   range: {
+   type: 'range',
+   from: 4,
+   to: 4

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: dm.AnnotationSet: Throw an exception when constructing with ...

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

Change subject: dm.AnnotationSet: Throw an exception when constructing with 
missing indexes
..

dm.AnnotationSet: Throw an exception when constructing with missing indexes

Constructing annotation sets with missing store indexes will already lead
to exceptions when attempting to retrieve annotations. Failing at the
time of construction rather than at the time of retrieval makes it easier
to track down how we ended up wih an invalid annotation set.

Change-Id: I4eb1e70328c258b55c529e24dea7dddbed8dd64c
---
M src/dm/ve.dm.AnnotationSet.js
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/64/355564/1

diff --git a/src/dm/ve.dm.AnnotationSet.js b/src/dm/ve.dm.AnnotationSet.js
index e81f455..cb20235 100644
--- a/src/dm/ve.dm.AnnotationSet.js
+++ b/src/dm/ve.dm.AnnotationSet.js
@@ -15,6 +15,13 @@
// Parent constructor
this.store = store;
this.storeIndexes = storeIndexes || [];
+
+   if ( this.get().indexOf( undefined ) !== -1 ) {
+   throw new Error( 'Annotation with index ' +
+   this.storeIndexes[ this.get().indexOf( undefined ) ] +
+   ' not found in store'
+   );
+   }
 };
 
 /* Methods */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4eb1e70328c258b55c529e24dea7dddbed8dd64c
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Avoid treating mcrouter set()s as failing due to AllAsyncRoute

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

Change subject: Avoid treating mcrouter set()s as failing due to AllAsyncRoute
..


Avoid treating mcrouter set()s as failing due to AllAsyncRoute

Per https://github.com/facebook/mcrouter/wiki/List-of-Route-Handles
a NullRoute response is always given for DELETE and SET. The former
already is already handled by MediaWiki treating NOT_FOUND as success.

Change-Id: I79c26bcd6b8ffe7eea73e0d45badcc4ed63f05e6
---
M includes/libs/objectcache/MemcachedClient.php
M includes/libs/objectcache/MemcachedPeclBagOStuff.php
2 files changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/includes/libs/objectcache/MemcachedClient.php 
b/includes/libs/objectcache/MemcachedClient.php
index c3fcab9..a94f86a 100644
--- a/includes/libs/objectcache/MemcachedClient.php
+++ b/includes/libs/objectcache/MemcachedClient.php
@@ -1114,9 +1114,13 @@
if ( $this->_debug ) {
$this->_debugprint( sprintf( "%s %s (%s)", $cmd, $key, 
$line ) );
}
-   if ( $line == "STORED" ) {
+   if ( $line === "STORED" ) {
+   return true;
+   } elseif ( $line === "NOT_STORED" && $cmd === "set" ) {
+   // "Not stored" is always used as the mcrouter response 
with AllAsyncRoute
return true;
}
+
return false;
}
 
diff --git a/includes/libs/objectcache/MemcachedPeclBagOStuff.php 
b/includes/libs/objectcache/MemcachedPeclBagOStuff.php
index 5983c1b..c568e7b 100644
--- a/includes/libs/objectcache/MemcachedPeclBagOStuff.php
+++ b/includes/libs/objectcache/MemcachedPeclBagOStuff.php
@@ -149,7 +149,12 @@
 
public function set( $key, $value, $exptime = 0, $flags = 0 ) {
$this->debugLog( "set($key)" );
-   return $this->checkResult( $key, parent::set( $key, $value, 
$exptime ) );
+   $result = parent::set( $key, $value, $exptime );
+   if ( $result === false && $this->client->getResultCode() === 
Memcached::RES_NOTSTORED ) {
+   // "Not stored" is always used as the mcrouter response 
with AllAsyncRoute
+   return true;
+   }
+   return $this->checkResult( $key, $result );
}
 
protected function cas( $casToken, $key, $value, $exptime = 0 ) {
@@ -163,9 +168,8 @@
if ( $result === false && $this->client->getResultCode() === 
Memcached::RES_NOTFOUND ) {
// "Not found" is counted as success in our interface
return true;
-   } else {
-   return $this->checkResult( $key, $result );
}
+   return $this->checkResult( $key, $result );
}
 
public function add( $key, $value, $exptime = 0 ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79c26bcd6b8ffe7eea73e0d45badcc4ed63f05e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: BryanDavis 
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]: Revert "Revert "Fix the web updater""

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

Change subject: Revert "Revert "Fix the web updater""
..


Revert "Revert "Fix the web updater""

This reverts commit a7b9cc4946a2f7fb081f64d9230bf944736a185b.

Change-Id: I91d4b821df126703f83377dd8aff3a79b629f720
---
M includes/installer/MysqlInstaller.php
1 file changed, 12 insertions(+), 2 deletions(-)

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



diff --git a/includes/installer/MysqlInstaller.php 
b/includes/installer/MysqlInstaller.php
index 09051f4..4f0b66c 100644
--- a/includes/installer/MysqlInstaller.php
+++ b/includes/installer/MysqlInstaller.php
@@ -179,8 +179,8 @@
 
# Determine existing default character set
if ( $conn->tableExists( "revision", __METHOD__ ) ) {
-   $revision = $conn->buildLike( $this->getVar( 
'wgDBprefix' ) . 'revision' );
-   $res = $conn->query( "SHOW TABLE STATUS $revision", 
__METHOD__ );
+   $revision = $this->escapeLikeInternal( $this->getVar( 
'wgDBprefix' ) . 'revision', '\\' );
+   $res = $conn->query( "SHOW TABLE STATUS LIKE 
'$revision'", __METHOD__ );
$row = $conn->fetchObject( $res );
if ( !$row ) {
$this->parent->showMessage( 
'config-show-table-status' );
@@ -222,6 +222,16 @@
}
 
/**
+* @param string $s
+* @return string
+*/
+   protected function escapeLikeInternal( $s, $escapeChar = '`' ) {
+   return str_replace( [ $escapeChar, '%', '_' ],
+   [ "{$escapeChar}{$escapeChar}", "{$escapeChar}%", 
"{$escapeChar}_" ],
+   $s );
+   }
+
+   /**
 * Get a list of storage engines that are available and supported
 *
 * @return array

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91d4b821df126703f83377dd8aff3a79b629f720
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
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...wikihiero[wmf/1.30.0-wmf.2]: Fix styles queue violation for "ext.wikihiero.Special"

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

Change subject: Fix styles queue violation for "ext.wikihiero.Special"
..


Fix styles queue violation for "ext.wikihiero.Special"

The same module is explicitly being loaded twice, once just the
styles, and again with the JS/messages/dependencies as well.

This is wasteful and also unsupported.

Move the two style rules to the main stylesheet and load the
proper styles module it belongs to instead.

Bug: T92459
Change-Id: I012b4d9bff5bd0379f8b9eb663d5b5dbf71f1885
---
M SpecialHieroglyphs.php
M extension.json
D modules/ext.wikihiero.Special.css
M modules/ext.wikihiero.css
4 files changed, 13 insertions(+), 13 deletions(-)

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



diff --git a/SpecialHieroglyphs.php b/SpecialHieroglyphs.php
index 9cd1971..43fdc4b 100644
--- a/SpecialHieroglyphs.php
+++ b/SpecialHieroglyphs.php
@@ -50,7 +50,7 @@
$this->setHeaders();
$out = $this->getContext()->getOutput();
$out->addModules( 'ext.wikihiero.Special' );
-   $out->addModuleStyles( 'ext.wikihiero.Special' ); // apply CSS 
during slow load
+   $out->addModuleStyles( 'ext.wikihiero' ); // apply CSS during 
slow load
$out->addWikiMsg( 'wikihiero-special-page-text', wfMessage( 
'wikihiero-help-link' )->text() );
 
$out->addHTML( '' );
diff --git a/extension.json b/extension.json
index 509e4a8..b9f2b17 100644
--- a/extension.json
+++ b/extension.json
@@ -46,7 +46,6 @@
"ext.wikihiero.Special": {
"position": "top",
"scripts": "ext.wikihiero.Special.js",
-   "styles": "ext.wikihiero.Special.css",
"dependencies": [
"jquery.spinner"
],
@@ -82,4 +81,4 @@
"ext.wikihiero.visualEditor"
],
"manifest_version": 1
-}
\ No newline at end of file
+}
diff --git a/modules/ext.wikihiero.Special.css 
b/modules/ext.wikihiero.Special.css
deleted file mode 100644
index 9f48f52..000
--- a/modules/ext.wikihiero.Special.css
+++ /dev/null
@@ -1,10 +0,0 @@
-.mw-hiero-list {
-   overflow: auto;
-   height: 400px;
-   margin-top: 1em;
-   border: 1px solid #c0c0c0;
-}
-
-.mw-hiero-toc {
-   text-align: center;
-}
diff --git a/modules/ext.wikihiero.css b/modules/ext.wikihiero.css
index b3a3c37..f91caf3 100644
--- a/modules/ext.wikihiero.css
+++ b/modules/ext.wikihiero.css
@@ -26,3 +26,14 @@
filter: FlipH;
-ms-filter: 'FlipH';
 }
+
+.mw-hiero-list {
+   overflow: auto;
+   height: 400px;
+   margin-top: 1em;
+   border: 1px solid #c0c0c0;
+}
+
+.mw-hiero-toc {
+   text-align: center;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I012b4d9bff5bd0379f8b9eb663d5b5dbf71f1885
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/wikihiero
Gerrit-Branch: wmf/1.30.0-wmf.2
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] mediawiki/core[master]: Revert "Revert "Fix the web updater""

2017-05-24 Thread Paladox (Code Review)
Hello Aaron Schulz, Bartosz Dziewoński, Chad, Reedy, TTO, Gergő Tisza, Legoktm, 
jenkins-bot, Anomie,

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

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

to review the following change.


Change subject: Revert "Revert "Fix the web updater""
..

Revert "Revert "Fix the web updater""

This reverts commit a7b9cc4946a2f7fb081f64d9230bf944736a185b.

Change-Id: I91d4b821df126703f83377dd8aff3a79b629f720
---
M includes/installer/MysqlInstaller.php
1 file changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/62/355562/1

diff --git a/includes/installer/MysqlInstaller.php 
b/includes/installer/MysqlInstaller.php
index 09051f4..4f0b66c 100644
--- a/includes/installer/MysqlInstaller.php
+++ b/includes/installer/MysqlInstaller.php
@@ -179,8 +179,8 @@
 
# Determine existing default character set
if ( $conn->tableExists( "revision", __METHOD__ ) ) {
-   $revision = $conn->buildLike( $this->getVar( 
'wgDBprefix' ) . 'revision' );
-   $res = $conn->query( "SHOW TABLE STATUS $revision", 
__METHOD__ );
+   $revision = $this->escapeLikeInternal( $this->getVar( 
'wgDBprefix' ) . 'revision', '\\' );
+   $res = $conn->query( "SHOW TABLE STATUS LIKE 
'$revision'", __METHOD__ );
$row = $conn->fetchObject( $res );
if ( !$row ) {
$this->parent->showMessage( 
'config-show-table-status' );
@@ -222,6 +222,16 @@
}
 
/**
+* @param string $s
+* @return string
+*/
+   protected function escapeLikeInternal( $s, $escapeChar = '`' ) {
+   return str_replace( [ $escapeChar, '%', '_' ],
+   [ "{$escapeChar}{$escapeChar}", "{$escapeChar}%", 
"{$escapeChar}_" ],
+   $s );
+   }
+
+   /**
 * Get a list of storage engines that are available and supported
 *
 * @return array

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91d4b821df126703f83377dd8aff3a79b629f720
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
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] apps...wikipedia[master]: Search empty view design tweaks

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

Change subject: Search empty view design tweaks
..

Search empty view design tweaks

* Make background @base80
* Increase text line-height

Bug: T137116
Change-Id: I8e3a7f9cc7096062bbba1bcf6c831d5bfa56f163
---
M app/src/main/res/layout/fragment_search_recent.xml
1 file changed, 7 insertions(+), 6 deletions(-)


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

diff --git a/app/src/main/res/layout/fragment_search_recent.xml 
b/app/src/main/res/layout/fragment_search_recent.xml
index 5ad7163..746d3cf 100644
--- a/app/src/main/res/layout/fragment_search_recent.xml
+++ b/app/src/main/res/layout/fragment_search_recent.xml
@@ -9,11 +9,11 @@
 
 
 
@@ -21,7 +21,6 @@
 android:id="@+id/search_empty_image"
 android:layout_width="150dp"
 android:layout_height="148dp"
-android:layout_gravity="center_horizontal"
 android:contentDescription="@null"
 app:srcCompat="@drawable/ic_search_splash" />
 
@@ -29,8 +28,10 @@
 android:id="@+id/search_empty_message"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
-android:layout_gravity="center_horizontal"
 android:layout_marginTop="32dp"
+android:layout_marginLeft="30dp"
+android:layout_marginRight="30dp"
+android:lineSpacingMultiplier="1.25"
 android:gravity="center"
 android:text="@string/search_empty_message"
 android:textSize="16sp" />

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e3a7f9cc7096062bbba1bcf6c831d5bfa56f163
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
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] integration/config[master]: quibble: test running the container

2017-05-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355560 )

Change subject: quibble: test running the container
..

quibble: test running the container

So we can check whether MediaWiki still get installed properly and its
phpunit test passes.  Uses vendor as a source of packages.

Change-Id: I4834b950ae07aebcd6901f3269a097bf49108895
---
M jjb/integration.yaml
1 file changed, 15 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/60/355560/1

diff --git a/jjb/integration.yaml b/jjb/integration.yaml
index 02f76df..3e4191d 100644
--- a/jjb/integration.yaml
+++ b/jjb/integration.yaml
@@ -207,8 +207,22 @@
 https://gerrit.wikimedia.org/r/p \
 integration/quibble
 - shell: |
+echo "$JOB_NAME:$(date --utc  
+'%Y%m%d%H%M%S')_build_$BUILD_NUMBER" > image_tag
+- shell: |
 cd "src/$ZUUL_PROJECT"
-docker build -t "$JOB_NAME:$(date --utc  
+'%Y%m%d%H%M%S')_build_$BUILD_NUMBER" .
+docker build -t $(cat $WORKSPACE/image_tag) .
+- shell: |
+mkdir -p ref/mediawiki
+git clone --bare https://gerrit.wikimedia.org/r/mediawiki/core 
ref/mediawiki/core.git || :
+git clone --bare https://gerrit.wikimedia.org/r/mediawiki/vendor 
ref/mediawiki/vendor.git || :
+- shell: |
+docker run --rm \
+-v `pwd`/ref:/srv/git:ro \
+-e ZUUL_URL=https://gerrit.wikimedia.org/r/p \
+-e ZUUL_BRANCH=master \
+-e ZUUL_REF=master \
+$(cat $WORKSPACE/image_tag) \
+bash -c 'service mysql start && quibble --packages-source 
vendor --workspace /workspace'
 
 - project:
 name: 'integration-quibble'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TextExtracts[master]: API: Limit maximum number of characters when `exchars` is pa...

2017-05-24 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/39 )

Change subject: API: Limit maximum number of characters when `exchars` is 
passed.
..

API: Limit maximum number of characters when `exchars` is passed.

Set the limit to 1200 characters.

Bug: T156467
Change-Id: I4e53b26a3f57f5f5cf7acbd3702c8bc4541a5eb5
---
M includes/ApiQueryExtracts.php
M tests/phpunit/ApiQueryExtractsTest.php
2 files changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php
index b839321..097739c 100644
--- a/includes/ApiQueryExtracts.php
+++ b/includes/ApiQueryExtracts.php
@@ -377,6 +377,7 @@
'chars' => [
ApiBase::PARAM_TYPE => 'integer',
ApiBase::PARAM_MIN => 1,
+   ApiBase::PARAM_MAX => 1200,
],
'sentences' => [
ApiBase::PARAM_TYPE => 'integer',
diff --git a/tests/phpunit/ApiQueryExtractsTest.php 
b/tests/phpunit/ApiQueryExtractsTest.php
index 1ab17c4..6c8d317 100644
--- a/tests/phpunit/ApiQueryExtractsTest.php
+++ b/tests/phpunit/ApiQueryExtractsTest.php
@@ -39,6 +39,9 @@
$instance = $this->newInstance();
$params = $instance->getAllowedParams();
$this->assertInternalType( 'array', $params );
+   $this->assertArrayHasKey( 'chars', $params );
+   $this->assertEquals( $params['chars'][\ApiBase::PARAM_MIN], 1 );
+   $this->assertEquals( $params['chars'][\ApiBase::PARAM_MAX], 
1200 );
$this->assertArrayHasKey( 'limit', $params );
$this->assertEquals( $params['limit'][\ApiBase::PARAM_DFLT], 20 
);
$this->assertEquals( $params['limit'][\ApiBase::PARAM_TYPE], 
'limit' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e53b26a3f57f5f5cf7acbd3702c8bc4541a5eb5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TextExtracts
Gerrit-Branch: master
Gerrit-Owner: Bmansurov 

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


[MediaWiki-commits] [Gerrit] operations...dbtree[master]: fix syntax error in index.php, extra dot

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

Change subject: fix syntax error in index.php, extra dot
..


fix syntax error in index.php, extra dot

The extra dot caused "PHP Parse error:  syntax error, unexpected ',' ".
Sorry about that, my typo and should have seen it right away.

Bug: T166267
Change-Id: I8257d93446ed893cf5189786395c0d4172861720
---
M index.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Dereckson: Looks good to me, but someone else must approve
  Dzahn: Verified; Looks good to me, approved



diff --git a/index.php b/index.php
index 66a470c..3fbb064 100644
--- a/index.php
+++ b/index.php
@@ -17,7 +17,7 @@
 # return http 503 if database connection fails to prevent
 # error pages from being cached in varnish (T163143)
 function db_fail($db_name, $db_host) {
-header($_SERVER['SERVER_PROTOCOL'] . ' Service Unavailable' . , true, 503);
+header($_SERVER['SERVER_PROTOCOL'] . ' Service Unavailable', true, 503);
 die('database connection to ' . $db_name . ' on ' . $db_host . 'failed');
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8257d93446ed893cf5189786395c0d4172861720
Gerrit-PatchSet: 3
Gerrit-Project: operations/software/dbtree
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Dzahn 

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


[MediaWiki-commits] [Gerrit] operations...dbtree[master]: fix syntax error in index.php, extra comma

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

Change subject: fix syntax error in index.php, extra comma
..

fix syntax error in index.php, extra comma

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/dbtree 
refs/changes/58/38/1

diff --git a/index.php b/index.php
index 66a470c..3fbb064 100644
--- a/index.php
+++ b/index.php
@@ -17,7 +17,7 @@
 # return http 503 if database connection fails to prevent
 # error pages from being cached in varnish (T163143)
 function db_fail($db_name, $db_host) {
-header($_SERVER['SERVER_PROTOCOL'] . ' Service Unavailable' . , true, 503);
+header($_SERVER['SERVER_PROTOCOL'] . ' Service Unavailable', true, 503);
 die('database connection to ' . $db_name . ' on ' . $db_host . 'failed');
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8257d93446ed893cf5189786395c0d4172861720
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/dbtree
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Fix the web updater"

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

Change subject: Revert "Fix the web updater"
..


Revert "Fix the web updater"

May be causing beta to break, if that's true then we are going to revert 
6519c42d248a78d2d42edee1beb21f926d227044

This reverts commit 5d56bcb925af653fed427e90a1cfb982de386720.

Change-Id: I5e9df08dc1583266bb11b52d5d68bf393e4c0fff
---
M includes/installer/MysqlInstaller.php
1 file changed, 2 insertions(+), 12 deletions(-)

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



diff --git a/includes/installer/MysqlInstaller.php 
b/includes/installer/MysqlInstaller.php
index 4f0b66c..09051f4 100644
--- a/includes/installer/MysqlInstaller.php
+++ b/includes/installer/MysqlInstaller.php
@@ -179,8 +179,8 @@
 
# Determine existing default character set
if ( $conn->tableExists( "revision", __METHOD__ ) ) {
-   $revision = $this->escapeLikeInternal( $this->getVar( 
'wgDBprefix' ) . 'revision', '\\' );
-   $res = $conn->query( "SHOW TABLE STATUS LIKE 
'$revision'", __METHOD__ );
+   $revision = $conn->buildLike( $this->getVar( 
'wgDBprefix' ) . 'revision' );
+   $res = $conn->query( "SHOW TABLE STATUS $revision", 
__METHOD__ );
$row = $conn->fetchObject( $res );
if ( !$row ) {
$this->parent->showMessage( 
'config-show-table-status' );
@@ -219,16 +219,6 @@
# just copy these two
$wgDBuser = $this->getVar( '_InstallUser' );
$wgDBpassword = $this->getVar( '_InstallPassword' );
-   }
-
-   /**
-* @param string $s
-* @return string
-*/
-   protected function escapeLikeInternal( $s, $escapeChar = '`' ) {
-   return str_replace( [ $escapeChar, '%', '_' ],
-   [ "{$escapeChar}{$escapeChar}", "{$escapeChar}%", 
"{$escapeChar}_" ],
-   $s );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e9df08dc1583266bb11b52d5d68bf393e4c0fff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
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] wikidata...gui[master]: Make abbreviateUri return longest-prefix match

2017-05-24 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/36 )

Change subject: Make abbreviateUri return longest-prefix match
..

Make abbreviateUri return longest-prefix match

This ensures that pr:, ps: etc. are abbreviated as themselves, instead
of as p:reference/ and p:statement/.

Change-Id: I2c0e783de252c89804ebd696094247650b51
---
M wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
1 file changed, 12 insertions(+), 3 deletions(-)


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

diff --git a/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js 
b/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
index 355f0a5..edd101a 100644
--- a/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
+++ b/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
@@ -303,16 +303,25 @@
SELF.prototype.abbreviateUri = function( uri ) {
var NAMESPACE_SHORTCUTS = 
wikibase.queryService.RdfNamespaces.NAMESPACE_SHORTCUTS,
nsGroup,
-   ns;
+   ns,
+   length = 0,
+   longestNs;
 
for ( nsGroup in NAMESPACE_SHORTCUTS ) {
for ( ns in NAMESPACE_SHORTCUTS[nsGroup] ) {
if ( uri.indexOf( 
NAMESPACE_SHORTCUTS[nsGroup][ns] ) === 0 ) {
-   return uri.replace( 
NAMESPACE_SHORTCUTS[nsGroup][ns], ns + ':' );
+   if ( 
NAMESPACE_SHORTCUTS[nsGroup][ns].length > length ) {
+   length = 
NAMESPACE_SHORTCUTS[nsGroup][ns].length;
+   longestNs = ns;
+   }
}
}
}
-   return '<' + uri + '>';
+   if ( longestNs ) {
+   return longestNs + ':' + uri.substr( length );
+   } else {
+   return '<' + uri + '>';
+   }
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c0e783de252c89804ebd696094247650b51
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Add rel="noopener" to many target="_blank" links

2017-05-24 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/37 )

Change subject: Add rel="noopener" to many target="_blank" links
..

Add rel="noopener" to many target="_blank" links

Without rel="noopener", the target page has access to the original
window via `window.opener` and can access and modify some properties;
for example, try running this query and clicking the result link:

SELECT ( AS ?x) WHERE {}

This commit adds rel="noopener" to many, but not all links with
target="_blank". In general, the attack surface on query.wikidata.org is
small, since there is little to be gained from impersonating the website
(it does not have, for instance, any login information that the user
might enter). Internal links don’t always need rel="noopener", since the
target can be trusted; on the other hand, this commit does add
rel="noopener" to some of them, just for consistency in the HTML with
external links that should have rel="noopener".

Change-Id: I4d5c5d6949222ea2c971395d3155e87f0d1acf36
---
M index.html
M wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
2 files changed, 16 insertions(+), 16 deletions(-)


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

diff --git a/index.html b/index.html
index ea28bea..e422d70 100644
--- a/index.html
+++ b/index.html
@@ -63,13 +63,13 @@



-   https://tools.wmflabs.org/hay/propbrowse/;> Hay's 
Properties Browser
-   https://tools.wmflabs.org/sqid/#/browse?type=properties;> SQID 
Properties Browser
-   https://angryloki.github.io/wikidata-graph-builder/;> Wikidata 
Graph Builder
+   https://tools.wmflabs.org/hay/propbrowse/;> Hay's Properties 
Browser
+   https://tools.wmflabs.org/sqid/#/browse?type=properties;> SQID 
Properties Browser
+   https://angryloki.github.io/wikidata-graph-builder/;> Wikidata 
Graph Builder

-   https://github.com/wikimedia/wikidata-query-rdf/blob/master/docs/exploring-linked-data.md;> Exploring 
Linked Data
-   https://tools.wmflabs.org/wdq2sparql/w2s.php;> WDQ Syntax 
Translator
-   https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#SPARQL_endpoint;> SPARQL REST 
Endpoint
+   https://github.com/wikimedia/wikidata-query-rdf/blob/master/docs/exploring-linked-data.md;> Exploring 
Linked Data
+   https://tools.wmflabs.org/wdq2sparql/w2s.php;> WDQ Syntax Translator
+   https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#SPARQL_endpoint;> SPARQL REST 
Endpoint



@@ -80,17 +80,17 @@



-   https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/Wikidata_Query_Help;
 data-i18n="wdqs-app-help-portal">
-   https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual; 
data-i18n="wdqs-app-help-manual">
-   https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples;
 data-i18n="wdqs-app-help-examples">
+   https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/Wikidata_Query_Help;
 data-i18n="wdqs-app-help-portal">
+   https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual; 
data-i18n="wdqs-app-help-manual">
+   https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples;
 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Show correct error msg when searching with no connection in ...

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

Change subject: Show correct error msg when searching with no connection in 
PageActivity
..


Show correct error msg when searching with no connection in PageActivity

Breaks out Page-specific behavior in a new WikiPageErrorView subclass
to avoid showing Page-specific messages in an inappropriate context.

Bug: T166155
Change-Id: I1a2c69583122e264d65d7a73b66707b39891dabc
---
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/views/WikiErrorView.java
A app/src/main/java/org/wikipedia/views/WikiPageErrorView.java
M app/src/main/res/layout/fragment_page.xml
4 files changed, 36 insertions(+), 12 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index ad0f505..8f34054 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -87,7 +87,7 @@
 import org.wikipedia.views.ObservableWebView;
 import org.wikipedia.views.SwipeRefreshLayoutWithScroll;
 import org.wikipedia.views.WikiDrawerLayout;
-import org.wikipedia.views.WikiErrorView;
+import org.wikipedia.views.WikiPageErrorView;
 
 import java.util.ArrayList;
 import java.util.Date;
@@ -169,7 +169,7 @@
 private PageToolbarHideHandler toolbarHideHandler;
 private ObservableWebView webView;
 private SwipeRefreshLayoutWithScroll refreshView;
-private WikiErrorView errorView;
+private WikiPageErrorView errorView;
 private WikiDrawerLayout tocDrawer;
 private ConfigurableTabLayout tabLayout;
 
@@ -323,7 +323,7 @@
 PageActionToolbarHideHandler pageActionToolbarHideHandler = new 
PageActionToolbarHideHandler(tabLayout);
 pageActionToolbarHideHandler.setScrollView(webView);
 
-errorView = (WikiErrorView) rootView.findViewById(R.id.page_error);
+errorView = (WikiPageErrorView) rootView.findViewById(R.id.page_error);
 
 return rootView;
 }
diff --git a/app/src/main/java/org/wikipedia/views/WikiErrorView.java 
b/app/src/main/java/org/wikipedia/views/WikiErrorView.java
index 3ab9a0b..7d35c00 100644
--- a/app/src/main/java/org/wikipedia/views/WikiErrorView.java
+++ b/app/src/main/java/org/wikipedia/views/WikiErrorView.java
@@ -15,7 +15,6 @@
 
 import org.mediawiki.api.json.ApiException;
 import org.wikipedia.R;
-import org.wikipedia.page.PageActivity;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
@@ -66,7 +65,7 @@
 
 public void setError(@Nullable Throwable caught) {
 Resources resources = getContext().getResources();
-ErrorType errorType = getErrorType(getContext(), caught);
+ErrorType errorType = getErrorType(caught);
 icon.setImageDrawable(ContextCompat.getDrawable(getContext(), 
errorType.icon()));
 errorText.setText(resources.getString(errorType.text()));
 button.setText(resources.getString(errorType.buttonText()));
@@ -76,7 +75,7 @@
 }
 }
 
-private ErrorType getErrorType(@NonNull Context context, @Nullable 
Throwable caught) {
+ErrorType getErrorType(@Nullable Throwable caught) {
 // apps-android-java-mwapi wraps all exceptions in an ApiException.  
Strip it so we get
 // useful information about the underlying cause.
 // TODO: update when the apps-android-java-mwapi dependency is dropped 
(T141127)
@@ -88,16 +87,12 @@
 return ErrorType.PAGE_MISSING;
 }
 if (caught != null && isOffline(caught)) {
-if (context instanceof PageActivity) {
-return ErrorType.PAGE_OFFLINE;
-}
 return ErrorType.OFFLINE;
 }
 return ErrorType.GENERIC;
 }
 
-
-private enum ErrorType {
+enum ErrorType {
 PAGE_MISSING(R.drawable.ic_error_black_24dp, 
R.string.error_page_does_not_exist,
 R.string.page_error_back_to_main) {
 @Nullable @Override
diff --git a/app/src/main/java/org/wikipedia/views/WikiPageErrorView.java 
b/app/src/main/java/org/wikipedia/views/WikiPageErrorView.java
new file mode 100644
index 000..f711a01
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/views/WikiPageErrorView.java
@@ -0,0 +1,29 @@
+package org.wikipedia.views;
+
+import android.content.Context;
+import android.support.annotation.Nullable;
+import android.util.AttributeSet;
+
+import static org.wikipedia.util.ThrowableUtil.isOffline;
+
+public class WikiPageErrorView extends WikiErrorView {
+
+public WikiPageErrorView(Context context) {
+super(context);
+}
+
+public WikiPageErrorView(Context context, AttributeSet attrs) {
+super(context, attrs);
+}
+
+public WikiPageErrorView(Context context, AttributeSet 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: [WIP] demos: Indicate widgets clearer by sections

2017-05-24 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/35 )

Change subject: [WIP] demos: Indicate widgets clearer by sections
..

[WIP] demos: Indicate widgets clearer by sections

Indicating different widgets clearer by sectioning them in
FieldLayouts and reordering them.

Change-Id: I2286cbab3d0ad9395787f89965f4d6d65f0c2b13
---
M demos/pages/widgets.js
1 file changed, 427 insertions(+), 397 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/55/35/1

diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 2e473f9..2ab617a 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -352,6 +352,51 @@
label: 'ButtonWidget 
(frameless, indicator)\u200E',
align: 'top'
}
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.ButtonInputWidget( {
+   label: 'Submit the form',
+   type: 'submit',
+   flags: [ 'primary', 
'progressive' ],
+   useInputTag: true
+   } ),
+   {
+   align: 'top',
+   label: 'ButtonInputWidget 
(using )\u200E'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.ButtonInputWidget( {
+   label: 'Another button',
+   type: 'button'
+   } ),
+   {
+   align: 'top',
+   label: 'ButtonInputWidget 
(using )\u200E'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.ButtonInputWidget( {
+   framed: false,
+   label: 'Another button',
+   type: 'button'
+   } ),
+   {
+   align: 'top',
+   label: 'ButtonInputWidget 
(frameless)\u200E'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.ButtonInputWidget( {
+   framed: false,
+   label: 'Another button',
+   type: 'button',
+   useInputTag: true
+   } ),
+   {
+   align: 'top',
+   label: 'ButtonInputWidget 
(frameless, using )\u200E'
+   }
)
]
} ),
@@ -524,7 +569,264 @@
]
} ),
new OO.ui.FieldsetLayout( {
-   label: 'Form widgets',
+   label: 'Inputs: TextInput, TextInput (multiline), 
SearchInput, NumberInput',
+   items: [
+   new OO.ui.FieldLayout(
+   new OO.ui.TextInputWidget( { value: 
'Text input' } ),
+   {
+   label: 'TextInputWidget\u200E',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.TextInputWidget( { icon: 
'help' } ),
+   {
+   label: 'TextInputWidget 
(icon)\u200E',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.TextInputWidget( {
+   

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Implement per-user notification blacklists

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

Change subject: Implement per-user notification blacklists
..


Implement per-user notification blacklists

- Disabled by default, is a gated preference by wg variable
- User specifies blocks in Echo preferences
- Uses a TextArea with username separated by new lines as input
- Still allows notifications to come through on a user's talk page
- Cache the blacklist and whitelist

Requested at
.

Bug: T150419
Change-Id: Ibf548da4aa600bdc7848cba1947436e56ac48a4a
---
M Hooks.php
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/ContainmentSet.php
M includes/controller/NotificationController.php
M tests/phpunit/ContainmentSetTest.php
7 files changed, 144 insertions(+), 43 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index c256093..f3cb933 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -307,7 +307,7 @@
global $wgEchoEnableEmailBatch,
$wgEchoNotifiers, $wgEchoNotificationCategories, 
$wgEchoNotifications,
$wgEchoNewMsgAlert, $wgAllowHTMLEmail, 
$wgEchoUseCrossWikiBetaFeature,
-   $wgEchoShowFooterNotice, $wgEchoCrossWikiNotifications;
+   $wgEchoShowFooterNotice, $wgEchoCrossWikiNotifications, 
$wgEchoPerUserBlacklist;
 
$attributeManager = EchoAttributeManager::newFromGlobalVars();
 
@@ -483,6 +483,14 @@
];
}
 
+   if ( $wgEchoPerUserBlacklist ) {
+   $preferences['echo-notifications-blacklist'] = [
+   'type' => 'textarea',
+   'label-message' => 
'echo-pref-notifications-blacklist',
+   'section' => 'echo/blocknotificationslist',
+   ];
+   }
+
return true;
}
 
diff --git a/extension.json b/extension.json
index 2dec0f1..68ff130 100644
--- a/extension.json
+++ b/extension.json
@@ -664,6 +664,9 @@
"EchoOnWikiBlacklist": {
"value": "Echo-blacklist"
},
+   "EchoPerUserBlacklist": {
+   "value": false
+   },
"EchoPerUserWhitelistFormat": {
"value": "%s/Echo-whitelist"
},
diff --git a/i18n/en.json b/i18n/en.json
index d5cac50..1860864 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -42,6 +42,7 @@
"prefs-echosubscriptions": "Notify me about these events",
"prefs-echocrosswiki": "Cross-wiki notifications",
"prefs-newmessageindicator": "New message indicator",
+   "prefs-blocknotificationslist": "Block list",
"echo-pref-send-me": "Send me:",
"echo-pref-send-to": "Send to:",
"echo-pref-email-format": "Email format:",
@@ -54,6 +55,7 @@
"echo-pref-email-format-html": "HTML",
"echo-pref-email-format-plain-text": "Plain text",
"echo-pref-cross-wiki-notifications": "Show notifications from other 
wikis",
+   "echo-pref-notifications-blacklist": "List of usernames that are 
blacklisted from triggering most Echo notifications (edits to your user talk 
page will still trigger notifications)",
"echo-pref-new-message-indicator": "Show talk page message indicator in 
my toolbar",
"echo-pref-beta-feature-cross-wiki-message": "Enhanced notifications",
"echo-pref-beta-feature-cross-wiki-description": "View and organize 
notifications more easily. Includes cross-wiki notifications, which lets you 
see messages from other wikis. (To receive cross-wiki notifications on a given 
wiki, you must activate the beta feature on that wiki.)",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f0afc55..baff397 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -36,6 +36,7 @@
"prefs-echosubscriptions": "Header for the section of preferences that 
deals with which notifications the user receives",
"prefs-echocrosswiki": "Header for the section of preferences that 
deals with notifications from other wikis",
"prefs-newmessageindicator": "Header for the section of preferences 
that deals with talk page message alerts",
+   "prefs-blocknotificationslist": "Header for the section of preferences 
that deals with blocking notifications from certain users",
"echo-pref-send-me": "Label for the following email delivery 
options:\n* {{msg-mw|Echo-pref-email-frequency-never}}\n* 
{{msg-mw|Echo-pref-email-frequency-immediately}} (default)\n* 
{{msg-mw|Echo-pref-email-frequency-daily}}\n* 
{{msg-mw|Echo-pref-email-frequency-weekly}}",

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Fix the web updater"

2017-05-24 Thread Paladox (Code Review)
Hello Aaron Schulz, Bartosz Dziewoński, Chad, Reedy, TTO, Gergő Tisza, Legoktm, 
jenkins-bot, Anomie,

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

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

to review the following change.


Change subject: Revert "Fix the web updater"
..

Revert "Fix the web updater"

May be causing beta to break, if that's true then we are going to revert 
6519c42d248a78d2d42edee1beb21f926d227044

This reverts commit 5d56bcb925af653fed427e90a1cfb982de386720.

Change-Id: I5e9df08dc1583266bb11b52d5d68bf393e4c0fff
---
M includes/installer/MysqlInstaller.php
1 file changed, 2 insertions(+), 12 deletions(-)


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

diff --git a/includes/installer/MysqlInstaller.php 
b/includes/installer/MysqlInstaller.php
index 4f0b66c..09051f4 100644
--- a/includes/installer/MysqlInstaller.php
+++ b/includes/installer/MysqlInstaller.php
@@ -179,8 +179,8 @@
 
# Determine existing default character set
if ( $conn->tableExists( "revision", __METHOD__ ) ) {
-   $revision = $this->escapeLikeInternal( $this->getVar( 
'wgDBprefix' ) . 'revision', '\\' );
-   $res = $conn->query( "SHOW TABLE STATUS LIKE 
'$revision'", __METHOD__ );
+   $revision = $conn->buildLike( $this->getVar( 
'wgDBprefix' ) . 'revision' );
+   $res = $conn->query( "SHOW TABLE STATUS $revision", 
__METHOD__ );
$row = $conn->fetchObject( $res );
if ( !$row ) {
$this->parent->showMessage( 
'config-show-table-status' );
@@ -219,16 +219,6 @@
# just copy these two
$wgDBuser = $this->getVar( '_InstallUser' );
$wgDBpassword = $this->getVar( '_InstallPassword' );
-   }
-
-   /**
-* @param string $s
-* @return string
-*/
-   protected function escapeLikeInternal( $s, $escapeChar = '`' ) {
-   return str_replace( [ $escapeChar, '%', '_' ],
-   [ "{$escapeChar}{$escapeChar}", "{$escapeChar}%", 
"{$escapeChar}_" ],
-   $s );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e9df08dc1583266bb11b52d5d68bf393e4c0fff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
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...BetaFeatures[master]: Add explict var and function visibility

2017-05-24 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/33 )

Change subject: Add explict var and function visibility
..

Add explict var and function visibility

Change-Id: I4f17ad5715915ca622d8e054e20130896ba6facb
---
M tests/phpunit/AutoEnrollmentTest.php
M tests/phpunit/DependentFeatureTest.php
M tests/phpunit/HooksRunTest.php
3 files changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BetaFeatures 
refs/changes/53/33/1

diff --git a/tests/phpunit/AutoEnrollmentTest.php 
b/tests/phpunit/AutoEnrollmentTest.php
index f81b2da..df3c823 100644
--- a/tests/phpunit/AutoEnrollmentTest.php
+++ b/tests/phpunit/AutoEnrollmentTest.php
@@ -26,7 +26,7 @@
 class AutoEnrollmentTest extends BetaFeaturesTestCase {
 
// Structure of testing preference
-   static $testPrefs = array(
+   public static $testPrefs = array(
'unittest-all' => array(
'label-message' => 'nullish',
'desc-message' => 'nullish',
@@ -62,7 +62,7 @@
),
);
 
-   static function hookThatRegistersPreference( $user, &$betaPrefs ) {
+   public static function hookThatRegistersPreference( $user, &$betaPrefs 
) {
foreach ( self::$testPrefs as $key => $testPref ) {
$betaPrefs[$key] = $testPref;
}
@@ -70,7 +70,7 @@
return true;
}
 
-   static function getTestData() {
+   public static function getTestData() {
return array(
array(
null,
diff --git a/tests/phpunit/DependentFeatureTest.php 
b/tests/phpunit/DependentFeatureTest.php
index fcec653..afa6518 100644
--- a/tests/phpunit/DependentFeatureTest.php
+++ b/tests/phpunit/DependentFeatureTest.php
@@ -32,7 +32,7 @@
const testDepsKey = 'DependentFeatureTestDependencyCheck';
 
// Structure of testing preference
-   static $testPref = array(
+   public static $testPref = array(
'label-message' => 'nullish',
'desc-message' => 'nullish',
'info-link' => 'http://example.org/features',
@@ -40,20 +40,20 @@
'dependent' => true,
);
 
-   static function failHook() {
+   public static function failHook() {
return false;
}
 
-   static function passHook() {
+   public static function passHook() {
return true;
}
 
-   static function hookThatRegistersPreference( $user, &$betaPrefs ) {
+   public static function hookThatRegistersPreference( $user, &$betaPrefs 
) {
$betaPrefs[self::testPrefKey] = self::$testPref;
return true;
}
 
-   static function hookThatRegistersDependency( &$depHooks ) {
+   public static function hookThatRegistersDependency( &$depHooks ) {
$depHooks[self::testPrefKey] = self::testDepsKey;
return true;
}
diff --git a/tests/phpunit/HooksRunTest.php b/tests/phpunit/HooksRunTest.php
index e07fbb6..50007b6 100644
--- a/tests/phpunit/HooksRunTest.php
+++ b/tests/phpunit/HooksRunTest.php
@@ -29,18 +29,18 @@
const testPrefKey = 'unittest';
 
// Structure of testing preference
-   static $testPref = array(
+   public static $testPref = array(
'label-message' => 'nullish',
'desc-message' => 'nullish',
'info-link' => 'http://example.org/features',
'discussion-link' => 'http://example.org/feedback',
);
 
-   static function nullHook( $user, &$betaPrefs ) {
+   public static function nullHook( $user, &$betaPrefs ) {
return true;
}
 
-   static function hookThatRegistersPreference( $user, &$betaPrefs ) {
+   public static function hookThatRegistersPreference( $user, &$betaPrefs 
) {
$betaPrefs[self::testPrefKey] = self::$testPref;
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f17ad5715915ca622d8e054e20130896ba6facb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Tweak announcement card lineSpacingMultiplier

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

Change subject: Tweak announcement card lineSpacingMultiplier
..


Tweak announcement card lineSpacingMultiplier

The line height on the announcement card is too small.  (See the latest
Zeplin mock for reference.[1])  This gives it an explicit lineSpacing-
Multiplier so the text has a little breathing room.

[1] 
https://app.zeplin.io/project/57a120b91998d8977642a238/screen/591b68c3e0c0af7b4b87bab8

Change-Id: I3778c965692b2d1b6b88958a6654a065fa5e75f4
---
M app/src/main/res/layout/view_card_announcement.xml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/app/src/main/res/layout/view_card_announcement.xml 
b/app/src/main/res/layout/view_card_announcement.xml
index a6367ee..0cfc4e6 100644
--- a/app/src/main/res/layout/view_card_announcement.xml
+++ b/app/src/main/res/layout/view_card_announcement.xml
@@ -25,6 +25,7 @@
 android:layout_marginTop="16dp"
 android:layout_marginBottom="12dp"
 android:textSize="14sp"
+android:lineSpacingMultiplier="1.21"
 tools:text="Lorem ipsum"/>
 
 https://gerrit.wikimedia.org/r/355547
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3778c965692b2d1b6b88958a6654a065fa5e75f4
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: Niedzielski 
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/dns[master]: Updating asset tag labels to correctly match the associated ...

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

Change subject: Updating asset tag labels to correctly match the associated 
servers
..


Updating asset tag labels to correctly match the associated servers

Change-Id: I7bfdf2aa8fb50c34f5c3672752ce4c8a7a80fd1f
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 22 insertions(+), 24 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index df182fc..e3ab163 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2081,29 +2081,28 @@
 95  1H  IN PTR  ms-be1039.mgmt.eqiad.wmnet.
 95  1H  IN PTR  wmf7027.mgmt.eqiad.wmnet.
 96  1H  IN PTR  analytics1058.mgmt.eqiad.wmnet.
-96  1H  IN PTR  wmf7030.mgmt.eqiad.wmnet.
+96  1H  IN PTR  wmf7082.mgmt.eqiad.wmnet.
 97  1H  IN PTR  analytics1059.mgmt.eqiad.wmnet.
-97  1H  IN PTR  wmf7031.mgmt.eqiad.wmnet.
+97  1H  IN PTR  wmf7072.mgmt.eqiad.wmnet.
 98  1H  IN PTR  analytics1060.mgmt.eqiad.wmnet.
-98  1H  IN PTR  wmf7032.mgmt.eqiad.wmnet.
+98  1H  IN PTR  wmf7073.mgmt.eqiad.wmnet.
 99  1H  IN PTR  analytics1061.mgmt.eqiad.wmnet.
-99  1H  IN PTR  wmf7033.mgmt.eqiad.wmnet.
+99  1H  IN PTR  wmf7074.mgmt.eqiad.wmnet.
 100 1H  IN PTR  analytics1062.mgmt.eqiad.wmnet.
-100 1H  IN PTR  wmf7034.mgmt.eqiad.wmnet.
+100 1H  IN PTR  wmf7075.mgmt.eqiad.wmnet.
 101 1H  IN PTR  analytics1063.mgmt.eqiad.wmnet.
-101 1H  IN PTR  wmf7035.mgmt.eqiad.wmnet.
+101 1H  IN PTR  wmf7076.mgmt.eqiad.wmnet.
 102 1H  IN PTR  analytics1064.mgmt.eqiad.wmnet.
-102 1H  IN PTR  wmf7036.mgmt.eqiad.wmnet.
+102 1H  IN PTR  wmf7077.mgmt.eqiad.wmnet.
 103 1H  IN PTR  analytics1065.mgmt.eqiad.wmnet.
-103 1H  IN PTR  wmf7037.mgmt.eqiad.wmnet.
+103 1H  IN PTR  wmf7078.mgmt.eqiad.wmnet.
 104 1H  IN PTR  analytics1066.mgmt.eqiad.wmnet.
-104 1H  IN PTR  wmf7038.mgmt.eqiad.wmnet.
+104 1H  IN PTR  wmf7079.mgmt.eqiad.wmnet.
 105 1H  IN PTR  analytics1067.mgmt.eqiad.wmnet.
-105 1H  IN PTR  wmf7039.mgmt.eqiad.wmnet.
+105 1H  IN PTR  wmf7080.mgmt.eqiad.wmnet.
 106 1H  IN PTR  analytics1068.mgmt.eqiad.wmnet.
-106 1H  IN PTR  wmf7040.mgmt.eqiad.wmnet.
+106 1H  IN PTR  wmf7081.mgmt.eqiad.wmnet.
 107 1H  IN PTR  analytics1069.mgmt.eqiad.wmnet.
-107 1H  IN PTR  wmf7041.mgmt.eqiad.wmnet.
 
 $ORIGIN 5.65.{{ zonename }}.
 
diff --git a/templates/wmnet b/templates/wmnet
index 104d122..5af1739 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -1175,29 +1175,28 @@
 analytics1056   1H  IN A10.65.4.34
 wmf4703 1H  IN A10.65.4.35
 analytics1057   1H  IN A10.65.4.35
-wmf7030 1H  IN A10.65.4.96
+wmf7082 1H  IN A10.65.4.96
 analytics1058   1H  IN A10.65.4.96
-wmf7031 1H  IN A10.65.4.97
+wmf7072 1H  IN A10.65.4.97
 analytics1059   1H  IN A10.65.4.97
-wmf7032 1H  IN A10.65.4.98
+wmf7073 1H  IN A10.65.4.98
 analytics1060   1H  IN A10.65.4.98
-wmf7033 1H  IN A10.65.4.99
+wmf7074 1H  IN A10.65.4.99
 analytics1061   1H  IN A10.65.4.99
-wmf7034 1H  IN A10.65.4.100
+wmf7075 1H  IN A10.65.4.100
 analytics1062   1H  IN A10.65.4.100
-wmf7035 1H  IN A10.65.4.101
+wmf7076 1H  IN A10.65.4.101
 analytics1063   1H  IN A10.65.4.101
-wmf7036 1H  IN A10.65.4.102
+wmf7077 1H  IN A10.65.4.102
 analytics1064   1H  IN A10.65.4.102
-wmf7037 1H  IN A10.65.4.103
+wmf7078 1H  IN A10.65.4.103
 analytics1065   1H  IN A10.65.4.103
-wmf7038 1H  IN A10.65.4.104
+wmf7079 1H  IN A10.65.4.104
 analytics1066   1H  IN A10.65.4.104
-wmf7039 1H  IN A10.65.4.105
+wmf7080 1H  IN A10.65.4.105
 analytics1067   1H  IN A10.65.4.105
-wmf7040 1H  IN A10.65.4.106
+wmf7081 1H  IN A10.65.4.106
 analytics1068   1H  IN A10.65.4.106
-wmf7041 1H  IN A10.65.4.107
 analytics1069   1H  IN A10.65.4.107
 dataset1001 1H  IN A10.65.3.85
 wmf3471 1H  IN A10.65.3.85

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7bfdf2aa8fb50c34f5c3672752ce4c8a7a80fd1f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Cmjohnson 
Gerrit-Reviewer: Cmjohnson 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Split provider configuration out of main

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

Change subject: Split provider configuration out of main
..

Split provider configuration out of main

Each gets its own dir because they'll eventually have all the settings
from DonationInterface's config directories.

This is just a transitional commit, on the way to fully splitting out a
ProviderConfiguration class from GlobalConfiguration. Eventually we'll
be able to load multiple provider configurations at the same time, so
for example we can choose a provider based on capabilities.

Change-Id: I6009e97e9875feea584c7baaa129bb3aea97ddd5
---
M Core/Configuration.php
A config/adyen/main.yaml
A config/amazon/main.yaml
A config/dlocal/main.yaml
A config/ingenico/main.yaml
M config/main.yaml
A config/paypal/main.yaml
7 files changed, 496 insertions(+), 480 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/52/32/1

diff --git a/Core/Configuration.php b/Core/Configuration.php
index 4ea30ca..d9e38ad 100644
--- a/Core/Configuration.php
+++ b/Core/Configuration.php
@@ -91,6 +91,18 @@
 
public function getDefaultSearchPath() {
$searchPath = array();
+
+   // FIXME: The whole 'view' thing is going to go away when we 
split into
+   // GlobalConfiguration and ProviderConfiguration
+   if ( $this->view !== 'default' ) {
+
+   if ( isset( $_SERVER['HOME'] ) ) {
+   $searchPath[] =  
"{$_SERVER['HOME']}/.smashpig/{$this->view}/main.yaml";
+   }
+   $searchPath[] = "/etc/smashpig/{$this->view}/main.yaml";
+   $searchPath[] = __DIR__ . 
"/../config/{$this->view}/main.yaml";
+   }
+
if ( isset( $_SERVER['HOME'] ) ) {
// FIXME: But I don't understand why this key is 
missing during testing.
$searchPath[] =  
"{$_SERVER['HOME']}/.smashpig/main.yaml";
@@ -131,18 +143,8 @@
// the sources up front than keep them distinct and search 
through them
// at runtime for the first matching key.
foreach ( array_reverse( $configs ) as $config ) {
-   if ( isset( $config['default'] ) ) {
-   $this->override( $config['default'] );
-   }
-   }
-
-   // Now, go through in the same order and let all $view sections 
override
-   // defaults.
-   if ( $this->viewName !== 'default' ) {
-   foreach ( array_reverse( $configs ) as $config ) {
-   if ( isset( $config[$this->viewName] ) ) {
-   $this->override( 
$config[$this->viewName] );
-   }
+   if ( !empty( $config ) ) {
+   $this->override( $config );
}
}
}
diff --git a/config/adyen/main.yaml b/config/adyen/main.yaml
new file mode 100644
index 000..4ca76a9
--- /dev/null
+++ b/config/adyen/main.yaml
@@ -0,0 +1,125 @@
+# Settings for Adyen
+#
+# To override, create a file in:
+#   /etc/smashpig/adyen/main.yaml
+#   $HOME/.smashpig/adyen/main.yaml
+
+logging:
+root-context: SmashPig-Adyen
+
+endpoints:
+listener:
+class: SmashPig\PaymentProviders\Adyen\AdyenListener
+
+# FIXME: let's use this node to map payment methods to classes that
+# implement doPayment (aka gateway adapters). See ingenico below.
+payment-provider:
+adyen:
+api:
+class: SmashPig\PaymentProviders\Adyen\AdyenPaymentsAPI
+
+payments-wsdl: https://pal-live.adyen.com/pal/Payment.wsdl
+#payments-wsdl: https://pal-test.adyen.com/pal/Payment.wsdl
+
+accounts: {}
+# FIXME: Provide sample account config more consistently.  The
+# empty map above is easy to overlook.
+
+# For each Adyen merchant account, add an entry like the
+# following with the merchant account name as the key.
+# The ws- credentials should be a user authorized to make
+# API calls, and the report- credentials should be a user
+# authorized to download reports. Reports will be
+# downloaded to the location specified in report-location.
+#
+# At least one account and all subkeys are required.
+#
+# example-account-name:
+#   ws-username: ""
+#   ws-password: ""
+#   report-username: ""
+#   report-password: ""
+#   report-location: "/tmp"
+
+fraud-filters:
+# Automatically capture authorizations under this score
+review-threshold: 75
+# Automatically cancel authorizations 

[MediaWiki-commits] [Gerrit] operations/dns[master]: Updating asset tag labels to correctly match the associated ...

2017-05-24 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/30 )

Change subject: Updating asset tag labels to correctly match the associated 
servers
..

Updating asset tag labels to correctly match the associated servers

Change-Id: I7bfdf2aa8fb50c34f5c3672752ce4c8a7a80fd1f
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 22 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/50/30/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index df182fc..e3ab163 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2081,29 +2081,28 @@
 95  1H  IN PTR  ms-be1039.mgmt.eqiad.wmnet.
 95  1H  IN PTR  wmf7027.mgmt.eqiad.wmnet.
 96  1H  IN PTR  analytics1058.mgmt.eqiad.wmnet.
-96  1H  IN PTR  wmf7030.mgmt.eqiad.wmnet.
+96  1H  IN PTR  wmf7082.mgmt.eqiad.wmnet.
 97  1H  IN PTR  analytics1059.mgmt.eqiad.wmnet.
-97  1H  IN PTR  wmf7031.mgmt.eqiad.wmnet.
+97  1H  IN PTR  wmf7072.mgmt.eqiad.wmnet.
 98  1H  IN PTR  analytics1060.mgmt.eqiad.wmnet.
-98  1H  IN PTR  wmf7032.mgmt.eqiad.wmnet.
+98  1H  IN PTR  wmf7073.mgmt.eqiad.wmnet.
 99  1H  IN PTR  analytics1061.mgmt.eqiad.wmnet.
-99  1H  IN PTR  wmf7033.mgmt.eqiad.wmnet.
+99  1H  IN PTR  wmf7074.mgmt.eqiad.wmnet.
 100 1H  IN PTR  analytics1062.mgmt.eqiad.wmnet.
-100 1H  IN PTR  wmf7034.mgmt.eqiad.wmnet.
+100 1H  IN PTR  wmf7075.mgmt.eqiad.wmnet.
 101 1H  IN PTR  analytics1063.mgmt.eqiad.wmnet.
-101 1H  IN PTR  wmf7035.mgmt.eqiad.wmnet.
+101 1H  IN PTR  wmf7076.mgmt.eqiad.wmnet.
 102 1H  IN PTR  analytics1064.mgmt.eqiad.wmnet.
-102 1H  IN PTR  wmf7036.mgmt.eqiad.wmnet.
+102 1H  IN PTR  wmf7077.mgmt.eqiad.wmnet.
 103 1H  IN PTR  analytics1065.mgmt.eqiad.wmnet.
-103 1H  IN PTR  wmf7037.mgmt.eqiad.wmnet.
+103 1H  IN PTR  wmf7078.mgmt.eqiad.wmnet.
 104 1H  IN PTR  analytics1066.mgmt.eqiad.wmnet.
-104 1H  IN PTR  wmf7038.mgmt.eqiad.wmnet.
+104 1H  IN PTR  wmf7079.mgmt.eqiad.wmnet.
 105 1H  IN PTR  analytics1067.mgmt.eqiad.wmnet.
-105 1H  IN PTR  wmf7039.mgmt.eqiad.wmnet.
+105 1H  IN PTR  wmf7080.mgmt.eqiad.wmnet.
 106 1H  IN PTR  analytics1068.mgmt.eqiad.wmnet.
-106 1H  IN PTR  wmf7040.mgmt.eqiad.wmnet.
+106 1H  IN PTR  wmf7081.mgmt.eqiad.wmnet.
 107 1H  IN PTR  analytics1069.mgmt.eqiad.wmnet.
-107 1H  IN PTR  wmf7041.mgmt.eqiad.wmnet.
 
 $ORIGIN 5.65.{{ zonename }}.
 
diff --git a/templates/wmnet b/templates/wmnet
index 104d122..5af1739 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -1175,29 +1175,28 @@
 analytics1056   1H  IN A10.65.4.34
 wmf4703 1H  IN A10.65.4.35
 analytics1057   1H  IN A10.65.4.35
-wmf7030 1H  IN A10.65.4.96
+wmf7082 1H  IN A10.65.4.96
 analytics1058   1H  IN A10.65.4.96
-wmf7031 1H  IN A10.65.4.97
+wmf7072 1H  IN A10.65.4.97
 analytics1059   1H  IN A10.65.4.97
-wmf7032 1H  IN A10.65.4.98
+wmf7073 1H  IN A10.65.4.98
 analytics1060   1H  IN A10.65.4.98
-wmf7033 1H  IN A10.65.4.99
+wmf7074 1H  IN A10.65.4.99
 analytics1061   1H  IN A10.65.4.99
-wmf7034 1H  IN A10.65.4.100
+wmf7075 1H  IN A10.65.4.100
 analytics1062   1H  IN A10.65.4.100
-wmf7035 1H  IN A10.65.4.101
+wmf7076 1H  IN A10.65.4.101
 analytics1063   1H  IN A10.65.4.101
-wmf7036 1H  IN A10.65.4.102
+wmf7077 1H  IN A10.65.4.102
 analytics1064   1H  IN A10.65.4.102
-wmf7037 1H  IN A10.65.4.103
+wmf7078 1H  IN A10.65.4.103
 analytics1065   1H  IN A10.65.4.103
-wmf7038 1H  IN A10.65.4.104
+wmf7079 1H  IN A10.65.4.104
 analytics1066   1H  IN A10.65.4.104
-wmf7039 1H  IN A10.65.4.105
+wmf7080 1H  IN A10.65.4.105
 analytics1067   1H  IN A10.65.4.105
-wmf7040 1H  IN A10.65.4.106
+wmf7081 1H  IN A10.65.4.106
 analytics1068   1H  IN A10.65.4.106
-wmf7041 1H  IN A10.65.4.107
 analytics1069   1H  IN A10.65.4.107
 dataset1001 1H  IN A10.65.3.85
 wmf3471 1H  IN A10.65.3.85

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

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

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

[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: Add explict var visibility

2017-05-24 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/31 )

Change subject: Add explict var visibility
..

Add explict var visibility

Change-Id: I5d04a0a85403118c98f60ccd05cbda29dee9551a
---
M includes/JCSingleton.php
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/includes/JCSingleton.php b/includes/JCSingleton.php
index f545b28..2d1276c 100644
--- a/includes/JCSingleton.php
+++ b/includes/JCSingleton.php
@@ -35,29 +35,29 @@
 * The structure is an array of array of ...:
 * { int_namespace => { name => { allows-sub-namespaces => 
configuration_array } } }
 */
-   static $titleMap = [];
+   public static $titleMap = [];
 
/**
 * @var string[]|false[] containing all the namespaces handled by 
JsonConfig
 * Maps namespace id (int) => namespace name (string).
 * If false, presumes the namespace has been registered by core or 
another extension
 */
-   static $namespaces = [];
+   public static $namespaces = [];
 
/**
 * @var MapCacheLRU[] contains a cache of recently resolved JCTitle's 
as namespace => MapCacheLRU
 */
-   static $titleMapCacheLru = [];
+   public static $titleMapCacheLru = [];
 
/**
 * @var MapCacheLRU[] contains a cache of recently requested content 
objects as namespace => MapCacheLRU
 */
-   static $mapCacheLru = [];
+   public static $mapCacheLru = [];
 
/**
 * @var TitleParser cached invariant title parser
 */
-   static $titleParser;
+   public static $titleParser;
 
/**
 * Initializes singleton state by parsing $wgJsonConfig* values

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d04a0a85403118c98f60ccd05cbda29dee9551a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...UrlShortener[master]: Add explict var visibility

2017-05-24 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355549 )

Change subject: Add explict var visibility
..

Add explict var visibility

Change-Id: Ide2b53e0d7bf3763d4e44697baeeadc7f2b059e7
---
M UrlShortener.utils.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/UrlShortener.utils.php b/UrlShortener.utils.php
index 3d69e1e..eed8b49 100755
--- a/UrlShortener.utils.php
+++ b/UrlShortener.utils.php
@@ -22,7 +22,7 @@
 */
const CACHE_TIME = 2592000;
 
-   static $decodeMap;
+   public static $decodeMap;
 
/**
 * Gets the short code for the given URL, creating if it doesn't

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide2b53e0d7bf3763d4e44697baeeadc7f2b059e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UrlShortener
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


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

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

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: I14662d1c07ce383708113e23ac9e445fca949cc3
---
M modules/contributions/base.js
M modules/engine/components/flow-undo-page.js
M modules/engine/misc/flow-handlebars.js
M modules/engine/misc/mw-ui.enhance.js
M modules/flow-initialize.js
5 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/modules/contributions/base.js b/modules/contributions/base.js
index 646464d..b56f7c0 100644
--- a/modules/contributions/base.js
+++ b/modules/contributions/base.js
@@ -25,7 +25,7 @@
);
}
 
-   $( document ).ready( function () {
+   $( function () {
$( '#bodyContent' ).one( 'click', '.flow-click-interactive', 
clickedFlowLink );
} );
 }( jQuery, mediaWiki ) );
diff --git a/modules/engine/components/flow-undo-page.js 
b/modules/engine/components/flow-undo-page.js
index c5be7e7..6e7da90 100644
--- a/modules/engine/components/flow-undo-page.js
+++ b/modules/engine/components/flow-undo-page.js
@@ -1,6 +1,6 @@
 ( function ( $, mw ) {
 
-   $( document ).ready( function () {
+   $( function () {
 
$( 'form[method=POST]' ).each( function ( index, form ) {
$( form ).submit( function () {
diff --git a/modules/engine/misc/flow-handlebars.js 
b/modules/engine/misc/flow-handlebars.js
index 623179b..4cc5d67 100644
--- a/modules/engine/misc/flow-handlebars.js
+++ b/modules/engine/misc/flow-handlebars.js
@@ -328,7 +328,7 @@
setTimeout( timestampAutoUpdate, 100 );
}
 
-   $( document ).ready( timestampAutoUpdate );
+   $( timestampAutoUpdate );
 
/**
 * Do not escape HTML string. Used as a Handlebars helper.
diff --git a/modules/engine/misc/mw-ui.enhance.js 
b/modules/engine/misc/mw-ui.enhance.js
index 7f86833..4bd603c 100644
--- a/modules/engine/misc/mw-ui.enhance.js
+++ b/modules/engine/misc/mw-ui.enhance.js
@@ -12,7 +12,7 @@
* This will make unhovered and unfocused sibling buttons become faded 
and blurred
* Usage: Buttons must be in a form, or in a parent with 
mw-ui-button-container, or they must be siblings
*/
-   $( document ).ready( function () {
+   $( function () {
function onMwUiButtonFocus( event ) {
var $el, $form, $siblings;
 
@@ -122,7 +122,7 @@
 * Disable / enable submit buttons without/with text in field.
 * Usage: field needs required attribute
 */
-   $( document ).ready( function () {
+   $( function () {
// We should probably not use this change detection method for 
VE
//
// Also, consider using the input event (which I think can 
replace all of these
@@ -147,7 +147,7 @@
 * mw-ui-tooltip
 * Renders tooltips on over, and also via mw.tooltip.
 */
-   $( document ).ready( function () {
+   $( function () {
var _$tooltip = $(
'' +
'' +
diff --git a/modules/flow-initialize.js b/modules/flow-initialize.js
index 70ec772..7a83b5b 100644
--- a/modules/flow-initialize.js
+++ b/modules/flow-initialize.js
@@ -7,7 +7,7 @@
 * Now do stuff
 * @todo not like this
 */
-   $( document ).ready( function () {
+   $( function () {
var flowBoard,
$component = $( '.flow-component' ),
$board = $( '.flow-board' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14662d1c07ce383708113e23ac9e445fca949cc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
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]: quibble: docker build it from CI

2017-05-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355548 )

Change subject: quibble: docker build it from CI
..

quibble: docker build it from CI

Reuse the integration-docker1001 to docker build integration/quibble.
I don't think it is safe to run 'docker build' using a random Dockerfile :(

Creates: integration-quibble-docker-test

Change-Id: Iaf8f1d864853eb6ff0b4984f1dc4cc6528dc9048
---
M jjb/integration.yaml
M zuul/layout.yaml
2 files changed, 34 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/48/355548/1

diff --git a/jjb/integration.yaml b/jjb/integration.yaml
index 0cd446b..29306a5 100644
--- a/jjb/integration.yaml
+++ b/jjb/integration.yaml
@@ -193,3 +193,33 @@
  - 'integration-composer-check-{phpflavor}':
  phpflavor:
  - php55
+
+- job:
+name: integration-quibble-docker-test
+node: DebianJessieDocker
+triggers:
+- zuul
+builders:
+- shell: |
+zuul-cloner --version
+zuul-cloner --color --verbose \
+--workspace src \
+https://gerrit.wikimedia.org/r/p \
+integration/quibble
+- shell: |
+cd "src/$ZUUL_PROJECT"
+docker build -t "$JOB_NAME:$BUILD_TAG" .
+publishers:
+- postbuildscript:
+builders:
+- shell: |
+docker rmi "$JOB_NAME:$BUILD_TAG" || :
+# Set both to false to ensure it always runs
+onsuccess: False
+onfailure: False
+
+- project:
+name: 'integration-quibble'
+jobs:
+- '{name}-tox-jessie'
+- 'integration-quibble-docker-test'
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 5756b34..f4c2513 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1246,6 +1246,10 @@
   - name: integration/quibble
 template:
   - name: tox-jessie
+test:
+  - integration-quibble-docker-test
+gate-and-submit:
+  - integration-quibble-docker-test
 
   - name: integration/uprightdiff
 test:

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Tweak announcement card lineSpacingMultiplier

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

Change subject: Tweak announcement card lineSpacingMultiplier
..

Tweak announcement card lineSpacingMultiplier

The line height on the announcement card is too small.  (See the latest
Zeplin mock for reference.[1])  This gives it an explicit lineSpacing-
Multiplier so the text has a little breathing room.

[1] 
https://app.zeplin.io/project/57a120b91998d8977642a238/screen/591b68c3e0c0af7b4b87bab8

Change-Id: I3778c965692b2d1b6b88958a6654a065fa5e75f4
---
M app/src/main/res/layout/view_card_announcement.xml
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/app/src/main/res/layout/view_card_announcement.xml 
b/app/src/main/res/layout/view_card_announcement.xml
index a6367ee..0cfc4e6 100644
--- a/app/src/main/res/layout/view_card_announcement.xml
+++ b/app/src/main/res/layout/view_card_announcement.xml
@@ -25,6 +25,7 @@
 android:layout_marginTop="16dp"
 android:layout_marginBottom="12dp"
 android:textSize="14sp"
+android:lineSpacingMultiplier="1.21"
 tools:text="Lorem ipsum"/>
 
 https://gerrit.wikimedia.org/r/355547
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3778c965692b2d1b6b88958a6654a065fa5e75f4
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] mediawiki...QuickSurveys[master]: Tools: Use eslint instead of jshint & jscs

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

Change subject: Tools: Use eslint instead of jshint & jscs
..


Tools: Use eslint instead of jshint & jscs

* Remove jshint & jscs
* Add eslint and eslint-config-wikimedia
* Fix linting errors under resources/

Bug: T149201
Change-Id: I2a71f4e6089a3031ed4ccc444f5d29dfc1d4158f
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
M package.json
M resources/ext.quicksurveys.init/init.js
M resources/ext.quicksurveys.lib/lib.js
M resources/ext.quicksurveys.views/ExternalSurvey.js
M resources/ext.quicksurveys.views/QuickSurvey.js
M resources/ext.quicksurveys.views/utils.js
M resources/mediawiki.template.muhogan/init.js
12 files changed, 149 insertions(+), 157 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..04ce1dc
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,14 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "mediaWiki": false,
+   "OO": false
+   },
+   "rules": {
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index a2d7b13..000
--- a/.jscsrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "preset": "wikimedia"
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 3c3629e..000
--- a/.jshintignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 1bcf554..000
--- a/.jshintrc
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-   "globals": {
-   "console": true,
-   "jQuery": true,
-   "JsDiff": true,
-   "Hogan": true,
-   "QUnit": true,
-   "mw": true,
-   "mediaWiki": true,
-   "CodeMirror": true,
-   "OO": true
-   },
-
-   "browser": true,
-   "curly": true,
-   "eqeqeq": true,
-   "forin": false,
-   "onevar": true,
-   "trailing": true,
-   "undef" : true,
-   "unused": true,
-   "supernew": true
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index aa81ab4..85342e3 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,8 +1,8 @@
-/*jshint node:true */
+/* eslint-env node */
+
 module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
+   grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
 
@@ -10,17 +10,11 @@
files: {
js: 'resources/**/*.js'
},
-   jshint: {
-   options: {
-   jshintrc: true
-   },
+   eslint: {
all: [
-   '.',
-   '!node_modules/**'
+   '!node_modules/**',
+   '<%= files.js %>'
]
-   },
-   jscs: {
-   src: '<%= files.js %>'
},
banana: {
all: 'i18n/'
@@ -40,7 +34,7 @@
}
} );
 
-   grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'jsonlint', 'banana', 
'stylelint' ] );
+   grunt.registerTask( 'lint', [ 'eslint', 'jsonlint', 'banana', 
'stylelint' ] );
grunt.registerTask( 'test', [ 'lint' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index cc231b1..033de20 100644
--- a/package.json
+++ b/package.json
@@ -5,11 +5,12 @@
 "test": "grunt test"
   },
   "devDependencies": {
+"eslint": "^3.19.0",
+"eslint-config-wikimedia": "^0.4.0",
 "grunt": "0.4.5",
-"grunt-cli": "0.1.13",
 "grunt-banana-checker": "0.4.0",
-"grunt-contrib-jshint": "1.0.0",
-"grunt-jscs": "2.8.0",
+"grunt-cli": "0.1.13",
+"grunt-eslint": "^19.0.0",
 "grunt-jsonlint": "1.0.7",
 "grunt-stylelint": "0.6.0",
 "stylelint-config-wikimedia": "0.4.1"
diff --git a/resources/ext.quicksurveys.init/init.js 
b/resources/ext.quicksurveys.init/init.js
index 4fee33a..e95914d 100644
--- a/resources/ext.quicksurveys.init/init.js
+++ b/resources/ext.quicksurveys.init/init.js
@@ -1,4 +1,4 @@
-( function ( $ ) {
+( function ( $, mw ) {
var isMainPage = mw.config.get( 'wgIsMainPage' ),
$bodyContent = $( '#bodyContent' ),
isMobileLayout = window.innerWidth <= 768,
@@ -28,4 +28,4 @@
mw.extQuickSurveys.showSurvey( $bodyContent, 

[MediaWiki-commits] [Gerrit] mediawiki...Cards[master]: Tools: Use eslint instead of jshint & jscs

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

Change subject: Tools: Use eslint instead of jshint & jscs
..


Tools: Use eslint instead of jshint & jscs

Bug: T149201
Change-Id: I9578d5669ef7f5a68e267370a522cec8051092bc
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
M package.json
M resources/CardListView.js
M resources/CardModel.js
M resources/CardView.js
M resources/CardsGateway.js
M resources/init.js
M resources/muhogan.js
12 files changed, 52 insertions(+), 65 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..1dc4bf0
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,15 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "mediaWiki": false,
+   "OO": false
+   },
+   "rules": {
+   "dot-notation": [ "error", { "allowKeywords": true } ]
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index dc37ba8..000
--- a/.jscsrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-   "preset": "wikimedia",
-   "disallowDanglingUnderscores": null
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 0ecd6aa..000
--- a/.jshintignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/**
-lib/CSS.escape/**
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 94a0d01..000
--- a/.jshintrc
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-   "globals": {
-   "console": true,
-   "jQuery": true,
-   "JsDiff": true,
-   "Hogan": true,
-   "QUnit": true,
-   "mw": true,
-   "CodeMirror": true,
-   "OO": true
-   },
-
-   "browser": true,
-   "curly": true,
-   "eqeqeq": true,
-   "forin": false,
-   "onevar": true,
-   "trailing": true,
-   "undef" : true,
-   "unused": true,
-   "supernew": true
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index 2ab9976..b2d7ca2 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,7 +1,7 @@
-/*jshint node:true */
+/* eslint-env node */
+
 module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
+   grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsduck' );
@@ -14,17 +14,11 @@
banana: {
all: 'i18n/'
},
-   jscs: {
-   src: '<%= files.js %>'
-   },
-   jshint: {
-   options: {
-   jshintrc: true
-   },
+   eslint: {
all: [
-   '.',
'!node_modules/**',
-   '!lib/CSS.escape/**'
+   '!lib/CSS.escape/**',
+   '<%= files.js %>'
]
},
jsonlint: {
@@ -64,7 +58,7 @@
}
} );
 
-   grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'jsonlint', 'banana', 
'stylelint' ] );
+   grunt.registerTask( 'lint', [ 'eslint', 'jsonlint', 'banana', 
'stylelint' ] );
grunt.registerTask( 'test', [ 'lint' ] );
grunt.registerTask( 'doc', [ 'jsduck' ] );
grunt.registerTask( 'default', 'test' );
diff --git a/package.json b/package.json
index 4bf3539..c117753 100644
--- a/package.json
+++ b/package.json
@@ -6,11 +6,14 @@
 "doc": "grunt doc"
   },
   "devDependencies": {
+"eslint": "^3.19.0",
+"eslint-config-wikimedia": "^0.4.0",
 "grunt": "0.4.5",
 "grunt-banana-checker": "0.4.0",
-"grunt-contrib-jshint": "1.0.0",
-"grunt-jscs": "2.8.0",
 "grunt-cli": "0.1.13",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-eslint": "^19.0.0",
+"grunt-jscs": "2.8.0",
 "grunt-jsduck": "^1.0.1",
 "grunt-jsonlint": "1.0.7",
 "grunt-stylelint": "0.6.0",
diff --git a/resources/CardListView.js b/resources/CardListView.js
index 2726a1b..d2ecce3 100644
--- a/resources/CardListView.js
+++ b/resources/CardListView.js
@@ -1,4 +1,4 @@
-( function ( $ ) {
+( function ( $, mw ) {
'use strict';
 
/**
@@ -34,4 +34,4 @@
CardListView.prototype.template = mw.template.get( 'ext.cards', 
'cards.muhogan' );
 
mw.cards.CardListView = CardListView;
-} )( jQuery );
+}( jQuery, mediaWiki ) );
diff --git a/resources/CardModel.js b/resources/CardModel.js
index 63797dd..ac12a4b 100644
--- a/resources/CardModel.js

[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: Tools: Use eslint instead of jshint and jscs

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

Change subject: Tools: Use eslint instead of jshint and jscs
..


Tools: Use eslint instead of jshint and jscs

Bug: T149201
Change-Id: Id4b5e4428b9f1418af57a2ad0aa0e77662664c5e
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
M package.json
6 files changed, 26 insertions(+), 50 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..04ce1dc
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,14 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "mediaWiki": false,
+   "OO": false
+   },
+   "rules": {
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 9d22e3f..000
--- a/.jscsrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-   "preset": "wikimedia"
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 3c3629e..000
--- a/.jshintignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 1122dae..000
--- a/.jshintrc
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-   "globals": {
-   "console": true,
-   "jQuery": true,
-   "JsDiff": true,
-   "QUnit": true,
-   "mw": true,
-   "OO": true,
-   "mediaWiki": true
-   },
-
-   "browser": true,
-   "bitwise": true,
-   "eqeqeq": true,
-   "es3": true,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index 106f552..ebd674b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,33 +1,20 @@
-/*jshint node:true */
+/* eslint-env node */
+
 module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
-   jshint: {
-   options: {
-   jshintrc: true
-   },
-   all: [
-   '.'
-   ]
-   },
banana: {
all: 'i18n/'
},
-   jscs: {
-   fix: {
-   options: {
-   fix: true
-   },
-   src: '<%= jshint.all %>'
-   },
-   main: {
-   src: '<%= jshint.all %>'
-   }
+   eslint: {
+   all: [
+   '!node_modules/**',
+   'resources/**/*.js'
+   ]
},
jsonlint: {
all: [
@@ -44,6 +31,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jscs:main', 'jsonlint', 
'banana', 'stylelint' ] );
+   grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 
'stylelint' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index 014d118..f021664 100644
--- a/package.json
+++ b/package.json
@@ -7,11 +7,12 @@
 "test": "grunt test"
   },
   "devDependencies": {
+"eslint": "^3.19.0",
+"eslint-config-wikimedia": "^0.4.0",
 "grunt": "0.4.5",
 "grunt-banana-checker": "0.4.0",
 "grunt-cli": "0.1.13",
-"grunt-contrib-jshint": "0.11.3",
-"grunt-jscs": "^2.5.0",
+"grunt-eslint": "^19.0.0",
 "grunt-jsonlint": "1.0.7",
 "grunt-stylelint": "0.6.0",
 "stylelint-config-wikimedia": "0.4.1"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id4b5e4428b9f1418af57a2ad0aa0e77662664c5e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: Jhernandez 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: MenuTagMultiselectWidget: Add test for 'selected' config option

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

Change subject: MenuTagMultiselectWidget: Add test for 'selected' config option
..


MenuTagMultiselectWidget: Add test for 'selected' config option

Follow-up to 40713e0f17fac2b29550bb4384e30f247460b434.

Bug: T164750
Change-Id: Ic53010616f83661f45f7da535052919df4a6ad3a
---
M tests/widgets/MenuTagMultiselectWidget.test.js
1 file changed, 33 insertions(+), 0 deletions(-)

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



diff --git a/tests/widgets/MenuTagMultiselectWidget.test.js 
b/tests/widgets/MenuTagMultiselectWidget.test.js
index 5ca904f..3d0bc15 100644
--- a/tests/widgets/MenuTagMultiselectWidget.test.js
+++ b/tests/widgets/MenuTagMultiselectWidget.test.js
@@ -40,4 +40,37 @@
'Data from allowed values is allowed'
);
} );
+
+   QUnit.test( 'selected', function ( assert ) {
+   var widget;
+
+   widget = new OO.ui.MenuTagMultiselectWidget( {
+   options: [
+   { data: 'foo', label: 'Foo' },
+   { data: 'bar', label: 'Bar' },
+   { data: 'baz', label: 'Baz' }
+   ],
+   selected: [
+   { data: 'foo', label: 'Foo' },
+   { data: 'bar', label: 'Bar' }
+   ]
+   } );
+
+   assert.deepEqual(
+   widget.getValue(),
+   [ 'foo', 'bar' ],
+   '`selected` config option is respected with preset 
options'
+   );
+
+   widget = new OO.ui.MenuTagMultiselectWidget( {
+   allowArbitrary: true,
+   selected: [ 'foo', 'bar' ]
+   } );
+
+   assert.deepEqual(
+   widget.getValue(),
+   [ 'foo', 'bar' ],
+   '`selected` config option is respected with arbitrary 
options'
+   );
+   } );
 }() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic53010616f83661f45f7da535052919df4a6ad3a
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: html2wt: Document a check in LinkHandler

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

Change subject: html2wt: Document a check in LinkHandler
..


html2wt: Document a check in LinkHandler

Change-Id: If04843fc14bafd19c920dd2d545723173450d96b
---
M lib/html2wt/LinkHandler.js
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/lib/html2wt/LinkHandler.js b/lib/html2wt/LinkHandler.js
index 4cfbc4c..b2db533 100644
--- a/lib/html2wt/LinkHandler.js
+++ b/lib/html2wt/LinkHandler.js
@@ -549,7 +549,14 @@
linkTarget = escapedTgt.linkTarget;
}
 
-   // FIXME: Is the "!target.fromsrc" check 
necessary below?
+   // If we are reusing the target from source, we 
don't
+   // need to worry about colon-escaping because 
it will
+   // be in the right form already.
+   //
+   // Trying to eliminate this check and always 
check for
+   // colon-escaping seems a bit tricky when the 
reused
+   // target has encoded entities that won't 
resolve to
+   // valid titles.
if ((!escapedTgt || !escapedTgt.invalidLink) && 
!target.fromsrc) {
linkTarget = addColonEscape(env, 
linkTarget, linkData);
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[wmf/1.30.0-wmf.2]: Properly handle batches of pages to update

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

Change subject: Properly handle batches of pages to update
..


Properly handle batches of pages to update

Using LIMIT on UPDATE/DELETE queries is unsafe when using statement-based
replication as you can't ensure the same sets of rows are updated.

Instead, select a batch of problematic page_ids, update by them, then
continue until we don't find any more to fix

Bug: T166261
Change-Id: I8a5d2989285c72450d6a48ccc12d88fdeeb3fb6f
---
M maintenance/fixProofreadIndexPagesContentModel.php
1 file changed, 12 insertions(+), 3 deletions(-)

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



diff --git a/maintenance/fixProofreadIndexPagesContentModel.php 
b/maintenance/fixProofreadIndexPagesContentModel.php
index afd3b6d..a73dd2b 100644
--- a/maintenance/fixProofreadIndexPagesContentModel.php
+++ b/maintenance/fixProofreadIndexPagesContentModel.php
@@ -50,9 +50,9 @@
$total = 0;
$namespaceId = ProofreadPage::getIndexNamespaceId();
do {
-   $dbw->update(
+   $pageIds = $dbw->selectFieldValues(
'page',
-   [ 'page_content_model' => 
CONTENT_MODEL_PROOFREAD_INDEX ],
+   'page_id',
[
'page_namespace' => $namespaceId,
'page_content_model' => 
CONTENT_MODEL_WIKITEXT
@@ -60,10 +60,19 @@
__METHOD__,
[ 'LIMIT' => $this->mBatchSize ]
);
+   if ( !$pageIds ) {
+   break;
+   }
+   $dbw->update(
+   'page',
+   [ 'page_content_model' => 
CONTENT_MODEL_PROOFREAD_INDEX ],
+   [ 'page_id' => $pageIds ],
+   __METHOD__
+   );
wfWaitForSlaves();
$total += $dbw->affectedRows();
$this->output( "$total\n" );
-   } while ( $dbw->affectedRows() > 0 );
+   } while ( true );
 
$this->output( "Update of the content model for Index: pages is 
done.\n" );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a5d2989285c72450d6a48ccc12d88fdeeb3fb6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: wmf/1.30.0-wmf.2
Gerrit-Owner: Tpt 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Add explict var visibility

2017-05-24 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355546 )

Change subject: Add explict var visibility
..

Add explict var visibility

Change-Id: I697e5d1a14aac4978717429d27cdc85f69387ea6
---
M includes/CentralAuthUser.php
M includes/CentralAuthUserArray.php
M includes/WikiSet.php
M includes/specials/SpecialWikiSets.php
4 files changed, 11 insertions(+), 10 deletions(-)


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

diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 53701a2..31cda6c 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -20,18 +20,19 @@
 * The username of the current user.
 * @var string
 */
-   /*private*/ var $mName;
-   /*private*/ var $mStateDirty = false;
-   /*private*/ var $mDelayInvalidation = 0;
+   public $mName;
+   public $mStateDirty = false;
+   public $mDelayInvalidation = 0;
 
-   var $mAttachedArray, $mEmail, $mEmailAuthenticated, $mHomeWiki, 
$mHidden, $mLocked, $mAttachedList, $mAuthenticationTimestamp;
-   var $mGroups, $mRights, $mPassword, $mAuthToken, $mSalt, $mGlobalId, 
$mFromMaster, $mIsAttached, $mRegistration, $mGlobalEditCount;
-   var $mBeingRenamed, $mBeingRenamedArray;
+   public $mAttachedArray, $mEmail, $mEmailAuthenticated, $mHomeWiki, 
$mHidden, $mLocked;
+   public $mAttachedList, $mAuthenticationTimestamp, $mGroups, $mRights, 
$mPassword, $mAuthToken;
+   public $mSalt, $mGlobalId, $mFromMaster, $mIsAttached, $mRegistration, 
$mGlobalEditCount;
+   public $mBeingRenamed, $mBeingRenamedArray;
protected $mAttachedInfo;
/** @var integer */
protected $mCasToken = 0;
 
-   static $mCacheVars = array(
+   public static $mCacheVars = array(
'mGlobalId',
'mSalt',
'mPassword',
diff --git a/includes/CentralAuthUserArray.php 
b/includes/CentralAuthUserArray.php
index c7d6f4b..bbb8d2c 100644
--- a/includes/CentralAuthUserArray.php
+++ b/includes/CentralAuthUserArray.php
@@ -12,7 +12,7 @@
 }
 
 class CentralAuthUserArrayFromResult extends UserArrayFromResult {
-   var $globalData;
+   public $globalData;
 
/**
 * @param ResultWrapper $res
diff --git a/includes/WikiSet.php b/includes/WikiSet.php
index df6e0f0..5e95377 100755
--- a/includes/WikiSet.php
+++ b/includes/WikiSet.php
@@ -13,7 +13,7 @@
// (That means you Reedy & Siebrand)
private $mVersion = self::VERSION;  // Caching purposes
 
-   static $mCacheVars = array(
+   public static $mCacheVars = array(
'mId',
'mName',
'mType',
diff --git a/includes/specials/SpecialWikiSets.php 
b/includes/specials/SpecialWikiSets.php
index f1e124c..0541d5a 100644
--- a/includes/specials/SpecialWikiSets.php
+++ b/includes/specials/SpecialWikiSets.php
@@ -13,7 +13,7 @@
 }
 
 class SpecialWikiSets extends SpecialPage {
-   var $mCanEdit;
+   public $mCanEdit;
 
public function __construct() {
parent::__construct( 'WikiSets' );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add a maintenance script for populating pp_sortkey

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

Change subject: Add a maintenance script for populating pp_sortkey
..

Add a maintenance script for populating pp_sortkey

The addition of a pp_sortkey field in T60032 necessitates an update
to old entries in the page_props table that don't have a pp_sortkey.
The script uses the pp_value as the sort key if it's numeric.

Bug: T66949
Change-Id: Id482dc73ec1963010324e51fe9273a72dd31a7f7
---
A maintenance/populatePPSortKey.php
1 file changed, 96 insertions(+), 0 deletions(-)


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

diff --git a/maintenance/populatePPSortKey.php 
b/maintenance/populatePPSortKey.php
new file mode 100644
index 000..dddc42c
--- /dev/null
+++ b/maintenance/populatePPSortKey.php
@@ -0,0 +1,96 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
+require_once __DIR__ . '/Maintenance.php';
+
+use Wikimedia\Rdbms\IDatabase;
+
+/**
+ * Usage:
+ *  PopulatePPSortKey.php
+ */
+class PopulateSortKey extends Maintenance {
+   public function __construct() {
+   parent::__construct();
+   $this->addDescription( 'Populate the pp_sortkey field' );
+   $this->setBatchSize( 100 );
+   }
+
+   public function execute() {
+   $dbw = $this->getDB( DB_MASTER );
+
+   $lastProp = NULL;
+   $lastPageValue = 0;
+
+   while ( true ) {
+   $conditions = [ 'pp_sortkey IS NULL' ];
+   if ( $lastPageValue !== 0 ) {
+   $conditions[] = 'pp_page > ' . $dbw->addQuotes( 
$lastPageValue ) . 'OR' .
+   '( pp_page = 
$lastPage AND pp_propname > $lastProp )';
+   }
+
+   $res = $dbw->select(
+   'page_props',
+   [ 'pp_propname', 'pp_page', 'pp_sortkey', 
'pp_value' ],
+   $conditions,
+   __METHOD__,
+   [ 'ORDER BY' => 'pp_page, pp_propname' ],
+   [ 'LIMIT' => $this->mBatchSize ]
+   );
+
+   if ( $res->numRows() === 0 ) {
+   break;
+   }
+
+   foreach ( $res as $row ) {
+   if ( is_numeric( $row->pp_value ) ) {
+   $dbw->update(
+   'page_props',
+   [ 'pp_sortkey' => 
$row->pp_value ],
+   [
+   'pp_page' = 
$row->pp_page,
+   'pp_propname' = 
$row->pp_propname
+   ],
+   __METHOD__
+   );
+   } else {
+   continue;
+   }
+   }
+
+   $this->output( "Updated " . $res->numRows() . " rows 
\n" );
+
+   wfWaitForSlaves();
+
+   // We need to get the last element's page ID
+   $lastPageValue = $row->pp_value;
+   // And the propname...
+   $lastProp = $row->pp_propname;
+   }
+
+   $this->output( "Done!\n" );
+   }
+}
+
+$maintClass = 'PopulateSortKey';
+require_once RUN_MAINTENANCE_IF_MAIN;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id482dc73ec1963010324e51fe9273a72dd31a7f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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...CirrusSearch[master]: php_sapi_name -> PHP_SAPI, NULL -> null

2017-05-24 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355539 )

Change subject: php_sapi_name -> PHP_SAPI, NULL -> null
..

php_sapi_name -> PHP_SAPI, NULL -> null

Change-Id: I1f8d26c0888f5d5a08bc1729c1a0cd32ae5a4ec9
---
M includes/CompletionSuggester.php
M includes/Maintenance/AnalysisConfigBuilder.php
M includes/Util.php
M maintenance/updateSuggesterIndex.php
4 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/includes/CompletionSuggester.php b/includes/CompletionSuggester.php
index 5acbd0c..9fc8bf7 100644
--- a/includes/CompletionSuggester.php
+++ b/includes/CompletionSuggester.php
@@ -480,7 +480,7 @@
private function getHardLimit() {
$limit = $this->limit + $this->offset;
$hardLimit = $this->config->get( 
'CirrusSearchCompletionSuggesterHardLimit' );
-   if ( $hardLimit === NULL ) {
+   if ( $hardLimit === null ) {
$hardLimit = 50;
}
if ( $limit > $hardLimit ) {
diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index 41395ae..19c816e 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -889,7 +889,7 @@
continue;
}
$ascii_idx = array_search( 'asciifolding_preserve', 
$value['filter'] );
-   if ( $ascii_idx !== FALSE ) {
+   if ( $ascii_idx !== false ) {
$needDedupFilter = true;
array_splice( $value['filter'], $ascii_idx + 1, 
0, ['dedup_asciifolding'] );
}
diff --git a/includes/Util.php b/includes/Util.php
index 1d3fae9..592b311 100644
--- a/includes/Util.php
+++ b/includes/Util.php
@@ -431,7 +431,7 @@
 * @return string The context the request is in. Either cli, api or web.
 */
static public function getExecutionContext() {
-   if ( php_sapi_name() === 'cli' ) {
+   if ( PHP_SAPI === 'cli' ) {
return 'cli';
} elseif ( defined( 'MW_API' ) ) {
return 'api';
diff --git a/maintenance/updateSuggesterIndex.php 
b/maintenance/updateSuggesterIndex.php
index 2307dbc..aad2631 100644
--- a/maintenance/updateSuggesterIndex.php
+++ b/maintenance/updateSuggesterIndex.php
@@ -626,7 +626,7 @@
}
}
 
-   public function log( $message, $channel = NULL ) {
+   public function log( $message, $channel = null ) {
$date = new \DateTime();
parent::output( $date->format('Y-m-d H:i:s') . " " . $message, 
$channel );
}

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Remove "" around T\\d+ in gerrit.config

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

Change subject: Gerrit: Remove "" around T\\d+ in gerrit.config
..


Gerrit: Remove "" around T\\d+ in gerrit.config

When i did a gerrit upgrade and ran this

java -jar gerrit.war init -d review_site

It removed the quotes around match = "T\\d+"

But in the puppet repo we have quotes around it so puppet
re added them back

-match = T\\d+
+match = "T\\d+"

Thats a puppet run so it added ""

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

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



diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index a13e63e..b22b005 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -182,7 +182,7 @@
 system = Bugzilla
 [trackingid "phabricator"]
 footer = Bug:
-match = "T\\d+"
+match = T\\d+
 system = Phab
 [trackingid "rt"]
 footer = RT:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Properly handle batches of pages to update

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

Change subject: Properly handle batches of pages to update
..


Properly handle batches of pages to update

Using LIMIT on UPDATE/DELETE queries is unsafe when using statement-based
replication as you can't ensure the same sets of rows are updated.

Instead, select a batch of problematic page_ids, update by them, then
continue until we don't find any more to fix

Bug: T166261
Change-Id: I8a5d2989285c72450d6a48ccc12d88fdeeb3fb6f
---
M maintenance/fixProofreadIndexPagesContentModel.php
1 file changed, 12 insertions(+), 3 deletions(-)

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



diff --git a/maintenance/fixProofreadIndexPagesContentModel.php 
b/maintenance/fixProofreadIndexPagesContentModel.php
index afd3b6d..a73dd2b 100644
--- a/maintenance/fixProofreadIndexPagesContentModel.php
+++ b/maintenance/fixProofreadIndexPagesContentModel.php
@@ -50,9 +50,9 @@
$total = 0;
$namespaceId = ProofreadPage::getIndexNamespaceId();
do {
-   $dbw->update(
+   $pageIds = $dbw->selectFieldValues(
'page',
-   [ 'page_content_model' => 
CONTENT_MODEL_PROOFREAD_INDEX ],
+   'page_id',
[
'page_namespace' => $namespaceId,
'page_content_model' => 
CONTENT_MODEL_WIKITEXT
@@ -60,10 +60,19 @@
__METHOD__,
[ 'LIMIT' => $this->mBatchSize ]
);
+   if ( !$pageIds ) {
+   break;
+   }
+   $dbw->update(
+   'page',
+   [ 'page_content_model' => 
CONTENT_MODEL_PROOFREAD_INDEX ],
+   [ 'page_id' => $pageIds ],
+   __METHOD__
+   );
wfWaitForSlaves();
$total += $dbw->affectedRows();
$this->output( "$total\n" );
-   } while ( $dbw->affectedRows() > 0 );
+   } while ( true );
 
$this->output( "Update of the content model for Index: pages is 
done.\n" );
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[wmf/1.30.0-wmf.2]: Properly handle batches of pages to update

2017-05-24 Thread Tpt (Code Review)
Tpt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355534 )

Change subject: Properly handle batches of pages to update
..

Properly handle batches of pages to update

Using LIMIT on UPDATE/DELETE queries is unsafe when using statement-based
replication as you can't ensure the same sets of rows are updated.

Instead, select a batch of problematic page_ids, update by them, then
continue until we don't find any more to fix

Bug: T166261
Change-Id: I8a5d2989285c72450d6a48ccc12d88fdeeb3fb6f
---
M maintenance/fixProofreadIndexPagesContentModel.php
1 file changed, 12 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/34/355534/1

diff --git a/maintenance/fixProofreadIndexPagesContentModel.php 
b/maintenance/fixProofreadIndexPagesContentModel.php
index afd3b6d..a73dd2b 100644
--- a/maintenance/fixProofreadIndexPagesContentModel.php
+++ b/maintenance/fixProofreadIndexPagesContentModel.php
@@ -50,9 +50,9 @@
$total = 0;
$namespaceId = ProofreadPage::getIndexNamespaceId();
do {
-   $dbw->update(
+   $pageIds = $dbw->selectFieldValues(
'page',
-   [ 'page_content_model' => 
CONTENT_MODEL_PROOFREAD_INDEX ],
+   'page_id',
[
'page_namespace' => $namespaceId,
'page_content_model' => 
CONTENT_MODEL_WIKITEXT
@@ -60,10 +60,19 @@
__METHOD__,
[ 'LIMIT' => $this->mBatchSize ]
);
+   if ( !$pageIds ) {
+   break;
+   }
+   $dbw->update(
+   'page',
+   [ 'page_content_model' => 
CONTENT_MODEL_PROOFREAD_INDEX ],
+   [ 'page_id' => $pageIds ],
+   __METHOD__
+   );
wfWaitForSlaves();
$total += $dbw->affectedRows();
$this->output( "$total\n" );
-   } while ( $dbw->affectedRows() > 0 );
+   } while ( true );
 
$this->output( "Update of the content model for Index: pages is 
done.\n" );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a5d2989285c72450d6a48ccc12d88fdeeb3fb6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: wmf/1.30.0-wmf.2
Gerrit-Owner: Tpt 
Gerrit-Reviewer: Chad 

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: eslint: Remove global "mw"

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

Change subject: eslint: Remove global "mw"
..

eslint: Remove global "mw"

Add a mapping from "mediaWiki" to "mw" in the closure.

Change-Id: Iad9449574450bced16169672f94adf88c644a554
---
M .eslintrc.json
M modules/engine/misc/flow-api.js
M modules/engine/misc/flow-eventlog.js
M modules/engine/misc/mw-ui.enhance.js
M modules/engine/misc/mw-ui.modal.js
M modules/flow-initialize.js
M modules/flow/dm/api/mw.flow.dm.APIHandler.js
M modules/flow/dm/mixins/mw.flow.dm.List.js
M modules/flow/dm/mw.flow.dm.Board.js
M modules/flow/dm/mw.flow.dm.BoardDescription.js
M modules/flow/dm/mw.flow.dm.Captcha.js
M modules/flow/dm/mw.flow.dm.Categories.js
M modules/flow/dm/mw.flow.dm.CategoryItem.js
M modules/flow/dm/mw.flow.dm.Content.js
M modules/flow/dm/mw.flow.dm.Item.js
M modules/flow/dm/mw.flow.dm.ModeratedRevisionedContent.js
M modules/flow/dm/mw.flow.dm.Post.js
M modules/flow/dm/mw.flow.dm.RevisionedContent.js
M modules/flow/dm/mw.flow.dm.System.js
M modules/flow/dm/mw.flow.dm.Topic.js
M modules/flow/dm/mw.flow.dm.js
M modules/flow/mw.flow.js
M modules/flow/ui/mw.flow.ui.CancelConfirmDialog.js
M modules/flow/ui/mw.flow.ui.Overlay.js
M modules/flow/ui/mw.flow.ui.js
M modules/flow/ui/tools/mw.flow.ui.MWEditModeTool.js
M modules/flow/ui/widgets/editor/editors/mw.flow.ui.AbstractEditorWidget.js
M modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
M modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
M modules/flow/ui/widgets/editor/mw.flow.ui.AnonWarningWidget.js
M modules/flow/ui/widgets/editor/mw.flow.ui.EditorControlsWidget.js
M modules/flow/ui/widgets/editor/mw.flow.ui.EditorSwitcherWidget.js
M modules/flow/ui/widgets/editor/mw.flow.ui.EditorWidget.js
M modules/flow/ui/widgets/mw.flow.ui.BoardDescriptionWidget.js
M modules/flow/ui/widgets/mw.flow.ui.CaptchaWidget.js
M modules/flow/ui/widgets/mw.flow.ui.CategoriesWidget.js
M modules/flow/ui/widgets/mw.flow.ui.CategoryItemWidget.js
M modules/flow/ui/widgets/mw.flow.ui.EditPostWidget.js
M modules/flow/ui/widgets/mw.flow.ui.EditTopicSummaryWidget.js
M modules/flow/ui/widgets/mw.flow.ui.NavigationWidget.js
M modules/flow/ui/widgets/mw.flow.ui.NewTopicWidget.js
M modules/flow/ui/widgets/mw.flow.ui.ReorderTopicsWidget.js
M modules/flow/ui/widgets/mw.flow.ui.ReplyWidget.js
M modules/flow/ui/widgets/mw.flow.ui.SidebarExpandWidget.js
M modules/flow/ui/widgets/mw.flow.ui.ToCWidget.js
M modules/flow/ui/widgets/mw.flow.ui.TopicMenuSelectWidget.js
M modules/flow/ui/widgets/mw.flow.ui.TopicTitleWidget.js
M modules/handlebars.js
M modules/mw.flow.Initializer.js
49 files changed, 303 insertions(+), 290 deletions(-)


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

diff --git a/.eslintrc.json b/.eslintrc.json
index e25b9c3..b6e5a0a 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -6,7 +6,6 @@
"qunit": true
},
"globals": {
-   "mw": true,
"ve": false,
"mediaWiki": false,
"OO": false,
diff --git a/modules/engine/misc/flow-api.js b/modules/engine/misc/flow-api.js
index 898b017..6bebd75 100644
--- a/modules/engine/misc/flow-api.js
+++ b/modules/engine/misc/flow-api.js
@@ -355,4 +355,4 @@
 
// Export
mw.flow.FlowApi = FlowApi;
-}( mw, jQuery ) );
+}( mediaWiki, jQuery ) );
diff --git a/modules/engine/misc/flow-eventlog.js 
b/modules/engine/misc/flow-eventlog.js
index 14e12d5..385a045 100644
--- a/modules/engine/misc/flow-eventlog.js
+++ b/modules/engine/misc/flow-eventlog.js
@@ -34,4 +34,4 @@
mw.flow.EventLog = FlowEventLog;
 
mw.flow.EventLogRegistry = FlowEventLogRegistry;
-}( mw, jQuery ) );
+}( mediaWiki, jQuery ) );
diff --git a/modules/engine/misc/mw-ui.enhance.js 
b/modules/engine/misc/mw-ui.enhance.js
index 4bd603c..0aa0193 100644
--- a/modules/engine/misc/mw-ui.enhance.js
+++ b/modules/engine/misc/mw-ui.enhance.js
@@ -2,11 +2,11 @@
  * Enhances mediawiki-ui style elements with JavaScript.
  */
 
-// Expose for the sake of tests
-mw.flow.ui.enhance = {};
-
 /** @class mw.ui.enhance */
 ( function ( mw, $ ) {
+   // Expose for the sake of tests
+   mw.flow.ui.enhance = {};
+
/*
* Reduce eye-wandering due to adjacent colorful buttons
* This will make unhovered and unfocused sibling buttons become faded 
and blurred
@@ -442,4 +442,4 @@
.on( 'mouseenter.mw-ui-enhance focus.mw-ui-enhance', 
'.flow-ui-tooltip-target', onMwUiTooltipFocus )
.on( 'mouseleave.mw-ui-enhance blur.mw-ui-enhance 
click.mw-ui-enhance', '.flow-ui-tooltip-target', onMwUiTooltipBlur );
} );
-}( mw, jQuery ) );
+}( mediaWiki, jQuery ) );
diff --git a/modules/engine/misc/mw-ui.modal.js 
b/modules/engine/misc/mw-ui.modal.js
index fe561d6..0ad7d08 100644
--- 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Rolling wikisources back to wmf.1 for now

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

Change subject: Rolling wikisources back to wmf.1 for now
..

Rolling wikisources back to wmf.1 for now

Change-Id: I445bf7b55610e616ca3fb183995a83011b673459
---
M wikiversions.json
1 file changed, 66 insertions(+), 66 deletions(-)


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

diff --git a/wikiversions.json b/wikiversions.json
index c1d0cc0..b3b2d90 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -24,7 +24,7 @@
 "angwiki": "php-1.30.0-wmf.1",
 "angwikibooks": "php-1.30.0-wmf.2",
 "angwikiquote": "php-1.30.0-wmf.2",
-"angwikisource": "php-1.30.0-wmf.2",
+"angwikisource": "php-1.30.0-wmf.1",
 "angwiktionary": "php-1.30.0-wmf.2",
 "anwiki": "php-1.30.0-wmf.1",
 "anwiktionary": "php-1.30.0-wmf.2",
@@ -39,7 +39,7 @@
 "arwikimedia": "php-1.30.0-wmf.2",
 "arwikinews": "php-1.30.0-wmf.2",
 "arwikiquote": "php-1.30.0-wmf.2",
-"arwikisource": "php-1.30.0-wmf.2",
+"arwikisource": "php-1.30.0-wmf.1",
 "arwikiversity": "php-1.30.0-wmf.2",
 "arwiktionary": "php-1.30.0-wmf.2",
 "arzwiki": "php-1.30.0-wmf.1",
@@ -49,7 +49,7 @@
 "astwiktionary": "php-1.30.0-wmf.2",
 "aswiki": "php-1.30.0-wmf.1",
 "aswikibooks": "php-1.30.0-wmf.2",
-"aswikisource": "php-1.30.0-wmf.2",
+"aswikisource": "php-1.30.0-wmf.1",
 "aswiktionary": "php-1.30.0-wmf.2",
 "auditcomwiki": "php-1.30.0-wmf.2",
 "avwiki": "php-1.30.0-wmf.1",
@@ -61,7 +61,7 @@
 "azwiki": "php-1.30.0-wmf.1",
 "azwikibooks": "php-1.30.0-wmf.2",
 "azwikiquote": "php-1.30.0-wmf.2",
-"azwikisource": "php-1.30.0-wmf.2",
+"azwikisource": "php-1.30.0-wmf.1",
 "azwiktionary": "php-1.30.0-wmf.2",
 "barwiki": "php-1.30.0-wmf.1",
 "bat_smgwiki": "php-1.30.0-wmf.1",
@@ -75,13 +75,13 @@
 "bewikibooks": "php-1.30.0-wmf.2",
 "bewikimedia": "php-1.30.0-wmf.2",
 "bewikiquote": "php-1.30.0-wmf.2",
-"bewikisource": "php-1.30.0-wmf.2",
+"bewikisource": "php-1.30.0-wmf.1",
 "bewiktionary": "php-1.30.0-wmf.2",
 "bgwiki": "php-1.30.0-wmf.1",
 "bgwikibooks": "php-1.30.0-wmf.2",
 "bgwikinews": "php-1.30.0-wmf.2",
 "bgwikiquote": "php-1.30.0-wmf.2",
-"bgwikisource": "php-1.30.0-wmf.2",
+"bgwikisource": "php-1.30.0-wmf.1",
 "bgwiktionary": "php-1.30.0-wmf.2",
 "bhwiki": "php-1.30.0-wmf.1",
 "bhwiktionary": "php-1.30.0-wmf.2",
@@ -95,7 +95,7 @@
 "bmwiktionary": "php-1.30.0-wmf.2",
 "bnwiki": "php-1.30.0-wmf.1",
 "bnwikibooks": "php-1.30.0-wmf.2",
-"bnwikisource": "php-1.30.0-wmf.2",
+"bnwikisource": "php-1.30.0-wmf.1",
 "bnwiktionary": "php-1.30.0-wmf.2",
 "boardgovcomwiki": "php-1.30.0-wmf.2",
 "boardwiki": "php-1.30.0-wmf.2",
@@ -106,13 +106,13 @@
 "brwiki": "php-1.30.0-wmf.1",
 "brwikimedia": "php-1.30.0-wmf.2",
 "brwikiquote": "php-1.30.0-wmf.2",
-"brwikisource": "php-1.30.0-wmf.2",
+"brwikisource": "php-1.30.0-wmf.1",
 "brwiktionary": "php-1.30.0-wmf.2",
 "bswiki": "php-1.30.0-wmf.1",
 "bswikibooks": "php-1.30.0-wmf.2",
 "bswikinews": "php-1.30.0-wmf.2",
 "bswikiquote": "php-1.30.0-wmf.2",
-"bswikisource": "php-1.30.0-wmf.2",
+"bswikisource": "php-1.30.0-wmf.1",
 "bswiktionary": "php-1.30.0-wmf.2",
 "bugwiki": "php-1.30.0-wmf.1",
 "bxrwiki": "php-1.30.0-wmf.1",
@@ -121,7 +121,7 @@
 "cawikimedia": "php-1.30.0-wmf.2",
 "cawikinews": "php-1.30.0-wmf.2",
 "cawikiquote": "php-1.30.0-wmf.2",
-"cawikisource": "php-1.30.0-wmf.2",
+"cawikisource": "php-1.30.0-wmf.1",
 "cawiktionary": "php-1.30.0-wmf.2",
 "cbk_zamwiki": "php-1.30.0-wmf.1",
 "cdowiki": "php-1.30.0-wmf.1",
@@ -156,7 +156,7 @@
 "cswikibooks": "php-1.30.0-wmf.2",
 "cswikinews": "php-1.30.0-wmf.2",
 "cswikiquote": "php-1.30.0-wmf.2",
-"cswikisource": "php-1.30.0-wmf.2",
+"cswikisource": "php-1.30.0-wmf.1",
 "cswikiversity": "php-1.30.0-wmf.2",
 "cswiktionary": "php-1.30.0-wmf.2",
 "cuwiki": "php-1.30.0-wmf.1",
@@ -165,18 +165,18 @@
 "cywiki": "php-1.30.0-wmf.1",
 "cywikibooks": "php-1.30.0-wmf.2",
 "cywikiquote": "php-1.30.0-wmf.2",
-"cywikisource": "php-1.30.0-wmf.2",
+"cywikisource": "php-1.30.0-wmf.1",
 "cywiktionary": "php-1.30.0-wmf.2",
 "dawiki": "php-1.30.0-wmf.1",
 "dawikibooks": "php-1.30.0-wmf.2",
 "dawikiquote": "php-1.30.0-wmf.2",
-"dawikisource": "php-1.30.0-wmf.2",
+"dawikisource": "php-1.30.0-wmf.1",
 "dawiktionary": "php-1.30.0-wmf.2",
 "dewiki": "php-1.30.0-wmf.1",
 "dewikibooks": "php-1.30.0-wmf.2",
 "dewikinews": "php-1.30.0-wmf.2",
 "dewikiquote": "php-1.30.0-wmf.2",
-"dewikisource": "php-1.30.0-wmf.2",
+"dewikisource": "php-1.30.0-wmf.1",
 "dewikiversity": "php-1.30.0-wmf.2",
 "dewikivoyage": 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add Android and iOS reading lists user surveys

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

Change subject: Add Android and iOS reading lists user surveys
..

Add Android and iOS reading lists user surveys

Bug: T164770
Bug: T165446
Bug: T166001
Change-Id: I0c6e39bedfa01c2a4249bd69f4911a835f585dcc
---
M routes/announcements.js
M spec.yaml
M test/features/announcements/announcements.js
3 files changed, 68 insertions(+), 4 deletions(-)


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

diff --git a/routes/announcements.js b/routes/announcements.js
index 87c72a2..ed1fed8 100644
--- a/routes/announcements.js
+++ b/routes/announcements.js
@@ -9,7 +9,56 @@
 const router = sUtil.router();
 
 function getEnwikiAnnouncements() {
-return [];
+return [
+{
+id: "EN0517SURVEYIOS",
+type: "survey",
+start_time: "2017-05-26T00:00:00Z",
+end_time: "2017-05-29T00:00:00Z",
+platforms: [
+"iOSApp",
+],
+text: "Hi iOS readers,Have you been using save for later? 
Help us learn more about how you are using this saved articles feature by 
taking a short survey, so that we can continue making reading lists even 
better.", // eslint-disable-line max-len
+image_url: 
"https://upload.wikimedia.org/wikipedia/commons/5/52/Reading_list_survey.png;,
+action: {
+title: "Take survey",
+url: 
"https://docs.google.com/a/wikimedia.org/forms/d/e/1FAIpQLSeAbWTd9G4GTzAHJtV55HmC6I-LC3as0zWTCneGuLyj3Z6gMw/viewform;
+},
+caption_HTML: "Hosted by a third-party service. See the https://m.wikimediafoundation.org/wiki/Mobile_User_Testing_Recruitment_Survey_Privacy_Statement\;>privacy
 statement for information on data handling.",
+countries: [
+"US",
+"CA",
+"GB",
+"IE",
+"AU",
+"NZ"
+]
+},
+{
+id: "EN0517SURVEYANDROID",
+type: "survey",
+start_time: "2017-05-26T00:00:00Z",
+end_time: "2017-05-29T00:00:00Z",
+platforms: [
+"AndroidApp"
+],
+text: "Hi Android readers,Have you been using reading 
lists? Help us learn more about how you are using them by taking a short 
survey, so that we can continue making reading lists even better.", // 
eslint-disable-line max-len
+image: 
"https://upload.wikimedia.org/wikipedia/commons/5/52/Reading_list_survey.png;,
+action: {
+title: "Take survey",
+url: 
"https://docs.google.com/a/wikimedia.org/forms/d/e/1FAIpQLSeAbWTd9G4GTzAHJtV55HmC6I-LC3as0zWTCneGuLyj3Z6gMw/viewform;
+},
+caption_HTML: "Survey powered by 3rd-party service. See https://m.wikimediafoundation.org/wiki/Mobile_User_Testing_Recruitment_Survey_Privacy_Statement\;>privacy
 statement.",
+countries: [
+"US",
+"CA",
+"GB",
+"IE",
+"AU",
+"NZ"
+]
+}
+];
 }
 
 /**
diff --git a/spec.yaml b/spec.yaml
index b795f7b..393f82b 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -85,7 +85,18 @@
 headers:
   content-type: application/json
 body:
-  announce: []
+  announce:
+- id: /.+/
+  type: /.+/
+  start_time: /.+/
+  end_time: /.+/
+  platforms: [ /.+/ ]
+  text: /.+/
+  action:
+title: /.+/
+url: /.+/
+  caption_HTML: /.+/
+  countries: [ /.+/ ]
 
   # from routes/on-this-day.js
   /{domain}/v1/feed/onthisday/{type}/{mm}/{dd}:
diff --git a/test/features/announcements/announcements.js 
b/test/features/announcements/announcements.js
index b0063bf..483a2a5 100644
--- a/test/features/announcements/announcements.js
+++ b/test/features/announcements/announcements.js
@@ -31,13 +31,17 @@
 assert.ok(elem.caption_HTML, 'caption_HTML should be 
present');
 assert.ok(elem.countries, 'countries should be present');
 });
+assert.ok(res.body.announce[0].image_url, 'image present');
+assert.ok(res.body.announce[1].image, 'image present');
 });
 });
 
-it('should return 0 surveys', () => {
+it('should return 2 surveys', () => {
 return preq.get({ uri: 
`${server.config.uri}en.wikipedia.org/v1/feed/announcements` })
 .then((res) => {
-assert.ok(res.body.announce.length === 0);
+assert.ok(res.body.announce.length === 2);
+

[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Properly handle batches of pages to update

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

Change subject: Properly handle batches of pages to update
..

Properly handle batches of pages to update

Using LIMIT on UPDATE/DELETE queries is unsafe when using statement-based
replication as you can't ensure the same sets of rows are updated.

Instead, select a batch of problematic page_ids, update by them, then
continue until we don't find any more to fix

Bug: T166261
Change-Id: I8a5d2989285c72450d6a48ccc12d88fdeeb3fb6f
---
M maintenance/fixProofreadIndexPagesContentModel.php
1 file changed, 12 insertions(+), 3 deletions(-)


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

diff --git a/maintenance/fixProofreadIndexPagesContentModel.php 
b/maintenance/fixProofreadIndexPagesContentModel.php
index afd3b6d..a73dd2b 100644
--- a/maintenance/fixProofreadIndexPagesContentModel.php
+++ b/maintenance/fixProofreadIndexPagesContentModel.php
@@ -50,9 +50,9 @@
$total = 0;
$namespaceId = ProofreadPage::getIndexNamespaceId();
do {
-   $dbw->update(
+   $pageIds = $dbw->selectFieldValues(
'page',
-   [ 'page_content_model' => 
CONTENT_MODEL_PROOFREAD_INDEX ],
+   'page_id',
[
'page_namespace' => $namespaceId,
'page_content_model' => 
CONTENT_MODEL_WIKITEXT
@@ -60,10 +60,19 @@
__METHOD__,
[ 'LIMIT' => $this->mBatchSize ]
);
+   if ( !$pageIds ) {
+   break;
+   }
+   $dbw->update(
+   'page',
+   [ 'page_content_model' => 
CONTENT_MODEL_PROOFREAD_INDEX ],
+   [ 'page_id' => $pageIds ],
+   __METHOD__
+   );
wfWaitForSlaves();
$total += $dbw->affectedRows();
$this->output( "$total\n" );
-   } while ( $dbw->affectedRows() > 0 );
+   } while ( true );
 
$this->output( "Update of the content model for Index: pages is 
done.\n" );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a5d2989285c72450d6a48ccc12d88fdeeb3fb6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] mediawiki...SpamBlacklist[master]: NULL -> null

2017-05-24 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355517 )

Change subject: NULL -> null
..

NULL -> null

Change-Id: Ie341d0c10b488cd10bf3172f67d6fd4ae45773c2
---
M api/ApiSpamBlacklist.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/api/ApiSpamBlacklist.php b/api/ApiSpamBlacklist.php
index eb468a4..43903fd 100644
--- a/api/ApiSpamBlacklist.php
+++ b/api/ApiSpamBlacklist.php
@@ -32,7 +32,7 @@
 
public function execute() {
$params = $this->extractRequestParams();
-   $matches = BaseBlacklist::getInstance( 'spam' )->filter( 
$params['url'], NULL, true );
+   $matches = BaseBlacklist::getInstance( 'spam' )->filter( 
$params['url'], null, true );
$res = $this->getResult();
 
if ( $matches !== false ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie341d0c10b488cd10bf3172f67d6fd4ae45773c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: DHCP/partman: Add DHCP and partman entries for ores200[1-9]

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

Change subject: DHCP/partman: Add DHCP and partman entries for ores200[1-9]
..


DHCP/partman: Add DHCP and partman entries for ores200[1-9]

Bug:T165170
Change-Id: I2bca295a6baf0fbbe588be6e8fc00d5ea36ebbf1
---
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 46 insertions(+), 0 deletions(-)

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 db36a29..4cba8ca 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -130,6 +130,7 @@
 netmon100*) echo partman/lvm-ext-srv.cfg ;; \
 labservices1001|labservices1002|radium|silver|uranium) echo 
partman/raid1.cfg ;; \
 osm-cp*) echo partman/mw.cfg ;; \
+ores200[1-9]) echo partman/raid1-lvm-ext4-srv-noswap.cfg;; \
 oresrdb2001) echo partman/lvm-ext-srv.cfg virtual.cfg;; \
 pc100[4-6]|pc200[4-6]) echo partman/raid0-lvm-srv.cfg ;; \
 poolcounter1001) echo partman/flat.cfg virtual.cfg ;; \
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 2461d17..936bf75 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -5562,6 +5562,51 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host ores2001 {
+hardware ethernet 18:66:DA:A7:40:5F;
+fixed-address ores2001.codfw.wmnet;
+}
+
+host ores2002 {
+hardware ethernet 18:66:DA:A2:B7:C0;
+fixed-address ores2002.codfw.wmnet;
+}
+
+host ores2003 {
+hardware ethernet 18:66:DA:A7:36:E1;
+fixed-address ores2003.codfw.wmnet;
+}
+
+host ores2004 {
+hardware ethernet 18:66:DA:A7:42:D5;
+fixed-address ores2004.codfw.wmnet;
+}
+
+host ores2005 {
+hardware ethernet 18:66:DA:A7:6B:C3;
+fixed-address ores2005.codfw.wmnet;
+}
+
+host ores2006 {
+hardware ethernet 18:66:DA:A6:02:52;
+fixed-address ores2006.codfw.wmnet;
+}
+
+host ores2007 {
+hardware ethernet 18:66:DA:A7:43:35;
+fixed-address ores2007.codfw.wmnet;
+}
+
+host ores2008 {
+hardware ethernet 18:66:DA:A7:80:EC;
+fixed-address ores2008.codfw.wmnet;
+}
+
+host ores2009 {
+hardware ethernet 18:66:DA:A7:2A:1B;
+fixed-address ores2009.codfw.wmnet;
+}
+
 host oresrdb1001{
 hardware ethernet C8:1F:66:BF:71:72;
 fixed-address oresrdb1001.eqiad.wmnet;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2bca295a6baf0fbbe588be6e8fc00d5ea36ebbf1
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Alexandros Kosiaris 
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] wikimedia...SmashPig[master]: Smashpig has a config directory, not just one big file

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

Change subject: Smashpig has a config directory, not just one big file
..

Smashpig has a config directory, not just one big file

DEPLOY NOTE: TOTALLY CHANGES SETTINGS LOCATION!

We're going to need to put lots more settings in here. Let's use a
main file for the global configuration and gateway subdirectories
for their settings. Look to process-control's global/job config classes.

Change-Id: I86dcee817afed41a906ec9c58097535b32a11762
---
M Core/Configuration.php
M README
M Tests/TestingConfiguration.php
R config/main.yaml
4 files changed, 9 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/06/355506/1

diff --git a/Core/Configuration.php b/Core/Configuration.php
index f499aa6..4ea30ca 100644
--- a/Core/Configuration.php
+++ b/Core/Configuration.php
@@ -93,11 +93,10 @@
$searchPath = array();
if ( isset( $_SERVER['HOME'] ) ) {
// FIXME: But I don't understand why this key is 
missing during testing.
-   $searchPath[] =  
"{$_SERVER['HOME']}/.fundraising/SmashPig.yaml";
+   $searchPath[] =  
"{$_SERVER['HOME']}/.smashpig/main.yaml";
}
-   $searchPath[] = '/etc/fundraising/SmashPig.d/*.yaml';
-   $searchPath[] = '/etc/fundraising/SmashPig.yaml';
-   $searchPath[] = __DIR__ . "/../SmashPig.yaml";
+   $searchPath[] = '/etc/smashpig/main.yaml';
+   $searchPath[] = __DIR__ . '/../config/main.yaml';
return $searchPath;
}
 
diff --git a/README b/README
index d6cdb49..3b23a55 100644
--- a/README
+++ b/README
@@ -1,9 +1,9 @@
 This project uses Composer [https://getcomposer.org] to manage dependencies.
 Upon first install and any upgrade please run composer install.
 
-Default configuration values are located in SmashPig.yaml. These are
-overridden by values in /etc/fundraising/SmashPig.yaml, then by values in
-~/.fundraising/SmashPig.yaml.
+Default configuration values are located in config/main.yaml. These are
+overridden by values in /etc/smashpig/main.yaml, then by values in
+~/.smashpig/main.yaml.
 
 Command-line maintenance scripts have some common options:
 --help
diff --git a/Tests/TestingConfiguration.php b/Tests/TestingConfiguration.php
index 0364e53..fa9798e 100644
--- a/Tests/TestingConfiguration.php
+++ b/Tests/TestingConfiguration.php
@@ -16,7 +16,7 @@
 */
public function getDefaultSearchPath() {
$searchPath = array(
-   __DIR__ . "/../SmashPig.yaml",
+   __DIR__ . "/../config/main.yaml",
);
return $searchPath;
}
diff --git a/SmashPig.yaml b/config/main.yaml
similarity index 98%
rename from SmashPig.yaml
rename to config/main.yaml
index 920ca3b..fa19ea9 100644
--- a/SmashPig.yaml
+++ b/config/main.yaml
@@ -1,7 +1,7 @@
 # Default values will be loaded at a lower priority than custom config.
 # To override, create a file in:
-#   /etc/fundraising/SmashPig.yaml
-#   $HOME/.fundraising/SmashPig.yaml
+#   /etc/smashpig/main.yaml
+#   $HOME/.smashpig/main.yaml
 #   or edit this file if you're feeling cheeky, and be careful when upgrading.
 
 default:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86dcee817afed41a906ec9c58097535b32a11762
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: DHCP/partman: Add DHCP and partman entries for ores200[1-9]

2017-05-24 Thread Papaul (Code Review)
Papaul has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355501 )

Change subject: DHCP/partman: Add DHCP and partman entries for ores200[1-9]
..

DHCP/partman: Add DHCP and partman entries for ores200[1-9]

Bug:T165170
Change-Id: I2bca295a6baf0fbbe588be6e8fc00d5ea36ebbf1
---
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 46 insertions(+), 0 deletions(-)


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

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index db36a29..4cba8ca 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -130,6 +130,7 @@
 netmon100*) echo partman/lvm-ext-srv.cfg ;; \
 labservices1001|labservices1002|radium|silver|uranium) echo 
partman/raid1.cfg ;; \
 osm-cp*) echo partman/mw.cfg ;; \
+ores200[1-9]) echo partman/raid1-lvm-ext4-srv-noswap.cfg;; \
 oresrdb2001) echo partman/lvm-ext-srv.cfg virtual.cfg;; \
 pc100[4-6]|pc200[4-6]) echo partman/raid0-lvm-srv.cfg ;; \
 poolcounter1001) echo partman/flat.cfg virtual.cfg ;; \
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 2461d17..936bf75 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -5562,6 +5562,51 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host ores2001 {
+hardware ethernet 18:66:DA:A7:40:5F;
+fixed-address ores2001.codfw.wmnet;
+}
+
+host ores2002 {
+hardware ethernet 18:66:DA:A2:B7:C0;
+fixed-address ores2002.codfw.wmnet;
+}
+
+host ores2003 {
+hardware ethernet 18:66:DA:A7:36:E1;
+fixed-address ores2003.codfw.wmnet;
+}
+
+host ores2004 {
+hardware ethernet 18:66:DA:A7:42:D5;
+fixed-address ores2004.codfw.wmnet;
+}
+
+host ores2005 {
+hardware ethernet 18:66:DA:A7:6B:C3;
+fixed-address ores2005.codfw.wmnet;
+}
+
+host ores2006 {
+hardware ethernet 18:66:DA:A6:02:52;
+fixed-address ores2006.codfw.wmnet;
+}
+
+host ores2007 {
+hardware ethernet 18:66:DA:A7:43:35;
+fixed-address ores2007.codfw.wmnet;
+}
+
+host ores2008 {
+hardware ethernet 18:66:DA:A7:80:EC;
+fixed-address ores2008.codfw.wmnet;
+}
+
+host ores2009 {
+hardware ethernet 18:66:DA:A7:2A:1B;
+fixed-address ores2009.codfw.wmnet;
+}
+
 host oresrdb1001{
 hardware ethernet C8:1F:66:BF:71:72;
 fixed-address oresrdb1001.eqiad.wmnet;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[wmf/1.30.0-wmf.2]: Disable stats collection for maintenance scripts.

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

Change subject: Disable stats collection for maintenance scripts.
..

Disable stats collection for maintenance scripts.

Some long scripts collect tons of useless stats which makes them very slow,
also maintenance stats are probably not the stats we're generally after.

Bug: T165203
Change-Id: Icb9e3d7c45ff6d2dd00c23eac926c312b48f325e
---
M includes/Maintenance/Maintenance.php
1 file changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/includes/Maintenance/Maintenance.php 
b/includes/Maintenance/Maintenance.php
index 11fe094..33a71f8 100644
--- a/includes/Maintenance/Maintenance.php
+++ b/includes/Maintenance/Maintenance.php
@@ -6,6 +6,7 @@
 use CirrusSearch\SearchConfig;
 use MediaWiki\MediaWikiServices;
 use CirrusSearch\UserTesting;
+use MediaWiki\Services\CannotReplaceActiveServiceException;
 
 /**
  * Cirrus helpful extensions to Maintenance.
@@ -202,5 +203,15 @@
// Don't skew the dashboards by logging these requests to
// the global request log.
$wgCirrusSearchLogElasticRequests = false;
+   // Disable statsd data collection.
+   try {
+   $services = \MediaWiki\MediaWikiServices::getInstance();
+   $services->redefineService( "StatsdDataFactory",
+   function ( MediaWikiServices $services ) {
+   return new \NullStatsdDataFactory();
+   } );
+   } catch ( CannotReplaceActiveServiceException $e ) {
+   // ignore it, failing to disable stats is tolerable
+   }
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb9e3d7c45ff6d2dd00c23eac926c312b48f325e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.30.0-wmf.2
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Disable stats collection for maintenance scripts.

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

Change subject: Disable stats collection for maintenance scripts.
..


Disable stats collection for maintenance scripts.

Some long scripts collect tons of useless stats which makes them very slow,
also maintenance stats are probably not the stats we're generally after.

Bug: T165203
Change-Id: Icb9e3d7c45ff6d2dd00c23eac926c312b48f325e
---
M includes/Maintenance/Maintenance.php
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/includes/Maintenance/Maintenance.php 
b/includes/Maintenance/Maintenance.php
index 11fe094..33a71f8 100644
--- a/includes/Maintenance/Maintenance.php
+++ b/includes/Maintenance/Maintenance.php
@@ -6,6 +6,7 @@
 use CirrusSearch\SearchConfig;
 use MediaWiki\MediaWikiServices;
 use CirrusSearch\UserTesting;
+use MediaWiki\Services\CannotReplaceActiveServiceException;
 
 /**
  * Cirrus helpful extensions to Maintenance.
@@ -202,5 +203,15 @@
// Don't skew the dashboards by logging these requests to
// the global request log.
$wgCirrusSearchLogElasticRequests = false;
+   // Disable statsd data collection.
+   try {
+   $services = \MediaWiki\MediaWikiServices::getInstance();
+   $services->redefineService( "StatsdDataFactory",
+   function ( MediaWikiServices $services ) {
+   return new \NullStatsdDataFactory();
+   } );
+   } catch ( CannotReplaceActiveServiceException $e ) {
+   // ignore it, failing to disable stats is tolerable
+   }
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: scap clean: Some docs, minor pylint fixes

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

Change subject: scap clean: Some docs, minor pylint fixes
..


scap clean: Some docs, minor pylint fixes

Change-Id: Ie1e78b18b0995798e3f6d064fc81f1bff529177c
---
M scap/plugins/clean.py
1 file changed, 29 insertions(+), 12 deletions(-)

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



diff --git a/scap/plugins/clean.py b/scap/plugins/clean.py
index c99ecf6..0ef8714 100644
--- a/scap/plugins/clean.py
+++ b/scap/plugins/clean.py
@@ -1,5 +1,10 @@
+# -*- coding: utf-8 -*-
+"""
+scap.plugins.clean
+~~
+For cleaning up old MediaWiki
+"""
 import os
-import socket
 import subprocess
 
 import scap.cli as cli
@@ -58,6 +63,16 @@
 self.cleanup_branch(self.arguments.branch, self.arguments.delete)
 
 def cleanup_branch(self, branch, delete):
+"""
+Given a branch, go through the cleanup proccess
+
+(1) Prune git branches [if deletion]
+(2) Remove l10nupdate cache
+(3) Remove l10n cache
+(4) Remove files [either all, or keeping static + git]
+(4.1) From master
+(4.2) Then targets
+"""
 stage_dir = os.path.join(self.config['stage_dir'], 'php-%s' % branch)
 deploy_dir = os.path.join(self.config['deploy_dir'], 'php-%s' % branch)
 
@@ -97,14 +112,14 @@
 )
 
 # Update active master (passive gets it on next sync)
-master_command = ' '.join(self.clean_command(stage_dir, delete))
+master_command = ' '.join(clean_command(stage_dir, delete))
 subprocess.check_call(master_command, shell=True)
 
 # Update apaches
 self.execute_remote(
 'clean-apaches',
 self._get_target_list(),
-self.clean_command(deploy_dir, delete)
+clean_command(deploy_dir, delete)
 )
 
 announce = 'Pruned MediaWiki: %s' % branch
@@ -119,16 +134,18 @@
 clean_job = ssh.Job(targets, user=self.config['ssh_user'])
 clean_job.shuffle()
 clean_job.command(command)
-clean_job.progress(log.reporter(description,
-   self.config['fancy_progress']))
+clean_job.progress(
+log.reporter(description, self.config['fancy_progress']))
 succeeded, failed = clean_job.run()
 if failed:
 self.get_logger().warning('%d had clean errors', failed)
 
-def clean_command(self, path, delete):
-regex = '".*\.?(%s)$"' % ('|'.join(DELETABLE_TYPES))
-if delete:
-return ['rm', '-fR', path]
-else:
-return ['find', path, '-type', 'f', '-regextype', 'posix-extended',
-'-regex', regex, '-delete']
+
+def clean_command(path, delete):
+"""Generate a command depending on where we are and what we're doing"""
+regex = '".*\.?(%s)$"' % ('|'.join(DELETABLE_TYPES))
+if delete:
+return ['rm', '-fR', path]
+else:
+return ['find', path, '-type', 'f', '-regextype', 'posix-extended',
+'-regex', regex, '-delete']

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1e78b18b0995798e3f6d064fc81f1bff529177c
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
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...Flow[master]: Replace $( document ).ready( ... ) by $( ... )

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

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: I14662d1c07ce383708113e23ac9e445fca949cc3
---
M modules/contributions/base.js
M modules/engine/components/flow-undo-page.js
M modules/engine/misc/flow-handlebars.js
M modules/engine/misc/mw-ui.enhance.js
M modules/flow-initialize.js
5 files changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/modules/contributions/base.js b/modules/contributions/base.js
index 646464d..b56f7c0 100644
--- a/modules/contributions/base.js
+++ b/modules/contributions/base.js
@@ -25,7 +25,7 @@
);
}
 
-   $( document ).ready( function () {
+   $( function () {
$( '#bodyContent' ).one( 'click', '.flow-click-interactive', 
clickedFlowLink );
} );
 }( jQuery, mediaWiki ) );
diff --git a/modules/engine/components/flow-undo-page.js 
b/modules/engine/components/flow-undo-page.js
index c5be7e7..6e7da90 100644
--- a/modules/engine/components/flow-undo-page.js
+++ b/modules/engine/components/flow-undo-page.js
@@ -1,6 +1,6 @@
 ( function ( $, mw ) {
 
-   $( document ).ready( function () {
+   $( function () {
 
$( 'form[method=POST]' ).each( function ( index, form ) {
$( form ).submit( function () {
diff --git a/modules/engine/misc/flow-handlebars.js 
b/modules/engine/misc/flow-handlebars.js
index 623179b..4cc5d67 100644
--- a/modules/engine/misc/flow-handlebars.js
+++ b/modules/engine/misc/flow-handlebars.js
@@ -328,7 +328,7 @@
setTimeout( timestampAutoUpdate, 100 );
}
 
-   $( document ).ready( timestampAutoUpdate );
+   $( timestampAutoUpdate );
 
/**
 * Do not escape HTML string. Used as a Handlebars helper.
diff --git a/modules/engine/misc/mw-ui.enhance.js 
b/modules/engine/misc/mw-ui.enhance.js
index 7f86833..4bd603c 100644
--- a/modules/engine/misc/mw-ui.enhance.js
+++ b/modules/engine/misc/mw-ui.enhance.js
@@ -12,7 +12,7 @@
* This will make unhovered and unfocused sibling buttons become faded 
and blurred
* Usage: Buttons must be in a form, or in a parent with 
mw-ui-button-container, or they must be siblings
*/
-   $( document ).ready( function () {
+   $( function () {
function onMwUiButtonFocus( event ) {
var $el, $form, $siblings;
 
@@ -122,7 +122,7 @@
 * Disable / enable submit buttons without/with text in field.
 * Usage: field needs required attribute
 */
-   $( document ).ready( function () {
+   $( function () {
// We should probably not use this change detection method for 
VE
//
// Also, consider using the input event (which I think can 
replace all of these
@@ -147,7 +147,7 @@
 * mw-ui-tooltip
 * Renders tooltips on over, and also via mw.tooltip.
 */
-   $( document ).ready( function () {
+   $( function () {
var _$tooltip = $(
'' +
'' +
diff --git a/modules/flow-initialize.js b/modules/flow-initialize.js
index 70ec772..7a83b5b 100644
--- a/modules/flow-initialize.js
+++ b/modules/flow-initialize.js
@@ -7,7 +7,7 @@
 * Now do stuff
 * @todo not like this
 */
-   $( document ).ready( function () {
+   $( function () {
var flowBoard,
$component = $( '.flow-component' ),
$board = $( '.flow-board' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14662d1c07ce383708113e23ac9e445fca949cc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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] operations/dns[master]: Adding mgmt dns for new parsoid wtp125-1048 T165520

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

Change subject: Adding mgmt dns for new parsoid wtp125-1048 T165520
..


Adding mgmt dns for new parsoid wtp125-1048 T165520

Change-Id: Id881a42da8438d32062c089c21b044e97d13258b
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 96 insertions(+), 0 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index dee1570..df182fc 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -2164,6 +2164,54 @@
 36  1H  IN PTR  wmf7010.mgmt.eqiad.wmnet.
 37  1H  IN PTR  netmon1002.mgmt.eqiad.wmnet.
 37  1H  IN PTR  wmf7042.mgmt.eqiad.wmnet.
+38  1H  IN PTR  wtp1025.mgmt.eqiad.wmnet.
+38  1H  IN PTR  wmf7044.mgmt.eqiad.wmnet.
+39  1H  IN PTR  wtp1026.mgmt.eqiad.wmnet.
+39  1H  IN PTR  wmf7045.mgmt.eqiad.wmnet.
+40  1H  IN PTR  wtp1027.mgmt.eqiad.wmnet.
+40  1H  IN PTR  wmf7046.mgmt.eqiad.wmnet.
+41  1H  IN PTR  wtp1028.mgmt.eqiad.wmnet.
+41  1H  IN PTR  wmf7047.mgmt.eqiad.wmnet.
+42  1H  IN PTR  wtp1029.mgmt.eqiad.wmnet.
+42  1H  IN PTR  wmf7048.mgmt.eqiad.wmnet.
+43  1H  IN PTR  wtp1030.mgmt.eqiad.wmnet.
+43  1H  IN PTR  wmf7049.mgmt.eqiad.wmnet.
+44  1H  IN PTR  wtp1031.mgmt.eqiad.wmnet.
+44  1H  IN PTR  wmf7050.mgmt.eqiad.wmnet.
+45  1H  IN PTR  wtp1032.mgmt.eqiad.wmnet.
+45  1H  IN PTR  wmf7051.mgmt.eqiad.wmnet.
+46  1H  IN PTR  wtp1033.mgmt.eqiad.wmnet.
+46  1H  IN PTR  wmf7052.mgmt.eqiad.wmnet.
+47  1H  IN PTR  wtp1034.mgmt.eqiad.wmnet.
+47  1H  IN PTR  wmf7053.mgmt.eqiad.wmnet.
+48  1H  IN PTR  wtp1035.mgmt.eqiad.wmnet.
+48  1H  IN PTR  wmf7054.mgmt.eqiad.wmnet.
+49  1H  IN PTR  wtp1036.mgmt.eqiad.wmnet.
+49  1H  IN PTR  wmf7055.mgmt.eqiad.wmnet.
+50  1H  IN PTR  wtp1037.mgmt.eqiad.wmnet.
+50  1H  IN PTR  wmf7056.mgmt.eqiad.wmnet.
+51  1H  IN PTR  wtp1038.mgmt.eqiad.wmnet.
+51  1H  IN PTR  wmf7057.mgmt.eqiad.wmnet.
+52  1H  IN PTR  wtp1039.mgmt.eqiad.wmnet.
+52  1H  IN PTR  wmf7058.mgmt.eqiad.wmnet.
+53  1H  IN PTR  wtp1040.mgmt.eqiad.wmnet.
+53  1H  IN PTR  wmf7059.mgmt.eqiad.wmnet.
+54  1H  IN PTR  wtp1041.mgmt.eqiad.wmnet.
+54  1H  IN PTR  wmf7060.mgmt.eqiad.wmnet.
+55  1H  IN PTR  wtp1042.mgmt.eqiad.wmnet.
+55  1H  IN PTR  wmf7061.mgmt.eqiad.wmnet.
+56  1H  IN PTR  wtp1043.mgmt.eqiad.wmnet.
+56  1H  IN PTR  wmf7062.mgmt.eqiad.wmnet.
+57  1H  IN PTR  wtp1044.mgmt.eqiad.wmnet.
+57  1H  IN PTR  wmf7063.mgmt.eqiad.wmnet.
+58  1H  IN PTR  wtp1045.mgmt.eqiad.wmnet.
+58  1H  IN PTR  wmf7064.mgmt.eqiad.wmnet.
+59  1H  IN PTR  wtp1046.mgmt.eqiad.wmnet.
+59  1H  IN PTR  wmf7065.mgmt.eqiad.wmnet.
+60  1H  IN PTR  wtp1047.mgmt.eqiad.wmnet.
+60  1H  IN PTR  wmf7066.mgmt.eqiad.wmnet.
+61  1H  IN PTR  wtp1048.mgmt.eqiad.wmnet.
+61  1H  IN PTR  wmf7067.mgmt.eqiad.wmnet.
 
 $ORIGIN 6.65.{{ zonename }}.
 
diff --git a/templates/wmnet b/templates/wmnet
index bcc4374..104d122 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2033,6 +2033,54 @@
 wtp1022 1H  IN A10.65.3.165
 wtp1023 1H  IN A10.65.3.166
 wtp1024 1H  IN A10.65.3.167
+wtp1025 1H  IN A10.65.5.38
+wmf7044 1H  IN A10.65.5.38
+wtp1026 1H  IN A10.65.5.39
+wmf7045 1H  IN A10.65.5.39
+wtp1027 1H  IN A10.65.5.40
+wmf7046 1H  IN A10.65.5.40
+wtp1028 1H  IN A10.65.5.41
+wmf7047 1H  IN A10.65.5.41
+wtp1029 1H  IN A10.65.5.42
+wmf7048 1H  IN A10.65.5.42
+wtp1030 1H  IN A10.65.5.43
+wmf7049 1H  IN A10.65.5.43
+wtp1031 1H  IN A10.65.5.44
+wmf7050 1H  IN A10.65.5.44
+wtp1032 1H  IN A10.65.5.45
+wmf7051 1H  IN A10.65.5.45
+wtp1033 1H  IN A10.65.5.46
+wmf7052 1H  IN A10.65.5.46
+wtp1034 1H  IN A10.65.5.47
+wmf7053 1H  IN A10.65.5.47
+wtp1035 1H  IN A10.65.5.48
+wmf7054 1H  IN A10.65.5.48
+wtp1036 1H  IN A10.65.5.49
+wmf7055 1H  IN A10.65.5.49
+wtp1037 1H  IN A10.65.5.50
+wmf7056 1H  IN A10.65.5.50
+wtp1038 1H  IN A10.65.5.51
+wmf7057 1H  IN A10.65.5.51
+wtp1039 1H  IN A10.65.5.52
+wmf7058 1H  IN A10.65.5.52
+wtp1040 1H  IN A10.65.5.53
+wmf7059 1H  IN A10.65.5.53
+wtp1041 1H  IN A10.65.5.54
+wmf7060 1H  IN A10.65.5.54
+wtp1042 1H  IN A10.65.5.55
+wmf7061 1H  IN A10.65.5.55
+wtp1043 1H  IN A10.65.5.56
+wmf7062 1H  IN A10.65.5.56
+wtp1044 1H  IN A10.65.5.57
+wmf7063 1H  IN A10.65.5.57
+wtp1045 1H  IN A10.65.5.58
+wmf7064 1H  IN A10.65.5.58
+wtp1046 1H  IN A

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Payments-init consumer can handle 'currency' message field.

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

Change subject: Payments-init consumer can handle 'currency' message field.
..

Payments-init consumer can handle 'currency' message field.

Trying to standardize wire formats. Should fix the column name, but that's
a pretty huge table.

Bug: T165818
Change-Id: Ica71016fb92e50feb91daa5d4875241b1b885f7e
---
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
M sites/all/modules/queue2civicrm/tests/data/payments-init.json
M sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
3 files changed, 9 insertions(+), 4 deletions(-)


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

diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 593be09..a12c1d1 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -111,7 +111,12 @@
   }
 }
   }
-
+  // FIXME: schema should match wire format & frontend name
+  // renaming message field here to match column.
+  if (empty($msg['currency_code']) && !empty($msg['currency'])) {
+$msg['currency_code'] = $msg['currency'];
+unset($msg['currency']);
+  }
   $data = array();
   foreach ($schemata[$table]['fields'] as $field => $definition) {
 if (!array_key_exists($field, $msg)) {
diff --git a/sites/all/modules/queue2civicrm/tests/data/payments-init.json 
b/sites/all/modules/queue2civicrm/tests/data/payments-init.json
index d586a02..4f2a10d 100644
--- a/sites/all/modules/queue2civicrm/tests/data/payments-init.json
+++ b/sites/all/modules/queue2civicrm/tests/data/payments-init.json
@@ -1,5 +1,4 @@
 {
-   "php-message-class": 
"SmashPig\\CrmLink\\Messages\\DonationInterfaceFinalStatus",
"contribution_tracking_id": "12345",
"gateway": "testgateway",
"order_id": "",
@@ -10,7 +9,7 @@
"payment_submethod": "",
"country": "IT",
"amount": "2.00",
-   "currency_code": "EUR",
+   "currency": "EUR",
"server": "testpayments1002",
"date": "1445990999"
 }
diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
index 6e2e3f5..0bbd9c1 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/PaymentsInitQueueTest.php
@@ -74,11 +74,12 @@
$fields = array(
'gateway',  'gateway_txn_id', 'validation_action',
'payments_final_status', 'payment_method', 
'payment_submethod',
-   'country', 'amount', 'currency_code', 'server'
+   'country', 'amount', 'server'
);
foreach ( $fields as $field ) {
$this->assertEquals( $message[$field], 
$dbEntries[0][$field] );
}
+   $this->assertEquals( $message['currency'], 
$dbEntries[0]['currency_code'] );
$this->assertEquals(
$message['date'], wmf_common_date_civicrm_to_unix( 
$dbEntries[0]['date'] )
);

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

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

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Remove 2 deleted repos

2017-05-24 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/355486 )

Change subject: Remove 2 deleted repos
..


Remove 2 deleted repos

https://gerrit.wikimedia.org/r/#/c/355464/
https://gerrit.wikimedia.org/r/#/c/355466/

Change-Id: I2cf2e386e1ef67da74ed08b390dd190b1ae9cdd0
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 0 insertions(+), 5 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 83877ed..5fab8dd 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -33,9 +33,6 @@
 # Repo is archived
 # Accessibility Simulation
 
-# Disabled 2015-07-21 afters SUL finished
-# Account Audit
-
 Account Info
 aliasfile = AccountInfo/AccountInfo.alias.php
 ignored=accountinfo-none
@@ -1836,8 +1833,6 @@
 Page In Cat
 
 Page Language
-
-Page Language Api
 
 Page Name Formula
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2cf2e386e1ef67da74ed08b390dd190b1ae9cdd0
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Remove 2 deleted repos

2017-05-24 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355486 )

Change subject: Remove 2 deleted repos
..

Remove 2 deleted repos

https://gerrit.wikimedia.org/r/#/c/355464/
https://gerrit.wikimedia.org/r/#/c/355466/

Change-Id: I2cf2e386e1ef67da74ed08b390dd190b1ae9cdd0
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/86/355486/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 83877ed..5fab8dd 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -33,9 +33,6 @@
 # Repo is archived
 # Accessibility Simulation
 
-# Disabled 2015-07-21 afters SUL finished
-# Account Audit
-
 Account Info
 aliasfile = AccountInfo/AccountInfo.alias.php
 ignored=accountinfo-none
@@ -1836,8 +1833,6 @@
 Page In Cat
 
 Page Language
-
-Page Language Api
 
 Page Name Formula
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cf2e386e1ef67da74ed08b390dd190b1ae9cdd0
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] operations...gerrit[master]: Use /bin/bash instead of /bin/false for gerrit2 user

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

Change subject: Use /bin/bash instead of /bin/false for gerrit2 user
..


Use /bin/bash instead of /bin/false for gerrit2 user

We need to do this as we carn't sudo su into the user due to /bin/false
which basically means the user does not have shell.

This is needed for replication.

Change-Id: Idd98d60f68dcacddb3a0ea3be89e3c4f8658b54c
---
M debian/changelog
M debian/gerrit.postinst
2 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/debian/changelog b/debian/changelog
index 52c9109..e07c996 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+gerrit (2.13.8+git1-wmf.3) jessie-wikimedia; urgency=medium
+
+  * Use /bin/bash instead of /bin/false for user gerrit2
+
+ -- Paladox   Wed, 24 May 2017 20:29:00 +
+
 gerrit (2.13.8+git1-wmf.2) jessie-wikimedia; urgency=medium
 
   * Drop hooks and singleusergroup plugins
diff --git a/debian/gerrit.postinst b/debian/gerrit.postinst
index 1b0d5c6..8917e8d 100644
--- a/debian/gerrit.postinst
+++ b/debian/gerrit.postinst
@@ -14,7 +14,7 @@
 if ! getent passwd gerrit2 >/dev/null
 then
echo Adding system user: gerrit2
-   adduser --system --ingroup gerrit2 --home /var/lib/gerrit2 --shell 
/bin/false --no-create-home gerrit2
+   adduser --system --ingroup gerrit2 --home /var/lib/gerrit2 --shell 
/bin/bash --no-create-home gerrit2
usermod -c "Gerrit code review system" gerrit2
 fi
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd98d60f68dcacddb3a0ea3be89e3c4f8658b54c
Gerrit-PatchSet: 8
Gerrit-Project: operations/debs/gerrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: Zppix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Disable stats collection for maintenance scripts.

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

Change subject: Disable stats collection for maintenance scripts.
..

Disable stats collection for maintenance scripts.

Some long scripts collect tons of useless stats which makes them very slow,
also maintenance stats are probably not the stats we're generally after.

Bug: T165203
Change-Id: Icb9e3d7c45ff6d2dd00c23eac926c312b48f325e
---
M includes/Maintenance/Maintenance.php
1 file changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/includes/Maintenance/Maintenance.php 
b/includes/Maintenance/Maintenance.php
index 11fe094..33a71f8 100644
--- a/includes/Maintenance/Maintenance.php
+++ b/includes/Maintenance/Maintenance.php
@@ -6,6 +6,7 @@
 use CirrusSearch\SearchConfig;
 use MediaWiki\MediaWikiServices;
 use CirrusSearch\UserTesting;
+use MediaWiki\Services\CannotReplaceActiveServiceException;
 
 /**
  * Cirrus helpful extensions to Maintenance.
@@ -202,5 +203,15 @@
// Don't skew the dashboards by logging these requests to
// the global request log.
$wgCirrusSearchLogElasticRequests = false;
+   // Disable statsd data collection.
+   try {
+   $services = \MediaWiki\MediaWikiServices::getInstance();
+   $services->redefineService( "StatsdDataFactory",
+   function ( MediaWikiServices $services ) {
+   return new \NullStatsdDataFactory();
+   } );
+   } catch ( CannotReplaceActiveServiceException $e ) {
+   // ignore it, failing to disable stats is tolerable
+   }
}
 }

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

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

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


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

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

Change subject: update DonationInterface submodule
..


update DonationInterface submodule

Change-Id: I603ef469f807aca2bad3c26e9b59c86856874bbf
---
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 f81cbe1..1c64806 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit f81cbe16e0c95f8868cbd4738ce0883fb5f3a274
+Subproject commit 1c6480669cf4f0eb9e93ca139d42938f2ee434fd

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I603ef469f807aca2bad3c26e9b59c86856874bbf
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] integration/config[master]: PageLanguageApi has been archived, no need to test

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

Change subject: PageLanguageApi has been archived, no need to test
..


PageLanguageApi has been archived, no need to test

Bug: T160371
Change-Id: I24eddfec897638a609d3302e035979e0d2011fc2
---
M zuul/layout.yaml
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e6dea6c..eee997e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3723,11 +3723,6 @@
   - name: extension-unittests-generic
   - name: mwgate-npm
 
-  - name: mediawiki/extensions/PageLanguageApi
-template:
-  - name: extension-unittests-generic
-  - name: mwgate-npm
-
   - name: mediawiki/extensions/PagedTiffHandler
 template:
   - name: extension-unittests-generic

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24eddfec897638a609d3302e035979e0d2011fc2
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Chad 
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] integration/config[master]: AccountAudit: Archived extension

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

Change subject: AccountAudit: Archived extension
..


AccountAudit: Archived extension

Bug: T163791
Change-Id: I0c0c5d11fd73eac53bcb771c2b0100f4460cac91
---
M zuul/layout.yaml
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index eee997e..5756b34 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2441,11 +2441,6 @@
   - name: extension-unittests-generic
   - name: mwgate-npm
 
-  - name: mediawiki/extensions/AccountAudit
-template:
-  - name: extension-unittests-generic
-  - name: mwgate-npm
-
   - name: mediawiki/extensions/AccountInfo
 template:
   - name: extension-unittests-generic

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Refactor Special:MobileDiff

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

Change subject: Refactor Special:MobileDiff
..


Refactor Special:MobileDiff

This makes the code a bit more readable, and reduces the size of
functions by extracting the code to their own functions. Also,
the difference engine is created earlier and is therefore be
available to most of the code.

This change also sets the relevant title of the skin to the title
of the revisions, which are viewed. This way, other extensions now,
that the special page shows content of a (probably) content page,
instead of a real special page.

Bug: T165835
Change-Id: I68cf50f5dd339f34802d70df1f32d2c3390944a3
---
M includes/specials/SpecialMobileDiff.php
1 file changed, 39 insertions(+), 21 deletions(-)

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



diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index 0752828..dfefbf9 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -113,6 +113,7 @@
$this->rev = $rev;
$this->prevRev = $prev;
$this->targetTitle = $this->rev->getTitle();
+   $this->getSkin()->setRelevantTitle( $this->targetTitle );
 
$output->setPageTitle( $this->msg(
'mobile-frontend-diffview-title',
@@ -132,6 +133,7 @@
 
$output->addHtml( '' );
 
+   $this->setupDifferenceEngine();
$this->showHeader();
$this->showDiff();
$output->addHtml( '' );
@@ -141,6 +143,39 @@
$output->addHtml( '' );
 
return true;
+   }
+
+   /**
+* Returns the ID of the previous Revision, if it is set, otherwise 0.
+*
+* @return int|null
+*/
+   protected function getPrevId() {
+   return $this->prevRev ? $this->prevRev->getId() : 0;
+   }
+
+   /**
+* Setups the DifferenceEngine.
+*/
+   protected function setupDifferenceEngine() {
+   $contentHandler = $this->rev->getContentHandler();
+   $de = $contentHandler->createDifferenceEngine( 
$this->getContext(), $this->getPrevId(),
+   $this->revId );
+   // HACK:
+   if ( get_class( $de ) == 'DifferenceEngine' ) {
+   $de = new $this->diffClass(
+   $this->getContext(),
+   $this->getPrevId(),
+   $this->revId,
+   0,
+   false,
+   (bool)$this->getRequest()->getVal( 'unhide' )
+   );
+   } else {
+   $de->showDiffPage();
+   return;
+   }
+   $this->mDiffEngine = $de;
}
 
/**
@@ -220,25 +255,9 @@
function showDiff() {
$output = $this->getOutput();
 
-   $prevId = $this->prevRev ? $this->prevRev->getId() : 0;
+   $prevId = $this->getPrevId();
$unhide = (bool)$this->getRequest()->getVal( 'unhide' );
-   $contentHandler = $this->rev->getContentHandler();
-   $de = $contentHandler->createDifferenceEngine( 
$this->getContext(), $prevId, $this->revId );
-   // HACK:
-   if ( get_class( $de ) == 'DifferenceEngine' ) {
-   $de = new $this->diffClass(
-   $this->getContext(),
-   $prevId,
-   $this->revId,
-   0,
-   false,
-   $unhide
-   );
-   } else {
-   $de->showDiffPage();
-   return;
-   }
-   $this->mDiffEngine = $de;
+   $de = $this->mDiffEngine;
$diff = $de->getDiffBody();
if ( !$prevId ) {
$audience = $unhide ? Revision::FOR_THIS_USER : 
Revision::FOR_PUBLIC;
@@ -281,14 +300,13 @@
$output->addHtml( $history );
}
 
-   $diffEngine = $this->mDiffEngine;
-   if ( $diffEngine instanceof InlineDifferenceEngine ) {
+   if ( $de instanceof InlineDifferenceEngine ) {
$output->addHtml( Html::rawElement(
'div',
[
'class' => 'patrollink'
],
-   $diffEngine->getPatrolledLink()
+   $de->getPatrolledLink()
  

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Add browser test for editor default view of watchlist

2017-05-24 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355484 )

Change subject: Add browser test for editor default view of watchlist
..

Add browser test for editor default view of watchlist

Bug: T88270
Change-Id: Ie5f8d6d0f01e59143b950d5751e36f2171a3ab87
---
A tests/browser/features/special_watchlist_editors.feature
1 file changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/tests/browser/features/special_watchlist_editors.feature 
b/tests/browser/features/special_watchlist_editors.feature
new file mode 100644
index 000..6cb5584
--- /dev/null
+++ b/tests/browser/features/special_watchlist_editors.feature
@@ -0,0 +1,11 @@
+@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @integration 
@test2.m.wikipedia.org @vagrant @login
+Feature: Editor watchlist
+
+  Background:
+Given I am logged in as a user with a > 10 edit count
+  And I have recently edited pages on my watchlist
+  And I am on the "Special:Watchlist" page
+
+  Scenario: Default view for seasoned editors is the feed view
+Then I should see a list of diff summary links
+  And the modified button should be selected

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

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

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


[MediaWiki-commits] [Gerrit] operations...druid[master]: Release 0.10.0-2

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

Change subject: Release 0.10.0-2
..


Release 0.10.0-2

  * Fix for mysql-metadata-storage extension version
  * Specify dependency on druid-common (= 0.10.0) to make sure druid-common is 
updated

Bug: T164008
Change-Id: If5adf9c47728bc308eb96e37d8dc78143d4b49a0
---
M debian/changelog
M debian/control
M debian/extensions/mysql-metadata-storage/README.debian
D debian/extensions/mysql-metadata-storage/mysql-connector-java-5.1.34.jar
A debian/extensions/mysql-metadata-storage/mysql-connector-java-5.1.38.jar
A debian/extensions/mysql-metadata-storage/mysql-metadata-storage-0.10.0.jar
D debian/extensions/mysql-metadata-storage/mysql-metadata-storage-0.9.0.jar
M debian/source/include-binaries
8 files changed, 15 insertions(+), 8 deletions(-)

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



diff --git a/debian/changelog b/debian/changelog
index b9f6191..9e481eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+druid (0.10.0-2~jessie1) jessie-wikimedia; urgency=low
+
+  * Fix for mysql-metadata-storage extension version
+  * Specify dependency on druid-common (= 0.10.0) to make sure druid-common is 
updated
+
+ -- Andrew Otto (WMF)   Wed, 24 May 2017 14:35:00 +
+
 druid (0.10.0-1~jessie1) jessie-wikimedia; urgency=low
 
   * Upstream release 0.10.0
diff --git a/debian/control b/debian/control
index dc876b3..4eda73f 100644
--- a/debian/control
+++ b/debian/control
@@ -16,30 +16,30 @@
 
 Package: druid-broker
 Architecture: all
-Depends: openjdk-8-jre | java8-runtime, adduser, ${misc:Depends}, druid-common
+Depends: openjdk-8-jre | java8-runtime, adduser, ${misc:Depends}, druid-common 
(>= 0.10.0)
 Description: Druid Broker Node
  This package installs init scripts for the Druid Broker node.
 
 Package: druid-coordinator
 Architecture: all
-Depends: openjdk-8-jre | java8-runtime, adduser, ${misc:Depends}, druid-common
+Depends: openjdk-8-jre | java8-runtime, adduser, ${misc:Depends}, druid-common 
(>= 0.10.0)
 Description: Druid Coordinator Node
  This package installs init scripts for the Druid Coordinator node.
 
 Package: druid-historical
 Architecture: all
-Depends: openjdk-8-jre | java8-runtime, adduser, ${misc:Depends}, druid-common
+Depends: openjdk-8-jre | java8-runtime, adduser, ${misc:Depends}, druid-common 
(>= 0.10.0)
 Description: Druid Historical Node
  This package installs init scripts for the Druid Historical node.
 
 Package: druid-middlemanager
 Architecture: all
-Depends: openjdk-8-jre | java8-runtime, adduser, ${misc:Depends}, druid-common
+Depends: openjdk-8-jre | java8-runtime, adduser, ${misc:Depends}, druid-common 
(>= 0.10.0)
 Description: Druid MiddleManager Node
  This package installs init scripts for the Druid MiddleManager node.
 
 Package: druid-overlord
 Architecture: all
-Depends: openjdk-8-jre | java8-runtime, adduser, ${misc:Depends}, druid-common
+Depends: openjdk-8-jre | java8-runtime, adduser, ${misc:Depends}, druid-common 
(>= 0.10.0)
 Description: Druid Overlord Node
  This package installs init scripts for the Druid Overlord node.
diff --git a/debian/extensions/mysql-metadata-storage/README.debian 
b/debian/extensions/mysql-metadata-storage/README.debian
index 4bdcdd3..47af72e 100644
--- a/debian/extensions/mysql-metadata-storage/README.debian
+++ b/debian/extensions/mysql-metadata-storage/README.debian
@@ -1,4 +1,4 @@
 This extension was installed as part of WMF druid debian packaging.
 The jars here were downloaded from
-http://static.druid.io/artifacts/releases/mysql-metadata-storage-0.9.0.tar.gz
+http://static.druid.io/artifacts/releases/mysql-metadata-storage-0.10.0.tar.gz
 and installed as part of the druid-common package.
diff --git 
a/debian/extensions/mysql-metadata-storage/mysql-connector-java-5.1.34.jar 
b/debian/extensions/mysql-metadata-storage/mysql-connector-java-5.1.34.jar
deleted file mode 100644
index f581e0d..000
--- a/debian/extensions/mysql-metadata-storage/mysql-connector-java-5.1.34.jar
+++ /dev/null
Binary files differ
diff --git 
a/debian/extensions/mysql-metadata-storage/mysql-connector-java-5.1.38.jar 
b/debian/extensions/mysql-metadata-storage/mysql-connector-java-5.1.38.jar
new file mode 100644
index 000..be09493
--- /dev/null
+++ b/debian/extensions/mysql-metadata-storage/mysql-connector-java-5.1.38.jar
Binary files differ
diff --git 
a/debian/extensions/mysql-metadata-storage/mysql-metadata-storage-0.10.0.jar 
b/debian/extensions/mysql-metadata-storage/mysql-metadata-storage-0.10.0.jar
new file mode 100644
index 000..8514a3d
--- /dev/null
+++ b/debian/extensions/mysql-metadata-storage/mysql-metadata-storage-0.10.0.jar
Binary files differ
diff --git 
a/debian/extensions/mysql-metadata-storage/mysql-metadata-storage-0.9.0.jar 

[MediaWiki-commits] [Gerrit] operations...gerrit[master]: Use /bin/bash instead of /bin/false for gerrit2 user

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

Change subject: Use /bin/bash instead of /bin/false for gerrit2 user
..

Use /bin/bash instead of /bin/false for gerrit2 user

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/gerrit 
refs/changes/83/355483/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd98d60f68dcacddb3a0ea3be89e3c4f8658b54c
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/gerrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Use is_not_bot filter function for eventlogging mysql consumer

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

Change subject: Use is_not_bot filter function for eventlogging mysql consumer
..


Use is_not_bot filter function for eventlogging mysql consumer

Bug: T67508
Change-Id: Ib5156dcf582c9829e336e4c58fe7184cc4e590d2
---
M modules/role/manifests/eventlogging/analytics/mysql.pp
1 file changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/modules/role/manifests/eventlogging/analytics/mysql.pp 
b/modules/role/manifests/eventlogging/analytics/mysql.pp
index e86f90b..1b410a1 100644
--- a/modules/role/manifests/eventlogging/analytics/mysql.pp
+++ b/modules/role/manifests/eventlogging/analytics/mysql.pp
@@ -52,14 +52,11 @@
 
 # Custom URI scheme to pass events through filter
 $filter_scheme= 'filter://'
-# NOTE: $filter_scheme is temporarily removed from input URI
-# until we announce the change and fix EL code.
-# See: https://phabricator.wikimedia.org/T67508
 
 # Kafka consumer group for this consumer is mysql-m4-master
 eventlogging::service::consumer { $mysql_consumers:
 # auto commit offsets to kafka more often for mysql consumer
-input  => 
"${kafka_mixed_uri}_commit_interval_ms=1000${$kafka_api_version_param}${filter_function}",
+input  => 
"${filter_scheme}${kafka_mixed_uri}_commit_interval_ms=1000${$kafka_api_version_param}${filter_function}",
 output => 
"mysql://${mysql_user}:${mysql_pass}@${mysql_db}?charset=utf8_host=${statsd_host}=True",
 sid=> $kafka_consumer_group,
 # Restrict permissions on this config file since it contains a 
password.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5156dcf582c9829e336e4c58fe7184cc4e590d2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 
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]: Use is_not_bot filter function for eventlogging mysql consumer

2017-05-24 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355482 )

Change subject: Use is_not_bot filter function for eventlogging mysql consumer
..

Use is_not_bot filter function for eventlogging mysql consumer

Bug: T67508
Change-Id: Ib5156dcf582c9829e336e4c58fe7184cc4e590d2
---
M modules/role/manifests/eventlogging/analytics/mysql.pp
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/355482/1

diff --git a/modules/role/manifests/eventlogging/analytics/mysql.pp 
b/modules/role/manifests/eventlogging/analytics/mysql.pp
index e86f90b..1b410a1 100644
--- a/modules/role/manifests/eventlogging/analytics/mysql.pp
+++ b/modules/role/manifests/eventlogging/analytics/mysql.pp
@@ -52,14 +52,11 @@
 
 # Custom URI scheme to pass events through filter
 $filter_scheme= 'filter://'
-# NOTE: $filter_scheme is temporarily removed from input URI
-# until we announce the change and fix EL code.
-# See: https://phabricator.wikimedia.org/T67508
 
 # Kafka consumer group for this consumer is mysql-m4-master
 eventlogging::service::consumer { $mysql_consumers:
 # auto commit offsets to kafka more often for mysql consumer
-input  => 
"${kafka_mixed_uri}_commit_interval_ms=1000${$kafka_api_version_param}${filter_function}",
+input  => 
"${filter_scheme}${kafka_mixed_uri}_commit_interval_ms=1000${$kafka_api_version_param}${filter_function}",
 output => 
"mysql://${mysql_user}:${mysql_pass}@${mysql_db}?charset=utf8_host=${statsd_host}=True",
 sid=> $kafka_consumer_group,
 # Restrict permissions on this config file since it contains a 
password.

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: group1 wikis to 1.30.0-wmf.2

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

Change subject: group1 wikis to 1.30.0-wmf.2
..


group1 wikis to 1.30.0-wmf.2

Change-Id: Ic2c82ab1cb02a30c744bc4dedad324a0c3dfd944
---
M php
M wikiversions.json
2 files changed, 600 insertions(+), 600 deletions(-)

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



diff --git a/php b/php
index ae5463d..7627347 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.30.0-wmf.1
\ No newline at end of file
+php-1.30.0-wmf.2
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index 88182e8..c1d0cc0 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,33 +1,33 @@
 {
 "aawiki": "php-1.30.0-wmf.1",
-"aawikibooks": "php-1.30.0-wmf.1",
-"aawiktionary": "php-1.30.0-wmf.1",
+"aawikibooks": "php-1.30.0-wmf.2",
+"aawiktionary": "php-1.30.0-wmf.2",
 "abwiki": "php-1.30.0-wmf.1",
-"abwiktionary": "php-1.30.0-wmf.1",
+"abwiktionary": "php-1.30.0-wmf.2",
 "acewiki": "php-1.30.0-wmf.1",
-"advisorywiki": "php-1.30.0-wmf.1",
+"advisorywiki": "php-1.30.0-wmf.2",
 "adywiki": "php-1.30.0-wmf.1",
 "afwiki": "php-1.30.0-wmf.1",
-"afwikibooks": "php-1.30.0-wmf.1",
-"afwikiquote": "php-1.30.0-wmf.1",
-"afwiktionary": "php-1.30.0-wmf.1",
+"afwikibooks": "php-1.30.0-wmf.2",
+"afwikiquote": "php-1.30.0-wmf.2",
+"afwiktionary": "php-1.30.0-wmf.2",
 "akwiki": "php-1.30.0-wmf.1",
-"akwikibooks": "php-1.30.0-wmf.1",
-"akwiktionary": "php-1.30.0-wmf.1",
+"akwikibooks": "php-1.30.0-wmf.2",
+"akwiktionary": "php-1.30.0-wmf.2",
 "alswiki": "php-1.30.0-wmf.1",
-"alswikibooks": "php-1.30.0-wmf.1",
-"alswikiquote": "php-1.30.0-wmf.1",
-"alswiktionary": "php-1.30.0-wmf.1",
+"alswikibooks": "php-1.30.0-wmf.2",
+"alswikiquote": "php-1.30.0-wmf.2",
+"alswiktionary": "php-1.30.0-wmf.2",
 "amwiki": "php-1.30.0-wmf.1",
-"amwikiquote": "php-1.30.0-wmf.1",
-"amwiktionary": "php-1.30.0-wmf.1",
+"amwikiquote": "php-1.30.0-wmf.2",
+"amwiktionary": "php-1.30.0-wmf.2",
 "angwiki": "php-1.30.0-wmf.1",
-"angwikibooks": "php-1.30.0-wmf.1",
-"angwikiquote": "php-1.30.0-wmf.1",
-"angwikisource": "php-1.30.0-wmf.1",
-"angwiktionary": "php-1.30.0-wmf.1",
+"angwikibooks": "php-1.30.0-wmf.2",
+"angwikiquote": "php-1.30.0-wmf.2",
+"angwikisource": "php-1.30.0-wmf.2",
+"angwiktionary": "php-1.30.0-wmf.2",
 "anwiki": "php-1.30.0-wmf.1",
-"anwiktionary": "php-1.30.0-wmf.1",
+"anwiktionary": "php-1.30.0-wmf.2",
 "arbcom_cswiki": "php-1.30.0-wmf.1",
 "arbcom_dewiki": "php-1.30.0-wmf.1",
 "arbcom_enwiki": "php-1.30.0-wmf.1",
@@ -35,723 +35,723 @@
 "arbcom_nlwiki": "php-1.30.0-wmf.1",
 "arcwiki": "php-1.30.0-wmf.1",
 "arwiki": "php-1.30.0-wmf.1",
-"arwikibooks": "php-1.30.0-wmf.1",
-"arwikimedia": "php-1.30.0-wmf.1",
-"arwikinews": "php-1.30.0-wmf.1",
-"arwikiquote": "php-1.30.0-wmf.1",
-"arwikisource": "php-1.30.0-wmf.1",
-"arwikiversity": "php-1.30.0-wmf.1",
-"arwiktionary": "php-1.30.0-wmf.1",
+"arwikibooks": "php-1.30.0-wmf.2",
+"arwikimedia": "php-1.30.0-wmf.2",
+"arwikinews": "php-1.30.0-wmf.2",
+"arwikiquote": "php-1.30.0-wmf.2",
+"arwikisource": "php-1.30.0-wmf.2",
+"arwikiversity": "php-1.30.0-wmf.2",
+"arwiktionary": "php-1.30.0-wmf.2",
 "arzwiki": "php-1.30.0-wmf.1",
 "astwiki": "php-1.30.0-wmf.1",
-"astwikibooks": "php-1.30.0-wmf.1",
-"astwikiquote": "php-1.30.0-wmf.1",
-"astwiktionary": "php-1.30.0-wmf.1",
+"astwikibooks": "php-1.30.0-wmf.2",
+"astwikiquote": "php-1.30.0-wmf.2",
+"astwiktionary": "php-1.30.0-wmf.2",
 "aswiki": "php-1.30.0-wmf.1",
-"aswikibooks": "php-1.30.0-wmf.1",
-"aswikisource": "php-1.30.0-wmf.1",
-"aswiktionary": "php-1.30.0-wmf.1",
-"auditcomwiki": "php-1.30.0-wmf.1",
+"aswikibooks": "php-1.30.0-wmf.2",
+"aswikisource": "php-1.30.0-wmf.2",
+"aswiktionary": "php-1.30.0-wmf.2",
+"auditcomwiki": "php-1.30.0-wmf.2",
 "avwiki": "php-1.30.0-wmf.1",
-"avwiktionary": "php-1.30.0-wmf.1",
+"avwiktionary": "php-1.30.0-wmf.2",
 "aywiki": "php-1.30.0-wmf.1",
-"aywikibooks": "php-1.30.0-wmf.1",
-"aywiktionary": "php-1.30.0-wmf.1",
+"aywikibooks": "php-1.30.0-wmf.2",
+"aywiktionary": "php-1.30.0-wmf.2",
 "azbwiki": "php-1.30.0-wmf.1",
 "azwiki": "php-1.30.0-wmf.1",
-"azwikibooks": "php-1.30.0-wmf.1",
-"azwikiquote": "php-1.30.0-wmf.1",
-"azwikisource": "php-1.30.0-wmf.1",
-"azwiktionary": "php-1.30.0-wmf.1",
+"azwikibooks": "php-1.30.0-wmf.2",
+"azwikiquote": "php-1.30.0-wmf.2",
+"azwikisource": "php-1.30.0-wmf.2",
+"azwiktionary": "php-1.30.0-wmf.2",
 "barwiki": "php-1.30.0-wmf.1",
 "bat_smgwiki": "php-1.30.0-wmf.1",
 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: group1 wikis to 1.30.0-wmf.2

2017-05-24 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355481 )

Change subject: group1 wikis to 1.30.0-wmf.2
..

group1 wikis to 1.30.0-wmf.2

Change-Id: Ic2c82ab1cb02a30c744bc4dedad324a0c3dfd944
---
M php
M wikiversions.json
2 files changed, 600 insertions(+), 600 deletions(-)


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

diff --git a/php b/php
index ae5463d..7627347 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.30.0-wmf.1
\ No newline at end of file
+php-1.30.0-wmf.2
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index 88182e8..c1d0cc0 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,33 +1,33 @@
 {
 "aawiki": "php-1.30.0-wmf.1",
-"aawikibooks": "php-1.30.0-wmf.1",
-"aawiktionary": "php-1.30.0-wmf.1",
+"aawikibooks": "php-1.30.0-wmf.2",
+"aawiktionary": "php-1.30.0-wmf.2",
 "abwiki": "php-1.30.0-wmf.1",
-"abwiktionary": "php-1.30.0-wmf.1",
+"abwiktionary": "php-1.30.0-wmf.2",
 "acewiki": "php-1.30.0-wmf.1",
-"advisorywiki": "php-1.30.0-wmf.1",
+"advisorywiki": "php-1.30.0-wmf.2",
 "adywiki": "php-1.30.0-wmf.1",
 "afwiki": "php-1.30.0-wmf.1",
-"afwikibooks": "php-1.30.0-wmf.1",
-"afwikiquote": "php-1.30.0-wmf.1",
-"afwiktionary": "php-1.30.0-wmf.1",
+"afwikibooks": "php-1.30.0-wmf.2",
+"afwikiquote": "php-1.30.0-wmf.2",
+"afwiktionary": "php-1.30.0-wmf.2",
 "akwiki": "php-1.30.0-wmf.1",
-"akwikibooks": "php-1.30.0-wmf.1",
-"akwiktionary": "php-1.30.0-wmf.1",
+"akwikibooks": "php-1.30.0-wmf.2",
+"akwiktionary": "php-1.30.0-wmf.2",
 "alswiki": "php-1.30.0-wmf.1",
-"alswikibooks": "php-1.30.0-wmf.1",
-"alswikiquote": "php-1.30.0-wmf.1",
-"alswiktionary": "php-1.30.0-wmf.1",
+"alswikibooks": "php-1.30.0-wmf.2",
+"alswikiquote": "php-1.30.0-wmf.2",
+"alswiktionary": "php-1.30.0-wmf.2",
 "amwiki": "php-1.30.0-wmf.1",
-"amwikiquote": "php-1.30.0-wmf.1",
-"amwiktionary": "php-1.30.0-wmf.1",
+"amwikiquote": "php-1.30.0-wmf.2",
+"amwiktionary": "php-1.30.0-wmf.2",
 "angwiki": "php-1.30.0-wmf.1",
-"angwikibooks": "php-1.30.0-wmf.1",
-"angwikiquote": "php-1.30.0-wmf.1",
-"angwikisource": "php-1.30.0-wmf.1",
-"angwiktionary": "php-1.30.0-wmf.1",
+"angwikibooks": "php-1.30.0-wmf.2",
+"angwikiquote": "php-1.30.0-wmf.2",
+"angwikisource": "php-1.30.0-wmf.2",
+"angwiktionary": "php-1.30.0-wmf.2",
 "anwiki": "php-1.30.0-wmf.1",
-"anwiktionary": "php-1.30.0-wmf.1",
+"anwiktionary": "php-1.30.0-wmf.2",
 "arbcom_cswiki": "php-1.30.0-wmf.1",
 "arbcom_dewiki": "php-1.30.0-wmf.1",
 "arbcom_enwiki": "php-1.30.0-wmf.1",
@@ -35,723 +35,723 @@
 "arbcom_nlwiki": "php-1.30.0-wmf.1",
 "arcwiki": "php-1.30.0-wmf.1",
 "arwiki": "php-1.30.0-wmf.1",
-"arwikibooks": "php-1.30.0-wmf.1",
-"arwikimedia": "php-1.30.0-wmf.1",
-"arwikinews": "php-1.30.0-wmf.1",
-"arwikiquote": "php-1.30.0-wmf.1",
-"arwikisource": "php-1.30.0-wmf.1",
-"arwikiversity": "php-1.30.0-wmf.1",
-"arwiktionary": "php-1.30.0-wmf.1",
+"arwikibooks": "php-1.30.0-wmf.2",
+"arwikimedia": "php-1.30.0-wmf.2",
+"arwikinews": "php-1.30.0-wmf.2",
+"arwikiquote": "php-1.30.0-wmf.2",
+"arwikisource": "php-1.30.0-wmf.2",
+"arwikiversity": "php-1.30.0-wmf.2",
+"arwiktionary": "php-1.30.0-wmf.2",
 "arzwiki": "php-1.30.0-wmf.1",
 "astwiki": "php-1.30.0-wmf.1",
-"astwikibooks": "php-1.30.0-wmf.1",
-"astwikiquote": "php-1.30.0-wmf.1",
-"astwiktionary": "php-1.30.0-wmf.1",
+"astwikibooks": "php-1.30.0-wmf.2",
+"astwikiquote": "php-1.30.0-wmf.2",
+"astwiktionary": "php-1.30.0-wmf.2",
 "aswiki": "php-1.30.0-wmf.1",
-"aswikibooks": "php-1.30.0-wmf.1",
-"aswikisource": "php-1.30.0-wmf.1",
-"aswiktionary": "php-1.30.0-wmf.1",
-"auditcomwiki": "php-1.30.0-wmf.1",
+"aswikibooks": "php-1.30.0-wmf.2",
+"aswikisource": "php-1.30.0-wmf.2",
+"aswiktionary": "php-1.30.0-wmf.2",
+"auditcomwiki": "php-1.30.0-wmf.2",
 "avwiki": "php-1.30.0-wmf.1",
-"avwiktionary": "php-1.30.0-wmf.1",
+"avwiktionary": "php-1.30.0-wmf.2",
 "aywiki": "php-1.30.0-wmf.1",
-"aywikibooks": "php-1.30.0-wmf.1",
-"aywiktionary": "php-1.30.0-wmf.1",
+"aywikibooks": "php-1.30.0-wmf.2",
+"aywiktionary": "php-1.30.0-wmf.2",
 "azbwiki": "php-1.30.0-wmf.1",
 "azwiki": "php-1.30.0-wmf.1",
-"azwikibooks": "php-1.30.0-wmf.1",
-"azwikiquote": "php-1.30.0-wmf.1",
-"azwikisource": "php-1.30.0-wmf.1",
-"azwiktionary": "php-1.30.0-wmf.1",
+"azwikibooks": "php-1.30.0-wmf.2",
+"azwikiquote": "php-1.30.0-wmf.2",
+"azwikisource": "php-1.30.0-wmf.2",
+"azwiktionary": "php-1.30.0-wmf.2",
 "barwiki": "php-1.30.0-wmf.1",
 "bat_smgwiki": 

  1   2   3   4   >