[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Scap: Depool and repool CXServer during restarts

2016-12-28 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329479 )

Change subject: Scap: Depool and repool CXServer during restarts
..

Scap: Depool and repool CXServer during restarts

Bug: T144602
Change-Id: I6e25fce272c1ce9f4d91995b41ef3e507ae0fb26
---
M scap/checks.yaml
A scap/environments/beta/checks.yaml
M scap/scap.cfg
3 files changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver/deploy 
refs/changes/79/329479/1

diff --git a/scap/checks.yaml b/scap/checks.yaml
index 2e4cf0f..3c4aa96 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -3,3 +3,11 @@
 type: nrpe
 stage: restart_service
 command: check_endpoints_cxserver
+  depool:
+type: command
+stage: promote
+command: depool-cxserver
+  repool:
+type: command
+stage: restart_service
+command: pool-cxserver
diff --git a/scap/environments/beta/checks.yaml 
b/scap/environments/beta/checks.yaml
new file mode 100644
index 000..f6fc106
--- /dev/null
+++ b/scap/environments/beta/checks.yaml
@@ -0,0 +1,3 @@
+checks:
+  depool: {}
+  repool: {}
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 61f19a5..65acec0 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -6,6 +6,7 @@
 server_groups: canary, default
 canary_dsh_targets: target-canary
 dsh_targets: targets
+group_size: 2
 git_submodules: True
 service_name: cxserver
 service_port: 8080

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e25fce272c1ce9f4d91995b41ef3e507ae0fb26
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver/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]: Scap: Depool and repool Citoid during restarts

2016-12-28 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/329477 )

Change subject: Scap: Depool and repool Citoid during restarts
..


Scap: Depool and repool Citoid during restarts

Bug: T144602
Change-Id: I82aebb78cae082704b65291e14739beb064d7bbc
---
M scap/checks.yaml
A scap/environments/beta/checks.yaml
M scap/scap.cfg
3 files changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/scap/checks.yaml b/scap/checks.yaml
index b3ee706..5e7c857 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -3,3 +3,11 @@
 type: nrpe
 stage: restart_service
 command: check_endpoints_citoid
+  depool:
+type: command
+stage: promote
+command: depool-citoid
+  repool:
+type: command
+stage: restart_service
+command: pool-citoid
diff --git a/scap/environments/beta/checks.yaml 
b/scap/environments/beta/checks.yaml
new file mode 100644
index 000..f6fc106
--- /dev/null
+++ b/scap/environments/beta/checks.yaml
@@ -0,0 +1,3 @@
+checks:
+  depool: {}
+  repool: {}
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 0bf7834..d737e59 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -6,6 +6,7 @@
 server_groups: canary, default
 canary_dsh_targets: citoid-canary
 dsh_targets: citoid
+group_size: 2
 git_submodules: True
 service_name: citoid
 service_port: 1970
@@ -16,6 +17,7 @@
 git_server: tin.eqiad.wmnet
 
 [deployment-prep.eqiad.wmflabs]
+environment: beta
 git_server: deployment-tin.deployment-prep.eqiad.wmflabs
 server_groups: default
 dsh_targets: betacluster

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82aebb78cae082704b65291e14739beb064d7bbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid/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]: Scap: Depool and repool Citoid during restarts

2016-12-28 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329477 )

Change subject: Scap: Depool and repool Citoid during restarts
..

Scap: Depool and repool Citoid during restarts

Bug: T144602
Change-Id: I82aebb78cae082704b65291e14739beb064d7bbc
---
M scap/checks.yaml
A scap/environments/beta/checks.yaml
M scap/scap.cfg
3 files changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid/deploy 
refs/changes/77/329477/1

diff --git a/scap/checks.yaml b/scap/checks.yaml
index b3ee706..5e7c857 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -3,3 +3,11 @@
 type: nrpe
 stage: restart_service
 command: check_endpoints_citoid
+  depool:
+type: command
+stage: promote
+command: depool-citoid
+  repool:
+type: command
+stage: restart_service
+command: pool-citoid
diff --git a/scap/environments/beta/checks.yaml 
b/scap/environments/beta/checks.yaml
new file mode 100644
index 000..f6fc106
--- /dev/null
+++ b/scap/environments/beta/checks.yaml
@@ -0,0 +1,3 @@
+checks:
+  depool: {}
+  repool: {}
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 0bf7834..d737e59 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -6,6 +6,7 @@
 server_groups: canary, default
 canary_dsh_targets: citoid-canary
 dsh_targets: citoid
+group_size: 2
 git_submodules: True
 service_name: citoid
 service_port: 1970
@@ -16,6 +17,7 @@
 git_server: tin.eqiad.wmnet
 
 [deployment-prep.eqiad.wmflabs]
+environment: beta
 git_server: deployment-tin.deployment-prep.eqiad.wmflabs
 server_groups: default
 dsh_targets: betacluster

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82aebb78cae082704b65291e14739beb064d7bbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid/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]: Scap: Depool and repool Mathoid during restarts

2016-12-28 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/329476 )

Change subject: Scap: Depool and repool Mathoid during restarts
..


Scap: Depool and repool Mathoid during restarts

Bug: T144602
Change-Id: I2ff8a2f17117c102a44862a5be6ee403ab868e6c
---
M scap/checks.yaml
A scap/environments/beta/checks.yaml
M scap/scap.cfg
3 files changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/scap/checks.yaml b/scap/checks.yaml
index c6fce37..9d4e526 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -3,3 +3,11 @@
 type: nrpe
 stage: restart_service
 command: check_endpoints_mathoid
+  depool:
+type: command
+stage: promote
+command: depool-mathoid
+  repool:
+type: command
+stage: restart_service
+command: pool-mathoid
diff --git a/scap/environments/beta/checks.yaml 
b/scap/environments/beta/checks.yaml
new file mode 100644
index 000..f6fc106
--- /dev/null
+++ b/scap/environments/beta/checks.yaml
@@ -0,0 +1,3 @@
+checks:
+  depool: {}
+  repool: {}
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 3ce993a..1452976 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -6,6 +6,7 @@
 server_groups: canary, default
 canary_dsh_targets: canary-targets
 dsh_targets: targets
+group_size: 2
 git_submodules: True
 service_name: mathoid
 service_port: 10042
@@ -16,6 +17,7 @@
 git_server: tin.eqiad.wmnet
 
 [deployment-prep.eqiad.wmflabs]
+environment: beta
 git_server: deployment-tin.deployment-prep.eqiad.wmflabs
 server_groups: default
 dsh_targets: betacluster

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ff8a2f17117c102a44862a5be6ee403ab868e6c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mathoid/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]: Scap: Depool and repool Mathoid during restarts

2016-12-28 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329476 )

Change subject: Scap: Depool and repool Mathoid during restarts
..

Scap: Depool and repool Mathoid during restarts

Bug: T144602
Change-Id: I2ff8a2f17117c102a44862a5be6ee403ab868e6c
---
M scap/checks.yaml
A scap/environments/beta/checks.yaml
M scap/scap.cfg
3 files changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid/deploy 
refs/changes/76/329476/1

diff --git a/scap/checks.yaml b/scap/checks.yaml
index c6fce37..9d4e526 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -3,3 +3,11 @@
 type: nrpe
 stage: restart_service
 command: check_endpoints_mathoid
+  depool:
+type: command
+stage: promote
+command: depool-mathoid
+  repool:
+type: command
+stage: restart_service
+command: pool-mathoid
diff --git a/scap/environments/beta/checks.yaml 
b/scap/environments/beta/checks.yaml
new file mode 100644
index 000..f6fc106
--- /dev/null
+++ b/scap/environments/beta/checks.yaml
@@ -0,0 +1,3 @@
+checks:
+  depool: {}
+  repool: {}
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 3ce993a..1452976 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -6,6 +6,7 @@
 server_groups: canary, default
 canary_dsh_targets: canary-targets
 dsh_targets: targets
+group_size: 2
 git_submodules: True
 service_name: mathoid
 service_port: 10042
@@ -16,6 +17,7 @@
 git_server: tin.eqiad.wmnet
 
 [deployment-prep.eqiad.wmflabs]
+environment: beta
 git_server: deployment-tin.deployment-prep.eqiad.wmflabs
 server_groups: default
 dsh_targets: betacluster

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ff8a2f17117c102a44862a5be6ee403ab868e6c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mathoid/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]: Update restbase to 296da9a

2016-12-26 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/329215 )

Change subject: Update restbase to 296da9a
..


Update restbase to 296da9a

List of changes:
1f5d920 it.wp: Blacklist Utente:Effems/Sandbox7
296da9a commons: Blacklist User:Stunteltje/gallery

Change-Id: I57f278aa686946bf2b7e5c15d238980c490c836f
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/restbase b/restbase
index 21b3282..296da9a 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit 21b328235d972b4b43d6967d8ccd5564c81642a7
+Subproject commit 296da9a0d3b20d92fef51125b1e3196a9fd136ee

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57f278aa686946bf2b7e5c15d238980c490c836f
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]: Update restbase to 296da9a

2016-12-26 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329215 )

Change subject: Update restbase to 296da9a
..

Update restbase to 296da9a

List of changes:
1f5d920 it.wp: Blacklist Utente:Effems/Sandbox7
296da9a commons: Blacklist User:Stunteltje/gallery

Change-Id: I57f278aa686946bf2b7e5c15d238980c490c836f
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/restbase b/restbase
index 21b3282..296da9a 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit 21b328235d972b4b43d6967d8ccd5564c81642a7
+Subproject commit 296da9a0d3b20d92fef51125b1e3196a9fd136ee

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57f278aa686946bf2b7e5c15d238980c490c836f
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] operations/puppet[production]: RESTBase-Cassandra: Add the topk reporter

2016-12-22 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328660 )

Change subject: RESTBase-Cassandra: Add the topk reporter
..

RESTBase-Cassandra: Add the topk reporter

We have a reporter script running on terbium that collects information
from Logstash on partition sizes in RB's Cassandra and sends out a mail
to servi...@wm.org every 7 days. So far, this has been running under
Eric's user there. This patch properly puppetises the script and sets up
the environment for it to run every Sunday.

Beside the Cassandra reporter modules, this patch also adds base::crond,
a simple define abstracting out cron job configuration files. The define
is pretty flexible in terms of the how one can specify the time when to
run, as well as the command's environment and stream redirection.

Bug: T147366
Change-Id: I81eff560e424587c6ab4370bdb0cd60940c6302c
---
M manifests/site.pp
A modules/base/manifests/crond.pp
A modules/base/templates/crond.erb
A modules/cassandra/files/reporter/topk.py
A modules/cassandra/manifests/reporter/init.pp
A modules/cassandra/manifests/reporter/topk.pp
A modules/cassandra/templates/reporter/topk.erb
A modules/restbase/manifests/cass_report.pp
8 files changed, 732 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/60/328660/1

diff --git a/manifests/site.pp b/manifests/site.pp
index cdfddde..b50bc16 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2776,6 +2776,7 @@
 role(mariadb::maintenance, mediawiki::maintenance, openldap::management)
 include role::noc::site
 include ldap::role::client::labs
+include restbase::cass_report
 include base::firewall
 
 interface::add_ip6_mapped { 'main':
diff --git a/modules/base/manifests/crond.pp b/modules/base/manifests/crond.pp
new file mode 100644
index 000..84b2b8e
--- /dev/null
+++ b/modules/base/manifests/crond.pp
@@ -0,0 +1,71 @@
+# == Define: base::crond
+#
+# The base::crond define is used to create cron configuration files. A
+# configuration file is stored in /etc/cron.d/ and is compiled from the
+# parameters given to the define. It allows one to set the command, multiple
+# execution times, the user to execute as, the environment variables to set and
+# where to redirect stdout and stderr.
+#
+# === Parameters
+#
+# [*title*]
+#   Required. Defines the name of the cron job to add. It is used as the name 
of
+#   the file under /etc/cron.d/
+#
+# [*command*]
+#   Required. The command to execute.
+#
+# [*time*]
+#   Required. The cron time definition(s) of when to execute the command. If an
+#   array is given, it will be interpreted as the list of time definitions, and
+#   a line in the cron configuration file will be added for each such cron 
time.
+#   The parameter (or each element of the array) can be either a string, array
+#   or hash. Strings are taken as being in the crontab time format and will be
+#   put in the file as-are. In the case of a hash, the following fields can
+#   exist: 'mm', 'hh', 'day', 'mon', 'dow'. They are read in the presented
+#   order. If any of them is missing, '*' is assumed. Finally, arrays are taken
+#   to be ordered times for each segment, i.e. the array ought to have 5
+#   elements; the missing ones are filled with '*'. For example, to indicate
+#   that the command should run at 20:30 every day as well as during reboot, 
one
+#   can use: ['@reboot', { mm => 30, hh => 20 }]. Alternatively, the second
+#   element could have been written as '50 20 * * *' or [30, 20]. Note, 
however,
+#   that that implies that if you want to run the command only at 20:30 and use
+#   an array, you have to specify [[30, 20]].
+#
+# [*user*]
+#   The user under which the command should run. Default: 'root'
+#
+# [*environment*]
+#   The environment variables to set. It can be a string (containing one or 
more
+#   NAME=VALUE pairs separated by new-line characters) or a hash (having
+#   variable names as keys and values as values). Note that $PATH is set by the
+#   define to /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin . If
+#   you need to override it, set it in this parameter. Default: {}
+#
+# [*redirect*]
+#   Tells cron where to redict the output from standard output and error. It 
can
+#   be given as a string or as an array. In the former case, or if the array 
has
+#   only one element, both steams will be redirected to the same destination. 
If
+#   you want to redirect each stream separately, specify it as a two-element
+#   array in the [stdout, stderr] format. For example,
+#   ['/var/log/my-cron.out', '/var/log/my-cron.err'] would send standard output
+#   to the first and standard error to the second element of the array. The
+#   default behaviour is to send everything to /dev/null. Default: 
['/dev/null']
+#
+define base::crond(
+$command,
+$time,
+$user= 'root',
+$environment = {},

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump src to e7e3a4d (deploy-20161221 src branch)

2016-12-21 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328506 )

Change subject: Bump src to e7e3a4d (deploy-20161221 src branch)
..


Bump src to e7e3a4d (deploy-20161221 src branch)

Bug: T153797
Change-Id: I591e71149f1e26b58e7d10f1ff8bc6545273d259
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src b/src
index 5eb649e..e7e3a4d 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 5eb649e810034f1d69ca92263f81a392140d74de
+Subproject commit e7e3a4dce51f7a27480e46e3e768dd9ad54a09ec

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I591e71149f1e26b58e7d10f1ff8bc6545273d259
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump src to e7e3a4d (deploy-20161221 src branch)

2016-12-21 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328506 )

Change subject: Bump src to e7e3a4d (deploy-20161221 src branch)
..

Bump src to e7e3a4d (deploy-20161221 src branch)

Bug: T153797
Change-Id: I591e71149f1e26b58e7d10f1ff8bc6545273d259
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/06/328506/1

diff --git a/src b/src
index 5eb649e..e7e3a4d 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 5eb649e810034f1d69ca92263f81a392140d74de
+Subproject commit e7e3a4dce51f7a27480e46e3e768dd9ad54a09ec

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I591e71149f1e26b58e7d10f1ff8bc6545273d259
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/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...parsoid[master]: ApiRequest: Clone the request options before modifying them

2016-12-21 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328497 )

Change subject: ApiRequest: Clone the request options before modifying them
..


ApiRequest: Clone the request options before modifying them

With the introduction of mwApiServer, ApiRequest.request started
modifying the request options object before issuing a request to the MW
API. However, the object itself is a property of its sub-classes, which
means that ApiRequest.request was modifying permanently the URI. Hence,
clone the request options object before modifying it.

Bug: T153797
Change-Id: Ibf4cf2fdab74d742c66aedc82379a57def91440a
---
M lib/mw/ApiRequest.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index 2e709ac..5a667d2 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -272,10 +272,11 @@
 var httpAgent = null;
 var httpsAgent = null;
 
-ApiRequest.prototype.request = function(options, callback) {
+ApiRequest.prototype.request = function(requestOpts, callback) {
var env = this.env;
var proxy = this.proxy;
var mwApiServer = this.mwApiServer;
+   var options = Object.assign({}, requestOpts);
 
// this is a good place to put debugging statements
// if you want to watch network requests.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf4cf2fdab74d742c66aedc82379a57def91440a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: ApiRequest: Clone the request options before modifying them

2016-12-21 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328497 )

Change subject: ApiRequest: Clone the request options before modifying them
..

ApiRequest: Clone the request options before modifying them

With the introduction of mwApiServer, ApiRequest.request started
modifying the request options object before issuing a request to the MW
API. However, the object itself is a property of its sub-classes, which
means that ApiRequest.request was modifying permanently the URI. Hence,
clone the request options object before modifying it.

Bug: T153797
Change-Id: Ibf4cf2fdab74d742c66aedc82379a57def91440a
---
M lib/mw/ApiRequest.js
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index 2e709ac..5a667d2 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -272,10 +272,11 @@
 var httpAgent = null;
 var httpsAgent = null;
 
-ApiRequest.prototype.request = function(options, callback) {
+ApiRequest.prototype.request = function(requestOpts, callback) {
var env = this.env;
var proxy = this.proxy;
var mwApiServer = this.mwApiServer;
+   var options = Object.assign({}, requestOpts);
 
// this is a good place to put debugging statements
// if you want to watch network requests.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf4cf2fdab74d742c66aedc82379a57def91440a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
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]: Update change-propagation to 9a87712

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328421 )

Change subject: Update change-propagation to 9a87712
..

Update change-propagation to 9a87712

List of changes:
2e1f0ae Move transclusion updates to the page_edit rule
xxx Update config

Change-Id: I46d203c027bfd42cecb8ba789de4b0cc846cc95c
---
M scap/templates/config.yaml.j2
M src
2 files changed, 12 insertions(+), 23 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/21/328421/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 1318f1a..853b0a6 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -178,14 +178,17 @@
   domain: /\.wikidata\.org$/
 page_namespace: 120
 exec:
-  method: get
-  uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/html/{message.page_title}/{{message.rev_id}}'
-  headers:
-cache-control: no-cache
-x-restbase-parentrevision: '{{message.rev_parent_id}}'
-if-unmodified-since: '{{date(message.meta.dt)}}'
-  query:
-redirect: false
+  - method: get
+uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/html/{message.page_title}/{{message.rev_id}}'
+headers:
+  cache-control: no-cache
+  x-restbase-parentrevision: '{{message.rev_parent_id}}'
+  if-unmodified-since: '{{date(message.meta.dt)}}'
+query:
+  redirect: false
+  - method: post
+uri: '/sys/links/transcludes/{message.page_title}'
+body: '{{globals.message}}'
 
   revision_visibility_change:
 topic: mediawiki.revision-visibility-change
@@ -289,20 +292,6 @@
   cache-control: no-cache
 query:
   redirect: false
-
-  transclusion_update:
-topic: mediawiki.revision-create
-match_not:
-  - meta:
-  domain: /\.wikidata\.org$/
-page_namespace: 0
-  - meta:
-  domain: /\.wikidata\.org$/
-page_namespace: 120
-exec:
-  method: post
-  uri: '/sys/links/transcludes/{message.page_title}'
-  body: '{{globals.message}}'
 
   on_transclusion_update:
 concurrency: <%= concurrency * 8 %>
diff --git a/src b/src
index ca54ef0..9a87712 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit ca54ef0bbf525ca091abdb3b591234e45cd9a75e
+Subproject commit 9a877128015c9258524dbea359d4c5509ebe57c6

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46d203c027bfd42cecb8ba789de4b0cc846cc95c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/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]: Update change-propagation to 9a87712

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328421 )

Change subject: Update change-propagation to 9a87712
..


Update change-propagation to 9a87712

List of changes:
2e1f0ae Move transclusion updates to the page_edit rule
xxx Update config

Change-Id: I46d203c027bfd42cecb8ba789de4b0cc846cc95c
---
M scap/templates/config.yaml.j2
M src
2 files changed, 12 insertions(+), 23 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 1318f1a..853b0a6 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -178,14 +178,17 @@
   domain: /\.wikidata\.org$/
 page_namespace: 120
 exec:
-  method: get
-  uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/html/{message.page_title}/{{message.rev_id}}'
-  headers:
-cache-control: no-cache
-x-restbase-parentrevision: '{{message.rev_parent_id}}'
-if-unmodified-since: '{{date(message.meta.dt)}}'
-  query:
-redirect: false
+  - method: get
+uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/html/{message.page_title}/{{message.rev_id}}'
+headers:
+  cache-control: no-cache
+  x-restbase-parentrevision: '{{message.rev_parent_id}}'
+  if-unmodified-since: '{{date(message.meta.dt)}}'
+query:
+  redirect: false
+  - method: post
+uri: '/sys/links/transcludes/{message.page_title}'
+body: '{{globals.message}}'
 
   revision_visibility_change:
 topic: mediawiki.revision-visibility-change
@@ -289,20 +292,6 @@
   cache-control: no-cache
 query:
   redirect: false
-
-  transclusion_update:
-topic: mediawiki.revision-create
-match_not:
-  - meta:
-  domain: /\.wikidata\.org$/
-page_namespace: 0
-  - meta:
-  domain: /\.wikidata\.org$/
-page_namespace: 120
-exec:
-  method: post
-  uri: '/sys/links/transcludes/{message.page_title}'
-  body: '{{globals.message}}'
 
   on_transclusion_update:
 concurrency: <%= concurrency * 8 %>
diff --git a/src b/src
index ca54ef0..9a87712 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit ca54ef0bbf525ca091abdb3b591234e45cd9a75e
+Subproject commit 9a877128015c9258524dbea359d4c5509ebe57c6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46d203c027bfd42cecb8ba789de4b0cc846cc95c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/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] operations/puppet[production]: ChangeProp: Use RESTBase in the other DC to process async re...

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328382 )

Change subject: ChangeProp: Use RESTBase in the other DC to process async 
requests
..

ChangeProp: Use RESTBase in the other DC to process async requests

Change-Id: I6c79919aa790d267a330cb4c5e3e7008f5bbd325
---
A hieradata/role/codfw/scb.yaml
A hieradata/role/eqiad/scb.yaml
M modules/changeprop/manifests/init.pp
3 files changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/328382/1

diff --git a/hieradata/role/codfw/scb.yaml b/hieradata/role/codfw/scb.yaml
new file mode 100644
index 000..681bd85
--- /dev/null
+++ b/hieradata/role/codfw/scb.yaml
@@ -0,0 +1 @@
+changeprop::restbase_uri: http://restbase.svc.eqiad.wmnet:7231
diff --git a/hieradata/role/eqiad/scb.yaml b/hieradata/role/eqiad/scb.yaml
new file mode 100644
index 000..51925b9
--- /dev/null
+++ b/hieradata/role/eqiad/scb.yaml
@@ -0,0 +1 @@
+changeprop::restbase_uri: http://restbase.svc.codfw.wmnet:7231
diff --git a/modules/changeprop/manifests/init.pp 
b/modules/changeprop/manifests/init.pp
index 0921130..1ff52b4 100644
--- a/modules/changeprop/manifests/init.pp
+++ b/modules/changeprop/manifests/init.pp
@@ -15,14 +15,21 @@
 # [*purge_port*]
 #   The port the vhtcp daemon listens to. Default: 4827
 #
