[MediaWiki-commits] [Gerrit] varnishkafka: update for logrotate - change (operations/puppet)

2016-02-24 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: varnishkafka: update for logrotate
..


varnishkafka: update for logrotate

Change-Id: I9084a83f0b92855fe1145746e624846f22fb19b4
---
M modules/varnishkafka
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/modules/varnishkafka b/modules/varnishkafka
index 9b53e51..eb7d317 16
--- a/modules/varnishkafka
+++ b/modules/varnishkafka
-Subproject commit 9b53e51fc45147330383559589fb59da871a785c
+Subproject commit eb7d3172106d3e2ab915d99f07a6525da9df94e1

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

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

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


[MediaWiki-commits] [Gerrit] varnishkafka: update for logrotate - change (operations/puppet)

2016-02-24 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: varnishkafka: update for logrotate
..

varnishkafka: update for logrotate

Change-Id: I9084a83f0b92855fe1145746e624846f22fb19b4
---
M modules/varnishkafka
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/87/273187/1

diff --git a/modules/varnishkafka b/modules/varnishkafka
index 9b53e51..eb7d317 16
--- a/modules/varnishkafka
+++ b/modules/varnishkafka
-Subproject commit 9b53e51fc45147330383559589fb59da871a785c
+Subproject commit eb7d3172106d3e2ab915d99f07a6525da9df94e1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9084a83f0b92855fe1145746e624846f22fb19b4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] ApiSandbox: Convert all pluses in URL to spaces, not just th... - change (mediawiki/core)

2016-02-24 Thread Majr (Code Review)
Majr has uploaded a new change for review.

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

Change subject: ApiSandbox: Convert all pluses in URL to spaces, not just the 
first one
..

ApiSandbox: Convert all pluses in URL to spaces, not just the first one

This would prevent linking to any query that contains spaces.

Change-Id: I45607c1eb465d4d9bf7bbb1de7098bb1450b5043
Task: T128053
---
M resources/src/mediawiki.special/mediawiki.special.apisandbox.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/86/273186/1

diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js 
b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
index bd1cad6..06d15384 100644
--- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
+++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
@@ -695,7 +695,7 @@
 
