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

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

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


db-eqiad.php: Depool db1072

db1072 needs an alter table

Bug: T132416
Change-Id: I21352d5f77020efce502022ea1f4f58e6e8f19e1
---
M wmf-config/db-eqiad.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index c9b620b..8092917 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -98,9 +98,9 @@
'db1051' => 50,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 50,  # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
-   'db1066' => 50,  # D1 2.8TB 160GB, api
-   'db1072' => 50,  # B2 2.8TB 160GB, api
-   'db1073' => 50,  # B3 2.8TB 160GB, api
+   'db1066' => 20,  # D1 2.8TB 160GB, api #less main traffic 
weight T132416
+#  'db1072' => 50,  # B2 2.8TB 160GB, api #T132416
+   'db1073' => 20,  # B3 2.8TB 160GB, api #less main traffic 
weight T132416
'db1080' => 500, # A2 3.6TB 512GB
'db1083' => 500, # B1 3.6TB 512GB
'db1089' => 500, # C3 3.6TB 512GB
@@ -264,7 +264,7 @@
],
'api' => [
'db1066' => 1,
-   'db1072' => 1,
+#  'db1072' => 1,
'db1073' => 1,
],
],

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

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

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


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

2017-04-10 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347569 )

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

db-eqiad.php: Depool db1072

db1072 needs an alter table

Bug: T132416
Change-Id: I21352d5f77020efce502022ea1f4f58e6e8f19e1
---
M wmf-config/db-eqiad.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index c9b620b..8092917 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -98,9 +98,9 @@
'db1051' => 50,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 50,  # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
-   'db1066' => 50,  # D1 2.8TB 160GB, api
-   'db1072' => 50,  # B2 2.8TB 160GB, api
-   'db1073' => 50,  # B3 2.8TB 160GB, api
+   'db1066' => 20,  # D1 2.8TB 160GB, api #less main traffic 
weight T132416
+#  'db1072' => 50,  # B2 2.8TB 160GB, api #T132416
+   'db1073' => 20,  # B3 2.8TB 160GB, api #less main traffic 
weight T132416
'db1080' => 500, # A2 3.6TB 512GB
'db1083' => 500, # B1 3.6TB 512GB
'db1089' => 500, # C3 3.6TB 512GB
@@ -264,7 +264,7 @@
],
'api' => [
'db1066' => 1,
-   'db1072' => 1,
+#  'db1072' => 1,
'db1073' => 1,
],
],

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

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

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


[MediaWiki-commits] [Gerrit] operations/switchdc[master]: Clarify documentation for puppet disable job

2017-04-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347568 )

Change subject: Clarify documentation for puppet disable job
..

Clarify documentation for puppet disable job

Change-Id: I8f33d06f9eb15057bdf28b58d812957b3f5269cb
---
M switchdc/stages/t00_disable_puppet.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/switchdc 
refs/changes/68/347568/1

diff --git a/switchdc/stages/t00_disable_puppet.py 
b/switchdc/stages/t00_disable_puppet.py
index 2c3f39d..a737529 100644
--- a/switchdc/stages/t00_disable_puppet.py
+++ b/switchdc/stages/t00_disable_puppet.py
@@ -1,12 +1,13 @@
 from switchdc import get_reason
 from switchdc.lib.remote import Remote
 
-__title__ = 'Disabling puppet on MediaWiki jobrunners and videoscalers'
+__title__ = 'Disabling puppet on MediaWiki jobrunners, videoscalers and 
maintenace systems'
 
 
 def execute(dc_from, dc_to):
 """Pre-disable puppet on all the hosts where it's needed."""
 remote = Remote()
+# This selects both clusters of mediawiki jobrunners: jobrunner and 
videoscaler
 jobrunners = Remote.query('R:class = profile::mediawiki::jobrunner')
 maintenance = Remote.query('R:class = role::mediawiki::maintenance')
 remote.select(jobrunners | maintenance)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f33d06f9eb15057bdf28b58d812957b3f5269cb
Gerrit-PatchSet: 1
Gerrit-Project: operations/switchdc
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] operations/switchdc[master]: Logging: filter out all cumin's messages from stderr

2017-04-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347534 )

Change subject: Logging: filter out all cumin's messages from stderr
..


Logging: filter out all cumin's messages from stderr

Bug: T160178
Change-Id: I2fbe0604aec57a4cf56150741dc820bb20b01ed7
---
M switchdc/lib/remote.py
M switchdc/log.py
2 files changed, 6 insertions(+), 8 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/switchdc/lib/remote.py b/switchdc/lib/remote.py
index 556e01d..05bddcf 100644
--- a/switchdc/lib/remote.py
+++ b/switchdc/lib/remote.py
@@ -81,11 +81,11 @@
 if batch_sleep > 0:
 self.worker.batch_sleep = batch_sleep
 
-if is_dry_run():
-logger.debug("Executing commands {commands} on '{num}' hosts: 
{hosts}".format(
-commands=commands, num=len(self.hosts), 
hosts=NodeSet.fromlist(self.hosts)))
-if not is_safe:
-return 0
+logger.debug("Executing commands {commands} on '{num}' hosts: 
{hosts}".format(
+commands=commands, num=len(self.hosts), 
hosts=NodeSet.fromlist(self.hosts)))
+
+if is_dry_run() and not is_safe:
+return 0
 
 rc = self.worker.execute()
 
diff --git a/switchdc/log.py b/switchdc/log.py
index 8ce7723..9f57782 100644
--- a/switchdc/log.py
+++ b/switchdc/log.py
@@ -63,10 +63,9 @@
 
 
 class OutputFilter(logging.Filter):
-threshold = logging.ERROR
 
 def filter(self, record):
-if 'cumin' in record.pathname and record.levelno <= self.threshold:
+if 'cumin' in record.pathname:
 return 0
 else:
 return 1
@@ -92,7 +91,6 @@
 if is_dry_run():
 output_handler.setFormatter(logging.Formatter(fmt='DRY-RUN: 
%(message)s'))
 output_handler.setLevel(logging.DEBUG)
-OutputFilter.threshold = logging.WARN
 else:
 output_handler.setLevel(logging.INFO)
 output_handler.addFilter(OutputFilter())

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fbe0604aec57a4cf56150741dc820bb20b01ed7
Gerrit-PatchSet: 2
Gerrit-Project: operations/switchdc
Gerrit-Branch: master
Gerrit-Owner: Volans 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/switchdc[master]: Fix output typo in the redis task

2017-04-10 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347420 )

Change subject: Fix output typo in the redis task
..


Fix output typo in the redis task

Change-Id: I2d4b57c45118ee97c973cad033369db6034138b3
---
M switchdc/stages/t06_redis.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified
  Volans: Looks good to me, but someone else must approve



diff --git a/switchdc/stages/t06_redis.py b/switchdc/stages/t06_redis.py
index e8a415c..a7ce7dc 100644
--- a/switchdc/stages/t06_redis.py
+++ b/switchdc/stages/t06_redis.py
@@ -141,7 +141,7 @@
 raise SwitchdcError(3)
 
 logger.info('Starting replication for all instances in {dc}, cluster 
{cluster}'.format(
-dc=dc_to, cluster=cluster))
+dc=dc_from, cluster=cluster))
 try:
 servers.start_replica(dc_from, dc_to)
 except RedisSwitchError:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d4b57c45118ee97c973cad033369db6034138b3
Gerrit-PatchSet: 1
Gerrit-Project: operations/switchdc
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: Giuseppe Lavagetto 
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/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1073"

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

Change subject: Revert "db-eqiad.php: Depool db1073"
..


Revert "db-eqiad.php: Depool db1073"