+# [*restbase_uri*]
+#   RESTBase's URI. Note that this is redefined here so that async update
+#   requests can be sent to the inactive DC. Default:
+#   'http://restbase.svc.eqiad.wmnet:7231'
+#
+#
 # [*ores_uri*]
 #   The host where ORES service is running. Default: 
http://ores.svc.eqiad.wmnet:8081
 #
 class changeprop(
 $broker_list,
 $purge_host   = '239.128.0.112',
-$ores_uri = 'http://ores.svc.eqiad.wmnet:8081',
 $purge_port   = 4827,
+$restbase_uri = 'http://restbase.svc.eqiad.wmnet:7231',
+$ores_uri = 'http://ores.svc.eqiad.wmnet:8081',
 ) {
 
 include ::service::configuration

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c79919aa790d267a330cb4c5e3e7008f5bbd325
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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]: Bump src to 5eb649e

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328379 )

Change subject: Bump src to 5eb649e
..


Bump src to 5eb649e

Change-Id: I38cc21702842f40c54f1c52ecb2938d3c96d09e0
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src b/src
index 7193a85..5eb649e 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 7193a85722fa600ee0652112b100de0c5013fb89
+Subproject commit 5eb649e810034f1d69ca92263f81a392140d74de

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I38cc21702842f40c54f1c52ecb2938d3c96d09e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump src to 5eb649e

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328379 )

Change subject: Bump src to 5eb649e
..

Bump src to 5eb649e

Change-Id: I38cc21702842f40c54f1c52ecb2938d3c96d09e0
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/79/328379/1

diff --git a/src b/src
index 7193a85..5eb649e 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 7193a85722fa600ee0652112b100de0c5013fb89
+Subproject commit 5eb649e810034f1d69ca92263f81a392140d74de

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I38cc21702842f40c54f1c52ecb2938d3c96d09e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/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...parsoid[master]: Use mwApiServer as the provider of the full URI of the MW API

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328375 )

Change subject: Use mwApiServer as the provider of the full URI of the MW API
..


Use mwApiServer as the provider of the full URI of the MW API

Change-Id: I6b66fd33c02944d86c69c8c63a7009ac9f1b148c
---
M lib/mw/ApiRequest.js
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index fcafafa..2e709ac 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -303,8 +303,7 @@
if (mwApiServer) {
var urlobj = url.parse(options.uri);
options.headers.Host = urlobj.hostname;
-   urlobj.host = mwApiServer;
-   options.uri = url.format(urlobj);
+   options.uri = mwApiServer;
}
 
// Proxy options should only be applied to MW API endpoints.

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Parsoid: provide the full URI in mwapi_server for codfw

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328376 )

Change subject: Parsoid: provide the full URI in mwapi_server for codfw
..

Parsoid: provide the full URI in mwapi_server for codfw

Change-Id: I5cc045aa6573d19cdc1f4feaa16a289135410d32
---
M hieradata/role/codfw/parsoid.yaml
M modules/parsoid/manifests/init.pp
2 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/328376/1

diff --git a/hieradata/role/codfw/parsoid.yaml 
b/hieradata/role/codfw/parsoid.yaml
index 9cc27b2..19ac58c 100644
--- a/hieradata/role/codfw/parsoid.yaml
+++ b/hieradata/role/codfw/parsoid.yaml
@@ -1,4 +1,4 @@
-parsoid::mwapi_server: https://api.svc.eqiad.wmnet
+parsoid::mwapi_server: https://api.svc.eqiad.wmnet/w/api.php
 parsoid::mwapi_proxy: ''
 debdeploy::grains:
   debdeploy-parsoid-codfw:
diff --git a/modules/parsoid/manifests/init.pp 
b/modules/parsoid/manifests/init.pp
index 5207483..d1e53e0 100644
--- a/modules/parsoid/manifests/init.pp
+++ b/modules/parsoid/manifests/init.pp
@@ -24,7 +24,8 @@
 #   Default: scap3
 #
 # [*mwapi_server*]
-#   The MW API server to contact when issuing direct requests to it. Default: 
''
+#   The full URI of the MW API endpoint to contact when issuing direct
+#   requests to it. Default: ''
 #
 # [*mwapi_proxy*]
 #   The proxy to use to contact the MW API. Note that you usually want to set

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Use mwApiServer as the provider of the full URI of the MW API

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328375 )

Change subject: Use mwApiServer as the provider of the full URI of the MW API
..

Use mwApiServer as the provider of the full URI of the MW API

Change-Id: I6b66fd33c02944d86c69c8c63a7009ac9f1b148c
---
M lib/mw/ApiRequest.js
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index fcafafa..2e709ac 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -303,8 +303,7 @@
if (mwApiServer) {
var urlobj = url.parse(options.uri);
options.headers.Host = urlobj.hostname;
-   urlobj.host = mwApiServer;
-   options.uri = url.format(urlobj);
+   options.uri = mwApiServer;
}
 
// Proxy options should only be applied to MW API endpoints.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b66fd33c02944d86c69c8c63a7009ac9f1b148c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
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]: Bump src to 7193a85 and define the mwApiServer config variable

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328351 )

Change subject: Bump src to 7193a85 and define the mwApiServer config variable
..


Bump src to 7193a85 and define the mwApiServer config variable

Change-Id: Icf41ad54da11b10bcc9d901f473c1d9576cd319e
---
M conf/wmf/localsettings.js
M scap/templates/config.yaml.j2
M scap/vars.yaml
M src
4 files changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/conf/wmf/localsettings.js b/conf/wmf/localsettings.js
index 1ea012d..efb4cb2 100644
--- a/conf/wmf/localsettings.js
+++ b/conf/wmf/localsettings.js
@@ -1,9 +1,5 @@
 "use strict";
 exports.setup = function(parsoidConfig) {
-   // Use the API backends directly without hitting the text varnishes.
-   // API requests are not cacheable anyway.
-   parsoidConfig.defaultAPIProxyURI = 'http://api.svc.eqiad.wmnet';
-
// Sample these verbose logs to prevent overwhelm
// 1% and 2% for empty/tr and empty/li is based on
// seeing the volume in rt-testing.
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index d7a6a61..c4bf1b8 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -50,6 +50,9 @@
   linting: <%= linting %>
   linterSendAPI: <%= linter_send_api %>
 
+  mwApiServer: <%= mwapi_server if mwapi_server else '' %>
+  defaultAPIProxyURI: <%= mwapi_proxy if mwapi_proxy else '' %>
+
   timeouts:
 # RESTBase uses a 2 minute timeout for the first request.
 #
diff --git a/scap/vars.yaml b/scap/vars.yaml
index b089a3b..1994779 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -14,3 +14,6 @@
 load_wmf: true
 linting: false
 linter_send_api: false
+mwapi_server:
+mwapi_proxy:
+
diff --git a/src b/src
index 6719e24..7193a85 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 6719e240fd4db750f680aac21b0ac8f69e7aedcc
+Subproject commit 7193a85722fa600ee0652112b100de0c5013fb89

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf41ad54da11b10bcc9d901f473c1d9576cd319e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Parsoid: Define the mwapi_server and mwapi_proxy config vari...

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328355 )

Change subject: Parsoid: Define the mwapi_server and mwapi_proxy config 
variables
..

Parsoid: Define the mwapi_server and mwapi_proxy config variables

We want Parsoid to be talking to the appservers in eqiad. However, for
the codfw->eqiad connection, we are using TLS, for which mwapi_server is
used. In eqiad no TLS set up is needed, so use a simple proxy, i.e.
mwapi_proxy.

Change-Id: Ifeff3620efac7f9a0db4136bc42b6171a8917dd3
---
M hieradata/role/codfw/parsoid.yaml
M hieradata/role/eqiad/parsoid.yaml
M modules/parsoid/manifests/init.pp
3 files changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/328355/1

diff --git a/hieradata/role/codfw/parsoid.yaml 
b/hieradata/role/codfw/parsoid.yaml
index a10dfcb..aa61bca 100644
--- a/hieradata/role/codfw/parsoid.yaml
+++ b/hieradata/role/codfw/parsoid.yaml
@@ -1,3 +1,5 @@
+parsoid::mwapi_server: https://api.svc.eqiad.wmnet
+parsoid::mwapi_proxy:
 debdeploy::grains:
   debdeploy-parsoid-codfw:
 value: standard
diff --git a/hieradata/role/eqiad/parsoid.yaml 
b/hieradata/role/eqiad/parsoid.yaml
index 504300a..81dbf0a 100644
--- a/hieradata/role/eqiad/parsoid.yaml
+++ b/hieradata/role/eqiad/parsoid.yaml
@@ -1,3 +1,5 @@
+parsoid::mwapi_server:
+parsoid::mwapi_proxy: http://api.svc.eqiad.wmnet
 debdeploy::grains:
   debdeploy-parsoid-eqiad:
 value: standard
diff --git a/modules/parsoid/manifests/init.pp 
b/modules/parsoid/manifests/init.pp
index 3ffee3d..765f39b 100644
--- a/modules/parsoid/manifests/init.pp
+++ b/modules/parsoid/manifests/init.pp
@@ -23,12 +23,22 @@
 #   Deployment system to use: available are trebuchet, scap3 or git.
 #   Default: scap3
 #
+# [*mwapi_server*]
+#   The MW API server to contact when issuing direct requests to it. Default: 
''
+#
+# [*mwapi_proxy*]
+#   The proxy to use to contact the MW API. Note that you usually want to set
+#   either mwapi_server or this variable. Do not set both! Default:
+#   'http://api.svc.eqiad.wmnet'
+#
 class parsoid(
 $port  = 8000,
 $settings_file = 'conf/wmf/localsettings.js',
 $logging_name  = 'parsoid',
 $statsd_prefix = 'parsoid',
 $deployment= 'scap3',
+$mwapi_server  = '',
+$mwapi_proxy   = 'http://api.svc.eqiad.wmnet',
 ) {
 
 service::node { 'parsoid':
@@ -49,6 +59,10 @@
 auto_refresh  => false,
 deployment=> $deployment,
 deployment_config => true,
+deployment_vars   => {
+mwapi_server => $mwapiserver,
+mwapi_proxy  => $mwapiproxy,
+},
 }
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifeff3620efac7f9a0db4136bc42b6171a8917dd3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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]: Bump src to 7193a85 and define the mwApiServer config variable

2016-12-20 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328351 )

Change subject: Bump src to 7193a85 and define the mwApiServer config variable
..

Bump src to 7193a85 and define the mwApiServer config variable

Change-Id: Icf41ad54da11b10bcc9d901f473c1d9576cd319e
---
M conf/wmf/localsettings.js
M scap/templates/config.yaml.j2
M scap/vars.yaml
M src
4 files changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/51/328351/1

diff --git a/conf/wmf/localsettings.js b/conf/wmf/localsettings.js
index 1ea012d..efb4cb2 100644
--- a/conf/wmf/localsettings.js
+++ b/conf/wmf/localsettings.js
@@ -1,9 +1,5 @@
 "use strict";
 exports.setup = function(parsoidConfig) {
-   // Use the API backends directly without hitting the text varnishes.
-   // API requests are not cacheable anyway.
-   parsoidConfig.defaultAPIProxyURI = 'http://api.svc.eqiad.wmnet';
-
// Sample these verbose logs to prevent overwhelm
// 1% and 2% for empty/tr and empty/li is based on
// seeing the volume in rt-testing.
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index d7a6a61..c4bf1b8 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -50,6 +50,9 @@
   linting: <%= linting %>
   linterSendAPI: <%= linter_send_api %>
 
+  mwApiServer: <%= mwapi_server if mwapi_server else '' %>
+  defaultAPIProxyURI: <%= mwapi_proxy if mwapi_proxy else '' %>
+
   timeouts:
 # RESTBase uses a 2 minute timeout for the first request.
 #
diff --git a/scap/vars.yaml b/scap/vars.yaml
index b089a3b..1994779 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -14,3 +14,6 @@
 load_wmf: true
 linting: false
 linter_send_api: false
+mwapi_server:
+mwapi_proxy:
+
diff --git a/src b/src
index 6719e24..7193a85 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 6719e240fd4db750f680aac21b0ac8f69e7aedcc
+Subproject commit 7193a85722fa600ee0652112b100de0c5013fb89

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf41ad54da11b10bcc9d901f473c1d9576cd319e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/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]: Update restbase to 21b3282

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328109 )

Change subject: Update restbase to 21b3282
..


Update restbase to 21b3282

List of changes:
21b3282 Commons: Blacklist User:Oxyman/Buildings_in_London/2014_October_11-20

Change-Id: I2aff65bb5d5a58ba5535882619b5e9a67c306ded
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/restbase b/restbase
index c93ee83..21b3282 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit c93ee83fedfde2efa56dd79c7e67a58f990f1ad2
+Subproject commit 21b328235d972b4b43d6967d8ccd5564c81642a7

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2aff65bb5d5a58ba5535882619b5e9a67c306ded
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]: Update restbase to 21b3282

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328109 )

Change subject: Update restbase to 21b3282
..

Update restbase to 21b3282

List of changes:
21b3282 Commons: Blacklist User:Oxyman/Buildings_in_London/2014_October_11-20

Change-Id: I2aff65bb5d5a58ba5535882619b5e9a67c306ded
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/restbase b/restbase
index c93ee83..21b3282 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit c93ee83fedfde2efa56dd79c7e67a58f990f1ad2
+Subproject commit 21b328235d972b4b43d6967d8ccd5564c81642a7

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2aff65bb5d5a58ba5535882619b5e9a67c306ded
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] operations/puppet[production]: Conftool: Add restbase101[678] and restbase201[012]

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328059 )

Change subject: Conftool: Add restbase101[678] and restbase201[012]
..

Conftool: Add restbase101[678] and restbase201[012]

Bug: T151086
Change-Id: I797bb8a46931687793fb319055be4d17195b56a8
---
M conftool-data/nodes/codfw.yaml
M conftool-data/nodes/eqiad.yaml
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/328059/1

diff --git a/conftool-data/nodes/codfw.yaml b/conftool-data/nodes/codfw.yaml
index 4570409..e1e1d86 100644
--- a/conftool-data/nodes/codfw.yaml
+++ b/conftool-data/nodes/codfw.yaml
@@ -253,6 +253,9 @@
   restbase2007.codfw.wmnet: [restbase]
   restbase2008.codfw.wmnet: [restbase]
   restbase2009.codfw.wmnet: [restbase]
+  restbase2010.codfw.wmnet: [restbase]
+  restbase2011.codfw.wmnet: [restbase]
+  restbase2012.codfw.wmnet: [restbase]
 sca:
   sca2003.codfw.wmnet: [zotero]
   sca2004.codfw.wmnet: [zotero]
diff --git a/conftool-data/nodes/eqiad.yaml b/conftool-data/nodes/eqiad.yaml
index d67c789..ef5a090 100644
--- a/conftool-data/nodes/eqiad.yaml
+++ b/conftool-data/nodes/eqiad.yaml
@@ -254,6 +254,9 @@
   restbase1013.eqiad.wmnet: [restbase]
   restbase1014.eqiad.wmnet: [restbase]
   restbase1015.eqiad.wmnet: [restbase]
+  restbase1016.eqiad.wmnet: [restbase]
+  restbase1017.eqiad.wmnet: [restbase]
+  restbase1018.eqiad.wmnet: [restbase]
 maps:
   maps1001.eqiad.wmnet: [kartotherian]
   maps1002.eqiad.wmnet: [kartotherian]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I797bb8a46931687793fb319055be4d17195b56a8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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]: Update restbase to c93ee83

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328053 )

Change subject: Update restbase to c93ee83
..


Update restbase to c93ee83

List of changes:
c93ee83 Commons: Blacklist two large pages

Change-Id: Ic8039386d0fdbc6bc41bd4d4f86c833d46f67a7d
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/restbase b/restbase
index 765ad34..c93ee83 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit 765ad341c82c9a5dae15eab568fab8d12cab86ec
+Subproject commit c93ee83fedfde2efa56dd79c7e67a58f990f1ad2

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8039386d0fdbc6bc41bd4d4f86c833d46f67a7d
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]: Update restbase to c93ee83

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328053 )

Change subject: Update restbase to c93ee83
..

Update restbase to c93ee83

List of changes:
c93ee83 Commons: Blacklist two large pages

Change-Id: Ic8039386d0fdbc6bc41bd4d4f86c833d46f67a7d
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/restbase b/restbase
index 765ad34..c93ee83 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit 765ad341c82c9a5dae15eab568fab8d12cab86ec
+Subproject commit c93ee83fedfde2efa56dd79c7e67a58f990f1ad2

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8039386d0fdbc6bc41bd4d4f86c833d46f67a7d
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]: Update restbase to 765ad34

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328052 )

Change subject: Update restbase to 765ad34
..


Update restbase to 765ad34

List of changes:
8cdfb5c Blacklist User:Cyberpower678/RfX_Report on enwiki
xxx Update node module dependencies

Change-Id: Iae57bd2ca09f2719462ca5d74c20382bcbcebf29
---
M node_modules/content-type/package.json
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/json-stable-stringify/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M restbase
7 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/node_modules/content-type/package.json 
b/node_modules/content-type/package.json
index 10689db..841353f 100644
--- a/node_modules/content-type/package.json
+++ b/node_modules/content-type/package.json
@@ -44,7 +44,7 @@
   },
   "homepage": "https://github.com/jshttp/content-type#readme;,
   "_id": "content-type@1.0.1",
-  "_shasum": "41eb82f0aea6308e6d64ce4c5c8f4f4461fd33c2",
+  "_shasum": "1a969a8999e61f29c8e2a626d6baa68e7a02",
   "_from": "git+https://github.com/wikimedia/content-type.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/content-type.git#47b2632d0a2ee79a7d67268e2f6621becd95d05b;
 }
diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 198d453..0a7dfa1 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "c2cdc3e673a21c28d8f138408accffd639283e55",
+  "_shasum": "de91de08c65bc22ff0f5f0b8045e7eec626885b0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 179c725..dc1cc53 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "c393a813309dc50357b551434034515227e94f5c",
+  "_shasum": "0fb82fd2cfb57c7843efef67c42df6d7b4d552b3",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git a/node_modules/json-stable-stringify/package.json 
b/node_modules/json-stable-stringify/package.json
index 477002f..cf17100 100644
--- a/node_modules/json-stable-stringify/package.json
+++ b/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "2726b961529201b312dfd4bf0a7aa1d3ba07f24a",
+  "_shasum": "1b905d9b33262570f99e96dc177f2eda2f4d7dd4",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git 
a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
 
b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
index 198d453..0a7dfa1 100644
--- 
a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
+++ 
b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "c2cdc3e673a21c28d8f138408accffd639283e55",
+  "_shasum": "de91de08c65bc22ff0f5f0b8045e7eec626885b0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index b959dbd..400f430 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to 765ad34

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328052 )

Change subject: Update restbase to 765ad34
..

Update restbase to 765ad34

List of changes:
8cdfb5c Blacklist User:Cyberpower678/RfX_Report on enwiki
xxx Update node module dependencies

Change-Id: Iae57bd2ca09f2719462ca5d74c20382bcbcebf29
---
M node_modules/content-type/package.json
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/json-stable-stringify/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M restbase
7 files changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/node_modules/content-type/package.json 
b/node_modules/content-type/package.json
index 10689db..841353f 100644
--- a/node_modules/content-type/package.json
+++ b/node_modules/content-type/package.json
@@ -44,7 +44,7 @@
   },
   "homepage": "https://github.com/jshttp/content-type#readme;,
   "_id": "content-type@1.0.1",
-  "_shasum": "41eb82f0aea6308e6d64ce4c5c8f4f4461fd33c2",
+  "_shasum": "1a969a8999e61f29c8e2a626d6baa68e7a02",
   "_from": "git+https://github.com/wikimedia/content-type.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/content-type.git#47b2632d0a2ee79a7d67268e2f6621becd95d05b;
 }
diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 198d453..0a7dfa1 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "c2cdc3e673a21c28d8f138408accffd639283e55",
+  "_shasum": "de91de08c65bc22ff0f5f0b8045e7eec626885b0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 179c725..dc1cc53 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "c393a813309dc50357b551434034515227e94f5c",
+  "_shasum": "0fb82fd2cfb57c7843efef67c42df6d7b4d552b3",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git a/node_modules/json-stable-stringify/package.json 
b/node_modules/json-stable-stringify/package.json
index 477002f..cf17100 100644
--- a/node_modules/json-stable-stringify/package.json
+++ b/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "2726b961529201b312dfd4bf0a7aa1d3ba07f24a",
+  "_shasum": "1b905d9b33262570f99e96dc177f2eda2f4d7dd4",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git 
a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
 
b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
index 198d453..0a7dfa1 100644
--- 
a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
+++ 
b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "c2cdc3e673a21c28d8f138408accffd639283e55",
+  "_shasum": "de91de08c65bc22ff0f5f0b8045e7eec626885b0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index b959dbd..400f430 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...citoid[master]: Replace .url with .uri; bump preq and html-metadata; rel v0.4.4

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327772 )

Change subject: Replace .url with .uri; bump preq and html-metadata; rel v0.4.4
..


Replace .url with .uri; bump preq and html-metadata; rel v0.4.4

preq and request prefer to be supplied the .uri property instead of
.url, so use that one instead. While internally both of these libraries
map either prop name to .uri, there are some edge cases in redirects
where Citoid doesn't work, so switch to .uri.

Change-Id: I7812ddb125e7fb558e32129a0e0dff6355a79d35
---
M lib/CitoidService.js
M lib/Scraper.js
M lib/ZoteroService.js
M lib/crossRefRequest.js
M lib/pubMedRequest.js
M lib/unshorten.js
M package.json
7 files changed, 19 insertions(+), 19 deletions(-)

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