// I'm surprised this doesn't seem to exist in jQuery 
or mw.util.
params = {};
-   hash = hash.replace( '+', '%20' );
+   hash = hash.replace( /\+/g, '%20' );
re = /([^&=#]+)=?([^

[MediaWiki-commits] [Gerrit] Fix autosync: need full path - change (translatewiki)

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

Change subject: Fix autosync: need full path
..


Fix autosync: need full path

Change-Id: Iaa915cf1835b1585558560463a65f0d91347d02e
---
M bin/autosync.sh
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/bin/autosync.sh b/bin/autosync.sh
index ab017ac..03aec71 100755
--- a/bin/autosync.sh
+++ b/bin/autosync.sh
@@ -1,6 +1,7 @@
 #!/bin/sh
 
-echo blockly citationhunt codev freecol hivejs | xargs -n1 -P2 repo update
+echo blockly citationhunt codev freecol hivejs | \
+   xargs -n1 -P2 /home/betawiki/config/bin/repo update
 php 
/srv/mediawiki/targets/production/extensions/Translate/scripts/processMessageChanges.php
 \
--safe-import 
--group=out-blockly*,citationhunt,codev,out-freecol,hivejs* \
| xargs -l /home/betawiki/config/bin/udpcast

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa915cf1835b1585558560463a65f0d91347d02e
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix autosync: need full path - change (translatewiki)

2016-02-24 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Fix autosync: need full path
..

Fix autosync: need full path

Change-Id: Iaa915cf1835b1585558560463a65f0d91347d02e
---
M bin/autosync.sh
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/85/273185/1

diff --git a/bin/autosync.sh b/bin/autosync.sh
index ab017ac..03aec71 100755
--- a/bin/autosync.sh
+++ b/bin/autosync.sh
@@ -1,6 +1,7 @@
 #!/bin/sh
 
-echo blockly citationhunt codev freecol hivejs | xargs -n1 -P2 repo update
+echo blockly citationhunt codev freecol hivejs | \
+   xargs -n1 -P2 /home/betawiki/config/bin/repo update
 php 
/srv/mediawiki/targets/production/extensions/Translate/scripts/processMessageChanges.php
 \
--safe-import 
--group=out-blockly*,citationhunt,codev,out-freecol,hivejs* \
| xargs -l /home/betawiki/config/bin/udpcast

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa915cf1835b1585558560463a65f0d91347d02e
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 

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


[MediaWiki-commits] [Gerrit] Allow forking your own queries - change (analytics...web)

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

Change subject: Allow forking your own queries
..


Allow forking your own queries

Change-Id: I28f76201daeed197c1ed2eb9b0912fed4fefd579
---
M quarry/web/templates/query/view.html
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/quarry/web/templates/query/view.html 
b/quarry/web/templates/query/view.html
index c9f5a82..d4edbe1 100644
--- a/quarry/web/templates/query/view.html
+++ b/quarry/web/templates/query/view.html
@@ -37,11 +37,9 @@
  Star
 
 {% endif %}
-{% if not jsvars.can_edit %}
-
+
 Fork
 
-{% endif %}
 
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28f76201daeed197c1ed2eb9b0912fed4fefd579
Gerrit-PatchSet: 1
Gerrit-Project: analytics/quarry/web
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Allow forking your own queries - change (analytics...web)

2016-02-24 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Allow forking your own queries
..

Allow forking your own queries

Change-Id: I28f76201daeed197c1ed2eb9b0912fed4fefd579
---
M quarry/web/templates/query/view.html
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/quarry/web 
refs/changes/84/273184/1

diff --git a/quarry/web/templates/query/view.html 
b/quarry/web/templates/query/view.html
index c9f5a82..d4edbe1 100644
--- a/quarry/web/templates/query/view.html
+++ b/quarry/web/templates/query/view.html
@@ -37,11 +37,9 @@
  Star
 
 {% endif %}
-{% if not jsvars.can_edit %}
-
+
 Fork
 
-{% endif %}
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28f76201daeed197c1ed2eb9b0912fed4fefd579
Gerrit-PatchSet: 1
Gerrit-Project: analytics/quarry/web
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Fix typo in the README and copyedit - change (wikidata...gui)

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

Change subject: Fix typo in the README and copyedit
..


Fix typo in the README and copyedit

Change-Id: I6c70ef1ac2708dd0df5d14a4163811fba4f3ef55
---
M README.md
1 file changed, 2 insertions(+), 5 deletions(-)

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



diff --git a/README.md b/README.md
index 742483a..fb51ba4 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,6 @@
 Wikibase SPARQL Query GUI
 =
 
-THis repository contains the GUI for [Wikidata Query 
Service](https://query.wikidata.org/). 
+This repository contains the GUI for the [Wikidata Query 
Service](https://query.wikidata.org/).
 
-Please see more details on the service is [User 
Manual](https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual).
-
-
-
+Please see more details about the service in the [User 
Manual](https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual).

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c70ef1ac2708dd0df5d14a4163811fba4f3ef55
Gerrit-PatchSet: 3
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] SessionBackend: skip isUserSessionPrevented check for anons - change (mediawiki/core)

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

Change subject: SessionBackend: skip isUserSessionPrevented check for anons
..


SessionBackend: skip isUserSessionPrevented check for anons

For anon requests, the call to SessionManager::isUserSessionPrevented(
$this->user->getName() ) is both expensive (because of the need to
sanitize the IP) and pointless, because the session-prevention feature
is intended for named accounts. So short-circuit the check if the user is not
logged in.

Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
(cherry picked from commit 43420a0506b3115833d4b5d11b9e56579a967cdd)
---
M includes/session/SessionBackend.php
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/session/SessionBackend.php 
b/includes/session/SessionBackend.php
index a79c5cb..e85acbc 100644
--- a/includes/session/SessionBackend.php
+++ b/includes/session/SessionBackend.php
@@ -574,7 +574,9 @@
 * @param bool $closing Whether the session is being closed
 */
public function save( $closing = false ) {
-   if ( $this->provider->getManager()->isUserSessionPrevented( 
$this->user->getName() ) ) {
+   $anon = $this->user->isAnon();
+
+   if ( !$anon && 
$this->provider->getManager()->isUserSessionPrevented( $this->user->getName() ) 
) {
$this->logger->debug(
'SessionBackend "{session}" not saving, user 
{user} was ' .
'passed to 
SessionManager::preventSessionsForUser',
@@ -587,7 +589,6 @@
 
// Ensure the user has a token
// @codeCoverageIgnoreStart
-   $anon = $this->user->isAnon();
if ( !$anon && !$this->user->getToken( false ) ) {
$this->logger->debug(
'SessionBackend "{session}" creating token for 
user {user} on save',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.13
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] SessionBackend: skip isUserSessionPrevented check for anons - change (mediawiki/core)

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

Change subject: SessionBackend: skip isUserSessionPrevented check for anons
..


SessionBackend: skip isUserSessionPrevented check for anons

For anon requests, the call to SessionManager::isUserSessionPrevented(
$this->user->getName() ) is both expensive (because of the need to
sanitize the IP) and pointless, because the session-prevention feature
is intended for named accounts. So short-circuit the check if the user is not
logged in.

Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
(cherry picked from commit 43420a0506b3115833d4b5d11b9e56579a967cdd)
---
M includes/session/SessionBackend.php
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/session/SessionBackend.php 
b/includes/session/SessionBackend.php
index 5cf7869..977bb71 100644
--- a/includes/session/SessionBackend.php
+++ b/includes/session/SessionBackend.php
@@ -572,7 +572,9 @@
 * @param bool $closing Whether the session is being closed
 */
public function save( $closing = false ) {
-   if ( $this->provider->getManager()->isUserSessionPrevented( 
$this->user->getName() ) ) {
+   $anon = $this->user->isAnon();
+
+   if ( !$anon && 
$this->provider->getManager()->isUserSessionPrevented( $this->user->getName() ) 
) {
$this->logger->debug(
'SessionBackend "{session}" not saving, user 
{user} was ' .
'passed to 
SessionManager::preventSessionsForUser',
@@ -585,7 +587,6 @@
 
// Ensure the user has a token
// @codeCoverageIgnoreStart
-   $anon = $this->user->isAnon();
if ( !$anon && !$this->user->getToken( false ) ) {
$this->logger->debug(
'SessionBackend "{session}" creating token for 
user {user} on save',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.14
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] MT Client: Remove unused variable - change (mediawiki...cxserver)

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

Change subject: MT Client: Remove unused variable
..


MT Client: Remove unused variable

Change-Id: I24f3fb5ab35d7f812c7ed7b9f7ce668f9e28998e
---
M mt/MTClient.js
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/mt/MTClient.js b/mt/MTClient.js
index b472441..7afa926 100644
--- a/mt/MTClient.js
+++ b/mt/MTClient.js
@@ -48,13 +48,12 @@
  * @return {Promise} promise: Translated html
  */
 MTClient.prototype.translateHtml = function ( sourceLang, targetLang, 
sourceHtml ) {
-   var i, len, targetDoc, itemPromises, chain = [],
+   var i, len, targetDoc, chain = [],
self = this;
 
this.buildSourceDoc( sourceHtml );
// Clone and adapt sourceDoc
targetDoc = new LinearDoc.Doc( this.sourceDoc.wrapperTag );
-   itemPromises = [];
 
function translateItemDeferred( item ) {
if ( item.type !== 'textblock' ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24f3fb5ab35d7f812c7ed7b9f7ce668f9e28998e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] SessionBackend: skip isUserSessionPrevented check for anons - change (mediawiki/core)

2016-02-24 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: SessionBackend: skip isUserSessionPrevented check for anons
..

SessionBackend: skip isUserSessionPrevented check for anons

For anon requests, the call to SessionManager::isUserSessionPrevented(
$this->user->getName() ) is both expensive (because of the need to
sanitize the IP) and pointless, because the session-prevention feature
is intended for named accounts. So short-circuit the check if the user is not
logged in.

Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
(cherry picked from commit 43420a0506b3115833d4b5d11b9e56579a967cdd)
---
M includes/session/SessionBackend.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/83/273183/1

diff --git a/includes/session/SessionBackend.php 
b/includes/session/SessionBackend.php
index a79c5cb..e85acbc 100644
--- a/includes/session/SessionBackend.php
+++ b/includes/session/SessionBackend.php
@@ -574,7 +574,9 @@
 * @param bool $closing Whether the session is being closed
 */
public function save( $closing = false ) {
-   if ( $this->provider->getManager()->isUserSessionPrevented( 
$this->user->getName() ) ) {
+   $anon = $this->user->isAnon();
+
+   if ( !$anon && 
$this->provider->getManager()->isUserSessionPrevented( $this->user->getName() ) 
) {
$this->logger->debug(
'SessionBackend "{session}" not saving, user 
{user} was ' .
'passed to 
SessionManager::preventSessionsForUser',
@@ -587,7 +589,6 @@
 
// Ensure the user has a token
// @codeCoverageIgnoreStart
-   $anon = $this->user->isAnon();
if ( !$anon && !$this->user->getToken( false ) ) {
$this->logger->debug(
'SessionBackend "{session}" creating token for 
user {user} on save',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.13
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Fix autofocus on Special:Activeusers - change (mediawiki/core)

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

Change subject: Fix autofocus on Special:Activeusers
..


Fix autofocus on Special:Activeusers

Xml::inputLabel does not know about boolean parameters like autofocus,
so add it with an empty value or omitted it.

Fix validation error:
Bad value 1 for attribute autofocus on element input.

Change-Id: Idb7a7b58079d6c44b5a7f1fa226218bb685c8241
---
M includes/specials/SpecialActiveusers.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/includes/specials/SpecialActiveusers.php 
b/includes/specials/SpecialActiveusers.php
index c06db01..9c5fc2f 100644
--- a/includes/specials/SpecialActiveusers.php
+++ b/includes/specials/SpecialActiveusers.php
@@ -223,8 +223,10 @@
[
'class' => 'mw-ui-input-inline 
mw-autocomplete-user',
'tabindex' => 1,
-   'autofocus' => $this->requestedUser === '',
-   ]
+   ] + (
+   // Set autofocus on blank input
+   $this->requestedUser === '' ? [ 'autofocus' => 
'' ] : []
+   )
) . '';
 
$out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' 
)->text(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb7a7b58079d6c44b5a7f1fa226218bb685c8241
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Bump node dependency to >=4.3.0 - change (mediawiki...cxserver)

2016-02-24 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: Bump node dependency to >=4.3.0
..

Bump node dependency to >=4.3.0

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


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

diff --git a/package.json b/package.json
index 71df077..fc2de5f 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"url": "https://phabricator.wikimedia.org/tag/cxserver/;
},
"engines": {
-   "node": ">=0.10.0"
+   "node": ">=4.3.0"
},
"dependencies": {
"jsonwebtoken": "~5.0.2",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic550ba9cc849cb69a69285431cdd005665e4ca5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] Yandex Client: Remove unused variable - change (mediawiki...cxserver)

2016-02-24 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Yandex Client: Remove unused variable
..

Yandex Client: Remove unused variable

Change-Id: I24f3fb5ab35d7f812c7ed7b9f7ce668f9e28998e
---
M mt/MTClient.js
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/mt/MTClient.js b/mt/MTClient.js
index b472441..7afa926 100644
--- a/mt/MTClient.js
+++ b/mt/MTClient.js
@@ -48,13 +48,12 @@
  * @return {Promise} promise: Translated html
  */
 MTClient.prototype.translateHtml = function ( sourceLang, targetLang, 
sourceHtml ) {
-   var i, len, targetDoc, itemPromises, chain = [],
+   var i, len, targetDoc, chain = [],
self = this;
 
this.buildSourceDoc( sourceHtml );
// Clone and adapt sourceDoc
targetDoc = new LinearDoc.Doc( this.sourceDoc.wrapperTag );
-   itemPromises = [];
 
function translateItemDeferred( item ) {
if ( item.type !== 'textblock' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24f3fb5ab35d7f812c7ed7b9f7ce668f9e28998e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] SessionBackend: skip isUserSessionPrevented check for anons - change (mediawiki/core)

2016-02-24 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: SessionBackend: skip isUserSessionPrevented check for anons
..

SessionBackend: skip isUserSessionPrevented check for anons

For anon requests, the call to SessionManager::isUserSessionPrevented(
$this->user->getName() ) is both expensive (because of the need to
sanitize the IP) and pointless, because the session-prevention feature
is intended for named accounts. So short-circuit the check if the user is not
logged in.

Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
(cherry picked from commit 43420a0506b3115833d4b5d11b9e56579a967cdd)
---
M includes/session/SessionBackend.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/273180/1

diff --git a/includes/session/SessionBackend.php 
b/includes/session/SessionBackend.php
index 5cf7869..977bb71 100644
--- a/includes/session/SessionBackend.php
+++ b/includes/session/SessionBackend.php
@@ -572,7 +572,9 @@
 * @param bool $closing Whether the session is being closed
 */
public function save( $closing = false ) {
-   if ( $this->provider->getManager()->isUserSessionPrevented( 
$this->user->getName() ) ) {
+   $anon = $this->user->isAnon();
+
+   if ( !$anon && 
$this->provider->getManager()->isUserSessionPrevented( $this->user->getName() ) 
) {
$this->logger->debug(
'SessionBackend "{session}" not saving, user 
{user} was ' .
'passed to 
SessionManager::preventSessionsForUser',
@@ -585,7 +587,6 @@
 
// Ensure the user has a token
// @codeCoverageIgnoreStart
-   $anon = $this->user->isAnon();
if ( !$anon && !$this->user->getToken( false ) ) {
$this->logger->debug(
'SessionBackend "{session}" creating token for 
user {user} on save',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.14
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Add rudimentary performance timing drush command - change (wikimedia...crm)

2016-02-24 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Add rudimentary performance timing drush command
..

Add rudimentary performance timing drush command

This is primarily for the purposes of comparing the time it takes us to write 
transactions to CiviCRM. The function uses wmf processing, but bypasses the 
contribution_tracking for simplicity.

The real focus is whether CiviCRM processing speed changes for the sorts of 
functions we do

Bug: T127133
Change-Id: I80ba8cbd09a22a42786da4a951a5b8aed285054b
---
A sites/all/modules/queue2civicrm/queue_performance.drush.inc
A 
sites/all/modules/queue2civicrm/tests/data/donation_performance_profile_data.json
A sites/all/modules/queue2civicrm/tests/logs/perf.log
3 files changed, 4,102 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/79/273179/1


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

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

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


[MediaWiki-commits] [Gerrit] Youdao MT Client - change (mediawiki...cxserver)

2016-02-24 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Youdao MT Client
..

Youdao MT Client

Need a valid key to work.

Bug: T125956
Change-Id: I74b2db7c755a41843b848718f046559663889dc3
---
M config.dev.yaml
M config.prod.yaml
A mt/Youdao.js
M mt/index.js
4 files changed, 169 insertions(+), 2 deletions(-)


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

diff --git a/config.dev.yaml b/config.dev.yaml
index f3ae651..660238b 100644
--- a/config.dev.yaml
+++ b/config.dev.yaml
@@ -60,6 +60,9 @@
 yandex:
   api: https://translate.yandex.net
   key: null
+youdao:
+  api: https://fanyi.youdao.com/paidapi/fanyiapi
+  key: null
   registry:
 source:
   - ab
@@ -1200,6 +1203,11 @@
   - sq
   - ru
   - uz
+  Youdao:
+en:
+  - zh
+zh:
+  - en
 dictionary:
   Dictd:
 en:
diff --git a/config.prod.yaml b/config.prod.yaml
index 7260e52..bab6f61 100644
--- a/config.prod.yaml
+++ b/config.prod.yaml
@@ -59,7 +59,9 @@
   api: http://apertium.wmflabs.org
 yandex:
   api: https://translate.yandex.net
-  proxy: http://url-downloader.wikimedia.org:8080
+  key: null
+youdao:
+  api: https://fanyi.youdao.com/paidapi/fanyiapi
   key: null
   registry:
 source:
diff --git a/mt/Youdao.js b/mt/Youdao.js
new file mode 100644
index 000..27faac4
--- /dev/null
+++ b/mt/Youdao.js
@@ -0,0 +1,156 @@
+'use strict';
+
+var
+   util = require( 'util' ),
+   preq = require( 'preq' ),
+   LinearDoc = require( __dirname + '/../lineardoc' ),
+   BBPromise = require( 'bluebird' ),
+   MTClient = require( './MTClient.js' ),
+   youdaoLanguageNameMap;
+
+// Youdao language codes can differ from the language codes that
+// we use.
+youdaoLanguageNameMap = {
+   'en>zh': 'EN2ZH_CN', // English to Chinese Simplified
+   'en>ja': 'EN2JA', // English to Chinese Simplified
+   'simple>zh': 'EN2ZH_CN', // Simple English to Chinese Simplified
+   'en>zh-Hans': 'EN2ZH_CN', // English to Chinese Simplified
+   'ja>zh-Hans': 'JA2ZH_CN', // Japanese to Chinese Simplified,
+   'ja>zh': 'JA2ZH_CN', // Japanese to Chinese Simplified,
+   'ko>zh-Hans': 'KR2ZH_CN', // Korean to Chinese Simplified
+   'fr>zh-Hans': 'FR2ZH_CN', // Korean to Chinese Simplified
+   'ru>zh-Hans': 'RU2ZH_CN', // Russian to Chinese Simplified
+   'es>zh-Hans': 'SP2ZH_CN', // Spanish to Chinese Simplified
+   'zh-Hans>en': 'ZH_CN2EN', // Chinese Simplified to English
+   'zh-Hant>en': 'ZH_CN2EN', // Chinese Traditional to English
+   'zh>ja': 'ZH_CN2JA' // Chinese Traditional to English
+};
+// TODO: There are some more languages. See Youdao API documentation
+
+function Youdao( options ) {
+   this.logger = options.logger;
+   this.conf = options.conf;
+}
+
+util.inherits( Youdao, MTClient );
+
+/**
+ * Translate marked-up text
+ * Youdao does not support HTML translation. So we need to pass the plan text
+ * version. We are not piping this to translateText because we want to preseve
+ * the textblocks. But we cannot do annotation mapping because of complexity of
+ * segmentation for CJK languages.
+ *
+ * @param {string} sourceLang Source language code
+ * @param {string} targetLang Target language code
+ * @param {string} sourceHtml Source html
+ * @return {Promise} promise: Translated html
+ */
+Youdao.prototype.translateHtml = function ( sourceLang, targetLang, sourceHtml 
) {
+   var i, len, targetDoc, chain = [],
+   self = this;
+
+   this.buildSourceDoc( sourceHtml );
+   // Clone and adapt sourceDoc
+   targetDoc = new LinearDoc.Doc( this.sourceDoc.wrapperTag );
+
+   function translateItemDeferred( item ) {
+   if ( item.type !== 'textblock' ) {
+   return BBPromise.resolve( item );
+   }
+
+   return self.translateText(
+   sourceLang,
+   targetLang,
+   item.item.getPlainText()
+   ).then( function ( translated ) {
+   var newTextBlock;
+
+   newTextBlock = item.item.translateTags(
+   translated, {} // Range mapping is empty. We 
dont do annotation mapping.
+   );
+
+   return {
+   type: 'textblock',
+   item: newTextBlock
+   };
+   } );
+   }
+
+   for ( i = 0, len = this.sourceDoc.items.length; i < len; i++ ) {
+   chain.push( translateItemDeferred( this.sourceDoc.items[ i ] ) 
);
+   }
+

[MediaWiki-commits] [Gerrit] set new classes for in grand total table - change (operations...wikistats)

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

Change subject: set new classes for  in grand total table
..


set new classes for  in grand total table

The "grand total"-table also needs the new classes.
Like this it doesn't have any borders, which sucks.

Change-Id: Iee9059941cf6aa665d7069dbd41192b43024989c
---
M usr/share/php/wikistats/grandtotal.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/usr/share/php/wikistats/grandtotal.php 
b/usr/share/php/wikistats/grandtotal.php
index d13b56d..bffec2e 100644
--- a/usr/share/php/wikistats/grandtotal.php
+++ b/usr/share/php/wikistats/grandtotal.php
@@ -10,7 +10,7 @@
 
 echo <<< GRANDTOTAL
 
-
+
  
 Grand Total (of current display)
  

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee9059941cf6aa665d7069dbd41192b43024989c
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: RobiH 
Gerrit-Reviewer: Southparkfan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] set new classes for in grand total table - change (operations...wikistats)

2016-02-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: set new classes for  in grand total table
..

set new classes for  in grand total table

The "grand total"-table also needs the new classes.
Like this it doesn't have any borders, which sucks.

Change-Id: Iee9059941cf6aa665d7069dbd41192b43024989c
---
M usr/share/php/wikistats/grandtotal.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/77/273177/1

diff --git a/usr/share/php/wikistats/grandtotal.php 
b/usr/share/php/wikistats/grandtotal.php
index d13b56d..bffec2e 100644
--- a/usr/share/php/wikistats/grandtotal.php
+++ b/usr/share/php/wikistats/grandtotal.php
@@ -10,7 +10,7 @@
 
 echo <<< GRANDTOTAL
 
-
+
  
 Grand Total (of current display)
  

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee9059941cf6aa665d7069dbd41192b43024989c
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] Disable scenarios that fail at en.wikipedia.beta.wmflabs.org... - change (mediawiki...Flow)

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

Change subject: Disable scenarios that fail at en.wikipedia.beta.wmflabs.org 
from running daily
..


Disable scenarios that fail at en.wikipedia.beta.wmflabs.org from running daily

Bug: T94153
Change-Id: I4631d7c9f98e6ad399eccf027baa58b7358d1df1
---
M tests/browser/features/categories.feature
M tests/browser/features/flow_in_recent_changes.feature
M tests/browser/features/flow_logged_in.feature
M tests/browser/features/moderation.feature
M tests/browser/features/new_topic.feature
M tests/browser/features/opt_in.feature
M tests/browser/features/reply_moderation.feature
M tests/browser/features/resolve_topic.feature
M tests/browser/features/special_enableflow.feature
M tests/browser/features/suppress.feature
10 files changed, 7 insertions(+), 12 deletions(-)

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



diff --git a/tests/browser/features/categories.feature 
b/tests/browser/features/categories.feature
index 4706543..c82bd69 100644
--- a/tests/browser/features/categories.feature
+++ b/tests/browser/features/categories.feature
@@ -1,5 +1,4 @@
 @chrome @firefox @internet_explorer_10
-@en.wikipedia.beta.wmflabs.org
 Feature: Categories
 
   Assumes Flow is enabled for the Flow_test_talk namespace.
diff --git a/tests/browser/features/flow_in_recent_changes.feature 
b/tests/browser/features/flow_in_recent_changes.feature
index 573b000..c765eb1 100644
--- a/tests/browser/features/flow_in_recent_changes.feature
+++ b/tests/browser/features/flow_in_recent_changes.feature
@@ -1,6 +1,5 @@
 @chrome @firefox @internet_explorer_10
 @vagrant
-@en.wikipedia.beta.wmflabs.org
 Feature: Flow updates are in Recent Changes
 
   Background:
diff --git a/tests/browser/features/flow_logged_in.feature 
b/tests/browser/features/flow_logged_in.feature
index b76217b..607eff6 100644
--- a/tests/browser/features/flow_logged_in.feature
+++ b/tests/browser/features/flow_logged_in.feature
@@ -1,6 +1,5 @@
 @chrome @firefox
 @vagrant
-@en.wikipedia.beta.wmflabs.org
 Feature: Create new topic logged in
 
   It requires the cldr extension, a "Flow QA" page, and a "Selenium user" who 
has
diff --git a/tests/browser/features/moderation.feature 
b/tests/browser/features/moderation.feature
index 9eb3591..bf326b0 100644
--- a/tests/browser/features/moderation.feature
+++ b/tests/browser/features/moderation.feature
@@ -1,6 +1,5 @@
 @chrome @firefox @internet_explorer_10
 @vagrant
-@en.wikipedia.beta.wmflabs.org
 Feature: Moderation
 
   Background:
diff --git a/tests/browser/features/new_topic.feature 
b/tests/browser/features/new_topic.feature
index edf3b60..2b0ba47 100644
--- a/tests/browser/features/new_topic.feature
+++ b/tests/browser/features/new_topic.feature
@@ -1,5 +1,4 @@
 @chrome @firefox @internet_explorer_10
-@en.wikipedia.beta.wmflabs.org
 Feature: Creating a new topic
 
   Scenario: Add new Flow topic as anonymous user
diff --git a/tests/browser/features/opt_in.feature 
b/tests/browser/features/opt_in.feature
index 1510ec0..9eae904 100644
--- a/tests/browser/features/opt_in.feature
+++ b/tests/browser/features/opt_in.feature
@@ -1,6 +1,5 @@
 @chrome @firefox
 @vagrant
-@en.wikipedia.beta.wmflabs.org
 Feature: Opt-in Flow beta feature
 
   Depends on having $wgFlowEnableOptInBetaFeature = true
@@ -9,12 +8,13 @@
   Background:
 Given I am logged in as a new user
 
+  @en.wikipedia.beta.wmflabs.org
   Scenario: Opt-in: I don't have a talk page
 When I enable Flow beta feature
 Then my talk page is a Flow board
 And a notification tells me about it
 
-  @integration
+  @en.wikipedia.beta.wmflabs.org @integration
   Scenario: Opt-in: I have a wikitext talk page
 Given my talk page has wiktext content
 When I enable Flow beta feature
@@ -23,6 +23,7 @@
 And the board description contains the templates from my talk page
 And my previous talk page is archived
 
+  @en.wikipedia.beta.wmflabs.org
   Scenario: Opt-out: I didn't have a talk page
 Given I have Flow beta feature enabled
 When I disable Flow beta feature
diff --git a/tests/browser/features/reply_moderation.feature 
b/tests/browser/features/reply_moderation.feature
index 72ffaee..e7cee3d 100644
--- a/tests/browser/features/reply_moderation.feature
+++ b/tests/browser/features/reply_moderation.feature
@@ -1,5 +1,4 @@
 @chrome @firefox @internet_explorer_10
-@en.wikipedia.beta.wmflabs.org
 Feature: Reply moderation
 
   Background:
diff --git a/tests/browser/features/resolve_topic.feature 
b/tests/browser/features/resolve_topic.feature
index a66b661..957b661 100644
--- a/tests/browser/features/resolve_topic.feature
+++ b/tests/browser/features/resolve_topic.feature
@@ -1,6 +1,5 @@
 @chrome @firefox @internet_explorer_10
 @vagrant
-@en.wikipedia.beta.wmflabs.org
 Feature: Mark topic as resolved
 
   Background:
@@ -8,11 +7,13 @@
 And I am logged in
 And I am on Flow page
 
+  

[MediaWiki-commits] [Gerrit] use bootstrap/datatables for display.php as well - change (operations...wikistats)

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

Change subject: use bootstrap/datatables for display.php as well
..


use bootstrap/datatables for display.php as well

After the overhaul of the mainpage by Southparkfan
on I8b96119c4a3f83469d, also use bootstrap and datatables
for display.php so all the actual stats tables get the
new design and not just the main page.

Change-Id: I2166c6d09452d9a647f69c63e2aa84c1f340c910
---
M var/www/wikistats/display.php
1 file changed, 13 insertions(+), 2 deletions(-)

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



diff --git a/var/www/wikistats/display.php b/var/www/wikistats/display.php
index 9663e30..d548f62 100644
--- a/var/www/wikistats/display.php
+++ b/var/www/wikistats/display.php
@@ -241,14 +241,25 @@
 http://www.w3.org/1999/xhtml; lang="en" xml:lang="en">
 
 WikiStats - ${listname}
-
+
+
+
+
+
+
+
+$(document).ready(function() {
+$('#table').DataTable();
+} );
+
 
 
 DOCHEAD;
 
 print <<
-
+
+
 ${listname}
 
 THEAD_INTRO;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2166c6d09452d9a647f69c63e2aa84c1f340c910
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: RobiH 
Gerrit-Reviewer: Southparkfan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] use bootstrap/datatables for display.php as well - change (operations...wikistats)

2016-02-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: use bootstrap/datatables for display.php as well
..

use bootstrap/datatables for display.php as well

After the overhaul of the mainpage by Southparkfan
on I8b96119c4a3f83469d, also use bootstrap and datatables
for display.php so all the actual stats tables get the
new design and not just the main page.

Change-Id: I2166c6d09452d9a647f69c63e2aa84c1f340c910
---
M var/www/wikistats/display.php
1 file changed, 13 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/76/273176/1

diff --git a/var/www/wikistats/display.php b/var/www/wikistats/display.php
index 9663e30..d548f62 100644
--- a/var/www/wikistats/display.php
+++ b/var/www/wikistats/display.php
@@ -241,14 +241,25 @@
 http://www.w3.org/1999/xhtml; lang="en" xml:lang="en">
 
 WikiStats - ${listname}
-
+
+
+
+
+
+
+
+$(document).ready(function() {
+$('#table').DataTable();
+} );
+
 
 
 DOCHEAD;
 
 print <<
-
+
+
 ${listname}
 
 THEAD_INTRO;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2166c6d09452d9a647f69c63e2aa84c1f340c910
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] Use gray color for the code mirror placeholder text - change (wikidata...gui)

2016-02-24 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Use gray color for the code mirror placeholder text
..

Use gray color for the code mirror placeholder text

Gray is more typically used for placeholder text...

Change-Id: Ie9d6b3702273670365fde88d474b2b265caf007a
---
M style.css
1 file changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/style.css b/style.css
index 2633b39..a7169a1 100644
--- a/style.css
+++ b/style.css
@@ -47,6 +47,10 @@
min-height: 300px;
 }
 
+pre.CodeMirror-placeholder {
+   color: #77;
+}
+
 .exampleQueries {
width: 160px;
 }
@@ -130,8 +134,8 @@
 }
 
 .QueryExamples  .exampleTable {
-   max-height: 500px; 
-   overflow-y: auto; 
+   max-height: 500px;
+   overflow-y: auto;
overflow-x: hidden;
border: 1px solid #ccc;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9d6b3702273670365fde88d474b2b265caf007a
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] Fix typo in the README - change (wikidata...gui)

2016-02-24 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Fix typo in the README
..

Fix typo in the README

Change-Id: I6c70ef1ac2708dd0df5d14a4163811fba4f3ef55
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/README.md b/README.md
index 742483a..29ae98c 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 Wikibase SPARQL Query GUI
 =
 
-THis repository contains the GUI for [Wikidata Query 
Service](https://query.wikidata.org/). 
+This repository contains the GUI for [Wikidata Query 
Service](https://query.wikidata.org/).
 
 Please see more details on the service is [User 
Manual](https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual).
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c70ef1ac2708dd0df5d14a4163811fba4f3ef55
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] Provide an alternative to the pcntl_* functions - change (mediawiki...Scribunto)

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

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

Change subject: Provide an alternative to the pcntl_* functions
..

Provide an alternative to the pcntl_* functions

RedHat evidently doesn't come with these functions.

Bug: T128048
Change-Id: I7242e6e65a0103584af568229c38f1f7c7bd5331
---
M engines/LuaStandalone/LuaStandaloneEngine.php
1 file changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/73/273173/1

diff --git a/engines/LuaStandalone/LuaStandaloneEngine.php 
b/engines/LuaStandalone/LuaStandaloneEngine.php
index dcb47c2..788f332 100644
--- a/engines/LuaStandalone/LuaStandaloneEngine.php
+++ b/engines/LuaStandalone/LuaStandaloneEngine.php
@@ -641,10 +641,18 @@
protected function handleIOError() {
$this->checkValid();
proc_terminate( $this->proc );
-   $wstatus = proc_close( $this->proc );
-   $signaled = pcntl_wifsignaled( $wstatus );
-   $termsig = pcntl_wtermsig( $wstatus );
-   $exitcode = pcntl_wexitstatus( $wstatus );
+if ( function_exists( 'pcntl_wifsignaled' ) ) {
+$wstatus = proc_close( $this->proc );
+$signaled = pcntl_wifsignaled( $wstatus );
+$termsig = pcntl_wtermsig( $wstatus );
+$exitcode = pcntl_wexitstatus( $wstatus );
+} else {
+$status = proc_get_status( $this->proc );
+$wstatus = proc_close( $this->proc );
+$signaled = $status['signaled'];
+$termsig = $status['termsig'];
+$esitcode = $status['exitcode'];
+}
$this->proc = false;
if ( $signaled ) {
if ( defined( 'SIGXCPU' ) && $termsig == SIGXCPU ) {

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

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

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


[MediaWiki-commits] [Gerrit] Create flex-license banch - change (mediawiki...UploadWizard)

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

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

Change subject: Create flex-license banch
..

Create flex-license banch

For work that Daren and I have planned.

Change-Id: I894dc90b1ff7c1081954783682e0928e09fca804
---
M .gitreview
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/72/273172/1

diff --git a/.gitreview b/.gitreview
index 7e1443d..3341103 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,4 +2,4 @@
 host=gerrit.wikimedia.org
 port=29418
 project=mediawiki/extensions/UploadWizard.git
-defaultbranch=master
+defaultbranch=flex-license

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I894dc90b1ff7c1081954783682e0928e09fca804
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: flex-license
Gerrit-Owner: MarkAHershberger 

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


[MediaWiki-commits] [Gerrit] Portal referrer data (WIP) - change (wikimedia...golden)

2016-02-24 Thread OliverKeyes (Code Review)
OliverKeyes has submitted this change and it was merged.

Change subject: Portal referrer data (WIP)
..


Portal referrer data (WIP)

- NOTE: still a work in progress
- Adds a data collection script that's basically just
external_traffic/search_refers.R but specifically
for Portal traffic.
- Also collects data on the breakdown of pageviews by
platform-- desktop vs mobile web vs mobile app(?)

Bug: T127868, T127867
Change-Id: I491dbbc553733943028edea90d40008de711041a
---
M external_traffic/search_referers.R
A portal/referers.R
2 files changed, 76 insertions(+), 15 deletions(-)

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



diff --git a/external_traffic/search_referers.R 
b/external_traffic/search_referers.R
index 5abeeb6..9bd1ad7 100644
--- a/external_traffic/search_referers.R
+++ b/external_traffic/search_referers.R
@@ -21,25 +21,25 @@
CREATE TEMPORARY FUNCTION get_engine AS
   
'org.wikimedia.analytics.refinery.hive.IdentifySearchEngineUDF';
USE wmf;
-   SELECT year, month, day,
-   is_external_search(referer) AS is_search,
-   classify_referer(referer) AS referer_class,
-   get_engine(referer) as search_engine,
-   access_method,
-   COUNT(*) AS pageviews
-   FROM webrequest
-  ", subquery,
-  "AND webrequest_source = 'text' AND is_pageview = true
-  AND access_method IN('desktop','mobile web')
-  GROUP BY year, month, day, is_external_search(referer), 
classify_referer(referer),
-  get_engine(referer), access_method;")
+   SELECT
+ is_external_search(referer) AS is_search,
+ classify_referer(referer) AS referer_class,
+ get_engine(referer) as search_engine,
+ access_method,
+ COUNT(*) AS pageviews
+   FROM webrequest", subquery, "
+ AND webrequest_source = 'text' AND is_pageview = true
+ AND access_method IN('desktop','mobile web')
+   GROUP BY
+ is_external_search(referer), classify_referer(referer),
+ get_engine(referer), access_method;")
   results <- query_hive(query)
   
   # Sanitise the resulting data
-  results <- results[!is.na(results$month),]
-  results$date <- as.Date(paste(results$year, results$month, results$day, sep 
= "-"))
+  results <- results[!is.na(results$pageviews), ]
+  results$date <- date
   results <- results[, c("date", "is_search", "referer_class", 
"search_engine", "access_method","pageviews")]
-  results$is_search <- ifelse(results$is_search == "true", TRUE, FALSE)
+  results$is_search <- results$is_search == "true"
   
   # Write out
   conditional_write(results, file.path(base_path, "referer_data.tsv"))
diff --git a/portal/referers.R b/portal/referers.R
new file mode 100644
index 000..7030051
--- /dev/null
+++ b/portal/referers.R
@@ -0,0 +1,61 @@
+# Per-file config:
+base_path <- paste0(write_root, "portal/")
+check_dir(base_path)
+
+main <- function(date = NULL){
+  
+  # Date handling
+  if(is.null(date)){
+date <- Sys.Date() - 1
+  }
+  
+  # Date subquery
+  subquery <- date_clause(date)
+  
+  # Write query and run it
+  query <- paste0("ADD JAR /home/ironholds/refinery-hive-0.0.21-SNAPSHOT.jar;
+  CREATE TEMPORARY FUNCTION is_external_search AS
+  'org.wikimedia.analytics.refinery.hive.IsExternalSearchUDF';
+  CREATE TEMPORARY FUNCTION classify_referer AS
+  'org.wikimedia.analytics.refinery.hive.RefererClassifyUDF';
+  CREATE TEMPORARY FUNCTION get_engine AS
+  
'org.wikimedia.analytics.refinery.hive.IdentifySearchEngineUDF';
+  USE wmf;
+  SELECT
+is_external_search(referer) AS is_search,
+classify_referer(referer) AS referer_class,
+get_engine(referer) as search_engine,
+access_method,
+COUNT(*) AS pageviews
+  FROM webrequest", subquery, "
+AND webrequest_source IN('text','mobile')
+AND content_type RLIKE('^text/html')
+AND uri_host IN('www.wikipedia.org','wikipedia.org')
+AND access_method IN('desktop','mobile web')
+  GROUP BY
+is_external_search(referer),
+classify_referer(referer),
+get_engine(referer),
+access_method;")
+  results <- query_hive(query)
+  
+  # Sanitise the resulting data
+  results <- results[!is.na(results$pageviews), ]
+  results$date <- date
+  results 

[MediaWiki-commits] [Gerrit] ApiSandbox: Visual separation of fields - change (mediawiki/core)

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

Change subject: ApiSandbox: Visual separation of fields
..


ApiSandbox: Visual separation of fields

This adds a faint line between the fields in ApiSandbox's pages, to make
it easier to see what goes with what.

Bug: T126994
Change-Id: I900ebf8755b21f19ef2673dcedc0f9a71237bf46
---
M resources/src/mediawiki.special/mediawiki.special.apisandbox.css
M resources/src/mediawiki.special/mediawiki.special.apisandbox.js
2 files changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.css 
b/resources/src/mediawiki.special/mediawiki.special.apisandbox.css
index e52955f..2517605 100644
--- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.css
+++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.css
@@ -33,6 +33,14 @@
width: 5em;
 }
 
+.mw-apisandbox-help-field {
+   border-bottom: 1px solid rgba( 0, 0, 0, 0.1 );
+}
+
+.mw-apisandbox-help-field:last-child {
+   border-bottom: none;
+}
+
 .mw-apisandbox-optionalWidget {
width: 100%;
 }
diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js 
b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
index 10664fa..bd1cad6 100644
--- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
+++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js
@@ -1326,6 +1326,7 @@
classes: [ 
'mw-apisandbox-spacer' ]
} ), {
align: 'inline',
+   classes: [ 
'mw-apisandbox-help-field' ],
label: dl
}
);
@@ -1335,6 +1336,7 @@
widget,
{
align: 'left',
+   classes: [ 
'mw-apisandbox-widget-field' ],
label: prefix + 
pi.parameters[ i ].name,
$label: 
$widgetLabel
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I900ebf8755b21f19ef2673dcedc0f9a71237bf46
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] SessionBackend: skip isUserSessionPrevented check for anons - change (mediawiki/core)

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

Change subject: SessionBackend: skip isUserSessionPrevented check for anons
..


SessionBackend: skip isUserSessionPrevented check for anons

For anon requests, the call to SessionManager::isUserSessionPrevented(
$this->user->getName() ) is both expensive (because of the need to
sanitize the IP) and pointless, because the session-prevention feature
is intended for named accounts. So short-circuit the check if the user is not
logged in.

Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
---
M includes/session/SessionBackend.php
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/session/SessionBackend.php 
b/includes/session/SessionBackend.php
index 0a9191b..0424a2d 100644
--- a/includes/session/SessionBackend.php
+++ b/includes/session/SessionBackend.php
@@ -572,7 +572,9 @@
 * @param bool $closing Whether the session is being closed
 */
public function save( $closing = false ) {
-   if ( $this->provider->getManager()->isUserSessionPrevented( 
$this->user->getName() ) ) {
+   $anon = $this->user->isAnon();
+
+   if ( !$anon && 
$this->provider->getManager()->isUserSessionPrevented( $this->user->getName() ) 
) {
$this->logger->debug(
'SessionBackend "{session}" not saving, user 
{user} was ' .
'passed to 
SessionManager::preventSessionsForUser',
@@ -585,7 +587,6 @@
 
// Ensure the user has a token
// @codeCoverageIgnoreStart
-   $anon = $this->user->isAnon();
if ( !$anon && !$this->user->getToken( false ) ) {
$this->logger->debug(
'SessionBackend "{session}" creating token for 
user {user} on save',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Automatically cancel obvious Adyen fraud - change (wikimedia...SmashPig)

2016-02-24 Thread Cdentinger (Code Review)
Cdentinger has submitted this change and it was merged.

Change subject: Automatically cancel obvious Adyen fraud
..


Automatically cancel obvious Adyen fraud

So Donor Services only has to deal with the edge cases.

Replace risk-threshold setting with review-threshold and reject-threshold.

Add a 'cancel' method to Adyen API class.

Bug: T128004
Change-Id: Iff543f2980f921555cf785ad19b948acd601ec1b
---
M PaymentProviders/Adyen/AdyenPaymentsAPI.php
M PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
M config_defaults.php
3 files changed, 72 insertions(+), 12 deletions(-)

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



diff --git a/PaymentProviders/Adyen/AdyenPaymentsAPI.php 
b/PaymentProviders/Adyen/AdyenPaymentsAPI.php
index 41c8a1e..a61b43d 100644
--- a/PaymentProviders/Adyen/AdyenPaymentsAPI.php
+++ b/PaymentProviders/Adyen/AdyenPaymentsAPI.php
@@ -63,4 +63,37 @@
return false;
}
}
+
+   /**
+* Cancels an Adyen authorization
+*
+* @param string $pspReference Original pspReference of the request
+*
+* @returns bool|string Result will be false on SOAP exception or 
remote request denial.
+* If request was successful the return result will be a pspReference 
string to this modification.
+*/
+   public function cancel( $pspReference ) {
+   $data = new WSDL\cancel();
+   $data->modificationRequest = new WSDL\ModificationRequest();
+
+   $data->modificationRequest->merchantAccount = $this->account;
+   $data->modificationRequest->originalReference = $pspReference;
+
+   $tl = new TaggedLogger( 'RawData' );
+   $tl->info( 'Launching SOAP capture request', $data );
+
+   try {
+   $resp = $this->soapClient->cancel( $data );
+   } catch ( \Exception $ex ) {
+   Logger::error( 'SOAP capture request threw exception!', 
null, $ex );
+   return false;
+   }
+
+   if ( $resp->captureResult->response == '[cancel-received]' ) {
+   return $resp->captureResult->pspReference;
+   } else {
+   Logger::error( 'SOAP capture request did not work as 
expected!', $resp );
+   return false;
+   }
+   }
 }
diff --git a/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php 
b/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
index b2af546..e696c03 100644
--- a/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
+++ b/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
@@ -25,6 +25,11 @@
protected $pspReference;
protected $avsResult;
protected $cvvResult;
+   // Actions to take after examining capture request and queue message
+   const ACTION_IGNORE = 'ignore'; // no donor info or auth already 
captured, do nothing
+   const ACTION_PROCESS = 'process'; // all clear to capture payment
+   const ACTION_REJECT = 'reject'; // very likely fraud - cancel the 
authorization
+   const ACTION_REVIEW = 'review'; // potential fraud - do not capture now
 
public static function factory( Authorisation $authMessage ) {
$obj = new ProcessCaptureRequestJob();
@@ -57,7 +62,8 @@
$queueMessage = $pendingQueue->queueGetObject( null, 
$this->correlationId );
$success = true;
 
-   if ( $this->shouldCapture( $queueMessage ) ) {
+   $action = $this->determineAction( $queueMessage );
+   if ( $action == self::ACTION_PROCESS ) {
// Attempt to capture the payment
$api = new AdyenPaymentsAPI( $this->account );
Logger::info(
@@ -89,13 +95,26 @@
);
$success = false;
}
+   } else if ( $action == self::ACTION_REJECT ) {
+   Logger::debug( "Cancelling authorization with reference 
'{$this->pspReference}'" );
+   $api = new AdyenPaymentsAPI( $this->account );
+   $result = $api->cancel( $this->pspReference );
+   if ( $result ) {
+   Logger::debug( "Successfully cancelled 
authorization" );
+   } else {
+   // Not a big deal
+   Logger::warning( "Failed to cancel 
authorization, it will remain in the payment console" );
+   }
+   // Delete the queue message whatever happened
+   $pendingQueue->queueAckObject();
+   $pendingQueue->removeObjectsById( $this->correlationId 
);
}
 
   

[MediaWiki-commits] [Gerrit] T127983: Don't crash on misconfigured statsd host - change (mediawiki...parsoid)

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

Change subject: T127983: Don't crash on misconfigured statsd host
..


T127983: Don't crash on misconfigured statsd host

 * Do this manually for now, but will try to upstream this as a method
   instead of calling an async func in the initializer.

Change-Id: I31fbf3a6574a66ae6f52b543e4eb7afc40c99ade
---
M lib/config/ParsoidConfig.js
M lib/utils/Util.js
2 files changed, 21 insertions(+), 6 deletions(-)

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



diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index ac50d0f..d8646a3 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -159,7 +159,13 @@
 
// Timer that reports metrics to statsd
if (this.useDefaultPerformanceTimer) {
-   this.performanceTimer = new Util.StatsD(this.txstatsdHost, 
this.txstatsdPort);
+   var self = this;
+   Util.StatsD(this.txstatsdHost, 
this.txstatsdPort).then(function(pt) {
+   self.performanceTimer = pt;
+   }).catch(function(err) {
+   // FIXME: This isn't going to the logger.
+   console.log('Failed to initialize performance timer: ' 
+ err);
+   });
}
 
// ParsoidConfig is used across requests. Freeze it to avoid mutation.
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index ce2fd7f..4e6a260 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -5,6 +5,7 @@
 'use strict';
 require('../../core-upgrade.js');
 
+var dns = require('dns');
 var async = require('async');
 var crypto = require('crypto');
 var request = require('request');
@@ -12,6 +13,7 @@
 var TXStatsD = require('node-txstatsd');
 var Consts = require('../config/WikitextConstants.js').WikitextConstants;
 var JSUtils = require('./jsutils.js').JSUtils;
+var Promise = require('./promise.js');
 
 var lastItem = JSUtils.lastItem;
 
@@ -1487,7 +1489,7 @@
 Util.magicMasqs = new Set(["defaultsort", "displaytitle"]);
 
 // StatsD wrapper
-Util.StatsD = function(statsdHost, statsdPort) {
+var StatsD = function(statsdHost, statsdPort) {
this.statsd = new TXStatsD({
host:  statsdHost,
port:  statsdPort,
@@ -1495,14 +1497,14 @@
suffix:'',
txstatsd:  false,
globalize: false,
-   cacheDns:  true,
+   cacheDns:  false,  // Doing this ourselves below.
mock:  false,
});
 
this.nameCache = {};
 };
 
-Util.StatsD.prototype.makeName = function makeName(name) {
+StatsD.prototype.makeName = function makeName(name) {
// See https://github.com/etsy/statsd/issues/110
// Only [\w_.-] allowed, with '.' being the hierarchy separator.
// Regex sanitizes string to a statsd valid form that also resembles a 
path
@@ -1517,7 +1519,7 @@
}
 };
 
-Util.StatsD.prototype.timing = function timing(name, suffix, delta) {
+StatsD.prototype.timing = function timing(name, suffix, delta) {
name = this.makeName(name);
if (Array.isArray(suffix)) {
// Send several timings at once
@@ -1532,11 +1534,18 @@
return delta;
 };
 
-Util.StatsD.prototype.count = function count(name, suffix) {
+StatsD.prototype.count = function count(name, suffix) {
suffix = suffix ? '.' + suffix : '';
this.statsd.increment(this.makeName(name) + suffix);
 };
 
+var dnsLookup = Promise.promisify(dns.lookup, false, dns);
+Util.StatsD = function(statsdHost, statsdPort) {
+   return dnsLookup(statsdHost).then(function(address) {
+   return new StatsD(address, statsdPort);
+   });
+};
+
 // A simple console reporter. Useful for development.
 Util.LogStatsD = function() {
var self = this;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I31fbf3a6574a66ae6f52b543e4eb7afc40c99ade
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: GWicke 
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] wikistats: no interactive password for mysqldump - change (operations/puppet)

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

Change subject: wikistats: no interactive password for mysqldump
..


wikistats: no interactive password for mysqldump

Change-Id: Ifae3e39b822fbb155065f7472e4b0ba46f77f94c
---
M modules/wikistats/manifests/db.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/wikistats/manifests/db.pp 
b/modules/wikistats/manifests/db.pp
index ed72a71..2cccb26 100644
--- a/modules/wikistats/manifests/db.pp
+++ b/modules/wikistats/manifests/db.pp
@@ -10,7 +10,7 @@
 # db backup
 cron { 'mysql-dump-wikistats':
 ensure  => 'present',
-command => "/usr/bin/mysqldump -u root -p wikistats > 
${wikistats::db::backupdir}/wikistats_db_$(date +%Y%m%d).sql && gzip 
${backupdir}/wikistats_db_$(date +%Y%m%d).sql",
+command => "/usr/bin/mysqldump -u root wikistats > 
${wikistats::db::backupdir}/wikistats_db_$(date +%Y%m%d).sql && gzip 
${backupdir}/wikistats_db_$(date +%Y%m%d).sql",
 user=> 'root',
 hour=> '0',
 minute  => '15',

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

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

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


[MediaWiki-commits] [Gerrit] Break for [[ in table attribute values too - change (mediawiki...parsoid)

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

Change subject: Break for [[ in table attribute values too
..


Break for [[ in table attribute values too

 * 65c72b14 was incomplete in that it is insufficient to only check for
   [[ in the attribute name. The code in php's doTableStuff will also
   abort attribute parsing if it finds the [[ in the value as well.

 * Now that 9834cd6b has landed, we have access to all the text on the
   line and can use the presence of [[ to avoid the unnecessary escaping
   seen here. For another day ...

Change-Id: I01c8ffcc87d0567b2d10906961840414426ca7d2
---
M lib/wt2html/pegTokenizer.pegjs.txt
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 25 insertions(+), 18 deletions(-)

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



diff --git a/lib/wt2html/pegTokenizer.pegjs.txt 
b/lib/wt2html/pegTokenizer.pegjs.txt
index d34517d..9a3806e 100644
--- a/lib/wt2html/pegTokenizer.pegjs.txt
+++ b/lib/wt2html/pegTokenizer.pegjs.txt
@@ -2059,27 +2059,29 @@
 // n.b. ! is a permissible char in the three rules below.
 // We only break on !! in th, enforced by the inline break.
 // Hence, it isn't included in the stop set.
+// [ is also permissible but we give a chance to break
+// for the [[ special case in php's doTableStuff (See T2553).
 
 // The stop set is space_or_newline and | which matches table_att_value.
 table_attribute_preprocessor_text
-  = r:( $[^{}&<\-! \t\n\r\x0c|]+
-  / !inline_breaks s:( directive / [{}&<\-!] ) { return s; }
+  = r:( $[^{}&<\-!\[ \t\n\r\x0c|]+
+  / !inline_breaks s:( directive / [{}&<\-!\[] ) { return s; }
   )+ {
 return tu.flattenString(r);
   }
 
 // The stop set is '\r\n| which matches table_att_value.
 table_attribute_preprocessor_text_single
-  = r:( $[^{}&<\-!'\r\n|]+
-  / !inline_breaks s:( directive / [{}&<\-!] ) { return s; }
+  = r:( $[^{}&<\-!\['\r\n|]+
+  / !inline_breaks s:( directive / [{}&<\-!\[] ) { return s; }
   )* {
 return tu.flattenString(r);
   }
 
 // The stop set is "\r\n| which matches table_att_value.
 table_attribute_preprocessor_text_double
-  = r:( $[^{}&<\-!"\r\n|]+
-  / !inline_breaks s:( directive / [{}&<\-!] ) { return s; }
+  = r:( $[^{}&<\-!\["\r\n|]+
+  / !inline_breaks s:( directive / [{}&<\-!\[] ) { return s; }
   )* {
 return tu.flattenString(r);
   }
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 593ba35..4d26b47 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -327,7 +327,7 @@
 add("wt2wt", "Template with invalid target containing wikilink", 
"{{[[Main Page]]}}\n");
 add("wt2wt", "Template with argument in separate line", "{{templateasargtest  
|\n templ = simple }}");
 add("wt2wt", "BUG 553: link with two variables in a piped link", 
"{|\n|[[{{{1}}}|{{{2}}}]]\n|}");
-add("wt2wt", "Abort table cell attribute parsing on wikilink", "{|\n| testing 
[[one|two]] | three || four\n| testing one two | three || 
four\n|}");
+add("wt2wt", "Abort table cell attribute parsing on wikilink", "{|\n| testing 
[[one|two]] | three || four\n| testing one two | three || 
four\n| testing=\"[[one|two]]\" | three || four\n|}");
 add("wt2wt", "Template with targets containing wikilinks", 
"{{[[foo]]}}\n\n{{[[{{echo|foo}}]]}}\n\necho|[[foo}}]]}}\n");
 add("wt2wt", "2. includeonly in html attr value", "v1v2\">bar\nv1v2\">bar\n");
 add("wt2wt", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR", "{{echo|}}\n{| width=\"100%\"\n|foo\n|}");
@@ -463,7 +463,7 @@
 add("html2html", "Template unnamed parameter", "the main page\n");
 add("html2html", "Template with complex arguments", "link
 This is a test template with parameter (test)\n");
 add("html2html", "BUG 553: link with two variables in a piped link", "\n[[{{{1}}}|{{{2}}}]]\n\n");
-add("html2html", "Abort table cell attribute parsing on wikilink", "\n testing two | three 

 four\n
 three 
 four\n\n");
+add("html2html", "Abort table cell attribute parsing on wikilink", "\n testing two | three 

 four\n
 three 
 four\n 
testing=\"two\" | three 

 four\n\n");
 add("html2html", "Template parameter as link source", "link\n");
 add("html2html", "Template as link source", "Main Page\n\nMain Page\n\nMain PagePage\n");
 add("html2html", "Template infinite loop", "Template loop detected: 
Template:Loop1\n");
@@ -919,7 +919,7 @@
 add("html2wt", "Template with complex template as argument", "This is a test 
template with parameter (test)\n");
 add("html2wt", "Template with complex arguments", 
"[[wiki/Template:Complextemplate|link]] This is a test template with parameter 
(test)\n");
 add("html2wt", "BUG 553: link with two variables in a piped link", 
"{|\n|[[{{{1}}}|{{{2}}}]]\n|}\n");
-add("html2wt", "Abort table cell attribute parsing on wikilink", "{|\n| 
testing [[one|two]] | three || four\n| testing one two | three 
|| four\n|}\n");
+add("html2wt", 

[MediaWiki-commits] [Gerrit] wikistats: no interactive password for mysqldump - change (operations/puppet)

2016-02-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: wikistats: no interactive password for mysqldump
..

wikistats: no interactive password for mysqldump

Change-Id: Ifae3e39b822fbb155065f7472e4b0ba46f77f94c
---
M modules/wikistats/manifests/db.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/273171/1

diff --git a/modules/wikistats/manifests/db.pp 
b/modules/wikistats/manifests/db.pp
index ed72a71..2cccb26 100644
--- a/modules/wikistats/manifests/db.pp
+++ b/modules/wikistats/manifests/db.pp
@@ -10,7 +10,7 @@
 # db backup
 cron { 'mysql-dump-wikistats':
 ensure  => 'present',
-command => "/usr/bin/mysqldump -u root -p wikistats > 
${wikistats::db::backupdir}/wikistats_db_$(date +%Y%m%d).sql && gzip 
${backupdir}/wikistats_db_$(date +%Y%m%d).sql",
+command => "/usr/bin/mysqldump -u root wikistats > 
${wikistats::db::backupdir}/wikistats_db_$(date +%Y%m%d).sql && gzip 
${backupdir}/wikistats_db_$(date +%Y%m%d).sql",
 user=> 'root',
 hour=> '0',
 minute  => '15',

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

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

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


[MediaWiki-commits] [Gerrit] wikistats: fix date in mysqldump file name again - change (operations/puppet)

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

Change subject: wikistats: fix date in mysqldump file name again
..


wikistats: fix date in mysqldump file name again

Change-Id: I7bee1ea3a4d2f5a3d8fac3383af247aad12f4b2e
---
M modules/wikistats/manifests/db.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/wikistats/manifests/db.pp 
b/modules/wikistats/manifests/db.pp
index 67d937d..ed72a71 100644
--- a/modules/wikistats/manifests/db.pp
+++ b/modules/wikistats/manifests/db.pp
@@ -10,7 +10,7 @@
 # db backup
 cron { 'mysql-dump-wikistats':
 ensure  => 'present',
-command => "today=$(date +%Y%m%d) && /usr/bin/mysqldump -u root -p 
wikistats > ${wikistats::db::backupdir}/wikistats_db_${today}.sql && gzip 
${backupdir}/wikistats_db_${today}.sql",
+command => "/usr/bin/mysqldump -u root -p wikistats > 
${wikistats::db::backupdir}/wikistats_db_$(date +%Y%m%d).sql && gzip 
${backupdir}/wikistats_db_$(date +%Y%m%d).sql",
 user=> 'root',
 hour=> '0',
 minute  => '15',

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

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

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


[MediaWiki-commits] [Gerrit] Add 'npm-node-4.3' as experimental for the 'npm' template - change (integration/config)

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

Change subject: Add 'npm-node-4.3' as experimental for the 'npm' template
..


Add 'npm-node-4.3' as experimental for the 'npm' template

Change-Id: I9683fef1f956abc4c7abfd8ad16251e5bded83e1
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index b6ae80a..509f413 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1360,6 +1360,8 @@
   - npm
 gate-and-submit:
   - npm
+experimental:
+  - npm-node-4.3
 
   - name: npm-node-4.3
 test:

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

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

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


[MediaWiki-commits] [Gerrit] Add 'npm-node-4.3' as experimental for the 'npm' template - change (integration/config)

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

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

Change subject: Add 'npm-node-4.3' as experimental for the 'npm' template
..

Add 'npm-node-4.3' as experimental for the 'npm' template

Change-Id: I9683fef1f956abc4c7abfd8ad16251e5bded83e1
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/70/273170/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index b6ae80a..509f413 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1360,6 +1360,8 @@
   - npm
 gate-and-submit:
   - npm
+experimental:
+  - npm-node-4.3
 
   - name: npm-node-4.3
 test:

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

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

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


[MediaWiki-commits] [Gerrit] Update RejectParserCacheValue hook handler - change (mediawiki...MobileFrontend)

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

Change subject: Update RejectParserCacheValue hook handler
..


Update RejectParserCacheValue hook handler

 has broken section edit
links. I confirmed that the code responsible for the bug is no longer active by
disabling the parser cache on mw1099 and forcing the page to be re-parsed. The
re-parsed page did not exhibit the bug, so this must be a matter of cached
output.

Bug: T124356
Change-Id: I4b8ced3cb5bf37d3df9a61ab68054db006d56c05
---
M includes/MobileFrontend.hooks.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index ff612c0..45170f6 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1338,8 +1338,9 @@
 * @return bool
 */
public static function onRejectParserCacheValue( $value, $wikiPage, 
$popts ) {
-   if ( strpos( $value->getRawText(), 'https://gerrit.wikimedia.org/r/273126
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b8ced3cb5bf37d3df9a61ab68054db006d56c05
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Run the survey at lowered rate - change (operations/mediawiki-config)

2016-02-24 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Run the survey at lowered rate
..

Run the survey at lowered rate

Bug: T125946
Change-Id: I1934a7d54429e9570b4a1c3e06205d61cbbb8571
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6b4be92..c7631ce 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16511,7 +16511,7 @@
'link' => 'Reader-segmentation-3prime-link',
'question' => 'Reader-segmentation-3-message',
'privacyPolicy' => 'Reader-segmentation-3prime-privacy',
-   'coverage' => 0.5, // Expected to increase to 0.002 
soon after going live
+   'coverage' => 0.5,
'platforms' => array(
'desktop' => array( 'stable' ),
'mobile' => array( 'stable' ),

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

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

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


[MediaWiki-commits] [Gerrit] Add npm-node-4.3 test to experimental: in a few templates - change (integration/config)

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

Change subject: Add npm-node-4.3 test to experimental: in a few templates
..


Add npm-node-4.3 test to experimental: in a few templates

It will allow us to test this new version on mediawiki repos without
having any problems if it fails.

Change-Id: I98e0c09e77252062b0e3ab77bb624fbd69358c55
---
M zuul/layout.yaml
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 85c2efa..b6ae80a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1066,6 +1066,7 @@
   - mwext-testextension-php53-composer
   - mwext-testextension-hhvm-composer
   - npm
+  - npm-node-4.3
   - composer-php53
   - composer-php55
   - composer-hhvm
@@ -1093,6 +1094,7 @@
 experimental:
  - mwext-qunit-composer
  - npm
+ - npm-node-4.3
  - composer-php53
  - composer-php55
  - composer-hhvm
@@ -1125,6 +1127,7 @@
   - mwext-testextension-php53-composer
   - mwext-testextension-hhvm-composer
   - npm
+  - npm-node-4.3
   - composer-php53
   - composer-php55
   - composer-hhvm
@@ -1153,6 +1156,7 @@
   - mwext-testextension-php53-composer
   - mwext-testextension-hhvm-composer
   - npm
+  - npm-node-4.3
   - composer-php53
   - composer-php55
   - composer-hhvm
@@ -1251,6 +1255,7 @@
  - mwext-testextension-hhvm
  - mwext-testextension-hhvm-composer
  - npm
+ - npm-node-4.3
  - composer-php53
  - composer-php55
  - composer-hhvm
@@ -1279,6 +1284,7 @@
  - mwext-testextension-hhvm
  - mwext-testextension-hhvm-composer
  - npm
+ - npm-node-4.3
  - composer-php53
  - composer-php55
  - composer-hhvm

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

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

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


[MediaWiki-commits] [Gerrit] wikistats: fix date in mysqldump file name again - change (operations/puppet)

2016-02-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: wikistats: fix date in mysqldump file name again
..

wikistats: fix date in mysqldump file name again

Change-Id: I7bee1ea3a4d2f5a3d8fac3383af247aad12f4b2e
---
M modules/wikistats/manifests/db.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/wikistats/manifests/db.pp 
b/modules/wikistats/manifests/db.pp
index 67d937d..ed72a71 100644
--- a/modules/wikistats/manifests/db.pp
+++ b/modules/wikistats/manifests/db.pp
@@ -10,7 +10,7 @@
 # db backup
 cron { 'mysql-dump-wikistats':
 ensure  => 'present',
-command => "today=$(date +%Y%m%d) && /usr/bin/mysqldump -u root -p 
wikistats > ${wikistats::db::backupdir}/wikistats_db_${today}.sql && gzip 
${backupdir}/wikistats_db_${today}.sql",
+command => "/usr/bin/mysqldump -u root -p wikistats > 
${wikistats::db::backupdir}/wikistats_db_$(date +%Y%m%d).sql && gzip 
${backupdir}/wikistats_db_$(date +%Y%m%d).sql",
 user=> 'root',
 hour=> '0',
 minute  => '15',

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

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

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


[MediaWiki-commits] [Gerrit] wikistats: fix date in filename for db dumps - change (operations/puppet)

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

Change subject: wikistats: fix date in filename for db dumps
..


wikistats: fix date in filename for db dumps

Change-Id: I705c9c3953abd4b2a28cf6bb1eaa35ae5e057826
---
M modules/wikistats/manifests/db.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/wikistats/manifests/db.pp 
b/modules/wikistats/manifests/db.pp
index f331d3e..67d937d 100644
--- a/modules/wikistats/manifests/db.pp
+++ b/modules/wikistats/manifests/db.pp
@@ -10,7 +10,7 @@
 # db backup
 cron { 'mysql-dump-wikistats':
 ensure  => 'present',
-command => "/usr/bin/mysqldump -u root -p$ wikistats > 
${wikistats::db::backupdir}/wikistats_db_${date}.sql && gzip 
${backupdir}/wikistats_db_${date}.sql",
+command => "today=$(date +%Y%m%d) && /usr/bin/mysqldump -u root -p 
wikistats > ${wikistats::db::backupdir}/wikistats_db_${today}.sql && gzip 
${backupdir}/wikistats_db_${today}.sql",
 user=> 'root',
 hour=> '0',
 minute  => '15',

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

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

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


[MediaWiki-commits] [Gerrit] wikistats: fix date in filename for db dumps - change (operations/puppet)

2016-02-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: wikistats: fix date in filename for db dumps
..

wikistats: fix date in filename for db dumps

Change-Id: I705c9c3953abd4b2a28cf6bb1eaa35ae5e057826
---
M modules/wikistats/manifests/db.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/273167/1

diff --git a/modules/wikistats/manifests/db.pp 
b/modules/wikistats/manifests/db.pp
index f331d3e..67d937d 100644
--- a/modules/wikistats/manifests/db.pp
+++ b/modules/wikistats/manifests/db.pp
@@ -10,7 +10,7 @@
 # db backup
 cron { 'mysql-dump-wikistats':
 ensure  => 'present',
-command => "/usr/bin/mysqldump -u root -p$ wikistats > 
${wikistats::db::backupdir}/wikistats_db_${date}.sql && gzip 
${backupdir}/wikistats_db_${date}.sql",
+command => "today=$(date +%Y%m%d) && /usr/bin/mysqldump -u root -p 
wikistats > ${wikistats::db::backupdir}/wikistats_db_${today}.sql && gzip 
${backupdir}/wikistats_db_${today}.sql",
 user=> 'root',
 hour=> '0',
 minute  => '15',

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: split up vcl_recv itself - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: split up vcl_recv itself
..

vcl_layers: split up vcl_recv itself

Change-Id: Iea402d409d53af030b09b9bab1e40149b2834476
---
M modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
3 files changed, 53 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/273164/1

diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
index 4da2208..fa01efa 100644
--- a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
@@ -1,2 +1,15 @@
 // common backend code for all clusters
 include "wikimedia-common.inc.vcl";
+
+sub vcl_recv {
+   call wm_common_recv_before_access;
+
+   if (client.ip !~ wikimedia_nets) {
+   // Do not allow direct access to non-frontend layers
+   error 403 "Access denied";
+   }
+
+   call wm_common_recv_after_access;
+
+   /* Function vcl_recv in <%= @vcl %>.inc.vcl will be appended here */
+}
diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index 2f163ca..53c7255 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -171,14 +171,7 @@
}
 }
 
-sub vcl_recv {
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
-   if (req.restarts == 0) {
-   // IP processing is req->req mangling that shouldn't be re-done 
on restart
-   call recv_fe_ip_processing;
-   }
-<% end %>
-
+sub wm_common_recv_before_access {
unset req.http.X-CDIS; // clear internal cache-disposition header
 
// XFF-appending is non-idempotent for restart purposes..
@@ -191,21 +184,9 @@
set req.http.X-Forwarded-For = client.ip;
}
}
+}
 
-<% if @vcl_config.fetch("layer", "") != "frontend" -%>
-   if (client.ip !~ wikimedia_nets) {
-   // Do not allow direct access to non-frontend layers
-   error 403 "Access denied";
-   }
-<% end -%>
-
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
-   if (req.request !~ "<%= @vcl_config.fetch("allowed_methods", 
"^(GET|HEAD|POST|PURGE)$") %>"
-   && !(req.request == "OPTIONS" && req.http.Origin)) {
-   error 403 "HTTP method not allowed.";
-   }
-<% end -%>
-
+sub wm_common_recv_after_access {
if ( req.http.host ~ "^varnishcheck" ) {
error 200 "OK"; 
}
@@ -223,27 +204,6 @@
set req.grace = 60m;
}
<% end -%>
-   
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
-   call rewrite_proxy_urls;
-<% if @vcl_config.fetch("https_redirects", false) -%>
-   call https_recv_redirect;
-<% end -%>
-
-   if (req.url ~ "^/beacon\/[^/?]+") {
-   // Logging beacon endpoints
-   //
-   // They are handled by log tailers (varnishkafka and 
varnishncsa) that filter the
-   // Varnish shm log for reqs to these endpoints and forward them 
to log processors
-   // for storage and analysis.
-   error 204;
-   }
-
-   if(req.restarts == 0) {
-   call analytics_recv;
-   }
-<% end -%>
-   /* Function vcl_recv in <%= @vcl %>.inc.vcl will be appended here */
 }
 
 sub vcl_fetch {
diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 74108ed..368068d 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -222,3 +222,40 @@
netmapper.init("carriers", "/var/netmapper/carriers.json", 89);
/* Function vcl_init in <%= @vcl %>.inc.vcl will be appended here */
 }
+
+sub vcl_recv {
+   if (req.restarts == 0) {
+   // IP processing is req->req mangling that shouldn't be re-done 
on restart
+   call recv_fe_ip_processing;
+   }
+
+   call wm_common_recv_before_access;
+
+   if (req.request !~ "<%= @vcl_config.fetch("allowed_methods", 
"^(GET|HEAD|POST|PURGE)$") %>"
+   && !(req.request == "OPTIONS" && req.http.Origin)) {
+   error 403 "HTTP method not allowed.";
+   }
+
+   call wm_common_recv_after_access;
+
+   call rewrite_proxy_urls;
+
+<% if @vcl_config.fetch("https_redirects", false) -%>
+   call https_recv_redirect;
+<% end -%>
+
+   if (req.url ~ "^/beacon\/[^/?]+") {
+   // Logging beacon endpoints
+  

[MediaWiki-commits] [Gerrit] vcl_layers: move basic fe-only things to fe - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: move basic fe-only things to fe
..

vcl_layers: move basic fe-only things to fe

Change-Id: Ief2e2966c91e01b9a4c187e205ef011eebfb6cc9
---
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
2 files changed, 222 insertions(+), 231 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/63/273163/1

diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index adc8239..2f163ca 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -8,12 +8,6 @@
 #   being set from different code.
 import header;
 
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
-# only used in recv_fe_ip_processing on frontends
-import netmapper;
-import ipcast;
-<% end %>
-
 <%
 def backend_option(backend, option, default)
if @varnish_backend_options.kind_of?(Array)
@@ -46,11 +40,6 @@
return ((Math.log10(100 - p) - 2) / (Math.log10(x) - 
Math.log10(n))).ceil
 end
 -%>
-
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
-// defines analytics_(recv|deliver) subs
-include "analytics.inc.vcl";
-<% end -%>
 
 # ACLs
 
@@ -167,226 +156,6 @@
 <% end #director loop -%>
 
 # Functions
-
-// start frontend-only block
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
-// start HTTPS block
-<% if @vcl_config.fetch("https_redirects", false) -%>
-
-// *** HTTPS recv code - domain-based 301/302->HTTPS decisions happen here
-// if GET/HEAD filter is modified/removed later, keep in mind we need to not 
affect
-//   the PURGE traffic here, as purge is called after this.
-sub https_recv_redirect {
-   if (req.http.X-Forwarded-Proto != "https") {
-   if (req.request == "GET" || req.request == "HEAD") {
-   // This is all of our unified cert wildcard domains 
which are TLS-clean (cert matches all extant hostnames within)
-   // The lone exception now is wikimedia.org, in the next 
block
-   if (req.http.Host ~ 
"(?i)((^|\.)(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org|^w\.wiki)$")
 {
-   set req.http.Location = "https://; + 
req.http.Host + req.url;
-   error 751 "TLS Redirect";
-   }
-   // wikimedia.org has multi-level subdomains used for 
HTTP for which we have no certs, so they must be avoided here:
-   // Ref: T102826 + T102827
-   else if(req.http.Host ~ 
"(?i)^([^.]+\.)?(m\.)?wikimedia\.org$") {
-   set req.http.Location = "https://; + 
req.http.Host + req.url;
-   error 751 "TLS Redirect";
-   }
-   }
-<% if @vcl_config.fetch("secure_post", true) -%>
-   if (req.request == "POST" && !(req.http.Host ~ 
"(?i)\.beta\.wmflabs\.org$")) {
-   error 403 "Insecure POST Forbidden - use HTTPS";
-   }
-<% end %>
-   }
-}
-
-// *** HTTPS error code - implements 301 response for recv code
-sub https_error_redirect {
-   if (obj.status == 751) {
-   set obj.http.Location = req.http.Location;
-   set obj.status = 301;
-   set obj.http.Content-Length = "0"; // T64245
-   return(deliver);
-   }
-}
-
-// *** HTTPS deliver code - domain-based HSTS headers
-sub https_deliver_hsts {
-   // The reason we don't need the stricter domain restrictions here,
-   // like we do on the recv side for redirects, is that in order for
-   // HSTS to reach a client, the client implicitly has to have already
-   // successfully reached us over HTTPS for the given domainname.
-   if (req.http.X-Forwarded-Proto == "https") {
-   // This is the same regex as the first one in 
https_recv_redirect (all unified except wikimedia.org)
-   if (req.http.Host ~ 
"(?i)((^|\.)(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org|^w\.wiki)$")
 {
-   set resp.http.Strict-Transport-Security = 
"max-age=31536000; includeSubDomains; preload";
-   }
-   else {
-   set resp.http.Strict-Transport-Security = 
"max-age=31536000";
-   }
-   }
-}
-
-<% end -%>
-// ^ end HTTPS block
-
-// We shouldn't even legally be receiving proxy-style requests, as we're not a
-// proxy from any client's point of view.  Just in case, we support it anyways
-// according to 

[MediaWiki-commits] [Gerrit] vcl_layers: move xcache up a bit - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: move xcache up a bit
..

vcl_layers: move xcache up a bit

Change-Id: I9380bfae329ba28370455bd346280e7f48cb2fbb
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index befe133..5c0ff2d 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -554,6 +554,15 @@
 }
 
 sub vcl_deliver {
+   if (!req.http.X-CDIS) {
+   set req.http.X-CDIS = "int"; // internally-generated response 
(not a cache object hit, and not a miss|pass to a deeper layer either)
+   }
+   if (resp.http.X-Cache) {
+   set resp.http.X-Cache = resp.http.X-Cache + ", <%= @hostname + 
(@name.empty? ? "" : " " + @name) %> " + req.http.X-CDIS + "(" + obj.hits + ")";
+   } else {
+   set resp.http.X-Cache = "<%= @hostname + (@name.empty? ? "" : " 
" + @name) %> " + req.http.X-CDIS + "(" + obj.hits + ")";
+   }
+
 <% if @vcl_config.fetch("layer", "") == "frontend" -%>
std.collect(resp.http.Via);
std.collect(resp.http.X-Varnish);
@@ -572,15 +581,6 @@
}
 
 <% end -%>
-
-   if (!req.http.X-CDIS) {
-   set req.http.X-CDIS = "int"; // internally-generated response 
(not a cache object hit, and not a miss|pass to a deeper layer either)
-   }
-   if (resp.http.X-Cache) {
-   set resp.http.X-Cache = resp.http.X-Cache + ", <%= @hostname + 
(@name.empty? ? "" : " " + @name) %> " + req.http.X-CDIS + "(" + obj.hits + ")";
-   } else {
-   set resp.http.X-Cache = "<%= @hostname + (@name.empty? ? "" : " 
" + @name) %> " + req.http.X-CDIS + "(" + obj.hits + ")";
-   }
 
 <% if @vcl_config.fetch("layer", "") == "frontend"
 <% if @vcl_config.fetch("https_redirects", false) -%>

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: https+fe layer-conditional fixups - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: https+fe layer-conditional fixups
..

vcl_layers: https+fe layer-conditional fixups

Change-Id: Ibd3c0714f90b6b6deebec224a1087eca5a3d6dad
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 6 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/273156/1

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index aa5b2df..22903f4 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -450,10 +450,9 @@

 <% if @vcl_config.fetch("layer", "") == "frontend" -%>
call rewrite_proxy_urls;
-<% end -%>
-
-<% if @vcl_config.fetch("layer", "") == "frontend" && 
@vcl_config.fetch("https_redirects", false) -%>
+<% if @vcl_config.fetch("https_redirects", false) -%>
call https_recv_redirect;
+<% end -%>
 <% end -%>
 
if ( req.http.host ~ "^varnishcheck" ) {
@@ -581,11 +580,10 @@
set resp.http.X-Cache = "<%= @hostname + (@name.empty? ? "" : " 
" + @name) %> " + req.http.X-CDIS + "(" + obj.hits + ")";
}
 
-<% if @vcl_config.fetch("layer", "") == "frontend" && 
@vcl_config.fetch("https_redirects", false) -%>
+<% if @vcl_config.fetch("layer", "") == "frontend"
+<% if @vcl_config.fetch("https_redirects", false) -%>
call https_deliver_hsts;
 <% end -%>
-
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
call analytics_deliver;
 <% end -%>
 
@@ -605,11 +603,10 @@
 }
 
 sub vcl_error {
-<% if @vcl_config.fetch("layer", "") == "frontend" && 
@vcl_config.fetch("https_redirects", false) -%>
+<% if @vcl_config.fetch("layer", "") == "frontend"
+<% if @vcl_config.fetch("https_redirects", false) -%>
call https_error_redirect;
 <% end -%>
-
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
// retry 503 once in frontend instances, to paper over transient issues
if (obj.status == 503 && req.restarts == 0) {
return(restart);

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: beacon should only be frontend - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: beacon should only be frontend
..

vcl_layers: beacon should only be frontend

Change-Id: Iafc5e401805735d9d35a20ca619da2ea4f533c16
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/273158/1

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 7a688f1..2828600 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -461,6 +461,7 @@
error 200 "OK"; 
}
 
+<% if @vcl_config.fetch("layer", "") == "frontend" -%>
if (req.url ~ "^/beacon\/[^/?]+") {
// Logging beacon endpoints
//
@@ -470,7 +471,6 @@
error 204;
}
 
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
if(req.restarts == 0) {
call analytics_recv;
}

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: split deliver|error - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: split deliver|error
..

vcl_layers: split deliver|error

Change-Id: I84aee62e230233aa13d8e035011c6b16139da43f
---
M modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
3 files changed, 66 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/273166/1

diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
index efb8a5c..007423e 100644
--- a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
@@ -40,3 +40,13 @@
call wm_common_fetch;
/* Function vcl_fetch in <%= @vcl %>.inc.vcl will be appended here */
 }
+
+sub vcl_deliver {
+   call wm_common_deliver;
+   /* Function vcl_deliver in <%= @vcl %>.inc.vcl will be appended here */
+}
+
+sub vcl_error {
+   call wm_common_error;
+   /* Function vcl_error in <%= @vcl %>.inc.vcl will be appended here */
+}
diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index e30c96d..9adbbff 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -264,68 +264,22 @@
 <% end -%>
 }
 
-sub vcl_deliver {
+sub wm_common_deliver {
if (!req.http.X-CDIS) {
set req.http.X-CDIS = "int"; // internally-generated response 
(not a cache object hit, and not a miss|pass to a deeper layer either)
}
+
if (resp.http.X-Cache) {
set resp.http.X-Cache = resp.http.X-Cache + ", <%= @hostname + 
(@name.empty? ? "" : " " + @name) %> " + req.http.X-CDIS + "(" + obj.hits + ")";
} else {
set resp.http.X-Cache = "<%= @hostname + (@name.empty? ? "" : " 
" + @name) %> " + req.http.X-CDIS + "(" + obj.hits + ")";
}
-
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
-   std.collect(resp.http.Via);
-   std.collect(resp.http.X-Varnish);
-
-   // Set CP ('Connection Properties') cookie
-   if (req.http.X-Connection-Properties ~ "SPDY=3") {
-   if (req.http.X-Orig-Cookie !~ "(^|;\s*)CP=H2" && 
req.http.Cookie !~ "(^|;\s*)CP=H2") {
-   header.append(resp.http.Set-Cookie, "CP=H2; Path=/");
-   }
-   } else {
-   // Explicitly unset the cookie if it exists. Support for SPDY 
in a browser session can
-   // flip if a device moves networks and thus behind a proxy.
-   if (req.http.X-Orig-Cookie ~ "(^|;\s*)CP=H2" || req.http.Cookie 
~ "(^|;\s*)CP=H2") {
-   header.append(resp.http.Set-Cookie, "CP=H1; 
Expires=Thu, 01-Jan-1970 00:00:01 GMT; Path=/");
-   }
-   }
-
-<% if @vcl_config.fetch("https_redirects", false) -%>
-   call https_deliver_hsts;
-<% end -%>
-   call analytics_deliver;
-
-   // echo metadata about the client back to the client (analytics looks 
at this as well)
-   set resp.http.X-Client-IP = req.http.X-Client-IP;
-   // note mobile apps look at X-C + X-C-M below
-   if (req.http.X-Carrier) {
-   set resp.http.X-Carrier = req.http.X-Carrier;
-   if (req.http.X-Carrier-Meta) {
-   set resp.http.X-Carrier-Meta = req.http.X-Carrier-Meta;
-   }
-   }
-<% end -%>
-
-   /* Function vcl_deliver in <%= @vcl %>.inc.vcl will be appended here */
 }
 
-sub vcl_error {
-<% if @vcl_config.fetch("layer", "") == "frontend"
-<% if @vcl_config.fetch("https_redirects", false) -%>
-   call https_error_redirect;
-<% end -%>
-   // retry 503 once in frontend instances, to paper over transient issues
-   if (obj.status == 503 && req.restarts == 0) {
-   return(restart);
-   }
-<% end -%>
-
+sub wm_common_error {
if (obj.status == 204 && req.request == "PURGE") {
set obj.http.Connection = "keep-alive";
}
-
-   /* Function vcl_error in <%= @vcl %>.inc.vcl will be appended here */
 }
 
 /* Include the VCL file for this role */
diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index abc3814..958a98f 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -284,3 +284,56 @@
call wm_common_fetch;
/* Function vcl_fetch in <%= @vcl %>.inc.vcl will be appended here */
 }
+
+sub vcl_deliver {
+   call wm_common_deliver;
+
+   std.collect(resp.http.Via);
+   

[MediaWiki-commits] [Gerrit] vcl_layers: split hit|miss|pass|fetch - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: split hit|miss|pass|fetch
..

vcl_layers: split hit|miss|pass|fetch

Change-Id: I2c55d5e2ed7867db0dc81b3d57b784abbe337bbe
---
M modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
3 files changed, 78 insertions(+), 43 deletions(-)


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

diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
index fa01efa..efb8a5c 100644
--- a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
@@ -13,3 +13,30 @@
 
/* Function vcl_recv in <%= @vcl %>.inc.vcl will be appended here */
 }
+
+sub vcl_hit {
+   call wm_common_hit;
+   /* Function vcl_hit in <%= @vcl %>.inc.vcl will be appended here */
+}
+
+sub vcl_miss {
+   call wm_common_miss;
+   /* Function vcl_miss in <%= @vcl %>.inc.vcl will be appended here */
+}
+
+sub vcl_pass {
+   call wm_common_pass;
+
+<% if @site_tier == "two" -%>
+   // pass-traffic should not use consistent hashing, to avoid unecessary
+   // traffic focus on one node and keep things performant
+   set req.backend = backend_random;
+<% end -%>
+
+   /* Function vcl_pass in <%= @vcl %>.inc.vcl will be appended here */
+}
+
+sub vcl_fetch {
+   call wm_common_fetch;
+   /* Function vcl_fetch in <%= @vcl %>.inc.vcl will be appended here */
+}
diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index 53c7255..e30c96d 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -206,7 +206,32 @@
<% end -%>
 }
 
-sub vcl_fetch {
+sub wm_common_hit {
+   set req.http.X-CDIS = "hit";
+   if (req.request == "PURGE") {
+   purge;
+   error 204 "Purged";
+   }
+}
+
+sub wm_common_miss {
+   set req.http.X-CDIS = "miss";
+   if (req.request == "PURGE") {
+   purge;
+   error 204 "Cache miss";
+   }
+}
+
+sub wm_common_pass {
+   if (req.http.X-CDIS) {
+   // _pass can theoretically be called after moving through _hit 
or _miss
+   set req.http.X-CDIS = req.http.X-CDIS + "+pass";
+   } else {
+   set req.http.X-CDIS = "pass";
+   }
+}
+
+sub wm_common_fetch {
 <% if @vcl_config.fetch("ttl_fixed", false) -%>
// Fixed TTL (rare/questionable, only used on upload backend right now)
// Note the ttl_cap comes after this and takes precedence!
@@ -236,48 +261,6 @@
if (beresp.http.content-type ~ 
"json|text|html|script|xml|icon|ms-fontobject|ms-opentype|x-font") {
set beresp.do_gzip = true;
}
-<% end -%>
-
-   /* Function vcl_fetch in <%= @vcl %>.inc.vcl will be appended here */
-}
-
-sub vcl_hit {
-   set req.http.X-CDIS = "hit";
-   if (req.request == "PURGE") {
-   purge;
-   error 204 "Purged";
-   }
-   
-   /* Function vcl_hit in <%= @vcl %>.inc.vcl will be appended here */
-}
-
-sub vcl_miss {
-   set req.http.X-CDIS = "miss";
-   if (req.request == "PURGE") {
-   purge;
-   error 204 "Cache miss";
-   }
-
-   /* Function vcl_miss in <%= @vcl %>.inc.vcl will be appended here */
-}
-
-sub vcl_pass {
-   if (req.http.X-CDIS) {
-   // _pass can theoretically be called after moving through _hit 
or _miss
-   set req.http.X-CDIS = req.http.X-CDIS + "+pass";
-   } else {
-   set req.http.X-CDIS = "pass";
-   }
-
-// All cache clusters are dual-tier/layer, and all tier-two backends and all
-// frontends have exactly two backends: "backend" and "backend_random".  The
-// regular backend is a chash on the URL to help with cacheable objects,
-// whereas the randomized one avoids focusing pass/hit-for-pass traffic onto a
-// single node in the varnish-backend layers.  All pass and hit-for-pass
-// traffic comes through vcl_pass, so we set backend_random here for all such
-// requests.
-<% if @vcl_config.fetch("layer", "") == "frontend" || @site_tier == "two" -%>
-   set req.backend = backend_random;
 <% end -%>
 }
 
diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 368068d..abc3814 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -259,3 +259,28 @@
 
/* Function vcl_recv in <%= @vcl %>.inc.vcl will be 

[MediaWiki-commits] [Gerrit] vcl_layers: split wikimedia.vcl in puppet terms - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: split wikimedia.vcl in puppet terms
..

vcl_layers: split wikimedia.vcl in puppet terms

This step looks pointless on the surface, but sets up the 3x files the code
will be split to, allowing the next commits to move code between them as
appropriate...

Change-Id: I00feca8ec41a4125e4f3d3a5f96ed40796765408
---
M modules/varnish/manifests/common/vcl.pp
M modules/varnish/manifests/instance.pp
A modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
R modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
A modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
5 files changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/62/273162/1

diff --git a/modules/varnish/manifests/common/vcl.pp 
b/modules/varnish/manifests/common/vcl.pp
index cff2aff..5008488 100644
--- a/modules/varnish/manifests/common/vcl.pp
+++ b/modules/varnish/manifests/common/vcl.pp
@@ -22,6 +22,13 @@
 content => template('varnish/analytics.inc.vcl.erb'),
 }
 
+file { '/etc/varnish/wikimedia-common.inc.vcl':
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+content => template("${module_name}/vcl/wikimedia-common.inc.vcl.erb"),
+}
+
 # VCL unit tests
 file { '/usr/local/sbin/varnish-test-geoip':
 owner  => 'root',
diff --git a/modules/varnish/manifests/instance.pp 
b/modules/varnish/manifests/instance.pp
index dfeefd0..08b4058 100644
--- a/modules/varnish/manifests/instance.pp
+++ b/modules/varnish/manifests/instance.pp
@@ -74,7 +74,7 @@
 group   => 'root',
 mode=> '0444',
 require => File["/etc/varnish/${vcl}.inc.vcl"],
-content => template("${module_name}/vcl/wikimedia.vcl.erb"),
+content => template("${module_name}/vcl/wikimedia-${layer}.vcl.erb"),
 }
 
 file { "/etc/varnish/${vcl}.inc.vcl":
diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
new file mode 100644
index 000..4da2208
--- /dev/null
+++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
@@ -0,0 +1,2 @@
+// common backend code for all clusters
+include "wikimedia-common.inc.vcl";
diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
similarity index 99%
rename from modules/varnish/templates/vcl/wikimedia.vcl.erb
rename to modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index 2f4e6d5..adc8239 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -1,4 +1,5 @@
 # This file is managed by Puppet!
+// layer-common code for all clusters
 
 import std;
 
diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
new file mode 100644
index 000..c10f639
--- /dev/null
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -0,0 +1,2 @@
+// common frontend code for all clusters
+include "wikimedia-common.inc.vcl";

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: re-arrange fe_ip/xff/xcdis-clear - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: re-arrange fe_ip/xff/xcdis-clear
..

vcl_layers: re-arrange fe_ip/xff/xcdis-clear

Change-Id: Ie178f8cd74f0ad82049ee9f1d8129c4d9442f399
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 8 insertions(+), 4 deletions(-)


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

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 6b4301d..aa5b2df 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -402,13 +402,17 @@
 }
 
 sub vcl_recv {
-   unset req.http.X-CDIS; // clear internal cache-disposition header
-   // IP processing is req->req mangling that shouldn't be re-done on
-   // restart, and XFF-appending is non-idempotent for restart purposes..
-   if (req.restarts == 0) {
 <% if @vcl_config.fetch("layer", "") == "frontend" -%>
+   if (req.restarts == 0) {
+   // IP processing is req->req mangling that shouldn't be re-done 
on restart
call recv_fe_ip_processing;
+   }
 <% end %>
+
+   unset req.http.X-CDIS; // clear internal cache-disposition header
+
+   // XFF-appending is non-idempotent for restart purposes..
+   if (req.restarts == 0) {
// All layers need to update XFF with client.ip hop-by-hop so 
that it
// looks right to layers beneath, including the app layer
if (req.http.X-Forwarded-For) {

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: varnishcheck can happen earlier - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: varnishcheck can happen earlier
..

vcl_layers: varnishcheck can happen earlier

Change-Id: Ifb01b9ecd0312d64a17430760b8eef5f2e1a3a21
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 2828600..befe133 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -436,6 +436,10 @@
}
 <% end -%>
 
+   if ( req.http.host ~ "^varnishcheck" ) {
+   error 200 "OK"; 
+   }
+
<% if @vcl_config.fetch("has_def_backend", "yes") == "yes" -%>
/* Select the default backend/director, which is always the one named 
'backend'.
 * If an instance has no default 'backend', it must declare 
has_def_backend==no,
@@ -456,10 +460,6 @@
call https_recv_redirect;
 <% end -%>
 <% end -%>
-
-   if ( req.http.host ~ "^varnishcheck" ) {
-   error 200 "OK"; 
-   }
 
 <% if @vcl_config.fetch("layer", "") == "frontend" -%>
if (req.url ~ "^/beacon\/[^/?]+") {

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: more layer-conditional redundancy - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: more layer-conditional redundancy
..

vcl_layers: more layer-conditional redundancy

Change-Id: I99052554fa38077edf4f5f1aa41bac25b8d2b09e
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 0 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/61/273161/1

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 5c0ff2d..2f4e6d5 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -459,9 +459,7 @@
 <% if @vcl_config.fetch("https_redirects", false) -%>
call https_recv_redirect;
 <% end -%>
-<% end -%>
 
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
if (req.url ~ "^/beacon\/[^/?]+") {
// Logging beacon endpoints
//
@@ -580,16 +578,11 @@
}
}
 
-<% end -%>
-
-<% if @vcl_config.fetch("layer", "") == "frontend"
 <% if @vcl_config.fetch("https_redirects", false) -%>
call https_deliver_hsts;
 <% end -%>
call analytics_deliver;
-<% end -%>
 
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
// echo metadata about the client back to the client (analytics looks 
at this as well)
set resp.http.X-Client-IP = req.http.X-Client-IP;
// note mobile apps look at X-C + X-C-M below

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: allowed_methods fe-only - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: allowed_methods fe-only
..

vcl_layers: allowed_methods fe-only

Change-Id: I19a35d9c235200b5de856ea4b4b3d7a789a45f75
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/57/273157/1

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 22903f4..7a688f1 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -429,10 +429,12 @@
}
 <% end -%>
 
+<% if @vcl_config.fetch("layer", "") == "frontend" -%>
if (req.request !~ "<%= @vcl_config.fetch("allowed_methods", 
"^(GET|HEAD|POST|PURGE)$") %>"
&& !(req.request == "OPTIONS" && req.http.Origin)) {
error 403 "HTTP method not allowed.";
}
+<% end -%>
 
<% if @vcl_config.fetch("has_def_backend", "yes") == "yes" -%>
/* Select the default backend/director, which is always the one named 
'backend'.

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: move recv_purge - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: move recv_purge
..

vcl_layers: move recv_purge

Change-Id: Ic3d4c67301f418d987531554bb9723c5172c05ce
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 14 insertions(+), 14 deletions(-)


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

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 90c85fb..7721895 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -244,20 +244,6 @@
 <% end -%>
 // ^ end frontend block
 
-sub recv_purge {
-   /* Support HTTP PURGE */
-   if (req.request == "PURGE") {
-   if (client.ip !~ local_host) {
-   error 405 "Denied.";
-   } elsif (req.http.Host ~ "<%= 
@vcl_config.fetch('purge_host_regex') %>") {
-   set req.hash_ignore_busy = true;
-   return (lookup);
-   } else {
-   error 204 "Domain not cached here.";
-   }
-   }
-}
-
 <% if @vcl_config.fetch("layer", "") == "frontend" -%>
 // Must be done at the top of vcl_recv, in our varnish-frontend layer only,
 // and should be guarded against running on request restarts.
@@ -406,6 +392,20 @@
 <% end %>
 }
 
+sub recv_purge {
+   /* Support HTTP PURGE */
+   if (req.request == "PURGE") {
+   if (client.ip !~ local_host) {
+   error 405 "Denied.";
+   } elsif (req.http.Host ~ "<%= 
@vcl_config.fetch('purge_host_regex') %>") {
+   set req.hash_ignore_busy = true;
+   return (lookup);
+   } else {
+   error 204 "Domain not cached here.";
+   }
+   }
+}
+
 sub vcl_recv {
unset req.http.X-CDIS; // clear internal cache-disposition header
// IP processing is req->req mangling that shouldn't be re-done on

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: rewrite_proxy_urls fe-only - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: rewrite_proxy_urls fe-only
..

vcl_layers: rewrite_proxy_urls fe-only

Change-Id: I38358338f13a1edd8977dab5e6aa1949af79041f
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 8 insertions(+), 3 deletions(-)


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

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 8acae73..90c85fb 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -167,8 +167,10 @@
 
 # Functions
 
-// start frontend-only block for HTTPS
-<% if @vcl_config.fetch("layer", "") == "frontend" && 
@vcl_config.fetch("https_redirects", false) -%>
+// start frontend-only block
+<% if @vcl_config.fetch("layer", "") == "frontend" -%>
+// start HTTPS block
+<% if @vcl_config.fetch("https_redirects", false) -%>
 
 // *** HTTPS recv code - domain-based 301/302->HTTPS decisions happen here
 // if GET/HEAD filter is modified/removed later, keep in mind we need to not 
affect
@@ -225,7 +227,7 @@
 }
 
 <% end -%>
-// ^ end frontend + https_redirects block
+// ^ end HTTPS block
 
 // We shouldn't even legally be receiving proxy-style requests, as we're not a
 // proxy from any client's point of view.  Just in case, we support it anyways
@@ -239,6 +241,9 @@
}
 }
 
+<% end -%>
+// ^ end frontend block
+
 sub recv_purge {
/* Support HTTP PURGE */
if (req.request == "PURGE") {

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

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

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


[MediaWiki-commits] [Gerrit] vcl_layers: consolidate 3x fe-only - change (operations/puppet)

2016-02-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: vcl_layers: consolidate 3x fe-only
..

vcl_layers: consolidate 3x fe-only

Change-Id: Ifb32a3c26512471d743b7e354f0e3ed77a619a10
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 3 insertions(+), 8 deletions(-)


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

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 7721895..6b4301d 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -241,10 +241,6 @@
}
 }
 
-<% end -%>
-// ^ end frontend block
-
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
 // Must be done at the top of vcl_recv, in our varnish-frontend layer only,
 // and should be guarded against running on request restarts.
 sub recv_fe_ip_processing {
@@ -381,17 +377,16 @@
// metadata.
 }
 
-<% end %>
-
 sub vcl_init {
-<% if @vcl_config.fetch("layer", "") == "frontend" -%>
// again, netmapper only used in frontends, for recv_fe_ip_processing
// args here are map-name (for .map()), data file, and seconds between 
mtime checks for reload
netmapper.init("proxies", "/var/netmapper/proxies.json", 89);
netmapper.init("carriers", "/var/netmapper/carriers.json", 89);
-<% end %>
 }
 
+<% end -%>
+// ^ end frontend block
+
 sub recv_purge {
/* Support HTTP PURGE */
if (req.request == "PURGE") {

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

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

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


[MediaWiki-commits] [Gerrit] Fixes lightbox image size in ImageResultBrowser - change (wikidata...gui)

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

Change subject: Fixes lightbox image size in ImageResultBrowser
..


Fixes lightbox image size in ImageResultBrowser

Change-Id: I4fd252da0b9fcd242fa26b2b1b9c94f2dde0fd86
---
M wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
index 6cb17b9..d9ef097 100644
--- a/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
@@ -49,7 +49,7 @@
regEx = new RegExp( 
COMMONS_FILE_PATH, "ig" ),
fileName = decodeURIComponent( 
url.replace( regEx, '' ) );
 
-   self._grid.append( self._getItem( 
self._getThumbnail( url ), fileName ) );
+   self._grid.append( self._getItem( 
self._getThumbnail( url ),  self._getThumbnail( url, 1000 ), fileName ) );
}
} );
} );
@@ -80,7 +80,7 @@
/**
 * @private
 **/
-   SELF.prototype._getItem = function( url, title ) {
+   SELF.prototype._getItem = function( thumbnailUrl, url, title ) {
 
var triggerGallery = function(event) {
event.preventDefault();
@@ -91,7 +91,7 @@
image = $( '' )
.click( triggerGallery )
.attr( 'data-title',  title )
-   .append( $( '' ) );
+   .append( $( '' ) );
 
return $( '' ).append( heading, image );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4fd252da0b9fcd242fa26b2b1b9c94f2dde0fd86
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make SPARQL service URI injectable & fix query string - change (wikidata...gui)

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

Change subject: Make SPARQL service URI injectable & fix query string
..


Make SPARQL service URI injectable & fix query string

This change makes Sparql.js actually be usable for others.

Change-Id: I2a7547bd7d789f746f6e608eb03c6cc227cc6874
---
M wikibase/queryService/api/Sparql.js
M wikibase/queryService/ui/App.js
2 files changed, 22 insertions(+), 7 deletions(-)

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



diff --git a/wikibase/queryService/api/Sparql.js 
b/wikibase/queryService/api/Sparql.js
index b04f64f..7e70971 100644
--- a/wikibase/queryService/api/Sparql.js
+++ b/wikibase/queryService/api/Sparql.js
@@ -5,7 +5,7 @@
 wikibase.queryService.api.Sparql = ( function($) {
'use strict';
 
-   var SERVICE = '/bigdata/namespace/wdq/sparql';
+   var SPARQL_SERVICE_URI = 
'//query.wikidata.org/bigdata/namespace/wdq/sparql';
 
/**
 * SPARQL API for the Wikibase query service
@@ -16,9 +16,23 @@
 * @author Stanislav Malyshev
 * @author Jonas Kress
 * @constructor
+*
+* @param {string} (optional) serviceUri URI to the SPARQL service 
endpoint
 */
-   function SELF() {
+   function SELF( serviceUri ) {
+
+   if( serviceUri ){
+   this._serviceUri = serviceUri;
+   }else{
+   this._serviceUri = SPARQL_SERVICE_URI;
+   }
}
+
+   /**
+* @property {int}
+* @private
+**/
+   SELF.prototype._serviceUri = null;
 
/**
 * @property {int}
@@ -60,7 +74,7 @@
var deferred = $.Deferred(),
query = encodeURI( 'prefix schema:  ' +
'SELECT * WHERE { 
schema:dateModified ?y}' ),
-   url = SERVICE + '?query=' + query, settings = {
+   url = this._serviceUri + '?query=' + query, settings = {
'headers' : {
'Accept' : 'application/sparql-results+json'
}
@@ -102,7 +116,7 @@
}
};
 
-   this._queryUri = SERVICE + '?' + query;
+   this._queryUri = this._serviceUri + '?query=' + 
encodeURIComponent( query );
 
this._executionTime = Date.now();
$.ajax( this._queryUri, settings ).done(function( data, 
textStatus, jqXHR ) {
diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index 41a949e..6b429ba 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -6,6 +6,8 @@
 wikibase.queryService.ui.App = ( function( $, mw ) {
"use strict";
 
+   var SPARQL_SERVICE_URI = '/bigdata/namespace/wdq/sparql';
+
var SHORTURL = '//tinyurl.com/create.php?url=';
var SHORTURL_API = '//tinyurl.com/api-create.php?url=';
var EXPLORE_URL = 'http://www.wikidata.org/entity/Q';
@@ -74,7 +76,7 @@
SELF.prototype._init = function() {
 
if( !this._sparqlApi ){
-   this._sparqlApi = new 
wikibase.queryService.api.Sparql();
+   this._sparqlApi = new wikibase.queryService.api.Sparql( 
SPARQL_SERVICE_URI );
}
 
if( !this._querySamplesApi ){
@@ -329,8 +331,7 @@
$( '.actionMessage' ).show();
$( '.actionMessage' ).text( 'Running query...' );
 
-   var query = $( '#query-form' ).serialize();
-   this._sparqlApi.query(query)
+   this._sparqlApi.query( this._editor.getValue() )
.done( $.proxy( this._handleQueryResult, this ) )
.fail(function(){
$( '.actionMessage' ).hide();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a7547bd7d789f746f6e608eb03c6cc227cc6874
Gerrit-PatchSet: 3
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] LocalStorage for Editor - change (wikidata...gui)

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

Change subject: LocalStorage for Editor
..


LocalStorage for Editor

Allows to store editor value in local storage, so after page reload
query text is still there.

Change-Id: Ib056846abadc432ab053136cf496edc7cd356fc1
---
M wikibase/queryService/ui/App.js
M wikibase/queryService/ui/Editor.js
2 files changed, 32 insertions(+), 2 deletions(-)

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



diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index 41a949e..dbda204 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -171,6 +171,9 @@
 
this._editor.setValue( decodeURIComponent( 
window.location.hash.substr( 1 ) ) );
this._editor.refresh();
+   }else{
+
+   this._editor.restoreValue();
}
};
 
diff --git a/wikibase/queryService/ui/Editor.js 
b/wikibase/queryService/ui/Editor.js
index 9b2b707..3a9a40e 100644
--- a/wikibase/queryService/ui/Editor.js
+++ b/wikibase/queryService/ui/Editor.js
@@ -2,7 +2,7 @@
 wikibase.queryService = wikibase.queryService || {};
 wikibase.queryService.ui = wikibase.queryService.ui || {};
 
-wikibase.queryService.ui.Editor = ( function( CodeMirror, WikibaseRDFTooltip ) 
{
+wikibase.queryService.ui.Editor = ( function( CodeMirror, WikibaseRDFTooltip, 
localStorage ) {
"use strict";
 
var CODEMIRROR_DEFAULTS = {
@@ -14,6 +14,8 @@
},
ERROR_LINE_MARKER = null,
ERROR_CHARACTER_MARKER = null;
+
+   var LOCAL_STORAGE_KEY = 'wikibase.queryService.ui.Editor';
 
/**
 * An ui this._editor for the Wikibase query service
@@ -45,6 +47,7 @@
 
this._editor = CodeMirror.fromTextArea( element, 
CODEMIRROR_DEFAULTS );
this._editor.on( 'change', function ( editor, changeObj ) {
+   self.storeValue( self.getValue() );
self.clearError();
if( changeObj.text[0] === '?' ){
editor.showHint({closeCharacters: /[\s]/});
@@ -131,6 +134,30 @@
}
};
 
+   /**
+* Stores the given value in the local storage
+* @param {string} value
+*/
+   SELF.prototype.storeValue = function( value ) {
+   if( localStorage ){
+   localStorage.setItem( LOCAL_STORAGE_KEY, value );
+   }
+
+   };
+
+   /**
+* Restores the value from the local storage
+*/
+   SELF.prototype.restoreValue = function() {
+   if( localStorage ){
+   var value = localStorage.getItem( LOCAL_STORAGE_KEY );
+   if( value ){
+   this.setValue( value );
+   this.refresh();
+   }
+   }
+   };
+
return SELF;
 
-}( CodeMirror, WikibaseRDFTooltip ) );
+}( CodeMirror, WikibaseRDFTooltip, window.localStorage ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib056846abadc432ab053136cf496edc7cd356fc1
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fixes event handling of result browsers - change (wikidata...gui)

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

Change subject: Fixes event handling of result browsers
..


Fixes event handling of result browsers

Change-Id: I90dd519e42c9cac43bf9b7c0ad61dfee9ed02cef
---
M wikibase/queryService/ui/App.js
1 file changed, 6 insertions(+), 5 deletions(-)

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



diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index 41a949e..67afe21 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -211,6 +211,11 @@
$( '.explorer-panel' ).hide();
} );
 
+
+   //result browser
+   $( '.result-browser' ).click( function(){ $(this).closest( 
'.open' ).removeClass('open'); } );
+   $( '.result-browser.default' ).click( $.proxy( 
this._handleQueryResult, this )  );
+
$( window ).on( 'popstate', $.proxy( this._initQuery, this ) );
 
this._initPopovers();
@@ -406,11 +411,6 @@
 * @private
 */
SELF.prototype._handleQueryResultBrowsers = function() {
-   $( '.result-browser' ).click( function(){ $(this).closest( 
'.open' ).removeClass('open'); } );
-
-   //table
-   $( '.result-browser.default' ).click( $.proxy( 
this._handleQueryResult, this )  );
-
//image
var imageBrowser = new 
wikibase.queryService.ui.resultBrowser.ImageResultBrowser();
imageBrowser.setResult( this._sparqlApi.getResultRawData() );
@@ -421,6 +421,7 @@
return false;
} );
}else{
+   $( '.result-browser.gallery' ).off( 'click' );
$( '.result-browser.gallery' ).css( 'opacity', 0.5 
).removeAttr( 'href' );
}
};

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90dd519e42c9cac43bf9b7c0ad61dfee9ed02cef
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Set td font-size to 90% - change (operations...wikistats)

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

Change subject: Set td font-size to 90%
..


Set td font-size to 90%

Now the table should fit onto your screen.

Change-Id: If4ea534c6db8a2cade3ac46da0b0d4f772b7721b
---
M var/www/wikistats/css/main.css
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/var/www/wikistats/css/main.css b/var/www/wikistats/css/main.css
index b400ae3..f110879 100644
--- a/var/www/wikistats/css/main.css
+++ b/var/www/wikistats/css/main.css
@@ -17,3 +17,7 @@
 th.head {
 text-align: center;
 }
+
+td {
+font-size: 90%;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4ea534c6db8a2cade3ac46da0b0d4f772b7721b
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Southparkfan 
Gerrit-Reviewer: Dzahn 

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


[MediaWiki-commits] [Gerrit] Fix CentralAuth issues where e.g. Admin might not be fully a... - change (mediawiki/vagrant)

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

Change subject: Fix CentralAuth issues where e.g. Admin might not be fully 
attached
..


Fix CentralAuth issues where e.g. Admin might not be fully attached

Run migratePass0 as needed to keep track of users
that need to be attached.

Use attachmissing to request that any existing local accounts
be merged even if global already exists.

In unless, check that it's fully migrated, not just that it exists.

TODO: Make sure all the users are actually attached.  I think
this might require setting the email.


Bug: T126480
Depends-On: I81764696d2277c0d11d4440aa484a2c5ca24f354
Change-Id: I30d78e1dfc7923872824852379596959cfbe43fe
---
M puppet/hieradata/common.yaml
M puppet/modules/mediawiki/manifests/wiki.pp
M puppet/modules/role/manifests/centralauth.pp
M puppet/modules/role/manifests/centralauth/migrate_user.pp
A 
puppet/modules/role/templates/centralauth/is-centralauth-migratePass0-needed.bash.erb
5 files changed, 52 insertions(+), 4 deletions(-)

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



diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index f94c940..36867f5 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -259,6 +259,8 @@
 
 role::centralauth::db_host: "%{hiera('mysql::grant_host_name')}"
 role::centralauth::db_user: "%{hiera('mediawiki::multiwiki::db_user')}"
+role::centralauth::db_pass: "%{hiera('mediawiki::multiwiki::db_pass')}"
+role::centralauth::wiki_admin_user: "%{hiera('mediawiki::admin_user')}"
 
 role::commons::upload_dir: "%{hiera('mwv::files_dir')}/commonsimages"
 
diff --git a/puppet/modules/mediawiki/manifests/wiki.pp 
b/puppet/modules/mediawiki/manifests/wiki.pp
index 93050dc..8c17fe2 100644
--- a/puppet/modules/mediawiki/manifests/wiki.pp
+++ b/puppet/modules/mediawiki/manifests/wiki.pp
@@ -35,7 +35,9 @@
 #   Password for MySQL account (example: 'secret123').
 #
 # [*admin_user*]
-#   User name for the initial admin account (example: 'admin').
+#   User name for the initial admin account ($::mediawiki::admin_user).
+#   Changing this is not recommended, and can slow provisioning
+#   if CentralAuth is enabled.
 #
 # [*admin_pass*]
 #   Initial password for admin account (example: 'secret123').
diff --git a/puppet/modules/role/manifests/centralauth.pp 
b/puppet/modules/role/manifests/centralauth.pp
index 5037823..6b5a042 100644
--- a/puppet/modules/role/manifests/centralauth.pp
+++ b/puppet/modules/role/manifests/centralauth.pp
@@ -16,9 +16,17 @@
 # [*db_user*]
 #   Database user used for CentralAuth database
 #
+# [*db_pass*]
+#   Database password used for CentralAuth database
+#
+# [*wiki_admin_user*]
+#   Admin user name for the wikis
+#
 class role::centralauth(
 $db_host,
 $db_user,
+$db_pass,
+$wiki_admin_user,
 ){
 require ::role::mediawiki
 include ::role::antispoof
@@ -31,6 +39,8 @@
 $loginwiki = 'login'
 $alt_testwiki = 'centralauthtest'
 $selenium_user = regsubst($::browsertests::selenium_user, '_', ' ')
+
+$canonical_admin_user = inline_template('<%= 
@wiki_admin_user[0].capitalize + @wiki_admin_user[1..-1] %>')
 
 mediawiki::extension { 'CentralAuth':
 needs_update  => true,
@@ -87,6 +97,28 @@
 
 mediawiki::wiki{ [ $loginwiki, $alt_testwiki ]: }
 
+file { '/usr/local/bin/is-centralauth-migratePass0-needed':
+ensure  => present,
+owner   => 'root',
+group   => 'root',
+mode=> '0755',
+content => 
template('role/centralauth/is-centralauth-migratePass0-needed.bash.erb'),
+}
+
+# Make sure CentralAuth knows about all local users
+# To avoid running this every time, we check whether it knows
+# about Admin users on all wikis.  If someone changes Wiki[admin_user],
+# this will run every time.
+mediawiki::maintenance { 'Pass 0 of CentralAuth':
+command => '/usr/local/bin/foreachwiki 
extensions/CentralAuth/maintenance/migratePass0.php',
+onlyif  => '/usr/local/bin/is-centralauth-migratePass0-needed',
+require => [
+File['/usr/local/bin/is-centralauth-migratePass0-needed'],
+Mysql::Sql['Create CentralAuth tables'],
+Mysql::Sql['Create CentralAuth spoofuser table'],
+]
+}
+
 role::centralauth::migrate_user { [ 'Admin', $selenium_user ]: }
 
 # Environment variables used by browser tests
diff --git a/puppet/modules/role/manifests/centralauth/migrate_user.pp 
b/puppet/modules/role/manifests/centralauth/migrate_user.pp
index 74aa453..76e14a5 100644
--- a/puppet/modules/role/manifests/centralauth/migrate_user.pp
+++ b/puppet/modules/role/manifests/centralauth/migrate_user.pp
@@ -12,11 +12,11 @@
 $user = $title,
 ) {
 mediawiki::maintenance { "migrate_user_${user}_to_centralauth":
-command => "/usr/local/bin/mwscript 

[MediaWiki-commits] [Gerrit] Set td font-size to 90% - change (operations...wikistats)

2016-02-24 Thread Southparkfan (Code Review)
Southparkfan has uploaded a new change for review.

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

Change subject: Set td font-size to 90%
..

Set td font-size to 90%

Now the table should fit onto your screen.

Change-Id: If4ea534c6db8a2cade3ac46da0b0d4f772b7721b
---
M var/www/wikistats/css/main.css
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/51/273151/1

diff --git a/var/www/wikistats/css/main.css b/var/www/wikistats/css/main.css
index b400ae3..f110879 100644
--- a/var/www/wikistats/css/main.css
+++ b/var/www/wikistats/css/main.css
@@ -17,3 +17,7 @@
 th.head {
 text-align: center;
 }
+
+td {
+font-size: 90%;
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4ea534c6db8a2cade3ac46da0b0d4f772b7721b
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Southparkfan 

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


[MediaWiki-commits] [Gerrit] wikistats: crons for db backup - change (operations/puppet)

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

Change subject: wikistats: crons for db backup
..


wikistats: crons for db backup

Create and keep some db backups, but also
make sure older ones get deleted again.

Change-Id: I0636faff52b778f62d5bd1ea80da6740fc9369a9
---
M modules/wikistats/manifests/db.pp
M modules/wikistats/manifests/init.pp
2 files changed, 24 insertions(+), 0 deletions(-)

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



diff --git a/modules/wikistats/manifests/db.pp 
b/modules/wikistats/manifests/db.pp
index 8380ed8..f331d3e 100644
--- a/modules/wikistats/manifests/db.pp
+++ b/modules/wikistats/manifests/db.pp
@@ -4,4 +4,24 @@
 package { [ 'mariadb-server', 'php5-mysql']:
 ensure => present,
 }
+
+$backupdir = '/root/wsbackup'
+
+# db backup
+cron { 'mysql-dump-wikistats':
+ensure  => 'present',
+command => "/usr/bin/mysqldump -u root -p$ wikistats > 
${wikistats::db::backupdir}/wikistats_db_${date}.sql && gzip 
${backupdir}/wikistats_db_${date}.sql",
+user=> 'root',
+hour=> '0',
+minute  => '15',
+}
+
+# don't run out of disk
+cron {'mysql-dump-wikistats-clean':
+ensure  => 'present',
+command => "find ${backupdir} -name \"*.sql.gz\" -mtime +7 -exec rm {} 
\;",
+user=> 'root',
+hour=> '23',
+minute  => '23',
+}
 }
diff --git a/modules/wikistats/manifests/init.pp 
b/modules/wikistats/manifests/init.pp
index ba5433b..9743340 100644
--- a/modules/wikistats/manifests/init.pp
+++ b/modules/wikistats/manifests/init.pp
@@ -33,6 +33,10 @@
 ensure => 'directory',
 }
 
+file { '/root/wsbackup':
+ensure => 'directory',
+}
+
 # FIXME rename repo, it was a deb in the past
 # but not anymore and also not operations
 git::clone { 'operations/debs/wikistats':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0636faff52b778f62d5bd1ea80da6740fc9369a9
Gerrit-PatchSet: 10
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Southparkfan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Import Bootstrap files to avoid external CDN usage - change (operations...wikistats)

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

Change subject: Import Bootstrap files to avoid external CDN usage
..


Import Bootstrap files to avoid external CDN usage

We value user privacy <3

Change-Id: Iec1322286bd7a5659401a0fb1851b6ed2fb8ee82
---
D var/www/wikistats/css/bootstrap-3.3.5.css
A var/www/wikistats/css/bootstrap-3.3.5.min.css
A var/www/wikistats/fonts/glyphicons-halflings-regular.eot
A var/www/wikistats/fonts/glyphicons-halflings-regular.svg
A var/www/wikistats/fonts/glyphicons-halflings-regular.ttf
A var/www/wikistats/fonts/glyphicons-halflings-regular.woff
A var/www/wikistats/fonts/glyphicons-halflings-regular.woff2
M var/www/wikistats/index.php
8 files changed, 294 insertions(+), 7,197 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec1322286bd7a5659401a0fb1851b6ed2fb8ee82
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Southparkfan 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] One-letter typo makes puppet compiler unhappy - change (labs/private)

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

Change subject: One-letter typo makes puppet compiler unhappy
..


One-letter typo makes puppet compiler unhappy

Change-Id: Ib5ee9081c1c7d9617580ea497f8f76f5a6b9de17
---
M hieradata/eqiad.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Andrew Bogott: Verified; Looks good to me, approved



diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 931a778..6f404b5 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -16,7 +16,7 @@
 
 labsdnsconfig:
   db_user: 'pdns'
-  db_pass: 'dummmy'
+  db_pass: 'dummy'
   db_admin_user: 'pdns_admin'
   db_admin_pass: 'admindummy'
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5ee9081c1c7d9617580ea497f8f76f5a6b9de17
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] One-letter typo makes puppet compiler unhappy - change (labs/private)

2016-02-24 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: One-letter typo makes puppet compiler unhappy
..

One-letter typo makes puppet compiler unhappy

Change-Id: Ib5ee9081c1c7d9617580ea497f8f76f5a6b9de17
---
M hieradata/eqiad.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/50/273150/1

diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 931a778..6f404b5 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -16,7 +16,7 @@
 
 labsdnsconfig:
   db_user: 'pdns'
-  db_pass: 'dummmy'
+  db_pass: 'dummy'
   db_admin_user: 'pdns_admin'
   db_admin_pass: 'admindummy'
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5ee9081c1c7d9617580ea497f8f76f5a6b9de17
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] Added dummy passwords for labsdnsconfig - change (labs/private)

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

Change subject: Added dummy passwords for labsdnsconfig
..


Added dummy passwords for labsdnsconfig

Change-Id: I8cf73cfc18d14cd04500777ff11886cd76f01132
---
M hieradata/eqiad.yaml
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Andrew Bogott: Verified; Looks good to me, approved



diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index af4a32d..931a778 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -13,3 +13,10 @@
 keystoneconfig:
 ldap_user_pass: 'ueThe7moh7Hah'
 ldap_proxyagent_pass: 'Eche0ieng8UaNoo'
+
+labsdnsconfig:
+  db_user: 'pdns'
+  db_pass: 'dummmy'
+  db_admin_user: 'pdns_admin'
+  db_admin_pass: 'admindummy'
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8cf73cfc18d14cd04500777ff11886cd76f01132
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] packager: Fix apt invocations - change (mediawiki/vagrant)

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

Change subject: packager: Fix apt invocations
..


packager: Fix apt invocations

Exported env vars (DEBIAN_FRONTEND=noninteractive) don't pass through
the sudo barrier.

Change-Id: Ie772d142f446ea24fb7f96f507e9ff8955926757
---
M support/packager/build.sh
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/support/packager/build.sh b/support/packager/build.sh
index da3b689..9bc8857 100755
--- a/support/packager/build.sh
+++ b/support/packager/build.sh
@@ -13,7 +13,6 @@
 CONTENTS=${MWV}/support/packager/output/contents
 BUILD_INFO=${CONTENTS}/BUILD_INFO
 APT_OPTS="-o Dpkg::Options::='--force-confdef' -o 
Dpkg::Options::='--force-confold' -y"
-export DEBIAN_FRONTEND=noninteractive
 
 {
 set -x
@@ -30,10 +29,10 @@
 git reset --hard origin/master
 
 # Freshen git cache
-sudo apt-get update
-sudo apt-get $APT_OPTS dist-upgrade
+sudo /usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get update
+sudo /usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get $APT_OPTS 
dist-upgrade
 # Get rid of obsolete apt packages
-sudo apt-get $APT_OPTS autoclean
+sudo /usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get $APT_OPTS 
autoclean
 
 # Hack some things into the build
 mkdir -p ${CONTENTS}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie772d142f446ea24fb7f96f507e9ff8955926757
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] remove gdash.wikimedia.org - change (operations/dns)

2016-02-24 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: remove gdash.wikimedia.org
..


remove gdash.wikimedia.org

Removed from operations/puppet in I48150a5c9.

Bug: T104365
Change-Id: I90b49f4c578dc07fdfbbacbb4867423f37fa14ed
---
0 files changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Krinkle: Looks good to me, but someone else must approve
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90b49f4c578dc07fdfbbacbb4867423f37fa14ed
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Added dummy passwords for labsdnsconfig - change (labs/private)

2016-02-24 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Added dummy passwords for labsdnsconfig
..

Added dummy passwords for labsdnsconfig

Change-Id: I8cf73cfc18d14cd04500777ff11886cd76f01132
---
M hieradata/eqiad.yaml
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/49/273149/1

diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index af4a32d..931a778 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -13,3 +13,10 @@
 keystoneconfig:
 ldap_user_pass: 'ueThe7moh7Hah'
 ldap_proxyagent_pass: 'Eche0ieng8UaNoo'
+
+labsdnsconfig:
+  db_user: 'pdns'
+  db_pass: 'dummmy'
+  db_admin_user: 'pdns_admin'
+  db_admin_pass: 'admindummy'
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cf73cfc18d14cd04500777ff11886cd76f01132
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] T127983: Don't crash on misconfigured statsd host - change (mediawiki...parsoid)

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

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

Change subject: T127983: Don't crash on misconfigured statsd host
..

T127983: Don't crash on misconfigured statsd host

 * Do this manually for now, but will try to upstream this as a method
   instead of calling an async func in the initializer.

Change-Id: I31fbf3a6574a66ae6f52b543e4eb7afc40c99ade
---
M lib/config/ParsoidConfig.js
M lib/utils/Util.js
2 files changed, 20 insertions(+), 6 deletions(-)


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

diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index ac50d0f..f3c4f8c 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -159,7 +159,12 @@
 
// Timer that reports metrics to statsd
if (this.useDefaultPerformanceTimer) {
-   this.performanceTimer = new Util.StatsD(this.txstatsdHost, 
this.txstatsdPort);
+   var self = this;
+   Util.StatsD(this.txstatsdHost, 
this.txstatsdPort).then(function(pt) {
+   self.performanceTimer = pt;
+   }).catch(function(err) {
+   console.log('Failied to initialize performance timer: ' 
+ err);
+   });
}
 
// ParsoidConfig is used across requests. Freeze it to avoid mutation.
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index ce2fd7f..4e6a260 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -5,6 +5,7 @@
 'use strict';
 require('../../core-upgrade.js');
 
+var dns = require('dns');
 var async = require('async');
 var crypto = require('crypto');
 var request = require('request');
@@ -12,6 +13,7 @@
 var TXStatsD = require('node-txstatsd');
 var Consts = require('../config/WikitextConstants.js').WikitextConstants;
 var JSUtils = require('./jsutils.js').JSUtils;
+var Promise = require('./promise.js');
 
 var lastItem = JSUtils.lastItem;
 
@@ -1487,7 +1489,7 @@
 Util.magicMasqs = new Set(["defaultsort", "displaytitle"]);
 
 // StatsD wrapper
-Util.StatsD = function(statsdHost, statsdPort) {
+var StatsD = function(statsdHost, statsdPort) {
this.statsd = new TXStatsD({
host:  statsdHost,
port:  statsdPort,
@@ -1495,14 +1497,14 @@
suffix:'',
txstatsd:  false,
globalize: false,
-   cacheDns:  true,
+   cacheDns:  false,  // Doing this ourselves below.
mock:  false,
});
 
this.nameCache = {};
 };
 
-Util.StatsD.prototype.makeName = function makeName(name) {
+StatsD.prototype.makeName = function makeName(name) {
// See https://github.com/etsy/statsd/issues/110
// Only [\w_.-] allowed, with '.' being the hierarchy separator.
// Regex sanitizes string to a statsd valid form that also resembles a 
path
@@ -1517,7 +1519,7 @@
}
 };
 
-Util.StatsD.prototype.timing = function timing(name, suffix, delta) {
+StatsD.prototype.timing = function timing(name, suffix, delta) {
name = this.makeName(name);
if (Array.isArray(suffix)) {
// Send several timings at once
@@ -1532,11 +1534,18 @@
return delta;
 };
 
-Util.StatsD.prototype.count = function count(name, suffix) {
+StatsD.prototype.count = function count(name, suffix) {
suffix = suffix ? '.' + suffix : '';
this.statsd.increment(this.makeName(name) + suffix);
 };
 
+var dnsLookup = Promise.promisify(dns.lookup, false, dns);
+Util.StatsD = function(statsdHost, statsdPort) {
+   return dnsLookup(statsdHost).then(function(address) {
+   return new StatsD(address, statsdPort);
+   });
+};
+
 // A simple console reporter. Useful for development.
 Util.LogStatsD = function() {
var self = this;

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

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

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


[MediaWiki-commits] [Gerrit] packager: Fix apt invocations - change (mediawiki/vagrant)

2016-02-24 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: packager: Fix apt invocations
..

packager: Fix apt invocations

Exported env vars (DEBIAN_FRONTEND=noninteractive) don't pass through
the sudo barrier.

Change-Id: Ie772d142f446ea24fb7f96f507e9ff8955926757
---
M support/packager/build.sh
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/47/273147/1

diff --git a/support/packager/build.sh b/support/packager/build.sh
index da3b689..9bc8857 100755
--- a/support/packager/build.sh
+++ b/support/packager/build.sh
@@ -13,7 +13,6 @@
 CONTENTS=${MWV}/support/packager/output/contents
 BUILD_INFO=${CONTENTS}/BUILD_INFO
 APT_OPTS="-o Dpkg::Options::='--force-confdef' -o 
Dpkg::Options::='--force-confold' -y"
-export DEBIAN_FRONTEND=noninteractive
 
 {
 set -x
@@ -30,10 +29,10 @@
 git reset --hard origin/master
 
 # Freshen git cache
-sudo apt-get update
-sudo apt-get $APT_OPTS dist-upgrade
+sudo /usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get update
+sudo /usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get $APT_OPTS 
dist-upgrade
 # Get rid of obsolete apt packages
-sudo apt-get $APT_OPTS autoclean
+sudo /usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get $APT_OPTS 
autoclean
 
 # Hack some things into the build
 mkdir -p ${CONTENTS}

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

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

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


[MediaWiki-commits] [Gerrit] Import Bootstrap files to avoid external CDN usage - change (operations...wikistats)

2016-02-24 Thread Southparkfan (Code Review)
Southparkfan has uploaded a new change for review.

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

Change subject: Import Bootstrap files to avoid external CDN usage
..

Import Bootstrap files to avoid external CDN usage

We value user privacy <3

Change-Id: Iec1322286bd7a5659401a0fb1851b6ed2fb8ee82
---
D var/www/wikistats/css/bootstrap-3.3.5.css
A var/www/wikistats/css/bootstrap-3.3.5.min.css
A var/www/wikistats/fonts/glyphicons-halflings-regular.eot
A var/www/wikistats/fonts/glyphicons-halflings-regular.svg
A var/www/wikistats/fonts/glyphicons-halflings-regular.ttf
A var/www/wikistats/fonts/glyphicons-halflings-regular.woff
A var/www/wikistats/fonts/glyphicons-halflings-regular.woff2
M var/www/wikistats/index.php
8 files changed, 294 insertions(+), 7,197 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/45/273145/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec1322286bd7a5659401a0fb1851b6ed2fb8ee82
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Southparkfan 

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


[MediaWiki-commits] [Gerrit] REST path escaping - change (operations/puppet)

2016-02-24 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: REST path escaping
..

REST path escaping

REST APIs like their slashes preserved, while MediaWiki likes them decoded.
This patch adds a REST API normalization variant that decodes everything but
the path delimiters [/?#] as well as % itself. This includes the `unreserved`
set and `sub-delim` classes from RFC3986, as well as those characters from
`gen-delim` that are only used in the host / auth portion of a URL ([:@]).

As discussed on the task, the MediaWiki variant should probably include at
least `unreserved` and much of `gen-delim` as well. This patch does not touch
this just yet, leaving it to a follow-up once consensus on those changes is
reached.

Change-Id: I23d5baf099e4a04aa451efde7cd7d952c202e6cd
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 78 insertions(+), 3 deletions(-)


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

diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index 93c197e..6d63d94 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -50,7 +50,7 @@
 C{
#include 
 }C
-sub normalize_path {
+sub normalize_mediawiki_path {
/* Rewrite the path part of the URL, replacing unnecessarily escaped
 * punctuation with the actual characters. The character list is from
 * MediaWiki's wfUrlencode(), so the URLs produced here will be the 
same as
@@ -107,6 +107,79 @@
/* Reached the query part. Just copy 
the rest of the URL
 * to the destination.
 */
+   memcpy(destBuffer + outPos, url + i, 
sizeof(char) * (urlLength - i));
+   outPos += urlLength - i;
+   i = urlLength;
+   } else {
+   destBuffer[outPos++] = url[i];
+   }
+   }
+   destBuffer[outPos] = '\0';
+
+   /* Set req.url. This will copy our stack buffer into 
the workspace.
+* VRT_l_req_url() is varadic, and concatenates its 
arguments. The
+* vrt_magic_string_end marks the end of the list.
+*/
+   if (dirty) {
+   VRT_l_req_url(sp, destBuffer, 
vrt_magic_string_end);
+   }
+   }
+   #undef NP_IS_HEX
+   #undef NP_HEX_DIGIT
+   #undef NP_HEXCHAR
+   }C
+}
+
+sub normalize_rest_path {
+   /* Rewrite the path part of the URL, replacing unnecessarily escaped
+* punctuation with the actual characters. The character list is based 
on
+* the discussion in T127387, aiming for typical REST API use cases,
+* including RESTBase. */
+   C{
+   /* DIY hexadecimal conversion, since it is simple enough for a 
fixed
+* width, and all the relevant standard C library functions 
promise to
+* malfunction if the locale is set to anything other than "C"
+*/
+   #define NP_HEX_DIGIT(c) ( \
+   (c) >= '0' && (c) <= '9' ? (c) - '0' : ( \
+   (c) >= 'A' && (c) <= 'F' ? (c) - 'A' + 0x0a : ( 
\
+   (c) >= 'a' && (c) <= 'f' ? (c) - 'a' + 
0x0a : -1 ) ) )
+   #define NP_IS_HEX(c) (NP_HEX_DIGIT(c) != -1)
+   #define NP_HEXCHAR(c1, c2) (char)( (NP_HEX_DIGIT(c1) << 4) | 
NP_HEX_DIGIT(c2) )
+   const char * url = VRT_r_req_url(sp);
+   size_t i, outPos;
+   const size_t urlLength = strlen(url);
+// index for the last position %XX can start at:
+   const size_t lastConvertIdx = urlLength > 2 ? urlLength - 3 : 0;
+   char c;
+   int dirty = 0;
+
+   /* Allocate destination memory from the stack using the C99
+* variable-length automatic feature. We know the length in 
advance
+* because this function can only shorten the input string.
+*/
+   char destBuffer[urlLength + 1];
+   if (url) {
+   for (i = 0, outPos = 0; i < urlLength; i++) {
+   if (i <= lastConvertIdx && url[i] == '%' && 
NP_IS_HEX(url[i+1]) && NP_IS_HEX(url[i+2])) {
+   c = NP_HEXCHAR(url[i+1], url[i+2]);
+   /* Don't decode the subset of 
gen-delims from RFC3986
+

[MediaWiki-commits] [Gerrit] Consolidate labs pdns settings into a hiera dict. - change (operations/puppet)

2016-02-24 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Consolidate labs pdns settings into a hiera dict.
..

Consolidate labs pdns settings into a hiera dict.

Among other things, this will allow us to specify
realm- and host-based pnds passwords.

Change-Id: I92c0d785ecb9d773a6ecab7a22b694015477e529
---
M hieradata/codfw.yaml
M hieradata/codfw/labtest-instances.yaml
M hieradata/codfw/labtest.yaml
M hieradata/eqiad.yaml
M hieradata/hosts/holmium.yaml
M hieradata/labs.yaml
M manifests/realm.pp
M modules/openstack/manifests/nova/network.pp
M modules/role/manifests/labs/dns.pp
M modules/role/manifests/labs/dnsrecursor.pp
M modules/role/manifests/labs/openstack/designate.pp
11 files changed, 48 insertions(+), 30 deletions(-)


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

diff --git a/hieradata/codfw.yaml b/hieradata/codfw.yaml
index e6760bf..1cacc3d 100644
--- a/hieradata/codfw.yaml
+++ b/hieradata/codfw.yaml
@@ -31,9 +31,12 @@
 labs_certmanager_hostname: "labservices1001.wikimedia.org"
 
 # These are the up-and-coming, better dns servers:
-labs_dns_host:  "labs-ns2.wikimedia.org"
-labs_dns_host_secondary:  "labs-ns3.wikimedia.org"
-labs_recursor:  "labs-recursor0.wikimedia.org"
+labsdnsconfig:
+  host: 'labs-ns2.wikimedia.org'
+  host_secondary: 'labs-ns3.wikimedia.org'
+  dbserver: 'm5-master.eqiad.wmnet'
+  recursor: 'labs-recursor0.wikimedia.org'
+  recursor_secondary: 'labs-recursor1.wikimedia.org'
 
 ldap_labs_hostname: ldap-labs.codfw.wikimedia.org
 
diff --git a/hieradata/codfw/labtest-instances.yaml 
b/hieradata/codfw/labtest-instances.yaml
index 8bfb6f6..a9616b7 100644
--- a/hieradata/codfw/labtest-instances.yaml
+++ b/hieradata/codfw/labtest-instances.yaml
@@ -1,5 +1,7 @@
-labs_recursor: "labtest-recursor0.wikimedia.org"
-labs_recursor_secondary: "labtest-recursor0.wikimedia.org"
 puppetmaster: "labtestcontrol2001.wikimedia.org"
 saltmaster: "labtestcontrol2001.wikimedia.org"
 ldap_host: "labtestservices2001.wikimedia.org"
+
+labsdnsconfig:
+  recursor: 'labtest-recursor0.wikimedia.org'
+  recursor_secondary: 'labtest-recursor0.wikimedia.org'
diff --git a/hieradata/codfw/labtest.yaml b/hieradata/codfw/labtest.yaml
index 353321f..89cd8e6 100644
--- a/hieradata/codfw/labtest.yaml
+++ b/hieradata/codfw/labtest.yaml
@@ -26,14 +26,15 @@
 
 labs_ldap_dns_host:  "labtestservices2001.wikimedia.org"
 labs_ldap_dns_host_secondary:  
"labtestservices2001.wikimedia.org"
-
-labs_dns_host:  "labtest-ns0.wikimedia.org"
-labs_dns_host_secondary:  "labtest-ns0.wikimedia.org"
-labs_dns_db_server: 'labtestcontrol2001.wikimedia.org'
-labs_recursor:  "labtest-recursor0.wikimedia.org"
-
 ldap_labs_hostname: labtestservices2001.wikimedia.org
 
+labsdnsconfig:
+  host: 'labtest-ns0.wikimedia.org'
+  host_secondary: 'labs-ns0.wikimedia.org'
+  dbserver: 'labtestcontrol2001.wikimedia.org'
+  recursor: 'labtest-recursor0.wikimedia.org'
+  recursor_secondary: 'labtest-recursor0.wikimedia.org'
+
 novaconfig:
   network_host: *labsnovanetworkip
   api_host: *labsnovaapihost
diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 013619b..98d273a 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -91,10 +91,12 @@
 labs_ldap_dns_host_secondary:  
"labs-ns1.wikimedia.org"
 
 # These are the up-and-coming, better dns servers:
-labs_dns_host:  "labs-ns2.wikimedia.org"
-labs_dns_host_secondary:  "labs-ns3.wikimedia.org"
-labs_dns_db_server: 'm5-master.eqiad.wmnet'
-labs_recursor:  "labs-recursor1.wikimedia.org"
+labsdnsconfig:
+  host: 'labs-ns2.wikimedia.org'
+  host_secondary: 'labs-ns3.wikimedia.org'
+  dbserver: 'm5-master.eqiad.wmnet'
+  recursor: 'labs-recursor1.wikimedia.org'
+  recursor_secondary: 'labs-recursor0.wikimedia.org'
 
 novaconfig:
   db_host: 'm5-master.eqiad.wmnet'
diff --git a/hieradata/hosts/holmium.yaml b/hieradata/hosts/holmium.yaml
index 792c5c8..e7acc24 100644
--- a/hieradata/hosts/holmium.yaml
+++ b/hieradata/hosts/holmium.yaml
@@ -1,4 +1,7 @@
 cluster: virt
-labs_dns_host: "labs-ns3.wikimedia.org"
-labs_dns_host_secondary:  "labs-ns2.wikimedia.org"
-labs_recursor: "labs-recursor0.wikimedia.org"
+
+labsdnsconfig:
+  host: 'labs-ns3.wikimedia.org'
+  host_secondary: 'labs-ns2.wikimedia.org'
+  recursor: 'labs-recursor0.wikimedia.org'
+  recursor_secondary: 'labs-recursor1.wikimedia.org'
diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index b512e42..f897439 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -4,6 +4,11 @@
 standard::has_ganglia: false
 has_nrpe: false
 
+# dns
+labsdnsconfig:
+  recursor: 'labs-recursor1.wikimedia.org'
+  recursor_secondary: 'labs-recursor0.wikimedia.org'
+
 # Additional base overrides
 standard::has_admin: false
 base::remote_syslog::enable: false
@@ -45,8 +50,6 @@
   "${::fqdn}": 1
 nrpe::allowed_hosts: '10.68.16.195'
 
-labs_recursor: "labs-recursor1.wikimedia.org"

[MediaWiki-commits] [Gerrit] Add TitleMoveStarting, mirroring TitleMoveCompleting - change (mediawiki/core)

2016-02-24 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Add TitleMoveStarting, mirroring TitleMoveCompleting
..

Add TitleMoveStarting, mirroring TitleMoveCompleting

This is a pre-requisite to fix a Flow move regression, T127785.

This allows running an atomic entirely within the move with the correct
ordering.

Bug: T127785
Change-Id: Ie772f737f917854e4cfefe52ec3bea4669c9efe0
---
M docs/hooks.txt
M includes/MovePage.php
2 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/273143/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index 930aa0a..1bdc82f 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -3066,6 +3066,11 @@
 $nt: new title
 $user: user who does the move
 
+'TitleMoveStarting': Before moving an article, but just after the atomic 
starts (title).
+$old: old title
+$nt: new title
+$user: user who does the move
+
 'TitleMoveComplete': After moving an article (title), post-commit.
 &$old: old title
 &$nt: new title
diff --git a/includes/MovePage.php b/includes/MovePage.php
index 6d69eaa..afa4e1c 100644
--- a/includes/MovePage.php
+++ b/includes/MovePage.php
@@ -248,6 +248,9 @@
}
 
$dbw->startAtomic( __METHOD__ );
+
+   Hooks::run( 'TitleMoveStarting', [ $this->oldTitle, 
$this->newTitle, $user ] );
+
$pageid = $this->oldTitle->getArticleID( Title::GAID_FOR_UPDATE 
);
$protected = $this->oldTitle->isProtected();
 

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

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

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


[MediaWiki-commits] [Gerrit] T108134: Match html5 unquoted attribute parsing - change (mediawiki...parsoid)

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

Change subject: T108134: Match html5 unquoted attribute parsing
..


T108134: Match html5 unquoted attribute parsing

 * https://www.w3.org/TR/html5/syntax.html#before-attribute-value-state

 * There's a similar patch for the php parser in,
   Ic2fc1b573a55a847e6c05707678b58c1189ecc52

Change-Id: I2160a23b2a3c914eb369347bbf5d58328440041d
---
M lib/wt2html/pegTokenizer.pegjs.txt
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 48 insertions(+), 62 deletions(-)

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



diff --git a/lib/wt2html/pegTokenizer.pegjs.txt 
b/lib/wt2html/pegTokenizer.pegjs.txt
index ee156a3..d34517d 100644
--- a/lib/wt2html/pegTokenizer.pegjs.txt
+++ b/lib/wt2html/pegTokenizer.pegjs.txt
@@ -1336,7 +1336,7 @@
   / s:$(space_or_newline* '"') t:attribute_preprocessor_text_double? q:$('"' / 
&('/'? '>')) {
   return tu.getAttributeValueAndSource(input, t, startOffset() + s.length, 
endOffset() - q.length);
 }
-  / s:$space_or_newline* t:attribute_preprocessor_text !'=' {
+  / s:$space_or_newline* t:attribute_preprocessor_text &(space_or_newline / 
eof / '/'? '>') {
   return tu.getAttributeValueAndSource(input, t, startOffset() + s.length, 
endOffset());
 }
 
@@ -1350,7 +1350,7 @@
   / s:$(space* '"') t:table_attribute_preprocessor_text_double? q:$('"' / 
&('!!' / [|\r\n])) {
   return tu.getAttributeValueAndSource(input, t, startOffset() + s.length, 
endOffset() - q.length);
 }
-  / s:$space* t:table_attribute_preprocessor_text !'=' {
+  / s:$space* t:table_attribute_preprocessor_text &(space_or_newline/ eof / 
'!!' / '|') {
   return tu.getAttributeValueAndSource(input, t, startOffset() + s.length, 
endOffset());
 }
 
@@ -2019,8 +2019,14 @@
   }
 
 // Attribute values with preprocessor support
+
+// n.b. / is a permissible char in the three rules below.
+// We only break on />, enforced by the negated expression.
+// Hence, it isn't included in the stop set.
+
+// The stop set is space_or_newline and > which matches generic_att_value.
 attribute_preprocessor_text
-  = r:( $[^{}&<\-|'"\r\n=>\t /]+
+  = r:( $[^{}&<\-|/ \t\n\r\x0c>]+
   / !inline_breaks
 !'/>'
 s:( directive / [{}&<\-|/] ) { return s; }
@@ -2028,9 +2034,9 @@
 return tu.flattenString(r);
   }
 
-// The stop set is '/> which matches generic_att_value.
+// The stop set is '> which matches generic_att_value.
 attribute_preprocessor_text_single
-  = r:( $[^{}&<\-|'/>]+
+  = r:( $[^{}&<\-|/'>]+
   / !inline_breaks
 !'/>'
 s:( directive / [{}&<\-|/] ) { return s; }
@@ -2038,9 +2044,9 @@
 return tu.flattenString(r);
   }
 
-// The stop set is "/> which matches generic_att_value.
+// The stop set is "> which matches generic_att_value.
 attribute_preprocessor_text_double
-  = r:( $[^{}&<\-|"/>]+
+  = r:( $[^{}&<\-|/">]+
   / !inline_breaks
 !'/>'
 s:( directive / [{}&<\-|/] ) { return s; }
@@ -2049,29 +2055,31 @@
   }
 
 // Variants with the entire attribute on a single line
+
+// n.b. ! is a permissible char in the three rules below.
+// We only break on !! in th, enforced by the inline break.
+// Hence, it isn't included in the stop set.
+
+// The stop set is space_or_newline and | which matches table_att_value.
 table_attribute_preprocessor_text
-  = r:( $[^{}&<\-!'"\r\n|=>\t /\[\]]+
-  / !inline_breaks s:( directive / [{}&<\-'"/\]] ) { return s; }
+  = r:( $[^{}&<\-! \t\n\r\x0c|]+
+  / !inline_breaks s:( directive / [{}&<\-!] ) { return s; }
   )+ {
 return tu.flattenString(r);
   }
 
 // The stop set is '\r\n| which matches table_att_value.
-// n.b. ! is a permissible char.  We only break on !! in th, enforced by the
-// inline break.  Hence, it isn't included in the stop set.
 table_attribute_preprocessor_text_single
   = r:( $[^{}&<\-!'\r\n|]+
-  / !inline_breaks s:( directive / $[{}&<\-!] ) { return s; }
+  / !inline_breaks s:( directive / [{}&<\-!] ) { return s; }
   )* {
 return tu.flattenString(r);
   }
 
 // The stop set is "\r\n| which matches table_att_value.
-// n.b. ! is a permissible char.  We only break on !! in th, enforced by the
-// inline break.  Hence, it isn't included in the stop set.
 table_attribute_preprocessor_text_double
   = r:( $[^{}&<\-!"\r\n|]+
-  / !inline_breaks s:( directive / $[{}&<\-!] ) { return s; }
+  / !inline_breaks s:( directive / [{}&<\-!] ) { return s; }
   )* {
 return tu.flattenString(r);
   }
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 28abfe0..593ba35 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -172,7 +172,6 @@
 add("wt2html", "Language converter: output gets cut off unexpectedly (bug 
5757)", "this bit is safe: }-\n\nbut if we add a conversion instance: 
-{zh-cn:xxx;zh-tw:yyy}-\n\nthen we 
get cut off here: }-\n\nall 
additional text is vanished");
 

[MediaWiki-commits] [Gerrit] xhgui: Sample fewer requests (1:100k instead of 1:10k) - change (operations/mediawiki-config)

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

Change subject: xhgui: Sample fewer requests (1:100k instead of 1:10k)
..


xhgui: Sample fewer requests (1:100k instead of 1:10k)

To relieve storage pressure on hafnium.

Change-Id: I016e23d81fd7da324647da4b047930a5b6bec30e
---
M wmf-config/StartProfiler.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/StartProfiler.php b/wmf-config/StartProfiler.php
index cb1a56c..06176a1 100644
--- a/wmf-config/StartProfiler.php
+++ b/wmf-config/StartProfiler.php
@@ -134,7 +134,7 @@
 if (
ini_get( 'hhvm.stats.enable_hot_profiler' ) &&
!empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) &&
-   ( isset( $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) || mt_rand( 1, 1 ) 
=== 1 )
+   ( isset( $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) || mt_rand( 1, 10 ) 
=== 1 )
 ) {
xhprof_enable( XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY | 
XHPROF_FLAGS_NO_BUILTINS );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I016e23d81fd7da324647da4b047930a5b6bec30e
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fully-qualify EventLoggingBaseUri - change (operations/mediawiki-config)

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

Change subject: Fully-qualify EventLoggingBaseUri
..


Fully-qualify EventLoggingBaseUri

So it can be used from PHP.

Bug: T127209
Change-Id: I4cc836f3ca24a0b0e252d5648e4553d366b39685
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index e9dd255..27f7677 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2677,7 +2677,7 @@
$wgEventLoggingFile = 
"udp://$wmfUdp2logDest/EventLogging-$wgDBname";
} else {
// All other wikis reference metawiki.
-   $wgEventLoggingBaseUri = "{$wgServer}/beacon/event";
+   $wgEventLoggingBaseUri = $wgCanonicalServer . '/beacon/event';
$wgEventLoggingDBname = 'metawiki';
$wgEventLoggingFile = 
"{$wmfLocalServices['eventlogging']}/EventLogging";
$wgEventLoggingSchemaApiUri = 
'https://meta.wikimedia.org/w/api.php';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4cc836f3ca24a0b0e252d5648e4553d366b39685
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Preview of list-defined references - change (mediawiki...Cite)

2016-02-24 Thread Cenarium (Code Review)
Cenarium has uploaded a new change for review.

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

Change subject: Preview of list-defined references
..

Preview of list-defined references

This allows to preview list-defined references in the section where they
are defined.

Bug: T128036
Change-Id: Ifeeef1129a64e73add8dfe0ee8519e8477712693
---
M Cite_body.php
1 file changed, 27 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/41/273141/1

diff --git a/Cite_body.php b/Cite_body.php
index 4bcab61..74d1f38 100644
--- a/Cite_body.php
+++ b/Cite_body.php
@@ -255,12 +255,13 @@
 * 
 */
if ( $this->mInReferences ) {
+   $isSectionPreview = 
$parser->getOptions()->getIsSectionPreview();
if ( $group != $this->mReferencesGroup ) {
#  and  have conflicting group 
attributes.
$this->mReferencesErrors[] =
$this->error( 
'cite_error_references_group_mismatch', htmlspecialchars( $group ) );
} elseif ( $str !== '' ) {
-   if ( !isset( $this->mRefs[$group] ) ) {
+   if ( !$isSectionPreview && !isset( 
$this->mRefs[$group] ) ) {
# Called with group attribute not 
defined in text.
$this->mReferencesErrors[] =
$this->error( 
'cite_error_references_missing_group', htmlspecialchars( $group ) );
@@ -268,7 +269,7 @@
#  calls inside  must 
be named
$this->mReferencesErrors[] =
$this->error( 
'cite_error_references_no_key' );
-   } elseif ( !isset( $this->mRefs[$group][$key] ) 
) {
+   } elseif ( !$isSectionPreview && !isset( 
$this->mRefs[$group][$key] ) ) {
# Called with name attribute not 
defined in text.
$this->mReferencesErrors[] =
$this->error( 
'cite_error_references_missing_key', $key );
@@ -691,9 +692,6 @@
}
 
$s = $this->referencesFormat( $group );
-   if ( $parser->getOptions()->getIsSectionPreview() ) {
-   return $s;
-   }
 
# Append errors generated while processing 
if ( $this->mReferencesErrors ) {
@@ -812,7 +810,8 @@
// anonymous reference because displaying "1. 1.1 Ref 
text" is
// overkill and users frequently use named references 
when they
// don't need them for convenience
-   } elseif ( $val['count'] === 0 ) {
+   }
+   if ( $val['count'] === 0 ) {
return wfMessage(
'cite_references_link_one',
$this->referencesKey( $key . "-" . 
$val['key'] ),
@@ -821,26 +820,33 @@
$text
)->inContentLanguage()->plain();
// Named references with >1 occurrences
-   } else {
-   $links = array();
-   // for group handling, we have an extra key here.
-   for ( $i = 0; $i <= $val['count']; ++$i ) {
-   $links[] = wfMessage(
-   
'cite_references_link_many_format',
-   $this->refKey( $key, 
$val['key'] . "-$i" ),
-   
$this->referencesFormatEntryNumericBacklinkLabel( $val['number'], $i, 
$val['count'] ),
-   
$this->referencesFormatEntryAlternateBacklinkLabel( $i )
-   )->inContentLanguage()->plain();
-   }
-
-   $list = $this->listToText( $links );
-
+   }
+   if ( !isset( $val['count'] ) ) {
+   // this handles the case of section preview for 
list-defined references
return wfMessage( 'cite_references_link_many',
$this->referencesKey( $key . "-" . 
$val['key'] ),
-   $list,
+   '',
$text
)->inContentLanguage()->plain();
}
+   $links = array();
+   // for group handling, we have 

[MediaWiki-commits] [Gerrit] xhgui: Sample fewer requests (1:100k instead of 1:10k) - change (operations/mediawiki-config)

2016-02-24 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: xhgui: Sample fewer requests (1:100k instead of 1:10k)
..

xhgui: Sample fewer requests (1:100k instead of 1:10k)

To relieve storage pressure on hafnium.

Change-Id: I016e23d81fd7da324647da4b047930a5b6bec30e
---
M wmf-config/StartProfiler.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/StartProfiler.php b/wmf-config/StartProfiler.php
index cb1a56c..06176a1 100644
--- a/wmf-config/StartProfiler.php
+++ b/wmf-config/StartProfiler.php
@@ -134,7 +134,7 @@
 if (
ini_get( 'hhvm.stats.enable_hot_profiler' ) &&
!empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) &&
-   ( isset( $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) || mt_rand( 1, 1 ) 
=== 1 )
+   ( isset( $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) || mt_rand( 1, 10 ) 
=== 1 )
 ) {
xhprof_enable( XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY | 
XHPROF_FLAGS_NO_BUILTINS );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I016e23d81fd7da324647da4b047930a5b6bec30e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] don't wrap lines inside table cells - change (operations...wikistats)

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

Change subject: don't wrap lines inside table cells
..


don't wrap lines inside table cells

Don't wrap text in table cells (the timestamp column especially),
it made the table waste a lot of screen space.

Change-Id: I9e1274fd6b87703237a547e5f3f545930556667f
---
M var/www/wikistats/css/main.css
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/var/www/wikistats/css/main.css b/var/www/wikistats/css/main.css
index a5eb2e2..b400ae3 100644
--- a/var/www/wikistats/css/main.css
+++ b/var/www/wikistats/css/main.css
@@ -1,3 +1,7 @@
+td {
+white-space:nowrap;
+}
+
 td.timestamp-ok {
 background: #aaeeaa;
 }
@@ -11,5 +15,5 @@
 }
 
 th.head {
-   text-align: center;
-}
\ No newline at end of file
+text-align: center;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e1274fd6b87703237a547e5f3f545930556667f
Gerrit-PatchSet: 2
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: RobiH 
Gerrit-Reviewer: Southparkfan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [Untested] Trigger transcode jobs from FileUpload hook - change (mediawiki...TimedMediaHandler)

2016-02-24 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: [Untested] Trigger transcode jobs from FileUpload hook
..

[Untested] Trigger transcode jobs from FileUpload hook

We only do transcodes for local files. The previously used
UploadComplete hook is really just a wrapper around this FileUpload
hook, but then not specific to LocalFile. Using this lower level hook,
allows it to be triggered by importImages.php, which only uploads
local files using the lower level recordUpload2.

Bug: T127597
Change-Id: Id79fad222d8d27ce7ecf77b7eb59bca54bebff3c
---
M TimedMediaHandler.hooks.php
1 file changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index f09c13a..b37a70e 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -255,7 +255,7 @@
$wgHooks['ArticleFromTitle'][] = 
'TimedMediaIframeOutput::iframeHook';
 
// When an upload completes ( check clear any existing 
transcodes )
-   $wgHooks['UploadComplete'][] = 
'TimedMediaHandlerHooks::checkUploadComplete';
+   $wgHooks['FileUpload'][] = 
'TimedMediaHandlerHooks::onFileUpload';
 
// When an image page is moved:
$wgHooks['TitleMove'][] = 
'TimedMediaHandlerHooks::checkTitleMove';
@@ -457,11 +457,10 @@
}
 
/**
-* @param $image UploadBase
+* @param $file LocalFile object
 * @return bool
 */
-   public static function checkUploadComplete( $upload ) {
-   $file = $upload->getLocalFile();
+   public static function onFileUpload( $file, $reupload, 
$hasNewPageContent ) {
// Check that the file is a transcodable asset:
if ( $file && self::isTranscodableFile( $file ) ) {
// Remove all the transcode files and db states for 
this asset

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id79fad222d8d27ce7ecf77b7eb59bca54bebff3c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

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


[MediaWiki-commits] [Gerrit] don't wrap lines inside table cells - change (operations...wikistats)

2016-02-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: don't wrap lines inside table cells
..

don't wrap lines inside table cells

Don't wrap text in table cells (the timestamp column especially),
it made the table waste a lot of screen space.

Change-Id: I9e1274fd6b87703237a547e5f3f545930556667f
---
M var/www/wikistats/css/main.css
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/39/273139/1

diff --git a/var/www/wikistats/css/main.css b/var/www/wikistats/css/main.css
index a5eb2e2..d2c3ebf 100644
--- a/var/www/wikistats/css/main.css
+++ b/var/www/wikistats/css/main.css
@@ -1,3 +1,7 @@
+td {
+white-space:nowrap;
+}
+
 td.timestamp-ok {
 background: #aaeeaa;
 }
@@ -12,4 +16,4 @@
 
 th.head {
text-align: center;
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e1274fd6b87703237a547e5f3f545930556667f
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] index.php, replace tabs with spaces - change (operations...wikistats)

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

Change subject: index.php, replace tabs with spaces
..


index.php, replace tabs with spaces

Change-Id: Ifa20aa6a6b9afa8ceaae37e8cf572157c1063722
---
M var/www/wikistats/index.php
1 file changed, 88 insertions(+), 88 deletions(-)

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



diff --git a/var/www/wikistats/index.php b/var/www/wikistats/index.php
index 71548eb..04d472e 100644
--- a/var/www/wikistats/index.php
+++ b/var/www/wikistats/index.php
@@ -32,37 +32,37 @@
 ?>
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
 http://www.w3.org/1999/xhtml; lang="en" xml:lang="en">
-   
-   
-   WikiStats - Mediawiki statistics
-   
-   https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css; 
rel="stylesheet" type="text/css" />
-   
-   
-   
-   
-   
-   
-   $(document).ready(function() {
-   $('#table').DataTable();
-   } );
-   
-   
-   
-   
-   
-   
-   Wikistats
-   
-   
-   
-   
-   
-   
-   Wikistats 2.0
-   
-   [beta]
-   
+
+
+WikiStats - Mediawiki statistics
+
+https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css; 
rel="stylesheet" type="text/css" />
+
+
+
+
+
+
+$(document).ready(function() {
+$('#table').DataTable();
+} );
+
+
+
+
+
+
+Wikistats
+
+
+
+
+
+
+Wikistats 2.0
+
+[beta]
+
 
-   
-   
-   
-   List of 
MediaWikis
-   
-   
-   
-   Project
-of wikis
-   Good articles
-   Total pages
-   Edits
-   Images
-   Users
-   Admins
-   Stub ratio
-   Formats
-   Last update
-   
-   
-   
-   
-   Project
-of wikis
-   Good articles
-   Total pages
-   Edits
-   Images
-   Users
-   Admins
-   Stub ratio
-   Formats
-   Last update
-   
+
+
+
+List of MediaWikis
+
+
+
+Project
+ of wikis
+Good articles
+Total pages
+Edits
+Images
+Users
+Admins
+Stub ratio
+Formats
+Last update
+
+
+
+
+Project
+ of wikis
+Good articles
+Total pages
+Edits
+Images
+Users
+Admins
+Stub ratio
+Formats
+Last update
+
 ";
 
 
@@ -148,7 +148,7 @@
 $result = mysql_query("$query") or die(mysql_error());
 
 while ($row = mysql_fetch_array($result)) {
-   $count++;
+$count++;
 $users = $row['gusers'];
 $gwikis = gwikis + $row['numwikis'];
 $gtotal = $gtotal + $row['gtotal'];
@@ -161,7 +161,7 @@
 if ($row['gtotal'] == 0) {
 $stubratio = 0;
 } else {
-   $stubratio = $row['ggood'] / $row['gtotal'];
+$stubratio = $row['ggood'] / $row['gtotal'];
 }
 
 $grandstubratio = 0;
@@ -186,29 +186,29 @@
 
 }
 
-   echo "
-   ${count}
-   $name
-   " . $row['numwikis'] . "
-   " . $row['ggood'] . "
-   " . $row['gtotal'] . "
-   " . $row['gedits'] . "
-   " . $row['gimages'] . "
-   " . $users . "
-   " .$row['gadmins'] . "
-   " . $stubratio . "
-   csv
-   ssv
-   xml";
+echo "
+${count}
+$name
+" . $row['numwikis'] . "
+

[MediaWiki-commits] [Gerrit] index.php, replace tabs with spaces - change (operations...wikistats)

2016-02-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: index.php, replace tabs with spaces
..

index.php, replace tabs with spaces

Change-Id: Ifa20aa6a6b9afa8ceaae37e8cf572157c1063722
---
M var/www/wikistats/index.php
1 file changed, 88 insertions(+), 88 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/38/273138/1

diff --git a/var/www/wikistats/index.php b/var/www/wikistats/index.php
index 71548eb..04d472e 100644
--- a/var/www/wikistats/index.php
+++ b/var/www/wikistats/index.php
@@ -32,37 +32,37 @@
 ?>
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
 http://www.w3.org/1999/xhtml; lang="en" xml:lang="en">
-   
-   
-   WikiStats - Mediawiki statistics
-   
-   https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css; 
rel="stylesheet" type="text/css" />
-   
-   
-   
-   
-   
-   
-   $(document).ready(function() {
-   $('#table').DataTable();
-   } );
-   
-   
-   
-   
-   
-   
-   Wikistats
-   
-   
-   
-   
-   
-   
-   Wikistats 2.0
-   
-   [beta]
-   
+
+
+WikiStats - Mediawiki statistics
+
+https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css; 
rel="stylesheet" type="text/css" />
+
+
+
+
+
+
+$(document).ready(function() {
+$('#table').DataTable();
+} );
+
+
+
+
+
+
+Wikistats
+
+
+
+
+
+
+Wikistats 2.0
+
+[beta]
+
 
-   
-   
-   
-   List of 
MediaWikis
-   
-   
-   
-   Project
-of wikis
-   Good articles
-   Total pages
-   Edits
-   Images
-   Users
-   Admins
-   Stub ratio
-   Formats
-   Last update
-   
-   
-   
-   
-   Project
-of wikis
-   Good articles
-   Total pages
-   Edits
-   Images
-   Users
-   Admins
-   Stub ratio
-   Formats
-   Last update
-   
+
+
+
+List of MediaWikis
+
+
+
+Project
+ of wikis
+Good articles
+Total pages
+Edits
+Images
+Users
+Admins
+Stub ratio
+Formats
+Last update
+
+
+
+
+Project
+ of wikis
+Good articles
+Total pages
+Edits
+Images
+Users
+Admins
+Stub ratio
+Formats
+Last update
+
 ";
 
 
@@ -148,7 +148,7 @@
 $result = mysql_query("$query") or die(mysql_error());
 
 while ($row = mysql_fetch_array($result)) {
-   $count++;
+$count++;
 $users = $row['gusers'];
 $gwikis = gwikis + $row['numwikis'];
 $gtotal = $gtotal + $row['gtotal'];
@@ -161,7 +161,7 @@
 if ($row['gtotal'] == 0) {
 $stubratio = 0;
 } else {
-   $stubratio = $row['ggood'] / $row['gtotal'];
+$stubratio = $row['ggood'] / $row['gtotal'];
 }
 
 $grandstubratio = 0;
@@ -186,29 +186,29 @@
 
 }
 
-   echo "
-   ${count}
-   $name
-   " . $row['numwikis'] . "
-   " . $row['ggood'] . "
-   " . $row['gtotal'] . "
-   " . $row['gedits'] . "
-   " . $row['gimages'] . "
-   " . $users . "
-   " .$row['gadmins'] . "
-   " . $stubratio . "
-   csv
-   ssv
-   xml";
+echo "
+${count}
+

[MediaWiki-commits] [Gerrit] SessionBackend: skip isUserSessionPrevented check for anons - change (mediawiki/core)

2016-02-24 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: SessionBackend: skip isUserSessionPrevented check for anons
..

SessionBackend: skip isUserSessionPrevented check for anons

For anon requests, the call to SessionManager::isUserSessionPrevented(
$this->user->getName() ) is both expensive (because of the need to
sanitize the IP) and pointless, because the session-prevention feature
is intended for named accounts. So short-circuit the check if the user is not
logged in.

Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
---
M includes/session/SessionBackend.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/273137/1

diff --git a/includes/session/SessionBackend.php 
b/includes/session/SessionBackend.php
index 0a9191b..0424a2d 100644
--- a/includes/session/SessionBackend.php
+++ b/includes/session/SessionBackend.php
@@ -572,7 +572,9 @@
 * @param bool $closing Whether the session is being closed
 */
public function save( $closing = false ) {
-   if ( $this->provider->getManager()->isUserSessionPrevented( 
$this->user->getName() ) ) {
+   $anon = $this->user->isAnon();
+
+   if ( !$anon && 
$this->provider->getManager()->isUserSessionPrevented( $this->user->getName() ) 
) {
$this->logger->debug(
'SessionBackend "{session}" not saving, user 
{user} was ' .
'passed to 
SessionManager::preventSessionsForUser',
@@ -585,7 +587,6 @@
 
// Ensure the user has a token
// @codeCoverageIgnoreStart
-   $anon = $this->user->isAnon();
if ( !$anon && !$this->user->getToken( false ) ) {
$this->logger->debug(
'SessionBackend "{session}" creating token for 
user {user} on save',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] IDatabase::commit: Docs re 'flush' exception on explicit tra... - change (mediawiki/core)

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

Change subject: IDatabase::commit: Docs re 'flush' exception on explicit 
transaction
..


IDatabase::commit: Docs re 'flush' exception on explicit transaction

Change-Id: I44087e92d2186f4e931b3f0766caba1f90f4ebc4
---
M includes/db/IDatabase.php
1 file changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/includes/db/IDatabase.php b/includes/db/IDatabase.php
index e1d1173..7855861 100644
--- a/includes/db/IDatabase.php
+++ b/includes/db/IDatabase.php
@@ -1334,9 +1334,13 @@
 * @param string $fname
 * @param string $flush Flush flag, set to 'flush' to disable warnings 
about
 *   explicitly committing implicit transactions, or calling commit 
when no
-*   transaction is in progress. This will silently break any ongoing
-*   explicit transaction. Only set the flush flag if you are sure that 
it
-*   is safe to ignore these warnings in your context.
+*   transaction is in progress.
+*
+*   This will trigger an exception if there is an ongoing explicit 
transaction.
+*
+*   Only set the flush flag if you are sure that these warnings are 
not applicable,
+*   and no explicit transactions are open.
+*
 * @throws DBUnexpectedError
 */
public function commit( $fname = __METHOD__, $flush = '' );

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

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

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


[MediaWiki-commits] [Gerrit] Add npm-node-4.3 test to experimental: in a few templates - change (integration/config)

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

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

Change subject: Add npm-node-4.3 test to experimental: in a few templates
..

Add npm-node-4.3 test to experimental: in a few templates

It will allow us to test this new version on mediawiki repos without
having any problems if it fails.

Change-Id: I98e0c09e77252062b0e3ab77bb624fbd69358c55
---
M zuul/layout.yaml
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/36/273136/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 85c2efa..dc1240b 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1066,6 +1066,7 @@
   - mwext-testextension-php53-composer
   - mwext-testextension-hhvm-composer
   - npm
+  - npm-node-4.3
   - composer-php53
   - composer-php55
   - composer-hhvm
@@ -1093,6 +1094,7 @@
 experimental:
  - mwext-qunit-composer
  - npm
+ - npm-node-4.3
  - composer-php53
  - composer-php55
  - composer-hhvm
@@ -1125,6 +1127,7 @@
   - mwext-testextension-php53-composer
   - mwext-testextension-hhvm-composer
   - npm
+  - npm-node-4.3
   - composer-php53
   - composer-php55
   - composer-hhvm
@@ -1153,6 +1156,7 @@
   - mwext-testextension-php53-composer
   - mwext-testextension-hhvm-composer
   - npm
+  - npm-node-4.3
   - composer-php53
   - composer-php55
   - composer-hhvm
@@ -1251,6 +1255,7 @@
  - mwext-testextension-hhvm
  - mwext-testextension-hhvm-composer
  - npm
+ - npm-node-4.3
  - composer-php53
  - composer-php55
  - composer-hhvm
@@ -1279,6 +1284,7 @@
  - mwext-testextension-hhvm
  - mwext-testextension-hhvm-composer
  - npm
+ - npm-node-4.3
  - composer-php53
  - composer-php55
  - composer-hhvm
@@ -1509,6 +1515,7 @@
   - mediawiki-phpunit-hhvm-composer
   # will replace mediawiki-phpunit-php53 for branches not using vendor, 
currently not used as the composer part is covered by the hhvm variant
   - mediawiki-phpunit-php53-composer
+  - npm-node-4.3
 
   - name: mediawiki/debian
 experimental:

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

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

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


[MediaWiki-commits] [Gerrit] Migrate OOJS repos to npm-node-4.3 - change (integration/config)

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

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

Change subject: Migrate OOJS repos to npm-node-4.3
..

Migrate OOJS repos to npm-node-4.3

Bug: T119143
Change-Id: I0f4f0fbdcec898b7cd9a5545b0cb28ffc44e2269
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/35/273135/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 85c2efa..a0929a4 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7667,7 +7667,7 @@
 
   - name: oojs/core
 template:
-  - name: npm
+  - name: npm-node-4.3
 check:
   - jshint
   - jsonlint
@@ -7682,7 +7682,7 @@
   - name: oojs/ui
 template:
   - name: composer-test-package55
-  - name: npm
+  - name: npm-node-4.3
   - name: rake
 check:
   - jshint

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

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

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


[MediaWiki-commits] [Gerrit] fix quoting error with dbpass - change (operations...wikistats)

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

Change subject: fix quoting error with dbpass
..


fix quoting error with dbpass

Change-Id: Id3b45e18fe32bfd88a9e2cc0306f6629ab585e5f
---
M usr/local/bin/wikistats/deploy-wikistats
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/usr/local/bin/wikistats/deploy-wikistats 
b/usr/local/bin/wikistats/deploy-wikistats
index 816f169..a5645ae 100755
--- a/usr/local/bin/wikistats/deploy-wikistats
+++ b/usr/local/bin/wikistats/deploy-wikistats
@@ -19,7 +19,9 @@
 rsync -avp ${pp}/${pn}/${dp}/${pn}/ /${dp}/${pn}/
   done
   # insert db password not included in public repo
-  sed -i 's//${dbpass}/g' /etc/${pn}/config.php
+  echo -e "\ninsert db password not included in public repo\n"
+  echo -e "sed -i \"s//${dbpass}/g\" /etc/${pn}/config.php\n"
+  sed -i "s//${dbpass}/g" /etc/${pn}/config.php
 }
 
 function backup {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3b45e18fe32bfd88a9e2cc0306f6629ab585e5f
Gerrit-PatchSet: 2
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] fix quoting error with dbpass - change (operations...wikistats)

2016-02-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: fix quoting error with dbpass
..

fix quoting error with dbpass

Change-Id: Id3b45e18fe32bfd88a9e2cc0306f6629ab585e5f
---
M usr/local/bin/wikistats/deploy-wikistats
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/34/273134/1

diff --git a/usr/local/bin/wikistats/deploy-wikistats 
b/usr/local/bin/wikistats/deploy-wikistats
index 816f169..a5645ae 100755
--- a/usr/local/bin/wikistats/deploy-wikistats
+++ b/usr/local/bin/wikistats/deploy-wikistats
@@ -19,7 +19,9 @@
 rsync -avp ${pp}/${pn}/${dp}/${pn}/ /${dp}/${pn}/
   done
   # insert db password not included in public repo
-  sed -i 's//${dbpass}/g' /etc/${pn}/config.php
+  echo -e "\ninsert db password not included in public repo\n"
+  echo -e "sed -i \"s//${dbpass}/g\" /etc/${pn}/config.php\n"
+  sed -i "s//${dbpass}/g" /etc/${pn}/config.php
 }
 
 function backup {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3b45e18fe32bfd88a9e2cc0306f6629ab585e5f
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] IDatabase::commit: Docs re 'flush' exception on explicit tra... - change (mediawiki/core)

2016-02-24 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: IDatabase::commit: Docs re 'flush' exception on explicit 
transaction
..

IDatabase::commit: Docs re 'flush' exception on explicit transaction

Change-Id: I44087e92d2186f4e931b3f0766caba1f90f4ebc4
---
M includes/db/IDatabase.php
1 file changed, 7 insertions(+), 3 deletions(-)


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

diff --git a/includes/db/IDatabase.php b/includes/db/IDatabase.php
index e1d1173..7855861 100644
--- a/includes/db/IDatabase.php
+++ b/includes/db/IDatabase.php
@@ -1334,9 +1334,13 @@
 * @param string $fname
 * @param string $flush Flush flag, set to 'flush' to disable warnings 
about
 *   explicitly committing implicit transactions, or calling commit 
when no
-*   transaction is in progress. This will silently break any ongoing
-*   explicit transaction. Only set the flush flag if you are sure that 
it
-*   is safe to ignore these warnings in your context.
+*   transaction is in progress.
+*
+*   This will trigger an exception if there is an ongoing explicit 
transaction.
+*
+*   Only set the flush flag if you are sure that these warnings are 
not applicable,
+*   and no explicit transactions are open.
+*
 * @throws DBUnexpectedError
 */
public function commit( $fname = __METHOD__, $flush = '' );

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

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

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


[MediaWiki-commits] [Gerrit] Backfill echo_unread_wikis table after it is created - change (mediawiki/vagrant)

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

Change subject: Backfill echo_unread_wikis table after it is created
..


Backfill echo_unread_wikis table after it is created

Bug: T119523
Change-Id: I4cbe12d6a37812d52039867d1e06f11510c24e74
---
M puppet/modules/role/manifests/echo.pp
1 file changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/puppet/modules/role/manifests/echo.pp 
b/puppet/modules/role/manifests/echo.pp
index cb073f0..c303187 100644
--- a/puppet/modules/role/manifests/echo.pp
+++ b/puppet/modules/role/manifests/echo.pp
@@ -23,7 +23,13 @@
 mysql::sql { 'create echo_unread_wikis':
 sql => "USE ${shared_tracking_db}; SOURCE 
${echo_dir}/db_patches/echo_unread_wikis.sql;",
 unless  => "SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE 
TABLE_SCHEMA='${shared_tracking_db}' AND TABLE_NAME = 'echo_unread_wikis'",
-require => Mysql::Db[$shared_tracking_db]
+require => Mysql::Db[$shared_tracking_db],
+notify  => Mediawiki::Maintenance['backfill echo_unread_wikis'],
+}
+
+mediawiki::maintenance { 'backfill echo_unread_wikis':
+command => '/usr/local/bin/foreachwiki 
extensions/Echo/maintenance/backfillUnreadWikis.php',
+refreshonly => true,
 }
 
 mediawiki::extension { 'Echo':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4cbe12d6a37812d52039867d1e06f11510c24e74
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Etonkovidova 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert "Revert "Major overhaul of Main Page"" - change (operations...wikistats)

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

Change subject: Revert "Revert "Major overhaul of Main Page""
..


Revert "Revert "Major overhaul of Main Page""

This reverts commit bd094feca74b350f82f0ad79f230d8d16264a9be.

Change-Id: I05af9cbad35d290da048db2bd86c72e18fc1f217
---
M usr/share/php/wikistats/coalesced_query.php
A var/www/wikistats/css/bootstrap-3.3.5.css
A var/www/wikistats/css/dataTables-1.10.9.css
A var/www/wikistats/css/main.css
M var/www/wikistats/index.php
A var/www/wikistats/js/dataTables.bootstrap.min-1.10.9.js
A var/www/wikistats/js/jquery-1.11.3.min.js
A var/www/wikistats/js/jquery.dataTables.min-1.10.9.js
8 files changed, 7,728 insertions(+), 219 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I05af9cbad35d290da048db2bd86c72e18fc1f217
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert "Revert "Major overhaul of Main Page"" - change (operations...wikistats)

2016-02-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: Revert "Revert "Major overhaul of Main Page""
..

Revert "Revert "Major overhaul of Main Page""

This reverts commit bd094feca74b350f82f0ad79f230d8d16264a9be.

Change-Id: I05af9cbad35d290da048db2bd86c72e18fc1f217
---
M usr/share/php/wikistats/coalesced_query.php
A var/www/wikistats/css/bootstrap-3.3.5.css
A var/www/wikistats/css/dataTables-1.10.9.css
A var/www/wikistats/css/main.css
M var/www/wikistats/index.php
A var/www/wikistats/js/dataTables.bootstrap.min-1.10.9.js
A var/www/wikistats/js/jquery-1.11.3.min.js
A var/www/wikistats/js/jquery.dataTables.min-1.10.9.js
8 files changed, 7,728 insertions(+), 219 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/wikistats 
refs/changes/32/273132/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05af9cbad35d290da048db2bd86c72e18fc1f217
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/wikistats
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


  1   2   3   4   >