This reverts commit a6ea31600fe7da1c40ecf5d1bf0e92259f7743ad.

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

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 7e7f3d0..c9b620b 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -98,9 +98,9 @@
'db1051' => 50,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 50,  # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
-   'db1066' => 20,  # D1 2.8TB 160GB, api #less main traffic 
weight T142725
-   'db1072' => 20,  # B2 2.8TB 160GB, api #less main traffic 
weight T142725
-#  'db1073' => 50,  # B3 2.8TB 160GB, api #T142725
+   'db1066' => 50,  # D1 2.8TB 160GB, api
+   'db1072' => 50,  # B2 2.8TB 160GB, api
+   'db1073' => 50,  # B3 2.8TB 160GB, api
'db1080' => 500, # A2 3.6TB 512GB
'db1083' => 500, # B1 3.6TB 512GB
'db1089' => 500, # C3 3.6TB 512GB
@@ -265,7 +265,7 @@
'api' => [
'db1066' => 1,
'db1072' => 1,
-#  'db1073' => 1,
+   'db1073' => 1,
],
],
's2' => [

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

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

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


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

2017-04-10 Thread Marostegui (Code Review)
Hello Florianschmidtwelzow, jenkins-bot, Jcrespo,

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

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

to review the following change.


Change subject: Revert "db-eqiad.php: Depool db1073"
..

Revert "db-eqiad.php: Depool db1073"

This reverts commit a6ea31600fe7da1c40ecf5d1bf0e92259f7743ad.

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


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 6439ab3..a40b535 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -98,9 +98,9 @@
'db1051' => 50,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
-   'db1066' => 20,  # D1 2.8TB 160GB, api #less main traffic 
weight T142725
-   'db1072' => 20,  # B2 2.8TB 160GB, api #less main traffic 
weight T142725
-#  'db1073' => 50,  # B3 2.8TB 160GB, api #T142725
+   'db1066' => 50,  # D1 2.8TB 160GB, api
+   'db1072' => 50,  # B2 2.8TB 160GB, api
+   'db1073' => 50,  # B3 2.8TB 160GB, api
'db1080' => 500, # A2 3.6TB 512GB
'db1083' => 500, # B1 3.6TB 512GB
'db1089' => 500, # C3 3.6TB 512GB
@@ -265,7 +265,7 @@
'api' => [
'db1066' => 1,
'db1072' => 1,
-#  'db1073' => 1,
+   'db1073' => 1,
],
],
's2' => [

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

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

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


[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: [WIP] Sample input sessions

2017-04-10 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347566 )

Change subject: [WIP] Sample input sessions
..

[WIP] Sample input sessions

There are generally many more input sessions than we want/need to use to
train a ranker. Add mjolnir.sampling for taking the input click logs and
sampling it down to some pre-determined size per wiki.  Also applies
constraints, such as max queries per day per ip and minimum sessions per
query.

TODO:
* Whatever input dataframe is passed in runs through the full calculation
  three times: Once to get counts to decide fractions, once to sample the
  (wikiid, norm_query) list, and a final round when joining the sampled
  queries back in. This seems incredibly inefficient, but I can't figure
  out how to unpersist after it's no longer needed, as the returned
  dataframe is lazy and not-yet materialized.
* Needs tests, which requires figuring out what to do with the stemmer,
  which comes from the refinery-hive jar and ideally won't be necessary
  for running tests. Not sure best solution yet though. Perhaps
  normalization, filtering for q_by_ip_day, and filtering for a
  minimum number of sessions per norm query should go elsewhere, but
  not sure where yet

Change-Id: I4df347f888361f0682c231abd4746541157b2a6b
---
A mjolnir/sampling.py
A mjolnir/test/fixtures/sample_input.py
2 files changed, 65 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/66/347566/1

diff --git a/mjolnir/sampling.py b/mjolnir/sampling.py
new file mode 100644
index 000..88c69fa
--- /dev/null
+++ b/mjolnir/sampling.py
@@ -0,0 +1,64 @@
+"""
+Takes in the full click logs and samples down to a set appropriate
+for running through the MLR pipeline.
+"""
+
+from pyspark.sql import Window
+from pyspark.sql import functions as F
+from . import spark
+
+def sample(df, seed=None, queries_per_wiki=1, min_sessions_per_query=35):
+""" Sample the input dataframe down to queries_per_wiki. 
+
+Params:
+df: Input dataframe with columns wikiid, query, session_id and 
q_by_ip_day
+seed: The random seed used when sampling.
+queries_per_wiki: The desired number of distinct normalized
+  queries per wikiid in the output. 
+min_sessions_per_query: To train the DBN later in the pipeline we need
+some minimum number of sessions per query.
+
+Returns:
+The input DataFrame, with all columns it origionally had, but sampled
+down to a limited number of distinct normalized queries per wikiid.
+"""
+spark.assert_columns(df, ['wikiid', 'query', 'q_by_ip_day', 'session_id'])
+
+# Should this be conditional, or expected to be done elsewhere? Not sure.
+# It's rather inconvenient here, as we then need the refinery jar to run 
tests.
+df.sql_ctx.sql("CREATE TEMPORARY FUNCTION stemmer AS 
'org.wikimedia.anlytics.refinery.hive.StemmerUDF'")
+
+df = (
+df
+# Brute force attempt at bot filtering. 
+# TODO: Does this belong somewhere else?  We don't have any somewhere
+# else yet, so for the moment this is reasonable
+.where(df.q_by_ip_day < 50)
+# We need some minimum number of sessions per query to train the DBN
+.where(F.countDistinct('session_id').over(Window.partitionBy('wikiid', 
'norm_query')) > min_sessions_per_query)
+# Allow grouping together similar queries by adding in a normalized
+# version of the query to sample against. This will also be used in the
+# DBN to decide what queries to consider equivalent.
+# TODO: This may be too brute force for grouping queries, it works as a
+# first try but we might also want to take into account overlap of the
+# result sets. That might be expensive though.
+# TODO: This makes the very bold assumption the first two characters of
+# a wikiid is the language. True often enough, but certainly not 
always.
+# Might need a table to join in with proper language data.
+.withColumn('norm_query', F.expr('stemmer(query, substr(wikiid, 1, 
2))')))
+
+# We want to sample not from the origional dataframe, but from a list of
+# distinct (wikiid, norm_query) pairs, so that we can select all sessions
+# involved in a partiticular query. 
+df_queries = (
+df
+.select('wikiid', 'norm_query')
+.dropDuplicates())
+
+per_wiki_counts = (
+df_queries
+.groupBy('wikiid').agg(F.count('norm_query').alias('num_norm_queries'))
+.collect())
+fractions = {row.wikiid: min(1.0, float(queries_per_wiki) / 
row.num_norm_queries for row in per_wiki_counts}
+sampled = df_queries.sampleBy('wikiid', fractions, seed=seed)
+return df.join(sampled, how='inner', on=['wikiid', 'norm_query'])
diff --git a/mjolnir/test/fixture

[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: Update debian/copyright for 1.28

2017-04-10 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347560 )

Change subject: Update debian/copyright for 1.28
..


Update debian/copyright for 1.28

Change-Id: I4a169a42c7c07c1241ec0bc0420dd972f11cdc43
---
M debian/copyright
1 file changed, 23 insertions(+), 3 deletions(-)

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



diff --git a/debian/copyright b/debian/copyright
index 78131e5..f43e671 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -17,7 +17,7 @@
Trevor Parscal
 License: GPL-2.0+
 
-Files: extensions/Cite/CiteDataModule.php 
extensions/Cite/CiteCSSFileModule.php extensions/Cite/CiteHooks.php 
extensions/Cite/modules/ve-cite/*
+Files: extensions/Cite/includes/CiteDataModule.php 
extensions/Cite/includes/CiteHooks.php extensions/Cite/modules/ve-cite/*
 Copyright: 2011-2016, Cite VisualEditor Team and others
 License: Expat
 
@@ -138,7 +138,7 @@
 Copyright: 2010, Wikimedia Foundation
 License: Apache-2.0
 
-Files: includes/libs/IEContentAnalyzer.php
+Files: includes/libs/mime/IEContentAnalyzer.php
 Copyright: Tim Starling
 License: Tim-Starling-License
 
@@ -249,6 +249,10 @@
 Copyright: 2011-2015, OOjs Team and other contributors
 License: Expat
 
+Files: resources/lib/oojs-router/*
+Copyright: 2011-2016, OOjs Team and other contributors
+License: Expat
+
 Files: resources/lib/oojs-ui/*
 Copyright: 2011-2015, OOjs Team and other contributors
 License: Expat
@@ -350,9 +354,13 @@
 Copyright: 2011, Neuman Vong
 License: BSD-3-clause
 
+Files: vendor/james-heinrich/getid3/*
+Copyright: James Heinrich
+License: GPL-2.0+
+
 Files: vendor/justinrainbow/json-schema/*
 Copyright: 2008, Gradua Networks
-License: BSD-3-clause
+License: Expat
 
 Files: vendor/liuggio/statsd-php-client/*
 Copyright: Giulio De Donato
@@ -419,6 +427,10 @@
   Martin Jansen 
 License: BSD-2-clause
 
+Files: vendor/pimple/pimple/*
+Copyright: 2009-2014, Fabien Potencier
+License: Expat
+
 Files: vendor/psr/log/*
 Copyright: 2012, PHP Framework Interoperability Group
 License: Expat
@@ -476,6 +488,10 @@
 Copyright: Ori Livneh
 License: GPL-2.0+
 
+Files: vendor/wikimedia/scoped-callback/*
+Copyright: 2016, Aaron Schulz 
+License: GPL-2.0+
+
 Files: vendor/wikimedia/textcat/*
 Copyright: Stanislav Malyshev
 License: LGPL-2.1
@@ -484,6 +500,10 @@
 Copyright: 2004, Brion Vibber 
 License: GPL-2.0+
 
+Files: vendor/wikimedia/wait-condition-loop/*
+Copyright: 2016, Aaron Schulz 
+License: GPL-2.0+
+
 Files: vendor/wikimedia/wrappedstring/*
 Copyright: 2015, Timo Tijhof 
 License: Expat

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a169a42c7c07c1241ec0bc0420dd972f11cdc43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: Prep for packaging 1.28

2017-04-10 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347556 )

Change subject: Prep for packaging 1.28
..


Prep for packaging 1.28

The -stable branches will be used to track MediaWiki's latest stable
release instead of just LTS versions.

Change-Id: I13d8eec377a60d327730260902c6f24dd7f48b6f
---
M debian/gbp.conf
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/debian/gbp.conf b/debian/gbp.conf
index 8e45551..8bb1360 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,3 +1,4 @@
 [DEFAULT]
-debian-branch = master
+debian-branch = master-stable
 sign-tags = true
+upstream-branch = upstream-stable

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13d8eec377a60d327730260902c6f24dd7f48b6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: Update debian/watch to follow 1.28

2017-04-10 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347557 )

Change subject: Update debian/watch to follow 1.28
..


Update debian/watch to follow 1.28

Change-Id: Ic04cbd6288ea81605c19a029459fcb47ab224887
---
M debian/watch
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/debian/watch b/debian/watch
index a1ec0ab..c3b79f8 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
 version=3
 
 opts="dversionmangle=s/^[0-9]+://;s/\+dfsg$//,pgpsigurlmangle=s/$/.sig/" \
-https://releases.wikimedia.org/mediawiki/1.27/ mediawiki-([0-9.]*).tar.gz
+https://releases.wikimedia.org/mediawiki/1.28/ mediawiki-([0-9.]*).tar.gz

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic04cbd6288ea81605c19a029459fcb47ab224887
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: chmod -x includes/specials/SpecialNewpages.php

2017-04-10 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347559 )

Change subject: chmod -x includes/specials/SpecialNewpages.php
..


chmod -x includes/specials/SpecialNewpages.php

Change-Id: I35b53879cf66a0640714346852244bed94eea46f
---
M debian/rules
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/debian/rules b/debian/rules
index 5f43c70..f92ed29 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,8 @@
chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/pear/mail_mime-decode/Mail/mimePart.php
chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/pear/mail_mime-decode/Mail/mimeDecode.php
chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/pear/mail_mime-decode/xmail.xsl
+   # Fixed upstream already: https://gerrit.wikimedia.org/r/347519
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/includes/specials/SpecialNewpages.php
# These were fixed upstream already: 
https://github.com/liuggio/statsd-php-client/pull/52
chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Entity/StatsdData.php
chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/liuggio/statsd-php-client/tests/Liuggio/StatsdClient/StatsdDataFactoryTest.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35b53879cf66a0640714346852244bed94eea46f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: Merge tag 'upstream/1.28.1' into master-stable

2017-04-10 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347558 )

Change subject: Merge tag 'upstream/1.28.1' into master-stable
..


Merge tag 'upstream/1.28.1' into master-stable

Upstream version 1.28.1

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id597b7c2edcbfb42f721198e8c4458e458eae34d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Enable "trailing poller" functionality for production.

2017-04-10 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347565 )

Change subject: Enable "trailing poller" functionality for production.
..

Enable "trailing poller" functionality for production.

Note: should not be merged before I21a77f4d32b903dac4d9b1a842d8af78d6f9c5ed
has been deployed.

Bug: T161342
Change-Id: I4ffaff9f13f94acc228be107683c86542cb15799
---
M hieradata/role/common/wdqs.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/65/347565/1

diff --git a/hieradata/role/common/wdqs.yaml b/hieradata/role/common/wdqs.yaml
index be3590b..1dbf8d2 100644
--- a/hieradata/role/common/wdqs.yaml
+++ b/hieradata/role/common/wdqs.yaml
@@ -1,5 +1,5 @@
 wdqs::gui::log_aggregator:  'logstash1001.eqiad.wmnet:10514'
-wdqs::updater::options: '-n wdq -- -b 500'
+wdqs::updater::options: '-n wdq -- -b 500 -T 1200'
 wdqs::service::config_file: /etc/wdqs/RWStore.properties
 wdqs::endpoint: 'https://query.wikidata.org'
 admin::groups:

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Fixes for (embed) editing with Query Helper

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

Change subject: Fixes for (embed) editing with Query Helper
..


Fixes for (embed) editing with Query Helper

-debounce query execution
-update query URL
-empty result
-no underscore in created SPARQL variables

Change-Id: I98faedb2706894020dbc817b7214c39873f8a519
---
M embed.html
M wikibase/queryService/ui/visualEditor/VisualEditor.js
2 files changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/embed.html b/embed.html
index 7245077..edf90ba 100644
--- a/embed.html
+++ b/embed.html
@@ -210,9 +210,9 @@
 
function renderEdit( query, callback ) {
var ve = new 
wikibase.queryService.ui.visualEditor.VisualEditor();
-   ve.setChangeListener( function( v ) {
+   ve.setChangeListener( _.debounce( function( v ) 
{
callback( v.getQuery() );
-   } );
+   }, 1500 ) );
 
var $editor = $( '' );
ve.setQuery( query );
@@ -227,9 +227,13 @@
}
 
function renderQuery( query ) {
+   $( '.edit-link' ).attr( 'href', 
'https://query.wikidata.org/' + window.location.hash )
+   window.location.hash = '#' + 
encodeURIComponent( query )
+
var browser = getResultBrowser( query );
var api = new 
wikibase.queryService.api.Sparql();
$( '#query-result' ).hide();
+   $( '#query-result' ).empty();
$( '#progress' ).show();
api.query( query ).done( function() {
try {
@@ -247,7 +251,6 @@
} );
}
 
-   $( '.edit-link' ).attr( 'href', 
'https://query.wikidata.org/' + window.location.hash )
var query = decodeURIComponent( 
window.location.hash.substr( 1 ) );
renderQuery( query );
renderEdit( query, renderQuery );
diff --git a/wikibase/queryService/ui/visualEditor/VisualEditor.js 
b/wikibase/queryService/ui/visualEditor/VisualEditor.js
index b65fb6e..3327c31 100644
--- a/wikibase/queryService/ui/visualEditor/VisualEditor.js
+++ b/wikibase/queryService/ui/visualEditor/VisualEditor.js
@@ -424,7 +424,7 @@
if ( !subject ) {
return;
}
-   var variable2 = '?_' + name.replace( /( |[^a-z0-9])/gi, 
'_' );// FIXME technical debt
+   var variable2 = '?' + name.replace( /( |[^a-z0-9])/gi, 
'_' );// FIXME technical debt
 
var triple = self._query.addTriple( subject, prop, 
variable2, true );
self._query.addVariable( variable2 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98faedb2706894020dbc817b7214c39873f8a519
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
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] wikidata...rdf[master]: Check for lastContinue being null

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

Change subject: Check for lastContinue being null
..


Check for lastContinue being null

Change-Id: I50e4f4c8b3b3ac0d099cdd56bc0a1d5437dca45d
---
M 
tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
index 6d32367..f0b82ca 100644
--- 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
+++ 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
@@ -195,8 +195,12 @@
 
 @Override
 public String leftOffHuman() {
-return WikibaseRepository.inputDateFormat().format(leftOffDate)
-+ " (next: " + lastContinue.get("rccontinue").toString() + ")";
+if (lastContinue != null) {
+return WikibaseRepository.inputDateFormat().format(leftOffDate)
++ " (next: " + lastContinue.get("rccontinue").toString() + 
")";
+} else {
+return 
WikibaseRepository.inputDateFormat().format(leftOffDate);
+}
 }
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50e4f4c8b3b3ac0d099cdd56bc0a1d5437dca45d
Gerrit-PatchSet: 2
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
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] mediawiki...deploy[master]: Scap2 Config: Fix Jinja syntax - s/end/endif

2017-04-10 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347564 )

Change subject: Scap2 Config: Fix Jinja syntax - s/end/endif
..


Scap2 Config: Fix Jinja syntax - s/end/endif

Bug: T116335
Change-Id: I9107054ae04afe609980413db8af72c85431dfbc
---
M scap/environments/beta/templates/config.yaml.j2
M scap/templates/config.yaml.j2
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/scap/environments/beta/templates/config.yaml.j2 
b/scap/environments/beta/templates/config.yaml.j2
index 7d7057e..91b9b29 100644
--- a/scap/environments/beta/templates/config.yaml.j2
+++ b/scap/environments/beta/templates/config.yaml.j2
@@ -40,7 +40,7 @@
 address: <%= ipaddress %>
 port: 3050
   seeds: ['<%= rl_seeds|join("','") %>']
-<% end %>
+<% endif %>
 
 # load & parametrise project templates. These are referenced / shared
 # between domains in the root_spec further down.
@@ -62,7 +62,7 @@
 <% for key, value in cassandra_tls.iteritems() -%>
  <%= key %>: <%= value %>
 <% endfor -%>
-<% end -%>
+<% endif -%>
   storage_groups:
 # Catch-all group
 - name: default.group.local
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 5836408..4f82014 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -45,7 +45,7 @@
 address: <%= ipaddress %>
 port: 3050
   seeds: ['<%= rl_seeds|join("','") %>']
-<% end %>
+<% endif %>
 
 # load & parametrise project templates. These are referenced / shared
 # between domains in the root_spec further down.
@@ -67,7 +67,7 @@
 <% for key, value in cassandra_tls.iteritems() -%>
  <%= key %>: <%= value %>
 <% endfor -%>
-<% end -%>
+<% endif -%>
   storage_groups:
 - name: phase0.group.local
   domains:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9107054ae04afe609980413db8af72c85431dfbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Scap2 Config: Fix Jinja syntax - s/end/endif

2017-04-10 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347564 )

Change subject: Scap2 Config: Fix Jinja syntax - s/end/endif
..

Scap2 Config: Fix Jinja syntax - s/end/endif

Bug: T116335
Change-Id: I9107054ae04afe609980413db8af72c85431dfbc
---
M scap/environments/beta/templates/config.yaml.j2
M scap/templates/config.yaml.j2
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy 
refs/changes/64/347564/1

diff --git a/scap/environments/beta/templates/config.yaml.j2 
b/scap/environments/beta/templates/config.yaml.j2
index 7d7057e..91b9b29 100644
--- a/scap/environments/beta/templates/config.yaml.j2
+++ b/scap/environments/beta/templates/config.yaml.j2
@@ -40,7 +40,7 @@
 address: <%= ipaddress %>
 port: 3050
   seeds: ['<%= rl_seeds|join("','") %>']
-<% end %>
+<% endif %>
 
 # load & parametrise project templates. These are referenced / shared
 # between domains in the root_spec further down.
@@ -62,7 +62,7 @@
 <% for key, value in cassandra_tls.iteritems() -%>
  <%= key %>: <%= value %>
 <% endfor -%>
-<% end -%>
+<% endif -%>
   storage_groups:
 # Catch-all group
 - name: default.group.local
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 5836408..4f82014 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -45,7 +45,7 @@
 address: <%= ipaddress %>
 port: 3050
   seeds: ['<%= rl_seeds|join("','") %>']
-<% end %>
+<% endif %>
 
 # load & parametrise project templates. These are referenced / shared
 # between domains in the root_spec further down.
@@ -67,7 +67,7 @@
 <% for key, value in cassandra_tls.iteritems() -%>
  <%= key %>: <%= value %>
 <% endfor -%>
-<% end -%>
+<% endif -%>
   storage_groups:
 - name: phase0.group.local
   domains:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9107054ae04afe609980413db8af72c85431dfbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Migrate to Scap3 config deploys

2017-04-10 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347562 )

Change subject: Migrate to Scap3 config deploys
..


Migrate to Scap3 config deploys

Bug: T116335
Change-Id: Ie3ea20b2e1fd7b627288484d4a8ff91201872e1a
---
A scap/config-files.yaml
M scap/environments/beta/scap.cfg
A scap/environments/beta/templates/config.yaml.j2
A scap/environments/beta/vars.yaml
M scap/environments/dev-cluster/scap.cfg
A scap/environments/dev-cluster/vars.yaml
M scap/environments/staging/scap.cfg
A scap/environments/staging/vars.yaml
M scap/scap.cfg
A scap/templates/config.yaml.j2
A scap/vars.yaml
11 files changed, 1,233 insertions(+), 1 deletion(-)

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



diff --git a/scap/config-files.yaml b/scap/config-files.yaml
new file mode 100644
index 000..ee53fde
--- /dev/null
+++ b/scap/config-files.yaml
@@ -0,0 +1,5 @@
+---
+/etc/restbase/config.yaml:
+  template: config.yaml.j2
+  erb_syntax: True
+  remote_vars: /etc/restbase/config-vars.yaml
diff --git a/scap/environments/beta/scap.cfg b/scap/environments/beta/scap.cfg
index b8c4813..949454b 100644
--- a/scap/environments/beta/scap.cfg
+++ b/scap/environments/beta/scap.cfg
@@ -9,6 +9,7 @@
 service_port: 7231
 service_timeout: 240
 lock_file: /tmp/scap.restbase.lock
+config_deploy: True
 # XXX: End of copied contents
 git_server: deployment-tin.deployment-prep.eqiad.wmflabs
 server_groups: default
diff --git a/scap/environments/beta/templates/config.yaml.j2 
b/scap/environments/beta/templates/config.yaml.j2
new file mode 100644
index 000..7d7057e
--- /dev/null
+++ b/scap/environments/beta/templates/config.yaml.j2
@@ -0,0 +1,216 @@
+# Number of worker processes to spawn.
+# Set to 0 to run everything in a single process without clustering.
+# Use 'ncpu' to run as many workers as there are CPU units
+num_workers: ncpu
+
+# Log error messages and gracefully restart a worker if v8 reports that it
+# uses more heap (note: not RSS) than this many mb.
+worker_heap_limit_mb: 300
+
+# The maximum interval in ms that can pass between two beat messages
+# sent by each worker to the master before it is killed.
+worker_heartbeat_timeout: 7500
+
+# Tell service-runner where the root dir of the service is
+app_base_path: /srv/deployment/restbase/deploy/restbase
+
+# Logger info
+logging:
+  level: warn
+  name: <%= log_name %>
+  streams:
+- host: <%= logstash_host %>
+  port: <%= logstash_port %>
+  type: gelf
+- path: <%= log_file %>
+  type: file
+
+# Statsd metrics reporter
+metrics:
+  name: <%= metrics_name %>
+  host: <%= metrics_host %>
+  port: <%= metrics_port %>
+  type: statsd
+  batch: true
+
+<% if rl_seeds|length > 0 %>
+ratelimiter:
+  type: kademlia
+  listen:
+address: <%= ipaddress %>
+port: 3050
+  seeds: ['<%= rl_seeds|join("','") %>']
+<% end %>
+
+# load & parametrise project templates. These are referenced / shared
+# between domains in the root_spec further down.
+default_project: &default_project
+  x-modules:
+- path: projects/wmf_default.yaml
+  options: &default_options
+table:
+  backend: cassandra
+  hosts: ['<%= seeds|join("','") %>']
+  keyspace: system
+  localDc: <%= cassandra_local_dc %>
+  datacenters: ['<%= cassandra_datacenters|join("','") %>']
+  username: <%= cassandra_user %>
+  password: <%= cassandra_password %>
+  defaultConsistency: <%= cassandra_default_consistency %>
+<% if cassandra_tls is not None and cassandra_tls|length > 0 -%>
+  tls:
+<% for key, value in cassandra_tls.iteritems() -%>
+ <%= key %>: <%= value %>
+<% endfor -%>
+<% end -%>
+  storage_groups:
+# Catch-all group
+- name: default.group.local
+  domains: /./
+parsoid:
+  host: <%= parsoid_uri %>
+action:
+  apiUriTemplate: <%= mwapi_uri %>
+  baseUriTemplate: "{{'https://{domain}/api/rest_v1'}}"
+graphoid:
+  host: <%= graphoid_uri %>
+mathoid:
+  host: <%= mathoid_uri %>
+  # 10 days Varnish caching, one day client-side
+  cache-control: s-maxage=864000, max-age=86400
+mobileapps:
+  host: <%= mobileapps_uri %>
+citoid:
+  host: <%= citoid_uri %>
+events:
+  uri: <%= eventlogging_service_uri %>
+  topic: resource_change
+  transcludes_topic: change-prop.transcludes.resource-change
+related:
+  cache_control: s-maxage=86400, max-age=3600
+# Cache headers for purged end points.
+purged_cache_control: s-maxage=1209600, max-age=0, must-revalidate
+skip_updates: <%= skip_updates %>
+pdf:
+  cache_control: s-maxage=600, max-age=600
+  uri: <%= pdfrender_uri %>
+  secret: <%= pdfrender_key %>
+
+# A separate project for en.wikipedia

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: chmod -x SpecialNewpages.php

2017-04-10 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347563 )

Change subject: chmod -x SpecialNewpages.php
..

chmod -x SpecialNewpages.php

This is not an executable script.

Change-Id: I1daa0eff24f5a7b65c2df75f44c0e28d0795d9f6
(cherry picked from commit 280d832ef77249f02062eabc21627d447b97d215)
---
M includes/specials/SpecialNewpages.php
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/63/347563/1

diff --git a/includes/specials/SpecialNewpages.php 
b/includes/specials/SpecialNewpages.php
old mode 100755
new mode 100644

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: chmod -x SpecialNewpages.php

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

Change subject: chmod -x SpecialNewpages.php
..


chmod -x SpecialNewpages.php

This is not an executable script.

Change-Id: I1daa0eff24f5a7b65c2df75f44c0e28d0795d9f6
---
M includes/specials/SpecialNewpages.php
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/includes/specials/SpecialNewpages.php 
b/includes/specials/SpecialNewpages.php
old mode 100755
new mode 100644

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Migrate to Scap3 config deploys

2017-04-10 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347562 )

Change subject: Migrate to Scap3 config deploys
..

Migrate to Scap3 config deploys

Bug: T116335
Change-Id: Ie3ea20b2e1fd7b627288484d4a8ff91201872e1a
---
A scap/config-files.yaml
M scap/environments/beta/scap.cfg
A scap/environments/beta/vars.yaml
M scap/environments/dev-cluster/scap.cfg
M scap/environments/staging/scap.cfg
M scap/scap.cfg
A scap/templates/config.yaml.j2
A scap/vars.yaml
8 files changed, 1,015 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy 
refs/changes/62/347562/1

diff --git a/scap/config-files.yaml b/scap/config-files.yaml
new file mode 100644
index 000..ee53fde
--- /dev/null
+++ b/scap/config-files.yaml
@@ -0,0 +1,5 @@
+---
+/etc/restbase/config.yaml:
+  template: config.yaml.j2
+  erb_syntax: True
+  remote_vars: /etc/restbase/config-vars.yaml
diff --git a/scap/environments/beta/scap.cfg b/scap/environments/beta/scap.cfg
index b8c4813..949454b 100644
--- a/scap/environments/beta/scap.cfg
+++ b/scap/environments/beta/scap.cfg
@@ -9,6 +9,7 @@
 service_port: 7231
 service_timeout: 240
 lock_file: /tmp/scap.restbase.lock
+config_deploy: True
 # XXX: End of copied contents
 git_server: deployment-tin.deployment-prep.eqiad.wmflabs
 server_groups: default
diff --git a/scap/environments/beta/vars.yaml b/scap/environments/beta/vars.yaml
new file mode 100644
index 000..885c144
--- /dev/null
+++ b/scap/environments/beta/vars.yaml
@@ -0,0 +1,2 @@
+salt_key: '123456'
+page_size: 10
diff --git a/scap/environments/dev-cluster/scap.cfg 
b/scap/environments/dev-cluster/scap.cfg
index 886bea4..6e8dc58 100644
--- a/scap/environments/dev-cluster/scap.cfg
+++ b/scap/environments/dev-cluster/scap.cfg
@@ -9,6 +9,7 @@
 service_port: 7231
 service_timeout: 240
 lock_file: /tmp/scap.restbase.lock
+config_deploy: True
 # XXX: End of copied contents
 server_groups: canary, default
 dsh_targets: dev-cluster
diff --git a/scap/environments/staging/scap.cfg 
b/scap/environments/staging/scap.cfg
index f9a998e..19c9413 100644
--- a/scap/environments/staging/scap.cfg
+++ b/scap/environments/staging/scap.cfg
@@ -9,8 +9,8 @@
 service_port: 7231
 service_timeout: 240
 lock_file: /tmp/scap.restbase.lock
+config_deploy: True
 # XXX: End of copied contents
 server_groups: canary, default
 dsh_targets: staging
 canary_dsh_targets: staging-canary
-group_size: 2
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 1dfe32e..8b9e766 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -29,6 +29,8 @@
 service_timeout: 240
 # the lock file to use
 lock_file: /tmp/scap.restbase.lock
+# we want Scap3 config deploys
+config_deploy: True
 
 [wmnet]
 git_server: tin.eqiad.wmnet
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
new file mode 100644
index 000..5836408
--- /dev/null
+++ b/scap/templates/config.yaml.j2
@@ -0,0 +1,970 @@
+# Number of worker processes to spawn.
+# Set to 0 to run everything in a single process without clustering.
+# Use 'ncpu' to run as many workers as there are CPU units
+num_workers: ncpu
+
+# Log error messages and gracefully restart a worker if v8 reports that it
+# uses more heap (note: not RSS) than this many mb.
+worker_heap_limit_mb: 300
+
+# The maximum interval in ms that can pass between two beat messages
+# sent by each worker to the master before it is killed.
+worker_heartbeat_timeout: 7500
+
+# Tell service-runner where the root dir of the service is
+app_base_path: /srv/deployment/restbase/deploy/restbase
+
+# Logger info
+logging:
+  level: warn
+  name: <%= log_name %>
+  streams:
+- host: <%= logstash_host %>
+  port: <%= logstash_port %>
+  type: gelf
+- path: <%= log_file %>
+  type: file
+  sampled_levels:
+# Target is about 1 request logged per minute @1000 req/s
+trace/request: 0.5
+# Not sure what the rate of these is, so start conservatively.
+trace/request/slow: 0.001
+
+# Statsd metrics reporter
+metrics:
+  name: <%= metrics_name %>
+  host: <%= metrics_host %>
+  port: <%= metrics_port %>
+  type: statsd
+  batch: true
+
+<% if rl_seeds|length > 0 %>
+ratelimiter:
+  type: kademlia
+  listen:
+address: <%= ipaddress %>
+port: 3050
+  seeds: ['<%= rl_seeds|join("','") %>']
+<% end %>
+
+# load & parametrise project templates. These are referenced / shared
+# between domains in the root_spec further down.
+default_project: &default_project
+  x-modules:
+- path: projects/wmf_default.yaml
+  options: &default_options
+table:
+  backend: cassandra
+  hosts: ['<%= seeds|join("','") %>']
+  keyspace: system
+  localDc: <%= cassandra_local_dc %>
+  datacenters: ['<%= cassandra_datacenters|join("','") %>']
+  username: <%= cassandra_user %>
+  password: <%= cassandra_password %>
+  defaultConsistency: <%= cassandr

[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: Update changelog for 1:1.28.1-1

2017-04-10 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347561 )

Change subject: Update changelog for 1:1.28.1-1
..

Update changelog for 1:1.28.1-1

Change-Id: I3a8d81ff283a30aa6fc4513b98483c3a05bea060
---
M debian/changelog
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/61/347561/1

diff --git a/debian/changelog b/debian/changelog
index 6db2cc8..98e3c2b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+mediawiki (1:1.28.1-1) unstable; urgency=medium
+
+  * New upstream release
+  * Update debian/copyright for file renames and new
+bundled libraries
+  * Remove executable bit from SpecialNewpages.php to
+fix lintian warning
+
+ -- Kunal Mehta   Mon, 10 Apr 2017 14:49:51 -0700
+
 mediawiki (1:1.27.2-1) unstable; urgency=medium
 
   * Improve NEWS file (Closes: #852862, #854352)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a8d81ff283a30aa6fc4513b98483c3a05bea060
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: Update debian/copyright for 1.28

2017-04-10 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347560 )

Change subject: Update debian/copyright for 1.28
..

Update debian/copyright for 1.28

Change-Id: I4a169a42c7c07c1241ec0bc0420dd972f11cdc43
---
M debian/copyright
1 file changed, 23 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/60/347560/1

diff --git a/debian/copyright b/debian/copyright
index 78131e5..f43e671 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -17,7 +17,7 @@
Trevor Parscal
 License: GPL-2.0+
 
-Files: extensions/Cite/CiteDataModule.php 
extensions/Cite/CiteCSSFileModule.php extensions/Cite/CiteHooks.php 
extensions/Cite/modules/ve-cite/*
+Files: extensions/Cite/includes/CiteDataModule.php 
extensions/Cite/includes/CiteHooks.php extensions/Cite/modules/ve-cite/*
 Copyright: 2011-2016, Cite VisualEditor Team and others
 License: Expat
 
@@ -138,7 +138,7 @@
 Copyright: 2010, Wikimedia Foundation
 License: Apache-2.0
 
-Files: includes/libs/IEContentAnalyzer.php
+Files: includes/libs/mime/IEContentAnalyzer.php
 Copyright: Tim Starling
 License: Tim-Starling-License
 
@@ -249,6 +249,10 @@
 Copyright: 2011-2015, OOjs Team and other contributors
 License: Expat
 
+Files: resources/lib/oojs-router/*
+Copyright: 2011-2016, OOjs Team and other contributors
+License: Expat
+
 Files: resources/lib/oojs-ui/*
 Copyright: 2011-2015, OOjs Team and other contributors
 License: Expat
@@ -350,9 +354,13 @@
 Copyright: 2011, Neuman Vong
 License: BSD-3-clause
 
+Files: vendor/james-heinrich/getid3/*
+Copyright: James Heinrich
+License: GPL-2.0+
+
 Files: vendor/justinrainbow/json-schema/*
 Copyright: 2008, Gradua Networks
-License: BSD-3-clause
+License: Expat
 
 Files: vendor/liuggio/statsd-php-client/*
 Copyright: Giulio De Donato
@@ -419,6 +427,10 @@
   Martin Jansen 
 License: BSD-2-clause
 
+Files: vendor/pimple/pimple/*
+Copyright: 2009-2014, Fabien Potencier
+License: Expat
+
 Files: vendor/psr/log/*
 Copyright: 2012, PHP Framework Interoperability Group
 License: Expat
@@ -476,6 +488,10 @@
 Copyright: Ori Livneh
 License: GPL-2.0+
 
+Files: vendor/wikimedia/scoped-callback/*
+Copyright: 2016, Aaron Schulz 
+License: GPL-2.0+
+
 Files: vendor/wikimedia/textcat/*
 Copyright: Stanislav Malyshev
 License: LGPL-2.1
@@ -484,6 +500,10 @@
 Copyright: 2004, Brion Vibber 
 License: GPL-2.0+
 
+Files: vendor/wikimedia/wait-condition-loop/*
+Copyright: 2016, Aaron Schulz 
+License: GPL-2.0+
+
 Files: vendor/wikimedia/wrappedstring/*
 Copyright: 2015, Timo Tijhof 
 License: Expat

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a169a42c7c07c1241ec0bc0420dd972f11cdc43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: Merge tag 'upstream/1.28.1' into master-stable

2017-04-10 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347558 )

Change subject: Merge tag 'upstream/1.28.1' into master-stable
..

Merge tag 'upstream/1.28.1' into master-stable

Upstream version 1.28.1

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/58/347558/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id597b7c2edcbfb42f721198e8c4458e458eae34d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: Update debian/watch to follow 1.28

2017-04-10 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347557 )

Change subject: Update debian/watch to follow 1.28
..

Update debian/watch to follow 1.28

Change-Id: Ic04cbd6288ea81605c19a029459fcb47ab224887
---
M debian/watch
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/57/347557/1

diff --git a/debian/watch b/debian/watch
index a1ec0ab..c3b79f8 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
 version=3
 
 opts="dversionmangle=s/^[0-9]+://;s/\+dfsg$//,pgpsigurlmangle=s/$/.sig/" \
-https://releases.wikimedia.org/mediawiki/1.27/ mediawiki-([0-9.]*).tar.gz
+https://releases.wikimedia.org/mediawiki/1.28/ mediawiki-([0-9.]*).tar.gz

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic04cbd6288ea81605c19a029459fcb47ab224887
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: Prep for packaging 1.28

2017-04-10 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347556 )

Change subject: Prep for packaging 1.28
..

Prep for packaging 1.28

The -stable branches will be used to track MediaWiki's latest stable
release instead of just LTS versions.

Change-Id: I13d8eec377a60d327730260902c6f24dd7f48b6f
---
M debian/gbp.conf
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/56/347556/1

diff --git a/debian/gbp.conf b/debian/gbp.conf
index 8e45551..8bb1360 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,3 +1,4 @@
 [DEFAULT]
-debian-branch = master
+debian-branch = master-stable
 sign-tags = true
+upstream-branch = upstream-stable

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13d8eec377a60d327730260902c6f24dd7f48b6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master-stable]: chmod -x includes/specials/SpecialNewpages.php

2017-04-10 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347559 )

Change subject: chmod -x includes/specials/SpecialNewpages.php
..

chmod -x includes/specials/SpecialNewpages.php

Change-Id: I35b53879cf66a0640714346852244bed94eea46f
---
M debian/rules
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/59/347559/1

diff --git a/debian/rules b/debian/rules
index 5f43c70..f92ed29 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,8 @@
chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/pear/mail_mime-decode/Mail/mimePart.php
chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/pear/mail_mime-decode/Mail/mimeDecode.php
chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/pear/mail_mime-decode/xmail.xsl
+   # Fixed upstream already: https://gerrit.wikimedia.org/r/347519
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/includes/specials/SpecialNewpages.php
# These were fixed upstream already: 
https://github.com/liuggio/statsd-php-client/pull/52
chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Entity/StatsdData.php
chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/liuggio/statsd-php-client/tests/Liuggio/StatsdClient/StatsdDataFactoryTest.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35b53879cf66a0640714346852244bed94eea46f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master-stable
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] oojs/core[master]: build: Use source maps in coverage report

2017-04-10 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347555 )

Change subject: build: Use source maps in coverage report
..

build: Use source maps in coverage report

* Add concat:test which builds dist/oojs.js with source map.
  Not used for 'npm publish' (prepublish: grunt build), but only
  used by 'npm test' because this source map will not be distributed
  and doesn't normally make sense. We already have a source map
  in the release from oojs.min.js to oojs.js, besides the 'src/'
  file names don't make sense outside the release.

* Add karma-remap-instanbul which will take the raw coverage
  JSON data and use the sourceMap to map it back to the original
  before writing the HTML report.

End result: Coverage report reports coverage for each src file
file separately as one would expect.

Change-Id: I0939c217146e5ee95e555435240a7f1e371b901d
---
M Gruntfile.js
M package.json
2 files changed, 33 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/55/347555/1

diff --git a/Gruntfile.js b/Gruntfile.js
index 9f9f498..bd72739 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -12,7 +12,19 @@
 
 /* eslint-env node */
 module.exports = function ( grunt ) {
-   var sauceBrowsers = require( './tests/saucelabs.browsers.js' );
+   var sauceBrowsers = require( './tests/saucelabs.browsers.js' ),
+   concatFiles = [
+   'src/intro.js.txt',
+   'src/core.js',
+   'src/util.js',
+   'src/EventEmitter.js',
+   'src/EmitterList.js',
+   'src/SortedEmitterList.js',
+   'src/Registry.js',
+   'src/Factory.js',
+   'src/export.js',
+   'src/outro.js.txt'
+   ];
 
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-contrib-concat' );
@@ -32,18 +44,15 @@
banner: grunt.file.read( 
'src/banner.txt' )
},
dest: 'dist/oojs.js',
-   src: [
-   'src/intro.js.txt',
-   'src/core.js',
-   'src/util.js',
-   'src/EventEmitter.js',
-   'src/EmitterList.js',
-   'src/SortedEmitterList.js',
-   'src/Registry.js',
-   'src/Factory.js',
-   'src/export.js',
-   'src/outro.js.txt'
-   ]
+   src: concatFiles
+   },
+   test: {
+   options: {
+   banner: grunt.file.read( 
'src/banner.txt' ),
+   sourceMap: true
+   },
+   dest: 'dist/oojs.js',
+   src: concatFiles
},
jquery: {
options: {
@@ -128,11 +137,14 @@
preprocessors: {
'dist/*.js': [ 'coverage' ]
},
-   reporters: [ 'dots', 'coverage' ],
-   coverageReporter: { reporters: [
-   { type: 'html', dir: 'coverage/' },
-   { type: 'text-summary' }
-   ] }
+   reporters: [ 'dots', 'coverage', 
'karma-remap-istanbul' ],
+   coverageReporter: { type: 'in-memory' },
+   remapIstanbulReporter: {
+   reports: {
+   'text-summary': null,
+   html: 'coverage/'
+   }
+   }
},
jquery: {
browsers: [ 'Chrome' ],
@@ -172,8 +184,8 @@
} );
} );
 
-   grunt.registerTask( 'build', [ 'clean', 'concat', 'uglify' ] );
-   grunt.registerTask( '_test', [ 'git-build', 'build', 'eslint:dev', 
'karma:main', 'karma:jquery', 'karma:other' ] );
+   grunt.registerTask( 'build', [ 'clean', 'concat:oojs', 'concat:jquery', 
'uglify' ] );
+   grunt.registerTask( '_test', [ 'git-build', 'clean', 'concat:test', 
'concat:jquery', 'eslint:dev', 'karma:

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Add misnested-tag linter category

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

Change subject: Add misnested-tag linter category
..


Add misnested-tag linter category

Change-Id: I3508c68272940d21be6a5c9b78ee34c845debc74
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/CategoryManager.php
M includes/LintErrorsPager.php
5 files changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 90f841b..16e2ad1 100644
--- a/extension.json
+++ b/extension.json
@@ -84,6 +84,10 @@
"deletable-table-tag": {
"severity": "error",
"enabled": true
+   },
+   "misnested-tag": {
+   "severity": "warning",
+   "enabled": true
}
},
"LinterSubmitterWhitelist": {
diff --git a/i18n/en.json b/i18n/en.json
index 736c03b..9d904d8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -15,6 +15,7 @@
"linter-pager-stripped-tag-details": "Stripped tag",
"linter-pager-self-closed-tag-details": "Self-closed tag",
"linter-pager-deletable-table-tag-details": "Table tag that should be 
deleted",
+   "linter-pager-misnested-tag-details": "Misnested tag which should be 
properly nested",
"linter-category-fostered": "Fostered content",
"linter-category-fostered-desc": "These pages have fostered content.",
"linter-category-obsolete-tag": "Obsolete HTML tags",
@@ -29,6 +30,8 @@
"linter-category-self-closed-tag-desc": "These pages have self-closed 
tags.",
"linter-category-deletable-table-tag": "Table tag that should be 
deleted",
"linter-category-deletable-table-tag-desc": "These pages have table 
tags that should be deleted.",
+   "linter-category-misnested-tag": "Misnested tags",
+   "linter-category-misnested-tag-desc": "These pages have misnested tags 
that could be fixed.",
"linter-numerrors": "($1 {{PLURAL:$1|error|errors}})",
"linker-page-title-edit": "$1 ($2)",
"linker-page-edit": "edit",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 20764d1..93c4291 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -17,6 +17,7 @@
"linter-pager-stripped-tag-details": "Table column heading",
"linter-pager-self-closed-tag-details": "Table column heading",
"linter-pager-deletable-table-tag-details": "Table column heading",
+   "linter-pager-misnested-tag-details": "Table column heading",
"linter-category-fostered": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/fostered]]",
"linter-category-fostered-desc": "Description of category.",
"linter-category-obsolete-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/obsolete-tag]]",
@@ -31,6 +32,8 @@
"linter-category-self-closed-tag-desc": "Description of category",
"linter-category-deletable-table-tag": "Name of lint error category. 
See [[:mw:Help:Extension:Linter/deletable-table-tag]]",
"linter-category-deletable-table-tag-desc": "Description of category.",
+   "linter-category-misnested-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/misnested-tag]]",
+   "linter-category-misnested-tag-desc": "Description of category.",
"linter-numerrors": "Shown after a category link to indicate how many 
errors are in that category. $1 is the number of errors, and can be used for 
PLURAL.\n{{Identical|Error}}",
"linker-page-title-edit": "Used in a table cell. $1 is a link to the 
page, $2 is pipe separated links to the edit and history pages, the link text 
is {{msg-mw|linker-page-edit}} and {{msg-mw|linker-page-history}}",
"linker-page-edit": "Link text for edit link in 
{{msg-mw|linker-page-title-edit}}\n{{Identical|Edit}}",
diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php
index a1d0d78..2d529dd 100644
--- a/includes/CategoryManager.php
+++ b/includes/CategoryManager.php
@@ -42,6 +42,7 @@
'stripped-tag' => 5,
'self-closed-tag' => 6,
'deletable-table-tag' => 7,
+   'misnested-tag' => 8,
];
 