diff --git a/lib/CitoidService.js b/lib/CitoidService.js
index a01925c..0d82ed3 100644
--- a/lib/CitoidService.js
+++ b/lib/CitoidService.js
@@ -217,7 +217,7 @@
 };
 
 var requestOptions = {
-url : isbnLink,
+uri : isbnLink,
 headers: {
 'User-Agent': this.userAgent
 },
@@ -276,7 +276,7 @@
 };
 
 var requestOptions = {
-url : isbnLink,
+uri : isbnLink,
 headers: {
 'User-Agent': citoidService.userAgent
 },
@@ -433,7 +433,7 @@
 var urlOpts =  {};
 // Options for obtaining url the DOI resolves to
 var resolveOpts = {
-url : doiLink,
+uri : doiLink,
 method: 'head',
 followRedirect : false,
 headers: {
diff --git a/lib/Scraper.js b/lib/Scraper.js
index d352a49..d3b0036 100644
--- a/lib/Scraper.js
+++ b/lib/Scraper.js
@@ -65,7 +65,7 @@
 
 logger.log('debug/scraper', "Using native scraper on " + url);
 return preq({
-url: url,
+uri: url,
 followAllRedirects: true,
 jar: cr.jar, // Set cookie jar for request
 encoding: null, // returns page in Buffer object
@@ -514,4 +514,4 @@
 }
 
 module.exports.itemTypeFromPress = itemTypeFromPress;
-module.exports.addItemType = addItemType;
\ No newline at end of file
+module.exports.addItemType = addItemType;
diff --git a/lib/ZoteroService.js b/lib/ZoteroService.js
index b743128..4d84df9 100644
--- a/lib/ZoteroService.js
+++ b/lib/ZoteroService.js
@@ -122,7 +122,7 @@
  */
 ZoteroService.prototype.zoteroExportRequest = 
BBPromise.method(function(citation, format){
var options = {
-   url: this.exportURL,
+   uri: this.exportURL,
method: 'POST',
body: JSON.stringify(citation),
qs: {format: format},
diff --git a/lib/crossRefRequest.js b/lib/crossRefRequest.js
index 7e1cc76..ace2e43 100644
--- a/lib/crossRefRequest.js
+++ b/lib/crossRefRequest.js
@@ -26,7 +26,7 @@
var url = "https://search.crossref.org/dois?q=; + urlEncodedDOI;
 
return preq({
-   url: url,
+   uri: url,
headers: {
'User-Agent': userAgent
}
diff --git a/lib/pubMedRequest.js b/lib/pubMedRequest.js
index b79fc35..785b28a 100644
--- a/lib/pubMedRequest.js
+++ b/lib/pubMedRequest.js
@@ -26,7 +26,7 @@
 var url = 
"https://www.ncbi.nlm.nih.gov/pmc/utils/idconv/v1.0/?tool=citoid=citoid@mediawiki=json=;
 + escapedId;
 
 return preq({
-url: url,
+uri: url,
 headers: {
 'User-Agent': userAgent
 }
diff --git a/lib/unshorten.js b/lib/unshorten.js
index b0d39fb..6695bc3 100644
--- a/lib/unshorten.js
+++ b/lib/unshorten.js
@@ -27,7 +27,7 @@
  * returned).
  */
 method: 'get',
-url: url,
+uri: url,
 };
 
 var initialRequest = true;
@@ -36,18 +36,18 @@
 var maxRedirects = conf.maxRedirects || 5;
 
 function detectRedirect (response) {
-if (response.headers.hasOwnProperty('location') && (opts.url !== 
response.headers['location'])) {
-return followRedirect(response.headers['location'], opts.url);
+if (response.headers.hasOwnProperty('location') && (opts.uri !== 
response.headers['location'])) {
+return followRedirect(response.headers['location'], opts.uri);
 }
-if (response.headers.hasOwnProperty('content-location') && (opts.url 
!== response.headers['content-location'])) {
-return followRedirect(response.headers['content-location'], 
opts.url);
+if (response.headers.hasOwnProperty('content-location') && (opts.uri 
!== response.headers['content-location'])) {
+return followRedirect(response.headers['content-location'], 
opts.uri);
 }
 
 if (initialRequest) {
 throw new Error('No redirect detected in unshorten');
 }
 
-return opts.url;
+return opts.uri;
 }
 
 function followRedirect (redirLocation, prevUrl) {

[MediaWiki-commits] [Gerrit] mediawiki...citoid[master]: Replace .uri with .uri; bump preq and html-metadata; rel v0.4.4

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327772 )

Change subject: Replace .uri with .uri; bump preq and html-metadata; rel v0.4.4
..

Replace .uri with .uri; bump preq and html-metadata; rel v0.4.4

preq and prequest prefer to be supplied the .uri property instead of
.url, so use that one instead. While internally, both of these libraries
map either prop name to .uri, there are some edge cases in redirects
where Citoid doesn't work, so switch to .uri.

Change-Id: I7812ddb125e7fb558e32129a0e0dff6355a79d35
---
M lib/CitoidService.js
M lib/Scraper.js
M lib/ZoteroService.js
M lib/crossRefRequest.js
M lib/pubMedRequest.js
M lib/unshorten.js
M package.json
7 files changed, 19 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid 
refs/changes/72/327772/1

diff --git a/lib/CitoidService.js b/lib/CitoidService.js
index a01925c..0d82ed3 100644
--- a/lib/CitoidService.js
+++ b/lib/CitoidService.js
@@ -217,7 +217,7 @@
 };
 
 var requestOptions = {
-url : isbnLink,
+uri : isbnLink,
 headers: {
 'User-Agent': this.userAgent
 },
@@ -276,7 +276,7 @@
 };
 
 var requestOptions = {
-url : isbnLink,
+uri : isbnLink,
 headers: {
 'User-Agent': citoidService.userAgent
 },
@@ -433,7 +433,7 @@
 var urlOpts =  {};
 // Options for obtaining url the DOI resolves to
 var resolveOpts = {
-url : doiLink,
+uri : doiLink,
 method: 'head',
 followRedirect : false,
 headers: {
diff --git a/lib/Scraper.js b/lib/Scraper.js
index d352a49..d3b0036 100644
--- a/lib/Scraper.js
+++ b/lib/Scraper.js
@@ -65,7 +65,7 @@
 
 logger.log('debug/scraper', "Using native scraper on " + url);
 return preq({
-url: url,
+uri: url,
 followAllRedirects: true,
 jar: cr.jar, // Set cookie jar for request
 encoding: null, // returns page in Buffer object
@@ -514,4 +514,4 @@
 }
 
 module.exports.itemTypeFromPress = itemTypeFromPress;
-module.exports.addItemType = addItemType;
\ No newline at end of file
+module.exports.addItemType = addItemType;
diff --git a/lib/ZoteroService.js b/lib/ZoteroService.js
index b743128..4d84df9 100644
--- a/lib/ZoteroService.js
+++ b/lib/ZoteroService.js
@@ -122,7 +122,7 @@
  */
 ZoteroService.prototype.zoteroExportRequest = 
BBPromise.method(function(citation, format){
var options = {
-   url: this.exportURL,
+   uri: this.exportURL,
method: 'POST',
body: JSON.stringify(citation),
qs: {format: format},
diff --git a/lib/crossRefRequest.js b/lib/crossRefRequest.js
index 7e1cc76..ace2e43 100644
--- a/lib/crossRefRequest.js
+++ b/lib/crossRefRequest.js
@@ -26,7 +26,7 @@
var url = "https://search.crossref.org/dois?q=; + urlEncodedDOI;
 
return preq({
-   url: url,
+   uri: url,
headers: {
'User-Agent': userAgent
}
diff --git a/lib/pubMedRequest.js b/lib/pubMedRequest.js
index b79fc35..785b28a 100644
--- a/lib/pubMedRequest.js
+++ b/lib/pubMedRequest.js
@@ -26,7 +26,7 @@
 var url = 
"https://www.ncbi.nlm.nih.gov/pmc/utils/idconv/v1.0/?tool=citoid=citoid@mediawiki=json=;
 + escapedId;
 
 return preq({
-url: url,
+uri: url,
 headers: {
 'User-Agent': userAgent
 }
diff --git a/lib/unshorten.js b/lib/unshorten.js
index b0d39fb..6695bc3 100644
--- a/lib/unshorten.js
+++ b/lib/unshorten.js
@@ -27,7 +27,7 @@
  * returned).
  */
 method: 'get',
-url: url,
+uri: url,
 };
 
 var initialRequest = true;
@@ -36,18 +36,18 @@
 var maxRedirects = conf.maxRedirects || 5;
 
 function detectRedirect (response) {
-if (response.headers.hasOwnProperty('location') && (opts.url !== 
response.headers['location'])) {
-return followRedirect(response.headers['location'], opts.url);
+if (response.headers.hasOwnProperty('location') && (opts.uri !== 
response.headers['location'])) {
+return followRedirect(response.headers['location'], opts.uri);
 }
-if (response.headers.hasOwnProperty('content-location') && (opts.url 
!== response.headers['content-location'])) {
-return followRedirect(response.headers['content-location'], 
opts.url);
+if (response.headers.hasOwnProperty('content-location') && (opts.uri 
!== response.headers['content-location'])) {
+return followRedirect(response.headers['content-location'], 
opts.uri);
 }
 
 if (initialRequest) {
 throw new Error('No redirect detected in unshorten');
 }
 
-return opts.url;
+return opts.uri;
 }
 
 function followRedirect (redirLocation, 

[MediaWiki-commits] [Gerrit] mediawiki...citoid[master]: Update dependencies

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327757 )

Change subject: Update dependencies
..


Update dependencies

Note that preq and html-metadata have not been updated to their latest
versions, as there seems to be a problem with preq >= 0.5.0 which needs
further investigation.

Change-Id: I39ce82983f98926b74fc9907900c6c3ef1e31890
---
M package.json
M test/features/errors/address.js
2 files changed, 13 insertions(+), 13 deletions(-)

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



diff --git a/package.json b/package.json
index 6718b61..ac8c412 100644
--- a/package.json
+++ b/package.json
@@ -11,32 +11,32 @@
 "coverage": "istanbul cover _mocha -- -R spec"
   },
   "dependencies": {
-"bluebird": "3.4.1",
+"bluebird": "3.4.6",
 "body-parser": "1.15.2",
-"bunyan": "1.8.1",
+"bunyan": "1.8.5",
 "cassandra-uuid": "0.0.2",
-"cheerio": "0.20.0",
+"cheerio": "0.22.0",
 "chrono-node": "1.2.5",
 "compression": "1.6.2",
 "content-type": "1.0.2",
 "core-js": "2.4.1",
 "express": "4.14.0",
 "extend": "3.0.0",
-"html-metadata": "1.4.3",
-"iconv-lite": "0.4.13",
+"html-metadata": "1.6.0",
+"iconv-lite": "0.4.15",
 "ip": "1.1.0",
-"js-yaml": "3.6.1",
-"preq": "0.4.10",
+"js-yaml": "3.7.0",
+"preq": "0.4.12",
 "request": "^2.67.0",
-"service-runner": "2.0.6",
+"service-runner": "2.1.13",
 "striptags": "2.1.1",
-"swagger-router": "^0.4.6",
-"tough-cookie": "2.3.1",
+"swagger-router": "^0.5.5",
+"tough-cookie": "2.3.2",
 "xml2js": "0.4.17"
   },
   "devDependencies": {
-"istanbul": "^0.4.4",
-"mocha": "^2.5.3",
+"istanbul": "^0.4.5",
+"mocha": "^3.2.0",
 "mocha-jshint": "^2.3.1",
 "mocha-lcov-reporter": "1.2.0",
 "nsp": "^2.6.1"
diff --git a/test/features/errors/address.js b/test/features/errors/address.js
index dd78a18..db3d78c 100644
--- a/test/features/errors/address.js
+++ b/test/features/errors/address.js
@@ -58,7 +58,7 @@
 });
 
 it('redir-to-zot-supported', function() {
-return 
server.query('https://httpbin.org/redirect-to?url=http://en.wikipedia.org/wiki/Zotero',
 'mediawiki', 'en')
+return 
server.query('https://httpbin.org/redirect-to?url=https://en.wikipedia.org/wiki/Zotero',
 'mediawiki', 'en')
 .then(function(res) {
 assert.status(res, 200);
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I39ce82983f98926b74fc9907900c6c3ef1e31890
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Mvolz 
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...citoid[master]: Update dependencies

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327757 )

Change subject: Update dependencies
..

Update dependencies

Note that preq and html-metadata have not been updated to their latest
versions, as there seems to be a problem with preq >= 0.5.0 which needs
further investigation.

Change-Id: I39ce82983f98926b74fc9907900c6c3ef1e31890
---
M package.json
M test/features/errors/address.js
2 files changed, 13 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid 
refs/changes/57/327757/1

diff --git a/package.json b/package.json
index 6718b61..ac8c412 100644
--- a/package.json
+++ b/package.json
@@ -11,32 +11,32 @@
 "coverage": "istanbul cover _mocha -- -R spec"
   },
   "dependencies": {
-"bluebird": "3.4.1",
+"bluebird": "3.4.6",
 "body-parser": "1.15.2",
-"bunyan": "1.8.1",
+"bunyan": "1.8.5",
 "cassandra-uuid": "0.0.2",
-"cheerio": "0.20.0",
+"cheerio": "0.22.0",
 "chrono-node": "1.2.5",
 "compression": "1.6.2",
 "content-type": "1.0.2",
 "core-js": "2.4.1",
 "express": "4.14.0",
 "extend": "3.0.0",
-"html-metadata": "1.4.3",
-"iconv-lite": "0.4.13",
+"html-metadata": "1.6.0",
+"iconv-lite": "0.4.15",
 "ip": "1.1.0",
-"js-yaml": "3.6.1",
-"preq": "0.4.10",
+"js-yaml": "3.7.0",
+"preq": "0.4.12",
 "request": "^2.67.0",
-"service-runner": "2.0.6",
+"service-runner": "2.1.13",
 "striptags": "2.1.1",
-"swagger-router": "^0.4.6",
-"tough-cookie": "2.3.1",
+"swagger-router": "^0.5.5",
+"tough-cookie": "2.3.2",
 "xml2js": "0.4.17"
   },
   "devDependencies": {
-"istanbul": "^0.4.4",
-"mocha": "^2.5.3",
+"istanbul": "^0.4.5",
+"mocha": "^3.2.0",
 "mocha-jshint": "^2.3.1",
 "mocha-lcov-reporter": "1.2.0",
 "nsp": "^2.6.1"
diff --git a/test/features/errors/address.js b/test/features/errors/address.js
index dd78a18..db3d78c 100644
--- a/test/features/errors/address.js
+++ b/test/features/errors/address.js
@@ -58,7 +58,7 @@
 });
 
 it('redir-to-zot-supported', function() {
-return 
server.query('https://httpbin.org/redirect-to?url=http://en.wikipedia.org/wiki/Zotero',
 'mediawiki', 'en')
+return 
server.query('https://httpbin.org/redirect-to?url=https://en.wikipedia.org/wiki/Zotero',
 'mediawiki', 'en')
 .then(function(res) {
 assert.status(res, 200);
 });

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39ce82983f98926b74fc9907900c6c3ef1e31890
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid
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] operations/puppet[production]: Add jdlrobson to the deploy-service group

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327755 )

Change subject: Add jdlrobson to the deploy-service group
..

Add jdlrobson to the deploy-service group

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/327755/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 004c04e..478bfe3 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -402,7 +402,7 @@
 description: Service deploy users
 members: [bd808, eevans, gwicke, mobrovac, ppchelko, demon, 
twentyafterfour, thcipriani, dduvall,
   yurik, bsitzmann, mholloway-shell, kartik, halfak, ladsgroup, 
smalyshev, hoo,
-  ssastry, cscott, arlolra]
+  ssastry, cscott, arlolra, jdlrobson]
 privileges: []
 
   deploy-aqs:

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Trending Edits: Add the admin group (and add it to SCB)

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327754 )

Change subject: Trending Edits: Add the admin group (and add it to SCB)
..

Trending Edits: Add the admin group (and add it to SCB)

Bug: T153458
Change-Id: I3f21887b3a10b44b57fca8417dd954e70bacda61
---
M hieradata/role/common/scb.yaml
M modules/admin/data/data.yaml
2 files changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/hieradata/role/common/scb.yaml b/hieradata/role/common/scb.yaml
index d36b74c..a77ee9e 100644
--- a/hieradata/role/common/scb.yaml
+++ b/hieradata/role/common/scb.yaml
@@ -12,6 +12,7 @@
 - changeprop-admin
 - ores-admin
 - pdfrender-admin
+- trendingedits-admin
 role::lvs::realserver::pools:
   ores: {}
   apertium: {}
diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 004c04e..639a511 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -515,6 +515,7 @@
'ALL = NOPASSWD: /usr/sbin/service mathoid *',
'ALL = NOPASSWD: /usr/sbin/service mobileapps *',
'ALL = NOPASSWD: /usr/sbin/service pdfrender *',
+   'ALL = NOPASSWD: /usr/sbin/service trendingedits *',
'ALL = NOPASSWD: /usr/sbin/service zotero *',
'ALL = NOPASSWD: /usr/bin/firejail --join=*']
   notebook-roots:
@@ -591,6 +592,12 @@
 members: [gwicke, ppchelko, eevans, mobrovac]
 privileges: ['ALL = NOPASSWD: /usr/sbin/service pdfrender *',
  'ALL = (pdfrender) NOPASSWD: ALL']
+  trendingedits-admin:
+description: Group of trendingedits admins
+gid: 791
+members: [gwicke, ppchelko, eevans, mobrovac, jdlrobson, bsitzmann]
+privileges: ['ALL = NOPASSWD: /usr/sbin/service trendingedits *',
+ 'ALL = (trendingedits) NOPASSWD: ALL']
 
 users:
   rush:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...citoid[master]: Make ISBNs from requestFromISBN be in Arrays

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327495 )

Change subject: Make ISBNs from requestFromISBN be in Arrays
..


Make ISBNs from requestFromISBN be in Arrays

Previously, ISBN fields from requestFromISBN
were being returned as Strings. This returns
them as an Array of strings, consistent with
how the ISBN field is returned from other
sources

Bug:T153310
Change-Id: I887e7ee04e87f8a7f83cca9a51d0e7a83d5fe573
---
M lib/Exporter.js
M test/features/scraping/isbn.js
2 files changed, 12 insertions(+), 9 deletions(-)

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



diff --git a/lib/Exporter.js b/lib/Exporter.js
index 90df943..895e263 100644
--- a/lib/Exporter.js
+++ b/lib/Exporter.js
@@ -494,8 +494,11 @@
 // Pointer for code clarity
 var citation = cr.response.body[0];
 
-// Set requested identifier as part of citation
-if (cr.idType !== 'url' && !citation[cr.idType.toUpperCase()]) {
+// Add isbn inside of an Array
+if (cr.idType === 'isbn'){
+citation.ISBN = [cr.idValue];
+// Set other identifiers as part of citation
+} else if (cr.idType !== 'url' && !citation[cr.idType.toUpperCase()]) {
 citation[cr.idType.toUpperCase()] = cr.idValue;
 }
 
diff --git a/test/features/scraping/isbn.js b/test/features/scraping/isbn.js
index 727d4ab..9f1ad09 100644
--- a/test/features/scraping/isbn.js
+++ b/test/features/scraping/isbn.js
@@ -33,7 +33,7 @@
 assert.deepEqual(res.body[0].place, 'Sebastapool, Calif.', 
'Unexpected value; expected Sebastapool, Calif., got ' + res.body[0].place);
 assert.deepEqual(res.body[0].edition, '1st ed.', 'Unexpected 
value; expected 1st ed., got ' + res.body[0].edition);
 assert.deepEqual(res.body[0].date, '2009-01-01', 'Unexpected 
value; expected 2009-01-01, got ' + res.body[0].date);
-assert.deepEqual(!!res.body[0].ISBN, true, 'Missing ISBN');
+assert.isInArray(res.body[0].ISBN, '9780596519797');
 assert.deepEqual(res.body[0].itemType, 'book', 'Wrong 
itemType; expected book, got ' + res.body[0].itemType);
 });
 });
@@ -47,7 +47,7 @@
 assert.deepEqual(res.body[0].author, [['J.K.', 'Rowling']], 
'Unexpected value; expected [[\'J.K.\', \'Rowling\']] got ' + 
res.body[0].author);
 assert.deepEqual(res.body[0].place, 'New York, NY', 
'Unexpected value; expected New York, NY, got ' + res.body[0].place);
 assert.deepEqual(res.body[0].edition, '1st American ed.', 
'Unexpected value; expected 1st ed., got ' + res.body[0].edition);
-assert.deepEqual(!!res.body[0].ISBN, true, 'Missing ISBN');
+assert.isInArray(res.body[0].ISBN, '9780439784542');
 assert.deepEqual(res.body[0].itemType, 'book', 'Wrong 
itemType; expected book, got ' + res.body[0].itemType);
 });
 });
@@ -62,7 +62,7 @@
 assert.deepEqual(res.body[0].publisher, 'DK Pub.', 'Unexpected 
value; expected DK Pub., got ' + res.body[0].publisher);
 assert.deepEqual(res.body[0].place, 'New York', 'Unexpected 
value; expected New York, got ' + res.body[0].place);
 assert.deepEqual(res.body[0].date, '2010-01-01', 'Unexpected 
value; expected 2010-01-01, got ' + res.body[0].date);
-assert.deepEqual(!!res.body[0].ISBN, true, 'Missing ISBN');
+assert.isInArray(res.body[0].ISBN, '9780756662967');
 assert.deepEqual(res.body[0].itemType, 'book', 'Wrong 
itemType; expected book, got ' + res.body[0].itemType);
 });
 });
@@ -95,7 +95,7 @@
 //assert.deepEqual(res.body[0].place, 'Sebastapool, Calif.', 
'Unexpected value; expected Sebastapool, Calif., got ' + res.body[0].place); // 
Not currently working with Worldcat Search API - not present in results
 //assert.deepEqual(res.body[0].edition, '1st ed.', 'Unexpected 
value; expected 1st ed., got ' + res.body[0].edition); // Not currently working 
with Worldcat Search API - present in description tag
 assert.deepEqual(res.body[0].date, '2009-01-01', 'Unexpected 
value; expected 2009-01-01, got ' + res.body[0].date);
-assert.deepEqual(!!res.body[0].ISBN, true, 'Missing ISBN');
+assert.isInArray(res.body[0].ISBN, '9780596519797');
 assert.deepEqual(res.body[0].itemType, 'book', 'Wrong 
itemType; expected book, got ' + res.body[0].itemType);
 });
 });
@@ -110,7 +110,7 @@
 assert.deepEqual(res.body[0].studio, 'DK Pub', 'Unexpected 
value; expected DK Pub, got ' + res.body[0].studio);
 //assert.deepEqual(res.body[0].place, 'New York', 'Unexpected 
value; expected New York, got ' + res.body[0].place);
 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config deploys: Add the config file Scap3 definition

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327725 )

Change subject: Config deploys: Add the config file Scap3 definition
..


Config deploys: Add the config file Scap3 definition

Bug: T144598
Change-Id: Ia3a876aa3aa8eaa7f6dcd43b462d8aa7404d
---
A scap/config-files.yaml
1 file changed, 5 insertions(+), 0 deletions(-)

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..1635338
--- /dev/null
+++ b/scap/config-files.yaml
@@ -0,0 +1,5 @@
+---
+/etc/mobileapps/config.yaml:
+  template: config.yaml.j2
+  erb_syntax: True
+  remote_vars: /etc/mobileapps/config-vars.yaml

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3a876aa3aa8eaa7f6dcd43b462d8aa7404d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/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]: Config deploys: Add the config file Scap3 definition

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327725 )

Change subject: Config deploys: Add the config file Scap3 definition
..

Config deploys: Add the config file Scap3 definition

Bug: T144598
Change-Id: Ia3a876aa3aa8eaa7f6dcd43b462d8aa7404d
---
A scap/config-files.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps/deploy 
refs/changes/25/327725/1

diff --git a/scap/config-files.yaml b/scap/config-files.yaml
new file mode 100644
index 000..1635338
--- /dev/null
+++ b/scap/config-files.yaml
@@ -0,0 +1,5 @@
+---
+/etc/mobileapps/config.yaml:
+  template: config.yaml.j2
+  erb_syntax: True
+  remote_vars: /etc/mobileapps/config-vars.yaml

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3a876aa3aa8eaa7f6dcd43b462d8aa7404d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/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]: Switch to Scap3 config deploys

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327724 )

Change subject: Switch to Scap3 config deploys
..


Switch to Scap3 config deploys

Change-Id: I079f89c02bfd47c60201b3f9b9d2229739e96df4
Depends-On: Ia6575b86b962c89ef288c472e5e7e25a375be1b4
Bug: T144598
---
M scap/scap.cfg
A scap/templates/config.yaml.j2
A scap/vars.yaml
3 files changed, 98 insertions(+), 0 deletions(-)

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



diff --git a/scap/scap.cfg b/scap/scap.cfg
index f0277cd..fab46c93 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -10,6 +10,7 @@
 service_name: mobileapps
 service_port: 
 lock_file: /tmp/scap.mobileapps.lock
+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..83d2c47
--- /dev/null
+++ b/scap/templates/config.yaml.j2
@@ -0,0 +1,85 @@
+# 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: 600
+
+# 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
+
+# Logger info
+logging:
+  level: warn
+  name: mobileapps
+  streams: 
+- host: <%= logstash_host %>
+  port: <%= logstash_port %>
+  type: gelf
+- level: info
+  path: <%= log_file %>
+  type: file
+
+# Statsd metrics reporter
+metrics: 
+  name: mobileapps
+  host: <%= metrics_host %>
+  port: <%= metrics_port %>
+  type: statsd
+
+services:
+  - name: mobileapps
+# a relative path or the name of an npm package, if different from name
+module: ./src/app.js
+# per-service config
+conf:
+  port: <%= port %>
+  # interface: localhost # uncomment to only listen on localhost
+  # more per-service config settings
+  # the location of the spec, defaults to spec.yaml if not specified
+  # spec: ./spec.template.yaml
+  # allow cross-domain requests to the API (default '*')
+  cors: '*'
+  # to disable use:
+  # cors: false
+  # to restrict to a particular domain, use:
+  # cors: restricted.domain.org
+  # content for the CSP headers
+  # csp: false  # uncomment this line to disable sending them
+  # URL of the outbound proxy to use (complete with protocol)
+  proxy: <%= proxy if proxy else '' %>
+  # the list of domains for which not to use the proxy defined above
+  no_proxy_list:
+- eqiad.wmnet
+- codfw.wmnet
+  # the list of incoming request headers that can be logged; if left empty,
+  # the following headers are allowed: cache-control, content-length,
+  # content-type, if-match, user-agent, x-request-id
+  # log_header_whitelist:
+  #   - cache-control
+  #   - content-length
+  #   - content-type
+  #   - if-match
+  #   - user-agent
+  #   - x-request-id
+  # User-Agent HTTP header to use for requests
+  user_agent: "Mobile-Content-Service/WMF"
+  # the request template for contacting the MW API
+  mwapi_req:
+method: post
+uri: <%= mwapi_uri %>
+headers:
+  host: "{{request.params.domain}}"
+  user-agent: "{{user-agent}}"
+body: "{{ default(request.query, {}) }}"
+  # the request template for contacting RESTBase
+  restbase_req:
+method: "{{request.method}}"
+uri: <%= restbase_uri %>/{{domain}}/v1/{+path}
+query: "{{ default(request.query, {}) }}"
+headers: "{{request.headers}}"
+body: "{{request.body}}"
+
diff --git a/scap/vars.yaml b/scap/vars.yaml
new file mode 100644
index 000..417cee1
--- /dev/null
+++ b/scap/vars.yaml
@@ -0,0 +1,12 @@
+# log-related variables
+logstash_host: localhost
+logstash_port: 12201
+log_file: /tmp/mobileapps.log
+# metrics
+metrics_host: localhost
+metrics_port: 8125
+# service
+port: 
+proxy:
+mwapi_uri: https://{{domain}}/w/api.php
+restbase_uri: http://localhost:7231

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I079f89c02bfd47c60201b3f9b9d2229739e96df4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/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]: Switch to Scap3 config deploys

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327724 )

Change subject: Switch to Scap3 config deploys
..

Switch to Scap3 config deploys

Change-Id: I079f89c02bfd47c60201b3f9b9d2229739e96df4
Depends-On: Ia6575b86b962c89ef288c472e5e7e25a375be1b4
Bug: T144598
---
M scap/scap.cfg
A scap/templates/config.yaml.j2
A scap/vars.yaml
3 files changed, 98 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps/deploy 
refs/changes/24/327724/1

diff --git a/scap/scap.cfg b/scap/scap.cfg
index f0277cd..fab46c93 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -10,6 +10,7 @@
 service_name: mobileapps
 service_port: 
 lock_file: /tmp/scap.mobileapps.lock
+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..83d2c47
--- /dev/null
+++ b/scap/templates/config.yaml.j2
@@ -0,0 +1,85 @@
+# 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: 600
+
+# 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
+
+# Logger info
+logging:
+  level: warn
+  name: mobileapps
+  streams: 
+- host: <%= logstash_host %>
+  port: <%= logstash_port %>
+  type: gelf
+- level: info
+  path: <%= log_file %>
+  type: file
+
+# Statsd metrics reporter
+metrics: 
+  name: mobileapps
+  host: <%= metrics_host %>
+  port: <%= metrics_port %>
+  type: statsd
+
+services:
+  - name: mobileapps
+# a relative path or the name of an npm package, if different from name
+module: ./src/app.js
+# per-service config
+conf:
+  port: <%= port %>
+  # interface: localhost # uncomment to only listen on localhost
+  # more per-service config settings
+  # the location of the spec, defaults to spec.yaml if not specified
+  # spec: ./spec.template.yaml
+  # allow cross-domain requests to the API (default '*')
+  cors: '*'
+  # to disable use:
+  # cors: false
+  # to restrict to a particular domain, use:
+  # cors: restricted.domain.org
+  # content for the CSP headers
+  # csp: false  # uncomment this line to disable sending them
+  # URL of the outbound proxy to use (complete with protocol)
+  proxy: <%= proxy if proxy else '' %>
+  # the list of domains for which not to use the proxy defined above
+  no_proxy_list:
+- eqiad.wmnet
+- codfw.wmnet
+  # the list of incoming request headers that can be logged; if left empty,
+  # the following headers are allowed: cache-control, content-length,
+  # content-type, if-match, user-agent, x-request-id
+  # log_header_whitelist:
+  #   - cache-control
+  #   - content-length
+  #   - content-type
+  #   - if-match
+  #   - user-agent
+  #   - x-request-id
+  # User-Agent HTTP header to use for requests
+  user_agent: "Mobile-Content-Service/WMF"
+  # the request template for contacting the MW API
+  mwapi_req:
+method: post
+uri: <%= mwapi_uri %>
+headers:
+  host: "{{request.params.domain}}"
+  user-agent: "{{user-agent}}"
+body: "{{ default(request.query, {}) }}"
+  # the request template for contacting RESTBase
+  restbase_req:
+method: "{{request.method}}"
+uri: <%= restbase_uri %>/{{domain}}/v1/{+path}
+query: "{{ default(request.query, {}) }}"
+headers: "{{request.headers}}"
+body: "{{request.body}}"
+
diff --git a/scap/vars.yaml b/scap/vars.yaml
new file mode 100644
index 000..417cee1
--- /dev/null
+++ b/scap/vars.yaml
@@ -0,0 +1,12 @@
+# log-related variables
+logstash_host: localhost
+logstash_port: 12201
+log_file: /tmp/mobileapps.log
+# metrics
+metrics_host: localhost
+metrics_port: 8125
+# service
+port: 
+proxy:
+mwapi_uri: https://{{domain}}/w/api.php
+restbase_uri: http://localhost:7231

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I079f89c02bfd47c60201b3f9b9d2229739e96df4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/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] operations/puppet[production]: MobileApps: Switch to Scap3 config deploys

2016-12-16 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327723 )

Change subject: MobileApps: Switch to Scap3 config deploys
..

MobileApps: Switch to Scap3 config deploys

Bug: T144598
Change-Id: Ia6575b86b962c89ef288c472e5e7e25a375be1b4
---
M modules/mobileapps/manifests/init.pp
D modules/mobileapps/templates/config.yaml.erb
2 files changed, 6 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/23/327723/1

diff --git a/modules/mobileapps/manifests/init.pp 
b/modules/mobileapps/manifests/init.pp
index a3de4a9..13db326 100644
--- a/modules/mobileapps/manifests/init.pp
+++ b/modules/mobileapps/manifests/init.pp
@@ -7,21 +7,12 @@
 # classes as well as conform to a de-facto standard of having a module for 
every
 # service
 #
-# === Parameters
-#
-# [*user_agent*]
-#   The user agent header to send to other services. Default: WMF Mobile 
Content
-#   Service
-#
-class mobileapps(
-$user_agent   = 'WMF Mobile Content Service',
-) {
+class mobileapps() {
 service::node { 'mobileapps':
-port=> ,
-config  => template('mobileapps/config.yaml.erb'),
-heap_limit  => 450,
-has_spec=> true,
-healthcheck_url => '',
-deployment  => 'scap3',
+port  => ,
+has_spec  => true,
+healthcheck_url   => '',
+deployment=> 'scap3',
+deployment_config => true,
 }
 }
diff --git a/modules/mobileapps/templates/config.yaml.erb 
b/modules/mobileapps/templates/config.yaml.erb
deleted file mode 100644
index 34e677c..000
--- a/modules/mobileapps/templates/config.yaml.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-# do not use a proxy, since the service issues internal
-# requests only
-proxy:
-# the User-Agent header to send
-user_agent: <%= @user_agent %>

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Beta: RESTBase: Use the BetaCluster MCS instance

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327694 )

Change subject: Beta: RESTBase: Use the BetaCluster MCS instance
..

Beta: RESTBase: Use the BetaCluster MCS instance

An instance of the mobile content service has been set up in
BetaCluster, so point RESTBase to that VM.

Bug: T149671
Change-Id: I5807896e7f9b0279be922de73e6ccddb3fdaac12
---
M hieradata/labs/deployment-prep/common.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/327694/1

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index d5059be..c5ddf9c 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -110,7 +110,7 @@
 restbase::logstash_host: deployment-logstash2.deployment-prep.eqiad.wmflabs
 restbase::cassandra_default_consistency: localQuorum
 restbase::graphoid_uri: 
http://deployment-sca01.deployment-prep.eqiad.wmflabs:19000
-restbase::mobileapps_uri: http://appservice.wmflabs.org
+restbase::mobileapps_uri: 
http://deployment-mcs01.deployment-prep.eqiad.wmflabs:
 restbase::mathoid_uri: 
http://deployment-mathoid.deployment-prep.eqiad.wmflabs:10042
 restbase::aqs_uri: https://wikimedia.org/api/rest_v1/metrics
 restbase::eventlogging_service_uri: 
http://deployment-eventlogging04.deployment-prep.eqiad.wmflabs:8085/v1/events

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5807896e7f9b0279be922de73e6ccddb3fdaac12
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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]: Scap: Disable endpoints checks in Beta

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327689 )

Change subject: Scap: Disable endpoints checks in Beta
..


Scap: Disable endpoints checks in Beta

Bug: T149671
Change-Id: I2b590adf7995b11d1894cc9ca3120bb9fec851a8
---
A scap/environments/beta/checks.yaml
M scap/scap.cfg
2 files changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/scap/environments/beta/checks.yaml 
b/scap/environments/beta/checks.yaml
new file mode 100644
index 000..29e81ba
--- /dev/null
+++ b/scap/environments/beta/checks.yaml
@@ -0,0 +1,2 @@
+checks:
+  endpoints: {}
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 1a620df..f0277cd 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -15,6 +15,7 @@
 git_server: tin.eqiad.wmnet
 
 [deployment-prep.eqiad.wmflabs]
+environment: beta
 git_server: deployment-tin.deployment-prep.eqiad.wmflabs
 server_groups: default
 dsh_targets: betacluster

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b590adf7995b11d1894cc9ca3120bb9fec851a8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 
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]: Scap: Disable endpoints checks in Beta

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327689 )

Change subject: Scap: Disable endpoints checks in Beta
..

Scap: Disable endpoints checks in Beta

Bug: T149671
Change-Id: I2b590adf7995b11d1894cc9ca3120bb9fec851a8
---
A scap/environments/beta/checks.yaml
A scap/environments/beta/scap.cfg
M scap/scap.cfg
3 files changed, 6 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps/deploy 
refs/changes/89/327689/1

diff --git a/scap/environments/beta/checks.yaml 
b/scap/environments/beta/checks.yaml
new file mode 100644
index 000..29e81ba
--- /dev/null
+++ b/scap/environments/beta/checks.yaml
@@ -0,0 +1,2 @@
+checks:
+  endpoints: {}
diff --git a/scap/environments/beta/scap.cfg b/scap/environments/beta/scap.cfg
new file mode 100644
index 000..5cf3d81
--- /dev/null
+++ b/scap/environments/beta/scap.cfg
@@ -0,0 +1,3 @@
+git_server: deployment-tin.deployment-prep.eqiad.wmflabs
+server_groups: default
+dsh_targets: betacluster
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 1a620df..d6ac17c 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -15,6 +15,4 @@
 git_server: tin.eqiad.wmnet
 
 [deployment-prep.eqiad.wmflabs]
-git_server: deployment-tin.deployment-prep.eqiad.wmflabs
-server_groups: default
-dsh_targets: betacluster
+environment: beta

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b590adf7995b11d1894cc9ca3120bb9fec851a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/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]: Scap: Add BetaCluster deployment configuration

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327566 )

Change subject: Scap: Add BetaCluster deployment configuration
..


Scap: Add BetaCluster deployment configuration

Bug: T149671
Change-Id: I112e6686f50c8715ca038188e8c04777e159447d
---
A scap/betacluster
M scap/scap.cfg
2 files changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/scap/betacluster b/scap/betacluster
new file mode 100644
index 000..5fd0607
--- /dev/null
+++ b/scap/betacluster
@@ -0,0 +1 @@
+deployment-mcs01.deployment-prep.eqiad.wmflabs
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 4c9e17b..1a620df 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -13,3 +13,8 @@
 
 [wmnet]
 git_server: tin.eqiad.wmnet
+
+[deployment-prep.eqiad.wmflabs]
+git_server: deployment-tin.deployment-prep.eqiad.wmflabs
+server_groups: default
+dsh_targets: betacluster

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I112e6686f50c8715ca038188e8c04777e159447d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/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]: Scap: Add BetaCluster deployment configuration

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327566 )

Change subject: Scap: Add BetaCluster deployment configuration
..

Scap: Add BetaCluster deployment configuration

Bug: T149671
Change-Id: I112e6686f50c8715ca038188e8c04777e159447d
---
A scap/betacluster
M scap/scap.cfg
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps/deploy 
refs/changes/66/327566/1

diff --git a/scap/betacluster b/scap/betacluster
new file mode 100644
index 000..5fd0607
--- /dev/null
+++ b/scap/betacluster
@@ -0,0 +1 @@
+deployment-mcs01.deployment-prep.eqiad.wmflabs
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 4c9e17b..1a620df 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -13,3 +13,8 @@
 
 [wmnet]
 git_server: tin.eqiad.wmnet
+
+[deployment-prep.eqiad.wmflabs]
+git_server: deployment-tin.deployment-prep.eqiad.wmflabs
+server_groups: default
+dsh_targets: betacluster

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I112e6686f50c8715ca038188e8c04777e159447d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/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...mobileapps[master]: Update preq dependency

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327023 )

Change subject: Update preq dependency
..


Update preq dependency

Now we can set PREQ_CONNECT_TIMEOUT when prepping the
deploy to avoid the timeout issues we've encountered
when running the tests in our slow VMs.

See https://github.com/wikimedia/preq/pull/24

The only changes since 0.5.0
https://github.com/wikimedia/preq/compare/v0.5.0...master
are the new timeout override and a travis change,
which should not affect us as a user of this library.

Change-Id: Ia22e7553d3292a5e8eb8df062818f6daacc83ffe
---
M package.json
1 file changed, 1 insertion(+), 1 deletion(-)

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

Objections:
  Mholloway: There's a problem with this change, please improve



diff --git a/package.json b/package.json
index 4b30e76..e51e3d5 100644
--- a/package.json
+++ b/package.json
@@ -50,7 +50,7 @@
 "js-yaml": "^3.7.0",
 "locutus": "^2.0.5",
 "mediawiki-title": "^0.5.6",
-"preq": "^0.5.0",
+"preq": "^0.5.1",
 "service-runner": "^2.1.11",
 "swagger-router": "^0.5.5",
 "underscore": "^1.8.3"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia22e7553d3292a5e8eb8df062818f6daacc83ffe
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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/vagrant[master]: RESTBase: Add the Citoid config

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327518 )

Change subject: RESTBase: Add the Citoid config
..

RESTBase: Add the Citoid config

Bug: T153214
Change-Id: I332a41dbc953da07a62f35d15c148609b0b4e547
---
M puppet/modules/restbase/manifests/init.pp
M puppet/modules/restbase/templates/config.yaml.erb
2 files changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/18/327518/1

diff --git a/puppet/modules/restbase/manifests/init.pp 
b/puppet/modules/restbase/manifests/init.pp
index 0b45411..e46cc91 100644
--- a/puppet/modules/restbase/manifests/init.pp
+++ b/puppet/modules/restbase/manifests/init.pp
@@ -45,6 +45,11 @@
 default => ,
 }
 
+$citoid_port = defined(Class['citoid']) ? {
+true=> $::citoid::port,
+default => 1970,
+}
+
 file { $dbdir:
 ensure => directory,
 owner  => 'www-data',
diff --git a/puppet/modules/restbase/templates/config.yaml.erb 
b/puppet/modules/restbase/templates/config.yaml.erb
index 28cf84c..51b055b 100644
--- a/puppet/modules/restbase/templates/config.yaml.erb
+++ b/puppet/modules/restbase/templates/config.yaml.erb
@@ -26,6 +26,10 @@
   eventlogging_service:
 uri: http://localhost:<%= @eventlogging_service_port %>/v1/events
 topic: resource_change
+related:
+  cache_control: s-maxage=86400, max-age=86400
+citoid:
+  host: http://localhost:<%= @citoid_port %>
 
 wikimedia.org: 
   x-modules:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I332a41dbc953da07a62f35d15c148609b0b4e547
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
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...trending-edits[master]: Use 1.4.0 of wikipedia-edits-scorer

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327385 )

Change subject: Use 1.4.0 of wikipedia-edits-scorer
..


Use 1.4.0 of wikipedia-edits-scorer

New version calculates scores better for newly created articles
and anonymous vandalism

Change-Id: I9d98e873fe5352a9dbd9a038d11227f816f4d190
---
M package.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/package.json b/package.json
index 8cc6087..e12c7e9 100644
--- a/package.json
+++ b/package.json
@@ -34,7 +34,7 @@
 "service-runner": "^2.1.10",
 "swagger-router": "^0.4.6",
 "node-rdkafka": "^0.6.0",
-"wikipedia-edits-scorer": "^1.2.0"
+"wikipedia-edits-scorer": "^1.4.0"
   },
   "devDependencies": {
 "extend": "^3.0.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d98e873fe5352a9dbd9a038d11227f816f4d190
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/trending-edits
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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]: Config: Escape quotes in keys

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327501 )

Change subject: Config: Escape quotes in keys
..


Config: Escape quotes in keys

Bug: T147634
Change-Id: If5c679a2b21ac9add5205d040ab4e410752918f2
---
M scap/templates/config.yaml.j2
M scap/vars.yaml
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index d050bcc..55b873b 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -58,13 +58,13 @@
   jwt:
 algorithms:
   - HS256
-secret: "<%= jwt_token %>"
+secret: "<%= jwt_token.replace("\"", "\\\"") %>"
   mt:
 apertium:
   api: "<%= apertium_uri %>"
 yandex:
   api: https://translate.yandex.net
-  key: "<%= yandex_key %>"
+  key: "<%= yandex_key.replace("\"", "\\\"") %>"
 youdao:
   api: https://fanyi.youdao.com/paidapi/fanyiapi
-  key: "<%= youdao_key %>"
+  key: "<%= youdao_key.replace("\"", "\\\"") %>"
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 646a6bb..51f4eab 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -1,7 +1,7 @@
 # log-related variables
 logstash_host: localhost
 logstash_port: 12201
-log_file: /tmp/citoid.log
+log_file: /tmp/cxserver.log
 # metrics
 metrics_host: localhost
 metrics_port: 8125

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5c679a2b21ac9add5205d040ab4e410752918f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: KartikMistry 
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]: Config: Escape quotes in keys

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327501 )

Change subject: Config: Escape quotes in keys
..

Config: Escape quotes in keys

Bug: T147634
Change-Id: If5c679a2b21ac9add5205d040ab4e410752918f2
---
M scap/templates/config.yaml.j2
M scap/vars.yaml
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver/deploy 
refs/changes/01/327501/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index d050bcc..55b873b 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -58,13 +58,13 @@
   jwt:
 algorithms:
   - HS256
-secret: "<%= jwt_token %>"
+secret: "<%= jwt_token.replace("\"", "\\\"") %>"
   mt:
 apertium:
   api: "<%= apertium_uri %>"
 yandex:
   api: https://translate.yandex.net
-  key: "<%= yandex_key %>"
+  key: "<%= yandex_key.replace("\"", "\\\"") %>"
 youdao:
   api: https://fanyi.youdao.com/paidapi/fanyiapi
-  key: "<%= youdao_key %>"
+  key: "<%= youdao_key.replace("\"", "\\\"") %>"
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 646a6bb..51f4eab 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -1,7 +1,7 @@
 # log-related variables
 logstash_host: localhost
 logstash_port: 12201
-log_file: /tmp/citoid.log
+log_file: /tmp/cxserver.log
 # metrics
 metrics_host: localhost
 metrics_port: 8125

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5c679a2b21ac9add5205d040ab4e410752918f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver/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]: Use Scap3 to deploy the config

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/321861 )

Change subject: Use Scap3 to deploy the config
..


Use Scap3 to deploy the config

Bug: T147634
Depends-On: I235196977204d107e92bf60319867895bd81849f
Change-Id: I2a765cd3bef688bac87c4e99b84d18faa7cd9c4e
---
A scap/config-files.yaml
A scap/environments/beta/vars.yaml
M scap/scap.cfg
A scap/templates/config.yaml.j2
A scap/vars.yaml
5 files changed, 96 insertions(+), 1 deletion(-)

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