/**
diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php
index 4817ba8..81d9b3a 100644
--- a/includes/LintErrorsPager.php
+++ b/includes/LintErrorsPager.php
@@ -110,7 +110,7 @@
case 'details':
// While deletable-table-tag has params set, it 
adds no new information
// and is not included here since the error 
category has the tag name.
-   $hasNameCats = [ 'obsolete-tag', 
'missing-end-tag', 'self-c

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "dnsrecursor: update to backports for transition"

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347554 )

Change subject: Revert "dnsrecursor: update to backports for transition"
..


Revert "dnsrecursor: update to backports for transition"

This reverts commit c4881821c4eaf92a064c5132f090183f4d3d7937.

Change-Id: I85dfb0655d2ccd16538d09763f6dd8583e8a
---
M modules/dnsrecursor/manifests/init.pp
1 file changed, 4 insertions(+), 12 deletions(-)

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



diff --git a/modules/dnsrecursor/manifests/init.pp 
b/modules/dnsrecursor/manifests/init.pp
index 3cce539..935a6a9 100644
--- a/modules/dnsrecursor/manifests/init.pp
+++ b/modules/dnsrecursor/manifests/init.pp
@@ -72,23 +72,15 @@
 priority => '1001',
 before   => Package['pdns-recursor'],
 }
-
-package { 'pdns-recursor':
-ensure => 'latest', # temporary during transition!
-}
-}
-else {
-package { 'pdns-recursor':
-ensure => 'present',
-}
 }
 }
 else {
 # trusty instances (labservices metaldns stuff)
 $pdns_rec_ver = '3'
-package { 'pdns-recursor':
-ensure => 'present',
-}
+}
+
+package { 'pdns-recursor':
+ensure => 'present',
 }
 
 file { '/etc/powerdns/recursor.conf':

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "dnsrecursor: update to backports for transition"

2017-04-10 Thread BBlack (Code Review)
Hello Giuseppe Lavagetto, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "dnsrecursor: update to backports for transition"
..

Revert "dnsrecursor: update to backports for transition"

This reverts commit c4881821c4eaf92a064c5132f090183f4d3d7937.

Change-Id: I85dfb0655d2ccd16538d09763f6dd8583e8a
---
M modules/dnsrecursor/manifests/init.pp
1 file changed, 4 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/347554/1

diff --git a/modules/dnsrecursor/manifests/init.pp 
b/modules/dnsrecursor/manifests/init.pp
index 3cce539..935a6a9 100644
--- a/modules/dnsrecursor/manifests/init.pp
+++ b/modules/dnsrecursor/manifests/init.pp
@@ -72,23 +72,15 @@
 priority => '1001',
 before   => Package['pdns-recursor'],
 }
-
-package { 'pdns-recursor':
-ensure => 'latest', # temporary during transition!
-}
-}
-else {
-package { 'pdns-recursor':
-ensure => 'present',
-}
 }
 }
 else {
 # trusty instances (labservices metaldns stuff)
 $pdns_rec_ver = '3'
-package { 'pdns-recursor':
-ensure => 'present',
-}
+}
+
+package { 'pdns-recursor':
+ensure => 'present',
 }
 
 file { '/etc/powerdns/recursor.conf':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85dfb0655d2ccd16538d09763f6dd8583e8a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "esams lvs: do not directly use maerlant, temporarily"

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347553 )

Change subject: Revert "esams lvs: do not directly use maerlant, temporarily"
..


Revert "esams lvs: do not directly use maerlant, temporarily"

This reverts commit 1bd02f40759f9c3754a14bfbc2077259be9625f1.

Change-Id: If786479d29c812a24218fe067a74162b562ffa8d
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 83b8ace..cd0cf23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1803,7 +1803,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (nescio and maerlant) with fallback to eqiad
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '91.198.174.106', '208.80.154.254' ]
+$nameservers_override = [ '91.198.174.106', '91.198.174.122', 
'208.80.154.254' ]
 
 role(lvs::balancer)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If786479d29c812a24218fe067a74162b562ffa8d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "esams lvs: do not directly use maerlant, temporarily"

2017-04-10 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347553 )

Change subject: Revert "esams lvs: do not directly use maerlant, temporarily"
..

Revert "esams lvs: do not directly use maerlant, temporarily"

This reverts commit 1bd02f40759f9c3754a14bfbc2077259be9625f1.

Change-Id: If786479d29c812a24218fe067a74162b562ffa8d
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/53/347553/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 83b8ace..cd0cf23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1803,7 +1803,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (nescio and maerlant) with fallback to eqiad
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '91.198.174.106', '208.80.154.254' ]
+$nameservers_override = [ '91.198.174.106', '91.198.174.122', 
'208.80.154.254' ]
 
 role(lvs::balancer)
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: esams lvs: do not directly use maerlant, temporarily

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347552 )

Change subject: esams lvs: do not directly use maerlant, temporarily
..


esams lvs: do not directly use maerlant, temporarily

Change-Id: I29d2060dd5008837466d0b23baa308a091f21707
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index cd0cf23..83b8ace 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1803,7 +1803,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (nescio and maerlant) with fallback to eqiad
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '91.198.174.106', '91.198.174.122', 
'208.80.154.254' ]
+$nameservers_override = [ '91.198.174.106', '208.80.154.254' ]
 
 role(lvs::balancer)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29d2060dd5008837466d0b23baa308a091f21707
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] oojs/core[master]: EventEmitter: Document disconnect() behaviour regarding arra...

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

Change subject: EventEmitter: Document disconnect() behaviour regarding array 
matching
..


EventEmitter: Document disconnect() behaviour regarding array matching

It was already covered by test, but only in a way that showed parameters
were optional. Added a test case to show they are not only optional, they
are ignored when finding matches.

Bug: T100731
Change-Id: I07df0c1e2e0a964a70ad22957fb27018aedb4b1b
---
M src/EventEmitter.js
M tests/unit/EventEmitter.test.js
2 files changed, 35 insertions(+), 8 deletions(-)

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



diff --git a/src/EventEmitter.js b/src/EventEmitter.js
index 169f3a8..494f145 100644
--- a/src/EventEmitter.js
+++ b/src/EventEmitter.js
@@ -191,7 +191,7 @@
 * @param 
{Object.|Object.|Object.} methods 
List of
 *  event bindings keyed by event name containing either method names, 
functions or arrays containing
 *  method name or function followed by a list of arguments to be 
passed to callback before emitted
-*  arguments
+*  arguments.
 * @chainable
 */
oo.EventEmitter.prototype.connect = function ( context, methods ) {
@@ -217,8 +217,13 @@
 *
 * @param {Object} context Object to disconnect methods from
 * @param 
{Object.|Object.|Object.} 
[methods] List of
-* event bindings keyed by event name. Values can be either method 
names or functions, but must be
-* consistent with those used in the corresponding call to "connect".
+*  event bindings keyed by event name. Values can be either method 
names, functions or arrays
+*  containing a method name.
+*  NOTE: To allow matching call sites with connect(), array values are 
allowed to contain the
+*  parameters as well, but only the method name is used to find 
bindings. Tt is discouraged to
+*  have multiple bindings for the same event to the same listener, but 
if used (and only the
+*  parameters vary), disconnecting one variation of (event name, event 
listener, parameters)
+*  will disconnect other variations as well.
 * @chainable
 */
oo.EventEmitter.prototype.disconnect = function ( context, methods ) {
diff --git a/tests/unit/EventEmitter.test.js b/tests/unit/EventEmitter.test.js
index dd28125..70a8387 100644
--- a/tests/unit/EventEmitter.test.js
+++ b/tests/unit/EventEmitter.test.js
@@ -253,30 +253,52 @@
 
QUnit.test( 'disconnect( host, array methods )', function ( assert ) {
var host,
-   hits = { foo: 0, barbara: 0 },
+   hits = { foo: 0, barbara: 0, barbaraAlt: 0 },
ee = new oo.EventEmitter();
 
host = {
onFoo: function () {
hits.foo++;
},
-   barbara: function () {
-   hits.barbara++;
+   barbara: function ( param ) {
+   if ( param === 'alt' ) {
+   hits.barbaraAlt++;
+   } else {
+   hits.barbara++;
+   }
}
};
 
ee.connect( host, {
foo: 'onFoo',
-   bar: [ 'barbara', 'some', 'parameter' ]
+   bar: [ 'barbara', 'regular' ]
} );
ee.emit( 'foo' );
ee.emit( 'bar' );
+   assert.deepEqual( hits, { foo: 1, barbara: 1, barbaraAlt: 0 } );
 
+   // disconnect finds "barbara" by method name, parameters not 
needed
ee.disconnect( host, { bar: [ 'barbara' ] } );
ee.emit( 'foo' );
ee.emit( 'bar' );
+   assert.deepEqual( hits, { foo: 2, barbara: 1, barbaraAlt: 0 } );
 
-   assert.deepEqual( hits, { foo: 2, barbara: 1 } );
+   ee.connect( host, {
+   bar: [ 'barbara', 'regular' ]
+   } );
+   ee.connect( host, {
+   bar: [ 'barbara', 'alt' ]
+   } );
+   ee.emit( 'bar' );
+   // both barbara's increase
+   assert.deepEqual( hits, { foo: 2, barbara: 2, barbaraAlt: 1 } );
+
+   // disconnect finds both "barbara" by method name, parameters 
ignored
+   ee.disconnect( host, { bar: [ 'barbara', 'ignored' ] } );
+   ee.emit( 'bar' );
+
+   // foo increased, but barabara not (following disconnect of 
both)
+   assert.deepEqual( hits, { foo: 2, barbar

[MediaWiki-commits] [Gerrit] operations/puppet[production]: esams lvs: do not directly use maerlant, temporarily

2017-04-10 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347552 )

Change subject: esams lvs: do not directly use maerlant, temporarily
..

esams lvs: do not directly use maerlant, temporarily

Change-Id: I29d2060dd5008837466d0b23baa308a091f21707
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/347552/1

diff --git a/manifests/site.pp b/manifests/site.pp
index cd0cf23..83b8ace 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1803,7 +1803,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (nescio and maerlant) with fallback to eqiad
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '91.198.174.106', '91.198.174.122', 
'208.80.154.254' ]
+$nameservers_override = [ '91.198.174.106', '208.80.154.254' ]
 
 role(lvs::balancer)
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "eqiad lvs: do not directly use chromium, temporarily"

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347551 )

Change subject: Revert "eqiad lvs: do not directly use chromium, temporarily"
..


Revert "eqiad lvs: do not directly use chromium, temporarily"

This reverts commit 54438d40c2a42b018b1d94e15b753b70d7c5f1d7.

Change-Id: I5218be7b6f43f4b8a061c80807e80590f427994a
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 0d5b5c2..cd0cf23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1501,7 +1501,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.50', '208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
 
 role(lvs::balancer)
 
@@ -1602,7 +1602,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.50', '208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
 
 role(lvs::balancer)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5218be7b6f43f4b8a061c80807e80590f427994a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "eqiad lvs: do not directly use chromium, temporarily"

2017-04-10 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347551 )

Change subject: Revert "eqiad lvs: do not directly use chromium, temporarily"
..

Revert "eqiad lvs: do not directly use chromium, temporarily"

This reverts commit 54438d40c2a42b018b1d94e15b753b70d7c5f1d7.

Change-Id: I5218be7b6f43f4b8a061c80807e80590f427994a
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/347551/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 0d5b5c2..cd0cf23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1501,7 +1501,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.50', '208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
 
 role(lvs::balancer)
 
@@ -1602,7 +1602,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.50', '208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
 
 role(lvs::balancer)
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: interwiki: Remove inappropiate use of wfMemcKey()

2017-04-10 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347550 )

Change subject: interwiki: Remove inappropiate use of wfMemcKey()
..

interwiki: Remove inappropiate use of wfMemcKey()

This is used for lookup in a CDB file or PHP static array.
In neither case is the key created by wfMemcKey() or any other
implementation of BagOStuff::makeKey().

This is already broken if:
* An interwiki prefix were to contain characters not supported by
  Memcached.
* An interwiki prefix and wikiid together are too long for Memcached.
* If the site has wgCachePrefix configured, whicih overridees the
  wfWikiID() namespace makeKey() normally uses.

dumpInterwiki.php does not use wfMemcKey() either (and should not).

This was simply here as leftover from many rewrites ago, its
only purpose is to create wikiid + prefix joined by colon.

Ref T148958.

Change-Id: I45682133ed593fbb0d66af5a67751f77f15a4a14
---
M includes/interwiki/ClassicInterwikiLookup.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/50/347550/1

diff --git a/includes/interwiki/ClassicInterwikiLookup.php 
b/includes/interwiki/ClassicInterwikiLookup.php
index 883b5fa..f19e3db 100644
--- a/includes/interwiki/ClassicInterwikiLookup.php
+++ b/includes/interwiki/ClassicInterwikiLookup.php
@@ -221,7 +221,7 @@
}
}
 
-   $value = $this->getCacheValue( wfMemcKey( $prefix ) );
+   $value = $this->getCacheValue( wfWikiID() . ':' . 
$prefix );
// Site level
if ( $value == '' && $this->interwikiScopes >= 3 ) {
$value = $this->getCacheValue( 
"_{$this->thisSite}:{$prefix}" );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: interwiki: Use makeKey from WANObjectCache instead of wfMemcKey

2017-04-10 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347549 )

Change subject: interwiki: Use makeKey from WANObjectCache instead of wfMemcKey
..

interwiki: Use makeKey from WANObjectCache instead of wfMemcKey

This fixes "Key contains invalid characters" errors.

This is a tiny backport for 1.27, based on the much larger 025f15a208a7,
which fixed the same bug in 1.28 and master.

Bug: T148958
Change-Id: I0de789f70a325fb025e5fa575801a9d610b76ff4
---
M includes/interwiki/Interwiki.php
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/49/347549/1

diff --git a/includes/interwiki/Interwiki.php b/includes/interwiki/Interwiki.php
index f68651b..fca92fa 100644
--- a/includes/interwiki/Interwiki.php
+++ b/includes/interwiki/Interwiki.php
@@ -130,7 +130,7 @@
 */
public static function invalidateCache( $prefix ) {
$cache = ObjectCache::getMainWANInstance();
-   $key = wfMemcKey( 'interwiki', $prefix );
+   $key = $cache->makeKey( 'interwiki', $prefix );
$cache->delete( $key );
unset( static::$smCache[$prefix] );
}
@@ -236,8 +236,9 @@
}
}
 
-   $iwData = ObjectCache::getMainWANInstance()->getWithSetCallback(
-   wfMemcKey( 'interwiki', $prefix ),
+   $cache = ObjectCache::getMainWANInstance();
+   $iwData = $cache->getWithSetCallback(
+   $cache->makeKey( 'interwiki', $prefix ),
$wgInterwikiExpiry,
function ( $oldValue, &$ttl, array &$setOpts ) use ( 
$prefix ) {
$dbr = wfGetDB( DB_SLAVE );

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: eqiad lvs: do not directly use chromium, temporarily

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347548 )

Change subject: eqiad lvs: do not directly use chromium, temporarily
..


eqiad lvs: do not directly use chromium, temporarily

Change-Id: I0375a6367d2fd39619fe5c4458576810d417e761
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index cd0cf23..0d5b5c2 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1501,7 +1501,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
+$nameservers_override = [ '208.80.154.50', '208.80.153.254' ]
 
 role(lvs::balancer)
 
@@ -1602,7 +1602,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
+$nameservers_override = [ '208.80.154.50', '208.80.153.254' ]
 
 role(lvs::balancer)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0375a6367d2fd39619fe5c4458576810d417e761
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: eqiad lvs: do not directly use chromium, temporarily

2017-04-10 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347548 )

Change subject: eqiad lvs: do not directly use chromium, temporarily
..

eqiad lvs: do not directly use chromium, temporarily

Change-Id: I0375a6367d2fd39619fe5c4458576810d417e761
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/347548/1

diff --git a/manifests/site.pp b/manifests/site.pp
index cd0cf23..0d5b5c2 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1501,7 +1501,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
+$nameservers_override = [ '208.80.154.50', '208.80.153.254' ]
 
 role(lvs::balancer)
 
@@ -1602,7 +1602,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
+$nameservers_override = [ '208.80.154.50', '208.80.153.254' ]
 
 role(lvs::balancer)
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "esams lvs: do not directly use nescio, temporarily"

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347547 )

Change subject: Revert "esams lvs: do not directly use nescio, temporarily"
..


Revert "esams lvs: do not directly use nescio, temporarily"

This reverts commit 3c028b4a955b35b2f778c0f0a0d68f56e4620669.

Change-Id: I84c6f4f1bae23bc4c337828cad48069312a9495c
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 56ddf18..cd0cf23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1803,7 +1803,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (nescio and maerlant) with fallback to eqiad
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '91.198.174.122', '208.80.154.254' ]
+$nameservers_override = [ '91.198.174.106', '91.198.174.122', 
'208.80.154.254' ]
 
 role(lvs::balancer)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I84c6f4f1bae23bc4c337828cad48069312a9495c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "esams lvs: do not directly use nescio, temporarily"

2017-04-10 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347547 )

Change subject: Revert "esams lvs: do not directly use nescio, temporarily"
..

Revert "esams lvs: do not directly use nescio, temporarily"

This reverts commit 3c028b4a955b35b2f778c0f0a0d68f56e4620669.

Change-Id: I84c6f4f1bae23bc4c337828cad48069312a9495c
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/347547/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 56ddf18..cd0cf23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1803,7 +1803,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (nescio and maerlant) with fallback to eqiad
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '91.198.174.122', '208.80.154.254' ]
+$nameservers_override = [ '91.198.174.106', '91.198.174.122', 
'208.80.154.254' ]
 
 role(lvs::balancer)
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: esams lvs: do not directly use nescio, temporarily

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347546 )

Change subject: esams lvs: do not directly use nescio, temporarily
..


esams lvs: do not directly use nescio, temporarily

To revert after upgrade complete

Change-Id: I1007043917bbcda0d2ec3fb9994709eff33ecdfe
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index cd0cf23..56ddf18 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1803,7 +1803,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (nescio and maerlant) with fallback to eqiad
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '91.198.174.106', '91.198.174.122', 
'208.80.154.254' ]
+$nameservers_override = [ '91.198.174.122', '208.80.154.254' ]
 
 role(lvs::balancer)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1007043917bbcda0d2ec3fb9994709eff33ecdfe
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: esams lvs: do not directly use nescio, temporarily