diff --git a/scap/config-files.yaml b/scap/config-files.yaml
new file mode 100644
index 000..7cf387d
--- /dev/null
+++ b/scap/config-files.yaml
@@ -0,0 +1,5 @@
+---
+/etc/cxserver/config.yaml:
+  template: config.yaml.j2
+  erb_syntax: True
+  remote_vars: /etc/cxserver/config-vars.yaml
diff --git a/scap/environments/beta/vars.yaml b/scap/environments/beta/vars.yaml
new file mode 100644
index 000..4ad3c24
--- /dev/null
+++ b/scap/environments/beta/vars.yaml
@@ -0,0 +1 @@
+registry: registry.yaml
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 5a25891..61f19a5 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -10,11 +10,13 @@
 service_name: cxserver
 service_port: 8080
 lock_file: /tmp/scap.cxserver.lock
+config_deploy: True
 
 [wmnet]
-git_server: deployment.eqiad.wmnet
+git_server: tin.eqiad.wmnet
 
 [deployment-prep.eqiad.wmflabs]
 git_server: deployment-tin.deployment-prep.eqiad.wmflabs
+environment: beta
 server_groups: default
 dsh_targets: betacluster-targets
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
new file mode 100644
index 000..d050bcc
--- /dev/null
+++ b/scap/templates/config.yaml.j2
@@ -0,0 +1,70 @@
+# 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
+
+# Logger info
+logging:
+  level: warn
+  name: cxserver
+  streams:
+- host: <%= logstash_host %>
+  port: <%= logstash_port %>
+  type: gelf
+- level: info
+  path: <%= log_file %>
+  type: file
+
+# Statsd metrics reporter
+metrics:
+  name: cxserver
+  host: <%= metrics_host %>
+  port: <%= metrics_port %>
+  type: statsd
+
+services:
+  - name: cxserver
+module: src/app.js
+conf:
+  cors: "*"
+  port: <%= port %>
+  user_agent: CXServer/WMF
+  mwapi_req:
+body: "{{ default(request.query, {}) }}"
+headers:
+  host: "{{request.params.domain}}"
+  user-agent: "{{user-agent}}"
+method: post
+uri: <%= mwapi_uri %>
+  restbase_req:
+body: "{{request.body}}"
+headers: "{{request.headers}}"
+method: "{{request.method}}"
+query: "{{ default(request.query, {}) }}"
+uri: <%= restbase_uri %>/{{domain}}/v1/{+path}
+  no_proxy_list:
+- eqiad.wmnet
+- codfw.wmnet
+  proxy: <%= proxy if proxy else '' %>
+  registry: <%= registry %>
+  jwt:
+algorithms:
+  - HS256
+secret: "<%= jwt_token %>"
+  mt:
+apertium:
+  api: "<%= apertium_uri %>"
+yandex:
+  api: https://translate.yandex.net
+  key: "<%= yandex_key %>"
+youdao:
+  api: https://fanyi.youdao.com/paidapi/fanyiapi
+  key: "<%= youdao_key %>"
diff --git a/scap/vars.yaml b/scap/vars.yaml
new file mode 100644
index 000..646a6bb
--- /dev/null
+++ b/scap/vars.yaml
@@ -0,0 +1,17 @@
+# log-related variables
+logstash_host: localhost
+logstash_port: 12201
+log_file: /tmp/citoid.log
+# metrics
+metrics_host: localhost
+metrics_port: 8125
+# service
+port: 8080
+mwapi_uri: https://{{domain}}/w/api.php
+restbase_uri: http://localhost:7231
+proxy:
+registry: registry.wikimedia.yaml
+jwt_token: abcdef
+apertium_uri: http://localhost:2737
+yandex_key: abcdefg
+youdao_key: abcdefg

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a765cd3bef688bac87c4e99b84d18faa7cd9c4e
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/services/cxserver/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: Mobrovac 
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...trending-edits[master]: Minor: use msg.meta.topic instead of parsing it out from kaf...

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327217 )

Change subject: Minor: use msg.meta.topic instead of parsing it out from 
kafkaMessage
..


Minor: use msg.meta.topic instead of parsing it out from kafkaMessage

Change-Id: I58ceb0de85a1f5fce735104d3c25bbf856dc0f97
---
M lib/edit-stream.js
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/lib/edit-stream.js b/lib/edit-stream.js
index 3a51f13..a90cb24 100644
--- a/lib/edit-stream.js
+++ b/lib/edit-stream.js
@@ -103,8 +103,7 @@
 
 try {
 let msg = JSON.parse(kafkaMessage.value.toString());
-const pureTopic = 
kafkaMessage.topic.substr(kafkaMessage.topic.indexOf('.') + 1);
-const skip = COMMIT_PUSH_SKIP[pureTopic];
+const skip = COMMIT_PUSH_SKIP[msg.meta.topic];
 if (!skip || kafkaMessage.offset % skip === 0) {
 this._commitQueue.push({
 message: kafkaMessage,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58ceb0de85a1f5fce735104d3c25bbf856dc0f97
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/trending-edits
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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...trending-edits[master]: Temporarily switch to non-flowing mode.

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327378 )

Change subject: Temporarily switch to non-flowing mode.
..


Temporarily switch to non-flowing mode.

Bug: T153122
Change-Id: Ie81da4e5e4838be2c1697e4fc4d19dfd83995891
---
M lib/edit-stream.js
1 file changed, 29 insertions(+), 26 deletions(-)

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



diff --git a/lib/edit-stream.js b/lib/edit-stream.js
index 719d9d6..3a51f13 100644
--- a/lib/edit-stream.js
+++ b/lib/edit-stream.js
@@ -90,33 +90,36 @@
 this._consumer.connect();
 this._consumer
 .on('ready', () => {
-this._consumer.consume(this._consumeTopics, (e, kafkaMessage) => {
-if (e) {
-return this.emit('error', e);
-}
+this._consumer.subscribe(this._consumeTopics);
+const consume = () => {
+this._consumer.consume((e, kafkaMessage) => {
+if (e) {
+if (e.code !== kafka.CODES.ERRORS.ERR__PARTITION_EOF
+&& e.code !== 
kafka.CODES.ERRORS.ERR__TIMED_OUT) {
+this.emit('error', e);
+}
+return consume();
+}
 
-let msg;
-try {
-msg = JSON.parse(kafkaMessage.value.toString());
-} catch (e) {
-return this.emit('error', e);
-}
-
-const pureTopic = 
kafkaMessage.topic.substr(kafkaMessage.topic.indexOf('.') + 1);
-const skip = COMMIT_PUSH_SKIP[pureTopic];
-if (!skip || kafkaMessage.offset % skip === 0) {
-this._commitQueue.push({
-message: kafkaMessage,
-timestamp: msg.meta.dt
-});
-}
-
-try {
-this.emit('edit', msg);
-} catch (e) {
-this.emit('error', e);
-}
-});
+try {
+let msg = JSON.parse(kafkaMessage.value.toString());
+const pureTopic = 
kafkaMessage.topic.substr(kafkaMessage.topic.indexOf('.') + 1);
+const skip = COMMIT_PUSH_SKIP[pureTopic];
+if (!skip || kafkaMessage.offset % skip === 0) {
+this._commitQueue.push({
+message: kafkaMessage,
+timestamp: msg.meta.dt
+});
+}
+this.emit('edit', msg);
+} catch (e) {
+this.emit('error', e);
+} finally {
+consume();
+}
+});
+};
+consume();
 });
 this._commitQueue = [];
 this._commitInterval = setInterval(() => {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie81da4e5e4838be2c1697e4fc4d19dfd83995891
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/trending-edits
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mobrovac 
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]: Update change-propagation to f3eab4f

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327476 )

Change subject: Update change-propagation to f3eab4f
..


Update change-propagation to f3eab4f

List of changes:
f3eab4f Temporarily disable the GuaranteedProducer
xxx Update node module dependencies

Change-Id: Ic18b5560b745ece0fa2b806183a613551a55467f
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
D 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
A 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
M 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
M 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M src
8 files changed, 41 insertions(+), 26 deletions(-)

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



diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 1f0d6c1..06f9d36 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "87057c67bb058b9f428c3aed1d02000d41c24bf9",
+  "_shasum": "84107e00f7341bb701f9462c1a2f3ee74ae45766",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git 
a/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
 
b/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
deleted file mode 100644
index c2bd1e5..000
--- 
a/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Public Domain
-
-The person who associated a work with this deed has dedicated the work to the
-public domain by waiving all of his or her rights to the work worldwide under
-copyright law, including all related and neighboring rights, to the extent
-allowed by law.
-
-You can copy, modify, distribute and perform the work, even for commercial
-purposes, all without asking permission.
diff --git 
a/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
 
b/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
new file mode 100644
index 000..cf1ab25
--- /dev/null
+++ 
b/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to 
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update change-propagation to f3eab4f

2016-12-15 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327476 )

Change subject: Update change-propagation to f3eab4f
..

Update change-propagation to f3eab4f

List of changes:
f3eab4f Temporarily disable the GuaranteedProducer
xxx Update node module dependencies

Change-Id: Ic18b5560b745ece0fa2b806183a613551a55467f
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
D 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
A 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
M 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
M 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M src
8 files changed, 41 insertions(+), 26 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/76/327476/1

diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 1f0d6c1..06f9d36 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "87057c67bb058b9f428c3aed1d02000d41c24bf9",
+  "_shasum": "84107e00f7341bb701f9462c1a2f3ee74ae45766",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git 
a/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
 
b/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
deleted file mode 100644
index c2bd1e5..000
--- 
a/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Public Domain
-
-The person who associated a work with this deed has dedicated the work to the
-public domain by waiving all of his or her rights to the work worldwide under
-copyright law, including all related and neighboring rights, to the extent
-allowed by law.
-
-You can copy, modify, distribute and perform the work, even for commercial
-purposes, all without asking permission.
diff --git 
a/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
 
b/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
new file mode 100644
index 000..cf1ab25
--- /dev/null
+++ 
b/node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to 
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...trending-edits[master]: Minor: use msg.meta.topic instead of parsing it out from kaf...

2016-12-14 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327217 )

Change subject: Minor: use msg.meta.topic instead of parsing it out from 
kafkaMessage
..

Minor: use msg.meta.topic instead of parsing it out from kafkaMessage

Change-Id: I58ceb0de85a1f5fce735104d3c25bbf856dc0f97
---
M lib/edit-stream.js
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits 
refs/changes/17/327217/1

diff --git a/lib/edit-stream.js b/lib/edit-stream.js
index 719d9d6..95423e5 100644
--- a/lib/edit-stream.js
+++ b/lib/edit-stream.js
@@ -102,8 +102,7 @@
 return this.emit('error', e);
 }
 
-const pureTopic = 
kafkaMessage.topic.substr(kafkaMessage.topic.indexOf('.') + 1);
-const skip = COMMIT_PUSH_SKIP[pureTopic];
+const skip = COMMIT_PUSH_SKIP[msg.meta.topic];
 if (!skip || kafkaMessage.offset % skip === 0) {
 this._commitQueue.push({
 message: kafkaMessage,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58ceb0de85a1f5fce735104d3c25bbf856dc0f97
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits
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]: Update trending-edits to b15b8ce

2016-12-14 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327213 )

Change subject: Update trending-edits to b15b8ce
..


Update trending-edits to b15b8ce

List of changes:
b15b8ce Use the message's original TS for commit calculation
xxx Update node module dependencies

Change-Id: Ia1de9447618ccc18056eaecdb12ba8a35adaa5cc
---
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M src
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index d6e25c9..9a43046 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "86d8a3f56b45e4f22ba611ec924d2025daf2e937",
+  "_shasum": "1c9f6c1fcca6ddd6016787cc09dd7593b3a49551",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/src b/src
index a0ccc3f..b15b8ce 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit a0ccc3f6859c49404aeff31bae3033d576e6b0bf
+Subproject commit b15b8cebfd922a35a2fbbaa975eb69aa9d68

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1de9447618ccc18056eaecdb12ba8a35adaa5cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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]: Update trending-edits to b15b8ce

2016-12-14 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327213 )

Change subject: Update trending-edits to b15b8ce
..

Update trending-edits to b15b8ce

List of changes:
b15b8ce Use the message's original TS for commit calculation
xxx Update node module dependencies

Change-Id: Ia1de9447618ccc18056eaecdb12ba8a35adaa5cc
---
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M src
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/13/327213/1

diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index d6e25c9..9a43046 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "86d8a3f56b45e4f22ba611ec924d2025daf2e937",
+  "_shasum": "1c9f6c1fcca6ddd6016787cc09dd7593b3a49551",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/src b/src
index a0ccc3f..b15b8ce 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit a0ccc3f6859c49404aeff31bae3033d576e6b0bf
+Subproject commit b15b8cebfd922a35a2fbbaa975eb69aa9d68

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1de9447618ccc18056eaecdb12ba8a35adaa5cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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...trending-edits[master]: Use the message's original TS for commit calculation

2016-12-14 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327212 )

Change subject: Use the message's original TS for commit calculation
..


Use the message's original TS for commit calculation

Because the service needs to replay the events from the last hour on
start-up, we hold off committing the offset to Kafka. However, we should
do so an hour after the message has been produced, not an hour after we
have read it.

Bug: T153122
Change-Id: Ie274e3fed9552ce6e4ab079e52543691cf02e58a
---
M lib/edit-stream.js
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/lib/edit-stream.js b/lib/edit-stream.js
index be695ff..719d9d6 100644
--- a/lib/edit-stream.js
+++ b/lib/edit-stream.js
@@ -95,17 +95,24 @@
 return this.emit('error', e);
 }
 
+let msg;
+try {
+msg = JSON.parse(kafkaMessage.value.toString());
+} catch (e) {
+return this.emit('error', e);
+}
+
 const pureTopic = 
kafkaMessage.topic.substr(kafkaMessage.topic.indexOf('.') + 1);
 const skip = COMMIT_PUSH_SKIP[pureTopic];
 if (!skip || kafkaMessage.offset % skip === 0) {
 this._commitQueue.push({
 message: kafkaMessage,
-timestamp: Date.now()
+timestamp: msg.meta.dt
 });
 }
 
 try {
-this.emit('edit', 
JSON.parse(kafkaMessage.value.toString()));
+this.emit('edit', msg);
 } catch (e) {
 this.emit('error', e);
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie274e3fed9552ce6e4ab079e52543691cf02e58a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/trending-edits
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 
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...trending-edits[master]: Use the message's original TS for commit calculation.

2016-12-14 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327212 )

Change subject: Use the message's original TS for commit calculation.
..

Use the message's original TS for commit calculation.

Because the service needs to replay the events from the last hour on
start-up, we hold off committing the offset to Kafka. However, we should
do so an hour after the message has been produced, not an hour after we
have read it.

Bug: T153122
Change-Id: Ie274e3fed9552ce6e4ab079e52543691cf02e58a
---
M lib/edit-stream.js
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits 
refs/changes/12/327212/1

diff --git a/lib/edit-stream.js b/lib/edit-stream.js
index be695ff..719d9d6 100644
--- a/lib/edit-stream.js
+++ b/lib/edit-stream.js
@@ -95,17 +95,24 @@
 return this.emit('error', e);
 }
 
+let msg;
+try {
+msg = JSON.parse(kafkaMessage.value.toString());
+} catch (e) {
+return this.emit('error', e);
+}
+
 const pureTopic = 
kafkaMessage.topic.substr(kafkaMessage.topic.indexOf('.') + 1);
 const skip = COMMIT_PUSH_SKIP[pureTopic];
 if (!skip || kafkaMessage.offset % skip === 0) {
 this._commitQueue.push({
 message: kafkaMessage,
-timestamp: Date.now()
+timestamp: msg.meta.dt
 });
 }
 
 try {
-this.emit('edit', 
JSON.parse(kafkaMessage.value.toString()));
+this.emit('edit', msg);
 } catch (e) {
 this.emit('error', e);
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie274e3fed9552ce6e4ab079e52543691cf02e58a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits
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]: Update trending-edits to a0ccc3f

2016-12-14 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327168 )

Change subject: Update trending-edits to a0ccc3f
..


Update trending-edits to a0ccc3f

List of changes:
a0ccc3f Added trace loggin to be able to do sampled logging
xxx Config: Add sample logging
xxx Update node module dependencies

Bug: T153122
Change-Id: Idaf17b14b43ffdf1ec225b4ed2925f7809d37b3d
---
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M scap/templates/config.yaml.j2
M src
3 files changed, 7 insertions(+), 4 deletions(-)

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



diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index fb2fd69..d6e25c9 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "0e61234c993983babb458a4e3af2423b2ac405cf",
+  "_shasum": "86d8a3f56b45e4f22ba611ec924d2025daf2e937",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 93f7734..b212398 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -15,7 +15,10 @@
 logging:
   level: warn
   name: trendingedits
-  streams: 
+  sampled_levels:
+# log ~1 event per minute @10 events/s
+trace/event: 0.002
+  streams:
 - host: <%= logstash_host %>
   port: <%= logstash_port %>
   type: gelf
@@ -24,7 +27,7 @@
   type: file
 
 # Statsd metrics reporter
-metrics: 
+metrics:
   name: trendingedits
   host: <%= metrics_host %>
   port: <%= metrics_port %>
diff --git a/src b/src
index b20f37e..a0ccc3f 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit b20f37ef0af01ac533563fdd9c1186612463d81a
+Subproject commit a0ccc3f6859c49404aeff31bae3033d576e6b0bf

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idaf17b14b43ffdf1ec225b4ed2925f7809d37b3d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/trending-edits/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]: Update trending-edits to a0ccc3f

2016-12-14 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327168 )

Change subject: Update trending-edits to a0ccc3f
..

Update trending-edits to a0ccc3f

List of changes:
a0ccc3f Added trace loggin to be able to do sampled logging
xxx Config: Add sample logging
xxx Update node module dependencies

Change-Id: Idaf17b14b43ffdf1ec225b4ed2925f7809d37b3d
---
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M scap/templates/config.yaml.j2
M src
3 files changed, 5 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/68/327168/1

diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index fb2fd69..d6e25c9 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "0e61234c993983babb458a4e3af2423b2ac405cf",
+  "_shasum": "86d8a3f56b45e4f22ba611ec924d2025daf2e937",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 93f7734..f00d67e 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -15,6 +15,9 @@
 logging:
   level: warn
   name: trendingedits
+  sampled_levels:
+# log ~1 request per minute @10 req/s
+trace/event: 0.002
   streams: 
 - host: <%= logstash_host %>
   port: <%= logstash_port %>
diff --git a/src b/src
index b20f37e..a0ccc3f 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit b20f37ef0af01ac533563fdd9c1186612463d81a
+Subproject commit a0ccc3f6859c49404aeff31bae3033d576e6b0bf

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idaf17b14b43ffdf1ec225b4ed2925f7809d37b3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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...trending-edits[master]: Added trace loggin to be able to do sampled logging

2016-12-14 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327045 )

Change subject: Added trace loggin to be able to do sampled logging
..


Added trace loggin to be able to do sampled logging

Change-Id: Ia0d7f24be68a04b1b8e2df97fb4991b936c6b94a
---
M app.js
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/app.js b/app.js
index e63977b..0a9cfb3 100644
--- a/app.js
+++ b/app.js
@@ -199,6 +199,11 @@
 const editStream = new EditStream(app.conf);
 editStream.on('edit', (message) => {
 if (processor.process(message)) {
+app.logger.log('trace/event', () => ({
+msg: 'Event processed',
+event: JSON.stringify(message)
+}));
+app.metrics.endTiming(`${message.meta.topic}.delay`, new 
Date(message.meta.dt));
 eventsSincePurge++;
 }
 if (eventsSincePurge > app.conf.purge_period) {
@@ -206,7 +211,6 @@
 processor.purge(new Date(), app.conf.purge_strategy);
 app.metrics.increment('purge');
 }
-app.metrics.endTiming(`${message.meta.topic}.delay`, new 
Date(message.meta.dt));
 });
 editStream.on('error', (e) => {
 app.logger.log('error/edit_stream', 'Error in edit stream: ' + e);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0d7f24be68a04b1b8e2df97fb4991b936c6b94a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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]: Update trending-edits to b20f37e

2016-12-13 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327021 )

Change subject: Update trending-edits to b20f37e
..


Update trending-edits to b20f37e

List of changes:
b20f37e Fixed metrics reporting
xxx Update node module dependencies

Change-Id: I0c241a62a9e62409d9b90175c18e16b2417be9dc
---
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M src
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index cf4ed3d..fb2fd69 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "58659e6e23bcb01e77dfa39f00f9ae762644aa06",
+  "_shasum": "0e61234c993983babb458a4e3af2423b2ac405cf",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/src b/src
index e790596..b20f37e 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit e7905967a5345c798b582c803ebf0e84ae2d9d4a
+Subproject commit b20f37ef0af01ac533563fdd9c1186612463d81a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c241a62a9e62409d9b90175c18e16b2417be9dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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]: Update trending-edits to b20f37e

2016-12-13 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327021 )

Change subject: Update trending-edits to b20f37e
..

Update trending-edits to b20f37e

List of changes:
b20f37e Fixed metrics reporting
xxx Update node module dependencies

Change-Id: I0c241a62a9e62409d9b90175c18e16b2417be9dc
---
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M src
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/21/327021/1

diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index cf4ed3d..fb2fd69 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "58659e6e23bcb01e77dfa39f00f9ae762644aa06",
+  "_shasum": "0e61234c993983babb458a4e3af2423b2ac405cf",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/src b/src
index e790596..b20f37e 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit e7905967a5345c798b582c803ebf0e84ae2d9d4a
+Subproject commit b20f37ef0af01ac533563fdd9c1186612463d81a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c241a62a9e62409d9b90175c18e16b2417be9dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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]: Config: remove the unused trending_period stanza

2016-12-13 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326961 )

Change subject: Config: remove the unused trending_period stanza
..


Config: remove the unused trending_period stanza

Change-Id: Ic8504ce592690a106cabbb52e54293555d9f7202
---
M scap/templates/config.yaml.j2
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index ff024e6..93f7734 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -83,8 +83,6 @@
 max_age: 60
 # minimum speed in edits per minute that a page is kept around
 min_speed: 0.1
-  # calculate trending for one hour
-  trending_period: 3600
   # the number of edits needed to take a page into account
   min_edits: <%= min_edits %>
   # the list of Kafka brokers to contact

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8504ce592690a106cabbb52e54293555d9f7202
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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]: Config: remove the unused trending_period stanza

2016-12-13 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326961 )

Change subject: Config: remove the unused trending_period stanza
..

Config: remove the unused trending_period stanza

Change-Id: Ic8504ce592690a106cabbb52e54293555d9f7202
---
M scap/templates/config.yaml.j2
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/61/326961/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index ff024e6..93f7734 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -83,8 +83,6 @@
 max_age: 60
 # minimum speed in edits per minute that a page is kept around
 min_speed: 0.1
-  # calculate trending for one hour
-  trending_period: 3600
   # the number of edits needed to take a page into account
   min_edits: <%= min_edits %>
   # the list of Kafka brokers to contact

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8504ce592690a106cabbb52e54293555d9f7202
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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]: Update trending-edits to e790596

2016-12-13 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326960 )

Change subject: Update trending-edits to e790596
..


Update trending-edits to e790596

List of changes:
e790596 Added simple metrics reporting.
xxx Update node module dependencies

Change-Id: I15584496f0b4788e850efda74f9e805e31e94576
---
D 
node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
A 
node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
M 
node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
M 
node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M node_modules/wikipedia-edits-scorer/index.js
M node_modules/wikipedia-edits-scorer/package.json
M node_modules/wikipedia-edits-scorer/tests/examples.js
M node_modules/wikipedia-edits-scorer/tests/test_scoring.js
M src
10 files changed, 62 insertions(+), 35 deletions(-)

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



diff --git 
a/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
 
b/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
deleted file mode 100644
index c2bd1e5..000
--- 
a/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Public Domain
-
-The person who associated a work with this deed has dedicated the work to the
-public domain by waiving all of his or her rights to the work worldwide under
-copyright law, including all related and neighboring rights, to the extent
-allowed by law.
-
-You can copy, modify, distribute and perform the work, even for commercial
-purposes, all without asking permission.
diff --git 
a/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
 
b/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
new file mode 100644
index 000..cf1ab25
--- /dev/null
+++ 
b/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to 
diff --git 
a/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
 
b/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
index e83ec05..964e7dc 100644
--- 
a/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
+++ 
b/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
@@ -18,7 +18,7 @@
 
 export interface secretbox {
 (msg: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array;
-open(box: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array;
+open(box: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array 
| false;
 readonly keyLength: number;
 readonly nonceLength: number;
 readonly overheadLength: number;
@@ -33,8 +33,8 @@
 
 namespace box {
 export interface open {
-(msg: Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, 
secretKey: Uint8Array): Uint8Array;

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update trending-edits to e790596

2016-12-13 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326960 )

Change subject: Update trending-edits to e790596
..

Update trending-edits to e790596

List of changes:
e790596 Added simple metrics reporting.
xxx Update node module dependencies

Change-Id: I15584496f0b4788e850efda74f9e805e31e94576
---
D 
node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
A 
node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
M 
node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
M 
node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M node_modules/wikipedia-edits-scorer/index.js
M node_modules/wikipedia-edits-scorer/package.json
M node_modules/wikipedia-edits-scorer/tests/examples.js
M node_modules/wikipedia-edits-scorer/tests/test_scoring.js
M src
10 files changed, 62 insertions(+), 35 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/60/326960/1

diff --git 
a/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
 
b/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
deleted file mode 100644
index c2bd1e5..000
--- 
a/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Public Domain
-
-The person who associated a work with this deed has dedicated the work to the
-public domain by waiving all of his or her rights to the work worldwide under
-copyright law, including all related and neighboring rights, to the extent
-allowed by law.
-
-You can copy, modify, distribute and perform the work, even for commercial
-purposes, all without asking permission.
diff --git 
a/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
 
b/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
new file mode 100644
index 000..cf1ab25
--- /dev/null
+++ 
b/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to 
diff --git 
a/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
 
b/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
index e83ec05..964e7dc 100644
--- 
a/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
+++ 
b/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
@@ -18,7 +18,7 @@
 
 export interface secretbox {
 (msg: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array;
-open(box: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array;
+open(box: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array 
| false;
 readonly keyLength: number;
 readonly nonceLength: number;
 readonly overheadLength: number;
@@ -33,8 +33,8 @@
 
 namespace box {
 export interface open {
-(msg: Uint8Array, nonce: Uint8Array, publicKey: 

[MediaWiki-commits] [Gerrit] mediawiki...trending-edits[master]: Added simple metrics reporting.

2016-12-13 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326535 )

Change subject: Added simple metrics reporting.
..


Added simple metrics reporting.

We can't deploy the service to production without having
any insight in how it works. This patch adds 3 important metrics:
- Event consumption deplay.
- Reporting the size of the internal pages store.
- Reporting each call to purge.

Change-Id: I896b6b8667ef9f6167ea8214ae46f0c6ecfa2c69
---
M app.js
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/app.js b/app.js
index 28b7746..d1a9630 100644
--- a/app.js
+++ b/app.js
@@ -32,6 +32,9 @@
 app.metrics = options.metrics;  // the metrics
 app.conf = options.config;  // this app's config options
 app.info = packageInfo; // this app's package info
+app._metricsReporter = setInterval(() => {
+app.metrics.gauge('processor.size', processor.getPages().length);
+}, 1000);
 
 // ensure some sane defaults
 if (!app.conf.port) { app.conf.port = ; }
@@ -201,12 +204,17 @@
 if (eventsSincePurge > app.conf.purge_period) {
 eventsSincePurge = 0;
 processor.purge(new Date(), app.conf.purge_strategy);
+app.metrics.count('purge');
 }
+app.metrics.endTiming(`${message.meta.topic}.delay`, new 
Date(message.meta.dt));
 });
 editStream.on('error', (e) => {
 app.logger.log('error/edit_stream', 'Error in edit stream: ' + e);
 });
-process.on('exit', () => editStream.close());
+process.on('exit', () => {
+clearInterval(app._metricsReporter);
+editStream.close();
+});
 return app;
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I896b6b8667ef9f6167ea8214ae46f0c6ecfa2c69
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/trending-edits
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mobrovac 
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]: Update restbase to 39d3478

2016-12-13 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326951 )

Change subject: Update restbase to 39d3478
..


Update restbase to 39d3478

List of changes:
15bb2da Implemented a WIP trending endpoint
bc0837b Updated to the latest trending schema
8ffe506 Fixed linting errors and tests
51d4dbd Set the actual trending URI
6ffa158 Added tests for trending endpoint
5c4ea19 Removed date component and storage for trending edits
a147743 Increased trending cache-control and separated enwiki
0b91c10 Added 'editors' property
ab3f34d Resurrect announcements on domains other then en.wiki since we don't 
know how would it behave
39d3478 Release v0.16.2
xxx Update node module dependencies

Change-Id: Ie05fef27c49a9476225f4241e23d4b87ccb35524
---
M node_modules/content-type/package.json
M node_modules/heapdump/build/Makefile
M 
node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
M node_modules/heapdump/build/addon.target.mk
M node_modules/heapdump/build/config.gypi
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
D 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
A 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
M 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
M 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/json-stable-stringify/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
M node_modules/service-runner/lib/logger.js
M node_modules/service-runner/lib/master.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M node_modules/service-runner/package.json
M restbase
18 files changed, 126 insertions(+), 91 deletions(-)

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



diff --git a/node_modules/content-type/package.json 
b/node_modules/content-type/package.json
index ca63b83..10689db 100644
--- a/node_modules/content-type/package.json
+++ b/node_modules/content-type/package.json
@@ -44,7 +44,7 @@
   },
   "homepage": "https://github.com/jshttp/content-type#readme;,
   "_id": "content-type@1.0.1",
-  "_shasum": "387ae43872e37959fa3a73ec62d7b84f5a212703",
+  "_shasum": "41eb82f0aea6308e6d64ce4c5c8f4f4461fd33c2",
   "_from": "git+https://github.com/wikimedia/content-type.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/content-type.git#47b2632d0a2ee79a7d67268e2f6621becd95d05b;
 }
diff --git a/node_modules/heapdump/build/Makefile 
b/node_modules/heapdump/build/Makefile
index 285e8ee..c9d9d51 100644
--- a/node_modules/heapdump/build/Makefile
+++ b/node_modules/heapdump/build/Makefile
@@ -308,8 +308,8 @@
 endif
 
 quiet_cmd_regen_makefile = ACTION Regenerating $@
-cmd_regen_makefile = cd $(srcdir); 
/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
 -fmake --ignore-environment "--toplevel-dir=." 
-I/opt/service/node_modules/heapdump/build/config.gypi 
-I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 -I/root/.node-gyp/4.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." 
"--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" 
"-Dnode_root_dir=/root/.node-gyp/4.6.0" 
"-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp"
 "-Dnode_lib_file=node.lib" 
"-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp
-Makefile: 
$(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 $(srcdir)/build/config.gypi $(srcdir)/binding.gyp 
$(srcdir)/../../../../root/.node-gyp/4.6.0/include/node/common.gypi
+cmd_regen_makefile = cd $(srcdir); 
/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
 -fmake --ignore-environment "--toplevel-dir=." 
-I/opt/service/node_modules/heapdump/build/config.gypi 
-I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 -I/home/runuser/.node-gyp/4.6.0/include/node/common.gypi "--depth=." 
"-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" 
"-Dvisibility=default" "-Dnode_root_dir=/home/runuser/.node-gyp/4.6.0" 
"-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp"
 "-Dnode_lib_file=node.lib" 
"-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp
+Makefile: 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to 39d3478

2016-12-13 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326951 )

Change subject: Update restbase to 39d3478
..

Update restbase to 39d3478

List of changes:
15bb2da Implemented a WIP trending endpoint
bc0837b Updated to the latest trending schema
8ffe506 Fixed linting errors and tests
51d4dbd Set the actual trending URI
6ffa158 Added tests for trending endpoint
5c4ea19 Removed date component and storage for trending edits
a147743 Increased trending cache-control and separated enwiki
0b91c10 Added 'editors' property
ab3f34d Resurrect announcements on domains other then en.wiki since we don't 
know how would it behave
39d3478 Release v0.16.2
xxx Update node module dependencies

Change-Id: Ie05fef27c49a9476225f4241e23d4b87ccb35524
---
M node_modules/content-type/package.json
M node_modules/heapdump/build/Makefile
M 
node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
M node_modules/heapdump/build/addon.target.mk
M node_modules/heapdump/build/config.gypi
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
D 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
A 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/LICENSE
M 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.d.ts
M 
node_modules/hyperswitch/node_modules/preq/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/json-stable-stringify/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
M node_modules/service-runner/lib/logger.js
M node_modules/service-runner/lib/master.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M node_modules/service-runner/package.json
M restbase
18 files changed, 126 insertions(+), 91 deletions(-)


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

diff --git a/node_modules/content-type/package.json 
b/node_modules/content-type/package.json
index ca63b83..10689db 100644
--- a/node_modules/content-type/package.json
+++ b/node_modules/content-type/package.json
@@ -44,7 +44,7 @@
   },
   "homepage": "https://github.com/jshttp/content-type#readme;,
   "_id": "content-type@1.0.1",
-  "_shasum": "387ae43872e37959fa3a73ec62d7b84f5a212703",
+  "_shasum": "41eb82f0aea6308e6d64ce4c5c8f4f4461fd33c2",
   "_from": "git+https://github.com/wikimedia/content-type.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/content-type.git#47b2632d0a2ee79a7d67268e2f6621becd95d05b;
 }
diff --git a/node_modules/heapdump/build/Makefile 
b/node_modules/heapdump/build/Makefile
index 285e8ee..c9d9d51 100644
--- a/node_modules/heapdump/build/Makefile
+++ b/node_modules/heapdump/build/Makefile
@@ -308,8 +308,8 @@
 endif
 
 quiet_cmd_regen_makefile = ACTION Regenerating $@
-cmd_regen_makefile = cd $(srcdir); 
/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
 -fmake --ignore-environment "--toplevel-dir=." 
-I/opt/service/node_modules/heapdump/build/config.gypi 
-I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 -I/root/.node-gyp/4.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." 
"--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" 
"-Dnode_root_dir=/root/.node-gyp/4.6.0" 
"-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp"
 "-Dnode_lib_file=node.lib" 
"-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp
-Makefile: 
$(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 $(srcdir)/build/config.gypi $(srcdir)/binding.gyp 
$(srcdir)/../../../../root/.node-gyp/4.6.0/include/node/common.gypi
+cmd_regen_makefile = cd $(srcdir); 
/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
 -fmake --ignore-environment "--toplevel-dir=." 
-I/opt/service/node_modules/heapdump/build/config.gypi 
-I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 -I/home/runuser/.node-gyp/4.6.0/include/node/common.gypi "--depth=." 
"-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" 
"-Dvisibility=default" "-Dnode_root_dir=/home/runuser/.node-gyp/4.6.0" 
"-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp"
 "-Dnode_lib_file=node.lib" 
"-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp
+Makefile: 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: EventBus Proxy: Ensure the syslog output file is readable

2016-12-13 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326942 )

Change subject: EventBus Proxy: Ensure the syslog output file is readable
..

EventBus Proxy: Ensure the syslog output file is readable

Bug: T153028
Change-Id: Ica22e4d1db937527676d85fd03a4071adbf2c623
---
M modules/eventlogging/manifests/service/service.pp
M modules/role/manifests/eventbus/eventbus.pp
2 files changed, 17 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/326942/1

diff --git a/modules/eventlogging/manifests/service/service.pp 
b/modules/eventlogging/manifests/service/service.pp
index f3148a6..cc7a9ec 100644
--- a/modules/eventlogging/manifests/service/service.pp
+++ b/modules/eventlogging/manifests/service/service.pp
@@ -103,15 +103,21 @@
 default => $_log_file,
 }
 
+# ensure the rsyslog log file has sane permisions
+file { $_log_file:
+ensure  => present,
+replace => false,
+content => '',
+owner   => 'eventlogging',
+group   => 'eventlogging',
+mode=> '0644',
+before  => Rsyslog::Conf[$service_name],
+}
 # Rsyslog configuration that routes logs to a file.
-file { "/etc/rsyslog.d/80-${service_name}.conf":
-# FIXME - top-scope var without namespace, will break in puppet 2.8
-# lint:ignore:variable_scope
-ensure  => $ensure,
-# lint:endignore
-content => template('eventlogging/rsyslog.conf.erb'),
-mode=> '0444',
-notify  => Service['rsyslog'],
+rsyslog::conf { $service_name:
+content  => template('eventlogging/rsyslog.conf.erb'),
+priority => 80,
+before   => Base::Service_unit[$service_name],
 }
 # Python logging conf file that properly formats
 # output with $programname prefix so that rsyslog
diff --git a/modules/role/manifests/eventbus/eventbus.pp 
b/modules/role/manifests/eventbus/eventbus.pp
index d6cdfcb..f96116c 100644
--- a/modules/role/manifests/eventbus/eventbus.pp
+++ b/modules/role/manifests/eventbus/eventbus.pp
@@ -12,6 +12,9 @@
 include base::firewall
 require ::eventschemas
 
+# for /srv/log dir creation
+require ::service::configuration
+
 if hiera('has_lvs', true) {
 include ::role::lvs::realserver
 }
@@ -65,18 +68,6 @@
 default  => 'INFO',
 }
 
-# We ensure the /srv/log (parent of $out_dir) manually here, as
-# there is no proper class to rely on for this, and starting a
-# separate would be an overkill for now.  We create these directories
-# so we can save failed EventError events from eventbus here.
-if !defined(File['/srv/log']) {
-file { '/srv/log':
-ensure => 'directory',
-mode   => '0755',
-owner  => 'root',
-group  => 'root',
-}
-}
 if !defined(File['/srv/log/eventlogging']) {
 file { '/srv/log/eventlogging':
 ensure => 'directory',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica22e4d1db937527676d85fd03a4071adbf2c623
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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]: Update trending-edits to f3166a5

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326536 )

Change subject: Update trending-edits to f3166a5
..


Update trending-edits to f3166a5

List of changes:
xxx Update node module dependencies

Change-Id: I152cf93f1217b8bbcc20cbb4cf9ede2b4883d648
---
M node_modules/service-runner/lib/logger.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M node_modules/service-runner/package.json
A node_modules/wikipedia-edits-scorer/foo.diff
M node_modules/wikipedia-edits-scorer/index.js
M node_modules/wikipedia-edits-scorer/package.json
M node_modules/wikipedia-edits-scorer/tests/examples.js
M node_modules/wikipedia-edits-scorer/tests/test_scoring.js
M src
9 files changed, 141 insertions(+), 27 deletions(-)

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



diff --git a/node_modules/service-runner/lib/logger.js 
b/node_modules/service-runner/lib/logger.js
index 814af94..486a3ca 100644
--- a/node_modules/service-runner/lib/logger.js
+++ b/node_modules/service-runner/lib/logger.js
@@ -296,27 +296,43 @@
 }
 };
 
-Logger.prototype.log = function(level, info) {
+/**
+ * Logs and info object with a specified level
+ * @param {string} level Log level and components, for example 'trace/request'
+ * @param {Object|Function} info log statement object, or a callback to lazily 
construct
+ *   the log statement after we've decided that 
this particular
+ *   level will be matched.
+ * @param {boolean} [force] optional argument to force sampled component 
logging even
+ *  if the probability wasn't met. Used together with 
`isLoggable`
+ */
+Logger.prototype.log = function(level, info, force) {
 var simpleLevel;
 if (!level || !info) {
 return;
 }
 
+function getLog(info) {
+if (typeof info === "function") {
+return info();
+}
+return info;
+}
+
 if (Logger.logTrace) {
 simpleLevel = extractSimpleLevel(level);
 if (simpleLevel) {
-this._log(info, simpleLevel, level, this._traceLogger);
+this._log(getLog(info), simpleLevel, level, this._traceLogger);
 }
 return;
 }
 
 simpleLevel = this._getSimpleLogLevel(level);
 if (simpleLevel) {
-this._log(info, simpleLevel, level, this._logger);
+this._log(getLog(info), simpleLevel, level, this._logger);
 } else {
-var componentLoggerConf = this._getComponentLogConfig(level);
+var componentLoggerConf = this._getComponentLogConfig(level, force);
 if (componentLoggerConf) {
-this._log(info, componentLoggerConf.level, level, 
componentLoggerConf.logger);
+this._log(getLog(info), componentLoggerConf.level, level, 
componentLoggerConf.logger);
 }
 }
 };
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index 4986ecd..ad5b9f0 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "72294852b2e513c43dba9b754534bc8405200b01",
+  "_shasum": "15cf502953e470d40aefbf4025653a12f3108ba2",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/node_modules/service-runner/package.json 
b/node_modules/service-runner/package.json
index e05062a..b7416d7 100644
--- a/node_modules/service-runner/package.json
+++ b/node_modules/service-runner/package.json
@@ -1,6 +1,6 @@
 {
   "name": "service-runner",
-  "version": "2.1.12",
+  "version": "2.1.13",
   "description": "Generic nodejs service supervisor / cluster runner",
   "main": "service-runner.js",
   "bin": {
@@ -48,19 +48,19 @@
 "mocha-jscs": "^5.0.1",
 "bunyan-prettystream": 
"git+https://github.com/hadfieldn/node-bunyan-prettystream.git#master;
   },
-  "gitHead": "2de01b2a4f596ccf981e1878d4f2778c087000cc",
-  "_id": "service-runner@2.1.12",
-  "_shasum": "e1848d2168287e76a09386929181510a26c1ae46",
+  "gitHead": "9e0385bfc47357f3d5626ca1bf4aa5cf85bbc1ff",
+  "_id": "service-runner@2.1.13",
+  "_shasum": "e8ff78b93230d7d831ea3ed5587aa2292b829ceb",
   "_from": "service-runner@>=2.1.10 <3.0.0",
   "_npmVersion": "2.15.9",
   "_nodeVersion": "4.6.0",
   "_npmUser": {
-"name": "pchelolo",
-"email": "petrpche...@gmail.com"
+"name": "doorman",
+"email": "marko.obro...@gmail.com"
   },
   "dist": {
-"shasum": "e1848d2168287e76a09386929181510a26c1ae46",
-

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update trending-edits to f3166a5

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326536 )

Change subject: Update trending-edits to f3166a5
..

Update trending-edits to f3166a5

List of changes:
xxx Update node module dependencies

Change-Id: I152cf93f1217b8bbcc20cbb4cf9ede2b4883d648
---
M node_modules/service-runner/lib/logger.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M node_modules/service-runner/package.json
A node_modules/wikipedia-edits-scorer/foo.diff
M node_modules/wikipedia-edits-scorer/index.js
M node_modules/wikipedia-edits-scorer/package.json
M node_modules/wikipedia-edits-scorer/tests/examples.js
M node_modules/wikipedia-edits-scorer/tests/test_scoring.js
M src
9 files changed, 141 insertions(+), 27 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/36/326536/1

diff --git a/node_modules/service-runner/lib/logger.js 
b/node_modules/service-runner/lib/logger.js
index 814af94..486a3ca 100644
--- a/node_modules/service-runner/lib/logger.js
+++ b/node_modules/service-runner/lib/logger.js
@@ -296,27 +296,43 @@
 }
 };
 