2017-04-10 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347546 )

Change subject: esams lvs: do not directly use nescio, temporarily
..

esams lvs: do not directly use nescio, temporarily

To revert after upgrade complete

Change-Id: I1007043917bbcda0d2ec3fb9994709eff33ecdfe
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/347546/1

diff --git a/manifests/site.pp b/manifests/site.pp
index cd0cf23..56ddf18 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1803,7 +1803,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (nescio and maerlant) with fallback to eqiad
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '91.198.174.106', '91.198.174.122', 
'208.80.154.254' ]
+$nameservers_override = [ '91.198.174.122', '208.80.154.254' ]
 
 role(lvs::balancer)
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable user group expiry in production

2017-04-10 Thread TTO (Code Review)
TTO has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347545 )

Change subject: Enable user group expiry in production
..

Enable user group expiry in production

Bug: T159416
Change-Id: I5b495831892c3d31dc0ba531771fdf5354900b20
---
M wmf-config/InitialiseSettings-labs.php
M wmf-config/InitialiseSettings.php
2 files changed, 0 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/45/347545/2

diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 1a10a2a..1b29f82 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -260,10 +260,6 @@
'default' => false,
],
 
-   '-wgDisableUserGroupExpiry' => [
-   'default' => false,
-   ],
-
///
/// --- BetaFeatures start --
///
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f0e8491..12e0fcb 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7660,10 +7660,6 @@
'enwiki' => true, // T152076
 ],
 
-'wgDisableUserGroupExpiry' => [
-   'default' => true,
-],
-
 # groupOverrides @{
 'groupOverrides' => [
// Note: don't change the default setting here, because it won't take

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b495831892c3d31dc0ba531771fdf5354900b20
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: 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]: Hyginee: remove dead code in PageImageDatabaseTable

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

Change subject: Hyginee: remove dead code in PageImageDatabaseTable
..


Hyginee: remove dead code in PageImageDatabaseTable

Change-Id: Id1d4101c93442708207f61dc0a6f44630b47048c
---
M app/src/main/java/org/wikipedia/pageimages/PageImageDatabaseTable.java
1 file changed, 2 insertions(+), 27 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/pageimages/PageImageDatabaseTable.java 
b/app/src/main/java/org/wikipedia/pageimages/PageImageDatabaseTable.java
index 0fc8500..fac27e2 100644
--- a/app/src/main/java/org/wikipedia/pageimages/PageImageDatabaseTable.java
+++ b/app/src/main/java/org/wikipedia/pageimages/PageImageDatabaseTable.java
@@ -3,11 +3,8 @@
 import android.content.ContentValues;
 import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteException;
 import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
 
-import org.wikipedia.WikipediaApp;
 import org.wikipedia.database.DatabaseTable;
 import org.wikipedia.database.column.Column;
 import org.wikipedia.database.contract.PageImageHistoryContract;
@@ -16,6 +13,8 @@
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.util.log.L;
 
+
+// todo: network caching preserves images. Remove this class and drop table?
 public class PageImageDatabaseTable extends DatabaseTable {
 private static final int DB_VER_NAMESPACE_ADDED = 7;
 private static final int DB_VER_NORMALIZED_TITLES = 8;
@@ -42,30 +41,6 @@
 contentValues.put(Col.TITLE.getName(), 
obj.getTitle().getPrefixedText());
 contentValues.put(Col.IMAGE_NAME.getName(), obj.getImageName());
 return contentValues;
-}
-
-// TODO: move to JsonPageLoadStrategy.
-@Nullable
-public String getImageUrlForTitle(WikipediaApp app, PageTitle title) {
-Cursor c = null;
-String thumbnail = null;
-try {
-String searchStr = title.getPrefixedText().replace("'", "''");
-String selection = getTableName() + "." + Col.TITLE.getName() + 
"='" + searchStr + "'";
-c = app.getDatabaseClient(PageImage.class).select(
-selection, new String[] {}, "");
-if (c.getCount() > 0) {
-c.moveToFirst();
-thumbnail = Col.IMAGE_NAME.val(c);
-}
-} catch (SQLiteException e) {
-// page title doesn't exist in database... no problem if it fails.
-} finally {
-if (c != null) {
-c.close();
-}
-}
-return thumbnail;
 }
 
 @NonNull

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1d4101c93442708207f61dc0a6f44630b47048c
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Sniedzielski 
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]: [WIP] oojs-ui: Use dist/*-icon*.css instead re-creating with...

2017-04-10 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347544 )

Change subject: [WIP] oojs-ui: Use dist/*-icon*.css instead re-creating with 
RLIM
..

[WIP] oojs-ui: Use dist/*-icon*.css instead re-creating with RLIM

Known issues:
* While there is a generic icons.json, there is no dist/*-icons.css
  currently in the release.
* The RLIM version of icon packs has additional class names for each
  icon, not just ".oo-ui-icon-".
* Verify that CSSJanus works as expected for these stylesheets.

Benefits:
* Less complexity (kind of).
* Reduce impact of differences between oojs-ui build process
  and RLIM. This is not a risk for custom icons since those would
  only ever be rasterized with RLIM, but for OOjs UI's built-in icons
  we now have two build processes instead of one. The latter one
  (RLIM) is not usually tested until after release and deployment.
* Use optimised PNGs from upstream.

Bug: T128420
Change-Id: Ia8481aa8d79d857184a81fdadc3e211b2cd2012c
---
M maintenance/resources/update-oojs-ui.sh
M resources/ResourcesOOUI.php
2 files changed, 21 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/347544/1

diff --git a/maintenance/resources/update-oojs-ui.sh 
b/maintenance/resources/update-oojs-ui.sh
index dbce7a7..ad24376 100755
--- a/maintenance/resources/update-oojs-ui.sh
+++ b/maintenance/resources/update-oojs-ui.sh
@@ -53,6 +53,8 @@
 cp ./node_modules/oojs-ui/dist/oojs-ui-windows.js "$REPO_DIR/$TARGET_DIR"
 cp ./node_modules/oojs-ui/dist/oojs-ui-windows-{mediawiki,apex}.css 
"$REPO_DIR/$TARGET_DIR"
 cp ./node_modules/oojs-ui/dist/oojs-ui-{mediawiki,apex}.js 
"$REPO_DIR/$TARGET_DIR"
+cp ./node_modules/oojs-ui/dist/oojs-ui-{mediawiki,apex}-icons-*.css 
"$REPO_DIR/$TARGET_DIR"
+rm "$REPO_DIR/$TARGET_DIR/"oojs-ui-*-icons-*.{rtl,min}.css
 cp -R ./node_modules/oojs-ui/dist/i18n "$REPO_DIR/$TARGET_DIR"
 cp -R ./node_modules/oojs-ui/dist/images "$REPO_DIR/$TARGET_DIR"
 cp -R ./node_modules/oojs-ui/dist/themes/mediawiki/images 
"$REPO_DIR/$TARGET_DIR/themes/mediawiki"
diff --git a/resources/ResourcesOOUI.php b/resources/ResourcesOOUI.php
index 9339e98..9881575 100644
--- a/resources/ResourcesOOUI.php
+++ b/resources/ResourcesOOUI.php
@@ -33,13 +33,19 @@
$themes['default'] = 'mediawiki';
 
// Helper function to generate paths to files used in 'skinStyles' and 
'skinScripts'.
-   $getSkinSpecific = function ( $module, $ext = 'css' ) use ( $themes ) {
+   $getSkinSpecific = function ( $module, $ext = 'css', $themeAt = 
'append' ) use ( $themes ) {
return array_combine(
array_keys( $themes ),
array_map( function ( $theme ) use ( $module, $ext ) {
-   $module = $module ? "$module-" : '';
// TODO Allow extensions to specify this path 
somehow
-   return 
"resources/lib/oojs-ui/oojs-ui-$module$theme.$ext";
+   // NOTE: For most files, -{theme} is appended, 
but for
+   // icon stylesheets, theme is prepended instead.
+   if ( $themeAt === 'append' ) {
+   $module = $module ? "$module-" : '';
+   return 
"resources/lib/oojs-ui/oojs-ui-$module$theme.$ext";
+   } else {
+   return 
"resources/lib/oojs-ui/oojs-ui-$theme-$module.$ext";
+   }
}, array_values( $themes ) )
);
};
@@ -147,9 +153,19 @@
'icons-user', // oojs-ui.styles.icons-user
'icons-wikimedia', // oojs-ui.styles.icons-wikimedia
];
+   $basePath = 'resources/lib/oojs-ui';
$rootPath = 'resources/lib/oojs-ui/themes';
 
foreach ( $imageSets as $name ) {
+   if ( substr( $name, 0, 6 ) === 'icons-' ) {
+   $modules["oojs-ui.styles.$name"] = [
+   'class' => 'ResourceLoaderFileModule',
+   'skinStyles' => $getSkinSpecific( $name, 'css', 
'prepend' ),
+   'targets' => [ 'desktop', 'mobile' ],
+   ];
+   continue;
+   }
+
$module = [
'position' => 'top',
'class' => 'ResourceLoaderOOUIImageModule',

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

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

___
MediaWiki-commits mailing 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: consolidate image widening CSS and JS in applib

2017-04-10 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347543 )

Change subject: Hygiene: consolidate image widening CSS and JS in applib
..

Hygiene: consolidate image widening CSS and JS in applib

Move the common CSS and JavaScript between Android and iOS from
MobileApp and Android into applib.

https://github.com/wikimedia/applib/pull/8
https://github.com/wikimedia/wikipedia-ios/pull/1313
https://github.com/wikimedia/wikipedia-ios/pull/1305

Change-Id: I04a8621ca1eca700351fa81a4096b889fd0bf9ca
Depends-On: Id0a0e04907129b3eb40c468468748eb787e838f2
Bug: T159194
---
A app/src/main/assets/applib.css
M app/src/main/assets/bundle.js
M app/src/main/assets/index.html
M app/src/main/assets/preview.css
M app/src/main/assets/styles.css
M www/Gruntfile.js
M www/index.html
M www/js/transforms/collapseTables.js
M www/js/transforms/widenImages.js
M www/package.json
10 files changed, 230 insertions(+), 177 deletions(-)


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

diff --git a/app/src/main/assets/applib.css b/app/src/main/assets/applib.css
new file mode 100644
index 000..154d7be
--- /dev/null
+++ b/app/src/main/assets/applib.css
@@ -0,0 +1,51 @@
+.wideImageOverride {
+/* Center images. */
+display: block;
+margin-left: auto;
+margin-right: auto;
+/* Ensure widening can take effect with proportional height change */
+height: auto !important;
+}
+
+@media (orientation: portrait) {
+.wideImageOverride {
+width: 100% !important;
+max-width: 100% !important;
+height: auto !important;
+}
+
+/* Tablet override */
+@media (min-device-width: 768px) {
+.wideImageOverride {
+width: 60% !important;
+max-width: 60% !important;
+height: auto !important;
+}
+}
+}
+
+@media (orientation: landscape) {
+.wideImageOverride {
+width: 50% !important;
+max-width: 50% !important;
+height: auto !important;
+}
+}
+
+/* Center text beneath images now that images are centered. */
+.thumbinner, .gallerytext {
+text-align: center;
+}
+
+/* Add a little breathing room beneath thumb captions - see enwiki "Vincent 
van Gogh > Paris (1886-1888)" */
+.thumbcaption {
+margin-bottom: 1.5em !important;
+}
+
+/* Wrangle extra margin - see enwiki "Claude Monet > Impressionism" */
+li.gallerybox div.thumb > div {
+margin: 0px !important;
+}
+div.gallerytext > p {
+margin-top: 0px !important;
+}
\ No newline at end of file
diff --git a/app/src/main/assets/bundle.js b/app/src/main/assets/bundle.js
index 0cccf25..a6954ab 100644
--- a/app/src/main/assets/bundle.js
+++ b/app/src/main/assets/bundle.js
@@ -759,7 +759,7 @@
 }
 } );
 
},{"../transformer":14,"../utilities":25}],17:[function(require,module,exports){
-var getTableHeader = require("applib").CollapseElement.getTableHeader;
+var getTableHeader = require("applib").CollapseTable.getTableHeader;
 var transformer = require("../transformer");
 
 function handleTableCollapseOrExpandClick() {
@@ -1106,47 +1106,20 @@
 }
 } );
 },{"../transformer":14}],24:[function(require,module,exports){
+var maybeWidenImage = require('applib').WidenImage.maybeWidenImage;
 var transformer = require("../transformer");
 var utilities = require("../utilities");
 
 var maxStretchRatioAllowedBeforeRequestingHigherResolution = 1.3;
 
-function widenAncestors (el) {
-while ((el = el.parentElement) && !el.classList.contains('content_block')) 
{
-// Only widen if there was a width setting. Keeps changes minimal.
-if (el.style.width) {
-el.style.width = '100%';
-}
-if (el.style.maxWidth) {
-el.style.maxWidth = '100%';
-}
-if (el.style.float) {
-el.style.float = 'none';
-}
-}
-}
-
-function shouldWidenImage(image) {
-if (
-image.width >= 64 &&
-image.hasAttribute('srcset') &&
-!image.hasAttribute('hasOverflowXContainer') &&
-image.parentNode.className === "image" &&
-!utilities.isNestedInTable(image)
-) {
-return true;
-} else {
-return false;
-}
-}
-
-function makeRoomForImageWidening(image) {
-// Expand containment so css wideImageOverride width percentages can take 
effect.
-widenAncestors (image);
-
-// Remove width and height attributes so wideImageOverride width 
percentages can take effect.
-image.removeAttribute("width");
-image.removeAttribute("height");
+function isGalleryImage(image) {
+  return (
+  image.width >= 64 &&
+  image.hasAttribute('srcset') &&
+  image.parentNode.className === "image" &&
+  // todo: remove addImageOverflowContainers transform. See T160970
+  !image.hasAttribute('hasOverflowXContainer')
+);
 }
 
 function getStretchRatio(image) {
@@ -1176,17 +1149,11 @@
 }
 }
 

[MediaWiki-commits] [Gerrit] mediawiki...MobileApp[master]: Hygiene: consolidate image widening CSS in applib

2017-04-10 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347542 )

Change subject: Hygiene: consolidate image widening CSS in applib
..

Hygiene: consolidate image widening CSS in applib

Move the common CSS between Android and iOS into from MobileApp into applib.

https://github.com/wikimedia/applib/pull/8

Bug: T159194
Change-Id: Id0a0e04907129b3eb40c468468748eb787e838f2
---
M styles/android/widenImages.less
1 file changed, 1 insertion(+), 41 deletions(-)


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

diff --git a/styles/android/widenImages.less b/styles/android/widenImages.less
index 055a566..b966f17 100644
--- a/styles/android/widenImages.less
+++ b/styles/android/widenImages.less
@@ -1,44 +1,4 @@
-.wideImageOverride {
-/* Center images. */
-display: block;
-clear: both;
-margin-left: auto;
-margin-right: auto;
-}
-
-@media (orientation: portrait) {
-.wideImageOverride {
-width:100% !important;
-max-width:100% !important;
-height:auto !important;
-}
-
-@media (min-device-width: 768px) {
-.wideImageOverride {
-width:60% !important;
-max-width:60% !important;
-height:auto !important;
-}
-
-@media (-webkit-min-device-pixel-ratio: 3) {
-.wideImageOverride {
-width:100% !important;
-max-width:100% !important;
-height:auto !important;
-}
-}
-}
-}
-
-@media (orientation: landscape) {
-.wideImageOverride {
-width:50% !important;
-max-width:50% !important;
-height:auto !important;
-}
-}
-
 /* Center text beneath images now that images are centered. */
-.thumbinner, .gallerytext, figcaption {
+figcaption {
 text-align: center;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0a0e04907129b3eb40c468468748eb787e838f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters UI: Adjust styles to OOUI's newest release

2017-04-10 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347540 )

Change subject: RCFilters UI: Adjust styles to OOUI's newest release
..

RCFilters UI: Adjust styles to OOUI's newest release

Slight modifications based on OOUI's upcoming release 0.21.0

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/347540/1

diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterGroupWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterGroupWidget.less
index d774ad2..18fb4e6 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterGroupWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterGroupWidget.less
@@ -24,6 +24,14 @@
 
& > .oo-ui-buttonElement-button {
font-weight: normal;
+   // Override OOUI's definitions for button
+   border-color: transparent;
+   padding: 0;
+
+   &:focus {
+   box-shadow: none;
+   outline: 0;
+   }
}
}
 

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Followup Ic216769f48e4677: Actually use correct style mixin

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

Change subject: Followup Ic216769f48e4677: Actually use correct style mixin
..


Followup Ic216769f48e4677: Actually use correct style mixin

Wow. Oops.

Change-Id: Iac78ab53eddb94a29bed1b3e057e69ac541f0163
---
M src/styles/widgets/MenuTagMultiselectWidget.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/styles/widgets/MenuTagMultiselectWidget.less 
b/src/styles/widgets/MenuTagMultiselectWidget.less
index aa1c35f..05be153 100644
--- a/src/styles/widgets/MenuTagMultiselectWidget.less
+++ b/src/styles/widgets/MenuTagMultiselectWidget.less
@@ -1,5 +1,5 @@
 @import '../common';
 
 .oo-ui-menuTagMultiselectWidget {
-   .theme-oo-ui-checkboxInputWidget();
+   .theme-oo-ui-menuTagMultiselectWidget();
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac78ab53eddb94a29bed1b3e057e69ac541f0163
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: phpunit: Avoid use of wmf-production host names

2017-04-10 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347539 )

Change subject: phpunit: Avoid use of wmf-production host names
..

phpunit: Avoid use of wmf-production host names

* Remove used of 'eqiad' and 'wmnet' in unit tests.

Change-Id: I5bf19b63876e4dc8deaca8cd9907dca0bfa15455
---
M maintenance/dictionary/mediawiki.dic
M tests/phpunit/includes/libs/DnsSrvDiscovererTest.php
2 files changed, 16 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/39/347539/1

diff --git a/maintenance/dictionary/mediawiki.dic 
b/maintenance/dictionary/mediawiki.dic
index a2a06d2..0360854 100644
--- a/maintenance/dictionary/mediawiki.dic
+++ b/maintenance/dictionary/mediawiki.dic
@@ -1398,7 +1398,6 @@
 epcoordinator
 epinstructor
 eponline
-eqiad
 erevoke
 errno
 error
@@ -4571,7 +4570,6 @@
 wmlsc
 wmlscript
 wmlscriptc
-wmnet
 wordcount
 wordprocessingml
 wordwg
diff --git a/tests/phpunit/includes/libs/DnsSrvDiscovererTest.php 
b/tests/phpunit/includes/libs/DnsSrvDiscovererTest.php
index cfd4d76..9d12b10 100644
--- a/tests/phpunit/includes/libs/DnsSrvDiscovererTest.php
+++ b/tests/phpunit/includes/libs/DnsSrvDiscovererTest.php
@@ -6,7 +6,7 @@
 * @dataProvider provideRecords
 */
public function testPickServer( $params, $expected ) {
-   $discoverer = new DnsSrvDiscoverer( '_etcd._tcp.eqiad.wmnet' );
+   $discoverer = new DnsSrvDiscoverer( 'etcd-tcp.example.net' );
$record = $discoverer->pickServer( $params );
 
$this->assertEquals( $expected, $record );
@@ -18,26 +18,26 @@
[
[ // record list
[
-   'target' => 
'conf1003.eqiad.wmnet',
+   'target' => 
'conf03.example.net',
'port' => 'SRV',
'pri' => 0,
'weight' => 1,
],
[
-   'target' => 
'conf1002.eqiad.wmnet',
+   'target' => 
'conf02.example.net',
'port' => 'SRV',
'pri' => 1,
'weight' => 1,
],
[
-   'target' => 
'conf1001.eqiad.wmnet',
+   'target' => 
'conf01.example.net',
'port' => 'SRV',
'pri' => 2,
'weight' => 1,
],
], // selected record
[
-   'target' => 'conf1003.eqiad.wmnet',
+   'target' => 'conf03.example.net',
'port' => 'SRV',
'pri' => 0,
'weight' => 1,
@@ -46,38 +46,38 @@
[
[ // record list
[
-   'target' => 
'conf1003or2.eqiad.wmnet',
+   'target' => 
'conf03or2.example.net',
'port' => 'SRV',
'pri' => 0,
'weight' => 1,
],
[
-   'target' => 
'conf1003or2.eqiad.wmnet',
+   'target' => 
'conf03or2.example.net',
'port' => 'SRV',
'pri' => 0,
'weight' => 1,
],
[
-   'target' => 
'conf1001.eqiad.wmnet',
+   'target' => 
'conf01.example.net',
'port' => 'SRV',
'pri' => 2,
'weight' => 1,
],
[
- 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Followup Ic216769f48e4677: Actually use correct style mixin

2017-04-10 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347538 )

Change subject: Followup Ic216769f48e4677: Actually use correct style mixin
..

Followup Ic216769f48e4677: Actually use correct style mixin

Wow. Oops.

Change-Id: Iac78ab53eddb94a29bed1b3e057e69ac541f0163
---
M src/styles/widgets/MenuTagMultiselectWidget.less
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/38/347538/1

diff --git a/src/styles/widgets/MenuTagMultiselectWidget.less 
b/src/styles/widgets/MenuTagMultiselectWidget.less
index aa1c35f..05be153 100644
--- a/src/styles/widgets/MenuTagMultiselectWidget.less
+++ b/src/styles/widgets/MenuTagMultiselectWidget.less
@@ -1,5 +1,5 @@
 @import '../common';
 
 .oo-ui-menuTagMultiselectWidget {
-   .theme-oo-ui-checkboxInputWidget();
+   .theme-oo-ui-menuTagMultiselectWidget();
 }

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: tests: Comparison tests for infusing previously untestable c...

2017-04-10 Thread VolkerE (Code Review)
VolkerE has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/346998 )

Change subject: tests: Comparison tests for infusing previously untestable 
classes
..


tests: Comparison tests for infusing previously untestable classes

The following classes have different PHP and JS implementations,
so it seemed to make no sense to do JS/PHP comparison tests for them:

* DropdownInputWidget
* ComboBoxInputWidget
* RadioSelectInputWidget
* CheckboxMultiselectInputWidget

However, we can at least compare the result of constructing the JS
widget directly from config vs constructing it via infusion.

This reveals a couple minor bugs in DropdownInputWidget and
ComboBoxInputWidget. Fixes in:
* I417eb13436c4eae95c877d4b15baa76266e83e17
* I748027aced64fdef966f14cf4bd3beea512e28b4
* If5860cf40826564a573b4230b41e18ff2e09c88b

Change-Id: I9366282fce242da88a71e0cdfb5d4b0d30ede963
---
M bin/generate-JSPHP-for-karma.php
M bin/testsuitegenerator.rb
M tests/JSPHP.test.karma.js
M tests/JSPHP.test.standalone.js
M tests/QUnit.assert.equalDomElement.js
M tests/index.php
6 files changed, 53 insertions(+), 20 deletions(-)

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



diff --git a/bin/generate-JSPHP-for-karma.php b/bin/generate-JSPHP-for-karma.php
index bac7684..faadd70 100644
--- a/bin/generate-JSPHP-for-karma.php
+++ b/bin/generate-JSPHP-for-karma.php
@@ -28,7 +28,7 @@
 foreach ( $themes as $theme ) {
OOUI\Theme::setSingleton( new_OOUI( $theme ) );
foreach ( $testSuite as $className => $tests ) {
-   foreach ( $tests as $test ) {
+   foreach ( $tests['tests'] as $test ) {
// Unstub placeholders
$config = $test['config'];
array_walk_recursive( $config, 'unstub' );
diff --git a/bin/testsuitegenerator.rb b/bin/testsuitegenerator.rb
index e46a4a0..f0da93e 100644
--- a/bin/testsuitegenerator.rb
+++ b/bin/testsuitegenerator.rb
@@ -11,16 +11,17 @@
 
class_names = (js + php).map{|c| c[:name] }.sort.uniq
 
-   tests = []
+   tests = {}
classes = php.select{|c| class_names.include? c[:name] }
 
-   untestable_classes = %w[DropdownInputWidget ComboBoxInputWidget
+   # classes with different PHP and JS implementations.
+   # we can still compare the PHP-infuse result to JS result, though.
+   infuse_only_classes = %w[DropdownInputWidget ComboBoxInputWidget
RadioSelectInputWidget CheckboxMultiselectInputWidget]
testable_classes = classes
.reject{|c| c[:abstract] } # can't test abstract classes
.reject{|c| !c[:parent] || c[:trait] || c[:parent] == 'Theme' } 
# can't test abstract
.reject{|c| %w[Element Widget Layout Theme].include? c[:name] } 
# no toplevel
-   .reject{|c| untestable_classes.include? c[:name] } # different 
PHP and JS implementations
 
make_class_instance_placeholder = lambda do |klass, config|
'_placeholder_' + {
@@ -61,6 +62,12 @@
'indicator' => ['down'],
'flags' => %w[constructive primary],
'progress' => [0, 50, 100, false],
+   'options' => [
+   [],
+   [ { 'data' => 'a', 'label' => 'A' } ],
+   [ { 'data' => 'a' }, { 'data' => 'b' } ],
+   [ { 'data' => 'a', 'label' => 'A' }, { 'data' => 'b', 
'label' => 'B' } ],
+   ],
# usually makes no sense in JS
'autofocus' => [],
# too simple to test?
@@ -131,7 +138,13 @@
end
 
testable_classes.each do |klass|
-   config_sources = find_config_sources.call(klass[:name])
+   class_name = klass[:name]
+   tests[class_name] = {
+   infuseonly: !infuse_only_classes.index(class_name).nil?,
+   tests: [],
+   }
+
+   config_sources = find_config_sources.call(class_name)
.map{|c| find_class.call(c)[:methods][0] }
config = config_sources.map{|c| c[:config] }.compact.inject(:+)
required_config = klass[:methods][0][:params] || []
@@ -145,7 +158,7 @@
expanded = config_comb.map{|config_option|
types = config_option[:type].split '|'
values =
-   sensible_values[ [ klass[:name], 
config_option[:name] ] ] ||
+   sensible_values[ [ class_name, 
config_option[:name] ] ] ||
sensible_values[ config_option[:name] ] 
||
expand_types_to_values.call(types)
values.map{|v| config_option.dup.merge(val

[MediaWiki-commits] [Gerrit] oojs/ui[master]: DropdownInputWidget: Only allow setting values actually in t...

2017-04-10 Thread VolkerE (Code Review)
VolkerE has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/346997 )

Change subject: DropdownInputWidget: Only allow setting values actually in the 
dropdown
..


DropdownInputWidget: Only allow setting values actually in the dropdown

This was already done correctly in the PHP widget.

Change-Id: If5860cf40826564a573b4230b41e18ff2e09c88b
---
M src/widgets/DropdownInputWidget.js
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/src/widgets/DropdownInputWidget.js 
b/src/widgets/DropdownInputWidget.js
index 3755584..6e0f908 100644
--- a/src/widgets/DropdownInputWidget.js
+++ b/src/widgets/DropdownInputWidget.js
@@ -89,8 +89,12 @@
  * @inheritdoc
  */
 OO.ui.DropdownInputWidget.prototype.setValue = function ( value ) {
+   var selected;
value = this.cleanUpValue( value );
this.dropdownWidget.getMenu().selectItemByData( value );
+   // Only allow setting values that are actually present in the dropdown
+   selected = this.dropdownWidget.getMenu().getSelectedItem();
+   value = selected ? selected.getData() : '';
OO.ui.DropdownInputWidget.parent.prototype.setValue.call( this, value );
return this;
 };

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Use EtcdConfig

2017-04-10 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347537 )

Change subject: Use EtcdConfig
..

Use EtcdConfig

Use a MultiConfig which checks etcd first as the main configuration
instance for MW.

Allow $wgReadOnly and $wmfMasterDatacenter to come from etcd. For etcd
changes to $wgReadOnly to take effect, I9bbee946c10742526d342 is needed.

Bug: T156924
Change-Id: I23d4e7da0544e27bb3a4ad84f6f2ef195162fb2c
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 16 insertions(+), 9 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 766c668..fb9b74c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -51,9 +51,24 @@
 
 set_include_path( "$IP:/usr/local/lib/php:/usr/share/php" );
 
+# Get configuration from etcd
+$wgConfigRegistry = function () {
+   global $wmfDatacenter;
+
+   return new MultiConfig( [
+   new EtcdConfig( [
+   'host' => "_etcd._tcp.$wmfDatacenter.wmnet",
+   'protocol' => 'https'
+   ] ),
+   new GlobalVarConfig
+   ] );
+};
+$wmgConfig = MediaWikiServices::getInstance()->getMainConfig();
+
 # Master datacenter
 # The datacenter from which we serve traffic.
-$wmfMasterDatacenter = 'eqiad';
+$wmfMasterDatacenter = $wmgConfig->has( 'wmfMasterDatacenter' )
+   ? $wmgConfig->get( 'wmfMasterDatacenter' ) : 'eqiad';
 
 ### List of some service hostnames
 # 'meta': meta wiki for user editable content
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f0e8491..201715e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4711,14 +4711,6 @@
'wikivoyage' => 'wikivoyage',
 ],
 
-'wgReadOnly' => [
-   'default' => null,
-],
-
-'wgReadOnlyFile' => [
-   'default' => false,
-],
-
 # wgTranslateNumerals @{
 'wgTranslateNumerals' => [
'default' => true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23d4e7da0544e27bb3a4ad84f6f2ef195162fb2c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "eqiad lvs: do not directly use hydrogen temporarily"

2017-04-10 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347536 )

Change subject: Revert "eqiad lvs: do not directly use hydrogen temporarily"
..

Revert "eqiad lvs: do not directly use hydrogen temporarily"

This reverts commit f80b9b7d97f044e3378151c2f51c26ff68557dbc.

Change-Id: I46ebeb4827c38fdaa6d709d3a2b09fdab4d256c5
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/347536/1

diff --git a/manifests/site.pp b/manifests/site.pp
index ff42a8e..cd0cf23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1501,7 +1501,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
 
 role(lvs::balancer)
 
@@ -1602,7 +1602,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
 
 role(lvs::balancer)
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "eqiad lvs: do not directly use hydrogen temporarily"

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347536 )

Change subject: Revert "eqiad lvs: do not directly use hydrogen temporarily"
..


Revert "eqiad lvs: do not directly use hydrogen temporarily"

This reverts commit f80b9b7d97f044e3378151c2f51c26ff68557dbc.

Change-Id: I46ebeb4827c38fdaa6d709d3a2b09fdab4d256c5
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index ff42a8e..cd0cf23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1501,7 +1501,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
 
 role(lvs::balancer)
 
@@ -1602,7 +1602,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
 
 role(lvs::balancer)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46ebeb4827c38fdaa6d709d3a2b09fdab4d256c5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContactPage[master]: ContactForm should use OOUI for form rendering

2017-04-10 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347535 )

Change subject: ContactForm should use OOUI for form rendering
..

ContactForm should use OOUI for form rendering

This makes the form style itself on mobile
This will however break compatibility with configurations that
use the `cols` parameter

Bug: T162538
Change-Id: I8f5cf572b97b0789b516d0fc556f8de5d5ca
---
M ContactPage_body.php
M extension.json
2 files changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContactPage 
refs/changes/35/347535/1

diff --git a/ContactPage_body.php b/ContactPage_body.php
index ecf1f8b..7ee84b3 100644
--- a/ContactPage_body.php
+++ b/ContactPage_body.php
@@ -200,7 +200,7 @@
);
}
 
-   $form = HTMLForm::factory( $config['DisplayFormat'],
+   $form = HTMLForm::factory( 'ooui',
$formItems, $this->getContext(), 
"contactpage-{$this->formType}"
);
$form->setWrapperLegendMsg( 'contactpage-legend' );
diff --git a/extension.json b/extension.json
index 89a16fa..1fdc938 100644
--- a/extension.json
+++ b/extension.json
@@ -32,8 +32,6 @@
"Text": {
"label-message": "emailmessage",
"type": "textarea",
-   "rows": 20,
-   "cols": 80,
"required": true
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f5cf572b97b0789b516d0fc556f8de5d5ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContactPage
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] oojs/ui[master]: ComboBoxInputWidget: Fix minor JS/PHP differences

2017-04-10 Thread VolkerE (Code Review)
VolkerE has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/346996 )

Change subject: ComboBoxInputWidget: Fix minor JS/PHP differences
..


ComboBoxInputWidget: Fix minor JS/PHP differences

* 'multiline' config option is now also banned in PHP.
* The 'list' attribute on the  is now removed when infusing,
  as the  element it refers to is not preserved.
* Preserve explicit 'autocomplete' => true in PHP widget.

Change-Id: I748027aced64fdef966f14cf4bd3beea512e28b4
---
M php/widgets/ComboBoxInputWidget.php
M src/widgets/ComboBoxInputWidget.js
2 files changed, 15 insertions(+), 1 deletion(-)

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



diff --git a/php/widgets/ComboBoxInputWidget.php 
b/php/widgets/ComboBoxInputWidget.php
index c496129..c2f8d34 100644
--- a/php/widgets/ComboBoxInputWidget.php
+++ b/php/widgets/ComboBoxInputWidget.php
@@ -19,11 +19,14 @@
 *   `[ 'data' => …, 'label' => … ]`
 */
public function __construct( array $config = [] ) {
+   // ComboBoxInputWidget shouldn't support `multiline`
+   $config['multiline'] = false;
 
// Parent constructor
parent::__construct( $config );
 
// Initialization
+   $this->forceAutocomplete = isset( $config['autocomplete'] ) ? 
$config['autocomplete'] : false;
$this->downIndicator = new IndicatorWidget( [ 'indicator' => 
'down' ] );
$this->datalist = new Tag( 'datalist' );
$this->datalist->setAttributes( [ 'id' => 
Tag::generateElementId() ] );
@@ -65,6 +68,12 @@
$o[] = [ 'data' => $data, 'label' => $label ];
}
$config['options'] = $o;
+   // JS ComboBoxInputWidget has `autocomplete: false` in the 
defaults. Make sure
+   // explicitly passing `autocomplete: true` overrides that. 
Doing so doesn't make
+   // much sense, this is just to make the tests happy.
+   if ( $this->forceAutocomplete ) {
+   $config['autocomplete'] = true;
+   }
return parent::getConfig( $config );
}
 }
diff --git a/src/widgets/ComboBoxInputWidget.js 
b/src/widgets/ComboBoxInputWidget.js
index 16bb7a9..5342854 100644
--- a/src/widgets/ComboBoxInputWidget.js
+++ b/src/widgets/ComboBoxInputWidget.js
@@ -68,9 +68,14 @@
autocomplete: false
}, config );
 
-   // ComboBoxInputWidget shouldn't support multiline
+   // ComboBoxInputWidget shouldn't support `multiline`
config.multiline = false;
 
+   // See InputWidget#reusePreInfuseDOM about `config.$input`
+   if ( config.$input ) {
+   config.$input.removeAttr( 'list' );
+   }
+
// Parent constructor
OO.ui.ComboBoxInputWidget.parent.call( this, config );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I748027aced64fdef966f14cf4bd3beea512e28b4
Gerrit-PatchSet: 3
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] operations/switchdc[master]: Logging: filter out all cumin's messages from stderr

2017-04-10 Thread Volans (Code Review)
Volans has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347534 )

Change subject: Logging: filter out all cumin's messages from stderr
..

Logging: filter out all cumin's messages from stderr

Bug: T160178
Change-Id: I2fbe0604aec57a4cf56150741dc820bb20b01ed7
---
M switchdc/lib/remote.py
M switchdc/log.py
2 files changed, 6 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/switchdc 
refs/changes/34/347534/1

diff --git a/switchdc/lib/remote.py b/switchdc/lib/remote.py
index 556e01d..05bddcf 100644
--- a/switchdc/lib/remote.py
+++ b/switchdc/lib/remote.py
@@ -81,11 +81,11 @@
 if batch_sleep > 0:
 self.worker.batch_sleep = batch_sleep
 
-if is_dry_run():
-logger.debug("Executing commands {commands} on '{num}' hosts: 
{hosts}".format(
-commands=commands, num=len(self.hosts), 
hosts=NodeSet.fromlist(self.hosts)))
-if not is_safe:
-return 0
+logger.debug("Executing commands {commands} on '{num}' hosts: 
{hosts}".format(
+commands=commands, num=len(self.hosts), 
hosts=NodeSet.fromlist(self.hosts)))
+
+if is_dry_run() and not is_safe:
+return 0
 
 rc = self.worker.execute()
 