-Logger.prototype.log = function(level, info) {
+/**
+ * Logs and info object with a specified level
+ * @param {string} level Log level and components, for example 'trace/request'
+ * @param {Object|Function} info log statement object, or a callback to lazily 
construct
+ *   the log statement after we've decided that 
this particular
+ *   level will be matched.
+ * @param {boolean} [force] optional argument to force sampled component 
logging even
+ *  if the probability wasn't met. Used together with 
`isLoggable`
+ */
+Logger.prototype.log = function(level, info, force) {
 var simpleLevel;
 if (!level || !info) {
 return;
 }
 
+function getLog(info) {
+if (typeof info === "function") {
+return info();
+}
+return info;
+}
+
 if (Logger.logTrace) {
 simpleLevel = extractSimpleLevel(level);
 if (simpleLevel) {
-this._log(info, simpleLevel, level, this._traceLogger);
+this._log(getLog(info), simpleLevel, level, this._traceLogger);
 }
 return;
 }
 
 simpleLevel = this._getSimpleLogLevel(level);
 if (simpleLevel) {
-this._log(info, simpleLevel, level, this._logger);
+this._log(getLog(info), simpleLevel, level, this._logger);
 } else {
-var componentLoggerConf = this._getComponentLogConfig(level);
+var componentLoggerConf = this._getComponentLogConfig(level, force);
 if (componentLoggerConf) {
-this._log(info, componentLoggerConf.level, level, 
componentLoggerConf.logger);
+this._log(getLog(info), componentLoggerConf.level, level, 
componentLoggerConf.logger);
 }
 }
 };
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index 4986ecd..ad5b9f0 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "72294852b2e513c43dba9b754534bc8405200b01",
+  "_shasum": "15cf502953e470d40aefbf4025653a12f3108ba2",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/node_modules/service-runner/package.json 
b/node_modules/service-runner/package.json
index e05062a..b7416d7 100644
--- a/node_modules/service-runner/package.json
+++ b/node_modules/service-runner/package.json
@@ -1,6 +1,6 @@
 {
   "name": "service-runner",
-  "version": "2.1.12",
+  "version": "2.1.13",
   "description": "Generic nodejs service supervisor / cluster runner",
   "main": "service-runner.js",
   "bin": {
@@ -48,19 +48,19 @@
 "mocha-jscs": "^5.0.1",
 "bunyan-prettystream": 
"git+https://github.com/hadfieldn/node-bunyan-prettystream.git#master;
   },
-  "gitHead": "2de01b2a4f596ccf981e1878d4f2778c087000cc",
-  "_id": "service-runner@2.1.12",
-  "_shasum": "e1848d2168287e76a09386929181510a26c1ae46",
+  "gitHead": "9e0385bfc47357f3d5626ca1bf4aa5cf85bbc1ff",
+  "_id": "service-runner@2.1.13",
+  "_shasum": "e8ff78b93230d7d831ea3ed5587aa2292b829ceb",
   "_from": "service-runner@>=2.1.10 <3.0.0",
   "_npmVersion": "2.15.9",
   "_nodeVersion": "4.6.0",
   "_npmUser": {
-"name": "pchelolo",
-"email": "petrpche...@gmail.com"
+"name": "doorman",
+"email": "marko.obro...@gmail.com"
   },
   "dist": {
-"shasum": 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: RESTBase: Add trending edits service config portion

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326529 )

Change subject: RESTBase: Add trending edits service config portion
..

RESTBase: Add trending edits service config portion

Bug: T150043
Change-Id: I84c7e188a5c4238020567711d9e401c3dd792403
---
M hieradata/labs/deployment-prep/common.yaml
M hieradata/role/common/restbase/server.yaml
M modules/restbase/manifests/init.pp
M modules/restbase/templates/config.labs.yaml.erb
M modules/restbase/templates/config.yaml.erb
5 files changed, 29 insertions(+), 2 deletions(-)


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

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 40c7717..3f5357e 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -116,6 +116,7 @@
 restbase::eventlogging_service_uri: 
http://deployment-eventlogging04.deployment-prep.eqiad.wmflabs:8085/v1/events
 restbase::pdfrender_uri: 
http://deployment-pdfrender02.deployment-prep.eqiad.wmflabs:5252
 restbase::citoid_uri: 
http://deployment-sca02.deployment-prep.eqiad.wmflabs:1970
+restbase::trendingedits_uri: 
http://deployment-trending01.deployment-prep.eqiad.wmflabs:6699
 "mediawiki::log_aggregator": deployment-fluorine02.eqiad.wmflabs:8420
 "mediawiki::forward_syslog": 
deployment-logstash2.deployment-prep.eqiad.wmflabs:10514
 mediawiki_memcached_servers:
diff --git a/hieradata/role/common/restbase/server.yaml 
b/hieradata/role/common/restbase/server.yaml
index f412717..115560d 100644
--- a/hieradata/role/common/restbase/server.yaml
+++ b/hieradata/role/common/restbase/server.yaml
@@ -17,6 +17,7 @@
 restbase::aqs_uri: 
"http://aqs.svc.%{::aqs_site}.wmnet:7232/analytics.wikimedia.org/v1;
 restbase::pdfrender_uri: "http://pdfrender.svc.%{::site}.wmnet:5252;
 restbase::citoid_uri: "http://citoid.svc.%{::site}.wmnet:1970;
+restbase::trendingedits_uri: 
"http://trendingedits_uri.svc.%{::site}.wmnet:6699;
 restbase::cassandra_user: restb
 restbase::cassandra_password: "%{passwords::cassandra::restbase}"
 restbase::monitoring::monitor_domain: en.wikipedia.org
diff --git a/modules/restbase/manifests/init.pp 
b/modules/restbase/manifests/init.pp
index e9b979c..98662d8 100644
--- a/modules/restbase/manifests/init.pp
+++ b/modules/restbase/manifests/init.pp
@@ -81,6 +81,10 @@
 # [*citoid_uri*]
 #   Citoid service URI. Default: http://citoid.svc.eqiad.wmnet:1970
 #
+# [*trendingedits_uri*]
+#   Trending edits service URI. Default:
+#   http://trendingedits.svc.eqiad.wmnet:6699
+#
 # [*monitor_domain*]
 #   The domain to monitor during the service's operation.
 #   Default: en.wikipedia.org
@@ -118,6 +122,7 @@
 'http://eventbus.svc.eqiad.wmnet:8085/v1/events',
 $pdfrender_uri  = 'http://pdfrender.svc.eqiad.wmnet:5252',
 $citoid_uri = 'http://citoid.svc.eqiad.wmnet:1970',
+$trendingedits_uri = 'http://trendingedits.svc.eqiad.wmnet:6699',
 $monitor_domain = 'en.wikipedia.org',
 $hosts  = [$::ipaddress],
 ) {
diff --git a/modules/restbase/templates/config.labs.yaml.erb 
b/modules/restbase/templates/config.labs.yaml.erb
index d40767d..e837470 100644
--- a/modules/restbase/templates/config.labs.yaml.erb
+++ b/modules/restbase/templates/config.labs.yaml.erb
@@ -56,6 +56,16 @@
   uri: <%= @pdfrender_uri %>
   secret: <%= @pdfrender_key %>
 
+# A separate project for en.wikipedia because it is more feature-rich
+en.wikipedia.org: 
+  x-modules:
+- path: projects/wmf_enwiki.yaml
+  options:
+<<: *default_options
+trending:
+  host: <%= @trendingedits_uri %>
+  cache_control: s-maxage=60, max-age=60
+
 # A different project template, sharing configuration options.
 wikimedia.org: 
   x-modules:
@@ -97,7 +107,7 @@
 /{domain:en-rtl.wikipedia.beta.wmflabs.org}: *default_project
 /{domain:en.wikibooks.beta.wmflabs.org}: *default_project
 /{domain:en.wikinews.beta.wmflabs.org}: *default_project
-/{domain:en.wikipedia.beta.wmflabs.org}: *default_project
+/{domain:en.wikipedia.beta.wmflabs.org}: *en.wikipedia.org
 /{domain:en.wikiquote.beta.wmflabs.org}: *default_project
 /{domain:en.wikisource.beta.wmflabs.org}: *default_project
 /{domain:en.wikitionary.beta.wmflabs.org}: *default_project
diff --git a/modules/restbase/templates/config.yaml.erb 
b/modules/restbase/templates/config.yaml.erb
index 72797ae..33ea2ef 100644
--- a/modules/restbase/templates/config.yaml.erb
+++ b/modules/restbase/templates/config.yaml.erb
@@ -80,6 +80,16 @@
   uri: <%= @pdfrender_uri %>
   secret: <%= @pdfrender_key %>
 
+# A separate project for en.wikipedia because it is more feature-rich
+en.wikipedia.org: 
+  x-modules:
+- path: projects/wmf_enwiki.yaml
+  options:
+<<: *default_options
+trending:
+  host: <%= 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Trending Edits: LVS configuration

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326528 )

Change subject: Trending Edits: LVS configuration
..

Trending Edits: LVS configuration

Bug: T150043
Change-Id: If9bc7ec2fbba271234d91bcaccd933629d3fd60d
---
M conftool-data/nodes/codfw.yaml
M conftool-data/nodes/eqiad.yaml
M conftool-data/services/services.yaml
M hieradata/common/lvs/configuration.yaml
M hieradata/role/common/scb.yaml
M modules/role/manifests/lvs/balancer.pp
6 files changed, 49 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/326528/1

diff --git a/conftool-data/nodes/codfw.yaml b/conftool-data/nodes/codfw.yaml
index 57fe66d..321738b 100644
--- a/conftool-data/nodes/codfw.yaml
+++ b/conftool-data/nodes/codfw.yaml
@@ -257,10 +257,10 @@
   sca2003.codfw.wmnet: [zotero]
   sca2004.codfw.wmnet: [zotero]
 scb:
-  scb2001.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender]
-  scb2002.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender]
-  scb2003.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender]
-  scb2004.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender]
+  scb2001.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender, trendingedits]
+  scb2002.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender, trendingedits]
+  scb2003.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender, trendingedits]
+  scb2004.codfw.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender, trendingedits]
 eventbus:
   kafka2001.codfw.wmnet: [eventbus]
   kafka2002.codfw.wmnet: [eventbus]
diff --git a/conftool-data/nodes/eqiad.yaml b/conftool-data/nodes/eqiad.yaml
index f1a6669..94889fe 100644
--- a/conftool-data/nodes/eqiad.yaml
+++ b/conftool-data/nodes/eqiad.yaml
@@ -200,10 +200,10 @@
   sca1003.eqiad.wmnet: [zotero]
   sca1004.eqiad.wmnet: [zotero]
 scb:
-  scb1001.eqiad.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender]
-  scb1002.eqiad.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender]
-  scb1003.eqiad.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender]
-  scb1004.eqiad.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender]
+  scb1001.eqiad.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender, trendingedits]
+  scb1002.eqiad.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender, trendingedits]
+  scb1003.eqiad.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender, trendingedits]
+  scb1004.eqiad.wmnet: [mobileapps, mathoid, graphoid, citoid, apertium, 
cxserver, ores, eventstreams, pdfrender, trendingedits]
 dns:
   chromium.wikimedia.org: [pdns_recursor]
   hydrogen.wikimedia.org: [pdns_recursor]
diff --git a/conftool-data/services/services.yaml 
b/conftool-data/services/services.yaml
index 0fca36d..d3a8f2b 100644
--- a/conftool-data/services/services.yaml
+++ b/conftool-data/services/services.yaml
@@ -123,6 +123,14 @@
 datacenters:
 - eqiad
 - codfw
+  trendingedits:
+port: 6699
+default_values:
+  pooled: 'no'
+  weight: 10
+datacenters:
+- eqiad
+- codfw
 restbase:
   restbase:
 port: 7231
diff --git a/hieradata/common/lvs/configuration.yaml 
b/hieradata/common/lvs/configuration.yaml
index 8c07642..453e69e 100644
--- a/hieradata/common/lvs/configuration.yaml
+++ b/hieradata/common/lvs/configuration.yaml
@@ -137,6 +137,9 @@
   pdfrender: _block034
 eqiad: 10.2.2.35
 codfw: 10.2.1.35
+  trendingedits: _block035
+eqiad: 10.2.2.36
+codfw: 10.2.1.36
 lvs::configuration::lvs_services:
   text:
 description: "Main wiki platform LVS service, text.%{::site}.wikimedia.org 
(Varnish)"
@@ -1102,3 +1105,30 @@
   hostname: pdfrender.svc.eqiad.wmnet
 codfw:
   hostname: pdfrender.svc.codfw.wmnet
+  trendingedits:
+description: Trending edits service
+class: low-traffic
+sites:
+- eqiad
+- codfw
+ip: *ip_block035
+port: 6699
+bgp: 'yes'
+depool-threshold: '.5'
+monitors:
+  ProxyFetch:
+url:
+- http://localhost/
+  IdleConnection:
+timeout-clean-reconnect: 3
+max-delay: 300
+conftool:
+  cluster: scb
+  service: trendingedits
+icinga:
+  check_command: 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Trending Edits: Add to SCB

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326527 )

Change subject: Trending Edits: Add to SCB
..

Trending Edits: Add to SCB

Bug: T150043
Change-Id: Ibacb5c143ce9c66f1843ef7480e4446ffbe99c6f
---
M modules/role/manifests/scb.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/27/326527/1

diff --git a/modules/role/manifests/scb.pp b/modules/role/manifests/scb.pp
index 0046681..9004011 100644
--- a/modules/role/manifests/scb.pp
+++ b/modules/role/manifests/scb.pp
@@ -12,6 +12,7 @@
 include role::apertium
 include role::eventstreams
 include role::pdfrender
+include role::trendingedits
 
 include standard
 include base::firewall

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibacb5c143ce9c66f1843ef7480e4446ffbe99c6f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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]: Update change-propagation to 0018164

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326503 )

Change subject: Update change-propagation to 0018164
..


Update change-propagation to 0018164

List of changes:
0018164 Fixed sample log generation

Change-Id: Iedec2655e326f54186e5a00dcfc4fafb8eaabb5a
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src b/src
index b2bf30d..0018164 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit b2bf30d1504a7e24dca052e66d7ecc5b7479b781
+Subproject commit 0018164fde75d53fd283ca716bf6bb7bda92ea84

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iedec2655e326f54186e5a00dcfc4fafb8eaabb5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/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]: Update change-propagation to 0018164

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326503 )

Change subject: Update change-propagation to 0018164
..

Update change-propagation to 0018164

List of changes:
0018164 Fixed sample log generation

Change-Id: Iedec2655e326f54186e5a00dcfc4fafb8eaabb5a
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/03/326503/1

diff --git a/src b/src
index b2bf30d..0018164 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit b2bf30d1504a7e24dca052e66d7ecc5b7479b781
+Subproject commit 0018164fde75d53fd283ca716bf6bb7bda92ea84

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedec2655e326f54186e5a00dcfc4fafb8eaabb5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/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]: Update change-propagation to b2bf30d

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326450 )

Change subject: Update change-propagation to b2bf30d
..


Update change-propagation to b2bf30d

List of changes:
fdf1267 Use delivery callback to guarantee delivery
3717c06 Use 'connect' callback to figure out we're connected. Better then ready 
event
639eb6f Don't fail if the resolver is not found for delivery report
ad6d4b9 Actually set up the logger
9e940c4 Got rid of the function keyword
cf9a705 Use shared kafka management tools
b40f5ed Don't clean in travis
373b9e5 Run scripts after npm install
615b2aa Better sourcing the file
875151a Better sourcing the file
2cbaa03 Better check for travis environment
3f525cb Correctly kill kafka afterwards
f95bf71 Improved cleanup script soursing
35f7b9a Improved CPU usage
b2bf30d Release v0.6.3
xxx Update node module dependencies

Change-Id: I36feac017264f55617d9ab7fc79f2ef317c9660a
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/service-runner/lib/logger.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/readable-stream/node_modules/inherits/package.json
M node_modules/service-runner/package.json
M src
7 files changed, 38 insertions(+), 21 deletions(-)

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



diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index ec70b27..1f0d6c1 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "7eb533f8b08fa8eafeabec67a181d276848bcbc0",
+  "_shasum": "87057c67bb058b9f428c3aed1d02000d41c24bf9",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 11b4990..441812d 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "4038dde76a13ac26427a4a9cac3d1ba3fc23ea81",
+  "_shasum": "3ed9ef2d2f14e2c8ad58a317b4fb86ff1e974c62",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git a/node_modules/service-runner/lib/logger.js 
b/node_modules/service-runner/lib/logger.js
index 814af94..486a3ca 100644
--- a/node_modules/service-runner/lib/logger.js
+++ b/node_modules/service-runner/lib/logger.js
@@ -296,27 +296,43 @@
 }
 };
 
-Logger.prototype.log = function(level, info) {
+/**
+ * Logs and info object with a specified level
+ * @param {string} level Log level and components, for example 'trace/request'
+ * @param {Object|Function} info log statement object, or a callback to lazily 
construct
+ *   the log statement after we've decided that 
this particular
+ *   level will be matched.
+ * @param {boolean} [force] optional argument to force sampled component 
logging even
+ *  if the probability wasn't met. Used together with 
`isLoggable`
+ */
+Logger.prototype.log = function(level, info, force) {
 var simpleLevel;
 if (!level || !info) {
 return;
 }
 
+function getLog(info) {
+if (typeof info === "function") {
+return info();
+}
+return info;
+}
+
 if (Logger.logTrace) {
 simpleLevel = extractSimpleLevel(level);
 if (simpleLevel) {
-this._log(info, simpleLevel, level, this._traceLogger);
+this._log(getLog(info), simpleLevel, level, this._traceLogger);
 }
 return;
 }
 
 simpleLevel = this._getSimpleLogLevel(level);
 if (simpleLevel) {
-this._log(info, simpleLevel, level, this._logger);
+this._log(getLog(info), simpleLevel, level, this._logger);
 } else {
-var componentLoggerConf = this._getComponentLogConfig(level);
+var componentLoggerConf = this._getComponentLogConfig(level, force);
 if (componentLoggerConf) {
-this._log(info, componentLoggerConf.level, level, 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update change-propagation to b2bf30d

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326450 )

Change subject: Update change-propagation to b2bf30d
..

Update change-propagation to b2bf30d

List of changes:
fdf1267 Use delivery callback to guarantee delivery
3717c06 Use 'connect' callback to figure out we're connected. Better then ready 
event
639eb6f Don't fail if the resolver is not found for delivery report
ad6d4b9 Actually set up the logger
9e940c4 Got rid of the function keyword
cf9a705 Use shared kafka management tools
b40f5ed Don't clean in travis
373b9e5 Run scripts after npm install
615b2aa Better sourcing the file
875151a Better sourcing the file
2cbaa03 Better check for travis environment
3f525cb Correctly kill kafka afterwards
f95bf71 Improved cleanup script soursing
35f7b9a Improved CPU usage
b2bf30d Release v0.6.3
xxx Update node module dependencies

Change-Id: I36feac017264f55617d9ab7fc79f2ef317c9660a
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/service-runner/lib/logger.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/readable-stream/node_modules/inherits/package.json
M node_modules/service-runner/package.json
M src
7 files changed, 38 insertions(+), 21 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/50/326450/1

diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index ec70b27..1f0d6c1 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "7eb533f8b08fa8eafeabec67a181d276848bcbc0",
+  "_shasum": "87057c67bb058b9f428c3aed1d02000d41c24bf9",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 11b4990..441812d 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "4038dde76a13ac26427a4a9cac3d1ba3fc23ea81",
+  "_shasum": "3ed9ef2d2f14e2c8ad58a317b4fb86ff1e974c62",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git a/node_modules/service-runner/lib/logger.js 
b/node_modules/service-runner/lib/logger.js
index 814af94..486a3ca 100644
--- a/node_modules/service-runner/lib/logger.js
+++ b/node_modules/service-runner/lib/logger.js
@@ -296,27 +296,43 @@
 }
 };
 
-Logger.prototype.log = function(level, info) {
+/**
+ * Logs and info object with a specified level
+ * @param {string} level Log level and components, for example 'trace/request'
+ * @param {Object|Function} info log statement object, or a callback to lazily 
construct
+ *   the log statement after we've decided that 
this particular
+ *   level will be matched.
+ * @param {boolean} [force] optional argument to force sampled component 
logging even
+ *  if the probability wasn't met. Used together with 
`isLoggable`
+ */
+Logger.prototype.log = function(level, info, force) {
 var simpleLevel;
 if (!level || !info) {
 return;
 }
 
+function getLog(info) {
+if (typeof info === "function") {
+return info();
+}
+return info;
+}
+
 if (Logger.logTrace) {
 simpleLevel = extractSimpleLevel(level);
 if (simpleLevel) {
-this._log(info, simpleLevel, level, this._traceLogger);
+this._log(getLog(info), simpleLevel, level, this._traceLogger);
 }
 return;
 }
 
 simpleLevel = this._getSimpleLogLevel(level);
 if (simpleLevel) {
-this._log(info, simpleLevel, level, this._logger);
+this._log(getLog(info), simpleLevel, level, this._logger);
 } else {
-var componentLoggerConf = this._getComponentLogConfig(level);
+var componentLoggerConf = this._getComponentLogConfig(level, force);
 if (componentLoggerConf) {
-this._log(info, 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Revert "Config: Lower concurrency"

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326449 )

Change subject: Revert "Config: Lower concurrency"
..


Revert "Config: Lower concurrency"

This reverts commit 9a33bf440fc8910954bdc39d52f96a91c9834730.

Change-Id: I9d87f20b04cb300198b0e1a0a6979a4a78da2121
---
M scap/templates/config.yaml.j2
M scap/vars.yaml
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index be10361..1318f1a 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -305,7 +305,7 @@
   body: '{{globals.message}}'
 
   on_transclusion_update:
-concurrency: <%= concurrency * 4 %>
+concurrency: <%= concurrency * 8 %>
 topic: change-prop.transcludes.resource-change
 cases:
   - match:
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 1ccd06a..80bb8dd 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -18,4 +18,4 @@
 ores_uri: localhost:8081
 purge_host: 127.0.0.1
 purge_port: 4827
-concurrency: 25
+concurrency: 50

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d87f20b04cb300198b0e1a0a6979a4a78da2121
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/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]: Revert "Config: Lower concurrency"

2016-12-12 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326449 )

Change subject: Revert "Config: Lower concurrency"
..

Revert "Config: Lower concurrency"

This reverts commit 9a33bf440fc8910954bdc39d52f96a91c9834730.

Change-Id: I9d87f20b04cb300198b0e1a0a6979a4a78da2121
---
M scap/templates/config.yaml.j2
M scap/vars.yaml
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/49/326449/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index be10361..1318f1a 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -305,7 +305,7 @@
   body: '{{globals.message}}'
 
   on_transclusion_update:
-concurrency: <%= concurrency * 4 %>
+concurrency: <%= concurrency * 8 %>
 topic: change-prop.transcludes.resource-change
 cases:
   - match:
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 1ccd06a..80bb8dd 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -18,4 +18,4 @@
 ores_uri: localhost:8081
 purge_host: 127.0.0.1
 purge_port: 4827
-concurrency: 25
+concurrency: 50

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d87f20b04cb300198b0e1a0a6979a4a78da2121
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/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]: Config: Lower min_edits in BetaCluster to 2

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

Change subject: Config: Lower min_edits in BetaCluster to 2
..


Config: Lower min_edits in BetaCluster to 2

Change-Id: I3bd5e3e4bf87bfa98ad0d3493308de4875140a3a
---
A scap/environments/beta/vars.yaml
M scap/scap.cfg
M scap/templates/config.yaml.j2
M scap/vars.yaml
4 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/scap/environments/beta/vars.yaml b/scap/environments/beta/vars.yaml
new file mode 100644
index 000..12ccd37
--- /dev/null
+++ b/scap/environments/beta/vars.yaml
@@ -0,0 +1 @@
+min_edits: 2
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 66a2805..4a04dca 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -16,6 +16,7 @@
 git_server: tin.eqiad.wmnet
 
 [deployment-prep.eqiad.wmflabs]
+environment: beta
 git_server: deployment-tin.deployment-prep.eqiad.wmflabs
 server_groups: default
 dsh_targets: betacluster
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index aecf81d..ff024e6 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -86,7 +86,7 @@
   # calculate trending for one hour
   trending_period: 3600
   # the number of edits needed to take a page into account
-  min_edits: 6
+  min_edits: <%= min_edits %>
   # the list of Kafka brokers to contact
   broker_list: <%= broker_list %>
   # the template used for contacting the MW API
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 3249e6e..394d51f 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -9,6 +9,7 @@
 port: 6699
 proxy: 
 site: datacenter1
+min_edits: 6
 broker_list: localhost:9092
 mwapi_uri: http://localhost/w/api.php
 restbase_uri: http://localhost:7231

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3bd5e3e4bf87bfa98ad0d3493308de4875140a3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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]: Config: Lower min_edits in BetaCluster to 2

2016-12-10 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326251 )

Change subject: Config: Lower min_edits in BetaCluster to 2
..

Config: Lower min_edits in BetaCluster to 2

Change-Id: I3bd5e3e4bf87bfa98ad0d3493308de4875140a3a
---
A scap/environments/beta/vars.yaml
M scap/scap.cfg
M scap/templates/config.yaml.j2
M scap/vars.yaml
4 files changed, 4 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/51/326251/1

diff --git a/scap/environments/beta/vars.yaml b/scap/environments/beta/vars.yaml
new file mode 100644
index 000..12ccd37
--- /dev/null
+++ b/scap/environments/beta/vars.yaml
@@ -0,0 +1 @@
+min_edits: 2
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 66a2805..4a04dca 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -16,6 +16,7 @@
 git_server: tin.eqiad.wmnet
 
 [deployment-prep.eqiad.wmflabs]
+environment: beta
 git_server: deployment-tin.deployment-prep.eqiad.wmflabs
 server_groups: default
 dsh_targets: betacluster
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index aecf81d..ff024e6 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -86,7 +86,7 @@
   # calculate trending for one hour
   trending_period: 3600
   # the number of edits needed to take a page into account
-  min_edits: 6
+  min_edits: <%= min_edits %>
   # the list of Kafka brokers to contact
   broker_list: <%= broker_list %>
   # the template used for contacting the MW API
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 3249e6e..394d51f 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -9,6 +9,7 @@
 port: 6699
 proxy: 
 site: datacenter1
+min_edits: 6
 broker_list: localhost:9092
 mwapi_uri: http://localhost/w/api.php
 restbase_uri: http://localhost:7231

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bd5e3e4bf87bfa98ad0d3493308de4875140a3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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]: Config: Lower concurrency