diff --git a/switchdc/log.py b/switchdc/log.py
index 8ce7723..9f57782 100644
--- a/switchdc/log.py
+++ b/switchdc/log.py
@@ -63,10 +63,9 @@
 
 
 class OutputFilter(logging.Filter):
-threshold = logging.ERROR
 
 def filter(self, record):
-if 'cumin' in record.pathname and record.levelno <= self.threshold:
+if 'cumin' in record.pathname:
 return 0
 else:
 return 1
@@ -92,7 +91,6 @@
 if is_dry_run():
 output_handler.setFormatter(logging.Formatter(fmt='DRY-RUN: 
%(message)s'))
 output_handler.setLevel(logging.DEBUG)
-OutputFilter.threshold = logging.WARN
 else:
 output_handler.setLevel(logging.INFO)
 output_handler.addFilter(OutputFilter())

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fbe0604aec57a4cf56150741dc820bb20b01ed7
Gerrit-PatchSet: 1
Gerrit-Project: operations/switchdc
Gerrit-Branch: master
Gerrit-Owner: Volans 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: eqiad lvs: do not directly use hydrogen temporarily

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347532 )

Change subject: eqiad lvs: do not directly use hydrogen temporarily
..


eqiad lvs: do not directly use hydrogen temporarily

hydrogen's recdns is being upgraded, will revert this afterwards.

Change-Id: I1b60363e79370ab90685410c2d87030bcf5934a4
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index cd0cf23..ff42a8e 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1501,7 +1501,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.153.254' ]
 
 role(lvs::balancer)
 
@@ -1602,7 +1602,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.153.254' ]
 
 role(lvs::balancer)
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[printstyles]: Tweaks for printing layout

2017-04-10 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347533 )

Change subject: Tweaks for printing layout
..

Tweaks for printing layout

* Use @page to override print margins in Chrome
* Limit desktop auto margin rules to the screen media type. In print
mode this can cause rendering issues - for example the footer that is
printed is incomplete. This seems to be due to the auto margin rules.
Given in print mode we have a fixed canvas this should not be necessary

Bug: T159857
Change-Id: Ia4d619ce6dd0e96580bca389867aad4a10c924d6
---
M resources/skins.minerva.print.styles/styles.less
M resources/skins.minerva.tablet.styles/common.less
2 files changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/resources/skins.minerva.print.styles/styles.less 
b/resources/skins.minerva.print.styles/styles.less
index 3d4a3ff..0fa6f51 100644
--- a/resources/skins.minerva.print.styles/styles.less
+++ b/resources/skins.minerva.print.styles/styles.less
@@ -1,4 +1,9 @@
 @media print {
+   // Chrome: override the default margins and reveal the footer
+   @page {
+   margin: 0;
+   }
+
@import 'header.less';
@import 'article.less';
@import 'quotes.less';
diff --git a/resources/skins.minerva.tablet.styles/common.less 
b/resources/skins.minerva.tablet.styles/common.less
index 6e749f7..76eaee2 100644
--- a/resources/skins.minerva.tablet.styles/common.less
+++ b/resources/skins.minerva.tablet.styles/common.less
@@ -142,7 +142,7 @@
}
 }
 
-@media all and ( min-width: @wgMFDeviceWidthDesktop ) {
+@media screen and ( min-width: @wgMFDeviceWidthDesktop ) {
// FIXME: Zero should use banner-container class or better - append to 
banner-container
#mw-mf-page-center .mw-mf-banner,
.banner-container,

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: DraggableElement: Only apply focus when widget is not disabled

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

Change subject: DraggableElement: Only apply focus when widget is not disabled
..


DraggableElement: Only apply focus when widget is not disabled

Also, consolidate styling of this mixin from widgets.less into
the definition that exists in elements.less.

Change-Id: Ib5437a235463c17ee56a3d9c0f0b21806ceee104
---
M src/themes/mediawiki/elements.less
M src/themes/mediawiki/widgets.less
2 files changed, 3 insertions(+), 5 deletions(-)

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



diff --git a/src/themes/mediawiki/elements.less 
b/src/themes/mediawiki/elements.less
index 738291b..9a7002f 100644
--- a/src/themes/mediawiki/elements.less
+++ b/src/themes/mediawiki/elements.less
@@ -423,7 +423,9 @@
 .theme-oo-ui-clippableElement () {}
 
 .theme-oo-ui-draggableElement () {
-   &-handle:focus {
+   padding: @padding-menu-large;
+
+   &-handle.oo-ui-widget-enabled:focus {
border-radius: @border-radius-default;
box-shadow: @box-shadow-widget-focus, 0 0 0 1px 
@color-progressive;
outline: 0;
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index cbf114f..a560e1d 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -525,10 +525,6 @@
}
 }
 
-.theme-oo-ui-draggableElement () {
-   padding: @padding-menu-large;
-}
-
 .theme-oo-ui-dropdownWidget () {
width: 100%;
max-width: @max-width-input;

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Create a TagMultiselectWidget

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

Change subject: Create a TagMultiselectWidget
..


Create a TagMultiselectWidget

TagMultiselectWidget is a replacement and rewrite of the
CapsuleMultiselectWidget, splitting the behavior into three main
components:

* TagMultiselectWidget - The base widget, defining a tag area and
  all the behavior necessary to add, edit and remove tags, as well
  as defining an input to the widget.
  Main features include:
  - Input positioning can be defined as either:
- inline: The input is part of the tag area, allowing the user to
  type alongside the tags.
- outline: The input is external to the tag area, appearing below
  it.
- none: No input is given. This is useful for cases where the
  input is placed elsewhere (for example, inside a popup) or
  if the widget is representing a state that is given by another
  widget.
  - Validity state: The widget has validity state representing
whether the tags it includes are valid. If the option to
'allowDisplayInvalidTags' is set to true, invalid tags will
appear on the list but will cause the isValid() state of the
entire widget to be false.
  - Value: The value of the widget can be set through setValue()
and read throught getValue(). The outputted value is the
array of datas of only the valid items.
  - Reordering: The widget allows reordering if the 'allowReordering'
setting is set to true.
* PopupTagMultiselectWidget - An implementation of TagMultiselectWidget
  that allows adding and manipulating the data through a popup. it
  contains a basic implementation out-of-the-box that has an internal
  input in the popup.
  The popup can also be defined independently, but then the events of
  adding and editing the tags will need to be defined separately.
  A popup can also be given with an internal input, and then that
  input can be set up as the source of the edit/add in the widget
  by sending it to the configuration property 'popupInput'
* MenuTagMultiselectWidget - An implementation of TagMultiselectWidget
  that uses a menu to validate and add items to the widget.
  The options are given through the config.options array, similar to
  DropdownInputWidget.
  The menu widget and the menu item widgets are both extendible, by
  extending the methods 'createMenuWidget' and 'createMenuOptionWidget'

Change-Id: Ic216769f48e4677da5b7274f491aa08a95aa8076
---
M build/modules.yaml
M demos/pages/widgets.js
M src/styles/empty-theme.less
M src/styles/widgets.less
A src/styles/widgets/MenuTagMultiselectWidget.less
A src/styles/widgets/TagItemWidget.less
A src/styles/widgets/TagMultiselectWidget.less
M src/themes/apex/widgets.less
M src/themes/mediawiki/widgets.less
A src/widgets/MenuTagMultiselectWidget.js
A src/widgets/PopupTagMultiselectWidget.js
A src/widgets/TagItemWidget.js
A src/widgets/TagMultiselectWidget.js
M tests/index.php
A tests/widgets/TagMultiselectWidget.test.js
15 files changed, 2,115 insertions(+), 0 deletions(-)

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



diff --git a/build/modules.yaml b/build/modules.yaml
index 39ade8b..5ab8b92 100644
--- a/build/modules.yaml
+++ b/build/modules.yaml
@@ -117,6 +117,10 @@
 
"src/widgets/CapsuleItemWidget.js",
"src/widgets/CapsuleMultiselectWidget.js",
+   "src/widgets/TagItemWidget.js",
+   "src/widgets/TagMultiselectWidget.js",
+   "src/widgets/PopupTagMultiselectWidget.js",
+   "src/widgets/MenuTagMultiselectWidget.js",
 
"src/widgets/SelectFileWidget.js",
"src/widgets/SearchWidget.js",
diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index d859bbf..3081ec4 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -1330,6 +1330,89 @@
}
),
new OO.ui.FieldLayout(
+   new OO.ui.TagMultiselectWidget( {
+   placeholder: 'Add tags',
+   allowArbitrary: true
+   } ),
+   {
+   label: 'TagMultiselectWidget 
(allowArbitrary, inline input, placeholder)',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.TagMultiselectWidget( {
+   placeholder: 'Add tags',
+   allowArbitrary: 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: ulsfo lvs: prefer codfw dns

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347531 )

Change subject: ulsfo lvs: prefer codfw dns
..


ulsfo lvs: prefer codfw dns

This should have been this way to begin with, as they're lower
latency to ulsfo.  We probably forgot to switch this after codfw
initial stabilization.

Change-Id: I94d235b945781d9f53ec4d460ba1143e3c98c8ce
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index f7d10d4..cd0cf23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1838,7 +1838,7 @@
 # ULSFO lvs servers
 node /^lvs400[1-4]\.ulsfo\.wmnet$/ {
 # ns override for all lvs for now, see T103921
-$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
+$nameservers_override = [ '208.80.153.12', '208.80.153.42', 
'208.80.154.254' ]
 
 role(lvs::balancer)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94d235b945781d9f53ec4d460ba1143e3c98c8ce
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: eqiad lvs: do not directly use hydrogen temporarily

2017-04-10 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347532 )

Change subject: eqiad lvs: do not directly use hydrogen temporarily
..

eqiad lvs: do not directly use hydrogen temporarily

hydrogen's recdns is being upgraded, will revert this afterwards.

Change-Id: I1b60363e79370ab90685410c2d87030bcf5934a4
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index cd0cf23..ff42a8e 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1501,7 +1501,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.153.254' ]
 
 role(lvs::balancer)
 
@@ -1602,7 +1602,7 @@
 #   so they need to use the recursive DNS backends directly
 #   (chromium and hydrogen) with fallback to codfw
 # (doing this for all lvs for now, see T103921)
-$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
+$nameservers_override = [ '208.80.154.157', '208.80.153.254' ]
 
 role(lvs::balancer)
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: ulsfo lvs: prefer codfw dns

2017-04-10 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347531 )

Change subject: ulsfo lvs: prefer codfw dns
..

ulsfo lvs: prefer codfw dns

This should have been this way to begin with, as they're lower
latency to ulsfo.  We probably forgot to switch this after codfw
initial stabilization.

Change-Id: I94d235b945781d9f53ec4d460ba1143e3c98c8ce
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index f7d10d4..cd0cf23 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1838,7 +1838,7 @@
 # ULSFO lvs servers
 node /^lvs400[1-4]\.ulsfo\.wmnet$/ {
 # ns override for all lvs for now, see T103921
-$nameservers_override = [ '208.80.154.157', '208.80.154.50', 
'208.80.153.254' ]
+$nameservers_override = [ '208.80.153.12', '208.80.153.42', 
'208.80.154.254' ]
 
 role(lvs::balancer)
 

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Ignore a debian packaging byproduct

2017-04-10 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347530 )

Change subject: Ignore a debian packaging byproduct
..

Ignore a debian packaging byproduct

Change-Id: I9f9b579d6fab2ab323984285b046411a59e10c96
---
M .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control 
refs/changes/30/347530/1

diff --git a/.gitignore b/.gitignore
index be5792a..302fedd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,5 @@
 cover
 .coverage
 debian
+.pybuild
 .tox

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f9b579d6fab2ab323984285b046411a59e10c96
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add ORES thresholds for fawiki, ruwiki, trwiki

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

Change subject: Add ORES thresholds for fawiki, ruwiki, trwiki
..


Add ORES thresholds for fawiki, ruwiki, trwiki

To prepare for tomorrow's deployment.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 37b1be5..f0e8491 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18183,6 +18183,45 @@
'bad' => [ 'min' => 0, 'max' => 0.256 ], // ~45% 
precision
],
],
+   'fawiki' => [
+   'damaging' => [
+   'likelygood' => [ 'min' => 0, 'max' => 0.495 ], // 
~99.5% precision
+   'maybebad' => [ 'min' => 0.330, 'max' => 1 ], // ~15% 
precision
+   'likelybad' => [ 'min' => 0.941, 'max' => 1 ], // ~45% 
precision
+   'verylikelybad' => [ 'min' => 0.963, 'max' => 1 ], // 
~75% precision
+   ],
+   'goodfaith' => [
+   'good' => [ 'min' => 0.381, 'max' => 1 ], // ~99.5% 
precision
+   'maybebad' => [ 'min' => 0, 'max' => 0.608 ], // ~15% 
precision
+   'bad' => [ 'min' => 0, 'max' => 0.042 ], // ~100% 
precision
+   ],
+   ],
+   'ruwiki' => [
+   'damaging' => [
+   'likelygood' => [ 'min' => 0, 'max' => 0.599 ], // ~99% 
precision
+   'maybebad' => [ 'min' => 0.466, 'max' => 1 ], // ~90% 
recall
+   'likelybad' => [ 'min' => 0.859, 'max' => 1 ], // ~45% 
precision
+   'verylikelybad' => [ 'min' => 0.935, 'max' => 1 ], // 
~75% precision
+   ],
+   'goodfaith' => [
+   'good' => [ 'min' => 0.570, 'max' => 1 ], // ~99.5% 
precision
+   'maybebad' => [ 'min' => 0, 'max' => 0.549 ], // ~15% 
precision
+   'bad' => [ 'min' => 0, 'max' => 0.081 ], // ~45% 
precision
+   ],
+   ],
+   'trwiki' => [
+   'damaging' => [
+   'likelygood' => [ 'min' => 0, 'max' => 0.155 ], // 
~99.5% precision
+   'maybebad' => [ 'min' => 0.105, 'max' => 1 ], // ~15% 
precision
+   'likelybad' => [ 'min' => 0.882, 'max' => 1 ], // ~45% 
precision
+   'verylikelybad' => [ 'min' => 0.912, 'max' => 1 ], // 
~75% precision
+   ],
+   'goodfaith' => [
+   'good' => [ 'min' => 0.809, 'max' => 1 ], // ~99.5% 
precision
+   'maybebad' => [ 'min' => 0, 'max' => 0.860 ], // ~15% 
precision
+   'bad' => [ 'min' => 0, 'max' => 0.119 ], // ~45% 
precision
+   ],
+   ],
 ],
 'wgOresEnabledNamespaces' => [
'default' => [],

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: dnsrecursor: 4.x backport and edns-client-subnet

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/346937 )