2016-12-09 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326102 )

Change subject: Config: Lower concurrency
..


Config: Lower concurrency

Change-Id: Id6869251a232b96c442562303c48792414243e5c
---
M scap/templates/config.yaml.j2
M scap/vars.yaml
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 1318f1a..be10361 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -305,7 +305,7 @@
   body: '{{globals.message}}'
 
   on_transclusion_update:
-concurrency: <%= concurrency * 8 %>
+concurrency: <%= concurrency * 4 %>
 topic: change-prop.transcludes.resource-change
 cases:
   - match:
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 80bb8dd..1ccd06a 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -18,4 +18,4 @@
 ores_uri: localhost:8081
 purge_host: 127.0.0.1
 purge_port: 4827
-concurrency: 50
+concurrency: 25

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id6869251a232b96c442562303c48792414243e5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/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]: Config: Lower concurrency

2016-12-09 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326102 )

Change subject: Config: Lower concurrency
..

Config: Lower concurrency

Change-Id: Id6869251a232b96c442562303c48792414243e5c
---
M scap/templates/config.yaml.j2
M scap/vars.yaml
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/02/326102/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 1318f1a..be10361 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -305,7 +305,7 @@
   body: '{{globals.message}}'
 
   on_transclusion_update:
-concurrency: <%= concurrency * 8 %>
+concurrency: <%= concurrency * 4 %>
 topic: change-prop.transcludes.resource-change
 cases:
   - match:
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 80bb8dd..1ccd06a 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -18,4 +18,4 @@
 ores_uri: localhost:8081
 purge_host: 127.0.0.1
 purge_port: 4827
-concurrency: 50
+concurrency: 25

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6869251a232b96c442562303c48792414243e5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/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]: Update change-propagation to 28054b5

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326042 )

Change subject: Update change-propagation to 28054b5
..


Update change-propagation to 28054b5

List of changes:
abc03b5 Move wikidata->mobileapps dependency to it's own resource-change queue 
to avoid lagging
bd0be68 Fixed tests
28054b5 Removed subscription to continue topics, not needed any more
xxx Update config template
xxx Update node module dependencies

Change-Id: I735130667095e847abba581cef44671d804de3e0
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M scap/templates/config.yaml.j2
M src
5 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 2726b69..ec70b27 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "37770e149b1b830102794ac8698cc6ea5b798392",
+  "_shasum": "7eb533f8b08fa8eafeabec67a181d276848bcbc0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 8199f87..11b4990 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "c4bcd077ef57835b8775f0d23fc574913a05ec16",
+  "_shasum": "4038dde76a13ac26427a4a9cac3d1ba3fc23ea81",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index a1bba51..8f42b69 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "c39e9b2b027c32e93af9913eeba1157970d6e5ef",
+  "_shasum": "0fe8af24c30eaeed113ff8230ac498797036b424",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index c59bc2c..1318f1a 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -585,7 +585,7 @@
   body: '{{globals.message}}'
 
   on_wikidata_description_change:
-topic: change-prop.transcludes.resource-change
+topic: change-prop.wikidata.resource-change
 match:
   meta:
 uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/'
diff --git a/src b/src
index 04bed5d..28054b5 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 04bed5da233b8b156f7d36afce6492371088493d
+Subproject commit 28054b56aef92ab34e134ddfc47b852f92199523

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I735130667095e847abba581cef44671d804de3e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/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]: Update change-propagation to 28054b5

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326042 )

Change subject: Update change-propagation to 28054b5
..

Update change-propagation to 28054b5

List of changes:
abc03b5 Move wikidata->mobileapps dependency to it's own resource-change queue 
to avoid lagging
bd0be68 Fixed tests
28054b5 Removed subscription to continue topics, not needed any more
xxx Update config template
xxx Update node module dependencies

Change-Id: I735130667095e847abba581cef44671d804de3e0
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M scap/templates/config.yaml.j2
M src
5 files changed, 5 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/42/326042/1

diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 2726b69..ec70b27 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "37770e149b1b830102794ac8698cc6ea5b798392",
+  "_shasum": "7eb533f8b08fa8eafeabec67a181d276848bcbc0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 8199f87..11b4990 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "c4bcd077ef57835b8775f0d23fc574913a05ec16",
+  "_shasum": "4038dde76a13ac26427a4a9cac3d1ba3fc23ea81",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index a1bba51..8f42b69 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "c39e9b2b027c32e93af9913eeba1157970d6e5ef",
+  "_shasum": "0fe8af24c30eaeed113ff8230ac498797036b424",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index c59bc2c..1318f1a 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -585,7 +585,7 @@
   body: '{{globals.message}}'
 
   on_wikidata_description_change:
-topic: change-prop.transcludes.resource-change
+topic: change-prop.wikidata.resource-change
 match:
   meta:
 uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/'
diff --git a/src b/src
index 04bed5d..28054b5 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 04bed5da233b8b156f7d36afce6492371088493d
+Subproject commit 28054b56aef92ab34e134ddfc47b852f92199523

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I735130667095e847abba581cef44671d804de3e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/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]: Update change-propagation to 04bed5d

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326034 )

Change subject: Update change-propagation to 04bed5d
..


Update change-propagation to 04bed5d

List of changes:
cb9560b Interleave continuation with leaf job processing
xxx Update the config template
xxx Update node module dependencies

Change-Id: I8204d79216170ee1c364e7d1d2a8f40bcc2ab47a
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/service-runner/lib/master.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M node_modules/service-runner/package.json
M scap/templates/config.yaml.j2
M src
7 files changed, 38 insertions(+), 27 deletions(-)

Approvals:
  Mobrovac: Verified; Looks good to me, approved
  Ppchelko: Looks good to me, but someone else must approve



diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 1fd2d63..2726b69 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "46a653f23d5529123f2a7623422996c0be7cfe91",
+  "_shasum": "37770e149b1b830102794ac8698cc6ea5b798392",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index c239fb5..8199f87 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "d56a34d13568e14ff5ca40c46d8efbf4ef4f3a55",
+  "_shasum": "c4bcd077ef57835b8775f0d23fc574913a05ec16",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git a/node_modules/service-runner/lib/master.js 
b/node_modules/service-runner/lib/master.js
index 5ed417f..090f199 100644
--- a/node_modules/service-runner/lib/master.js
+++ b/node_modules/service-runner/lib/master.js
@@ -133,7 +133,9 @@
 var self = this;
 var worker = cluster.workers[workerId];
 if (!worker || worker.state === 'disconnected') {
-delete self.workerStatusMap[worker.process.pid];
+if (worker) {
+delete self.workerStatusMap[worker.process.pid];
+}
 return;
 }
 self.workerStatusMap[worker.process.pid] = {
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index d7c7c0f..a1bba51 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "48d03b345a24c4e984f504d5cf4a45408bc50b7b",
+  "_shasum": "c39e9b2b027c32e93af9913eeba1157970d6e5ef",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/node_modules/service-runner/package.json 
b/node_modules/service-runner/package.json
index 349996d..f8513e0 100644
--- a/node_modules/service-runner/package.json
+++ b/node_modules/service-runner/package.json
@@ -1,6 +1,6 @@
 {
   "name": "service-runner",
-  "version": "2.1.11",
+  "version": "2.1.12",
   "description": "Generic nodejs service supervisor / cluster runner",
   "main": "service-runner.js",
   "bin": {
@@ -48,9 +48,9 @@
 "mocha-jscs": "^5.0.1",
 "bunyan-prettystream": 
"git+https://github.com/hadfieldn/node-bunyan-prettystream.git#master;
   },
-  "gitHead": "a235e2f8460625cb5ee8fc64cc3071a5a070e063",
-  "_id": "service-runner@2.1.11",
-  "_shasum": "1b0c83666beef6cc0637f0573a5107d107eac5bb",
+  "gitHead": "2de01b2a4f596ccf981e1878d4f2778c087000cc",
+  "_id": "service-runner@2.1.12",
+  "_shasum": "e1848d2168287e76a09386929181510a26c1ae46",
   "_from": "service-runner@>=2.1.7 <3.0.0",
   "_npmVersion": "2.15.9",
   "_nodeVersion": "4.6.0",
@@ -59,8 +59,8 @@
 "email": "petrpche...@gmail.com"
   },
   "dist": {
-"shasum": 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update change-propagation to 04bed5d

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326034 )

Change subject: Update change-propagation to 04bed5d
..

Update change-propagation to 04bed5d

List of changes:
cb9560b Interleave continuation with leaf job processing
xxx Update the config template
xxx Update node module dependencies

Change-Id: I8204d79216170ee1c364e7d1d2a8f40bcc2ab47a
---
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/service-runner/lib/master.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M node_modules/service-runner/package.json
M scap/templates/config.yaml.j2
M src
7 files changed, 38 insertions(+), 27 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/34/326034/1

diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 1fd2d63..2726b69 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "46a653f23d5529123f2a7623422996c0be7cfe91",
+  "_shasum": "37770e149b1b830102794ac8698cc6ea5b798392",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index c239fb5..8199f87 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "d56a34d13568e14ff5ca40c46d8efbf4ef4f3a55",
+  "_shasum": "c4bcd077ef57835b8775f0d23fc574913a05ec16",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;
 }
diff --git a/node_modules/service-runner/lib/master.js 
b/node_modules/service-runner/lib/master.js
index 5ed417f..090f199 100644
--- a/node_modules/service-runner/lib/master.js
+++ b/node_modules/service-runner/lib/master.js
@@ -133,7 +133,9 @@
 var self = this;
 var worker = cluster.workers[workerId];
 if (!worker || worker.state === 'disconnected') {
-delete self.workerStatusMap[worker.process.pid];
+if (worker) {
+delete self.workerStatusMap[worker.process.pid];
+}
 return;
 }
 self.workerStatusMap[worker.process.pid] = {
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index d7c7c0f..a1bba51 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
+++ 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
@@ -75,7 +75,7 @@
   },
   "homepage": "https://github.com/kadtools/kad#readme;,
   "_id": "kad@1.3.6",
-  "_shasum": "48d03b345a24c4e984f504d5cf4a45408bc50b7b",
+  "_shasum": "c39e9b2b027c32e93af9913eeba1157970d6e5ef",
   "_from": "git+https://github.com/gwicke/kad.git#master;,
   "_resolved": 
"git+https://github.com/gwicke/kad.git#f35971036f43814043245da82b12d035b7bbfd16;
 }
diff --git a/node_modules/service-runner/package.json 
b/node_modules/service-runner/package.json
index 349996d..f8513e0 100644
--- a/node_modules/service-runner/package.json
+++ b/node_modules/service-runner/package.json
@@ -1,6 +1,6 @@
 {
   "name": "service-runner",
-  "version": "2.1.11",
+  "version": "2.1.12",
   "description": "Generic nodejs service supervisor / cluster runner",
   "main": "service-runner.js",
   "bin": {
@@ -48,9 +48,9 @@
 "mocha-jscs": "^5.0.1",
 "bunyan-prettystream": 
"git+https://github.com/hadfieldn/node-bunyan-prettystream.git#master;
   },
-  "gitHead": "a235e2f8460625cb5ee8fc64cc3071a5a070e063",
-  "_id": "service-runner@2.1.11",
-  "_shasum": "1b0c83666beef6cc0637f0573a5107d107eac5bb",
+  "gitHead": "2de01b2a4f596ccf981e1878d4f2778c087000cc",
+  "_id": "service-runner@2.1.12",
+  "_shasum": "e1848d2168287e76a09386929181510a26c1ae46",
   "_from": "service-runner@>=2.1.7 <3.0.0",
   "_npmVersion": "2.15.9",
   "_nodeVersion": "4.6.0",
@@ -59,8 +59,8 @@
 "email": "petrpche...@gmail.com"
   },
   "dist": {
-"shasum": "1b0c83666beef6cc0637f0573a5107d107eac5bb",
- 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Beta: Use deployment-trending01 as the target host

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326013 )

Change subject: Beta: Use deployment-trending01 as the target host
..


Beta: Use deployment-trending01 as the target host

Change-Id: Id0b87724b4c2274691c73f3beeae684b97c1f63a
---
M scap/betacluster
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/scap/betacluster b/scap/betacluster
index 7db5e15..c186ccc 100644
--- a/scap/betacluster
+++ b/scap/betacluster
@@ -1,2 +1 @@
-deployment-sca01.deployment-prep.eqiad.wmflabs
-deployment-sca02.deployment-prep.eqiad.wmflabs
+deployment-trending01.deployment-prep.eqiad.wmflabs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0b87724b4c2274691c73f3beeae684b97c1f63a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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]: Beta: Use deployment-trending01 as the target host

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/326013 )

Change subject: Beta: Use deployment-trending01 as the target host
..

Beta: Use deployment-trending01 as the target host

Change-Id: Id0b87724b4c2274691c73f3beeae684b97c1f63a
---
M scap/betacluster
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/13/326013/1

diff --git a/scap/betacluster b/scap/betacluster
index 7db5e15..c186ccc 100644
--- a/scap/betacluster
+++ b/scap/betacluster
@@ -1,2 +1 @@
-deployment-sca01.deployment-prep.eqiad.wmflabs
-deployment-sca02.deployment-prep.eqiad.wmflabs
+deployment-trending01.deployment-prep.eqiad.wmflabs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0b87724b4c2274691c73f3beeae684b97c1f63a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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]: Config: Add the MW API and RB API request templates

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325999 )

Change subject: Config: Add the MW API and RB API request templates
..


Config: Add the MW API and RB API request templates

Change-Id: Id7b3848563ec8f7470d513bde584ab4c5be55d39
---
M scap/templates/config.yaml.j2
M scap/vars.yaml
2 files changed, 17 insertions(+), 0 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 6700ea6..aecf81d 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -89,3 +89,18 @@
   min_edits: 6
   # the list of Kafka brokers to contact
   broker_list: <%= broker_list %>
+  # the template used for contacting the MW API
+  mwapi_req:
+method: post
+uri: <%= mwapi_uri %>
+headers:
+  host: '{{request.params.domain}}'
+  user-agent: '{{user-agent}}'
+body: '{{ default(request.query, {}) }}'
+  # the template used for contacting RESTBase
+  restbase_req:
+method: '{{request.method}}'
+uri: <%= restbase_uri %>/{{domain}}/v1/{+path}
+query: '{{ default(request.query, {}) }}'
+headers: '{{request.headers}}'
+body: '{{request.body}}'
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 3735aea..3249e6e 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -10,3 +10,5 @@
 proxy: 
 site: datacenter1
 broker_list: localhost:9092
+mwapi_uri: http://localhost/w/api.php
+restbase_uri: http://localhost:7231

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id7b3848563ec8f7470d513bde584ab4c5be55d39
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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]: Config: Add the MW API and RB API request templates

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/325999 )

Change subject: Config: Add the MW API and RB API request templates
..

Config: Add the MW API and RB API request templates

Change-Id: Id7b3848563ec8f7470d513bde584ab4c5be55d39
---
M scap/templates/config.yaml.j2
M scap/vars.yaml
2 files changed, 17 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits/deploy 
refs/changes/99/325999/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 6700ea6..aecf81d 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -89,3 +89,18 @@
   min_edits: 6
   # the list of Kafka brokers to contact
   broker_list: <%= broker_list %>
+  # the template used for contacting the MW API
+  mwapi_req:
+method: post
+uri: <%= mwapi_uri %>
+headers:
+  host: '{{request.params.domain}}'
+  user-agent: '{{user-agent}}'
+body: '{{ default(request.query, {}) }}'
+  # the template used for contacting RESTBase
+  restbase_req:
+method: '{{request.method}}'
+uri: <%= restbase_uri %>/{{domain}}/v1/{+path}
+query: '{{ default(request.query, {}) }}'
+headers: '{{request.headers}}'
+body: '{{request.body}}'
diff --git a/scap/vars.yaml b/scap/vars.yaml
index 3735aea..3249e6e 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -10,3 +10,5 @@
 proxy: 
 site: datacenter1
 broker_list: localhost:9092
+mwapi_uri: http://localhost/w/api.php
+restbase_uri: http://localhost:7231

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7b3848563ec8f7470d513bde584ab4c5be55d39
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits/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...trending-edits[master]: Bug fix: wikipedia-edits-scorer is a dep, not a devDep

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/325992 )

Change subject: Bug fix: wikipedia-edits-scorer is a dep, not a devDep
..

Bug fix: wikipedia-edits-scorer is a dep, not a devDep

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/trending-edits 
refs/changes/92/325992/1

diff --git a/package.json b/package.json
index 0c583bb..8cc6087 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,8 @@
 "preq": "^0.4.10",
 "service-runner": "^2.1.10",
 "swagger-router": "^0.4.6",
-"node-rdkafka": "^0.6.0"
+"node-rdkafka": "^0.6.0",
+"wikipedia-edits-scorer": "^1.2.0"
   },
   "devDependencies": {
 "extend": "^3.0.0",
@@ -42,8 +43,7 @@
 "mocha-jscs": "^5.0.1",
 "mocha-jshint": "^2.3.1",
 "mocha-lcov-reporter": "^1.2.0",
-"nsp": "^2.6.1",
-"wikipedia-edits-scorer": "^1.2.0"
+"nsp": "^2.6.1"
   },
   "deploy": {
 "node": "4.6.0",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d5c94bd9f13c3e97ee41338ba86aea19dae9051
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/trending-edits
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...trending-edits[master]: Emit the $merge key with page summary URI.

2016-12-08 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325986 )

Change subject: Emit the $merge key with page summary URI.
..


Emit the $merge key with page summary URI.

Needed for content hydration in RESTBase.

Change-Id: Idcb99234ead8b322abf84273eb64dab483e808bc
---
M lib/processor.js
M routes/trending-v1.js
M test/features/v1/trending.js
A test/utils/fixtures.js
4 files changed, 70 insertions(+), 7 deletions(-)

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



diff --git a/lib/processor.js b/lib/processor.js
index 1d3286c..359fe59 100644
--- a/lib/processor.js
+++ b/lib/processor.js
@@ -110,7 +110,8 @@
 names: {},
 main: username
 },
-title: edit.page_title
+title: edit.page_title,
+domain: edit.meta.domain
 };
 }
 contributors = page.contributors;
diff --git a/routes/trending-v1.js b/routes/trending-v1.js
index 6253ffa..1195b60 100644
--- a/routes/trending-v1.js
+++ b/routes/trending-v1.js
@@ -31,6 +31,17 @@
 
 var ERROR_UNAVAILABLE = 'Trending is currently not available on this wiki.';
 
+function getRbPageSummaryUrl(domain, title) {
+const request = app.restbase_tpl.expand({
+request: {
+params: {
+domain: domain,
+path: 'page/summary/' + encodeURIComponent(title) },
+}
+});
+return request.uri;
+}
+
 /**
  * GET /feed/trending-edits
  * Gets the body of a given page.
@@ -50,7 +61,8 @@
 totalEdits: page.edits,
 trendiness: page.score,
 isNew: page.isNew,
-updated: page.updated
+updated: page.updated,
+$merge: [ getRbPageSummaryUrl(page.domain, page.title) 
]
 };
 })
 };
diff --git a/test/features/v1/trending.js b/test/features/v1/trending.js
index 79f5ba7..abadc86 100644
--- a/test/features/v1/trending.js
+++ b/test/features/v1/trending.js
@@ -1,10 +1,11 @@
 'use strict';
 
 
-var preq   = require('preq');
-var assert = require('../../utils/assert.js');
-var server = require('../../utils/server.js');
-var processor = require('../../../lib/processor.js');
+const preq = require('preq');
+const assert = require('../../utils/assert.js');
+const server = require('../../utils/server.js');
+const processor = require('../../../lib/processor.js');
+const fixtures = require('../../utils/fixtures');
 
 describe('trending', function() {
 
@@ -16,6 +17,9 @@
 });
 
 it('check response format', function() {
+for (let i = 0; i < 1000; i++) {
+processor.process(fixtures.edit);
+}
 return preq.get({
 uri: server.config.uri + 'en.wikipedia.org/v1/feed/trending-edits/'
 }).then(function(res) {
@@ -27,7 +31,11 @@
 assert.ok(res.body.pages !== undefined, 'Pages property on 
response');
 assert.ok(res.body.timestamp !== undefined,
 'Timestamp property on response shows how recent results were 
generated');
-assert.ok(res.body.pages.length === 0, 'Pages property is an 
array.');
+assert.ok(Array.isArray(res.body.pages), 'Pages property is an 
array.');
+const page = res.body.pages[0];
+assert.deepEqual(page.$merge, [
+
`https://en.wikipedia.org/api/rest_v1/page/summary/${fixtures.edit.page_title}`
+]);
 });
 });
 
diff --git a/test/utils/fixtures.js b/test/utils/fixtures.js
new file mode 100644
index 000..6eb46ec
--- /dev/null
+++ b/test/utils/fixtures.js
@@ -0,0 +1,42 @@
+'use strict';
+
+const fixtures = {};
+
+fixtures.edit = {
+"comment": "My cool edit",
+"database": "enwiki",
+"meta": {
+"domain": "en.wikipedia.org",
+"dt": "2016-12-08T18:48:56+00:00",
+"id": "f8e3664e-bd76-11e6-bf30-1418776136da",
+"request_id": "2b656cb8-4af5-40eb-b8ed-b4179035cad4",
+"schema_uri": "mediawiki/revision/create/1",
+"topic": "mediawiki.revision-create",
+"uri": "https://en.wikipedia.org/wiki/Exploding_whale;
+},
+"page_id": 12345,
+"page_is_redirect": false,
+"page_namespace": 0,
+"page_title": "Exploding_whale",
+"performer": {
+"user_groups": [
+"bot",
+"*",
+"user",
+"autoconfirmed"
+],
+"user_id": 12345,
+"user_is_bot": false,
+"user_text": "User-User"
+},
+"rev_content_format": "wikitext",
+"rev_content_model": "wikitext",
+"rev_id": 745642299,
+"rev_len": 10030,
+"rev_minor_edit": true,
+"rev_parent_id": 745642299,
+"rev_sha1": "3ujb8zwx1gzv35k2eif0058gr8842zx",
+"rev_timestamp": 

<    3   4   5   6   7   8   9   10   11   12   >