Change subject: dnsrecursor: 4.x backport and edns-client-subnet
..


dnsrecursor: 4.x backport and edns-client-subnet

I've manually tested the backports package with these settings,
and it functions correctly as expected (including correct
discovery geoip effects for private-network clients via
edns-client-subnet).

Change-Id: I73cfea9e56800624f1353a381540c0f410dd826d
---
A modules/dnsrecursor/files/ulimits.conf
M modules/dnsrecursor/manifests/init.pp
M modules/dnsrecursor/templates/recursor.conf.erb
3 files changed, 76 insertions(+), 1 deletion(-)

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



diff --git a/modules/dnsrecursor/files/ulimits.conf 
b/modules/dnsrecursor/files/ulimits.conf
new file mode 100644
index 000..c8d00bc
--- /dev/null
+++ b/modules/dnsrecursor/files/ulimits.conf
@@ -0,0 +1,2 @@
+[Service]
+LimitNOFILE=16384
diff --git a/modules/dnsrecursor/manifests/init.pp 
b/modules/dnsrecursor/manifests/init.pp
index 8bfa3c7..935a6a9 100644
--- a/modules/dnsrecursor/manifests/init.pp
+++ b/modules/dnsrecursor/manifests/init.pp
@@ -22,13 +22,63 @@
 
 include ::network::constants
 include ::dnsrecursor::metrics
-$forward_zones = 'wmnet=208.80.154.238;208.80.153.231;91.198.174.239, 
10.in-addr.arpa=208.80.154.238;208.80.153.231;91.198.174.239'
+$wmf_authdns = [
+'208.80.154.238',
+'208.80.153.231',
+'91.198.174.239',
+]
+$wmf_authdns_semi = join($wmf_authdns, ';')
+$forward_zones = "wmnet=${wmf_authdns_semi}, 
10.in-addr.arpa=${wmf_authdns_semi}"
 
 system::role { 'dnsrecursor':
 ensure  => 'absent',
 description => 'Recursive DNS server',
 }
 
+if os_version('debian >= jessie') {
+$pdns_rec_ver = '4'
+
+# systemd unit fragment to raise ulimits
+$sysd_dir = '/etc/systemd/system/pdns-recursor.service.d'
+$sysd_frag = "${sysd_dir}/ulimits.conf"
+
+file { $sysd_dir:
+ensure => directory,
+mode   => '0555',
+owner  => 'root',
+group  => 'root',
+}
+
+file { $sysd_frag:
+ensure => present,
+mode   => '0444',
+owner  => 'root',
+group  => 'root',
+source => 'puppet:///modules/dnsrecursor/ulimits.conf',
+}
+
+exec { "systemd reload for ${sysd_frag}":
+refreshonly => true,
+command => '/bin/systemctl daemon-reload',
+subscribe   => File[$sysd_frag],
+before  => Service['pdns-recursor'],
+}
+
+if os_version('debian == jessie') {
+# jessie uses backports for v4
+apt::pin { 'pdns-recursor':
+package  => 'pdns-recursor',
+pin  => 'release a=jessie-backports',
+priority => '1001',
+before   => Package['pdns-recursor'],
+}
+}
+}
+else {
+# trusty instances (labservices metaldns stuff)
+$pdns_rec_ver = '3'
+}
+
 package { 'pdns-recursor':
 ensure => 'present',
 }
diff --git a/modules/dnsrecursor/templates/recursor.conf.erb 
b/modules/dnsrecursor/templates/recursor.conf.erb
index 7d2bc0a..a70838a 100644
--- a/modules/dnsrecursor/templates/recursor.conf.erb
+++ b/modules/dnsrecursor/templates/recursor.conf.erb
@@ -27,6 +27,12 @@
 setuid=pdns
 
 daemon=yes
+<% if @pdns_rec_ver == '4' -%>
+# can later raise threads to 1/core (and +ulimit) on version 4.1+ w/ proper 
reuseport
+threads=4
+pdns-distributes-queries=no
+reuseport=yes
+<% else -%>
 # THREADS x MAX-MTHREADS < FD's
 threads=2
 
@@ -34,6 +40,7 @@
 # This is explicitly lowered to avoid a known bug:
 #  
http://blog.powerdns.com/2014/02/06/related-to-recent-dos-attacks-recursor-configuration-file-guidance/
 max-mthreads=512
+<% end -%>
 
 # local-addressIP addresses to listen on, separated by spaces or commas
 local-address=<%= flatten_ips(@listen_addresses).sort.join(" ") %>
@@ -56,6 +63,10 @@
 # Zones for which we forward queries, comma separated domain=ip pairs
 forward-zones=<%= @forward_zones -%>, <%= @additional_forward_zones -%>
 
+<% if @pdns_rec_ver == '4' -%>
+# we need ECS to ensure our geoip resolution (e.g. for discovery hostnames) 
works correctly regardless of which recursor (x-dc) a client uses
+edns-subnet-whitelist=<%= @wmf_authdns.join(', ') %>
+<% end -%>
 <% if @lua_hooks -%>
 # lua scripts allow extending the resolver
 # with custom behavior
@@ -84,7 +95,11 @@
 
 # maximum number of packets to store statistics for
 # /usr/bin/rec_control top-remotes
+<% if @pdns_rec_ver == '4' -%>
+stats-ringbuffer-entries=1000
+<% else -%>
 remotes-ringbuffer-entries=1000
+<% end -%>
 
 # where the controlsocket will live
 socket-dir=/var/run/
@@ -93,6 +108,13 @@
 # useful

[MediaWiki-commits] [Gerrit] operations/puppet[production]: dnsrecursor: update to backports for transition

2017-04-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/346980 )

Change subject: dnsrecursor: update to backports for transition
..


dnsrecursor: update to backports for transition

This is temporary to ensure smooth rollout on existing jessie
recdns machines.  Should revert after all are upgraded via puppet.

Change-Id: Id1876231c33e644f6f3f645c085574bf490907b2
---
M modules/dnsrecursor/manifests/init.pp
1 file changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/modules/dnsrecursor/manifests/init.pp 
b/modules/dnsrecursor/manifests/init.pp
index 935a6a9..3cce539 100644
--- a/modules/dnsrecursor/manifests/init.pp
+++ b/modules/dnsrecursor/manifests/init.pp
@@ -72,15 +72,23 @@
 priority => '1001',
 before   => Package['pdns-recursor'],
 }
+
+package { 'pdns-recursor':
+ensure => 'latest', # temporary during transition!
+}
+}
+else {
+package { 'pdns-recursor':
+ensure => 'present',
+}
 }
 }
 else {
 # trusty instances (labservices metaldns stuff)
 $pdns_rec_ver = '3'
-}
-
-package { 'pdns-recursor':
-ensure => 'present',
+package { 'pdns-recursor':
+ensure => 'present',
+}
 }
 
 file { '/etc/powerdns/recursor.conf':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1876231c33e644f6f3f645c085574bf490907b2
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Check for lastContinue being null

2017-04-10 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347529 )

Change subject: Check for lastContinue being null
..

Check for lastContinue being null

Change-Id: I50e4f4c8b3b3ac0d099cdd56bc0a1d5437dca45d
---
M 
tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
1 file changed, 6 insertions(+), 2 deletions(-)


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

diff --git 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
index 6d32367..730f23d 100644
--- 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
+++ 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
@@ -195,8 +195,12 @@
 
 @Override
 public String leftOffHuman() {
-return WikibaseRepository.inputDateFormat().format(leftOffDate)
-+ " (next: " + lastContinue.get("rccontinue").toString() + ")";
+if(lastContinue != null) {
+return WikibaseRepository.inputDateFormat().format(leftOffDate)
++ " (next: " + lastContinue.get("rccontinue").toString() + 
")";
+} else {
+return 
WikibaseRepository.inputDateFormat().format(leftOffDate);
+}
 }
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50e4f4c8b3b3ac0d099cdd56bc0a1d5437dca45d
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
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] wikimedia...process-control[master]: Organize examples into their own directory

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

Change subject: Organize examples into their own directory
..


Organize examples into their own directory

Change-Id: I4635c1a1aa1b6ea6bba9e70b335319a874b1d9d4
---
R examples/job.example.yaml
R examples/process-control.example.yaml
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/job.example.yaml b/examples/job.example.yaml
similarity index 91%
rename from job.example.yaml
rename to examples/job.example.yaml
index 523bcd4..233a01d 100644
--- a/job.example.yaml
+++ b/examples/job.example.yaml
@@ -1,5 +1,5 @@
-# Copy this job to your configured `job_directory` and give it a name, like
-# `purge_binge.yaml`.
+# Copy this job to /var/lib/process-control/ or your configured `job_directory`
+# and give name it according to the job, like `purge_binge.yaml`.
 
 #
 # Verbose job name.  The short, machine name is taken from the base file name.
diff --git a/process-control.example.yaml 
b/examples/process-control.example.yaml
similarity index 100%
rename from process-control.example.yaml
rename to examples/process-control.example.yaml

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4635c1a1aa1b6ea6bba9e70b335319a874b1d9d4
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Use constants for HTTP status codes

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

Change subject: Use constants for HTTP status codes
..


Use constants for HTTP status codes

Change-Id: I4325d080631c85c6187001487796ec0aa56b5593
---
M Core/Http/HttpStatusValidator.php
M Core/Http/RequestHandler.php
M Core/Listeners/RestListener.php
M PaymentProviders/Ingenico/RestResponseValidator.php
M PaymentProviders/PayPal/Listener.php
5 files changed, 19 insertions(+), 17 deletions(-)

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



diff --git a/Core/Http/HttpStatusValidator.php 
b/Core/Http/HttpStatusValidator.php
index 68c6859..7a88f0b 100644
--- a/Core/Http/HttpStatusValidator.php
+++ b/Core/Http/HttpStatusValidator.php
@@ -3,6 +3,7 @@
 namespace SmashPig\Core\Http;
 
 use SmashPig\Core\Logging\Logger;
+use Symfony\Component\HttpFoundation\Response;
 
 /**
  * Determines whether to retry HTTP requests based on status code
@@ -19,12 +20,12 @@
$body = $parsedResponse['body'];
 
switch ( $statusCode ) {
-   case 400:   // Oh noes! Bad request.. BAD CODE, BAD BAD 
CODE!
+   case Response::HTTP_BAD_REQUEST:   // Oh noes! Bad 
request.. BAD CODE, BAD BAD CODE!
$continue = false;
Logger::error( "Request returned (400) BAD 
REQUEST: $body" );
break;
 
-   case 403:   // Hmm, forbidden? Maybe if we ask it 
nicely again...
+   case Response::HTTP_FORBIDDEN:   // Hmm, forbidden? 
Maybe if we ask it nicely again...
$continue = true;
Logger::alert( "Request returned (403) 
FORBIDDEN: $body" );
break;
@@ -39,8 +40,8 @@
 
protected function getSuccessCodes() {
return array(
-   200, // Everything is AWESOME
-   201  // Also fine, and we created a thing
+   Response::HTTP_OK, // Everything is AWESOME
+   Response::HTTP_CREATED  // Also fine, and we created a 
thing
);
}
 }
diff --git a/Core/Http/RequestHandler.php b/Core/Http/RequestHandler.php
index 5036a69..4744e38 100644
--- a/Core/Http/RequestHandler.php
+++ b/Core/Http/RequestHandler.php
@@ -36,7 +36,7 @@
 
if ( count( $parts ) < 2 ) {
$response->setStatusCode(
-   403,
+   Response::HTTP_FORBIDDEN,
'Cannot process this request: bad URI format. A 
configuration node and an action is required'
);
return $response;
@@ -57,7 +57,7 @@
 
if ( $config->nodeExists( 'disabled' ) && $config->val( 
'disabled' ) ) {
Logger::debug( '403 will be given for disabled view.', 
$uri );
-   $response->setStatusCode( 403, "View '$view' disabled. 
Cannot continue." );
+   $response->setStatusCode( Response::HTTP_FORBIDDEN, 
"View '$view' disabled. Cannot continue." );
return $response;
}
 
@@ -80,7 +80,7 @@
Logger::info( "Starting processing for request, configuration 
view: '$view', action: '$action'" );
if ( !$config->nodeExists( "endpoints/$action" ) ) {
Logger::debug( '403 will be given for unknown action on 
inbound URL.', $uri );
-   $response->setStatusCode( 403, "Action '$action' not 
configured. Cannot continue." );
+   $response->setStatusCode( Response::HTTP_FORBIDDEN, 
"Action '$action' not configured. Cannot continue." );
return $response;
}
 
@@ -101,11 +101,11 @@
} else {
$str = "Requested action '$action' does not implement a 
known handler. Cannot continue.";
Logger::debug( $str );
-   $response->setStatusCode( 500, $str );
+   $response->setStatusCode( 
Response::HTTP_INTERNAL_SERVER_ERROR, $str );
}
 
$code = $response->getStatusCode();
-   if ( ( $code !== 200 ) && ( $code !== 302 ) ) {
+   if ( ( $code !== Response::HTTP_OK ) && ( $code !== 
Response::HTTP_FOUND ) ) {
$response->setContent( '' );
}
return $response;
@@ -125,7 +125,7 @@
 
$response = new Response();
$response->setPrivate();
-   $response->setStatusCode( 500, "Unhandled internal server 
error." );
+   $response->setStatusCode( Response::HTTP_INTERNAL_SERVER_ERROR, 
"Unhandled inter

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Cache directory lookup 404s

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

Change subject: Cache directory lookup 404s
..


Cache directory lookup 404s

These are legitimate responses in REST-ese. Don't failmail when
someone tries to pay with iDEAL in an unsupported currency.
We should still route them elsewhere in the frontend, tho!

Bug: T161072
Change-Id: I28a1bc71ffc7a8982b686028ab53a558032de3c7
---
M Core/Http/HttpStatusValidator.php
M PaymentProviders/Ingenico/Api.php
M PaymentProviders/Ingenico/ApiException.php
M PaymentProviders/Ingenico/BankPaymentProvider.php
A PaymentProviders/Ingenico/RestResponseValidator.php
A PaymentProviders/Ingenico/Tests/Data/emptyDirectory.response
M PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php
M SmashPig.yaml
8 files changed, 90 insertions(+), 13 deletions(-)

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



diff --git a/Core/Http/HttpStatusValidator.php 
b/Core/Http/HttpStatusValidator.php
index a36230b..68c6859 100644
--- a/Core/Http/HttpStatusValidator.php
+++ b/Core/Http/HttpStatusValidator.php
@@ -12,16 +12,13 @@
public function shouldRetry( $parsedResponse ) {
 
$statusCode = $parsedResponse['status'];
+   if ( array_search( $statusCode, $this->getSuccessCodes() ) !== 
false ) {
+   Logger::debug( "Successful request" );
+   return false;
+   }
$body = $parsedResponse['body'];
 
switch ( $statusCode ) {
-   case 200:   // Everything is AWESOME
-   case 201:   // Also fine, and we created a thing
-   $continue = false;
-
-   Logger::debug( "Successful request" );
-   break;
-
case 400:   // Oh noes! Bad request.. BAD CODE, BAD BAD 
CODE!
$continue = false;
Logger::error( "Request returned (400) BAD 
REQUEST: $body" );
@@ -39,4 +36,11 @@
}
return $continue;
}
+
+   protected function getSuccessCodes() {
+   return array(
+   200, // Everything is AWESOME
+   201  // Also fine, and we created a thing
+   );
+   }
 }
diff --git a/PaymentProviders/Ingenico/Api.php 
b/PaymentProviders/Ingenico/Api.php
index 5da77bb..3a7f0cc 100644
--- a/PaymentProviders/Ingenico/Api.php
+++ b/PaymentProviders/Ingenico/Api.php
@@ -84,7 +84,9 @@
$messages[] = "Error code {$error['code']}: 
{$error['message']}.";
}
$concatenated = implode( ' ', $messages );
-   throw new ApiException( $concatenated );
+   $ex = new ApiException( $concatenated );
+   $ex->setRawErrors( $decoded['errors'] );
+   throw $ex;
}
}
 }
diff --git a/PaymentProviders/Ingenico/ApiException.php 
b/PaymentProviders/Ingenico/ApiException.php
index 44af1fc..3f3ed73 100644
--- a/PaymentProviders/Ingenico/ApiException.php
+++ b/PaymentProviders/Ingenico/ApiException.php
@@ -6,4 +6,13 @@
 
 class ApiException extends SmashPigException {
 
+   protected $rawErrors;
+
+   public function setRawErrors( $errors ) {
+   $this->rawErrors = $errors;
+   }
+
+   public function getRawErrors() {
+   return $this->rawErrors;
+   }
 }
diff --git a/PaymentProviders/Ingenico/BankPaymentProvider.php 
b/PaymentProviders/Ingenico/BankPaymentProvider.php
index 87c034d..0f5b237 100644
--- a/PaymentProviders/Ingenico/BankPaymentProvider.php
+++ b/PaymentProviders/Ingenico/BankPaymentProvider.php
@@ -2,8 +2,9 @@
 
 namespace SmashPig\PaymentProviders\Ingenico;
 
-use SmashPig\Core\Context;
 use Psr\Cache\CacheItemPoolInterface;
+use SmashPig\Core\Context;
+use Symfony\Component\HttpFoundation\Response;
 
 /**
  * Handle bank payments via Ingenico
@@ -50,12 +51,21 @@
'currencyCode' => $currency
);
$path = "products/$productId/directory";
-   $response = $this->api->makeApiCall( $path, 'GET', 
$query );
-
$banks = array();
 
-   foreach ( $response['entries'] as $entry ) {
-   $banks[$entry['issuerId']] = 
$entry['issuerName'];
+   try {
+   $response = $this->api->makeApiCall( $path, 
'GET', $query );
+
+   foreach ( $response['entries'] as $entry ) {
+   $banks[$entry['issuerId']] = 
$entry['issuerName'];
+   }
+   } c

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Add a missing dependency

2017-04-10 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347528 )

Change subject: Add a missing dependency
..

Add a missing dependency

pyyaml requires libyaml-dev

Change-Id: I0c3458e9887cfc65560be9ea8466bce4a0cfa7e0
---
M puppet/modules/crm/manifests/tools.pp
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/28/347528/1

diff --git a/puppet/modules/crm/manifests/tools.pp 
b/puppet/modules/crm/manifests/tools.pp
index d7a7c23..6d70d79 100644
--- a/puppet/modules/crm/manifests/tools.pp
+++ b/puppet/modules/crm/manifests/tools.pp
@@ -14,7 +14,10 @@
 
 $audit_base = '/var/spool/audit'
 
-require_package('libmysqlclient-dev')
+require_package(
+'libmysqlclient-dev',
+'libyaml-dev'
+)
 
 git::clone { 'wikimedia/fundraising/tools':
 directory => $dir,
@@ -48,6 +51,7 @@
 require => [
 Git::Clone['wikimedia/fundraising/tools'],
 Package['libmysqlclient-dev'],
+Package['libyaml-dev'],
 ],
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c3458e9887cfc65560be9ea8466bce4a0cfa7e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Rename test to match new class name

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

Change subject: Rename test to match new class name
..


Rename test to match new class name

Change-Id: I80f29574c96d94e92290066422f33378752d05d0
---
R tests/test_runner.py
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/tests/test_job_runner.py b/tests/test_runner.py
similarity index 100%
rename from tests/test_job_runner.py
rename to tests/test_runner.py

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80f29574c96d94e92290066422f33378752d05d0
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: stylelint: Drop 'no-unsupported-browser-features' rule, no l...

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

Change subject: stylelint: Drop 'no-unsupported-browser-features' rule, no 
longer supported
..


stylelint: Drop 'no-unsupported-browser-features' rule, no longer supported

Change-Id: Ib74a4ebeb4502f16cb7095bcb94db3a994a22e4c
---
M modules/rcfilters-highlight-tour.less
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/modules/rcfilters-highlight-tour.less 
b/modules/rcfilters-highlight-tour.less
index b4cd1c8..47a6a00 100644
--- a/modules/rcfilters-highlight-tour.less
+++ b/modules/rcfilters-highlight-tour.less
@@ -31,14 +31,12 @@
bottom: -20px;
left: ~"calc(50% - 20px)";
opacity: 0;
-   /* stylelint-disable no-unsupported-browser-features */
-webkit-animation: pulse 3s ease-out;
-moz-animation: pulse 3s ease-out;
animation: pulse 3s ease-out;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-   /* stylelint-enable no-unsupported-browser-features */
 }
 
 .rcfilters-tour-highlight-stillDot {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib74a4ebeb4502f16cb7095bcb94db3a994a22e4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Log actual commandline rather than redundant parent job slug.

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

Change subject: Log actual commandline rather than redundant parent job slug.
..


Log actual commandline rather than redundant parent job slug.

Change-Id: I2e57112fa528037a0db16f9389bc4320eaf528f9
---
M processcontrol/output_streamer.py
M processcontrol/runner.py
2 files changed, 12 insertions(+), 8 deletions(-)

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



diff --git a/processcontrol/output_streamer.py 
b/processcontrol/output_streamer.py
index 4735580..39e767b 100644
--- a/processcontrol/output_streamer.py
+++ b/processcontrol/output_streamer.py
@@ -25,11 +25,12 @@
 
 class OutputStreamer(object):
 
-def __init__(self, process, slug, start_time):
+def __init__(self, process, slug, cmdline, start_time):
 self.out_stream = process.stdout
 self.err_stream = process.stderr
 self.pid = process.pid
 self.slug = slug
+self.cmdline = cmdline
 self.filename = make_logfile_path(slug, start_time)
 self.logger = None
 self.threads = {}
@@ -37,8 +38,17 @@
 
 def start(self):
 self.init_logger()
+
+self.log_header()
+
 self.start_reading(self.out_stream, "stdout")
 self.start_reading(self.err_stream, "stderr", is_error_stream=True)
+
+def log_header(self):
+# TODO: maybe expose the header as a configurable template.
+self.logger.info("===")
+self.logger.info("{cmdline} ({pid})".format(cmdline=self.cmdline, 
pid=self.pid))
+self.logger.info("---")
 
 def start_reading(self, stream, stream_name, is_error_stream=False):
 thread = threading.Thread(
@@ -81,12 +91,6 @@
 console_handler = logging.StreamHandler(sys.stdout)
 self.log_handlers.append(console_handler)
 self.logger.addHandler(console_handler)
-
-# FIXME: gets written for each subprocess, so the name=slug is not
-# quite right.  Should be the commandline?
-self.logger.info("===")
-self.logger.info("{name} ({pid})".format(name=self.slug, pid=self.pid))
-self.logger.info("---")
 
 def stop(self):
 for thread in self.threads.values():
diff --git a/processcontrol/runner.py b/processcontrol/runner.py
index ce0e7c3..57736ee 100644
--- a/processcontrol/runner.py
+++ b/processcontrol/runner.py
@@ -66,7 +66,7 @@
 command = shlex.split(command_string)
 
 self.process = subprocess.Popen(command, stdout=subprocess.PIPE, 
stderr=subprocess.PIPE, env=self.job.environment)
-streamer = output_streamer.OutputStreamer(self.process, self.job.slug, 
self.start_time)
+streamer = output_streamer.OutputStreamer(self.process, self.job.slug, 
command_string, self.start_time)
 self.logfile = streamer.filename
 streamer.start()
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e57112fa528037a0db16f9389bc4320eaf528f9
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: stylelint: Drop 'no-unsupported-browser-features' rule, no l...

2017-04-10 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347527 )

Change subject: stylelint: Drop 'no-unsupported-browser-features' rule, no 
longer supported
..

stylelint: Drop 'no-unsupported-browser-features' rule, no longer supported

Change-Id: Ib74a4ebeb4502f16cb7095bcb94db3a994a22e4c
---
M modules/rcfilters-highlight-tour.less
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/modules/rcfilters-highlight-tour.less 
b/modules/rcfilters-highlight-tour.less
index b4cd1c8..47a6a00 100644
--- a/modules/rcfilters-highlight-tour.less
+++ b/modules/rcfilters-highlight-tour.less
@@ -31,14 +31,12 @@
bottom: -20px;
left: ~"calc(50% - 20px)";
opacity: 0;
-   /* stylelint-disable no-unsupported-browser-features */
-webkit-animation: pulse 3s ease-out;
-moz-animation: pulse 3s ease-out;
animation: pulse 3s ease-out;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-   /* stylelint-enable no-unsupported-browser-features */
 }
 
 .rcfilters-tour-highlight-stillDot {

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add ORES thresholds for fawiki, ruwiki, trwiki

2017-04-10 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347526 )

Change subject: Add ORES thresholds for fawiki, ruwiki, trwiki
..

Add ORES thresholds for fawiki, ruwiki, trwiki

To prepare for tomorrow's deployment.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 37b1be5..f0e8491 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18183,6 +18183,45 @@
'bad' => [ 'min' => 0, 'max' => 0.256 ], // ~45% 
precision
],
],
+   'fawiki' => [
+   'damaging' => [
+   'likelygood' => [ 'min' => 0, 'max' => 0.495 ], // 
~99.5% precision
+   'maybebad' => [ 'min' => 0.330, 'max' => 1 ], // ~15% 
precision
+   'likelybad' => [ 'min' => 0.941, 'max' => 1 ], // ~45% 
precision
+   'verylikelybad' => [ 'min' => 0.963, 'max' => 1 ], // 
~75% precision
+   ],
+   'goodfaith' => [
+   'good' => [ 'min' => 0.381, 'max' => 1 ], // ~99.5% 
precision
+   'maybebad' => [ 'min' => 0, 'max' => 0.608 ], // ~15% 
precision
+   'bad' => [ 'min' => 0, 'max' => 0.042 ], // ~100% 
precision
+   ],
+   ],
+   'ruwiki' => [
+   'damaging' => [
+   'likelygood' => [ 'min' => 0, 'max' => 0.599 ], // ~99% 
precision
+   'maybebad' => [ 'min' => 0.466, 'max' => 1 ], // ~90% 
recall
+   'likelybad' => [ 'min' => 0.859, 'max' => 1 ], // ~45% 
precision
+   'verylikelybad' => [ 'min' => 0.935, 'max' => 1 ], // 
~75% precision
+   ],
+   'goodfaith' => [
+   'good' => [ 'min' => 0.570, 'max' => 1 ], // ~99.5% 
precision
+   'maybebad' => [ 'min' => 0, 'max' => 0.549 ], // ~15% 
precision
+   'bad' => [ 'min' => 0, 'max' => 0.081 ], // ~45% 
precision
+   ],
+   ],
+   'trwiki' => [
+   'damaging' => [
+   'likelygood' => [ 'min' => 0, 'max' => 0.155 ], // 
~99.5% precision
+   'maybebad' => [ 'min' => 0.105, 'max' => 1 ], // ~15% 
precision
+   'likelybad' => [ 'min' => 0.882, 'max' => 1 ], // ~45% 
precision
+   'verylikelybad' => [ 'min' => 0.912, 'max' => 1 ], // 
~75% precision
+   ],
+   'goodfaith' => [
+   'good' => [ 'min' => 0.809, 'max' => 1 ], // ~99.5% 
precision
+   'maybebad' => [ 'min' => 0, 'max' => 0.860 ], // ~15% 
precision
+   'bad' => [ 'min' => 0, 'max' => 0.119 ], // ~45% 
precision
+   ],
+   ],
 ],
 'wgOresEnabledNamespaces' => [
'default' => [],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If43dbd7afae5d287665c4ba4f990667af92c4390
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] operations/puppet[production]: irc echo: Convert to base::service class to maintain the script

2017-04-10 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347518 )

Change subject: irc echo: Convert to base::service class to maintain the script
..

irc echo: Convert to base::service class to maintain the script

Also migrate to systemd at the same time.

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a1e899bec6e0cea34256917d9818ca35017a9f2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: 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...process-control[master]: Rename confusing use of "job tag"

2017-04-10 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347525 )

Change subject: Rename confusing use of "job tag"
..

Rename confusing use of "job tag"

Change-Id: I961bc4dc331837d974465a18f570b088fa629952
---
M processcontrol/lock.py
M processcontrol/runner.py
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/process-control 
refs/changes/25/347525/1

diff --git a/processcontrol/lock.py b/processcontrol/lock.py
index 38e6c67..f913139 100644
--- a/processcontrol/lock.py
+++ b/processcontrol/lock.py
@@ -18,8 +18,8 @@
 
 
 # TODO: Decide whether we want to failopen?
-def begin(failopen=False, job_tag=None):
-filename = path_for_job(job_tag)
+def begin(failopen=False, slug=None):
+filename = path_for_job(slug)
 
 if os.path.exists(filename):
 config.log.error("Lockfile found!")
diff --git a/processcontrol/runner.py b/processcontrol/runner.py
index f4e6fa9..fb40a05 100644
--- a/processcontrol/runner.py
+++ b/processcontrol/runner.py
@@ -31,7 +31,7 @@
 passwd_entry = pwd.getpwnam(service_user)
 assert passwd_entry.pw_uid == os.getuid()
 
-lock.begin(job_tag=self.job.slug)
+lock.begin(slug=self.job.slug)
 self.start_time = datetime.datetime.utcnow()
 job_history = job_state.load_state(self.job.slug)
 job_history.record_started(self.start_time)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I961bc4dc331837d974465a18f570b088fa629952
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Break out unofficial iDEAL status lookup

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

Change subject: Break out unofficial iDEAL status lookup
..


Break out unofficial iDEAL status lookup

Maybe someone else can use this, but we can't!

Bug: T128692
Change-Id: Ib2475f7140abee78d9e89351465d4975507df363
---
M PaymentProviders/Ingenico/BankPaymentProvider.php
A PaymentProviders/Ingenico/IdealStatusProvider.php
M PaymentProviders/Ingenico/Tests/Data/availability.response
M PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php
A PaymentProviders/Ingenico/Tests/phpunit/IdealStatusProviderTest.php
M SmashPig.yaml
6 files changed, 182 insertions(+), 44 deletions(-)

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



diff --git a/PaymentProviders/Ingenico/BankPaymentProvider.php 
b/PaymentProviders/Ingenico/BankPaymentProvider.php
index 4844bbc..87c034d 100644
--- a/PaymentProviders/Ingenico/BankPaymentProvider.php
+++ b/PaymentProviders/Ingenico/BankPaymentProvider.php
@@ -4,7 +4,6 @@
 
 use SmashPig\Core\Context;
 use Psr\Cache\CacheItemPoolInterface;
-use SmashPig\Core\Http\OutboundRequest;
 
 /**
  * Handle bank payments via Ingenico
@@ -24,15 +23,9 @@
 */
protected $cache;
 
-   /**
-* @var array()
-*/
-   protected $availabilityParameters;
-
public function __construct( array $options = array() ) {
parent::__construct( $options );
$this->cacheParameters = $options['cache-parameters'];
-   $this->availabilityParameters = 
$options['availability-parameters'];
// FIXME: provide objects in constructor
$config = Context::get()->getConfiguration();
$this->cache = $config->object( 'cache' );
@@ -52,7 +45,7 @@
$cacheItem = $this->cache->getItem( $cacheKey );
 
if ( !$cacheItem->isHit() || $this->shouldBeExpired( $cacheItem 
) ) {
-   /*$query = array(
+   $query = array(
'countryCode' => $country,
'currencyCode' => $currency
);
@@ -63,28 +56,7 @@
 
foreach ( $response['entries'] as $entry ) {
$banks[$entry['issuerId']] = 
$entry['issuerName'];
-   }*/
-
-   $banks = array();
-
-   // HAAACK!
-   // Use undocumented API to get availability straight 
from iDEAL,
-   // until Ingenico can incorporate this into their 
directory
-   if ( $country === 'NL' && $currency === 'EUR' ) {
-   $url = $this->availabilityParameters['url'];
-   $threshold = 
$this->availabilityParameters['threshold'];
-
-   $request = new OutboundRequest( $url );
-   $rawResponse = $request->execute();
-   $response = json_decode( $rawResponse['body'], 
true );
-
-   foreach ( $response['Issuers'] as $issuer ) {
-   if ( $issuer['Percent'] >= $threshold ) 
{
-   $banks[$issuer['BankId']] = 
$issuer['BankName'];
-   }
-   }
}
-
$duration = $this->cacheParameters['duration'];
$cacheItem->set( array(
'value' => $banks,
diff --git a/PaymentProviders/Ingenico/IdealStatusProvider.php 
b/PaymentProviders/Ingenico/IdealStatusProvider.php
new file mode 100644
index 000..637207d
--- /dev/null
+++ b/PaymentProviders/Ingenico/IdealStatusProvider.php
@@ -0,0 +1,77 @@
+https://availability.ideal.nl
+ */
+class IdealStatusProvider {
+
+   /**
+* @var array()
+*/
+   protected $cacheParameters;
+
+   /**
+* @var CacheItemPoolInterface
+*/
+   protected $cache;
+
+   /**
+* @var string
+*/
+   protected $availabilityUrl;
+
+   public function __construct( array $options = array() ) {
+   $this->cacheParameters = $options['cache-parameters'];
+   $this->availabilityUrl = $options['availability-url'];
+   // FIXME: provide objects in constructor
+   $config = Context::get()->getConfiguration();
+   $this->cache = $config->object( 'cache' );
+   }
+
+   /**
+* Look up bank status
+* @return array Keys are bank codes, values are names
+*/
+   public function getBankStatus() {
+   $cacheKey = $this->cacheParameters['key'];
+   $cacheItem = $this->cache->getItem( $cacheKey );
+
+  

[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Call a slug what it is

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

Change subject: Call a slug what it is
..


Call a slug what it is

Change-Id: Ibe004d848462e58b0fabc974de9474ecf9dd29de
---
M bin/run-job
1 file changed, 10 insertions(+), 5 deletions(-)

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



diff --git a/bin/run-job b/bin/run-job
index eec5f9f..7df6344 100755
--- a/bin/run-job
+++ b/bin/run-job
@@ -10,10 +10,12 @@
 
 
 def list_jobs():
-   for job_name in job_spec.list():
+   for job_slug in job_spec.list():
try:
-   job = job_spec.load(job_name)
-   message = "{job} - {human_name}".format(job=job_name, 
human_name=job.name)
+   # FIXME: Nicer if this inner loop moved to Job rather 
than having
+   # status come from an ephemeral runner.
+   job = job_spec.load(job_slug)
+   message = "{job} - {name}".format(job=job_slug, 
name=job.name)
status = runner.JobRunner(job).status()
if status is not None:
message += "" + yaml.dump(status).strip()
@@ -22,14 +24,17 @@
if job.description is not None:
message += "\n" + job.description
except AssertionError:
-   message = "{job} ***Invalid 
configuration***".format(job=job_name)
+   message = "{job} ***Invalid 
configuration***".format(job=job_slug)
print(message)
 
 
 if __name__ == "__main__":
-   parser = argparse.ArgumentParser(description="Run and maintain 
process-control jobs.")
+   # TODO: Change the function name or move responsibilities beyond "run" 
to a
+   # new script.
+   parser = argparse.ArgumentParser(description="Run or query 
`process-control` jobs.")
parser.add_argument("-j", "--job", help="Run a given job.", type=str)
parser.add_argument("-l", "--list-jobs", help="Print a summary of 
available jobs.", action='store_true')
+   # TODO: --kill-job, --disable-group, --enable-group
args = parser.parse_args()
 
if args.job:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe004d848462e58b0fabc974de9474ecf9dd29de
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Use constants for HTTP status codes

2017-04-10 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347524 )

Change subject: Use constants for HTTP status codes
..

Use constants for HTTP status codes

Change-Id: I4325d080631c85c6187001487796ec0aa56b5593
---
M Core/Http/HttpStatusValidator.php
M Core/Http/RequestHandler.php
M Core/Listeners/RestListener.php
M PaymentProviders/Ingenico/RestResponseValidator.php
M PaymentProviders/PayPal/Listener.php
5 files changed, 19 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/24/347524/1

diff --git a/Core/Http/HttpStatusValidator.php 
b/Core/Http/HttpStatusValidator.php
index 68c6859..7a88f0b 100644
--- a/Core/Http/HttpStatusValidator.php
+++ b/Core/Http/HttpStatusValidator.php
@@ -3,6 +3,7 @@
 namespace SmashPig\Core\Http;
 
 use SmashPig\Core\Logging\Logger;
+use Symfony\Component\HttpFoundation\Response;
 
 /**
  * Determines whether to retry HTTP requests based on status code
@@ -19,12 +20,12 @@
$body = $parsedResponse['body'];
 
switch ( $statusCode ) {
-   case 400:   // Oh noes! Bad request.. BAD CODE, BAD BAD 
CODE!
+   case Response::HTTP_BAD_REQUEST:   // Oh noes! Bad 
request.. BAD CODE, BAD BAD CODE!
$continue = false;
Logger::error( "Request returned (400) BAD 
REQUEST: $body" );
break;
 
-   case 403:   // Hmm, forbidden? Maybe if we ask it 
nicely again...
+   case Response::HTTP_FORBIDDEN:   // Hmm, forbidden? 
Maybe if we ask it nicely again...
$continue = true;
Logger::alert( "Request returned (403) 
FORBIDDEN: $body" );
break;
@@ -39,8 +40,8 @@
 
protected function getSuccessCodes() {
return array(
-   200, // Everything is AWESOME
-   201  // Also fine, and we created a thing
+   Response::HTTP_OK, // Everything is AWESOME
+   Response::HTTP_CREATED  // Also fine, and we created a 
thing
);
}
 }
diff --git a/Core/Http/RequestHandler.php b/Core/Http/RequestHandler.php
index 5036a69..4744e38 100644
--- a/Core/Http/RequestHandler.php
+++ b/Core/Http/RequestHandler.php
@@ -36,7 +36,7 @@
 
if ( count( $parts ) < 2 ) {
$response->setStatusCode(
-   403,
+   Response::HTTP_FORBIDDEN,
'Cannot process this request: bad URI format. A 
configuration node and an action is required'
);
return $response;
@@ -57,7 +57,7 @@
 
if ( $config->nodeExists( 'disabled' ) && $config->val( 
'disabled' ) ) {
Logger::debug( '403 will be given for disabled view.', 
$uri );
-   $response->setStatusCode( 403, "View '$view' disabled. 
Cannot continue." );
+   $response->setStatusCode( Response::HTTP_FORBIDDEN, 
"View '$view' disabled. Cannot continue." );
return $response;
}
 
@@ -80,7 +80,7 @@
Logger::info( "Starting processing for request, configuration 
view: '$view', action: '$action'" );
if ( !$config->nodeExists( "endpoints/$action" ) ) {
Logger::debug( '403 will be given for unknown action on 
inbound URL.', $uri );
-   $response->setStatusCode( 403, "Action '$action' not 
configured. Cannot continue." );
+   $response->setStatusCode( Response::HTTP_FORBIDDEN, 
"Action '$action' not configured. Cannot continue." );
return $response;
}
 
@@ -101,11 +101,11 @@
} else {
$str = "Requested action '$action' does not implement a 
known handler. Cannot continue.";
Logger::debug( $str );
-   $response->setStatusCode( 500, $str );
+   $response->setStatusCode( 
Response::HTTP_INTERNAL_SERVER_ERROR, $str );
}
 
$code = $response->getStatusCode();
-   if ( ( $code !== 200 ) && ( $code !== 302 ) ) {
+   if ( ( $code !== Response::HTTP_OK ) && ( $code !== 
Response::HTTP_FOUND ) ) {
$response->setContent( '' );
}
return $response;
@@ -125,7 +125,7 @@
 
$response = new Response();
$response->setPrivate();
-   $response->setStatusCode( 500, "Unhandled internal server 
error." );
+   $response->setStatusCode( Response::HTTP_INTERNAL_SERVER_ERROR, 
"Unhan

[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Sanitize gadget name

2017-04-10 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347523 )

Change subject: Sanitize gadget name
..

Sanitize gadget name

MediaWikiGadgetsDefinition does some basic gadget name sanitization
and we have to do the same when checking "is gadget enabled for user"

Changes:
 - sanitize gadget name same way as
   MediaWikiGadgetsDefinitionRepo::newFromDefinition() does.
 - add try{} catch() when loading gadget as getGadget might throw an
   exception

Bug: T160081
Change-Id: Ia7a57e9dcfa3b25129d6d2bf75795372fad2b251
---
M includes/PopupsGadgetsIntegration.php
M tests/phpunit/PopupsGadgetsIntegrationTest.php
2 files changed, 65 insertions(+), 2 deletions(-)


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

diff --git a/includes/PopupsGadgetsIntegration.php 
b/includes/PopupsGadgetsIntegration.php
index addc0d3..763999d 100644
--- a/includes/PopupsGadgetsIntegration.php
+++ b/includes/PopupsGadgetsIntegration.php
@@ -51,9 +51,19 @@
 */
public function __construct( Config $config , ExtensionRegistry 
$extensionRegistry ) {
$this->extensionRegistry =  $extensionRegistry;
-   $this->navPopupsGadgetName = $config->get( 
self::CONFIG_NAVIGATION_POPUPS_NAME );
+   $this->navPopupsGadgetName = $this->sanitizeGadgetName(
+   $config->get( self::CONFIG_NAVIGATION_POPUPS_NAME ) );
}
 
+   /**
+* Sanitize gadget name
+*
+* @param $gadgetName
+* @return string
+*/
+   private function sanitizeGadgetName( $gadgetName ) {
+   return str_replace( ' ', '_', trim( $gadgetName ) );
+   }
/**
 * @return bool
 */
@@ -73,7 +83,12 @@
$gadgetsRepo = \GadgetRepo::singleton();
$match = array_search( $this->navPopupsGadgetName, 
$gadgetsRepo->getGadgetIds() );
if ( $match !== false ) {
-   return $gadgetsRepo->getGadget( 
$this->navPopupsGadgetName )->isEnabled( $user );
+   try {
+   return $gadgetsRepo->getGadget( 
$this->navPopupsGadgetName )
+   ->isEnabled( $user );
+   } catch ( \InvalidArgumentException $e ) {
+   return false;
+   }
}
}
return false;
diff --git a/tests/phpunit/PopupsGadgetsIntegrationTest.php 
b/tests/phpunit/PopupsGadgetsIntegrationTest.php
index c93fd68..45d96f6 100644
--- a/tests/phpunit/PopupsGadgetsIntegrationTest.php
+++ b/tests/phpunit/PopupsGadgetsIntegrationTest.php
@@ -145,6 +145,54 @@
}
 
/**
+* Test the edge case when GadgetsRepo::getGadget throws an exxception
+* @covers ::conflictsWithNavPopupsGadget
+*/
+   public function testConflictsWithNavPopupsGadgetWhenGadgetNotExists() {
+   $this->checkRequiredDependencies();
+
+   $user = $this->getTestUser()->getUser();
+
+   $gadgetRepoMock = $this->getMock( GadgetRepo::class,
+   [ 'getGadgetIds', 'getGadget' ] );
+
+   $gadgetRepoMock->expects( $this->once() )
+   ->method( 'getGadgetids' )
+   ->willReturn( [ self::NAV_POPUPS_GADGET_NAME ] 
);
+
+   $gadgetRepoMock->expects( $this->once() )
+   ->method( 'getGadget' )
+   ->with( self::NAV_POPUPS_GADGET_NAME )
+   ->willThrowException( new 
InvalidArgumentException() );
+
+   $this->executeConflictsWithNavPopupsGadgetSafeCheck( 
$user, $gadgetRepoMock,
+   self::GADGET_DISABLED );
+   }
+
+   /**
+* @covers ::sanitizeGadgetName
+* @dataProvider provideGadgetNamesWithSanitizedVersion
+*/
+   public function testConflictsWithNavPopupsGadgetNameSanitization( 
$name, $sanitized ) {
+   $this->checkRequiredDependencies();
+   $integration = new PopupsGadgetsIntegration( 
$this->getConfigMock(),
+   $this->getExtensionRegistryMock( true ) );
+
+   $integrationTest = 
TestingAccessWrapper::newFromObject($integration);
+   $this->assertEquals( $sanitized, 
$integrationTest->sanitizeGadgetName( $name ) );
+   }
+
+   /**
+* @return array
+*/
+   public function provideGadgetNamesWithSanitizedVersion() {
+   return [
+   [ ' Popups ', 'Popups'],
+   [ 'Navigation_popups-API', 'Navigation_popups-API' ],
+   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: keystone.conf: Whitespace cleanups

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

Change subject: keystone.conf:  Whitespace cleanups
..


keystone.conf:  Whitespace cleanups

Change-Id: I1c6bdbfdae3453c71e1777830a2db70262db39cb
---
M modules/openstack/templates/liberty/keystone/keystone.conf.erb
M modules/openstack/templates/mitaka/keystone/keystone.conf.erb
2 files changed, 146 insertions(+), 146 deletions(-)

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



diff --git a/modules/openstack/templates/liberty/keystone/keystone.conf.erb 
b/modules/openstack/templates/liberty/keystone/keystone.conf.erb
index 897144b..5d9ff21 100644
--- a/modules/openstack/templates/liberty/keystone/keystone.conf.erb
+++ b/modules/openstack/templates/liberty/keystone/keystone.conf.erb
@@ -3,14 +3,14 @@
 #
 # From keystone
 #
- 
+
 # A "shared secret" that can be used to bootstrap Keystone. This "token" does
 # not represent a user, and carries no explicit authorization. To disable in
 # production (highly recommended), remove AdminTokenAuthMiddleware from your
 # paste application pipelines (for example, in keystone-paste.ini). (string
 # value)
 admin_token = <%= @keystoneconfig["admin_token"] %>
- 
+
 # The base public endpoint URL for Keystone that is advertised to clients
 # (NOTE: this does NOT affect how Keystone listens for connections). Defaults
 # to the base host URL of the request. E.g. a request to
@@ -18,7 +18,7 @@
 # only need to set this value if the base URL contains a path (e.g. /prefix/v3)
 # or the endpoint should be found on a different server. (string value)
 #public_endpoint = 
- 
+
 # The base admin endpoint URL for Keystone that is advertised to clients (NOTE:
 # this does NOT affect how Keystone listens for connections). Defaults to the
 # base host URL of the request. E.g. a request to http://server:35357/v3/users
@@ -26,116 +26,116 @@
 # if the base URL contains a path (e.g. /prefix/v3) or the endpoint should be
 # found on a different server. (string value)
 #admin_endpoint = 
- 
+
 # Maximum depth of the project hierarchy. WARNING: setting it to a large value
 # may adversely impact performance. (integer value)
 #max_project_tree_depth = 5
- 
+
 # Limit the sizes of user & project ID/names. (integer value)
 #max_param_size = 64
- 
+
 # Similar to max_param_size, but provides an exception for token values.
 # (integer value)
 #max_token_size = 8192
- 
+
 # Similar to the member_role_name option, this represents the default role ID
 # used to associate users with their default projects in the v2 API. This will
 # be used as the explicit role where one is not specified by the v2 API.
 # (string value)
 #member_role_id = 9fe2ff9ee4384b1894a90878d3e92bab
- 
+
 # This is the role name used in combination with the member_role_id option; see
 # that option for more detail. (string value)
 member_role_name = user
- 
+
 # The value passed as the keyword "rounds" to passlib's encrypt method.
 # (integer value)
 # Minimum value: 1000
 # Maximum value: 10
 #crypt_strength = 1
- 
+
 # The maximum number of entities that will be returned in a collection, with no
 # limit set by default. This global limit may be then overridden for a specific
 # driver, by specifying a list_limit in the appropriate section (e.g.
 # [assignment]). (integer value)
 #list_limit = 
- 
+
 # Set this to false if you want to enable the ability for user, group and
 # project entities to be moved between domains by updating their domain_id.
 # Allowing such movement is not recommended if the scope of a domain admin is
 # being restricted by use of an appropriate policy file (see
 # policy.v3cloudsample as an example). (boolean value)
 #domain_id_immutable = true
- 
+
 # If set to true, strict password length checking is performed for password
 # manipulation. If a password exceeds the maximum length, the operation will
 # fail with an HTTP 403 Forbidden error. If set to false, passwords are
 # automatically truncated to the maximum length. (boolean value)
 #strict_password_check = false
- 
+
 # The HTTP header used to determine the scheme for the original request, even
 # if it was removed by an SSL terminating proxy. Typical value is
 # "HTTP_X_FORWARDED_PROTO". (string value)
 #secure_proxy_ssl_header = 
- 
+
 #
 # From keystone.notifications
 #
- 
+
 # Default publisher_id for outgoing notifications (string value)
 #default_publisher_id = 
- 
+
 # Define the notification format for Identity Service events. A "basic"
 # notification has information about the resource being operated on. A "cadf"
 # notification has the same information, as well as information about the
 # initiator of the event. (string value)
 # Allowed values: basic, cadf
 #notification_format = basic
- 
+
 #
 # From oslo.log
 #
- 
+
 # Print debugging output (set logging level to DEBUG instead of default INFO
 # level). (boolean value)
 debu

[MediaWiki-commits] [Gerrit] operations/puppet[production]: keystone.conf: Whitespace cleanups

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

Change subject: keystone.conf:  Whitespace cleanups
..

keystone.conf:  Whitespace cleanups

Change-Id: I1c6bdbfdae3453c71e1777830a2db70262db39cb
---
M modules/openstack/templates/liberty/keystone/keystone.conf.erb
M modules/openstack/templates/mitaka/keystone/keystone.conf.erb
2 files changed, 146 insertions(+), 146 deletions(-)


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

diff --git a/modules/openstack/templates/liberty/keystone/keystone.conf.erb 
b/modules/openstack/templates/liberty/keystone/keystone.conf.erb
index 897144b..5d9ff21 100644
--- a/modules/openstack/templates/liberty/keystone/keystone.conf.erb
+++ b/modules/openstack/templates/liberty/keystone/keystone.conf.erb
@@ -3,14 +3,14 @@
 #
 # From keystone
 #
- 
+
 # A "shared secret" that can be used to bootstrap Keystone. This "token" does
 # not represent a user, and carries no explicit authorization. To disable in
 # production (highly recommended), remove AdminTokenAuthMiddleware from your
 # paste application pipelines (for example, in keystone-paste.ini). (string
 # value)
 admin_token = <%= @keystoneconfig["admin_token"] %>
- 
+
 # The base public endpoint URL for Keystone that is advertised to clients
 # (NOTE: this does NOT affect how Keystone listens for connections). Defaults
 # to the base host URL of the request. E.g. a request to
@@ -18,7 +18,7 @@
 # only need to set this value if the base URL contains a path (e.g. /prefix/v3)
 # or the endpoint should be found on a different server. (string value)
 #public_endpoint = 
- 
+
 # The base admin endpoint URL for Keystone that is advertised to clients (NOTE:
 # this does NOT affect how Keystone listens for connections). Defaults to the
 # base host URL of the request. E.g. a request to http://server:35357/v3/users
@@ -26,116 +26,116 @@
 # if the base URL contains a path (e.g. /prefix/v3) or the endpoint should be
 # found on a different server. (string value)
 #admin_endpoint = 
- 
+
 # Maximum depth of the project hierarchy. WARNING: setting it to a large value
 # may adversely impact performance. (integer value)
 #max_project_tree_depth = 5
- 
+
 # Limit the sizes of user & project ID/names. (integer value)
 #max_param_size = 64
- 
+
 # Similar to max_param_size, but provides an exception for token values.
 # (integer value)
 #max_token_size = 8192
- 
+
 # Similar to the member_role_name option, this represents the default role ID
 # used to associate users with their default projects in the v2 API. This will
 # be used as the explicit role where one is not specified by the v2 API.
 # (string value)
 #member_role_id = 9fe2ff9ee4384b1894a90878d3e92bab
- 
+
 # This is the role name used in combination with the member_role_id option; see
 # that option for more detail. (string value)
 member_role_name = user
- 
+
 # The value passed as the keyword "rounds" to passlib's encrypt method.
 # (integer value)
 # Minimum value: 1000
 # Maximum value: 10
 #crypt_strength = 1
- 
+
 # The maximum number of entities that will be returned in a collection, with no
 # limit set by default. This global limit may be then overridden for a specific
 # driver, by specifying a list_limit in the appropriate section (e.g.
 # [assignment]). (integer value)
 #list_limit = 
- 
+
 # Set this to false if you want to enable the ability for user, group and
 # project entities to be moved between domains by updating their domain_id.
 # Allowing such movement is not recommended if the scope of a domain admin is
 # being restricted by use of an appropriate policy file (see
 # policy.v3cloudsample as an example). (boolean value)
 #domain_id_immutable = true
- 
+
 # If set to true, strict password length checking is performed for password
 # manipulation. If a password exceeds the maximum length, the operation will
 # fail with an HTTP 403 Forbidden error. If set to false, passwords are
 # automatically truncated to the maximum length. (boolean value)
 #strict_password_check = false
- 
+
 # The HTTP header used to determine the scheme for the original request, even
 # if it was removed by an SSL terminating proxy. Typical value is
 # "HTTP_X_FORWARDED_PROTO". (string value)
 #secure_proxy_ssl_header = 
- 
+
 #
 # From keystone.notifications
 #
- 
+
 # Default publisher_id for outgoing notifications (string value)
 #default_publisher_id = 
- 
+
 # Define the notification format for Identity Service events. A "basic"
 # notification has information about the resource being operated on. A "cadf"
 # notification has the same information, as well as information about the
 # initiator of the event. (string value)
 # Allowed values: basic, cadf
 #notification_format = basic
- 
+
 #
 # From oslo.log
 #
- 
+
 # Print debugging output (set logging level to DEBUG instead of default INFO
 # level). (boolean value)
 debu

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove deprecated config option

2017-04-10 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347521 )

Change subject: Remove deprecated config option
..

Remove deprecated config option

This config flag doesn't do anything.

Change-Id: Id2da9e46db946f67febe9cc33001914899c74a82
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 0 insertions(+), 5 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 766c668..27c2289 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3066,7 +3066,6 @@
 if ( $wmgUsePageImages ) {
wfLoadExtension( 'PageImages' );
$wgPageImagesExpandOpenSearchXml = $wmgPageImagesExpandOpenSearchXml;
-   $wgPageImagesUseGalleries = $wmgPageImagesUseGalleries;
 }
 
 if ( $wmgUseSearchExtraNS ) {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 37b1be5..dd40b7e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17340,10 +17340,6 @@
 'wmgPageImagesExpandOpenSearchXml' => [
'default' => true,
 ],
-'wmgPageImagesUseGalleries' => [
-   'default' => false,
-   'commonswiki' => true,
-],
 
 'wmgUseTorBlock' => [
'default' => true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2da9e46db946f67febe9cc33001914899c74a82
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] wikimedia...process-control[master]: Fix double-failmail after timeout.

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

Change subject: Fix double-failmail after timeout.
..


Fix double-failmail after timeout.

The death by signal 9 is expected after timing out, so suppress that warning.
Also, the timeout is on a separate thread so throwing an exception was just
spammy.

Change-Id: Ie0cd58e9a890ecf9100f022cffec0743b9327504
---
M processcontrol/runner.py
M tests/test_job_runner.py
2 files changed, 37 insertions(+), 22 deletions(-)

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



diff --git a/processcontrol/runner.py b/processcontrol/runner.py
index e97494c..ce0e7c3 100644
--- a/processcontrol/runner.py
+++ b/processcontrol/runner.py
@@ -18,6 +18,9 @@
 self.mailer = mailer.Mailer(self.job)
 self.logfile = None
 
+self.killer_was_me = False
+self.failure_reason = None
+
 def run(self):
 # Check that we are the service user.
 service_user = str(self.global_config.get("user"))
@@ -41,13 +44,22 @@
 
 try:
 for command_line in self.job.commands:
-self.run_command(command_line)
+return_code = self.run_command(command_line)
+if return_code != 0:
+self.fail_exitcode(return_code)
+except JobFailure as ex:
+config.log.error(ex.message)
+self.mailer.fail_mail(ex.message, logfile=self.logfile)
+raise
 finally:
-lock.end()
 if self.job.timeout > 0:
+# This becomes relevant when running multiple commands.
 timer.cancel()
+lock.end()
 
 def run_command(self, command_string):
+"""Fork a command, record its outputs to a logfile and return the
+integer exit code."""
 # TODO: Log commandline into the output log as well.
 config.log.info("Running command: {cmd}".format(cmd=command_string))
 
@@ -65,33 +77,34 @@
 streamer.stop()
 
 return_code = self.process.returncode
-if return_code != 0:
-self.fail_exitcode(return_code)
 
 self.process = None
 
-def fail_exitcode(self, return_code):
-message = "{name} failed with code {code}".format(name=self.job.name, 
code=return_code)
-config.log.error(message)
-# TODO: Prevent future jobs according to config.
-self.mailer.fail_mail(message, logfile=self.logfile)
-raise JobFailure(message)
+return return_code
 
-def fail_has_stderr(self, stderr_data):
-message = "{name} printed things to stderr:".format(name=self.job.name)
-config.log.error(message)
-body = stderr_data.decode("utf-8")
-config.log.error(body)
-self.mailer.fail_mail(message, body, logfile=self.logfile)
+def fail_exitcode(self, return_code):
+# Check if this is an expected non-zero return code, i.e. we sent the
+# process a kill signal.
+if self.killer_was_me:
+# We already know, so pass through the failure reason.
+message = self.failure_reason
+else:
+message = "{name} failed with code 
{code}".format(name=self.job.name, code=return_code)
+# TODO: Prevent future jobs according to config.
 raise JobFailure(message)
 
 def fail_timeout(self):
+# Send a message to self using cheap IPC.
+# FIXME: or is this not safe?
+self.killer_was_me = True
+self.failure_reason = "{name} timed out after {timeout} 
minutes".format(
+name=self.job.name, timeout=self.job.timeout)
+
+config.log.warning("Killing subprocess due to timeout")
 self.process.kill()
-message = "{name} timed out after {timeout} 
minutes".format(name=self.job.name, timeout=self.job.timeout)
-config.log.error(message)
-self.mailer.fail_mail(message, logfile=self.logfile)
-# FIXME: Job will return SIGKILL now, fail_exitcode should ignore that 
signal now?
-raise JobFailure(message)
+# Note that we're on a separate thread, so instead of raising an
+# exception, we rely on process.kill() to trigger fail_exitcode(-9) in
+# the parent thread.
 
 def status(self):
 """Check for any running instances of this job, in this process or 
another.
diff --git a/tests/test_job_runner.py b/tests/test_job_runner.py
index 5af7fac..1263da4 100644
--- a/tests/test_job_runner.py
+++ b/tests/test_job_runner.py
@@ -39,6 +39,7 @@
 
 lines = []
 for line in contents.split("\n"):
+# Strip off the timestamp and split into tuples.
 lines.append(line.split("\t", 1)[-1])
 
 return lines
@@ -66,7 +67,6 @@
 
 loglines = caplog.actual()
 assert ("root", "ERROR", "Timing out job timed out after 0.005 minutes") 
in loglines
-assert ("root", 

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: h3->h5 should be san-serif

2017-04-10 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347520 )

Change subject: h3->h5 should be san-serif
..

h3->h5 should be san-serif

We discussed this during implementation of the print styles.
San serif should be used for subheadings.
Serif font should be used for h2s and page title

This should apply in both print and screen mode.

Bug: T159857
Change-Id: I97c7f828f91ee0f22c986a64a26f5435afb06004
---
M resources/skins.minerva.content.styles/headings.less
1 file changed, 10 insertions(+), 2 deletions(-)


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

diff --git a/resources/skins.minerva.content.styles/headings.less 
b/resources/skins.minerva.content.styles/headings.less
index 526825a..ea31639 100644
--- a/resources/skins.minerva.content.styles/headings.less
+++ b/resources/skins.minerva.content.styles/headings.less
@@ -46,11 +46,19 @@
 
 .pre-content h1,
 .content h1,
+.content h2 {
+   font-family: @fontFamilyHeading;
+}
+
+h3, h4, h5, h6 {
+   font-family: @fontFamily;
+}
+
+.pre-content h1,
+.content h1,
 .content h2,
 h3, h4, h5, h6 {
-   font-family: @fontFamilyHeading;
line-height: @headingLineHeight;
-
word-wrap: break-word;
 
// This value isn't valid per the specification [0] but fixes the 
behaviour in

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: chmod -x SpecialNewpages.php

2017-04-10 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347519 )

Change subject: chmod -x SpecialNewpages.php
..

chmod -x SpecialNewpages.php

This is not an executable script.

Change-Id: I1daa0eff24f5a7b65c2df75f44c0e28d0795d9f6
---
M includes/specials/SpecialNewpages.php
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/347519/1

diff --git a/includes/specials/SpecialNewpages.php 
b/includes/specials/SpecialNewpages.php
old mode 100755
new mode 100644

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hyginee: remove dead code in PageImageDatabaseTable

2017-04-10 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347517 )

Change subject: Hyginee: remove dead code in PageImageDatabaseTable
..

Hyginee: remove dead code in PageImageDatabaseTable

Change-Id: Id1d4101c93442708207f61dc0a6f44630b47048c
---
M app/src/main/java/org/wikipedia/pageimages/PageImageDatabaseTable.java
1 file changed, 2 insertions(+), 27 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/pageimages/PageImageDatabaseTable.java 
b/app/src/main/java/org/wikipedia/pageimages/PageImageDatabaseTable.java
index 0fc8500..fac27e2 100644
--- a/app/src/main/java/org/wikipedia/pageimages/PageImageDatabaseTable.java
+++ b/app/src/main/java/org/wikipedia/pageimages/PageImageDatabaseTable.java
@@ -3,11 +3,8 @@
 import android.content.ContentValues;
 import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteException;
 import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
 
-import org.wikipedia.WikipediaApp;
 import org.wikipedia.database.DatabaseTable;
 import org.wikipedia.database.column.Column;
 import org.wikipedia.database.contract.PageImageHistoryContract;
@@ -16,6 +13,8 @@
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.util.log.L;
 
+
+// todo: network caching preserves images. Remove this class and drop table?
 public class PageImageDatabaseTable extends DatabaseTable {
 private static final int DB_VER_NAMESPACE_ADDED = 7;
 private static final int DB_VER_NORMALIZED_TITLES = 8;
@@ -42,30 +41,6 @@
 contentValues.put(Col.TITLE.getName(), 
obj.getTitle().getPrefixedText());
 contentValues.put(Col.IMAGE_NAME.getName(), obj.getImageName());
 return contentValues;
-}
-
-// TODO: move to JsonPageLoadStrategy.
-@Nullable
-public String getImageUrlForTitle(WikipediaApp app, PageTitle title) {
-Cursor c = null;
-String thumbnail = null;
-try {
-String searchStr = title.getPrefixedText().replace("'", "''");
-String selection = getTableName() + "." + Col.TITLE.getName() + 
"='" + searchStr + "'";
-c = app.getDatabaseClient(PageImage.class).select(
-selection, new String[] {}, "");
-if (c.getCount() > 0) {
-c.moveToFirst();
-thumbnail = Col.IMAGE_NAME.val(c);
-}
-} catch (SQLiteException e) {
-// page title doesn't exist in database... no problem if it fails.
-} finally {
-if (c != null) {
-c.close();
-}
-}
-return thumbnail;
 }
 
 @NonNull

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1d4101c93442708207f61dc0a6f44630b47048c
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Infobox print styles

2017-04-10 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347516 )

Change subject: Infobox print styles
..

Infobox print styles

* Treat as table
* Add padding
* Align left
* Add border to rows and table

Bug: T159857
Change-Id: Ie860fcf8e1325ef256432219f950da716b3de805
---
M minerva.less/minerva.variables.less
A resources/skins.minerva.print.styles/infobox.less
M resources/skins.minerva.print.styles/styles.less
3 files changed, 21 insertions(+), 0 deletions(-)


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

diff --git a/minerva.less/minerva.variables.less 
b/minerva.less/minerva.variables.less
index 2147e2e..575a4ac 100644
--- a/minerva.less/minerva.variables.less
+++ b/minerva.less/minerva.variables.less
@@ -116,3 +116,4 @@
 
 // Print specific
 @printBorderColor: #9aa0a7;
+@printBorderColorLight: @colorGray12;
diff --git a/resources/skins.minerva.print.styles/infobox.less 
b/resources/skins.minerva.print.styles/infobox.less
new file mode 100644
index 000..4fca477
--- /dev/null
+++ b/resources/skins.minerva.print.styles/infobox.less
@@ -0,0 +1,19 @@
+@import 'minerva.variables';
+@import 'minerva.mixins';
+
+.infobox {
+   font-size: 30px;
+   border: solid 2px @printBorderColor;
+   border-radius: 5px;
+   display: table !important;
+
+   tr {
+   border-top: solid 2px @printBorderColorLight;
+   }
+
+   td,
+   th {
+   text-align: left !important;
+   padding: 20px 0 20px 42px;
+   }
+}
diff --git a/resources/skins.minerva.print.styles/styles.less 
b/resources/skins.minerva.print.styles/styles.less
index 7390c99..be49990 100644
--- a/resources/skins.minerva.print.styles/styles.less
+++ b/resources/skins.minerva.print.styles/styles.less
@@ -2,5 +2,6 @@
@import 'header.less';
@import 'article.less';
@import 'quotes.less';
+   @import 'infobox.less';
@import 'references.less';
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie860fcf8e1325ef256432219f950da716b3de805
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/puppet[production]: Keystonehooks: Add two more ldap ous for sudo handling.

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

Change subject: Keystonehooks:  Add two more ldap ous for sudo handling.
..


Keystonehooks:  Add two more ldap ous for sudo handling.

These are pointless stubs, but apparently we need them.

Change-Id: I62b2300b6fbf0b806755bcd6f0e5ee931f1a0aa7
---
M modules/openstack/files/liberty/keystone/wmfkeystonehooks/ldapgroups.py
M modules/openstack/files/mitaka/keystone/wmfkeystonehooks/ldapgroups.py
2 files changed, 44 insertions(+), 2 deletions(-)

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



diff --git 
a/modules/openstack/files/liberty/keystone/wmfkeystonehooks/ldapgroups.py 
b/modules/openstack/files/liberty/keystone/wmfkeystonehooks/ldapgroups.py
index e77067d..8fa0323 100644
--- a/modules/openstack/files/liberty/keystone/wmfkeystonehooks/ldapgroups.py
+++ b/modules/openstack/files/liberty/keystone/wmfkeystonehooks/ldapgroups.py
@@ -204,9 +204,30 @@
 except ldap.LDAPError as e:
 LOG.warning("Failed to create project base %s in ldap: %s" % 
(projectbase, e))
 
+# this record is empty and arbitrary, but keeps sudo-ldap from
+#  freaking out and ignoring all groups.
+groupsdn = "ou=groups,%s" % projectbase
+groupsentry = {}
+groupsentry['objectClass'] = ['organizationalUnit']
+modlist = ldap.modlist.addModlist(groupsentry)
+try:
+ds.add_s(groupsdn, modlist)
+except ldap.LDAPError as e:
+LOG.warning("Failed to create base group entry: %s" % e)
+
+#  This one too!
+peopledn = "ou=people,%s" % projectbase
+peopleentry = {}
+peopleentry['objectClass'] = ['organizationalUnit']
+modlist = ldap.modlist.addModlist(peopleentry)
+try:
+ds.add_s(peopledn, modlist)
+except ldap.LDAPError as e:
+LOG.warning("Failed to create base people entry: %s" % e)
+
 sudoerbase = "ou=sudoers,%s" % projectbase
 sudoEntry = {}
-sudoEntry['objectClass'] = ['organizationalunit', 'top']
+sudoEntry['objectClass'] = ['organizationalUnit', 'top']
 modlist = ldap.modlist.addModlist(sudoEntry)
 try:
 ds.add_s(sudoerbase, modlist)
diff --git 
a/modules/openstack/files/mitaka/keystone/wmfkeystonehooks/ldapgroups.py 
b/modules/openstack/files/mitaka/keystone/wmfkeystonehooks/ldapgroups.py
index e77067d..8fa0323 100644
--- a/modules/openstack/files/mitaka/keystone/wmfkeystonehooks/ldapgroups.py
+++ b/modules/openstack/files/mitaka/keystone/wmfkeystonehooks/ldapgroups.py
@@ -204,9 +204,30 @@
 except ldap.LDAPError as e:
 LOG.warning("Failed to create project base %s in ldap: %s" % 
(projectbase, e))
 
+# this record is empty and arbitrary, but keeps sudo-ldap from
+#  freaking out and ignoring all groups.
+groupsdn = "ou=groups,%s" % projectbase
+groupsentry = {}
+groupsentry['objectClass'] = ['organizationalUnit']
+modlist = ldap.modlist.addModlist(groupsentry)
+try:
+ds.add_s(groupsdn, modlist)
+except ldap.LDAPError as e:
+LOG.warning("Failed to create base group entry: %s" % e)
+
+#  This one too!
+peopledn = "ou=people,%s" % projectbase
+peopleentry = {}
+peopleentry['objectClass'] = ['organizationalUnit']
+modlist = ldap.modlist.addModlist(peopleentry)
+try:
+ds.add_s(peopledn, modlist)
+except ldap.LDAPError as e:
+LOG.warning("Failed to create base people entry: %s" % e)
+
 sudoerbase = "ou=sudoers,%s" % projectbase
 sudoEntry = {}
-sudoEntry['objectClass'] = ['organizationalunit', 'top']
+sudoEntry['objectClass'] = ['organizationalUnit', 'top']
 modlist = ldap.modlist.addModlist(sudoEntry)
 try:
 ds.add_s(sudoerbase, modlist)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62b2300b6fbf0b806755bcd6f0e5ee931f1a0aa7
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   5   >