[MediaWiki-commits] [Gerrit] labstore: Remove redundant calls to lower() for user names - change (operations/puppet)

2016-06-21 Thread Tim Landscheidt (Code Review)
Hello Andrew Bogott, Yuvipanda, Chasemp,

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

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

to review the following change.

Change subject: labstore: Remove redundant calls to lower() for user names
..

labstore: Remove redundant calls to lower() for user names

create-dbusers lowered the case for user names, probably as an
artefact of previously (incorrectly) looking up the wiki user name
which always starts with a capital letter.  Shell user names however
are guaranteed to be lower case, and if they were not, mangling them
would be wrong.  Thus this change removes the calls to lower().

Additionally, this change rewrites the logic for stripping the project
prefix from service group names to not treat the project name as a
regular expression.

Change-Id: Ib0ef575324ad2cf8199295d0a67bea6ab78fb078
---
M modules/labstore/files/create-dbusers
1 file changed, 2 insertions(+), 4 deletions(-)


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

diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
index 8c0695d..0e95812 100755
--- a/modules/labstore/files/create-dbusers
+++ b/modules/labstore/files/create-dbusers
@@ -18,7 +18,6 @@
 import ldap3
 import pymysql
 import yaml
-import re
 import os
 import string
 import random
@@ -48,11 +47,10 @@
 def homedir(self):
 prefix = '/srv/project/%s' % self.project
 if self.kind == 'user':
-return os.path.join(prefix, 'home', self.name.lower())
+return os.path.join(prefix, 'home', self.name)
 else:
 return os.path.join(
-prefix, 'project',
-re.sub(r'^%s\.' % self.project, '', self.name.lower())
+prefix, 'project', self.name[len(self.project) + 1:]
 )
 
 def __repr__(self):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0ef575324ad2cf8199295d0a67bea6ab78fb078
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Deploy Compact Language Links as default (Stage 2) - change (operations/mediawiki-config)

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

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

Change subject: Deploy Compact Language Links as default (Stage 2)
..

Deploy Compact Language Links as default (Stage 2)

Beta feature is replaced by a user preference that is enabled by
default in the following sites:

* Wikipedia, bottom 50 (in terms of number of articles)
* Wikibooks
* Wikinews

New accounts and anonymous users will have Compact Language Links  enabled by
default.

Bug: T136677
Change-Id: Id11a9d9346b111d0150368e11b63c363f29e9ac9
---
A dblists/clldefault.dblist
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
3 files changed, 56 insertions(+), 3 deletions(-)


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

diff --git a/dblists/clldefault.dblist b/dblists/clldefault.dblist
new file mode 100644
index 000..d4a7f49
--- /dev/null
+++ b/dblists/clldefault.dblist
@@ -0,0 +1,50 @@
+lbewiki
+igwiki
+jbowiki
+roa_rupwiki
+tywiki
+jamwiki
+zawiki
+kgwiki
+mdfwiki
+wowiki
+srnwiki
+lgwiki
+abwiki
+ltgwiki
+zuwiki
+smwiki
+chrwiki
+omwiki
+tnwiki
+chywiki
+rmywiki
+cuwiki
+twwiki
+tumwiki
+xhwiki
+rnwiki
+pihwiki
+biwiki
+gotwiki
+sswiki
+pntwiki
+bmwiki
+chwiki
+mowiki
+tswiki
+adywiki
+iuwiki
+stwiki
+eewiki
+nywiki
+fjwiki
+kswiki
+akwiki
+ikwiki
+sgwiki
+vewiki
+dzwiki
+ffwiki
+tiwiki
+crwiki
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 77f6b6c..20f175c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -166,7 +166,7 @@
foreach ( [ 'private', 'fishbowl', 'special', 'closed', 'flow', 
'flaggedrevs', 'small', 'medium',
'large', 'wikimania', 'wikidata', 'wikidataclient', 
'visualeditor-default',
'commonsuploads', 'nonbetafeatures', 'group0', 
'group1', 'group2', 'wikipedia', 'nonglobal',
-   'wikitech', 'nonecho'
+   'wikitech', 'nonecho', 'clldefault'
] as $tag ) {
$dblist = MWWikiversions::readDbListFile( $tag );
if ( in_array( $wgDBname, $dblist ) ) {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1365e64..991b4e9 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12637,16 +12637,19 @@
'nonbetafeatures' => false,
'wikiversity' => false,
'wikivoyage' => false,
+   'wikinews' => false,
+   'wikibooks' => false,
+   'clldefault' => false,
 ],
 
 // Whether Compact Links is enabled for new accounts *by default*
 'wmgULSCompactLinksForNewAccounts' => [
-   'default' => false,
+   'default' => true,
 ],
 
 // Whether Compact Links is enabled for anonymous users *by default*
 'wmgULSCompactLinksEnableAnon' => [
-   'default' => false,
+   'default' => true,
 ],
 
 //  BetaFeatures end ---

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id11a9d9346b111d0150368e11b63c363f29e9ac9
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Update #lsth - change (mediawiki...LabeledSectionTransclusion)

2016-06-21 Thread Skizzerz (Code Review)
Skizzerz has uploaded a new change for review.

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

Change subject: Update #lsth
..

Update #lsth

The lsth function now uses the same machinery as lst/lstx. This allows
it to properly honor noinclude/includeonly/onlyinclude sections as well
as a handful of other improvements (notably, it handles both == wiki
sections == as well as html sections, and can mix between the
two when using the {{#lsth:Page|start|end}} syntax).

Beyond that, the heading comparison for lsth is now case-sensitive (the
documentation indicated that before it was case-insensitive). A fully
case-insensitive comparison does not make sense, and doing a proper
caseless compare would be exceedingly difficult, especially once other
languages are taken into consideration. Even in just English, consider
the following section:
== My Section ==

While the "My Section" text as well as "span" and "class" could be
matched case-insenstively, the class name "mySection" should remain
case-sensitive, as a class "mySection" and a class "mysection" are two
entirely different classes according to the HTML spec.

If case insensitivity is truly desired, perhaps a new function #lsthi
could be introduced. However, I feel that the case insensitivity
property of the previous #lsth was not used very much, so I did not want
to code up something that would generally never see use.

Change-Id: I10e0d78a51b6621959ee51d24a6ba5ee4e5d2eec
---
M LabeledSectionTransclusion.class.php
1 file changed, 137 insertions(+), 57 deletions(-)


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

diff --git a/LabeledSectionTransclusion.class.php 
b/LabeledSectionTransclusion.class.php
index f4ae2c6..db9dcf8 100644
--- a/LabeledSectionTransclusion.class.php
+++ b/LabeledSectionTransclusion.class.php
@@ -12,7 +12,7 @@
$parser->setHook( 'section', array( __CLASS__, 'noop' ) );
$parser->setFunctionHook( 'lst', array( __CLASS__, 
'pfuncIncludeObj' ), Parser::SFH_OBJECT_ARGS );
$parser->setFunctionHook( 'lstx', array( __CLASS__, 
'pfuncExcludeObj' ), Parser::SFH_OBJECT_ARGS );
-   $parser->setFunctionHook( 'lsth', array( __CLASS__, 
'pfuncIncludeHeading' ) );
+   $parser->setFunctionHook( 'lsth', array( __CLASS__, 
'pfuncIncludeHeading' ), Parser::SFH_OBJECT_ARGS );
 
return true;
}
@@ -291,10 +291,14 @@
 
$newFrame = $frame->newChild( false, $finalTitle );
if ( !count( $args ) ) {
-   return $newFrame->expand( $root );
+   if ( $func == 'lsth' ) {
+   $begin = false;
+   } else {
+   return $newFrame->expand( $root );
+   }
+   } else {
+   $begin = trim( $frame->expand( array_shift( $args ) ) );
}
-
-   $begin = trim( $frame->expand( array_shift( $args ) ) );
 
if ( $func == 'lstx' ) {
if ( !count( $args ) ) {
@@ -305,17 +309,26 @@
}
 
if ( !count( $args ) ) {
-   $end = $begin;
+   if ( $func == 'lsth' ) {
+   $end = false;
+   } else {
+   $end = $begin;
+   }
} else {
$end = trim( $frame->expand( array_shift( $args ) ) );
}
 
-   $beginAttr = self::getAttrPattern_( $begin, 'begin' );
-   $beginRegex = "/^$beginAttr$/s";
-   $endAttr = self::getAttrPattern_( $end, 'end' );
-   $endRegex = "/^$endAttr$/s";
+   if ( $func == 'lsth' ) {
+   $beginRegex = false;
+   $endRegex = false;
+   } else {
+   $beginAttr = self::getAttrPattern_( $begin, 'begin' );
+   $beginRegex = "/^$beginAttr$/s";
+   $endAttr = self::getAttrPattern_( $end, 'end' );
+   $endRegex = "/^$endAttr$/s";
+   }
 
-   return compact( 'dom', 'root', 'newFrame', 'repl', 
'beginRegex', 'begin', 'endRegex' );
+   return compact( 'dom', 'root', 'newFrame', 'repl', 
'beginRegex', 'begin', 'endRegex', 'end' );
}
 
/**
@@ -501,66 +514,133 @@
 * A parser extension that further extends labeled section transclusion,
 * adding a function, #lsth for transcluding marked sections of text,
 *
-* @todo: MW 1.12 version, as per #lst/#lstx
-*
 * @param $parser Parser
 * @param $page string
 * @param $sec string
 * @param $to string
 * @return mixed|string
 */
-  

[MediaWiki-commits] [Gerrit] Hygiene: move getRevision and buildSummaryResponse to library - change (mediawiki...mobileapps)

2016-06-21 Thread BearND (Code Review)
BearND has uploaded a new change for review.

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

Change subject: Hygiene: move getRevision and buildSummaryResponse to library
..

Hygiene: move getRevision and buildSummaryResponse to library

Going to use the two functions for random page functionality, too.
Don't need to pass in pageTitle to buildSummaryResponse since the
extract also includes it, making this function more generally applicable.

Change-Id: Ia652d88c050f1f6a6b07d7acae49117b46ef2f9b
---
M lib/feed/featured.js
M lib/mwapi.js
2 files changed, 17 insertions(+), 15 deletions(-)


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

diff --git a/lib/feed/featured.js b/lib/feed/featured.js
index 9831d90..71c61ad 100644
--- a/lib/feed/featured.js
+++ b/lib/feed/featured.js
@@ -70,19 +70,6 @@
 return extract;
 }
 
-function getRevision(extractObj) {
-return extractObj.revisions[0].revid;
-}
-
-function buildResponse(pageTitle, extractPageObj) {
-return {
-title: pageTitle,
-thumbnail: extractPageObj.thumbnail,
-description: extractPageObj.terms && 
extractPageObj.terms.description[0],
-extract: extractPageObj.extract
-};
-}
-
 function promise(app, req) {
 if (req.params.domain.indexOf('en') !== 0) {
 throw new HTTPError({
@@ -106,9 +93,9 @@
 mwapi.checkForQueryPagesInResponse(req, extractResponse);
 var extractPageObj = getPageObject(extractResponse, true);
 return {
-payload: buildResponse(pageTitle, extractPageObj),
+payload: mwapi.buildSummaryResponse(extractPageObj),
 meta: {
-etag: tfaPageObj.pageid + '/' + getRevision(extractPageObj),
+etag: tfaPageObj.pageid + '/' + 
mwapi.getRevisionFromExtract(extractPageObj)
 }
 };
 });
diff --git a/lib/mwapi.js b/lib/mwapi.js
index d1588f7..ba552d2 100644
--- a/lib/mwapi.js
+++ b/lib/mwapi.js
@@ -159,6 +159,19 @@
   return api.mwApiGet(app, req.params.domain, query);
 }
 
+function getRevisionFromExtract(extractObj) {
+return extractObj.revisions[0].revid;
+}
+
+function buildSummaryResponse(extractObj) {
+return {
+title: extractObj.title,
+thumbnail: extractObj.thumbnail,
+description: extractObj.terms && extractObj.terms.description[0],
+extract: extractObj.extract
+};
+}
+
 function requestMostReadMetadata(app, req, titlesList) {
 var query = {
 action: 'query',
@@ -227,6 +240,8 @@
 checkForQueryPagesInResponse: checkForQueryPagesInResponse,
 requestExtract: requestExtract,
 requestExtractAndDescription: requestExtractAndDescription,
+getRevisionFromExtract: getRevisionFromExtract,
+buildSummaryResponse: buildSummaryResponse,
 requestMostReadMetadata: requestMostReadMetadata,
 API_QUERY_MAX_TITLES: API_QUERY_MAX_TITLES,
 

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

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

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


[MediaWiki-commits] [Gerrit] Fix ULSCompactLinksEnableAnon - change (mediawiki...UniversalLanguageSelector)

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

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

Change subject: Fix ULSCompactLinksEnableAnon
..

Fix ULSCompactLinksEnableAnon

Bug: T138321
Change-Id: I776c31f94c1314091a3d9b635a33962775dd9b52
---
M UniversalLanguageSelector.hooks.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 6326246..0effab0 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -63,6 +63,10 @@
return true;
}
 
+   if ( $user->isAnon() && $wgULSCompactLinksEnableAnon == false ) 
{
+   return false;
+   }
+
if ( $wgULSCompactLanguageLinksBetaFeature === true &&
$wgInterwikiMagic === true &&
$wgHideInterlanguageLinks === false &&

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I776c31f94c1314091a3d9b635a33962775dd9b52
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
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] Archive extension - change (mediawiki...Gather)

2016-06-21 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Archive extension
..


Archive extension

Per ,
the extension is now unmaintained, and should be archived to avoid
increasing maintainence burden.

Bug: T136176
Change-Id: Id6224db35259778ceb44be00f5e8702ca5d76571
---
D .jsbeautifyrc
D .jscsrc
D .jscsrctest.js
D .jshintignore
D .jshintrc
D .rubocop.yml
D .svgo.yml
D Gather.alias.php
M Gather.php
D Gemfile.lock
D Gruntfile.js
M README.txt
M composer.json
M extension.json
D i18n/ady-cyrl.json
D i18n/ar.json
D i18n/arq.json
D i18n/ba.json
D i18n/bcl.json
D i18n/bgn.json
D i18n/bho.json
D i18n/bn.json
D i18n/bs.json
D i18n/ca.json
D i18n/ce.json
D i18n/ckb.json
D i18n/cs.json
D i18n/da.json
D i18n/de.json
D i18n/diq.json
D i18n/ee.json
D i18n/el.json
D i18n/en-gb.json
D i18n/en.json
D i18n/eo.json
D i18n/es.json
D i18n/eu.json
D i18n/fa.json
D i18n/fi.json
D i18n/fo.json
D i18n/fr.json
D i18n/frp.json
D i18n/fy.json
D i18n/gd.json
D i18n/gl.json
D i18n/gom-deva.json
D i18n/gom-latn.json
D i18n/he.json
D i18n/hi.json
D i18n/ht.json
D i18n/hu.json
D i18n/hy.json
D i18n/inh.json
D i18n/it.json
D i18n/ja.json
D i18n/jv.json
D i18n/ka.json
D i18n/khw.json
D i18n/kk-cyrl.json
D i18n/km.json
D i18n/kn.json
D i18n/ko.json
D i18n/krl.json
D i18n/ksh.json
D i18n/ku-latn.json
D i18n/la.json
D i18n/lb.json
D i18n/lki.json
D i18n/lo.json
D i18n/lrc.json
D i18n/lt.json
D i18n/lv.json
D i18n/mai.json
D i18n/mg.json
D i18n/mk.json
D i18n/mr.json
D i18n/ms.json
D i18n/nb.json
D i18n/nds-nl.json
D i18n/ne.json
D i18n/nl.json
D i18n/oc.json
D i18n/om.json
D i18n/pam.json
D i18n/pl.json
D i18n/ps.json
D i18n/pt-br.json
D i18n/pt.json
D i18n/qqq.json
D i18n/roa-tara.json
D i18n/ru.json
D i18n/sa.json
D i18n/sco.json
D i18n/sd.json
D i18n/sh.json
D i18n/si.json
D i18n/so.json
D i18n/sr-ec.json
D i18n/su.json
D i18n/sv.json
D i18n/sw.json
D i18n/ta.json
D i18n/te.json
D i18n/tg-cyrl.json
D i18n/tl.json
D i18n/tr.json
D i18n/uk.json
D i18n/ur.json
D i18n/vi.json
D i18n/vo.json
D i18n/xmf.json
D i18n/yi.json
D i18n/zh-hans.json
D i18n/zh-hant.json
D images/beta-feature-ltr.svg
D images/beta-feature-rtl.svg
D includes/EchoGatherModerationHidePresentationModel.php
D includes/EchoGatherModerationPresentationModel.php
D includes/Gather.hooks.php
D includes/api/ApiEditList.php
D includes/api/ApiMixinListAccess.php
D includes/api/ApiQueryListMembership.php
D includes/api/ApiQueryListPages.php
D includes/api/ApiQueryLists.php
D includes/models/ArraySerializable.php
D includes/models/Collection.php
D includes/models/CollectionBase.php
D includes/models/CollectionFeed.php
D includes/models/CollectionFeedItem.php
D includes/models/CollectionInfo.php
D includes/models/CollectionItem.php
D includes/models/CollectionsList.php
D includes/models/Image.php
D includes/models/WithImage.php
D includes/specials/SpecialGather.php
D includes/specials/SpecialGatherEditFeed.php
D includes/specials/SpecialGatherLists.php
D includes/views/Collection.php
D includes/views/CollectionFeed.php
D includes/views/CollectionFeedItem.php
D includes/views/CollectionItemCard.php
D includes/views/CollectionsList.php
D includes/views/CollectionsListItemCard.php
D includes/views/Image.php
D includes/views/NoPublic.php
D includes/views/NotFound.php
D includes/views/Pagination.php
D includes/views/ReportTable.php
D includes/views/ReportTableRow.php
D includes/views/Tabs.php
D includes/views/View.php
D includes/views/helpers/CSS.php
D includes/views/helpers/Template.php
D maintenance/updateCounts.php
M package.json
D phpcs.xml
D resources/ext.gather.api/CollectionsGateway.js
D resources/ext.gather.api/RelatedPagesGateway.js
D resources/ext.gather.buttonspinner/ButtonWithSpinner.js
D resources/ext.gather.buttonspinner/button.less
D resources/ext.gather.collection.base/CollectionsContentOverlayBase.js
D resources/ext.gather.collection.confirm/ConfirmationOverlay.js
D resources/ext.gather.collection.confirm/confirmationOverlay.hogan
D resources/ext.gather.collection.confirm/confirmationOverlay.less
D resources/ext.gather.collection.confirm/vector.less
D resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
D resources/ext.gather.collection.contentOverlay/content.hogan
D resources/ext.gather.collection.contentOverlay/contentOverlay.less
D resources/ext.gather.collection.contentOverlay/header.hogan
D resources/ext.gather.collection.contentOverlay/images/noimage.png
D resources/ext.gather.collection.contentOverlay/images/noimage.svg
D resources/ext.gather.collection.contentOverlay/images/watchstar.svg
D resources/ext.gather.collection.contentOverlay/vector.less
D resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
D resources/ext.gather.collection.editor/CollectionEditOverlay.js
D resources/ext.gather.collection.editor/SearchTutorialOverlay.hogan
D 

[MediaWiki-commits] [Gerrit] (WIP) Notify TileratorUI on new expiry files - change (operations/puppet)

2016-06-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: (WIP) Notify TileratorUI on new expiry files
..

(WIP) Notify TileratorUI on new expiry files

When expiry file has been generated, let Tiletator know
about it. Tilerator will process all files matching the pattern
since the last run (as stored in the state file)

Bug: T108459
Change-Id: If453b48296f01f631ffc4223d56611ed6a16067a
---
M modules/osm/templates/replicate-osm.erb
1 file changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/295450/1

diff --git a/modules/osm/templates/replicate-osm.erb 
b/modules/osm/templates/replicate-osm.erb
index 875973b..3272724 100644
--- a/modules/osm/templates/replicate-osm.erb
+++ b/modules/osm/templates/replicate-osm.erb
@@ -25,4 +25,14 @@
   --expire-output $EXPIRY_FILE \
   --username osmupdater \
   --database gis \
-  --append $EXTRA_PARAMS -
+  --append $EXTRA_PARAMS - && \
+/usr/bin/curl \
+  -d expdirpath=<%= @expire_dir %> \ # expiration files dir
+  -d expmask=expire\\.list\\.* \ # regex to match 
expiration files
+  -d statefile=<%= @expire_dir %>/expire.state \ # tilerator uses this 
file to record last imported data file
+  -d fromZoom=10   \ # new jobs will be 
created from this zoom
+  -d beforeZoom=16 \ # and until (but not 
including) this zoom
+  -d generatorId=gen   \ # copy tiles from ("gen" 
will only produce non-empty tiles)
+  -d storageId=v3  \ # copy tiles to
+  -d deleteEmpty=1 \ # if tile is empty, make 
sure we don't store it, if it was there before
+  http://localhost:6535/add

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

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

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


[MediaWiki-commits] [Gerrit] Update kartotherian to 4bc44bd - change (maps...deploy)

2016-06-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Update kartotherian to 4bc44bd
..

Update kartotherian to 4bc44bd

List of changes:
4bc44bd Added canvas dependencies
xxx Update node module dependencies

Change-Id: I000ea8dadd24914b826e201dc23c610a0164b4af
---
M node_modules/accepts/node_modules/negotiator/package.json
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/include_dirs.js
A node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks_pre_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters_43_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters_pre_43_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_12_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_pre_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_maybe_43_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_maybe_pre_43_inl.h
C node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_new.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_object_wrap.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_persistent_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_persistent_pre_12_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_string_bytes.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_typedarray_contents.h
A node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_weak.h
C node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/package.json
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/tools/1to2.js
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/tools/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json
M node_modules/kartotherian-autogen/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
M node_modules/kartotherian-geoshapes/package.json
M node_modules/kartotherian-layermixer/package.json
M node_modules/kartotherian-maki/package.json
M node_modules/kartotherian-overzoom/package.json
M node_modules/kartotherian-server/package.json
M node_modules/kartotherian-snapshot/node_modules/abaculus/package.json
A node_modules/kartotherian-snapshot/node_modules/canvas/.npmignore
A node_modules/kartotherian-snapshot/node_modules/canvas/.travis.yml
A node_modules/kartotherian-snapshot/node_modules/canvas/binding.gyp
A node_modules/kartotherian-snapshot/node_modules/canvas/build/Makefile
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/canvas-postbuild.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/canvas.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas-postbuild.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Canvas.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasGradient.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasPattern.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasRenderingContext2d.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/FontFace.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Image.o.d
A 

[MediaWiki-commits] [Gerrit] Update kartotherian to 38d22a9 - change (maps...deploy)

2016-06-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Update kartotherian to 38d22a9
..

Update kartotherian to 38d22a9

List of changes:
xxx Update node module dependencies

Change-Id: I1c58111e3cbeedc77fa5ed66df93bbe618385751
---
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/include_dirs.js
A node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_callbacks_pre_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters_43_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_converters_pre_43_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_12_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_pre_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_maybe_43_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_maybe_pre_43_inl.h
C node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_new.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_object_wrap.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_persistent_12_inl.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_persistent_pre_12_inl.h
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_string_bytes.h
A 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_typedarray_contents.h
A node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_weak.h
C node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/package.json
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/tools/1to2.js
C 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/tools/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json
M node_modules/kartotherian-autogen/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
M node_modules/kartotherian-geoshapes/package.json
M node_modules/kartotherian-layermixer/package.json
M node_modules/kartotherian-maki/package.json
M node_modules/kartotherian-overzoom/package.json
M node_modules/kartotherian-server/package.json
M node_modules/kartotherian-snapshot/node_modules/abaculus/package.json
A node_modules/kartotherian-snapshot/node_modules/canvas/.npmignore
A node_modules/kartotherian-snapshot/node_modules/canvas/.travis.yml
A node_modules/kartotherian-snapshot/node_modules/canvas/binding.gyp
A node_modules/kartotherian-snapshot/node_modules/canvas/build/Makefile
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/canvas-postbuild.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/canvas.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas-postbuild.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas.node.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Canvas.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasGradient.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasPattern.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/CanvasRenderingContext2d.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/FontFace.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/Image.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/ImageData.o.d
A 
node_modules/kartotherian-snapshot/node_modules/canvas/build/Release/.deps/Release/obj.target/canvas/src/color.o.d
A 

[MediaWiki-commits] [Gerrit] Update tilerator to c787f4d - change (maps...deploy)

2016-06-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Update tilerator to c787f4d
..

Update tilerator to c787f4d

List of changes:
c787f4d Added keepJob param
xxx Update node module dependencies

Change-Id: I41c02dda4698b9478ddf0eedab0e8481f855d46e
---
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/package.json
M 
node_modules/jade/node_modules/clean-css/node_modules/source-map/node_modules/amdefine/package.json
M node_modules/kartotherian-autogen/package.json
M 
node_modules/kartotherian-cassandra/node_modules/multistream/node_modules/readable-stream/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
M node_modules/kartotherian-layermixer/package.json
M node_modules/kartotherian-overzoom/package.json
M 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/package.json
M node_modules/kartotherian-postgres/package.json
M node_modules/kartotherian-server/package.json
M node_modules/kartotherian-substantial/package.json
M node_modules/kue-ui/package.json
M 
node_modules/kue/node_modules/stylus/node_modules/debug/node_modules/ms/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/asn1/package.json
M 

[MediaWiki-commits] [Gerrit] Adds actions breakdown on first visit - change (wikimedia...prince)

2016-06-21 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Adds actions breakdown on first visit
..


Adds actions breakdown on first visit

Depends on: I0bef264d250f3e89f05a3533ddcd3ff2959b93c4
Bug: T134199
Change-Id: I776e8670817c835882d019fa1e12d93d6d0a32a0
---
M functions.R
M server.R
M tab_documentation/breakdown.md
M tab_documentation/clickthrough_rate.md
A tab_documentation/first_visit.md
M ui.R
6 files changed, 58 insertions(+), 12 deletions(-)

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



diff --git a/functions.R b/functions.R
index 41817b7..d165efe 100644
--- a/functions.R
+++ b/functions.R
@@ -10,13 +10,18 @@
   
   # Read in and format the high-level data
   data <- as.data.table(polloi::read_dataset(path = 
"portal/clickthrough_rate.tsv"))
-  clickthrough_rate <<- data[, j = list(success_rate = 
(events[type=="clickthrough"]/sum(events))*100), by = "date"]
+  clickthrough_rate <<- data[, j = list(success_rate = (events[type == 
"clickthrough"]/sum(events))*100), by = "date"]
   
   # Read in and format the breakdown data
   data <- as.data.table(polloi::read_dataset(path = 
"portal/clickthrough_breakdown.tsv"))
-  data <- data[,j=list(section_used = section_used, proportion = 
(events/sum(events))*100), by = "date"]
+  data <- data[, j = list(section_used = section_used, proportion = 
(events/sum(events))*100), by = "date"]
   action_breakdown <<- reshape2::dcast(data, formula = date ~ section_used, 
fun.aggregate = sum)
   
+  # Read in first visit clickthrough rates
+  data <- polloi::read_dataset(path = "portal/clickthrough_firstvisit.tsv")
+  data[, -1] <- data[, -1]*100 # first column is always going to be the date
+  first_visit_ctrs <<- data
+  
   return(invisible())
 }
 
diff --git a/server.R b/server.R
index dde7ff0..9a75079 100644
--- a/server.R
+++ b/server.R
@@ -20,7 +20,8 @@
   output$clickthrough_rate_dygraph <- renderDygraph({
 clickthrough_rate %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_clickthrough_rate)) %>%
-  polloi::make_dygraph(xlab = "Date", ylab = "Clickthrough rate (%)", 
title = "Wikipedia portal clickthrough rate") %>%
+  polloi::make_dygraph(xlab = "Date", ylab = "Clickthrough rate (%)",
+   title = "Wikipedia portal clickthrough rate") %>%
   dyCSS(css = "www/inverse.css") %>%
   dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
   dyAnnotation(as.Date("2015-12-07"), text = "A",
@@ -31,7 +32,8 @@
   output$action_breakdown_dygraph <- renderDygraph({
 action_breakdown %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_action_breakdown)) %>%
-  polloi::make_dygraph(xlab = "Date", ylab = "Actions (%)", title = 
"Actions on the Wikipedia portal") %>%
+  polloi::make_dygraph(xlab = "Date", ylab = "Actions (%)",
+   title = "Actions on the Wikipedia Portal") %>%
   dyCSS(css = "www/inverse.css") %>%
   dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
   dyLegend(labelsDiv = "action_breakdown_legend", show = "always", width = 
400) %>%
@@ -40,6 +42,15 @@
width = 12, height = 20, attachAtBottom = FALSE)
   })
   
+  output$first_visit_dygraph <- renderDygraph({
+first_visit_ctrs %>%
+  polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_first_visit)) %>%
+  polloi::make_dygraph(xlab = "Date", ylab = "Actions (%)",
+   title = "Actions on the first visit to Wikipedia 
Portal") %>%
+  dyCSS(css = "www/inverse.css") %>%
+  dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70)
+  })
+  
   output$dwelltime_dygraph <- renderDygraph({
 dwelltime_data %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_dwelltime)) %>%
diff --git a/tab_documentation/breakdown.md b/tab_documentation/breakdown.md
index a63294d..a5285c4 100644
--- a/tab_documentation/breakdown.md
+++ b/tab_documentation/breakdown.md
@@ -1,4 +1,4 @@
-Breakdown of user actions on the Wikipedia portal
+Breakdown of user actions on the Wikipedia Portal
 ===
 
 In [the clickthroughs 
tab](http://discovery.wmflabs.org/portal/#clickthrough_rate) we look at the 
actual rate of clickthroughs.
@@ -15,14 +15,10 @@
 
 The values are expressed as percentages - so if a feature has the value "61.3" 
it is being used 61.3% of the time.
 
-General trends
---
-
 Outages and inaccuracies
 --
 
-* From 7 December (marked "A") the sampling changed to exclude a broader range 
of browsers, resulting in alterations to things
-like clickthrough rate and dwell time. We expect this to resolve itself on 4 
January when a new schema version is 

[MediaWiki-commits] [Gerrit] Adds calculation of CTR in first visits only - change (wikimedia...golden)

2016-06-21 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Adds calculation of CTR in first visits only
..


Adds calculation of CTR in first visits only

Bug: T134199
Change-Id: I0bef264d250f3e89f05a3533ddcd3ff2959b93c4
---
M portal/portal.R
1 file changed, 26 insertions(+), 6 deletions(-)

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



diff --git a/portal/portal.R b/portal/portal.R
index 2e0f3b5..be7d8a6 100644
--- a/portal/portal.R
+++ b/portal/portal.R
@@ -30,31 +30,31 @@
   NULL
 }
   }, by = c("date","session")]
-  
+
   dwell_output <- data.frame(t(quantile(dwell_metric$V1, c(0.5, 0.95, 0.99
   dwell_output$date <- dwell_metric$date[1]
   names(dwell_output) <- c("Median", "95th percentile", "99th Percentile", 
"date")
   dwell_output <- dwell_output[,c(4,1:3)]
   
   # Generate clickthrough rate data
-  clickthrough_data <- data[,j=list(events=.N),by = c("date","type")]
+  clickthrough_data <- data[, j = list(events = .N), by = c("date","type")]
   
   # Generate click breakdown
   data <- data[order(data$type, decreasing = FALSE),]
-  breakdown_data <- data[,j=list(events=.N),by = c("date","section_used")]
+  breakdown_data <- data[,j = list(events = .N), by = c("date","section_used")]
   
   # Generate by-country breakdown
   countries <- c("US", "GB", "CA", "DE", "IN", "AU", "CN", "RU", "PH", "FR")
-  country_breakdown <- data[,j=list(events=.N), by = c("date", "country")]
+  country_breakdown <- data[,j = list(events = .N), by = c("date", "country")]
   others <- data.table::data.table(date = date,
country = "Other",
events = 
sum(country_breakdown$events[!country_breakdown$country %in% countries]))
   country_data <- rbind(country_breakdown[country_breakdown$country %in% 
countries,], others)
   country_data <- country_data[order(country_data$country, decreasing = TRUE),]
   country_data$country <- c("United States", "Russia", "Philippines", "Other", 
"India",
-"United Kingdom", "France", "Germany", "China", 
"Canada", 
+"United Kingdom", "France", "Germany", "China", 
"Canada",
 "Australia")
-  
+
   # Get user agent data
   wmf::set_proxies() # To allow for the latest YAML to be retrieved.
   uaparser::update_regexes()
@@ -64,11 +64,31 @@
   ua_data$percent <- round((ua_data$amount/sum(ua_data$amount))*100, 2)
   ua_data <- ua_data[ua_data$percent >= 0.5, c("date", "browser", 
"browser_major", "percent"), with = FALSE]
   data.table::setnames(ua_data, 3, "version")
+
+  # First visit clickthrough rates
+  possible_sections <- data.frame(section_used = c("no action", "primary 
links", "search",
+   "secondary links", "other 
languages", "other projects"),
+  stringsAsFactors = FALSE)
+  first_visits <- as.data.frame(data) %>%
+dplyr::group_by(session) %>%
+dplyr::arrange(ts) %>%
+dplyr::mutate(visit = cumsum(type == "landing")) %>%
+dplyr::filter(visit == 1) %>%
+dplyr::group_by(section_used) %>%
+dplyr::summarize(sessions = n()) %>%
+dplyr::mutate(proportion = round(sessions/sum(sessions), 4)) %>%
+dplyr::select(-sessions) %>%
+dplyr::right_join(possible_sections, by = "section_used") %>%
+dplyr::mutate(proportion = ifelse(is.na(proportion), 0, proportion)) %>%
+tidyr::spread(section_used, proportion) %>%
+dplyr::mutate(date = date) %>%
+dplyr::select(c(date, `no action`, `primary links`, `search`, `secondary 
links`, `other languages`, `other projects`))
   
   wmf::write_conditional(clickthrough_data, file.path(base_path, 
"clickthrough_rate.tsv"))
   wmf::write_conditional(breakdown_data, file.path(base_path, 
"clickthrough_breakdown.tsv"))
   wmf::write_conditional(dwell_output, file.path(base_path, 
"dwell_metrics.tsv"))
   wmf::write_conditional(country_data, file.path(base_path, 
"country_data.tsv"))
+  wmf::write_conditional(first_visits, file.path(base_path, 
"clickthrough_firstvisit.tsv"))
   wmf::write_conditional(ua_data, file.path(base_path, "user_agent_data.tsv"))
   
   return(invisible())

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0bef264d250f3e89f05a3533ddcd3ff2959b93c4
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] Adds actions breakdown on first visit - change (wikimedia...prince)

2016-06-21 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Adds actions breakdown on first visit
..

Adds actions breakdown on first visit

Bug: T134199
Change-Id: I776e8670817c835882d019fa1e12d93d6d0a32a0
---
M functions.R
M server.R
M tab_documentation/breakdown.md
M tab_documentation/clickthrough_rate.md
A tab_documentation/first_visit.md
M ui.R
6 files changed, 58 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/prince 
refs/changes/46/295446/1

diff --git a/functions.R b/functions.R
index 41817b7..d165efe 100644
--- a/functions.R
+++ b/functions.R
@@ -10,13 +10,18 @@
   
   # Read in and format the high-level data
   data <- as.data.table(polloi::read_dataset(path = 
"portal/clickthrough_rate.tsv"))
-  clickthrough_rate <<- data[, j = list(success_rate = 
(events[type=="clickthrough"]/sum(events))*100), by = "date"]
+  clickthrough_rate <<- data[, j = list(success_rate = (events[type == 
"clickthrough"]/sum(events))*100), by = "date"]
   
   # Read in and format the breakdown data
   data <- as.data.table(polloi::read_dataset(path = 
"portal/clickthrough_breakdown.tsv"))
-  data <- data[,j=list(section_used = section_used, proportion = 
(events/sum(events))*100), by = "date"]
+  data <- data[, j = list(section_used = section_used, proportion = 
(events/sum(events))*100), by = "date"]
   action_breakdown <<- reshape2::dcast(data, formula = date ~ section_used, 
fun.aggregate = sum)
   
+  # Read in first visit clickthrough rates
+  data <- polloi::read_dataset(path = "portal/clickthrough_firstvisit.tsv")
+  data[, -1] <- data[, -1]*100 # first column is always going to be the date
+  first_visit_ctrs <<- data
+  
   return(invisible())
 }
 
diff --git a/server.R b/server.R
index dde7ff0..9a75079 100644
--- a/server.R
+++ b/server.R
@@ -20,7 +20,8 @@
   output$clickthrough_rate_dygraph <- renderDygraph({
 clickthrough_rate %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_clickthrough_rate)) %>%
-  polloi::make_dygraph(xlab = "Date", ylab = "Clickthrough rate (%)", 
title = "Wikipedia portal clickthrough rate") %>%
+  polloi::make_dygraph(xlab = "Date", ylab = "Clickthrough rate (%)",
+   title = "Wikipedia portal clickthrough rate") %>%
   dyCSS(css = "www/inverse.css") %>%
   dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
   dyAnnotation(as.Date("2015-12-07"), text = "A",
@@ -31,7 +32,8 @@
   output$action_breakdown_dygraph <- renderDygraph({
 action_breakdown %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_action_breakdown)) %>%
-  polloi::make_dygraph(xlab = "Date", ylab = "Actions (%)", title = 
"Actions on the Wikipedia portal") %>%
+  polloi::make_dygraph(xlab = "Date", ylab = "Actions (%)",
+   title = "Actions on the Wikipedia Portal") %>%
   dyCSS(css = "www/inverse.css") %>%
   dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
   dyLegend(labelsDiv = "action_breakdown_legend", show = "always", width = 
400) %>%
@@ -40,6 +42,15 @@
width = 12, height = 20, attachAtBottom = FALSE)
   })
   
+  output$first_visit_dygraph <- renderDygraph({
+first_visit_ctrs %>%
+  polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_first_visit)) %>%
+  polloi::make_dygraph(xlab = "Date", ylab = "Actions (%)",
+   title = "Actions on the first visit to Wikipedia 
Portal") %>%
+  dyCSS(css = "www/inverse.css") %>%
+  dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70)
+  })
+  
   output$dwelltime_dygraph <- renderDygraph({
 dwelltime_data %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_dwelltime)) %>%
diff --git a/tab_documentation/breakdown.md b/tab_documentation/breakdown.md
index a63294d..a5285c4 100644
--- a/tab_documentation/breakdown.md
+++ b/tab_documentation/breakdown.md
@@ -1,4 +1,4 @@
-Breakdown of user actions on the Wikipedia portal
+Breakdown of user actions on the Wikipedia Portal
 ===
 
 In [the clickthroughs 
tab](http://discovery.wmflabs.org/portal/#clickthrough_rate) we look at the 
actual rate of clickthroughs.
@@ -15,14 +15,10 @@
 
 The values are expressed as percentages - so if a feature has the value "61.3" 
it is being used 61.3% of the time.
 
-General trends
---
-
 Outages and inaccuracies
 --
 
-* From 7 December (marked "A") the sampling changed to exclude a broader range 
of browsers, resulting in alterations to things
-like clickthrough rate and dwell time. We expect this to resolve itself on 4 
January when a new schema 

[MediaWiki-commits] [Gerrit] WIP: T131564: Respect $wgInterwikiMagic setting while parsin... - change (mediawiki...parsoid)

2016-06-21 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: WIP: T131564: Respect $wgInterwikiMagic setting while parsing 
lang-links
..

WIP: T131564: Respect $wgInterwikiMagic setting while parsing lang-links

* TODO: Update parser tests and parserTests.js

Change-Id: If998f82d4a270f014fa508150feef28ee82273fe
---
M bin/parserTests.js
M lib/config/WikiConfig.js
M lib/mw/Title.js
M lib/wt2html/tt/LinkHandler.js
4 files changed, 32 insertions(+), 4 deletions(-)


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

diff --git a/bin/parserTests.js b/bin/parserTests.js
index 970d074..03c5ffd 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -2098,6 +2098,10 @@

this.env.conf.wiki.namespaceIds.memoryalpha =

this.env.conf.wiki.canonicalNamespaces.memoryalpha = 100;
 
+   // FIXME: Make this 
wiki-specific
+   // Forcibly enable 
language links
+   
this.env.conf.wiki.renderLanguageLinks = true;
+

async.series(this.buildTasks(item, targetModes, options),
nextCallback);
}.bind(this));
diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js
index b345864..3f8b64a 100644
--- a/lib/config/WikiConfig.js
+++ b/lib/config/WikiConfig.js
@@ -151,6 +151,10 @@
}
}
 
+   // See https://www.mediawiki.org/wiki/Manual:$wgInterwikiMagic
+   // If interwikimagic is not set, there can be no language links
+   this.renderLanguageLinks = general.interwikimagic !== undefined;
+
// The interwikiMap maps prefixes to the corresponding information
// gathered from the api query (prefix, language, url, local)
this.interwikiMap = new Map();
diff --git a/lib/mw/Title.js b/lib/mw/Title.js
index e1af765..6c6d7dc 100644
--- a/lib/mw/Title.js
+++ b/lib/mw/Title.js
@@ -143,6 +143,17 @@
 /**
  * @method
  *
+ * Determine whether the namespace is the Talk namespace.
+ *
+ * @return {boolean}
+ */
+Namespace.prototype.isTalk = function() {
+   return this.id === this.env.conf.wiki.canonicalNamespaces.talk;
+}
+
+/**
+ * @method
+ *
  * Determine the default name of the namespace.
  *
  * @return {string|undefined}
diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js
index 7b66ec8..fd1cfc9 100644
--- a/lib/wt2html/tt/LinkHandler.js
+++ b/lib/wt2html/tt/LinkHandler.js
@@ -293,10 +293,19 @@
return this.renderWikiLink.bind(this);
 
// language and interwiki links
-   } else if (target.interwiki) {
-   return this.renderInterwikiLink.bind(this);
-   } else if (target.language) {
-   return this.renderLanguageLink.bind(this);
+   } else {
+   if (target.interwiki) {
+   return this.renderInterwikiLink.bind(this);
+   } else if (target.language) {
+   var noLanguageLinks = this.env.page.title.ns.isTalk() ||
+   !this.env.conf.wiki.renderLanguageLinks;
+   if (noLanguageLinks) {
+   target.interwiki = target.language;
+   return this.renderInterwikiLink.bind(this);
+   } else {
+   return this.renderLanguageLink.bind(this);
+   }
+   }
}
 
// Neither a title, nor a language or interwiki. Should not happen.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If998f82d4a270f014fa508150feef28ee82273fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] Trigger a custom event on #wpTextbox1 when we need to get th... - change (mediawiki...VisualEditor)

2016-06-21 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Trigger a custom event on #wpTextbox1 when we need to get the 
latest wikitext out of it
..

Trigger a custom event on #wpTextbox1 when we need to get the latest wikitext 
out of it

To allow prompting gadgets like wikEd to update it with the latest value.

Bug: T135747
Change-Id: Ie353cf547dea6c100c5f01ab56c9b415be1ffdb8
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
M modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
2 files changed, 9 insertions(+), 3 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index d465750..99f41e4 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -541,8 +541,9 @@
},
 
activateVe: function () {
-   var wikitext = $( '#wpTextbox1' ).val(),
-   wikitextModified = wikitext !== initialWikitext;
+   var wikitext;
+   $( '#wpTextbox1' ).trigger( 've-require-latest' );
+   wikitext = $( '#wpTextbox1' ).val();
 
// Close any open jQuery.UI dialogs (e.g. WikiEditor's 
find and replace)
if ( $.fn.dialog ) {
@@ -551,7 +552,10 @@
 
if (
mw.config.get( 'wgAction' ) === 'submit' ||
-   ( mw.config.get( 'wgAction' ) === 'edit' && 
wikitextModified ) ||
+   (
+   mw.config.get( 'wgAction' ) === 'edit' 
&&
+   wikitext !== initialWikitext
+   ) ||
// switching from section editing must prompt 
because we can't
// keep changes from that (yet?)
$( 'input[name=wpSection]' ).val()
@@ -709,6 +713,7 @@
urlSaysHideWelcome = 'hidewelcomedialog' in new mw.Uri( 
location.href ).query;
 
if ( uri.query.action === 'edit' && $( '#wpTextbox1' ).length ) 
{
+   $( '#wpTextbox1' ).trigger( 've-require-latest' );
initialWikitext = $( '#wpTextbox1' ).val();
}
 
diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
index ecbd5e4..e2675a6 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
@@ -135,6 +135,7 @@
} );
 
if ( conf.fullRestbaseUrl || conf.restbaseUrl ) {
+   $( '#wpTextbox1' ).trigger( 've-require-latest' 
);
ve.track( 'trace.restbaseLoad.enter' );
if (
conf.fullRestbaseUrl &&

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie353cf547dea6c100c5f01ab56c9b415be1ffdb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] cache_upload: experiment with higher fe hfp cutoff - change (operations/puppet)

2016-06-21 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: cache_upload: experiment with higher fe hfp cutoff
..


cache_upload: experiment with higher fe hfp cutoff

This changes the size cutoff for frontend hit-for-pass from 32MB
to 48MB.  The reason we have this limit at all is to prevent very
large objects from evicting too many small ones in the limited
frontend memory space.

We've increased the size of the FE caches significantly in the
recent past, so 48MB should be acceptable in basic terms.  We've
recently experimented with raising the FE TTL cap from 1h to 4h
and that had virtually no effect on FE hitrate, so the remaining
likely explanations for the current limit are the HFP size cutoff
(which this patch tests) or total cache size (vs hot set size).

Change-Id: I0dbfb288a73aaa35f5532a6499d50b1f60ed622b
---
M templates/varnish/upload-frontend.inc.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/templates/varnish/upload-frontend.inc.vcl.erb 
b/templates/varnish/upload-frontend.inc.vcl.erb
index 9f31006..ea173dd 100644
--- a/templates/varnish/upload-frontend.inc.vcl.erb
+++ b/templates/varnish/upload-frontend.inc.vcl.erb
@@ -71,7 +71,7 @@
 <% stream_threshold = @cache_route == 'direct' ? 33554432 : 1048576 -%>
if (std.integer(beresp.http.Content-Length, 33554432) >= <%= 
stream_threshold %> || beresp.http.Content-Length ~ "^[0-9]{9}") {
set beresp.do_stream = true;
-   if (std.integer(beresp.http.Content-Length, 33554432) >= 
33554432 || beresp.http.Content-Length ~ "^[0-9]{9}") {
+   if (std.integer(beresp.http.Content-Length, 50331648) >= 
50331648 || beresp.http.Content-Length ~ "^[0-9]{9}") {
// don't attempt to cache these in the frontend
return (hit_for_pass);
}

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

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

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


[MediaWiki-commits] [Gerrit] cache_upload: experiment with higher fe hfp cutoff - change (operations/puppet)

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

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

Change subject: cache_upload: experiment with higher fe hfp cutoff
..

cache_upload: experiment with higher fe hfp cutoff

This changes the size cutoff for frontend hit-for-pass from 32MB
to 48MB.  The reason we have this limit at all is to prevent very
large objects from evicting too many small ones in the limited
frontend memory space.

We've increased the size of the FE caches significantly in the
recent past, so 48MB should be acceptable in basic terms.  We've
recently experimented with raising the FE TTL cap from 1h to 4h
and that had virtually no effect on FE hitrate, so the remaining
likely explanations for the current limit are the HFP size cutoff
(which this patch tests) or total cache size (vs hot set size).

Change-Id: I0dbfb288a73aaa35f5532a6499d50b1f60ed622b
---
M templates/varnish/upload-frontend.inc.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/295443/1

diff --git a/templates/varnish/upload-frontend.inc.vcl.erb 
b/templates/varnish/upload-frontend.inc.vcl.erb
index 9f31006..ea173dd 100644
--- a/templates/varnish/upload-frontend.inc.vcl.erb
+++ b/templates/varnish/upload-frontend.inc.vcl.erb
@@ -71,7 +71,7 @@
 <% stream_threshold = @cache_route == 'direct' ? 33554432 : 1048576 -%>
if (std.integer(beresp.http.Content-Length, 33554432) >= <%= 
stream_threshold %> || beresp.http.Content-Length ~ "^[0-9]{9}") {
set beresp.do_stream = true;
-   if (std.integer(beresp.http.Content-Length, 33554432) >= 
33554432 || beresp.http.Content-Length ~ "^[0-9]{9}") {
+   if (std.integer(beresp.http.Content-Length, 50331648) >= 
50331648 || beresp.http.Content-Length ~ "^[0-9]{9}") {
// don't attempt to cache these in the frontend
return (hit_for_pass);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0dbfb288a73aaa35f5532a6499d50b1f60ed622b
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] Duplicate logstash output to alternate elasticsearch cluster - change (operations/puppet)

2016-06-21 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Duplicate logstash output to alternate elasticsearch cluster
..

Duplicate logstash output to alternate elasticsearch cluster

To test the migration to elasticsearch 2.3 we need to start sending
some real-ish data at it. Add definitions for deployment-logstash3
which will be installed with elasticsearch 2.x, and necessary config
for logstash on deployment-logstash2 to duplicate insert events to it.

Change-Id: I28af9ed96516efcbae94dc8912f6043eb512
---
M hieradata/labs/deployment-prep/common.yaml
A hieradata/labs/deployment-prep/host/deployment-logstash3.yaml
M manifests/role/logstash.pp
3 files changed, 31 insertions(+), 0 deletions(-)


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

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 4120f7c..26bc2e0 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -181,6 +181,7 @@
 "elasticsearch::graylog_hosts":
   - deployment-logstash2.deployment-prep.eqiad.wmflabs
 role::logstash::statsd_host: labmon1001.eqiad.wmnet
+role::logstash::logstash_alt_host: deployment-logstash3.eqiad.wmflabs
 "mediawiki::redis_servers::eqiad":
   shard01:
 host: 10.68.16.177
diff --git a/hieradata/labs/deployment-prep/host/deployment-logstash3.yaml 
b/hieradata/labs/deployment-prep/host/deployment-logstash3.yaml
new file mode 100644
index 000..761f5cd
--- /dev/null
+++ b/hieradata/labs/deployment-prep/host/deployment-logstash3.yaml
@@ -0,0 +1,16 @@
+base::remote_syslog::enable: false
+
+# ES-specific
+elasticsearch::auto_create_index: true
+elasticsearch::cluster_name: labs-logstash-2.x-eqiad
+elasticsearch::expected_nodes: 1
+elasticsearch::heap_memory: '5G'
+elasticsearch::minimum_master_nodes: 1
+elasticsearch::recover_after_nodes: 1
+elasticsearch::recover_after_time: '1m'
+elasticsearch::graylog_hosts: undef
+# Needed to keep from trying to join cirrussearch cluster
+elasticsearch::unicast_hosts:
+  - deployment-logstash3.deployment-prep.eqiad.wmflabs
+elasticsearch::auto_create_index: '+logstash-*,-*'
+
diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp
index 0030ea7..8e89148 100644
--- a/manifests/role/logstash.pp
+++ b/manifests/role/logstash.pp
@@ -5,9 +5,12 @@
 #
 # == Parameters:
 # - $statsd_host: Host to send statsd data to.
+# - $logstash_alt_host: Additional host to send logstash elasticsearch
+#output to. Used for testing elasticsearch 2.3 deployment.
 #
 class role::logstash (
 $statsd_host,
+$logstash_alt_host = undef,
 ) {
 include ::role::logstash::elasticsearch
 include ::logstash
@@ -140,6 +143,17 @@
 require => File['/etc/logstash/elasticsearch-template.json'],
 }
 
+if ($logstash_alt_host) {
+logstash::output::elasticsearch { 'logstash-alt':
+host=> $logstash_alt_host,
+guard_condition => '"es" in [tags]',
+manage_indices  => true,
+priority=> 90,
+template=> '/etc/logstash/elasticsearch-template.json',
+require => 
File['/etc/logstash/elasticsearch-template.json'],
+}
+}
+
 logstash::output::statsd { 'MW_channel_rate':
 host=> $statsd_host,
 guard_condition => '[type] == "mediawiki" and "es" in [tags]',

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

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

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


[MediaWiki-commits] [Gerrit] Update tilerator to 4a0c515 - change (maps...deploy)

2016-06-21 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Update tilerator to 4a0c515
..


Update tilerator to 4a0c515

List of changes:
8c0eb61 Process all files since last call
4a0c515 Validate stateful upload params
xxx Update node module dependencies

Change-Id: Iac1d404886b66462060d72934edaee19a1999a88
---
R node_modules/accepts/LICENSE
R node_modules/accepts/index.js
R node_modules/accepts/node_modules/negotiator/LICENSE
R node_modules/accepts/node_modules/negotiator/index.js
R node_modules/accepts/node_modules/negotiator/lib/charset.js
R node_modules/accepts/node_modules/negotiator/lib/encoding.js
R node_modules/accepts/node_modules/negotiator/lib/language.js
R node_modules/accepts/node_modules/negotiator/lib/mediaType.js
A node_modules/accepts/node_modules/negotiator/package.json
A node_modules/accepts/package.json
M node_modules/bluebird/js/browser/bluebird.core.js
M node_modules/bluebird/js/browser/bluebird.core.min.js
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/release/promise.js
M node_modules/bluebird/package.json
M node_modules/body-parser/index.js
M node_modules/body-parser/lib/read.js
M node_modules/body-parser/lib/types/json.js
M node_modules/body-parser/lib/types/raw.js
M node_modules/body-parser/lib/types/text.js
M node_modules/body-parser/lib/types/urlencoded.js
R node_modules/body-parser/node_modules/bytes/LICENSE
A node_modules/body-parser/node_modules/bytes/index.js
A node_modules/body-parser/node_modules/bytes/package.json
D node_modules/body-parser/node_modules/http-errors/LICENSE
D node_modules/body-parser/node_modules/http-errors/index.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/LICENSE
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits_browser.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/package.json
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/test.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
D node_modules/body-parser/node_modules/http-errors/package.json
D node_modules/body-parser/node_modules/qs/.eslintignore
D node_modules/body-parser/node_modules/qs/.eslintrc
D node_modules/body-parser/node_modules/qs/.npmignore
D node_modules/body-parser/node_modules/qs/.travis.yml
D node_modules/body-parser/node_modules/qs/LICENSE
D node_modules/body-parser/node_modules/qs/bower.json
D node_modules/body-parser/node_modules/qs/component.json
D node_modules/body-parser/node_modules/qs/dist/qs.js
D node_modules/body-parser/node_modules/qs/lib/parse.js
D node_modules/body-parser/node_modules/qs/lib/stringify.js
D node_modules/body-parser/node_modules/qs/lib/utils.js
D node_modules/body-parser/node_modules/qs/package.json
D node_modules/body-parser/node_modules/qs/test/parse.js
D node_modules/body-parser/node_modules/qs/test/stringify.js
M node_modules/body-parser/node_modules/raw-body/LICENSE
M node_modules/body-parser/node_modules/raw-body/index.js
M node_modules/body-parser/node_modules/raw-body/package.json
M node_modules/body-parser/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/package.json
D node_modules/bytes/package.json
D node_modules/compression/node_modules/accepts/LICENSE
D node_modules/compression/node_modules/accepts/index.js
D node_modules/compression/node_modules/accepts/node_modules/mime-types/LICENSE
D node_modules/compression/node_modules/accepts/node_modules/mime-types/index.js
D 
node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE
D 
node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json
D 
node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js
D 
node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json
D 
node_modules/compression/node_modules/accepts/node_modules/mime-types/package.json
D node_modules/compression/node_modules/accepts/node_modules/negotiator/LICENSE
D 

[MediaWiki-commits] [Gerrit] Update tilerator to 4a0c515 - change (maps...deploy)

2016-06-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Update tilerator to 4a0c515
..

Update tilerator to 4a0c515

List of changes:
8c0eb61 Process all files since last call
4a0c515 Validate stateful upload params
xxx Update node module dependencies

Change-Id: Iac1d404886b66462060d72934edaee19a1999a88
---
R node_modules/accepts/LICENSE
R node_modules/accepts/index.js
R node_modules/accepts/node_modules/negotiator/LICENSE
R node_modules/accepts/node_modules/negotiator/index.js
R node_modules/accepts/node_modules/negotiator/lib/charset.js
R node_modules/accepts/node_modules/negotiator/lib/encoding.js
R node_modules/accepts/node_modules/negotiator/lib/language.js
R node_modules/accepts/node_modules/negotiator/lib/mediaType.js
A node_modules/accepts/node_modules/negotiator/package.json
A node_modules/accepts/package.json
M node_modules/bluebird/js/browser/bluebird.core.js
M node_modules/bluebird/js/browser/bluebird.core.min.js
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/release/promise.js
M node_modules/bluebird/package.json
M node_modules/body-parser/index.js
M node_modules/body-parser/lib/read.js
M node_modules/body-parser/lib/types/json.js
M node_modules/body-parser/lib/types/raw.js
M node_modules/body-parser/lib/types/text.js
M node_modules/body-parser/lib/types/urlencoded.js
R node_modules/body-parser/node_modules/bytes/LICENSE
A node_modules/body-parser/node_modules/bytes/index.js
A node_modules/body-parser/node_modules/bytes/package.json
D node_modules/body-parser/node_modules/http-errors/LICENSE
D node_modules/body-parser/node_modules/http-errors/index.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/LICENSE
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits_browser.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/package.json
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/test.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
D node_modules/body-parser/node_modules/http-errors/package.json
D node_modules/body-parser/node_modules/qs/.eslintignore
D node_modules/body-parser/node_modules/qs/.eslintrc
D node_modules/body-parser/node_modules/qs/.npmignore
D node_modules/body-parser/node_modules/qs/.travis.yml
D node_modules/body-parser/node_modules/qs/LICENSE
D node_modules/body-parser/node_modules/qs/bower.json
D node_modules/body-parser/node_modules/qs/component.json
D node_modules/body-parser/node_modules/qs/dist/qs.js
D node_modules/body-parser/node_modules/qs/lib/parse.js
D node_modules/body-parser/node_modules/qs/lib/stringify.js
D node_modules/body-parser/node_modules/qs/lib/utils.js
D node_modules/body-parser/node_modules/qs/package.json
D node_modules/body-parser/node_modules/qs/test/parse.js
D node_modules/body-parser/node_modules/qs/test/stringify.js
M node_modules/body-parser/node_modules/raw-body/LICENSE
M node_modules/body-parser/node_modules/raw-body/index.js
M node_modules/body-parser/node_modules/raw-body/package.json
M node_modules/body-parser/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/package.json
D node_modules/bytes/package.json
D node_modules/compression/node_modules/accepts/LICENSE
D node_modules/compression/node_modules/accepts/index.js
D node_modules/compression/node_modules/accepts/node_modules/mime-types/LICENSE
D node_modules/compression/node_modules/accepts/node_modules/mime-types/index.js
D 
node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE
D 
node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json
D 
node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js
D 
node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json
D 
node_modules/compression/node_modules/accepts/node_modules/mime-types/package.json
D 

[MediaWiki-commits] [Gerrit] Adds calculation of CTR in first visits only - change (wikimedia...golden)

2016-06-21 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Adds calculation of CTR in first visits only
..

Adds calculation of CTR in first visits only

Bug: T134199
Change-Id: I0bef264d250f3e89f05a3533ddcd3ff2959b93c4
---
M portal/portal.R
1 file changed, 18 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/39/295439/1

diff --git a/portal/portal.R b/portal/portal.R
index 2e0f3b5..e6e2424 100644
--- a/portal/portal.R
+++ b/portal/portal.R
@@ -37,15 +37,15 @@
   dwell_output <- dwell_output[,c(4,1:3)]
   
   # Generate clickthrough rate data
-  clickthrough_data <- data[,j=list(events=.N),by = c("date","type")]
+  clickthrough_data <- data[, j = list(events = .N), by = c("date","type")]
   
   # Generate click breakdown
   data <- data[order(data$type, decreasing = FALSE),]
-  breakdown_data <- data[,j=list(events=.N),by = c("date","section_used")]
+  breakdown_data <- data[,j = list(events = .N), by = c("date","section_used")]
   
   # Generate by-country breakdown
   countries <- c("US", "GB", "CA", "DE", "IN", "AU", "CN", "RU", "PH", "FR")
-  country_breakdown <- data[,j=list(events=.N), by = c("date", "country")]
+  country_breakdown <- data[,j = list(events = .N), by = c("date", "country")]
   others <- data.table::data.table(date = date,
country = "Other",
events = 
sum(country_breakdown$events[!country_breakdown$country %in% countries]))
@@ -65,10 +65,25 @@
   ua_data <- ua_data[ua_data$percent >= 0.5, c("date", "browser", 
"browser_major", "percent"), with = FALSE]
   data.table::setnames(ua_data, 3, "version")
   
+  # First visit clickthrough rates
+  first_visits <- as.data.frame(data) %>%
+dplyr::group_by(session) %>%
+dplyr::arrange(ts) %>%
+dplyr::mutate(visit = cumsum(type == "landing")) %>%
+dplyr::filter(visit == 1) %>%
+dplyr::group_by(section_used) %>%
+dplyr::summarize(sessions = n()) %>%
+dplyr::mutate(proportion = round(sessions/sum(sessions), 4)) %>%
+dplyr::select(-sessions) %>%
+tidyr::spread(section_used, proportion) %>%
+dplyr::mutate(date = date) %>%
+dplyr::select(c(date, `no action`, `primary links`, `search`, `secondary 
links`, `other languages`, `other projects`))
+  
   wmf::write_conditional(clickthrough_data, file.path(base_path, 
"clickthrough_rate.tsv"))
   wmf::write_conditional(breakdown_data, file.path(base_path, 
"clickthrough_breakdown.tsv"))
   wmf::write_conditional(dwell_output, file.path(base_path, 
"dwell_metrics.tsv"))
   wmf::write_conditional(country_data, file.path(base_path, 
"country_data.tsv"))
+  wmf::write_conditional(first_visits, file.path(base_path, 
"clickthrough_firstvisit.tsv"))
   wmf::write_conditional(ua_data, file.path(base_path, "user_agent_data.tsv"))
   
   return(invisible())

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bef264d250f3e89f05a3533ddcd3ff2959b93c4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Bearloga 

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


[MediaWiki-commits] [Gerrit] WIP: Add globe minimap to all maps - change (mediawiki...Kartographer)

2016-06-21 Thread JGirault (Code Review)
JGirault has uploaded a new change for review.

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

Change subject: WIP: Add globe minimap to all maps
..

WIP: Add globe minimap to all maps

This is a proof-of-concept, and should not be merged, because:

* Hard dependencies with d3 and topojson, two libraries that are not
  yet loaded

* External code is not production ready, the plugin contains several
  `console.log` and a few bugs (globe is not updated when moving the map)

Bug: T136064
Change-Id: I361a01b446c28104d23918f4fcb0d61b258a0090
---
M extension.json
A lib/d3/d3.js
A lib/leaflet.globe-minimap/Control.GlobeMiniMap.js
A lib/leaflet.globe-minimap/mw.Control.GlobeMiniMap.js
A lib/leaflet.globe-minimap/world.json
A lib/topojson/topojson.js
M modules/kartographer.js
M package.json
8 files changed, 10,462 insertions(+), 2 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I361a01b446c28104d23918f4fcb0d61b258a0090
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 

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


[MediaWiki-commits] [Gerrit] Add a cross-wiki sidebar to the Special:Notifications page - change (mediawiki...Echo)

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

Change subject: Add a cross-wiki sidebar to the Special:Notifications page
..


Add a cross-wiki sidebar to the Special:Notifications page

Add a sidebar with cross-wiki sources and pages of unread notifications.
The filter allows the user to fetch notifications from a foreign source
and specific pages if those exist.

Bug: T129366
Change-Id: I57d827a47f80274d75364c2099a9624049a26834
---
M Resources.php
M i18n/en.json
M i18n/qqq.json
M modules/api/mw.echo.api.APIHandler.js
M modules/api/mw.echo.api.EchoApi.js
M modules/api/mw.echo.api.ForeignAPIHandler.js
M modules/api/mw.echo.api.LocalAPIHandler.js
M modules/controller/mw.echo.Controller.js
M modules/echo.variables.less
M modules/model/mw.echo.dm.FiltersModel.js
M modules/model/mw.echo.dm.ModelManager.js
M modules/model/mw.echo.dm.NotificationItem.js
M modules/model/mw.echo.dm.NotificationsList.js
M modules/model/mw.echo.dm.PaginationModel.js
A modules/model/mw.echo.dm.SourcePagesModel.js
A modules/styles/mw.echo.ui.CrossWikiUnreadFilterWidget.less
M modules/styles/mw.echo.ui.NotificationsInboxWidget.less
A modules/styles/mw.echo.ui.PageFilterWidget.less
A modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
A modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js
M modules/ui/mw.echo.ui.DatedNotificationsWidget.js
M modules/ui/mw.echo.ui.NotificationsInboxWidget.js
A modules/ui/mw.echo.ui.PageFilterWidget.js
A modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
M modules/ui/mw.echo.ui.SortedListWidget.js
M modules/ui/mw.echo.ui.SubGroupListWidget.js
26 files changed, 1,142 insertions(+), 98 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index e815aea..99922bf 100644
--- a/Resources.php
+++ b/Resources.php
@@ -170,6 +170,7 @@
'scripts' => array(
'mw.echo.js',
'model/mw.echo.dm.js',
+   'model/mw.echo.dm.SourcePagesModel.js',
'model/mw.echo.dm.PaginationModel.js',
'model/mw.echo.dm.FiltersModel.js',
'model/mw.echo.dm.ModelManager.js',
@@ -286,6 +287,9 @@
'ui/mw.echo.ui.DatedSubGroupListWidget.js',
'ui/mw.echo.ui.DatedNotificationsWidget.js',
'ui/mw.echo.ui.ReadStateButtonSelectWidget.js',
+   'ui/mw.echo.ui.PageNotificationsOptionWidget.js',
+   'ui/mw.echo.ui.PageFilterWidget.js',
+   'ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js',
'ui/mw.echo.ui.NotificationsInboxWidget.js',
'special/ext.echo.special.js',
),
@@ -294,6 +298,9 @@
'styles/mw.echo.ui.DatedSubGroupListWidget.less',
'styles/mw.echo.ui.DatedNotificationsWidget.less',
'styles/mw.echo.ui.NotificationsInboxWidget.less',
+   'styles/mw.echo.ui.PageNotificationsOptionWidget.less',
+   'styles/mw.echo.ui.PageFilterWidget.less',
+   'styles/mw.echo.ui.CrossWikiUnreadFilterWidget.less',
),
'dependencies' => array(
'ext.echo.ui',
@@ -307,6 +314,8 @@
'echo-notification-placeholder-filters',
'echo-specialpage-pagination-numnotifications',
'echo-specialpage-pagination-range',
+   'echo-specialpage-pagefilters-title',
+   'echo-specialpage-pagefilters-subtitle',
'echo-more-info',
'echo-feedback',
'echo-specialpage-section-markread',
diff --git a/i18n/en.json b/i18n/en.json
index e7422bb..b175404 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -99,6 +99,8 @@
"echo-specialpage-markasread-invalid-id": "Invalid event ID",
"echo-specialpage-pagination-numnotifications": "$1 
{{PLURAL:$1|notification|notifications}}",
"echo-specialpage-pagination-range": "$1 - $2",
+   "echo-specialpage-pagefilters-title": "Recent activity",
+   "echo-specialpage-pagefilters-subtitle": "Pages with unread 
notifications",
"notificationsmarkread-legend": "Mark notification as read",
"echo-anon": "To receive notifications, [$1 create an account] or [$2 
log in].",
"echo-none": "You have no notifications.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 7ffb45f..f6c2648 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -90,6 +90,8 @@
"echo-specialpage-markasread-invalid-id": "Error message shown to users 
who try to mark a notification as read with an invalid event ID.",
"echo-specialpage-pagination-numnotifications": "Label noting 

[MediaWiki-commits] [Gerrit] Optimize mobile static images - change (operations/mediawiki-config)

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

Change subject: Optimize mobile static images
..


Optimize mobile static images

Each file was converted to PNG8+alpha with ImageAlpha (https://pngmini.com/)
and had its palette reduced as far as possible without visibly degrading
quality. Then each file was further processed with zopflipng:

   zopflipng --iterations=100 --filters=01234mepb --lossy_transparent

The mean reduction in file size is 52%.

   file before after   %change
   ---
   W.png 1115b 1034b   -7%
   commons.png   2003b  983b  -51%
   mediawiki.png31040b 9782b  -68%
   meta.png  6916b 2552b  -63%
   wikibooks.png 3403b  914b  -73%
   wikidata.png   447b  369b  -17%
   wikimedia.png 2003b  914b  -54%
   wikinews.png  4464b 1920b  -57%
   wikipedia-wordmark-en.png 2516b  956b  -62%
   wikiquote.png 2306b 1016b  -56%
   wikisource.png6708b 2354b  -65%
   wikispecies.png  10291b 3260b  -68%
   wikiversity.png   2082b 1757b  -16%
   wikivoyage.png1531b  585b  -62%
   wiktionary.png9717b 3480b  -64%

Change-Id: I8f09e82529da0ce2aa210a2b14ee5ccf0bb52f94
---
M static/images/mobile/W.png
M static/images/mobile/commons.png
M static/images/mobile/mediawiki.png
M static/images/mobile/meta.png
M static/images/mobile/wikibooks.png
M static/images/mobile/wikidata.png
M static/images/mobile/wikimedia.png
M static/images/mobile/wikinews.png
M static/images/mobile/wikipedia-wordmark-en.png
M static/images/mobile/wikiquote.png
M static/images/mobile/wikisource.png
M static/images/mobile/wikispecies.png
M static/images/mobile/wikiversity.png
M static/images/mobile/wikivoyage.png
M static/images/mobile/wiktionary.png
15 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/static/images/mobile/W.png b/static/images/mobile/W.png
index c253240..6e89a88 100644
--- a/static/images/mobile/W.png
+++ b/static/images/mobile/W.png
Binary files differ
diff --git a/static/images/mobile/commons.png b/static/images/mobile/commons.png
index 80b5776..be9f7aa 100644
--- a/static/images/mobile/commons.png
+++ b/static/images/mobile/commons.png
Binary files differ
diff --git a/static/images/mobile/mediawiki.png 
b/static/images/mobile/mediawiki.png
index a398c4e..64da935 100644
--- a/static/images/mobile/mediawiki.png
+++ b/static/images/mobile/mediawiki.png
Binary files differ
diff --git a/static/images/mobile/meta.png b/static/images/mobile/meta.png
index 1229122..df5f206 100644
--- a/static/images/mobile/meta.png
+++ b/static/images/mobile/meta.png
Binary files differ
diff --git a/static/images/mobile/wikibooks.png 
b/static/images/mobile/wikibooks.png
index 6c9b8cb..f54c86e 100644
--- a/static/images/mobile/wikibooks.png
+++ b/static/images/mobile/wikibooks.png
Binary files differ
diff --git a/static/images/mobile/wikidata.png 
b/static/images/mobile/wikidata.png
index 4ca38af..c2df49d 100644
--- a/static/images/mobile/wikidata.png
+++ b/static/images/mobile/wikidata.png
Binary files differ
diff --git a/static/images/mobile/wikimedia.png 
b/static/images/mobile/wikimedia.png
index 7eb3745..675e279 100644
--- a/static/images/mobile/wikimedia.png
+++ b/static/images/mobile/wikimedia.png
Binary files differ
diff --git a/static/images/mobile/wikinews.png 
b/static/images/mobile/wikinews.png
index aa56893..320cb66 100644
--- a/static/images/mobile/wikinews.png
+++ b/static/images/mobile/wikinews.png
Binary files differ
diff --git a/static/images/mobile/wikipedia-wordmark-en.png 
b/static/images/mobile/wikipedia-wordmark-en.png
index 22a4c11..27acc03 100644
--- a/static/images/mobile/wikipedia-wordmark-en.png
+++ b/static/images/mobile/wikipedia-wordmark-en.png
Binary files differ
diff --git a/static/images/mobile/wikiquote.png 
b/static/images/mobile/wikiquote.png
index dfe53fa..a24dbfb 100644
--- a/static/images/mobile/wikiquote.png
+++ b/static/images/mobile/wikiquote.png
Binary files differ
diff --git a/static/images/mobile/wikisource.png 
b/static/images/mobile/wikisource.png
index cba8854..3a0e653 100644
--- a/static/images/mobile/wikisource.png
+++ b/static/images/mobile/wikisource.png
Binary files differ
diff --git a/static/images/mobile/wikispecies.png 
b/static/images/mobile/wikispecies.png
index 89d8add..0ae65b2 100644
--- a/static/images/mobile/wikispecies.png
+++ b/static/images/mobile/wikispecies.png
Binary files differ
diff --git a/static/images/mobile/wikiversity.png 

[MediaWiki-commits] [Gerrit] Prepare scap3 deployment for WDQS - change (operations/puppet)

2016-06-21 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: Prepare scap3 deployment for WDQS
..

Prepare scap3 deployment for WDQS

Bug: T129144
Change-Id: I590ad695be51753d2b10baef9a1c6255753fb80a
---
M hieradata/common/scap/server.yaml
M modules/admin/data/data.yaml
M modules/wdqs/manifests/init.pp
3 files changed, 13 insertions(+), 3 deletions(-)


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

diff --git a/hieradata/common/scap/server.yaml 
b/hieradata/common/scap/server.yaml
index c9579c0..f141c2d 100644
--- a/hieradata/common/scap/server.yaml
+++ b/hieradata/common/scap/server.yaml
@@ -66,3 +66,5 @@
   ores/deploy:
 repository: mediawiki/services/ores/deploy
 
+  wdqs/wdqs:
+   repository: wikidata/query/deploy
\ No newline at end of file
diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index cfc09c6..7952ac7 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1,4 +1,4 @@
-groups:
+vgroups:
   absent:
 description: meta group for absented users
 members: [ananthrk, avar, bsitu, cmcmahon, csalvia, diederik, edenhill, 
erik, gage,
@@ -367,6 +367,8 @@
 members: [smalyshev, hoo, jzerebecki]
 privileges: ['ALL = NOPASSWD: /usr/sbin/service wdqs-blazegraph *',
  'ALL = NOPASSWD: /usr/sbin/service wdqs-updater *',
+ 'ALL = NOPASSWD: /bin/systemctl enable wdqs-updater',
+ 'ALL = NOPASSWD: /bin/systemctl disable wdqs-updater',
  'ALL = (blazegraph) NOPASSWD: ALL',
  'ALL = NOPASSWD: /bin/journalctl *']
   mailman-admins:
@@ -410,7 +412,8 @@
 gid: 763
 description: Service deploy users
 members: [eevans, gwicke, mobrovac, demon, twentyafterfour, thcipriani, 
dduvall,
-  yurik, bsitzmann, mholloway-shell, kartik, halfak, ladsgroup]
+  yurik, bsitzmann, mholloway-shell, kartik, halfak, ladsgroup, 
smalyshev,
+  gehel, hoo, jzerebecki]
 privileges: []
 
   aqs-admins:
diff --git a/modules/wdqs/manifests/init.pp b/modules/wdqs/manifests/init.pp
index bf7804b..5b95d1a 100644
--- a/modules/wdqs/manifests/init.pp
+++ b/modules/wdqs/manifests/init.pp
@@ -75,7 +75,12 @@
 }
 
 # WDQS Updater service
-#$updater_options = hiera('wdqs::updater_options', '-n wdq -s')
 include wdqs::updater
 
+# Deployment
+scap::target { 'wdqs/wdqs':
+service_name => 'wdqs-blazegraph',
+deploy_user  => 'deploy-service',
+manage_user  => true,
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c2281a2..655a588 - change (mediawiki/extensions)

2016-06-21 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: c2281a2..655a588
..


Syncronize VisualEditor: c2281a2..655a588

Change-Id: I171f897453bf537368515289a30378932193fc84
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index c2281a2..655a588 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c2281a2a8c5a5e7c1a4a328f4b48e8faeacf2ab1
+Subproject commit 655a5883c995abd2a28a033f4a123a20dc35e1de

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I171f897453bf537368515289a30378932193fc84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Add maintenance script to update page IDs of topic-resolved ... - change (mediawiki...Flow)

2016-06-21 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Add maintenance script to update page IDs of topic-resolved 
notifications
..

Add maintenance script to update page IDs of topic-resolved notifications

Change topic titles to board titles.

Bug: T137501
Change-Id: I5bef3ce6017a6f02668d7d83ec0f01762af2a16c
---
A maintenance/FlowUpdateResolvedNotifTitles.php
1 file changed, 90 insertions(+), 0 deletions(-)


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

diff --git a/maintenance/FlowUpdateResolvedNotifTitles.php 
b/maintenance/FlowUpdateResolvedNotifTitles.php
new file mode 100644
index 000..ff08901
--- /dev/null
+++ b/maintenance/FlowUpdateResolvedNotifTitles.php
@@ -0,0 +1,90 @@
+mDescription = "Update the titles of flow-topic-resolved 
notifications to point to boards instead of topics";
+
+   $this->setBatchSize( 500 );
+   }
+
+   public function getUpdateKey() {
+   return __CLASS__;
+   }
+
+   public function doDBUpdates() {
+   $dbFactory = MWEchoDbFactory::newFromDefault();
+   $dbw = $dbFactory->getEchoDb( DB_MASTER );
+   $dbr = $dbFactory->getEchoDb( DB_SLAVE );
+   $iterator = new BatchRowIterator(
+   $dbr,
+   'echo_event',
+   'event_id',
+   $this->mBatchSize
+   );
+   $iterator->addConditions( array(
+   'event_type' => 'flow-topic-resolved',
+   'event_page_id IS NOT NULL',
+   ) );
+   $iterator->setFetchColumns( array( 'event_page_id' ) );
+
+   $storage = Container::get( 'storage.workflow' );
+
+   $this->output( "Retitling flow-topic-resolved 
notifications...\n" );
+
+   $processed = 0;
+   foreach ( $iterator as $batch ) {
+   foreach ( $batch as $row ) {
+   $topicTitle = Title::newFromId( 
$row->event_page_id );
+   if ( $topicTitle->getNamespace() !== NS_TOPIC ) 
{
+   continue;
+   }
+   $boardTitle = null;
+   try {
+   $uuid = 
WorkflowLoaderFactory::uuidFromTitle( $topicTitle );
+   $workflow = $storage->get( $uuid );
+   if ( $workflow ) {
+   $boardTitle = 
$workflow->getOwnerTitle();
+   }
+   } catch ( Exception $e ) {}
+   if ( $boardTitle ) {
+   $dbw->update(
+   'echo_event',
+   array( 'event_page_id' => 
$boardTitle->getArticleId() ),
+   array( 'event_id' => 
$row->event_id )
+   );
+   $processed += $dbw->affectedRows();
+   } else {
+   $this->output( "Could not find board 
for topic: " . $topicTitle->getPrefixedText() . "\n" );
+   }
+   }
+
+   $this->output( "Updated $processed notifications.\n" );
+   $dbFactory->waitForSlaves();
+   }
+
+   return true;
+   }
+}
+
+$maintClass = 'FlowUpdateResolvedNotifTitles';
+require_once ( RUN_MAINTENANCE_IF_MAIN );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5bef3ce6017a6f02668d7d83ec0f01762af2a16c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c2281a2..655a588 - change (mediawiki/extensions)

2016-06-21 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: c2281a2..655a588
..

Syncronize VisualEditor: c2281a2..655a588

Change-Id: I171f897453bf537368515289a30378932193fc84
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor b/VisualEditor
index c2281a2..655a588 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c2281a2a8c5a5e7c1a4a328f4b48e8faeacf2ab1
+Subproject commit 655a5883c995abd2a28a033f4a123a20dc35e1de

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I171f897453bf537368515289a30378932193fc84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] WIP: first attempt at phabricator/harbormaster job templates - change (integration/config)

2016-06-21 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review.

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

Change subject: WIP: first attempt at phabricator/harbormaster job templates
..

WIP: first attempt at phabricator/harbormaster job templates

This defines the outline for some phabricator CI jobs.

Change-Id: I021d441ca8e014dbe735e7f36109f341569acaff
---
A jjb/phabricator.yaml
1 file changed, 162 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/96/295396/1

diff --git a/jjb/phabricator.yaml b/jjb/phabricator.yaml
new file mode 100644
index 000..1393063
--- /dev/null
+++ b/jjb/phabricator.yaml
@@ -0,0 +1,162 @@
+# Phabricator-triggered jobs
+
+- defaults:
+name: phabricator-defaults
+description: |
+  Job is managed by https://www.mediawiki.org/wiki/CI/JJB;>Jenkins Job Builder.
+  This job is triggered by Phabricator
+project-type: freestyle
+logrotate:
+daysToKeep: 30
+scm:
+ - git:
+url: '$CLONE_URI'
+branches:
+ - '$CHECKOUT_REVISION'
+wipe-workspace: true
+browser: phabricator
+browser-url: https://phabricator.wikimedia.org
+wrappers:
+  - timeout:
+  timeout: 30
+  fail: true
+  - timestamps
+  - ansicolor
+
+
+- publisher:
+name: phabricator-comment
+publishers:
+- phabricator:
+comment-on-success: false
+uberalls-enabled: false
+comment-with-console-link-on-failure: true
+comment-file: ".phabricator_comment"
+comment-size: 1000
+
+
+- builder:
+name: phabricator-builder
+builders:
+- shell: |
+# remarkup-formatted comment that will be sent to phabricator
+COMMENT="{icon check-circle color=green} [[$BUILD_URL | Build 
Details]]"
+echo $COMMENT > .phabricator_comment
+rm log/stdout.log || true > /dev/null 2>&1
+- shell: |
+if [ -f '{configfile}' ]; then
+echo 'Found {configfile}, running {testname}:'
+{testcommand} | tee "log/stdout.log"
+if [ $1 -gt 0 ]; then
+COMMENT="{icon times-circle color=red} [[$BUILD_URL | 
Build Details]]"
+echo "$COMMENT" > .phabricator_comment
+tail -10 log/stdout.log >> .phabricator_comment
+exit $1
+fi
+fi
+
+
+- builder:
+name: phabricator-builder-arclint
+builders:
+  - phabricator-builder:
+  testname: "arc lint"
+  configfile: ".arclint"
+  command: "arc lint --rev HEAD^ --output summary 
--never-apply-patches --severity error"
+
+
+- builder:
+name: phabricator-builder-arcunit
+builders:
+- phabricator-builder:
+testname: "arcanist unit tests"
+configfile: ".arcunit"
+command: "/usr/bin/arc unit --rev HEAD^ -target $PHID"
+
+
+- builder:
+  name: phabricator-builder-composer
+  builders:
+  - phabricator-builder:
+testname: 'composer test'
+configfile: "composer.json"
+command: "(composer install && composer test)"
+
+
+- builder:
+  name: phabricator-builder-npm
+  builders:
+  - phabricator-builder:
+testname: 'npm tests'
+configfile: "package.json"
+command: "(npm install && npm run test)"
+
+
+- builder:
+  name: phabricator-builder-rake
+  builders:
+  - phabricator-builder:
+testname: 'rake -T'
+configfile: "Rakefile"
+command: "bundle exec rake -T"
+
+
+- builder:
+  name: phabricator-builder-rake
+  builders:
+  - phabricator-builder:
+testname: 'tox -v'
+configfile: "tox.ini"
+command: "PY_COLORS=1 tox -v"
+
+
+- builder:
+name: phabricator-builder-all
+builders:
+- phabricator-builder-shared
+- phabricator-builder-arclint
+- phabricator-builder-arcunit
+- phabricator-builder-composer
+- phabricator-builder-npm
+- phabricator-builder-rake
+- phabricator-builder-tox
+
+
+- job-template:
+name: '{name}-jessie'
+node: ci-jessie-wikimedia
+concurrent: true
+properties:
+- zeromq-event
+triggers:
+- raw:
+  xml: |
+  
+builders:
+- castor-load
+- phabricator-builder-all
+publishers:
+- phabricator-comment
+- archive-log-dir
+- castor-save
+parameters:
+- string:
+name: PHID
+description: "Phabricator unique id of build target"
+- string:
+name: CALLSIGN
+description: "Phabricator repository callsign"
+- string:
+name: DIFF_ID
+description: "Differential 

[MediaWiki-commits] [Gerrit] Update build instructions for MacOS X. - change (openzim)

2016-06-21 Thread Kelson (Code Review)
Kelson has submitted this change and it was merged.

Change subject: Update build instructions for MacOS X.
..


Update build instructions for MacOS X.

Change-Id: I0190ada3bf02c42ed34cb6d253516a9c662357e1
---
M zimlib/README.md
M zimwriterfs/README.md
2 files changed, 31 insertions(+), 2 deletions(-)

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



diff --git a/zimlib/README.md b/zimlib/README.md
index ce35ed9..9aef82c 100644
--- a/zimlib/README.md
+++ b/zimlib/README.md
@@ -16,5 +16,24 @@
 make
 ```
 
+OSX compilation
+---
+On MacOSX, you'll need to install some packages from
+[homebrew](http://brew.sh/):
+```
+brew update
+brew install xz libmagic
+```
+You'll also want to add `/usr/local/include` to your search path,
+for example:
+```
+./autogen.sh
+./configure CFLAGS=-I/usr/local/include CXXFLAGS=-I/usr/local/include
+make
+```
+
+License
+---
+
 The `zimlib` library is released under the GPLv2 license
 terms.
diff --git a/zimwriterfs/README.md b/zimwriterfs/README.md
index 8695643..1cbb7dc 100644
--- a/zimwriterfs/README.md
+++ b/zimwriterfs/README.md
@@ -44,9 +44,19 @@
 ```
 
 OSX compilation
-
+---
+OSX builds are similar to Linux, except we use homebrew.  Change to
+`../zimlib` and build zimlib as instructed in the README there.  Then
+return here and:
+```
+brew install gumbo-parser
+./autogen.sh
+./configure CXXFLAGS="-I../zimlib/include -I/usr/local/include" 
LDFLAGS=-L../zimlib/src/.libs
+make
+```
 
-On MaxOSX, a script helps you build zimwriterfs both statically and 
dynamically.
+Alternatively, there is a script included here to help you build both
+static and dynamic binaries for `zimwriterfs`.
 You must have a working and set up Kiwix repository (with dependencies ready).
 
 1. Install libmagic with brew (it's important)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0190ada3bf02c42ed34cb6d253516a9c662357e1
Gerrit-PatchSet: 1
Gerrit-Project: openzim
Gerrit-Branch: master
Gerrit-Owner: Cscott 
Gerrit-Reviewer: Kelson 

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


[MediaWiki-commits] [Gerrit] Deploy search metrics dash with iOS events spike note - change (wikimedia...dashboard)

2016-06-21 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Deploy search metrics dash with iOS events spike note
..


Deploy search metrics dash with iOS events spike note

Change-Id: If0c70f301c05045db118731efa2dba97a3203588
---
M shiny-server/metrics
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/shiny-server/metrics b/shiny-server/metrics
index 305cfee..da8aa9e 16
--- a/shiny-server/metrics
+++ b/shiny-server/metrics
-Subproject commit 305cfee3beb3e7b45f954282544857b5e1da4b34
+Subproject commit da8aa9ea047df874ce784d35cd127a342c5862f5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0c70f301c05045db118731efa2dba97a3203588
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/dashboard
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] Add CSS linting via stylelint - change (labs...heritage)

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

Change subject: Add CSS linting via stylelint
..


Add CSS linting via stylelint

- Add stylelint to both package.json and Gruntfile
  but only applying to api and toolbox files
- Use stylelint-config-standard
- Reformat the three CSS files using stylefmt
  and finishing the rest by hand.

Change-Id: If13a68aa0ff03fb00dd28f84814bb659a52fe942
---
A .stylelintrc
M Gruntfile.js
M api/jscss/style.css
M package.json
M toolbox/css/default_css.css
M toolbox/css/styles.css
6 files changed, 726 insertions(+), 525 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000..40db42c
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,3 @@
+{
+  "extends": "stylelint-config-standard"
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 4676bd5..ae781ff 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -2,6 +2,7 @@
 
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
 
@@ -12,13 +13,25 @@
'!vendor/**'
]
},
+
banana: {
'monumentsapi': [
'i18n',
]
+   },
+
+   stylelint: {
+   options: {
+   syntax: 'css'
+   },
+   src: [
+   'api/jscss/*.css',
+   'toolbox/css/*.css'
+   ]
}
+
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'test', [ 'jsonlint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/api/jscss/style.css b/api/jscss/style.css
index a66bb37..556c25c 100644
--- a/api/jscss/style.css
+++ b/api/jscss/style.css
@@ -1,54 +1,111 @@
+td,
+th,
+table {
+  border: 1px solid gray;
+  border-collapse: collapse;
+  font-family: Helvetica, Arial, sans-serif;
+}
 
-td, th,table { border: 1px solid gray; border-collapse: collapse; font-family: 
Helvetica, Arial, sans-serif;}
-th { background:steelblue; }
-tr{ background:lightsteelblue; opacity:0.8; }
-tr:hover { opacity:0.99; }
-tr#header { opacity:0.99; }
-td.ht0 { background-color: #f00; }
-td.ht1 { background-color: #f30; }
-td.ht2 { background-color: #f60; }
-td.ht3 { background-color: #f90; }
-td.ht4 { background-color: #fc0; }
-td.ht5 { background-color: #ff0; }
-td.ht6 { background-color: #cf0; }
-td.ht7 { background-color: #9f0; }
-td.ht8 { background-color: #6f0; }
-td.ht9 { background-color: #3f0; }
-td.ht10 { background-color: #0f0; }
-img { 
-border: medium none;
-vertical-align: middle;
+th {
+  background: steelblue;
+}
+
+tr {
+  background: lightsteelblue;
+  opacity: 0.8;
+}
+
+tr:hover {
+  opacity: 0.99;
+}
+
+tr#header {
+  opacity: 0.99;
+}
+
+td.ht0 {
+  background-color: #f00;
+}
+
+td.ht1 {
+  background-color: #f30;
+}
+
+td.ht2 {
+  background-color: #f60;
+}
+
+td.ht3 {
+  background-color: #f90;
+}
+
+td.ht4 {
+  background-color: #fc0;
+}
+
+td.ht5 {
+  background-color: #ff0;
+}
+
+td.ht6 {
+  background-color: #cf0;
+}
+
+td.ht7 {
+  background-color: #9f0;
+}
+
+td.ht8 {
+  background-color: #6f0;
+}
+
+td.ht9 {
+  background-color: #3f0;
+}
+
+td.ht10 {
+  background-color: #0f0;
+}
+
+img {
+  border: medium none;
+  vertical-align: middle;
 }
 
 /* some overrides for the toolbox search result, keep above selectors, maybe 
needed at other place */
-
 table.wlm-result {
- font-size:12px;
- background-color:#efefef;
- border-collapse:collapse;
+  font-size: 12px;
+  background-color: #efefef;
+  border-collapse: collapse;
 }
+
 table.wlm-result tr {
- opacity:1;
+  opacity: 1;
 }
+
 table.wlm-result th {
- background-color:#A9;
- white-space:nowrap;
- color:#fff;
+  background-color: #a9;
+  white-space: nowrap;
+  color: #fff;
 }
+
 table.wlm-result td {
- color:#333;
- border:2px solid #fff;
- padding:2px;
- background-color:#efefef;
- opacity:1;
+  color: #333;
+  border: 2px solid #fff;
+  padding: 2px;
+  background-color: #efefef;
+  opacity: 1;
 }
+
 table.wlm-result tr:hover td {
- background-color:#fff;
-  opacity:1;
+  background-color: #fff;
+  opacity: 1;
 }
+
 table.wlm-result td img {
- margin:-2px;
+  margin: -2px;
 }
+
 table.wlm-result th a.sortheader {
- margin-left:2px;
-}
\ No newline at end of file
+  margin-left: 2px;
+}
diff --git a/package.json b/package.json
index 39c4586..ad5a5ec 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,9 @@
 "grunt": "0.4.5",
 "grunt-banana-checker": "0.4.0",
 "grunt-cli": "0.1.13",
-"grunt-jsonlint": "^1.0.8"
+"grunt-jsonlint": 

[MediaWiki-commits] [Gerrit] Deploy search metrics dash with iOS events spike note - change (wikimedia...dashboard)

2016-06-21 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Deploy search metrics dash with iOS events spike note
..

Deploy search metrics dash with iOS events spike note

Change-Id: If0c70f301c05045db118731efa2dba97a3203588
---
M shiny-server/metrics
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/dashboard 
refs/changes/95/295395/1

diff --git a/shiny-server/metrics b/shiny-server/metrics
index 305cfee..da8aa9e 16
--- a/shiny-server/metrics
+++ b/shiny-server/metrics
-Subproject commit 305cfee3beb3e7b45f954282544857b5e1da4b34
+Subproject commit da8aa9ea047df874ce784d35cd127a342c5862f5

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0c70f301c05045db118731efa2dba97a3203588
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/dashboard
Gerrit-Branch: master
Gerrit-Owner: Bearloga 

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


[MediaWiki-commits] [Gerrit] Document iOS events spike - change (wikimedia...rainbow)

2016-06-21 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Document iOS events spike
..


Document iOS events spike

Bug: T102098
Change-Id: Iec87ffcb346764435d8a6cebda45c602beba1a5d
---
M tab_documentation/app_events.md
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/tab_documentation/app_events.md b/tab_documentation/app_events.md
index 0fc191d..6924838 100644
--- a/tab_documentation/app_events.md
+++ b/tab_documentation/app_events.md
@@ -11,13 +11,13 @@
 
 Due to a bug in the iOS EventLogging system, iOS events are currently being 
tracked much more frequently than Android ones and so are displayed in a 
different graph to avoid confusion.
 
-General trends
+Notes
 --
+* There is a spike in events on 2 June 2015 because of a release of the iOS 
app that added search logging. This has been 
[confirmed](https://phabricator.wikimedia.org/T102098) by a mobile apps 
software engineer.
 
 Outages and inaccuracies
 --
 * Between 5 May and 6 May 2015, approximately 40% of incoming EventLogging 
data was lost due to a wider EventLogging outage. You can read more about the 
outage 
[here](https://wikitech.wikimedia.org/wiki/Incident_documentation/20150506-EventLogging).
-* 
 
 Questions, bug reports, and feature suggestions
 --

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec87ffcb346764435d8a6cebda45c602beba1a5d
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/discovery/rainbow
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] Document iOS events spike - change (wikimedia...rainbow)

2016-06-21 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Document iOS events spike
..

Document iOS events spike

Bug: T102098
Change-Id: Iec87ffcb346764435d8a6cebda45c602beba1a5d
---
M tab_documentation/app_events.md
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/94/295394/1

diff --git a/tab_documentation/app_events.md b/tab_documentation/app_events.md
index 0fc191d..e8a95f6 100644
--- a/tab_documentation/app_events.md
+++ b/tab_documentation/app_events.md
@@ -11,13 +11,13 @@
 
 Due to a bug in the iOS EventLogging system, iOS events are currently being 
tracked much more frequently than Android ones and so are displayed in a 
different graph to avoid confusion.
 
-General trends
+Notes
 --
+* There is a spike in events on 2 June 2016 because of a release of the iOS 
app that added search logging. This has been 
[confirmed](https://phabricator.wikimedia.org/T102098) by a mobile apps 
software engineer.
 
 Outages and inaccuracies
 --
 * Between 5 May and 6 May 2015, approximately 40% of incoming EventLogging 
data was lost due to a wider EventLogging outage. You can read more about the 
outage 
[here](https://wikitech.wikimedia.org/wiki/Incident_documentation/20150506-EventLogging).
-* 
 
 Questions, bug reports, and feature suggestions
 --

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec87ffcb346764435d8a6cebda45c602beba1a5d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/rainbow
Gerrit-Branch: master
Gerrit-Owner: Bearloga 

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


[MediaWiki-commits] [Gerrit] Config for scap3 deployment of WDQS - change (wikidata...deploy)

2016-06-21 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: Config for scap3 deployment of WDQS
..

Config for scap3 deployment of WDQS

Change-Id: Ifb3411b6a76963aa9279bc039927a8bbc679e2ad
---
A scap/scap.cfg
A scap/wdqs
2 files changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/deploy 
refs/changes/89/295389/1

diff --git a/scap/scap.cfg b/scap/scap.cfg
new file mode 100644
index 000..6acf976
--- /dev/null
+++ b/scap/scap.cfg
@@ -0,0 +1,14 @@
+[global]
+git_repo: wikidata/query/deploy
+git_deploy_dir: /srv/deployment/wdqs/wdqs
+git_submodules: True
+git_fat: True
+service_port: 
+service_name: wdqs-blazegraph
+dsh_targets: wdqs
+
+[wmflabs]
+git_server: deployment-bastion.deployment-prep.eqiad.wmflabs
+
+[wmnet]
+git_server: tin.eqiad.wmnet
diff --git a/scap/wdqs b/scap/wdqs
new file mode 100644
index 000..353bfac
--- /dev/null
+++ b/scap/wdqs
@@ -0,0 +1,2 @@
+wdqs1001.eqiad.wmnet
+wdqs1002.eqiad.wmnet

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb3411b6a76963aa9279bc039927a8bbc679e2ad
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/deploy
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] add option to XML dump stubs of page ranges with explicit re... - change (mediawiki/core)

2016-06-21 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: add option to XML dump stubs of page ranges with explicit 
rev_id ordering
..

add option to XML dump stubs of page ranges with explicit rev_id ordering

[WIP] utterly untested.

Change-Id: I94ca4a06235bdbed384bb997deb7432bb5aaa5b9
---
M includes/export/WikiExporter.php
M maintenance/backup.inc
M maintenance/dumpBackup.php
3 files changed, 15 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/87/295387/1

diff --git a/includes/export/WikiExporter.php b/includes/export/WikiExporter.php
index 54de26d..1da05bc 100644
--- a/includes/export/WikiExporter.php
+++ b/includes/export/WikiExporter.php
@@ -134,13 +134,14 @@
 * @param int $start Inclusive lower limit (this id is included)
 * @param int $end Exclusive upper limit (this id is not included)
 *   If 0, no upper limit.
+* @param bool $orderRevs order revisions within pages in ascending 
order
 */
-   public function pagesByRange( $start, $end ) {
+   public function pagesByRange( $start, $end, $orderRevs ) {
$condition = 'page_id >= ' . intval( $start );
if ( $end ) {
$condition .= ' AND page_id < ' . intval( $end );
}
-   $this->dumpFrom( $condition );
+   $this->dumpFrom( $condition, $orderRevs );
}
 
/**
@@ -245,7 +246,7 @@
 * @throws MWException
 * @throws Exception
 */
-   protected function dumpFrom( $cond = '' ) {
+   protected function dumpFrom( $cond = '', $orderRevs = false ) {
# For logging dumps...
if ( $this->history & self::LOGS ) {
$where = [ 'user_id = log_user' ];
@@ -333,6 +334,12 @@
} elseif ( $this->history & WikiExporter::FULL ) {
# Full history dumps...
$join['revision'] = [ 'INNER JOIN', 
'page_id=rev_page' ];
+   # query optimization for history stub dumps
+   if ( $this->text == WikiExporter::STUB && 
$orderRevs ) {
+   $opts[] = 'STRAIGHT_JOIN';
+   $opts['ORDER BY'] = [ 'rev_page ASC', 
'rev_id ASC' ];
+   $opts['USE INDEX']['page'] = 'PRIMARY';
+   }
} elseif ( $this->history & WikiExporter::CURRENT ) {
# Latest revision dumps...
if ( $this->list_authors && $cond != '' ) { // 
List authors, if so desired
@@ -369,7 +376,6 @@
if ( $this->buffer == WikiExporter::STREAM ) {
$prev = $this->db->bufferResults( false );
}
-
$result = null; // Assuring $result is not undefined, 
if exception occurs early
try {
Hooks::run( 'ModifyExportQuery',
diff --git a/maintenance/backup.inc b/maintenance/backup.inc
index 3271fd6..db3af92 100644
--- a/maintenance/backup.inc
+++ b/maintenance/backup.inc
@@ -41,6 +41,7 @@
public $revEndId = 0;
public $dumpUploads = false;
public $dumpUploadFileContents = false;
+   public $orderRevs = false;
 
protected $reportingInterval = 100;
protected $pageCount = 0;
@@ -271,7 +272,7 @@
} elseif ( is_null( $this->pages ) ) {
# Page dumps: all or by page ID range
if ( $this->startId || $this->endId ) {
-   $exporter->pagesByRange( $this->startId, 
$this->endId );
+   $exporter->pagesByRange( $this->startId, 
$this->endId, $this->orderRevs );
} elseif ( $this->revStartId || $this->revEndId ) {
$exporter->revsByRange( $this->revStartId, 
$this->revEndId );
} else {
diff --git a/maintenance/dumpBackup.php b/maintenance/dumpBackup.php
index d4255a0..60ee99d 100644
--- a/maintenance/dumpBackup.php
+++ b/maintenance/dumpBackup.php
@@ -50,6 +50,8 @@
$this->addOption( 'stable', 'Dump stable versions of pages' );
$this->addOption( 'revrange', 'Dump range of revisions 
specified by revstart and ' .
'revend parameters' );
+   $this->addOption( 'orderrevs', 'Dump revisions in ascending 
revision order ' .
+   '(implies dump of a range of pages)');
$this->addOption( 'pagelist',
'Dump only pages included in the file', false, true );
// Options
@@ -127,6 +129,7 @@
  

[MediaWiki-commits] [Gerrit] Cast width, height, page to int as paranoia measure - change (mediawiki...PdfHandler)

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

Change subject: Cast width, height, page to int as paranoia measure
..


Cast width, height, page to int as paranoia measure

Everything is properly escaped so it doesn't matter, but as an
extra bit of safety, cast width/height/page to int, in order to
ensure under no circumstances would something unexpected be fed
to ghostscript.

Change-Id: I961a3dae5801dd116e1cb6c93808d49268d1e81e
---
M PdfHandler_body.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/PdfHandler_body.php b/PdfHandler_body.php
index 36a52dd..9ee2fab 100644
--- a/PdfHandler_body.php
+++ b/PdfHandler_body.php
@@ -160,9 +160,9 @@
return new TransformParameterError( $params );
}
 
-   $width = $params['width'];
-   $height = $params['height'];
-   $page = $params['page'];
+   $width = (int)$params['width'];
+   $height = (int)$params['height'];
+   $page = (int)$params['page'];
 
if ( $page > $this->pageCount( $image ) ) {
return $this->doThumbError( $width, $height, 
'pdf_page_error' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I961a3dae5801dd116e1cb6c93808d49268d1e81e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PdfHandler
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Dpatrick 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Wrap table-cell buttons in table-row - change (mediawiki...Echo)

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

Change subject: Wrap table-cell buttons in table-row
..


Wrap table-cell buttons in table-row

Removes unwanted 2px bottom margin from footer buttons.

Change-Id: I67c1d5f21d7c62a436010932e3d7b6257e4b73ff
---
M modules/styles/mw.echo.ui.NotificationBadgeWidget.less
1 file changed, 25 insertions(+), 21 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.NotificationBadgeWidget.less 
b/modules/styles/mw.echo.ui.NotificationBadgeWidget.less
index 9de6b64..1865673 100644
--- a/modules/styles/mw.echo.ui.NotificationBadgeWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationBadgeWidget.less
@@ -61,30 +61,34 @@
display: block;
}
 
-   
.mw-echo-ui-notificationBadgeButtonPopupWidget-footer-buttons 
.oo-ui-buttonElement {
-   display: table-cell;
-   white-space: normal;
-   font-weight: bold;
-   width: @notification-popup-width / 2;
-   box-sizing: border-box;
+   
.mw-echo-ui-notificationBadgeButtonPopupWidget-footer-buttons {
+   display: table-row;
 
-   &:last-child {
-   border-left: 1px solid #DD;
-   }
+   .oo-ui-buttonElement {
+   display: table-cell;
+   white-space: normal;
+   font-weight: bold;
+   width: 
@notification-popup-width / 2;
+   box-sizing: border-box;
 
-   > .oo-ui-buttonElement-button {
-   display: block;
-   line-height: 2.6em;
-   margin: 0;
-   border: 0;
-   padding: 0.5em;
+   &:last-child {
+   border-left: 1px solid 
#DD;
+   }
 
-   .oo-ui-iconElement-icon {
-   // HACK: these are 
absolutely positioned in OOUI, and our line-height: 4em;
-   // rule breaks that.
-   // FIXME: We should 
really use a different widget here
-   position: static;
-   opacity: @opacity-mid;
+   > .oo-ui-buttonElement-button {
+   display: block;
+   line-height: 2.6em;
+   margin: 0;
+   border: 0;
+   padding: 0.5em;
+
+   .oo-ui-iconElement-icon 
{
+   // HACK: these 
are absolutely positioned in OOUI, and our line-height: 4em;
+   // rule breaks 
that.
+   // FIXME: We 
should really use a different widget here
+   position: 
static;
+   opacity: 
@opacity-mid;
+   }
}
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67c1d5f21d7c62a436010932e3d7b6257e4b73ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Another refactoring fix - change (mediawiki...SemanticForms)

2016-06-21 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Another refactoring fix
..


Another refactoring fix

Change-Id: Id4026d401ba7546c3e6e557f26653bdeeb86c390
---
M includes/SF_FormField.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/SF_FormField.php b/includes/SF_FormField.php
index b1f5ed6..b83157f 100644
--- a/includes/SF_FormField.php
+++ b/includes/SF_FormField.php
@@ -441,9 +441,9 @@
// this should be replaced with 
an input type neutral way of
// figuring out if this scalar 
input type is a list
if ( $this->mInputType == 
"tokens" ) {
-   $is_list = true;
+   $this->mIsList = true;
}
-   if ( $is_list ) {
+   if ( $this->mIsList ) {
$cur_values = 
array_map( 'trim', explode( $delimiter, $field_query_val ) );
foreach ( $cur_values 
as $key => $val ) {

$cur_values[$key] = $this->labelToValue( $val );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id4026d401ba7546c3e6e557f26653bdeeb86c390
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Another refactoring fix - change (mediawiki...SemanticForms)

2016-06-21 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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

Change subject: Another refactoring fix
..

Another refactoring fix

Change-Id: Id4026d401ba7546c3e6e557f26653bdeeb86c390
---
M includes/SF_FormField.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms 
refs/changes/86/295386/1

diff --git a/includes/SF_FormField.php b/includes/SF_FormField.php
index b1f5ed6..b83157f 100644
--- a/includes/SF_FormField.php
+++ b/includes/SF_FormField.php
@@ -441,9 +441,9 @@
// this should be replaced with 
an input type neutral way of
// figuring out if this scalar 
input type is a list
if ( $this->mInputType == 
"tokens" ) {
-   $is_list = true;
+   $this->mIsList = true;
}
-   if ( $is_list ) {
+   if ( $this->mIsList ) {
$cur_values = 
array_map( 'trim', explode( $delimiter, $field_query_val ) );
foreach ( $cur_values 
as $key => $val ) {

$cur_values[$key] = $this->labelToValue( $val );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4026d401ba7546c3e6e557f26653bdeeb86c390
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] Fixup qrcode-generating js, to stop race condition. - change (mediawiki...OATHAuth)

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

Change subject: Fixup qrcode-generating js, to stop race condition.
..


Fixup qrcode-generating js, to stop race condition.

Previously there was a race condition where the qrcode would
not show if the startup module finished loading prior to the
div that should contain the qrcode being loaded. This quite
commonly happened on wikipedia during a hit where js is cached
(But does not happen locally, my theory is that that is due to
how packets get split over the network but not from localhost).

Change it to use a normal RL module, as that seems best practise.
Also do not load the qrcode js on special pages that do not use it.
Finially, remove position:top as its not needed.

Bug: T136988
Change-Id: I5139f07203d834bdc979b21c1fc94f242ac2
---
M extension.json
A modules/ext.oath.showqrcode.js
M special/SpecialOATHDisable.php
M special/SpecialOATHEnable.php
M special/SpecialOATHLogin.php
5 files changed, 30 insertions(+), 20 deletions(-)

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



diff --git a/extension.json b/extension.json
index f4081c9..242b2c8 100644
--- a/extension.json
+++ b/extension.json
@@ -51,14 +51,21 @@
"ResourceModules": {
"ext.oathauth": {
"scripts": [
-   "modules/jquery.qrcode.js",
-   "modules/qrcode.js"
+   "jquery.qrcode.js",
+   "qrcode.js"
+   ]
+   },
+   "ext.oath.showqrcode": {
+   "scripts": [
+   "ext.oath.showqrcode.js"
],
-   "position": "top"
+   "dependencies": [
+   "ext.oathauth"
+   ]
}
},
"ResourceFileModulePaths": {
-   "localBasePath": "",
+   "localBasePath": "modules",
"remoteExtPath": "OATHAuth"
},
"SpecialPages": {
diff --git a/modules/ext.oath.showqrcode.js b/modules/ext.oath.showqrcode.js
new file mode 100644
index 000..9c7d2b5
--- /dev/null
+++ b/modules/ext.oath.showqrcode.js
@@ -0,0 +1,6 @@
+(function ( $ ) {
+   $( function () {
+   var $elm = $( '.mw-display-qrcode' );
+   $elm.qrcode( $elm.data( 'mw-qrcode-url' ) );
+   } );
+} )( jQuery );
diff --git a/special/SpecialOATHDisable.php b/special/SpecialOATHDisable.php
index aa7160f..3ae265c 100644
--- a/special/SpecialOATHDisable.php
+++ b/special/SpecialOATHDisable.php
@@ -37,7 +37,6 @@
$form->setMessagePrefix( 'oathauth' );
$form->setWrapperLegend( false );
$form->getOutput()->setPagetitle( $this->msg( 
'oathauth-disable' ) );
-   $form->getOutput()->addModules( 'ext.oathauth' );
}
 
/**
diff --git a/special/SpecialOATHEnable.php b/special/SpecialOATHEnable.php
index 7e4a46a..49439e7 100644
--- a/special/SpecialOATHEnable.php
+++ b/special/SpecialOATHEnable.php
@@ -38,7 +38,7 @@
$form->setMessagePrefix( 'oathauth' );
$form->setWrapperLegend( false );
$form->getOutput()->setPagetitle( $this->msg( 'oathauth-enable' 
) );
-   $form->getOutput()->addModules( 'ext.oathauth' );
+   $form->getOutput()->addModules( 'ext.oath.showqrcode' );
}
 
/**
@@ -80,19 +80,18 @@
}
 
$secret = $key->getSecret();
+   $qrcodeUrl = "otpauth://totp/"
+   . rawurlencode( $this->OATHUser->getAccount() )
+   . "?secret="
+   . rawurlencode( $secret );
 
-   $this->getOutput()->addHTML( ResourceLoader::makeInlineScript(
-   Xml::encodeJsCall( 'mw.loader.using', array(
-   array( 'ext.oathauth' ),
-   new XmlJsCode(
-   'function () {'
-   . '$("#qrcode").qrcode("otpauth://totp/'
-   . rawurlencode( 
$this->OATHUser->getAccount() )
-   . '?secret=' . $secret . '");'
-   . '}'
-   )
-   ) )
-   ) );
+   $qrcodeElement = Html::element( 'div', [
+   'data-mw-qrcode-url' => $qrcodeUrl,
+   'class' => 'mw-display-qrcode',
+   // Include width/height, so js won't re-arrange layout
+   // OTOH, this will cause non-js browsers to see a big 
empty space.
+   'style' => 'width: 256px; height: 256px;'
+   ] 

[MediaWiki-commits] [Gerrit] stream.wm.o: drop all DNS TTLs to 5m - change (operations/dns)

2016-06-21 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: stream.wm.o: drop all DNS TTLs to 5m
..


stream.wm.o: drop all DNS TTLs to 5m

Transition coming in 2 days, this drops all related TTLs from 1
hour to 5 mins.  Hopefully nobody's directly using the
stream-lb.eqiad hostname (it probably never should have existed),
we'll find out post-transition...

Bug: T134871

Change-Id: I7b013ad231e18734bba96573065ef068aec13dff
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
3 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index fab8bd5..0b18c0f 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -243,7 +243,7 @@
 $ORIGIN 3.0.0.0.0.0.0.0.0.0.0.0.a.1.d.e.{{ zonename }}.
 
 d.0.0.0 1H IN PTR   misc-web-lb.eqiad.wikimedia.org.
-5.1.0.0 1H IN PTR   stream-lb.eqiad.wikimedia.org.
+5.1.0.0300 IN PTR   stream-lb.eqiad.wikimedia.org.
 6.1.0.0 1H IN PTR   git-ssh.eqiad.wikimedia.org.
 e.f.0.0 1H IN PTR   dns-rec-lb.eqiad.wikimedia.org.
 
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index c72b993..ea7d2fc 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -188,6 +188,6 @@
 
 ; - - 208.80.154.248/29 (248-255) LVS Misc
 
-249 1H  IN PTR  stream-lb.eqiad.wikimedia.org.
+249 300 IN PTR  stream-lb.eqiad.wikimedia.org.
 250 1H  IN PTR  git-ssh.eqiad.wikimedia.org.
 251 1H  IN PTR  misc-web-lb.eqiad.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 4ed90c9..78dcb1d 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -233,8 +233,8 @@
 
 geoiplookup-lb.eqiad600 IN DYNA geoip!geoiplookup-addrs/eqiad
 
-stream-lb.eqiad 1H  IN A208.80.154.249
-1H  IN  2620:0:861:ed1a::3:15
+stream-lb.eqiad 300  IN A208.80.154.249
+300  IN  2620:0:861:ed1a::3:15
 
 ; These legacy entries should eventually move to RESTBase
 cxserver600 IN DYNA geoip!text-addrs
@@ -527,7 +527,7 @@
 
 secure  600 IN DYNA geoip!text-addrs
 
-stream  1H  IN CNAMEstream-lb.eqiad
+stream  300 IN CNAMEstream-lb.eqiad
 
 svn 600 IN DYNA geoip!text-addrs
 

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

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

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


[MediaWiki-commits] [Gerrit] stream.wm.o: drop all DNS TTLs to 5m - change (operations/dns)

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

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

Change subject: stream.wm.o: drop all DNS TTLs to 5m
..

stream.wm.o: drop all DNS TTLs to 5m

Transition coming in 2 days, this drops all related TTLs from 1
hour to 5 mins.  Hopefully nobody's directly using the
stream-lb.eqiad hostname (it probably never should have existed),
we'll find out post-transition...

Bug: T134871

Change-Id: I7b013ad231e18734bba96573065ef068aec13dff
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
3 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/84/295384/1

diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index fab8bd5..0b18c0f 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -243,7 +243,7 @@
 $ORIGIN 3.0.0.0.0.0.0.0.0.0.0.0.a.1.d.e.{{ zonename }}.
 
 d.0.0.0 1H IN PTR   misc-web-lb.eqiad.wikimedia.org.
-5.1.0.0 1H IN PTR   stream-lb.eqiad.wikimedia.org.
+5.1.0.0300 IN PTR   stream-lb.eqiad.wikimedia.org.
 6.1.0.0 1H IN PTR   git-ssh.eqiad.wikimedia.org.
 e.f.0.0 1H IN PTR   dns-rec-lb.eqiad.wikimedia.org.
 
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index c72b993..ea7d2fc 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -188,6 +188,6 @@
 
 ; - - 208.80.154.248/29 (248-255) LVS Misc
 
-249 1H  IN PTR  stream-lb.eqiad.wikimedia.org.
+249 300 IN PTR  stream-lb.eqiad.wikimedia.org.
 250 1H  IN PTR  git-ssh.eqiad.wikimedia.org.
 251 1H  IN PTR  misc-web-lb.eqiad.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 4ed90c9..78dcb1d 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -233,8 +233,8 @@
 
 geoiplookup-lb.eqiad600 IN DYNA geoip!geoiplookup-addrs/eqiad
 
-stream-lb.eqiad 1H  IN A208.80.154.249
-1H  IN  2620:0:861:ed1a::3:15
+stream-lb.eqiad 300  IN A208.80.154.249
+300  IN  2620:0:861:ed1a::3:15
 
 ; These legacy entries should eventually move to RESTBase
 cxserver600 IN DYNA geoip!text-addrs
@@ -527,7 +527,7 @@
 
 secure  600 IN DYNA geoip!text-addrs
 
-stream  1H  IN CNAMEstream-lb.eqiad
+stream  300 IN CNAMEstream-lb.eqiad
 
 svn 600 IN DYNA geoip!text-addrs
 

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

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

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


[MediaWiki-commits] [Gerrit] stream.wm.o: move to cache_misc in DNS - change (operations/dns)

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

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

Change subject: stream.wm.o: move to cache_misc in DNS
..

stream.wm.o: move to cache_misc in DNS

Do not deploy before June 23

Bug: T134871
Change-Id: Ie1a87e668cae73bb862de4c29b0b235a544e2408
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
3 files changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/85/295385/1

diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 0b18c0f..df440dd 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -243,7 +243,6 @@
 $ORIGIN 3.0.0.0.0.0.0.0.0.0.0.0.a.1.d.e.{{ zonename }}.
 
 d.0.0.0 1H IN PTR   misc-web-lb.eqiad.wikimedia.org.
-5.1.0.0300 IN PTR   stream-lb.eqiad.wikimedia.org.
 6.1.0.0 1H IN PTR   git-ssh.eqiad.wikimedia.org.
 e.f.0.0 1H IN PTR   dns-rec-lb.eqiad.wikimedia.org.
 
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index ea7d2fc..8f612d0 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -188,6 +188,5 @@
 
 ; - - 208.80.154.248/29 (248-255) LVS Misc
 
-249 300 IN PTR  stream-lb.eqiad.wikimedia.org.
 250 1H  IN PTR  git-ssh.eqiad.wikimedia.org.
 251 1H  IN PTR  misc-web-lb.eqiad.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 78dcb1d..9c9fb16 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -233,8 +233,9 @@
 
 geoiplookup-lb.eqiad600 IN DYNA geoip!geoiplookup-addrs/eqiad
 
-stream-lb.eqiad 300  IN A208.80.154.249
-300  IN  2620:0:861:ed1a::3:15
+; probably can be removed, shouldn't have been publicly used.
+; Check post-transition (can't tell before due to CNAME).
+stream-lb.eqiad 600 IN DYNA geoip!misc-addrs
 
 ; These legacy entries should eventually move to RESTBase
 cxserver600 IN DYNA geoip!text-addrs
@@ -527,7 +528,7 @@
 
 secure  600 IN DYNA geoip!text-addrs
 
-stream  300 IN CNAMEstream-lb.eqiad
+stream  600 IN DYNA geoip!misc-addrs
 
 svn 600 IN DYNA geoip!text-addrs
 

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

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

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


[MediaWiki-commits] [Gerrit] Update build instructions for MacOS X. - change (openzim)

2016-06-21 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Update build instructions for MacOS X.
..

Update build instructions for MacOS X.

Change-Id: I0190ada3bf02c42ed34cb6d253516a9c662357e1
---
M zimlib/README.md
M zimwriterfs/README.md
2 files changed, 31 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/openzim refs/changes/82/295382/1

diff --git a/zimlib/README.md b/zimlib/README.md
index ce35ed9..9aef82c 100644
--- a/zimlib/README.md
+++ b/zimlib/README.md
@@ -16,5 +16,24 @@
 make
 ```
 
+OSX compilation
+---
+On MacOSX, you'll need to install some packages from
+[homebrew](http://brew.sh/):
+```
+brew update
+brew install xz libmagic
+```
+You'll also want to add `/usr/local/include` to your search path,
+for example:
+```
+./autogen.sh
+./configure CFLAGS=-I/usr/local/include CXXFLAGS=-I/usr/local/include
+make
+```
+
+License
+---
+
 The `zimlib` library is released under the GPLv2 license
 terms.
diff --git a/zimwriterfs/README.md b/zimwriterfs/README.md
index 8695643..1cbb7dc 100644
--- a/zimwriterfs/README.md
+++ b/zimwriterfs/README.md
@@ -44,9 +44,19 @@
 ```
 
 OSX compilation
-
+---
+OSX builds are similar to Linux, except we use homebrew.  Change to
+`../zimlib` and build zimlib as instructed in the README there.  Then
+return here and:
+```
+brew install gumbo-parser
+./autogen.sh
+./configure CXXFLAGS="-I../zimlib/include -I/usr/local/include" 
LDFLAGS=-L../zimlib/src/.libs
+make
+```
 
-On MaxOSX, a script helps you build zimwriterfs both statically and 
dynamically.
+Alternatively, there is a script included here to help you build both
+static and dynamic binaries for `zimwriterfs`.
 You must have a working and set up Kiwix repository (with dependencies ready).
 
 1. Install libmagic with brew (it's important)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0190ada3bf02c42ed34cb6d253516a9c662357e1
Gerrit-PatchSet: 1
Gerrit-Project: openzim
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] Compress blobs and track file size immediately after adding ... - change (openzim)

2016-06-21 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Compress blobs and track file size immediately after adding 
each article.
..

Compress blobs and track file size immediately after adding each article.

Rather than first collecting all the directory entries and only afterwards
writing the blobs, write each cluster on the fly as we see each article.
Keep track of both compressed and uncompressed clusters so that we don't
needlessly terminate compressed clusters just because we happen to have
encountered an uncompressible file.  Account for additions to each of
the various indices as we go so that we maintain a fairly accurate
size for the file at every point, which will allow us to stop adding
articles once the ZIM file gets to a certain size.

Change-Id: Ib644fff4cb804320a07aadbea499c8416df66adc
---
M zimlib/include/zim/writer/zimcreator.h
M zimlib/src/zimcreator.cpp
2 files changed, 124 insertions(+), 86 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/openzim refs/changes/83/295383/1

diff --git a/zimlib/include/zim/writer/zimcreator.h 
b/zimlib/include/zim/writer/zimcreator.h
index 5134d98..4296371 100644
--- a/zimlib/include/zim/writer/zimcreator.h
+++ b/zimlib/include/zim/writer/zimcreator.h
@@ -52,10 +52,10 @@
 CompressionType compression;
 bool isEmpty;
 offset_type clustersSize;
+offset_type currentSize;
 
-void createDirents(ArticleSource& src);
+void createDirents(ArticleSource& src, const std::string& tmpfname);
 void createTitleIndex(ArticleSource& src);
-void createClusters(ArticleSource& src, const std::string& tmpfname);
 void fillHeader(ArticleSource& src);
 void write(const std::string& fname, const std::string& tmpfname);
 
@@ -84,6 +84,10 @@
 void setMinChunkSize(int s)   { minChunkSize = s; }
 
 void create(const std::string& fname, ArticleSource& src);
+
+/* The user can query `currentSize` after each article has been
+ * added to the ZIM file. */
+offset_type getCurrentSize() { return currentSize; }
 };
 
   }
diff --git a/zimlib/src/zimcreator.cpp b/zimlib/src/zimcreator.cpp
index 66ce902..208c050 100644
--- a/zimlib/src/zimcreator.cpp
+++ b/zimlib/src/zimcreator.cpp
@@ -56,28 +56,30 @@
   : minChunkSize(1024-64),
 nextMimeIdx(0),
 #ifdef ENABLE_LZMA
-compression(zimcompLzma)
+compression(zimcompLzma),
 #elif ENABLE_BZIP2
-compression(zimcompBzip2)
+compression(zimcompBzip2),
 #elif ENABLE_ZLIB
-compression(zimcompZip)
+compression(zimcompZip),
 #else
-compression(zimcompNone)
+compression(zimcompNone),
 #endif
+currentSize(0)
 {
 }
 
 ZimCreator::ZimCreator(int& argc, char* argv[])
   : nextMimeIdx(0),
 #ifdef ENABLE_LZMA
-compression(zimcompLzma)
+compression(zimcompLzma),
 #elif ENABLE_BZIP2
-compression(zimcompBzip2)
+compression(zimcompBzip2),
 #elif ENABLE_ZLIB
-compression(zimcompZip)
+compression(zimcompZip),
 #else
-compression(zimcompNone)
+compression(zimcompNone),
 #endif
+currentSize(0)
 {
   Arg minChunkSizeArg(argc, argv, "--min-chunk-size");
   if (minChunkSizeArg.isSet())
@@ -110,15 +112,12 @@
   log_debug("basename " << basename);
 
   INFO("create directory entries");
-  createDirents(src);
+  createDirents(src, basename + ".tmp");
   INFO(dirents.size() << " directory entries created");
 
   INFO("create title index");
   createTitleIndex(src);
   INFO(dirents.size() << " title index created");
-
-  INFO("create clusters");
-  createClusters(src, basename + ".tmp");
   INFO(clusterOffsets.size() << " clusters created");
 
   INFO("fill header");
@@ -132,9 +131,22 @@
   INFO("ready");
 }
 
-void ZimCreator::createDirents(ArticleSource& src)
+void ZimCreator::createDirents(ArticleSource& src, const std::string& 
tmpfname)
 {
   INFO("collect articles");
+  std::ofstream out(tmpfname.c_str());
+  currentSize =
+80 /* for header */ +
+1 /* for mime type table termination */;
+
+  // We keep both a "compressed cluster" and an "uncompressed cluster"
+  // because we don't know which one will fill up first.  We also need
+  // to track the dirents currently in each, so we can fix up the
+  // cluster index if the other one ends up written first.
+  DirentsType compDirents, uncompDirents;
+  Cluster compCluster, uncompCluster;
+  compCluster.setCompression(compression);
+  uncompCluster.setCompression(zimcompNone);
 
   const Article* article;
   while ((article = src.getNextArticle()) != 0)
@@ -163,13 +175,106 @@
 }
 else
 {
+  uint16_t oldMimeIdx = nextMimeIdx;
   

[MediaWiki-commits] [Gerrit] Wrap table-cell buttons in table-row - change (mediawiki...Echo)

2016-06-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Wrap table-cell buttons in table-row
..

Wrap table-cell buttons in table-row

Removes unwanted 2px bottom margin from footer buttons.

Change-Id: I67c1d5f21d7c62a436010932e3d7b6257e4b73ff
---
M modules/styles/mw.echo.ui.NotificationBadgeWidget.less
1 file changed, 25 insertions(+), 21 deletions(-)


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

diff --git a/modules/styles/mw.echo.ui.NotificationBadgeWidget.less 
b/modules/styles/mw.echo.ui.NotificationBadgeWidget.less
index 9de6b64..1865673 100644
--- a/modules/styles/mw.echo.ui.NotificationBadgeWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationBadgeWidget.less
@@ -61,30 +61,34 @@
display: block;
}
 
-   
.mw-echo-ui-notificationBadgeButtonPopupWidget-footer-buttons 
.oo-ui-buttonElement {
-   display: table-cell;
-   white-space: normal;
-   font-weight: bold;
-   width: @notification-popup-width / 2;
-   box-sizing: border-box;
+   
.mw-echo-ui-notificationBadgeButtonPopupWidget-footer-buttons {
+   display: table-row;
 
-   &:last-child {
-   border-left: 1px solid #DD;
-   }
+   .oo-ui-buttonElement {
+   display: table-cell;
+   white-space: normal;
+   font-weight: bold;
+   width: 
@notification-popup-width / 2;
+   box-sizing: border-box;
 
-   > .oo-ui-buttonElement-button {
-   display: block;
-   line-height: 2.6em;
-   margin: 0;
-   border: 0;
-   padding: 0.5em;
+   &:last-child {
+   border-left: 1px solid 
#DD;
+   }
 
-   .oo-ui-iconElement-icon {
-   // HACK: these are 
absolutely positioned in OOUI, and our line-height: 4em;
-   // rule breaks that.
-   // FIXME: We should 
really use a different widget here
-   position: static;
-   opacity: @opacity-mid;
+   > .oo-ui-buttonElement-button {
+   display: block;
+   line-height: 2.6em;
+   margin: 0;
+   border: 0;
+   padding: 0.5em;
+
+   .oo-ui-iconElement-icon 
{
+   // HACK: these 
are absolutely positioned in OOUI, and our line-height: 4em;
+   // rule breaks 
that.
+   // FIXME: We 
should really use a different widget here
+   position: 
static;
+   opacity: 
@opacity-mid;
+   }
}
}
}

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

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

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

[MediaWiki-commits] [Gerrit] Group0 to 1.28.0-wmf.7 - change (operations/mediawiki-config)

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

Change subject: Group0 to 1.28.0-wmf.7
..


Group0 to 1.28.0-wmf.7

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

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



diff --git a/wikiversions.json b/wikiversions.json
index 9e4255b..2779a50 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -478,7 +478,7 @@
 "maiwiki": "php-1.28.0-wmf.6",
 "map_bmswiki": "php-1.28.0-wmf.6",
 "mdfwiki": "php-1.28.0-wmf.6",
-"mediawikiwiki": "php-1.28.0-wmf.6",
+"mediawikiwiki": "php-1.28.0-wmf.7",
 "metawiki": "php-1.28.0-wmf.6",
 "mgwiki": "php-1.28.0-wmf.6",
 "mgwikibooks": "php-1.28.0-wmf.6",
@@ -745,9 +745,9 @@
 "tawikisource": "php-1.28.0-wmf.6",
 "tawiktionary": "php-1.28.0-wmf.6",
 "tenwiki": "php-1.28.0-wmf.6",
-"test2wiki": "php-1.28.0-wmf.6",
-"testwiki": "php-1.28.0-wmf.6",
-"testwikidatawiki": "php-1.28.0-wmf.6",
+"test2wiki": "php-1.28.0-wmf.7",
+"testwiki": "php-1.28.0-wmf.7",
+"testwikidatawiki": "php-1.28.0-wmf.7",
 "tetwiki": "php-1.28.0-wmf.6",
 "tewiki": "php-1.28.0-wmf.6",
 "tewikibooks": "php-1.28.0-wmf.6",
@@ -877,7 +877,7 @@
 "zawikiquote": "php-1.28.0-wmf.6",
 "zawiktionary": "php-1.28.0-wmf.6",
 "zeawiki": "php-1.28.0-wmf.6",
-"zerowiki": "php-1.28.0-wmf.6",
+"zerowiki": "php-1.28.0-wmf.7",
 "zh_classicalwiki": "php-1.28.0-wmf.6",
 "zh_min_nanwiki": "php-1.28.0-wmf.6",
 "zh_min_nanwikibooks": "php-1.28.0-wmf.6",

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

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

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


[MediaWiki-commits] [Gerrit] Group0 to 1.28.0-wmf.7 - change (operations/mediawiki-config)

2016-06-21 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review.

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

Change subject: Group0 to 1.28.0-wmf.7
..

Group0 to 1.28.0-wmf.7

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


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

diff --git a/wikiversions.json b/wikiversions.json
index 9e4255b..2779a50 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -478,7 +478,7 @@
 "maiwiki": "php-1.28.0-wmf.6",
 "map_bmswiki": "php-1.28.0-wmf.6",
 "mdfwiki": "php-1.28.0-wmf.6",
-"mediawikiwiki": "php-1.28.0-wmf.6",
+"mediawikiwiki": "php-1.28.0-wmf.7",
 "metawiki": "php-1.28.0-wmf.6",
 "mgwiki": "php-1.28.0-wmf.6",
 "mgwikibooks": "php-1.28.0-wmf.6",
@@ -745,9 +745,9 @@
 "tawikisource": "php-1.28.0-wmf.6",
 "tawiktionary": "php-1.28.0-wmf.6",
 "tenwiki": "php-1.28.0-wmf.6",
-"test2wiki": "php-1.28.0-wmf.6",
-"testwiki": "php-1.28.0-wmf.6",
-"testwikidatawiki": "php-1.28.0-wmf.6",
+"test2wiki": "php-1.28.0-wmf.7",
+"testwiki": "php-1.28.0-wmf.7",
+"testwikidatawiki": "php-1.28.0-wmf.7",
 "tetwiki": "php-1.28.0-wmf.6",
 "tewiki": "php-1.28.0-wmf.6",
 "tewikibooks": "php-1.28.0-wmf.6",
@@ -877,7 +877,7 @@
 "zawikiquote": "php-1.28.0-wmf.6",
 "zawiktionary": "php-1.28.0-wmf.6",
 "zeawiki": "php-1.28.0-wmf.6",
-"zerowiki": "php-1.28.0-wmf.6",
+"zerowiki": "php-1.28.0-wmf.7",
 "zh_classicalwiki": "php-1.28.0-wmf.6",
 "zh_min_nanwiki": "php-1.28.0-wmf.6",
 "zh_min_nanwikibooks": "php-1.28.0-wmf.6",

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

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

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


[MediaWiki-commits] [Gerrit] Change mark as read buttons to circles - change (mediawiki...Echo)

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

Change subject: Change mark as read buttons to circles
..


Change mark as read buttons to circles

Allow for mark read and mark unread through the side button, and
change its style according to spec in the ticket.

Bug: T126214
Change-Id: I78a93c0545bbe2d7c11a0c62557cd2e97e9d3866
---
M Resources.php
M modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
M modules/styles/mw.echo.ui.NotificationItemWidget.less
A modules/styles/mw.echo.ui.ToggleReadCircleButtonWidget.less
M modules/ui/mw.echo.ui.NotificationItemWidget.js
A modules/ui/mw.echo.ui.ToggleReadCircleButtonWidget.js
6 files changed, 112 insertions(+), 28 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index e815aea..73b6ed9 100644
--- a/Resources.php
+++ b/Resources.php
@@ -70,6 +70,7 @@
'ui/mw.echo.ui.SubGroupListWidget.js',
'ui/mw.echo.ui.NotificationsListWidget.js',
'ui/mw.echo.ui.PlaceholderItemWidget.js',
+   'ui/mw.echo.ui.ToggleReadCircleButtonWidget.js',
'ui/mw.echo.ui.NotificationItemWidget.js',
'ui/mw.echo.ui.SingleNotificationItemWidget.js',
'ui/mw.echo.ui.CrossWikiNotificationItemWidget.js',
@@ -84,6 +85,7 @@
'styles/mw.echo.ui.overlay.less',
'styles/mw.echo.ui.icons.less',
'styles/mw.echo.ui.NotificationItemWidget.less',
+   'styles/mw.echo.ui.ToggleReadCircleButtonWidget.less',

'styles/mw.echo.ui.CrossWikiNotificationItemWidget.less',
'styles/mw.echo.ui.NotificationsListWidget.less',
'styles/mw.echo.ui.PlaceholderItemWidget.less',
diff --git a/modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less 
b/modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
index 8a95a59..1df2153 100644
--- a/modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
+++ b/modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
@@ -6,6 +6,9 @@
padding-right: 0;
padding-bottom: 0;
 
+   // This is an abbreviation for the pieces that make up
+   // the face of the cross-wiki notification item
+   // without the inner group items
> .mw-echo-ui-notificationItemWidget {
// Compensate for the 0.8em of left/right padding and 0.5em of 
bottom padding that we removed
&-icon {
@@ -20,9 +23,14 @@
// 0.8em from ItemWidget, plus 0.8em
padding-left: 1.6em;
padding-right: 0.8em;
+
+   .mw-echo-ui-notificationItemWidget-markAsReadButton {
+   margin-right: -0.8em;
+   }
}
}
 
+
&-separator {
display: block;
position: absolute;
diff --git a/modules/styles/mw.echo.ui.NotificationItemWidget.less 
b/modules/styles/mw.echo.ui.NotificationItemWidget.less
index 82b02ca..983c760 100644
--- a/modules/styles/mw.echo.ui.NotificationItemWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationItemWidget.less
@@ -156,33 +156,24 @@
}
 
&-markAsReadButton {
-   width: 1em;
+   display: table-cell;
+   vertical-align: top;
float: none;
-   padding-top: 0;
}
-
}
}
}
 
&-markAsReadButton {
-   .mw-echo-ui-mixin-hover-opacity;
float: right;
font-size: 1em;
-   margin-top: -0.5em;
-   margin-right: -0.4em;
+   // Compensate for the padding in the item widget
+   margin-top: -0.8em;
+   margin-right: -1em;
padding: 0;
 
-   .mw-echo-ui-notificationItemWidget-bundle & {
-   font-size: 0.8em;
+   .mw-echo-ui-notificationItemWidget-bundled & {
margin-top: 0;
-   }
-
-   .oo-ui-iconElement-icon {
-   // We have to override oojs-i's width/height,
-   // which uses a very specific selector
-   width: 1.7em !important;
-   height: 1.7em !important;
}
}
 
diff --git a/modules/styles/mw.echo.ui.ToggleReadCircleButtonWidget.less 
b/modules/styles/mw.echo.ui.ToggleReadCircleButtonWidget.less
new file mode 100644
index 

[MediaWiki-commits] [Gerrit] WIP: Remove canonical URL from Special:MobileCite - change (mediawiki...MobileFrontend)

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

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

Change subject: WIP: Remove canonical URL from Special:MobileCite
..

WIP: Remove canonical URL from Special:MobileCite

TODO: add tests

* Special:MobileCite is only available on the mobile site
* The page is not being indexed by robots since
  Ifaef5114ff0ae8d6955fb7c09bc561535c622822

Bug: T136617
Change-Id: I65051d198b0916b1968d1a8d2f5a6583ad983461
---
M includes/MobileFrontend.hooks.php
1 file changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 8883d52..79351cd 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -817,14 +817,18 @@
'media' => 'only screen and (max-width: 
' . $lessVars['deviceWidthTablet'] . ')',
'href' => $context->getMobileUrl( 
$desktopUrl ),
];
-   } else {
+   } else if ( !Title::newFromText( strtok( 
$title->getText(), '/' ),
+   $title->getNamespace())->equals( 
SpecialPage::getTitleFor( 'MobileCite' ) )
+   ) {
// add canonical link to mobile pages, instead 
of noindex - bug T91183
$link = [
'rel' => 'canonical',
'href' => $title->getFullUrl(),
];
}
-   $out->addLink( $link );
+   if ( isset( $link ) ) {
+   $out->addLink( $link );
+   }
}
 
// set the vary header to User-Agent, if mobile frontend auto 
detects, if the mobile

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65051d198b0916b1968d1a8d2f5a6583ad983461
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] Install the arc package instead of the puppet module - change (integration/config)

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

Change subject: Install the arc package instead of the puppet module
..


Install the arc package instead of the puppet module

This replaces the git-installed version in puppet with a simple
require_package('arcanist')

Change-Id: I98e034f99b202956c6722433c6a3019df1836728
---
M dib/puppet/ciimage.pp
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/dib/puppet/ciimage.pp b/dib/puppet/ciimage.pp
index a523fcc..daaa770 100644
--- a/dib/puppet/ciimage.pp
+++ b/dib/puppet/ciimage.pp
@@ -29,7 +29,8 @@
 
 include contint::packages::javascript
 include contint::packages::php
-include phabricator::arcanist
+
+require_package('arcanist')
 
 require_package('php5-xhprof')
 exec { 'Enable PHP module xhprof':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98e034f99b202956c6722433c6a3019df1836728
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: 20after4 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] fix puppet-lint warnings. - change (integration/config)

2016-06-21 Thread 20after4 (Code Review)
20after4 has submitted this change and it was merged.

Change subject: fix puppet-lint warnings.
..


fix puppet-lint warnings.

Change-Id: I4b94eca3ca71507ab72c04734b1472c3da4b2e34
---
M dib/puppet/ciimage.pp
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/dib/puppet/ciimage.pp b/dib/puppet/ciimage.pp
index 589cc71..a523fcc 100644
--- a/dib/puppet/ciimage.pp
+++ b/dib/puppet/ciimage.pp
@@ -52,15 +52,16 @@
 # Install from gem
 if os_version('debian >= jessie') {
 package { 'jsduck':
-ensure  => present,
-provider=> 'gem',
-require => [
+ensure   => present,
+provider => 'gem',
+require  => [
 Class['::contint::packages::ruby'],
 Package['build-essential'],
 ],
 }
 }
 
+# allow apache2 execution
 class apache2_allow_execution {
   exec { 'allow apache2 execution':
   command => '/bin/chmod +x /usr/sbin/apache2',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b94eca3ca71507ab72c04734b1472c3da4b2e34
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: 20after4 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Hygiene: Trim comment - change (mediawiki...MobileApp)

2016-06-21 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Hygiene: Trim comment
..

Hygiene: Trim comment

Change-Id: I760c353828a9abaa87c8d10c8d5e60ce86869fa1
---
M MobileApp.php
1 file changed, 0 insertions(+), 4 deletions(-)


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

diff --git a/MobileApp.php b/MobileApp.php
index 5499c86..eadf9e6 100644
--- a/MobileApp.php
+++ b/MobileApp.php
@@ -13,10 +13,6 @@
wfLoadExtension( 'MobileApp' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['MobileApp'] = __DIR__ . '/i18n';
-   /* wfWarn(
-   'Deprecated PHP entry point used for Gadgets extension. Please 
use wfLoadExtension instead, ' .
-   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
 } else {
die( 'This version of the MobileApp extension requires MediaWiki 1.25+' 
);
 }

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

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

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


[MediaWiki-commits] [Gerrit] caches: tcp_notsent_lowat => 128K - change (operations/puppet)

2016-06-21 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: caches: tcp_notsent_lowat => 128K
..


caches: tcp_notsent_lowat => 128K

tested manually on cp1065, no apparent huge negative effects on
system perf (so probably at worst, this is merely ineffective due
to nginx polling/writing strategy, at best it's a nice win for
client perf on average).

Change-Id: I548d86c716aa84ec20c54bbaedfd6de2aff09902
---
M modules/role/manifests/cache/perf.pp
1 file changed, 17 insertions(+), 0 deletions(-)

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



diff --git a/modules/role/manifests/cache/perf.pp 
b/modules/role/manifests/cache/perf.pp
index aeecbd6..219dfba 100644
--- a/modules/role/manifests/cache/perf.pp
+++ b/modules/role/manifests/cache/perf.pp
@@ -68,4 +68,21 @@
 sysctl::parameters { 'tw_reuse':
 values => { 'net.ipv4.tcp_tw_reuse' => 1 },
 }
+
+# tcp_notsent_lowat:
+# Default is -1 (unset).  Setting this changes TCP sockets' writeability
+# behavior.  The default behavior is to keep the socket writeable until the
+# whole socket buffer fills.  With this set, even if there's buffer space,
+# the kernel doesn't notify of writeability (e.g. via epoll()) until the
+# amount of unsent data (as opposed to unacked) in the socket buffer is
+# less than this value.  This reduces local buffer bloat on our server's
+# sending side, which may help with HTTP/2 prioritization.  The magic value
+# for tuning is debateable, but arguably even setting a conservative
+# (higher) value here is better than not setting it all, in almost all
+# cases for any kind of TCP traffic.  ~128K seems to be a common
+# recommendation for something close-ish to optimal for internet-facing
+# things.
+sysctl::parameters { 'tcp_notsent_lowat':
+values => { 'net.ipv4.tcp_notsent_lowat' => 131072 },
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] Install the arc package instead of the puppet module - change (integration/config)

2016-06-21 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review.

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

Change subject: Install the arc package instead of the puppet module
..

Install the arc package instead of the puppet module

This replaces the git-installed version in puppet with a simple
require_package('arcanist')

Change-Id: I98e034f99b202956c6722433c6a3019df1836728
---
M dib/puppet/ciimage.pp
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/77/295377/1

diff --git a/dib/puppet/ciimage.pp b/dib/puppet/ciimage.pp
index a523fcc..daaa770 100644
--- a/dib/puppet/ciimage.pp
+++ b/dib/puppet/ciimage.pp
@@ -29,7 +29,8 @@
 
 include contint::packages::javascript
 include contint::packages::php
-include phabricator::arcanist
+
+require_package('arcanist')
 
 require_package('php5-xhprof')
 exec { 'Enable PHP module xhprof':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I98e034f99b202956c6722433c6a3019df1836728
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: 20after4 

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


[MediaWiki-commits] [Gerrit] caches: tcp_notsent_lowat => 128K - change (operations/puppet)

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

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

Change subject: caches: tcp_notsent_lowat => 128K
..

caches: tcp_notsent_lowat => 128K

tested manually on cp1065, no apparent huge negative effects on
system perf (so probably at worst, this is merely ineffective due
to nginx polling/writing strategy, at best it's a nice win for
client perf on average).

Change-Id: I548d86c716aa84ec20c54bbaedfd6de2aff09902
---
M modules/role/manifests/cache/perf.pp
1 file changed, 17 insertions(+), 0 deletions(-)


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

diff --git a/modules/role/manifests/cache/perf.pp 
b/modules/role/manifests/cache/perf.pp
index aeecbd6..219dfba 100644
--- a/modules/role/manifests/cache/perf.pp
+++ b/modules/role/manifests/cache/perf.pp
@@ -68,4 +68,21 @@
 sysctl::parameters { 'tw_reuse':
 values => { 'net.ipv4.tcp_tw_reuse' => 1 },
 }
+
+# tcp_notsent_lowat:
+# Default is -1 (unset).  Setting this changes TCP sockets' writeability
+# behavior.  The default behavior is to keep the socket writeable until the
+# whole socket buffer fills.  With this set, even if there's buffer space,
+# the kernel doesn't notify of writeability (e.g. via epoll()) until the
+# amount of unsent data (as opposed to unacked) in the socket buffer is
+# less than this value.  This reduces local buffer bloat on our server's
+# sending side, which may help with HTTP/2 prioritization.  The magic value
+# for tuning is debateable, but arguably even setting a conservative
+# (higher) value here is better than not setting it all, in almost all
+# cases for any kind of TCP traffic.  ~128K seems to be a common
+# recommendation for something close-ish to optimal for internet-facing
+# things.
+sysctl::parameters { 'tcp_notsent_lowat':
+values => { 'net.ipv4.tcp_notsent_lowat' => 131072 },
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I548d86c716aa84ec20c54bbaedfd6de2aff09902
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] Update bundled CSS stylesheet - change (apps...wikipedia)

2016-06-21 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Update bundled CSS stylesheet
..

Update bundled CSS stylesheet

Latest changes via make-css-assets.bash.

Change-Id: I29bd4c3fa41721017b7f8b7eefa7b38c25562e0a
---
M app/src/main/assets/styles.css
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/app/src/main/assets/styles.css b/app/src/main/assets/styles.css
index dcc40cb..0b420c8 100644
--- a/app/src/main/assets/styles.css
+++ b/app/src/main/assets/styles.css
@@ -731,8 +731,8 @@
   border-radius: 50%;
   -webkit-transform: scale(0);
   transform: scale(0);
-  -webkit-transition: transform 300ms cubic-bezier(0.25, 0.46, 0.45, 
0.9399);
-  transition: transform 300ms cubic-bezier(0.25, 0.46, 0.45, 
0.9399);
+  -webkit-transition: transform 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
+  transition: transform 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
   /* ease out quad */
 }
 a.edit_section_button.android:active:before {

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

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

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


[MediaWiki-commits] [Gerrit] Add spec entry for aggregated feed endpoint - change (mediawiki...mobileapps)

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

Change subject: Add spec entry for aggregated feed endpoint
..


Add spec entry for aggregated feed endpoint

Change-Id: I2b5c65c2c4137635df68a30bd7210808d193023e
---
M spec.yaml
1 file changed, 57 insertions(+), 0 deletions(-)

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



diff --git a/spec.yaml b/spec.yaml
index 6244cc2..86c1ba9 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -55,6 +55,63 @@
   description: /.+/
   version: /.+/
   home: /.+/
+  # from routes/aggregated.js
+  /{domain}/v1/feed/featured/{}/{mm}/{dd}:
+get:
+  tags:
+- Aggregated feed content for a given date
+  description: Provides aggregated feed content (featured article of the 
day, previous day's most-read articles, news, random article, featured image, 
featured video)
+  produces:
+- application/json
+  parameters:
+- name: 
+  in: path
+  description: "Year the aggregated content is requested for"
+  type: integer
+  required: true
+  minimum: 2016
+  maximum: 2999
+- name: mm
+  in: path
+  description: "Month the aggregated content is requested for"
+  type: integer
+  required: true
+  minimum: 01
+  maximum: 12
+- name: dd
+  in: path
+  description: "Day of the month the aggregated content is requested 
for"
+  type: integer
+  required: true
+  minimum: 01
+  maximum: 31
+  x-amples:
+- title: retrieve aggregated feed content for April 29, 2016
+  request:
+params:
+  : 2016
+  mm: 04
+  dd: 29
+  response:
+status: 200
+headers:
+  content-type: application/json
+body:
+  tfa:
+title: /.+/
+description: /.+/
+extract: /.+/
+thumbnail:
+  source: /.+/
+  width: /.+/
+  height: /.+/
+  mostread:
+date: /.+/
+articles: [ /.+/ ]
+  random: /.+/
+  news: /.+/
+  image: /.+/
+  video: /.+/
   # from routes/featured.js
   /{domain}/v1/page/featured/{}/{mm}/{dd}:
 get:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b5c65c2c4137635df68a30bd7210808d193023e
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update thumbnail property in feed endpoint responses - change (mediawiki...mobileapps)

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

Change subject: Update thumbnail property in feed endpoint responses
..


Update thumbnail property in feed endpoint responses

The feed will need both small, list-item sized images and larger "hero"
images, depending on the card.  In particular, 320px images are too small
for cards with larger images on larger, higher-res phones.

Since a list of four thumb URLs per page item is excessive, I've changed
the output format here as follows:

Feed endpoints return one (1) thumbnail URL per page/item.  This thumbnail
is requested from the MW API at the size of the larger of the thumbnail
sizes used by the two mobile apps for the type of card in question: 640px
for an article feature card, vs. 320px for an article list card.  The
larger size is requested since it's safe to rewrite a thumb URL downward in
size but not necessarily upward.  Clients may accept the thumb URL as
provided or rewrite the size downward as they see fit.

I've also introduced symbols to refer to various image widths in mwapi.js.

Bug: T129079
Change-Id: I4ae8e6bbaeb221872b1bc1d07be92f33002ff606
---
M lib/feed/featured.js
M lib/feed/most-read.js
M lib/mwapi.js
M spec.yaml
M test/features/featured/pagecontent.js
5 files changed, 22 insertions(+), 28 deletions(-)

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



diff --git a/lib/feed/featured.js b/lib/feed/featured.js
index 8219335..9831d90 100644
--- a/lib/feed/featured.js
+++ b/lib/feed/featured.js
@@ -77,9 +77,7 @@
 function buildResponse(pageTitle, extractPageObj) {
 return {
 title: pageTitle,
-thumbnail: extractPageObj.thumbnail
-   && extractPageObj.thumbnail.source
-   && 
mwapi.buildListThumbUrls(extractPageObj.thumbnail.source),
+thumbnail: extractPageObj.thumbnail,
 description: extractPageObj.terms && 
extractPageObj.terms.description[0],
 extract: extractPageObj.extract
 };
diff --git a/lib/feed/most-read.js b/lib/feed/most-read.js
index c5973cd..bb644ce 100644
--- a/lib/feed/most-read.js
+++ b/lib/feed/most-read.js
@@ -75,10 +75,7 @@
 description: entry.terms
  && entry.terms.description
  && entry.terms.description[0],
-thumbnail: entry.thumbnail
- && entry.thumbnail.source
- ? mwapi.buildListThumbUrls(entry.thumbnail.source)
- : undefined,
+thumbnail: entry.thumbnail,
 article: undefined,
 ns: undefined,
 terms: undefined,
diff --git a/lib/mwapi.js b/lib/mwapi.js
index 300d95e..d1588f7 100644
--- a/lib/mwapi.js
+++ b/lib/mwapi.js
@@ -10,8 +10,16 @@
 var HTTPError = sUtil.HTTPError;
 
 var API_QUERY_MAX_TITLES = 50;
-var DEFAULT_LEAD_IMAGE_WIDTH = 1024;
 var DEFAULT_THUMB_WIDTH = 320;
+
+var CARD_THUMB_LIST_ITEM_SIZE = 320;
+var CARD_THUMB_FEATURE_SIZE = 640;
+
+var LEAD_IMAGE_S = 320;
+var LEAD_IMAGE_M = 640;
+var LEAD_IMAGE_L = 800;
+var LEAD_IMAGE_XL = 1024;
+
 var WIDTH_IN_IMAGE_URL_REGEX = /\/(\d+)px-/;
 
 
@@ -69,7 +77,7 @@
 formatversion: 2,
 page: req.params.title,
 prop: 
'languagecount|thumb|image|id|revision|description|lastmodified|normalizedtitle|displaytitle|protection|editable',
-thumbsize: DEFAULT_LEAD_IMAGE_WIDTH
+thumbsize: LEAD_IMAGE_XL
 };
 return api.mwApiGet(app, req.params.domain, query)
 .then(function (response) {
@@ -95,7 +103,7 @@
 sections: 'all',
 sectionprop: 'toclevel|line|anchor',
 noheadings: true,
-thumbsize: DEFAULT_LEAD_IMAGE_WIDTH
+thumbsize: LEAD_IMAGE_XL
 };
 return api.mwApiGet(app, req.params.domain, query)
 .then(function (response) {
@@ -144,7 +152,7 @@
 exsentences: 5, // see T59669 + T117082
 explaintext: true,
 piprop: 'thumbnail',
-pithumbsize: 320,
+pithumbsize: CARD_THUMB_FEATURE_SIZE,
 wbptterms: 'description',
 titles: req.params.title
   };
@@ -159,7 +167,7 @@
 prop: 'pageimages|pageterms',
 piprop: 'thumbnail',
 pilimit: API_QUERY_MAX_TITLES,
-pithumbsize: DEFAULT_THUMB_WIDTH,
+pithumbsize: CARD_THUMB_LIST_ITEM_SIZE,
 wbptterms: 'description',
 meta: 'siteinfo',
 siprop: 'general',
@@ -208,21 +216,14 @@
  * Builds a set of URLs for lead images with different sizes based on common 
bucket widths: 320, 640, 800, 1024.
  */
 function buildLeadImageUrls(initialUrl) {
-return buildImageUrlSet(initialUrl, [ 320, 640, 800, 1024 ]);
-}
-
-/**
- * Builds a set of URLs for small thumbnails suitable for list items.
- */
-function buildListThumbUrls(initialUrl) {
-return buildImageUrlSet(initialUrl, [ 60, 120, 320 ]);
+return 

[MediaWiki-commits] [Gerrit] Optimize mobile static images - change (operations/mediawiki-config)

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

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

Change subject: Optimize mobile static images
..

Optimize mobile static images

Each file was converted to PNG8+alpha with ImageAlpha (https://pngmini.com/)
and had its palette reduced as far as possible without visibly degrading
quality. Then each file was further processed with zopflipng:

   zopflipng --iterations=100 --filters=01234mepb --lossy_transparent

The mean reduction in file size is 76%.

   file before   after   %diff
   ---
   W.png 1115b   1034b -8%
   commons.png   2003b983b-68%
   mediawiki.png31040b   9782b   -104%
   meta.png  6916b   2552b-92%
   wikibooks.png 3403b914b   -115%
   wikidata.png   447b369b-19%
   wikimedia.png 2003b914b-75%
   wikinews.png  4464b   1920b-80%
   wikipedia-wordmark-en.png 2516b956b-90%
   wikiquote.png 2306b   1016b-78%
   wikisource.png6708b   2354b-96%
   wikispecies.png  10291b   3260b   -104%
   wikiversity.png   2082b   1757b-17%
   wikivoyage.png1531b585b-89%
   wiktionary.png9717b   3480b-95%

Change-Id: I8f09e82529da0ce2aa210a2b14ee5ccf0bb52f94
---
M static/images/mobile/W.png
M static/images/mobile/commons.png
M static/images/mobile/mediawiki.png
M static/images/mobile/meta.png
M static/images/mobile/wikibooks.png
M static/images/mobile/wikidata.png
M static/images/mobile/wikimedia.png
M static/images/mobile/wikinews.png
M static/images/mobile/wikipedia-wordmark-en.png
M static/images/mobile/wikiquote.png
M static/images/mobile/wikisource.png
M static/images/mobile/wikispecies.png
M static/images/mobile/wikiversity.png
M static/images/mobile/wikivoyage.png
M static/images/mobile/wiktionary.png
15 files changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/static/images/mobile/W.png b/static/images/mobile/W.png
index c253240..6e89a88 100644
--- a/static/images/mobile/W.png
+++ b/static/images/mobile/W.png
Binary files differ
diff --git a/static/images/mobile/commons.png b/static/images/mobile/commons.png
index 80b5776..be9f7aa 100644
--- a/static/images/mobile/commons.png
+++ b/static/images/mobile/commons.png
Binary files differ
diff --git a/static/images/mobile/mediawiki.png 
b/static/images/mobile/mediawiki.png
index a398c4e..64da935 100644
--- a/static/images/mobile/mediawiki.png
+++ b/static/images/mobile/mediawiki.png
Binary files differ
diff --git a/static/images/mobile/meta.png b/static/images/mobile/meta.png
index 1229122..df5f206 100644
--- a/static/images/mobile/meta.png
+++ b/static/images/mobile/meta.png
Binary files differ
diff --git a/static/images/mobile/wikibooks.png 
b/static/images/mobile/wikibooks.png
index 6c9b8cb..f54c86e 100644
--- a/static/images/mobile/wikibooks.png
+++ b/static/images/mobile/wikibooks.png
Binary files differ
diff --git a/static/images/mobile/wikidata.png 
b/static/images/mobile/wikidata.png
index 4ca38af..c2df49d 100644
--- a/static/images/mobile/wikidata.png
+++ b/static/images/mobile/wikidata.png
Binary files differ
diff --git a/static/images/mobile/wikimedia.png 
b/static/images/mobile/wikimedia.png
index 7eb3745..675e279 100644
--- a/static/images/mobile/wikimedia.png
+++ b/static/images/mobile/wikimedia.png
Binary files differ
diff --git a/static/images/mobile/wikinews.png 
b/static/images/mobile/wikinews.png
index aa56893..320cb66 100644
--- a/static/images/mobile/wikinews.png
+++ b/static/images/mobile/wikinews.png
Binary files differ
diff --git a/static/images/mobile/wikipedia-wordmark-en.png 
b/static/images/mobile/wikipedia-wordmark-en.png
index 22a4c11..27acc03 100644
--- a/static/images/mobile/wikipedia-wordmark-en.png
+++ b/static/images/mobile/wikipedia-wordmark-en.png
Binary files differ
diff --git a/static/images/mobile/wikiquote.png 
b/static/images/mobile/wikiquote.png
index dfe53fa..a24dbfb 100644
--- a/static/images/mobile/wikiquote.png
+++ b/static/images/mobile/wikiquote.png
Binary files differ
diff --git a/static/images/mobile/wikisource.png 
b/static/images/mobile/wikisource.png
index cba8854..3a0e653 100644
--- a/static/images/mobile/wikisource.png
+++ b/static/images/mobile/wikisource.png
Binary files differ
diff --git a/static/images/mobile/wikispecies.png 
b/static/images/mobile/wikispecies.png
index 89d8add..0ae65b2 100644
--- a/static/images/mobile/wikispecies.png
+++ b/static/images/mobile/wikispecies.png
Binary files differ
diff --git a/static/images/mobile/wikiversity.png 
b/static/images/mobile/wikiversity.png
index 49b9138..11aebf8 100644
--- 

[MediaWiki-commits] [Gerrit] Revert "Postgresql: init database with Puppet" - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged.

Change subject: Revert "Postgresql: init database with Puppet"
..


Revert "Postgresql: init database with Puppet"

This reverts commit 230c9fd41dc7536b7a45a01a3641b56ec081a98e.

Change-Id: I00f12c4a9c11ec065fa6378608f95d74d0190083
---
M modules/postgresql/manifests/master.pp
1 file changed, 0 insertions(+), 12 deletions(-)

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



diff --git a/modules/postgresql/manifests/master.pp 
b/modules/postgresql/manifests/master.pp
index 5a273ed..148a67c 100644
--- a/modules/postgresql/manifests/master.pp
+++ b/modules/postgresql/manifests/master.pp
@@ -43,8 +43,6 @@
 $root_dir='/var/lib/postgresql',
 ) {
 
-$data_dir = "${root_dir}/${pgversion}/main"
-
 class { 'postgresql::server':
 ensure=> $ensure,
 pgversion => $pgversion,
@@ -59,15 +57,5 @@
 mode=> '0444',
 content => template('postgresql/master.conf.erb'),
 require => Class['postgresql::server'],
-}
-
-if $ensure == 'present' {
-exec { 'pg-initdb':
-command => "/usr/lib/postgresql/${pgversion}/bin/initdb -D 
${data_dir}",
-user=> 'postgres',
-unless  => "/usr/bin/test -f ${data_dir}/PG_VERSION",
-require => Class['postgresql::server'],
-notify  => Exec['pgreload'],
-}
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00f12c4a9c11ec065fa6378608f95d74d0190083
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gehel 
Gerrit-Reviewer: Gehel 
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 "Postgresql: init database with Puppet" - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has uploaded a new change for review.

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

Change subject: Revert "Postgresql: init database with Puppet"
..

Revert "Postgresql: init database with Puppet"

This reverts commit 230c9fd41dc7536b7a45a01a3641b56ec081a98e.

Change-Id: I00f12c4a9c11ec065fa6378608f95d74d0190083
---
M modules/postgresql/manifests/master.pp
1 file changed, 0 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/295373/1

diff --git a/modules/postgresql/manifests/master.pp 
b/modules/postgresql/manifests/master.pp
index 5a273ed..148a67c 100644
--- a/modules/postgresql/manifests/master.pp
+++ b/modules/postgresql/manifests/master.pp
@@ -43,8 +43,6 @@
 $root_dir='/var/lib/postgresql',
 ) {
 
-$data_dir = "${root_dir}/${pgversion}/main"
-
 class { 'postgresql::server':
 ensure=> $ensure,
 pgversion => $pgversion,
@@ -59,15 +57,5 @@
 mode=> '0444',
 content => template('postgresql/master.conf.erb'),
 require => Class['postgresql::server'],
-}
-
-if $ensure == 'present' {
-exec { 'pg-initdb':
-command => "/usr/lib/postgresql/${pgversion}/bin/initdb -D 
${data_dir}",
-user=> 'postgres',
-unless  => "/usr/bin/test -f ${data_dir}/PG_VERSION",
-require => Class['postgresql::server'],
-notify  => Exec['pgreload'],
-}
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] varnish: burn more cpu/mem on better gzip compression - change (operations/puppet)

2016-06-21 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: varnish: burn more cpu/mem on better gzip compression
..


varnish: burn more cpu/mem on better gzip compression

This raises gzip_level and gzip_memlevel from 6/8 (default) to 8/9.  We have
CPU cycles to waste, and this can slightly reduce cache object storage sizes
and transferred bytes to clients.  Level 8 is what Cloudflare also uses, as 9
doesn't buy much for the potential big bump in CPU waste.  They also use a
hacked zlib that is faster and open source, we could package that if we see a
significant need in the future (e.g. if more applayer leaves compression to
varnish).

Did some preliminary manual testing and everything looks fine.

Will need to salt a runtime change of these parameters via
varnishadm as well, as the diff here only affects the setting for
future daemon restarts.

Change-Id: I305bbe4ac599b6def50691f20fd2da61d7feff05
---
M modules/varnish/templates/initscripts/varnish.systemd.erb
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/varnish/templates/initscripts/varnish.systemd.erb 
b/modules/varnish/templates/initscripts/varnish.systemd.erb
index 9cd8ec3..f43524a 100644
--- a/modules/varnish/templates/initscripts/varnish.systemd.erb
+++ b/modules/varnish/templates/initscripts/varnish.systemd.erb
@@ -40,6 +40,8 @@
 -p listen_depth=4096 -p session_max=20 -p vcc_err_unref=off \
 -p nuke_limit=300 \
 -p http_req_size=24576 \
+-p gzip_level=8 \
+-p gzip_memlevel=9 \
 <%= @runtime_params -%> \
 <%= @extraopts -%> \
 <% if @vcl_config.fetch("enable_geoiplookup", false) -%>-p 
cc_command=${CC_COMMAND}<% end %>

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

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

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


[MediaWiki-commits] [Gerrit] varnish: burn more cpu/mem on better gzip compression - change (operations/puppet)

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

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

Change subject: varnish: burn more cpu/mem on better gzip compression
..

varnish: burn more cpu/mem on better gzip compression

This raises gzip_level and gzip_memlevel from 6/8 (default) to 8/9.  We have
CPU cycles to waste, and this can slightly reduce cache object storage sizes
and transferred bytes to clients.  Level 8 is what Cloudflare also uses, as 9
doesn't buy much for the potential big bump in CPU waste.  They also use a
hacked zlib that is faster and open source, we could package that if we see a
significant need in the future (e.g. if more applayer leaves compression to
varnish).

Did some preliminary manual testing and everything looks fine.

Will need to salt a runtime change of these parameters via
varnishadm as well, as the diff here only affects the setting for
future daemon restarts.

Change-Id: I305bbe4ac599b6def50691f20fd2da61d7feff05
---
M modules/varnish/templates/initscripts/varnish.systemd.erb
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/varnish/templates/initscripts/varnish.systemd.erb 
b/modules/varnish/templates/initscripts/varnish.systemd.erb
index 9cd8ec3..f43524a 100644
--- a/modules/varnish/templates/initscripts/varnish.systemd.erb
+++ b/modules/varnish/templates/initscripts/varnish.systemd.erb
@@ -40,6 +40,8 @@
 -p listen_depth=4096 -p session_max=20 -p vcc_err_unref=off \
 -p nuke_limit=300 \
 -p http_req_size=24576 \
+-p gzip_level=8 \
+-p gzip_memlevel=9 \
 <%= @runtime_params -%> \
 <%= @extraopts -%> \
 <% if @vcl_config.fetch("enable_geoiplookup", false) -%>-p 
cc_command=${CC_COMMAND}<% end %>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I305bbe4ac599b6def50691f20fd2da61d7feff05
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] Postgresql: init database with Puppet - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged.

Change subject: Postgresql: init database with Puppet
..


Postgresql: init database with Puppet

Database is initialized by postgresql package, but if we move the data
directory somewhere else, it needs to be initialized.

Bug: T138092
Change-Id: If7240e6d8ca20b5bbe11a4f411f43d7773433f00
---
M modules/postgresql/manifests/master.pp
1 file changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/modules/postgresql/manifests/master.pp 
b/modules/postgresql/manifests/master.pp
index 148a67c..5a273ed 100644
--- a/modules/postgresql/manifests/master.pp
+++ b/modules/postgresql/manifests/master.pp
@@ -43,6 +43,8 @@
 $root_dir='/var/lib/postgresql',
 ) {
 
+$data_dir = "${root_dir}/${pgversion}/main"
+
 class { 'postgresql::server':
 ensure=> $ensure,
 pgversion => $pgversion,
@@ -58,4 +60,14 @@
 content => template('postgresql/master.conf.erb'),
 require => Class['postgresql::server'],
 }
+
+if $ensure == 'present' {
+exec { 'pg-initdb':
+command => "/usr/lib/postgresql/${pgversion}/bin/initdb -D 
${data_dir}",
+user=> 'postgres',
+unless  => "/usr/bin/test -f ${data_dir}/PG_VERSION",
+require => Class['postgresql::server'],
+notify  => Exec['pgreload'],
+}
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7240e6d8ca20b5bbe11a4f411f43d7773433f00
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gehel 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Version 0.6.1 from ShoutWiki - change (mediawiki...SoftwareVersion)

2016-06-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Version 0.6.1 from ShoutWiki
..


Version 0.6.1 from ShoutWiki

The PHP entry point is no more, use wfLoadExtension( 'SoftwareVersion' ) instead

Change-Id: I1fad3a8586e7506e649c73a5490eaad3c5082581
---
A ShoutWikiSoftwareVersion.class.php
D SoftwareVersion.php
A extension.json
3 files changed, 81 insertions(+), 70 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/ShoutWikiSoftwareVersion.class.php 
b/ShoutWikiSoftwareVersion.class.php
new file mode 100644
index 000..60a6c90
--- /dev/null
+++ b/ShoutWikiSoftwareVersion.class.php
@@ -0,0 +1,61 @@
+
+ * @copyright Copyright © 2009-2016 Jack Phoenix
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
+ */
+
+class ShoutWikiSoftwareVersion {
+
+   /**
+* Adds ShoutWiki component into Special:Version and sets MW's version 
to $wgVersion
+*
+* @param array $software Array of software information
+* @return bool
+*/
+   public static function addShoutWikiInfo( &$software ) {
+   global $wgVersion, $IP;
+
+   // Set MW version to $wgVersion
+   $software['[https://www.mediawiki.org/ MediaWiki]'] = 
$wgVersion;
+
+   // This is ugly, or at least uglier than in the past, because 
it wouldn't
+   // work anymore on my local machine.
+   // First, we do a "svn info $IP", then JSON-encode the result, 
and explode
+   // along newlines and use PHP's array access to access the 
revision number
+   // and last changed date, which will be added to the version 
table.
+   //
+   // Why is this so ugly? Because svn info returns a string, 
instead of a
+   // sane array that we could easily manipulate.
+   //
+   // We also strip out the English words from the svn info 
output, so the
+   // final output that an end-user viewing Special:Version sees 
is something
+   // like "r1811 (2012-05-16 00:31:45 +0300)".
+   if ( !wfIsWindows() ) {
+   $svnInfo = wfShellExec( '/usr/bin/svn info ' . $IP, 
$error );
+   $newline = "\n";
+   } else {
+   // why yes, I'm hardcoding my TortoiseSVN's 
installation path here
+   $svnInfo = wfShellExec( '"C:\Program 
Files\TortoiseSVN\bin\svn.exe" info ' . $IP, $error );
+   $newline = "\r\n";
+   }
+
+   $json = json_encode( $svnInfo );
+   $exploded = explode( $newline, $svnInfo );
+
+   // Add ShoutWiki component (revision number and last changed 
date)
+   $software['[http://www.shoutwiki.com/ ShoutWiki]'] =
+   str_replace( 'Revision: ', 'r', $exploded[6] ) /* 
Revision */ .
+   ' (' .
+   str_replace( 'Last Changed Date: ', '', preg_replace( 
'/ \(.*\)/', '', $exploded[11] ) ) ./* Last Changed Date */
+   ')';
+
+   return true;
+   }
+
+}
\ No newline at end of file
diff --git a/SoftwareVersion.php b/SoftwareVersion.php
deleted file mode 100644
index 6e21fbb..000
--- a/SoftwareVersion.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- * @copyright Copyright © 2009-2010 Jack Phoenix
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die( "This is not a valid entry point.\n" );
-}
-
-// Extension credits that will show up on Special:Version
-$wgExtensionCredits['other'][] = array(
-   'name' => 'SoftwareVersion',
-   'author' => 'Jack Phoenix',
-   'version' => '0.4',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:SoftwareVersion',
-   'description' => 'Customizes [[Special:Version]] for ShoutWiki',
-);
-
-// Our hooked function
-$wgHooks['SoftwareInfo'][] = 'efAddShoutWikiInfo';
-
-/**
- * Adds ShoutWiki component into Special:Version and sets MW's version to 
$wgVersion
- *
- * @param $software Array: array of software information
- * @return Boolean: true
- */
-function efAddShoutWikiInfo( &$software ) {
-   global $wgVersion, $IP;
-
-   // Set MW version to $wgVersion
-   $software['[http://www.mediawiki.org/ MediaWiki]'] = $wgVersion;
-
-   // Add ShoutWiki component (release branch name) and its revision number
-   $software['[http://www.shoutwiki.com/ ShoutWiki]'] = efGetSvnURL( $IP ) 
. ' (r' . SpecialVersion::getSvnRevision( $IP ) . ')';
-
-   return true;
-}
-
-// Gets the name of the release for Special:Version's "ShoutWiki" column
-// Copied from Wikia's SpecialVersion.php and modified
-function efGetSvnURL( $dir ) {
-   // 

[MediaWiki-commits] [Gerrit] Version 0.6.1 from ShoutWiki - change (mediawiki...SoftwareVersion)

2016-06-21 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Version 0.6.1 from ShoutWiki
..

Version 0.6.1 from ShoutWiki

The PHP entry point is no more, use wfLoadExtension( 'SoftwareVersion' ) instead

Change-Id: I1fad3a8586e7506e649c73a5490eaad3c5082581
---
A ShoutWikiSoftwareVersion.class.php
D SoftwareVersion.php
A extension.json
3 files changed, 81 insertions(+), 70 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SoftwareVersion 
refs/changes/71/295371/1

diff --git a/ShoutWikiSoftwareVersion.class.php 
b/ShoutWikiSoftwareVersion.class.php
new file mode 100644
index 000..60a6c90
--- /dev/null
+++ b/ShoutWikiSoftwareVersion.class.php
@@ -0,0 +1,61 @@
+
+ * @copyright Copyright © 2009-2016 Jack Phoenix
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
+ */
+
+class ShoutWikiSoftwareVersion {
+
+   /**
+* Adds ShoutWiki component into Special:Version and sets MW's version 
to $wgVersion
+*
+* @param array $software Array of software information
+* @return bool
+*/
+   public static function addShoutWikiInfo( &$software ) {
+   global $wgVersion, $IP;
+
+   // Set MW version to $wgVersion
+   $software['[https://www.mediawiki.org/ MediaWiki]'] = 
$wgVersion;
+
+   // This is ugly, or at least uglier than in the past, because 
it wouldn't
+   // work anymore on my local machine.
+   // First, we do a "svn info $IP", then JSON-encode the result, 
and explode
+   // along newlines and use PHP's array access to access the 
revision number
+   // and last changed date, which will be added to the version 
table.
+   //
+   // Why is this so ugly? Because svn info returns a string, 
instead of a
+   // sane array that we could easily manipulate.
+   //
+   // We also strip out the English words from the svn info 
output, so the
+   // final output that an end-user viewing Special:Version sees 
is something
+   // like "r1811 (2012-05-16 00:31:45 +0300)".
+   if ( !wfIsWindows() ) {
+   $svnInfo = wfShellExec( '/usr/bin/svn info ' . $IP, 
$error );
+   $newline = "\n";
+   } else {
+   // why yes, I'm hardcoding my TortoiseSVN's 
installation path here
+   $svnInfo = wfShellExec( '"C:\Program 
Files\TortoiseSVN\bin\svn.exe" info ' . $IP, $error );
+   $newline = "\r\n";
+   }
+
+   $json = json_encode( $svnInfo );
+   $exploded = explode( $newline, $svnInfo );
+
+   // Add ShoutWiki component (revision number and last changed 
date)
+   $software['[http://www.shoutwiki.com/ ShoutWiki]'] =
+   str_replace( 'Revision: ', 'r', $exploded[6] ) /* 
Revision */ .
+   ' (' .
+   str_replace( 'Last Changed Date: ', '', preg_replace( 
'/ \(.*\)/', '', $exploded[11] ) ) ./* Last Changed Date */
+   ')';
+
+   return true;
+   }
+
+}
\ No newline at end of file
diff --git a/SoftwareVersion.php b/SoftwareVersion.php
deleted file mode 100644
index 6e21fbb..000
--- a/SoftwareVersion.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- * @copyright Copyright © 2009-2010 Jack Phoenix
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die( "This is not a valid entry point.\n" );
-}
-
-// Extension credits that will show up on Special:Version
-$wgExtensionCredits['other'][] = array(
-   'name' => 'SoftwareVersion',
-   'author' => 'Jack Phoenix',
-   'version' => '0.4',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:SoftwareVersion',
-   'description' => 'Customizes [[Special:Version]] for ShoutWiki',
-);
-
-// Our hooked function
-$wgHooks['SoftwareInfo'][] = 'efAddShoutWikiInfo';
-
-/**
- * Adds ShoutWiki component into Special:Version and sets MW's version to 
$wgVersion
- *
- * @param $software Array: array of software information
- * @return Boolean: true
- */
-function efAddShoutWikiInfo( &$software ) {
-   global $wgVersion, $IP;
-
-   // Set MW version to $wgVersion
-   $software['[http://www.mediawiki.org/ MediaWiki]'] = $wgVersion;
-
-   // Add ShoutWiki component (release branch name) and its revision number
-   $software['[http://www.shoutwiki.com/ ShoutWiki]'] = efGetSvnURL( $IP ) 
. ' (r' . SpecialVersion::getSvnRevision( $IP ) . ')';
-
-   return true;
-}
-
-// Gets the name of the release for Special:Version's "ShoutWiki" column
-// Copied from Wikia's SpecialVersion.php and modified
-function 

[MediaWiki-commits] [Gerrit] Fix math display block formula position - change (mediawiki...latex_renderer)

2016-06-21 Thread Aletundo (Code Review)
Aletundo has uploaded a new change for review.

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

Change subject: Fix math display block formula position
..

Fix math display block formula position

Change-Id: Ic342d91cfe19c76d654ecdbc5274c175099857a4
---
M lib/index.js
1 file changed, 26 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
 refs/changes/70/295370/1

diff --git a/lib/index.js b/lib/index.js
index 5eacdb8..6bd7150 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1263,7 +1263,31 @@
}
return;
}
-   if (display) {
+   /*
+   * Get display attribute and use $$ to center the formula instead of 
equation
+   * environment. 
+   */
+   var displayBlock = 
JSON.parse(node.getAttribute('data-mw')).attrs.display;
+
+   if (displayBlock) {
+   this.format.writeDecorated('$$');
+   } else {
+   this.format.writeDecorated('$');
+   }
+   this.format.writeDecorated(mr.output);
+   if (displayBlock) {
+   this.format.writeDecorated('$$');
+   this.format.envBreak();
+   } else {
+   this.format.writeDecorated('$');
+   this.format.envBreak();
+   }
+
+   /*
+   * The math formula was displayed always on the left.
+   * @param display was undefined.
+   */
+   /*if (display) {
this.format.begin('equation*'); // Suppress equation numbers.
} else {
this.format.writeDecorated('$');
@@ -1274,7 +1298,7 @@
} else {
this.format.writeDecorated('$');
this.format.envBreak();
-   }
+   }*/
 };
 
 Visitor.prototype['visitLANG='] = function(node) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic342d91cfe19c76d654ecdbc5274c175099857a4
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
Gerrit-Branch: master
Gerrit-Owner: Aletundo 

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


[MediaWiki-commits] [Gerrit] Don't reimport existing headers - change (mediawiki...Flow)

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

Change subject: Don't reimport existing headers
..


Don't reimport existing headers

maintenance/FlowRestoreLQT.php will restore LQT board content,
causing new revisions. The DB source store (or even the filebased
source store, should it exist there) would not be able to find
these headers since they won't match the already imported header.

Instead of using the unreliable source store id, let's just use
the already known workflow id...

Bug: T119509
Change-Id: I881910977a8826ca5a389c1eb832844ece4dbb93
---
M includes/Import/Importer.php
M includes/Import/LiquidThreadsApi/Objects.php
2 files changed, 11 insertions(+), 3 deletions(-)

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



diff --git a/includes/Import/Importer.php b/includes/Import/Importer.php
index 8604297..1cff2fa 100644
--- a/includes/Import/Importer.php
+++ b/includes/Import/Importer.php
@@ -640,7 +640,15 @@
return;
}
 
-   $existingId = $pageState->getImportedId( $importHeader );
+   /*
+* We don't need $pageState->getImportedId( $importHeader ) 
here, there
+* can only be 1 header per workflow and we already know the 
workflow,
+* might as well query it from the workflow instead of using 
the id from
+* the source store.
+* reason I prefer not to use source store is that a header 
import is
+* incomplete (it doesn't import full history, just the last 
revision.
+*/
+   $existingId = $pageState->boardWorkflow->getId();
if ( $existingId && $pageState->getTopRevision( 'Header', 
$existingId ) ) {
$pageState->logger->info( 'header previously imported' 
);
return;
diff --git a/includes/Import/LiquidThreadsApi/Objects.php 
b/includes/Import/LiquidThreadsApi/Objects.php
index 0eca7fc..7f92f4c 100644
--- a/includes/Import/LiquidThreadsApi/Objects.php
+++ b/includes/Import/LiquidThreadsApi/Objects.php
@@ -310,7 +310,7 @@
 
 class ImportRevision implements IObjectRevision {
/** @var IImportObject **/
-   protected $parentObject;
+   protected $parent;
 
/** @var array **/
protected $apiResponse;
@@ -420,7 +420,7 @@
 // Represents a revision the script makes on its own behalf, using a script 
user
 class ScriptedImportRevision implements IObjectRevision {
/** @var IImportObject **/
-   protected $parentObject;
+   protected $parent;
 
/** @var User */
protected $destinationScriptUser;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I881910977a8826ca5a389c1eb832844ece4dbb93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adding missing dependency in exposing puppet SSL certs on el... - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has uploaded a new change for review.

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

Change subject: Adding missing dependency in exposing puppet SSL certs on 
elasticsearch
..

Adding missing dependency in exposing puppet SSL certs on elasticsearch

Since those certs are used by nginx and published to /etc/nginx, the nginx
package needs to be installed before exposing the certs.

Bug: T138329
Change-Id: If53eedef7de92b726e6e2697f9e6b8a48341b844
---
M modules/elasticsearch/manifests/https.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/295369/1

diff --git a/modules/elasticsearch/manifests/https.pp 
b/modules/elasticsearch/manifests/https.pp
index bdf673f..1de60f5 100644
--- a/modules/elasticsearch/manifests/https.pp
+++ b/modules/elasticsearch/manifests/https.pp
@@ -31,6 +31,7 @@
 ::base::expose_puppet_certs { '/etc/nginx':
 ensure  => $ensure,
 provide_private => true,
+require => Class['nginx'],
 }
 
 ::nginx::site { 'elasticsearch-ssl-termination':

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

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

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


[MediaWiki-commits] [Gerrit] Update graphoid to 15ed3f4 - change (mediawiki...deploy)

2016-06-21 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Update graphoid to 15ed3f4
..


Update graphoid to 15ed3f4

List of changes:
15ed3f4 Minor cleanup, readme
xxx Update node module dependencies

Change-Id: I8d8d9df855aa206624ea76fb0a4b66ab0448bfe1
---
R node_modules/accepts/LICENSE
R node_modules/accepts/index.js
R node_modules/accepts/node_modules/negotiator/LICENSE
R node_modules/accepts/node_modules/negotiator/index.js
R node_modules/accepts/node_modules/negotiator/lib/charset.js
R node_modules/accepts/node_modules/negotiator/lib/encoding.js
R node_modules/accepts/node_modules/negotiator/lib/language.js
R node_modules/accepts/node_modules/negotiator/lib/mediaType.js
R node_modules/accepts/node_modules/negotiator/package.json
R node_modules/accepts/package.json
M node_modules/bluebird/js/browser/bluebird.core.js
M node_modules/bluebird/js/browser/bluebird.core.min.js
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/release/map.js
M node_modules/bluebird/js/release/promise.js
M node_modules/bluebird/js/release/thenables.js
M node_modules/bluebird/js/release/using.js
M node_modules/bluebird/package.json
M node_modules/body-parser/index.js
M node_modules/body-parser/lib/read.js
M node_modules/body-parser/lib/types/json.js
M node_modules/body-parser/lib/types/raw.js
M node_modules/body-parser/lib/types/text.js
M node_modules/body-parser/lib/types/urlencoded.js
M node_modules/body-parser/node_modules/bytes/index.js
M node_modules/body-parser/node_modules/bytes/package.json
D node_modules/body-parser/node_modules/http-errors/index.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits_browser.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/package.json
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/test.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/LICENSE
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/index.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
D node_modules/body-parser/node_modules/qs/.eslintignore
D node_modules/body-parser/node_modules/qs/.eslintrc
D node_modules/body-parser/node_modules/qs/.npmignore
D node_modules/body-parser/node_modules/qs/.travis.yml
D node_modules/body-parser/node_modules/qs/LICENSE
D node_modules/body-parser/node_modules/qs/bower.json
D node_modules/body-parser/node_modules/qs/component.json
D node_modules/body-parser/node_modules/qs/dist/qs.js
D node_modules/body-parser/node_modules/qs/lib/parse.js
D node_modules/body-parser/node_modules/qs/lib/stringify.js
D node_modules/body-parser/node_modules/qs/lib/utils.js
D node_modules/body-parser/node_modules/qs/package.json
D node_modules/body-parser/node_modules/qs/test/parse.js
D node_modules/body-parser/node_modules/qs/test/stringify.js
M node_modules/body-parser/node_modules/raw-body/LICENSE
M node_modules/body-parser/node_modules/raw-body/index.js
M node_modules/body-parser/node_modules/raw-body/package.json
M node_modules/body-parser/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/wrappy/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/wrappy/test/basic.js
M node_modules/canvas/build/Release/canvas.node
M node_modules/canvas/build/Release/obj.target/canvas.node
M node_modules/canvas/build/Release/obj.target/canvas/src/Canvas.o
M node_modules/canvas/build/Release/obj.target/canvas/src/CanvasGradient.o
M 
node_modules/canvas/build/Release/obj.target/canvas/src/CanvasRenderingContext2d.o
M node_modules/canvas/build/Release/obj.target/canvas/src/Image.o
M node_modules/canvas/build/Release/obj.target/canvas/src/ImageData.o
M node_modules/canvas/package.json
M node_modules/canvas/src/CanvasRenderingContext2d.cc
M node_modules/canvas/src/CanvasRenderingContext2d.h

[MediaWiki-commits] [Gerrit] Updated to latest graph2 lib - change (mediawiki...Graph)

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

Change subject: Updated to latest graph2 lib
..


Updated to latest graph2 lib

Change-Id: Ie52cde6ed480c74b186a45e9959e87782ca72fa7
---
M lib/graph2.compiled.js
1 file changed, 30 insertions(+), 22 deletions(-)

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



diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js
index bfe1214..e46cfcb 100644
--- a/lib/graph2.compiled.js
+++ b/lib/graph2.compiled.js
@@ -112,7 +112,7 @@
 }
 };
 return new RegExp(
-(allowSubdomains ? '^([^@/:]*\.)?(' : '^(') +
+(allowSubdomains ? '^([^@/:]*\\.)?(' : '^(') +
 domains
 .map(function (s) {
 return s.replace('.', '\\.');
@@ -145,18 +145,12 @@
 var self = this;
 self.isTrusted = isTrusted;
 self.domains = domains;
+self.domainMap = domainMap;
 self.logger = logger;
 self.objExtender = objExtender;
 self.parseUrl = parseUrl;
 self.formatUrl = formatUrl;
-
 self.validators = {};
-Object.keys(domains).map(function(protocol) {
-// Only allow subdomains for https & http. Other protocols must be 
exact match.
-self.validators[protocol] = makeValidator(domains[protocol], protocol 
=== 'https' || protocol === 'http');
-});
-
-self.domainMap = domainMap;
 
 load.loader = function (opt, callback) {
 var error = callback || function (e) { throw e; }, url;
@@ -200,19 +194,29 @@
 // First, map the host
 host = (this.domainMap && this.domainMap[host]) || host;
 
-var result = {
-host: host
-};
-
-if (this.validators.https.test(host)) {
-result.protocol = 'https';
-} else if (this.validators.http.test(host)) {
-result.protocol = 'http';
-} else {
-result = undefined;
+if (this.testHost('https', host)) {
+return {host: host, protocol: 'https'};
+} else if (this.testHost('http', host)) {
+return {host: host, protocol: 'http'};
 }
+return undefined;
+};
 
-return result;
+/**
+ * Test host against the list of allowed domains based on the protocol
+ * @param {string} protocol
+ * @param {string} host
+ * @returns {boolean}
+ */
+VegaWrapper.prototype.testHost = function testHost(protocol, host) {
+if (!this.validators[protocol]) {
+if (this.domains[protocol]) {
+this.validators[protocol] = makeValidator(this.domains[protocol], 
protocol === 'https' || protocol === 'http');
+} else {
+return false;
+}
+}
+return this.validators[protocol].test(host);
 };
 
 /**this
@@ -241,7 +245,7 @@
 case 'https':
 if (!this.isTrusted) {
 throw new Error('HTTP and HTTPS protocols are not supported 
for untrusted graphs.\n' +
-'Use wikiraw:, wikiapi:, wikirest:, and wikirawupload: 
protocols.\n' +
+'Use wikiraw:, wikiapi:, wikirest:, wikirawupload:, and 
other protocols.\n' +
 'See 
https://www.mediawiki.org/wiki/Extension:Graph#External_data');
 }
 // keep the original URL
@@ -275,6 +279,7 @@
 // Uses mediawiki api, and extract the content after the request
 // Query value must be a valid MediaWiki title string, but we only 
ensure
 // there is no pipe symbol, the rest is handlered by the api.
+urlParts.pathname = decodeURIComponent(urlParts.pathname)
 if (!/^\/[^|]+$/.test(urlParts.pathname)) {
 throw new Error('wikiraw: invalid title');
 }
@@ -284,7 +289,7 @@
 action: 'query',
 prop: 'revisions',
 rvprop: 'content',
-titles: decodeURIComponent(urlParts.pathname.substring(1))
+titles: urlParts.pathname.substring(1)
 };
 urlParts.pathname = '/w/api.php';
 urlParts.protocol = sanitizedHost.protocol;
@@ -318,6 +323,9 @@
 // Get geo shapes data from OSM database by supplying Wikidata IDs
 // https://maps.wikimedia.org/shape?ids=Q16,Q30
 this._validateExternalService(urlParts, sanitizedHost, opt.url);
+if (!urlParts.query || !urlParts.query.ids) {
+throw new Error('geoshape: missing ids parameter in: ' + 
opt.url);
+}
 // the query object is not modified
 urlParts.pathname = '/shape';
 break;
@@ -339,7 +347,7 @@
 } else {
 urlParts.protocol = sanitizedHost.protocol;
 }
-if (!this.validators[protocol].test(urlParts.host)) {
+if (!this.testHost(protocol, urlParts.host)) {
 throw new Error(protocol + ': URL must either be relative (' + 
protocol + '///...), or use one of the allowed hosts: ' + url);
 }
 };

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] Temporary IP Cap Lift on es.wiki and commons - change (operations/mediawiki-config)

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

Change subject: Temporary IP Cap Lift on es.wiki and commons
..


Temporary IP Cap Lift on es.wiki and commons

Bug: T138322
Change-Id: I5ac38cba6659a7fb5570053f890963ceb30c600c
---
M wmf-config/throttle.php
1 file changed, 21 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 1ba3ff1..e7f3ee6 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -69,6 +69,27 @@
'dbname' => ['eswiki', 'commonswiki'],
'value'  => 40 // 30 expected
 ];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-06-21T13:00 -5:00',
+   'to' => '2016-06-21T16:00 -5:00',
+   'IP' => '186.3.110.63',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 50 // 40 expected
+];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-06-30T13:00 -5:00',
+   'to' => '2016-06-30T16:00 -5:00',
+   'IP' => '186.3.110.63',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 60 // 50 expected
+];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-07-06T13:00 -5:00',
+   'to' => '2016-07-06T16:00 -5:00',
+   'IP' => '181.39.163.9',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 40 // 30 expected
+];
 $wgExtensionFunctions[] = function() {
global $wmgThrottlingExceptions, $wgDBname, $wgRequest;
 

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

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

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


[MediaWiki-commits] [Gerrit] syslog: limit source range to $PRODUCTION_NETWORKS - change (operations/puppet)

2016-06-21 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: syslog: limit source range to $PRODUCTION_NETWORKS
..

syslog: limit source range to $PRODUCTION_NETWORKS

Change-Id: I00aa695d40e341a9f65490c06639ae54d08426b3
---
M modules/role/manifests/syslog/centralserver.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/role/manifests/syslog/centralserver.pp 
b/modules/role/manifests/syslog/centralserver.pp
index 42f99f5..f96aa33 100644
--- a/modules/role/manifests/syslog/centralserver.pp
+++ b/modules/role/manifests/syslog/centralserver.pp
@@ -14,6 +14,7 @@
 proto   => 'udp',
 port=> 514,
 notrack => true,
+srange  => '$PRODUCTION_NETWORKS',
 }
 
 class { 'rsyslog::receiver': }

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

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

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


[MediaWiki-commits] [Gerrit] Update graphoid to 15ed3f4 - change (mediawiki...deploy)

2016-06-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Update graphoid to 15ed3f4
..

Update graphoid to 15ed3f4

List of changes:
15ed3f4 Minor cleanup, readme
xxx Update node module dependencies

Change-Id: I8d8d9df855aa206624ea76fb0a4b66ab0448bfe1
---
R node_modules/accepts/LICENSE
R node_modules/accepts/index.js
R node_modules/accepts/node_modules/negotiator/LICENSE
R node_modules/accepts/node_modules/negotiator/index.js
R node_modules/accepts/node_modules/negotiator/lib/charset.js
R node_modules/accepts/node_modules/negotiator/lib/encoding.js
R node_modules/accepts/node_modules/negotiator/lib/language.js
R node_modules/accepts/node_modules/negotiator/lib/mediaType.js
R node_modules/accepts/node_modules/negotiator/package.json
R node_modules/accepts/package.json
M node_modules/bluebird/js/browser/bluebird.core.js
M node_modules/bluebird/js/browser/bluebird.core.min.js
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/release/map.js
M node_modules/bluebird/js/release/promise.js
M node_modules/bluebird/js/release/thenables.js
M node_modules/bluebird/js/release/using.js
M node_modules/bluebird/package.json
M node_modules/body-parser/index.js
M node_modules/body-parser/lib/read.js
M node_modules/body-parser/lib/types/json.js
M node_modules/body-parser/lib/types/raw.js
M node_modules/body-parser/lib/types/text.js
M node_modules/body-parser/lib/types/urlencoded.js
M node_modules/body-parser/node_modules/bytes/index.js
M node_modules/body-parser/node_modules/bytes/package.json
D node_modules/body-parser/node_modules/http-errors/index.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/inherits_browser.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/package.json
D 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/test.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/LICENSE
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/index.js
D 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
D node_modules/body-parser/node_modules/qs/.eslintignore
D node_modules/body-parser/node_modules/qs/.eslintrc
D node_modules/body-parser/node_modules/qs/.npmignore
D node_modules/body-parser/node_modules/qs/.travis.yml
D node_modules/body-parser/node_modules/qs/LICENSE
D node_modules/body-parser/node_modules/qs/bower.json
D node_modules/body-parser/node_modules/qs/component.json
D node_modules/body-parser/node_modules/qs/dist/qs.js
D node_modules/body-parser/node_modules/qs/lib/parse.js
D node_modules/body-parser/node_modules/qs/lib/stringify.js
D node_modules/body-parser/node_modules/qs/lib/utils.js
D node_modules/body-parser/node_modules/qs/package.json
D node_modules/body-parser/node_modules/qs/test/parse.js
D node_modules/body-parser/node_modules/qs/test/stringify.js
M node_modules/body-parser/node_modules/raw-body/LICENSE
M node_modules/body-parser/node_modules/raw-body/index.js
M node_modules/body-parser/node_modules/raw-body/package.json
M node_modules/body-parser/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/wrappy/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/wrappy/test/basic.js
M node_modules/canvas/build/Release/canvas.node
M node_modules/canvas/build/Release/obj.target/canvas.node
M node_modules/canvas/build/Release/obj.target/canvas/src/Canvas.o
M node_modules/canvas/build/Release/obj.target/canvas/src/CanvasGradient.o
M 
node_modules/canvas/build/Release/obj.target/canvas/src/CanvasRenderingContext2d.o
M node_modules/canvas/build/Release/obj.target/canvas/src/Image.o
M node_modules/canvas/build/Release/obj.target/canvas/src/ImageData.o
M node_modules/canvas/package.json
M node_modules/canvas/src/CanvasRenderingContext2d.cc
M 

[MediaWiki-commits] [Gerrit] Updated to latest graph2 lib - change (mediawiki...Graph)

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

Change subject: Updated to latest graph2 lib
..


Updated to latest graph2 lib

Change-Id: Ie52cde6ed480c74b186a45e9959e87782ca72fa7
---
M lib/graph2.compiled.js
1 file changed, 30 insertions(+), 22 deletions(-)

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



diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js
index bfe1214..e46cfcb 100644
--- a/lib/graph2.compiled.js
+++ b/lib/graph2.compiled.js
@@ -112,7 +112,7 @@
 }
 };
 return new RegExp(
-(allowSubdomains ? '^([^@/:]*\.)?(' : '^(') +
+(allowSubdomains ? '^([^@/:]*\\.)?(' : '^(') +
 domains
 .map(function (s) {
 return s.replace('.', '\\.');
@@ -145,18 +145,12 @@
 var self = this;
 self.isTrusted = isTrusted;
 self.domains = domains;
+self.domainMap = domainMap;
 self.logger = logger;
 self.objExtender = objExtender;
 self.parseUrl = parseUrl;
 self.formatUrl = formatUrl;
-
 self.validators = {};
-Object.keys(domains).map(function(protocol) {
-// Only allow subdomains for https & http. Other protocols must be 
exact match.
-self.validators[protocol] = makeValidator(domains[protocol], protocol 
=== 'https' || protocol === 'http');
-});
-
-self.domainMap = domainMap;
 
 load.loader = function (opt, callback) {
 var error = callback || function (e) { throw e; }, url;
@@ -200,19 +194,29 @@
 // First, map the host
 host = (this.domainMap && this.domainMap[host]) || host;
 
-var result = {
-host: host
-};
-
-if (this.validators.https.test(host)) {
-result.protocol = 'https';
-} else if (this.validators.http.test(host)) {
-result.protocol = 'http';
-} else {
-result = undefined;
+if (this.testHost('https', host)) {
+return {host: host, protocol: 'https'};
+} else if (this.testHost('http', host)) {
+return {host: host, protocol: 'http'};
 }
+return undefined;
+};
 
-return result;
+/**
+ * Test host against the list of allowed domains based on the protocol
+ * @param {string} protocol
+ * @param {string} host
+ * @returns {boolean}
+ */
+VegaWrapper.prototype.testHost = function testHost(protocol, host) {
+if (!this.validators[protocol]) {
+if (this.domains[protocol]) {
+this.validators[protocol] = makeValidator(this.domains[protocol], 
protocol === 'https' || protocol === 'http');
+} else {
+return false;
+}
+}
+return this.validators[protocol].test(host);
 };
 
 /**this
@@ -241,7 +245,7 @@
 case 'https':
 if (!this.isTrusted) {
 throw new Error('HTTP and HTTPS protocols are not supported 
for untrusted graphs.\n' +
-'Use wikiraw:, wikiapi:, wikirest:, and wikirawupload: 
protocols.\n' +
+'Use wikiraw:, wikiapi:, wikirest:, wikirawupload:, and 
other protocols.\n' +
 'See 
https://www.mediawiki.org/wiki/Extension:Graph#External_data');
 }
 // keep the original URL
@@ -275,6 +279,7 @@
 // Uses mediawiki api, and extract the content after the request
 // Query value must be a valid MediaWiki title string, but we only 
ensure
 // there is no pipe symbol, the rest is handlered by the api.
+urlParts.pathname = decodeURIComponent(urlParts.pathname)
 if (!/^\/[^|]+$/.test(urlParts.pathname)) {
 throw new Error('wikiraw: invalid title');
 }
@@ -284,7 +289,7 @@
 action: 'query',
 prop: 'revisions',
 rvprop: 'content',
-titles: decodeURIComponent(urlParts.pathname.substring(1))
+titles: urlParts.pathname.substring(1)
 };
 urlParts.pathname = '/w/api.php';
 urlParts.protocol = sanitizedHost.protocol;
@@ -318,6 +323,9 @@
 // Get geo shapes data from OSM database by supplying Wikidata IDs
 // https://maps.wikimedia.org/shape?ids=Q16,Q30
 this._validateExternalService(urlParts, sanitizedHost, opt.url);
+if (!urlParts.query || !urlParts.query.ids) {
+throw new Error('geoshape: missing ids parameter in: ' + 
opt.url);
+}
 // the query object is not modified
 urlParts.pathname = '/shape';
 break;
@@ -339,7 +347,7 @@
 } else {
 urlParts.protocol = sanitizedHost.protocol;
 }
-if (!this.validators[protocol].test(urlParts.host)) {
+if (!this.testHost(protocol, urlParts.host)) {
 throw new Error(protocol + ': URL must either be relative (' + 
protocol + '///...), or use one of the allowed hosts: ' + url);
 }
 };

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] Updated to latest graph2 lib - change (mediawiki...Graph)

2016-06-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Updated to latest graph2 lib
..

Updated to latest graph2 lib

Change-Id: Ie52cde6ed480c74b186a45e9959e87782ca72fa7
---
M lib/graph2.compiled.js
1 file changed, 30 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/66/295366/1

diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js
index bfe1214..e46cfcb 100644
--- a/lib/graph2.compiled.js
+++ b/lib/graph2.compiled.js
@@ -112,7 +112,7 @@
 }
 };
 return new RegExp(
-(allowSubdomains ? '^([^@/:]*\.)?(' : '^(') +
+(allowSubdomains ? '^([^@/:]*\\.)?(' : '^(') +
 domains
 .map(function (s) {
 return s.replace('.', '\\.');
@@ -145,18 +145,12 @@
 var self = this;
 self.isTrusted = isTrusted;
 self.domains = domains;
+self.domainMap = domainMap;
 self.logger = logger;
 self.objExtender = objExtender;
 self.parseUrl = parseUrl;
 self.formatUrl = formatUrl;
-
 self.validators = {};
-Object.keys(domains).map(function(protocol) {
-// Only allow subdomains for https & http. Other protocols must be 
exact match.
-self.validators[protocol] = makeValidator(domains[protocol], protocol 
=== 'https' || protocol === 'http');
-});
-
-self.domainMap = domainMap;
 
 load.loader = function (opt, callback) {
 var error = callback || function (e) { throw e; }, url;
@@ -200,19 +194,29 @@
 // First, map the host
 host = (this.domainMap && this.domainMap[host]) || host;
 
-var result = {
-host: host
-};
-
-if (this.validators.https.test(host)) {
-result.protocol = 'https';
-} else if (this.validators.http.test(host)) {
-result.protocol = 'http';
-} else {
-result = undefined;
+if (this.testHost('https', host)) {
+return {host: host, protocol: 'https'};
+} else if (this.testHost('http', host)) {
+return {host: host, protocol: 'http'};
 }
+return undefined;
+};
 
-return result;
+/**
+ * Test host against the list of allowed domains based on the protocol
+ * @param {string} protocol
+ * @param {string} host
+ * @returns {boolean}
+ */
+VegaWrapper.prototype.testHost = function testHost(protocol, host) {
+if (!this.validators[protocol]) {
+if (this.domains[protocol]) {
+this.validators[protocol] = makeValidator(this.domains[protocol], 
protocol === 'https' || protocol === 'http');
+} else {
+return false;
+}
+}
+return this.validators[protocol].test(host);
 };
 
 /**this
@@ -241,7 +245,7 @@
 case 'https':
 if (!this.isTrusted) {
 throw new Error('HTTP and HTTPS protocols are not supported 
for untrusted graphs.\n' +
-'Use wikiraw:, wikiapi:, wikirest:, and wikirawupload: 
protocols.\n' +
+'Use wikiraw:, wikiapi:, wikirest:, wikirawupload:, and 
other protocols.\n' +
 'See 
https://www.mediawiki.org/wiki/Extension:Graph#External_data');
 }
 // keep the original URL
@@ -275,6 +279,7 @@
 // Uses mediawiki api, and extract the content after the request
 // Query value must be a valid MediaWiki title string, but we only 
ensure
 // there is no pipe symbol, the rest is handlered by the api.
+urlParts.pathname = decodeURIComponent(urlParts.pathname)
 if (!/^\/[^|]+$/.test(urlParts.pathname)) {
 throw new Error('wikiraw: invalid title');
 }
@@ -284,7 +289,7 @@
 action: 'query',
 prop: 'revisions',
 rvprop: 'content',
-titles: decodeURIComponent(urlParts.pathname.substring(1))
+titles: urlParts.pathname.substring(1)
 };
 urlParts.pathname = '/w/api.php';
 urlParts.protocol = sanitizedHost.protocol;
@@ -318,6 +323,9 @@
 // Get geo shapes data from OSM database by supplying Wikidata IDs
 // https://maps.wikimedia.org/shape?ids=Q16,Q30
 this._validateExternalService(urlParts, sanitizedHost, opt.url);
+if (!urlParts.query || !urlParts.query.ids) {
+throw new Error('geoshape: missing ids parameter in: ' + 
opt.url);
+}
 // the query object is not modified
 urlParts.pathname = '/shape';
 break;
@@ -339,7 +347,7 @@
 } else {
 urlParts.protocol = sanitizedHost.protocol;
 }
-if (!this.validators[protocol].test(urlParts.host)) {
+if (!this.testHost(protocol, urlParts.host)) {
 throw new Error(protocol + ': URL must either be relative (' + 
protocol + '///...), or use one of the allowed hosts: ' + url);
 }
 };


[MediaWiki-commits] [Gerrit] Temporary IP Cap Lift on es.wiki and commons - change (operations/mediawiki-config)

2016-06-21 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review.

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

Change subject: Temporary IP Cap Lift on es.wiki and commons
..

Temporary IP Cap Lift on es.wiki and commons

Bug: T138322
Change-Id: I5ac38cba6659a7fb5570053f890963ceb30c600c
---
M wmf-config/throttle.php
1 file changed, 21 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 1ba3ff1..e7f3ee6 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -69,6 +69,27 @@
'dbname' => ['eswiki', 'commonswiki'],
'value'  => 40 // 30 expected
 ];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-06-21T13:00 -5:00',
+   'to' => '2016-06-21T16:00 -5:00',
+   'IP' => '186.3.110.63',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 50 // 40 expected
+];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-06-30T13:00 -5:00',
+   'to' => '2016-06-30T16:00 -5:00',
+   'IP' => '186.3.110.63',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 60 // 50 expected
+];
+$wmgThrottlingExceptions[] = [ // T138322
+   'from'   => '2016-07-06T13:00 -5:00',
+   'to' => '2016-07-06T16:00 -5:00',
+   'IP' => '181.39.163.9',
+   'dbname' => ['eswiki', 'commonswiki'],
+   'value'  => 40 // 30 expected
+];
 $wgExtensionFunctions[] = function() {
global $wmgThrottlingExceptions, $wgDBname, $wgRequest;
 

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

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

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


[MediaWiki-commits] [Gerrit] T96195: Remove node 0.8 support - change (mediawiki...parsoid)

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

Change subject: T96195: Remove node 0.8 support
..


T96195: Remove node 0.8 support

Change-Id: I8a2282df96ec06fc3e4d706d731a63d7d6dbf365
---
M .travis.yml
M HISTORY.md
M bin/server.js
M lib/api/apiUtils.js
M package.json
5 files changed, 4 insertions(+), 15 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index 75e4993..f4e00f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,18 +1,12 @@
 language: node_js
 
 node_js:
-# Your days are numbered.
-- "0.8"
 # Current production value.
 - "0.10.25"
 # Aspiring contender. See T119228.
 - "4.3.0"
 # From the nvm docs, "this installs the latest version of node".
 - "node"
-
-before_install:
-- NODE_VERSION=$(node -e 
'console.log(process.version.replace(/[.][0-9]+$/, ""))')
-- if [ "v0.8" = "$NODE_VERSION" ]; then npm install -g npm@2.7.3 ; fi
 
 script: travis_wait npm run-script coverage && (npm run-script coveralls || 
exit 0)
 
diff --git a/HISTORY.md b/HISTORY.md
index 76bd87c..08299d1 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -9,6 +9,7 @@
   * T125419: Fix selser issues serializing first table row
   * T114413: Provide HTML2HTML endpoint in Parsoid
   * T137406: Emit |- between thead/tbody/tfoot
+  * T96195: Remove node 0.8 support
 
 0.5.1 / 2015-05-02
 ==
diff --git a/bin/server.js b/bin/server.js
index 2a38f83..eae5e22 100755
--- a/bin/server.js
+++ b/bin/server.js
@@ -228,8 +228,7 @@
 
// Enable heap dumps in /tmp on kill -USR2.
// See https://github.com/bnoordhuis/node-heapdump/
-   // For node 0.6/0.8: npm install heapdump@0.1.0
-   // For 0.10: npm install heapdump
+   // npm install heapdump
process.on('SIGUSR2', function() {
var heapdump = require('heapdump');
processLogger.log("warning", "SIGUSR2 received! Writing 
snapshot.");
diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index d64b383..57f8454 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -4,7 +4,6 @@
 var cluster = require('cluster');
 var domino = require('domino');
 var util = require('util');
-var semver = require('semver');
 var qs = require('querystring');
 
 var Diff = require('../utils/Diff.js').Diff;
@@ -154,9 +153,6 @@
};
 };
 
-// Cluster support was very experimental and missing methods in v0.8.x
-var sufficientNodeVersion = semver.gte(process.version, '0.10.0');
-
 /**
  * @method
  * @param {Promise} p
@@ -170,7 +166,7 @@
(res.locals.oldid ? '?oldid=' + res.locals.oldid : '')
);
return new Promise(function(resolve, reject) {
-   if (cluster.isMaster || !sufficientNodeVersion) {
+   if (cluster.isMaster) {
return p.then(resolve, reject);
}
// Notify the cluster master that a request has started
diff --git a/package.json b/package.json
index 1aea493..6152301 100644
--- a/package.json
+++ b/package.json
@@ -49,7 +49,6 @@
   },
   "scripts": {
 "lint": "npm run dump-tokenizer && npm run jscs && npm run jshint",
-"no-0.8": "node -e 'process.exit(/v0[.][0-8][.]/.test(process.version) ? 0 
: 1)' || (npm run nsp && npm run lint)",
 "start": "node bin/server.js",
 "jshint": "jshint bin lib tests tools core-upgrade.js",
 "jscs": "jscs bin lib tests tools core-upgrade.js",
@@ -58,7 +57,7 @@
 "mocha": "mocha --opts tests/mocha/mocha.opts tests/mocha",
 "parserTests": "node bin/parserTests.js --wt2html --wt2wt --html2wt 
--html2html --selser --no-color --quiet --blacklist",
 "roundtrip": "node bin/roundtrip-test.js 'Barack Obama' && node 
bin/roundtrip-test.js 'Parkour'",
-"test": "npm run no-0.8 && npm run parserTests && npm run mocha",
+"test": "npm run nsp && npm run lint && npm run parserTests && npm run 
mocha",
 "cover-mocha": "istanbul cover _mocha --dir ./coverage/mocha --  --opts 
tests/mocha/mocha.opts tests/mocha",
 "cover-parserTests": "istanbul cover bin/parserTests.js --dir 
./coverage/parserTests -- --wt2html --wt2wt --html2wt --html2html --selser 
--no-color --quiet --blacklist",
 "coverage": "npm run cover-mocha && npm run cover-parserTests && istanbul 
report",

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

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

___
MediaWiki-commits 

[MediaWiki-commits] [Gerrit] Minor cleanup, readme - change (mediawiki...graphoid)

2016-06-21 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Minor cleanup, readme
..


Minor cleanup, readme

Change-Id: I115b6f4783575ebcf57ac05efff3b2dd4662e738
---
M README.md
M package.json
2 files changed, 10 insertions(+), 82 deletions(-)

Objections:
  jenkins-bot: Fails



diff --git a/README.md b/README.md
index c062ff1..14c0835 100644
--- a/README.md
+++ b/README.md
@@ -1,83 +1,13 @@
-# service-template-node [![Build 
Status](https://travis-ci.org/wikimedia/service-template-node.svg?branch=master)](https://travis-ci.org/wikimedia/service-template-node)
+# graphoid
 
-Template for creating MediaWiki Services in Node.js
+Wikimedia nodejs service to create Vega-based static images on the server
 
 ## Getting Started
 
-### Installation
+### Quick start
 
-First, clone the repository
-
-```
-git clone https://github.com/wikimedia/service-template-node.git
-```
-
-Install the dependencies
-
-```
-cd service-template-node
-npm install
-```
-
-You are now ready to get to work!
-
-* Inspect/modify/configure `app.js`
-* Add routes by placing files in `routes/` (look at the files there for 
examples)
-
-You can also read [the documentation](doc/).
-
-### Running the examples
-
-The template is a fully-working example, so you may try it right away. To
-start the server hosting the REST API, simply run (inside the repo's directory)
-
-```
-npm start
-```
-
-This starts an HTTP server listening on `localhost:6927`. There are several
-routes you may query (with a browser, or `curl` and friends):
-
-* `http://localhost:6927/_info/`
-* `http://localhost:6927/_info/name`
-* `http://localhost:6927/_info/version`
-* `http://localhost:6927/_info/home`
-* `http://localhost:6927/{domain}/v1/siteinfo{/prop}`
-* `http://localhost:6927/{domain}/v1/page/{title}`
-* `http://localhost:6927/{domain}/v1/page/{title}/lead`
-* `http://localhost:6927/ex/err/array`
-* `http://localhost:6927/ex/err/file`
-* `http://localhost:6927/ex/err/manual/error`
-* `http://localhost:6927/ex/err/manual/deny`
-* `http://localhost:6927/ex/err/auth`
-
-### Tests
-
-The template also includes a test suite a small set of executable tests. To 
fire
-them up, simply run:
-
-```
-npm test
-```
-
-If you haven't changed anything in the code (and you have a working Internet
-connection), you should see all the tests passing. As testing most of the code
-is an important aspect of service development, there is also a bundled tool
-reporting the percentage of code covered. Start it with:
-
-```
-npm run-script coverage
-```
-
-### Troubleshooting
-
-In a lot of cases when there is an issue with node it helps to recreate the
-`node_modules` directory:
-
-```
-rm -r node_modules
-npm install
-```
-
-Enjoy!
-
+* Install canvas dependencies as described at 
https://www.npmjs.com/package/canvas
+** For Ubuntu, that's `sudo apt-get install libcairo2-dev libjpeg8-dev 
libpango1.0-dev libgif-dev build-essential g++`
+* Clone repo
+* npm install
+* npm start
diff --git a/package.json b/package.json
index 95e017a..65296f6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "graphoid",
-  "version": "0.1.9",
+  "version": "0.1.10",
   "description": "Renders vega graphs from mediawiki pages",
   "main": "./app.js",
   "scripts": {
@@ -24,9 +24,7 @@
 "Dan Andreescu "
   ],
   "license": "Apache-2.0",
-  "bugs": {
-"url": "https://phabricator.wikimedia.org/tag/service-template-node/;
-  },
+  "bugs": "https://phabricator.wikimedia.org/tag/service-template-node/;,
   "homepage": "https://www.mediawiki.org/wiki/Extension:Graph;,
   "dependencies": {
 "bluebird": "^3.3.5",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I115b6f4783575ebcf57ac05efff3b2dd4662e738
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Minor cleanup, readme - change (mediawiki...graphoid)

2016-06-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Minor cleanup, readme
..

Minor cleanup, readme

Change-Id: I115b6f4783575ebcf57ac05efff3b2dd4662e738
---
M README.md
M package.json
2 files changed, 10 insertions(+), 82 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/graphoid 
refs/changes/64/295364/1

diff --git a/README.md b/README.md
index c062ff1..14c0835 100644
--- a/README.md
+++ b/README.md
@@ -1,83 +1,13 @@
-# service-template-node [![Build 
Status](https://travis-ci.org/wikimedia/service-template-node.svg?branch=master)](https://travis-ci.org/wikimedia/service-template-node)
+# graphoid
 
-Template for creating MediaWiki Services in Node.js
+Wikimedia nodejs service to create Vega-based static images on the server
 
 ## Getting Started
 
-### Installation
+### Quick start
 
-First, clone the repository
-
-```
-git clone https://github.com/wikimedia/service-template-node.git
-```
-
-Install the dependencies
-
-```
-cd service-template-node
-npm install
-```
-
-You are now ready to get to work!
-
-* Inspect/modify/configure `app.js`
-* Add routes by placing files in `routes/` (look at the files there for 
examples)
-
-You can also read [the documentation](doc/).
-
-### Running the examples
-
-The template is a fully-working example, so you may try it right away. To
-start the server hosting the REST API, simply run (inside the repo's directory)
-
-```
-npm start
-```
-
-This starts an HTTP server listening on `localhost:6927`. There are several
-routes you may query (with a browser, or `curl` and friends):
-
-* `http://localhost:6927/_info/`
-* `http://localhost:6927/_info/name`
-* `http://localhost:6927/_info/version`
-* `http://localhost:6927/_info/home`
-* `http://localhost:6927/{domain}/v1/siteinfo{/prop}`
-* `http://localhost:6927/{domain}/v1/page/{title}`
-* `http://localhost:6927/{domain}/v1/page/{title}/lead`
-* `http://localhost:6927/ex/err/array`
-* `http://localhost:6927/ex/err/file`
-* `http://localhost:6927/ex/err/manual/error`
-* `http://localhost:6927/ex/err/manual/deny`
-* `http://localhost:6927/ex/err/auth`
-
-### Tests
-
-The template also includes a test suite a small set of executable tests. To 
fire
-them up, simply run:
-
-```
-npm test
-```
-
-If you haven't changed anything in the code (and you have a working Internet
-connection), you should see all the tests passing. As testing most of the code
-is an important aspect of service development, there is also a bundled tool
-reporting the percentage of code covered. Start it with:
-
-```
-npm run-script coverage
-```
-
-### Troubleshooting
-
-In a lot of cases when there is an issue with node it helps to recreate the
-`node_modules` directory:
-
-```
-rm -r node_modules
-npm install
-```
-
-Enjoy!
-
+* Install canvas dependencies as described at 
https://www.npmjs.com/package/canvas
+** For Ubuntu, that's `sudo apt-get install libcairo2-dev libjpeg8-dev 
libpango1.0-dev libgif-dev build-essential g++`
+* Clone repo
+* npm install
+* npm start
diff --git a/package.json b/package.json
index 95e017a..65296f6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "graphoid",
-  "version": "0.1.9",
+  "version": "0.1.10",
   "description": "Renders vega graphs from mediawiki pages",
   "main": "./app.js",
   "scripts": {
@@ -24,9 +24,7 @@
 "Dan Andreescu "
   ],
   "license": "Apache-2.0",
-  "bugs": {
-"url": "https://phabricator.wikimedia.org/tag/service-template-node/;
-  },
+  "bugs": "https://phabricator.wikimedia.org/tag/service-template-node/;,
   "homepage": "https://www.mediawiki.org/wiki/Extension:Graph;,
   "dependencies": {
 "bluebird": "^3.3.5",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I115b6f4783575ebcf57ac05efff3b2dd4662e738
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] New jobutils release - change (labs/toollabs)

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

Change subject: New jobutils release
..


New jobutils release

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

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



diff --git a/debian/changelog b/debian/changelog
index fecd471..b0fce7c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.14) unstable; urgency=medium
+
+  * Update jsubrc and embedded options parsing
+
+ -- Bryan Davis   Tue, 21 June 2016 16:38:00 +
+
 toollabs (1.13) unstable; urgency=medium
 
   * Validate jsub '-l release=...' values

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18652f60d0967f6a1d14df5dcb6f66733a1fe9e2
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Merlijn van Deen 
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] New jobutils release - change (labs/toollabs)

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

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

Change subject: New jobutils release
..

New jobutils release

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/63/295363/1

diff --git a/debian/changelog b/debian/changelog
index fecd471..b0fce7c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.14) unstable; urgency=medium
+
+  * Update jsubrc and embedded options parsing
+
+ -- Bryan Davis   Tue, 21 June 2016 16:38:00 +
+
 toollabs (1.13) unstable; urgency=medium
 
   * Validate jsub '-l release=...' values

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18652f60d0967f6a1d14df5dcb6f66733a1fe9e2
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
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] jsub: Update jsubrc and embedded options parsing - change (labs/toollabs)

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

Change subject: jsub: Update jsubrc and embedded options parsing
..


jsub: Update jsubrc and embedded options parsing

Update regex used to extract options from ~/.jsubrc and embedded
comments to strip trailing inline comments and allow uppercase flags.
The updated regex more closely matches the prior perl jsub parsing
behavior.

Bug: T138178
Change-Id: Ifbb2a62fc5bf192defae32c9f6146aacc83431a4
---
M jobutils/bin/jsub
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/jobutils/bin/jsub b/jobutils/bin/jsub
index e00d9d4..888434d 100755
--- a/jobutils/bin/jsub
+++ b/jobutils/bin/jsub
@@ -475,7 +475,7 @@
 'JOBUTILS_JSUBRC', os.path.join(homedir(), '.jsubrc'))
 if os.path.exists(jsubrc):
 args = []
-pat = re.compile(r'^(?P-[a-z]+)(?:\s+(?P.+)|\s*)$')
+pat = re.compile(r'^(?P-[a-zA-Z]+)(?:\s+(?P[^#\s]+))?')
 with open(jsubrc, 'r') as fh:
 for line in fh:
 m = pat.match(line)
@@ -513,7 +513,7 @@
 This mostly matches the behavior of SGE's qsub for non-binary programs.
 See '-C prefix_string' in `man qsub` for more ugly details.
 """
-pat = re.compile(r'\s*(?P-[a-z]+)(?:\s+(?P.+)|\s*)')
+pat = re.compile(r'\s*(?P-[a-zA-Z]+)(?:\s+(?P[^#\s]+))?')
 args = []
 with open(namespace.program, 'r') as fh:
 for line in read_script_comments(fh):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbb2a62fc5bf192defae32c9f6146aacc83431a4
Gerrit-PatchSet: 2
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Rush 
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] Configuration for new elasticsearch servers in eqiad. - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged.

Change subject: Configuration for new elasticsearch servers in eqiad.
..


Configuration for new elasticsearch servers in eqiad.

Only elastic1032 is configured in site.pp. Let's check first on a single server
that the installation works and replicate to the 15 others afterward.

Changed regex.yaml and now use more stupid regex to improve readability.

Change-Id: I5ef95b53dcfd79fd0eee7bd245feee210b7cd8f8
---
M hieradata/regex.yaml
M hieradata/role/eqiad/elasticsearch/server.yaml
M manifests/site.pp
3 files changed, 42 insertions(+), 12 deletions(-)

Approvals:
  Gehel: Looks good to me, approved
  DCausse: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 813672e..34ea221 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -1,60 +1,65 @@
 es_codfw_rack_a5:
-  __regex: !ruby/regexp /^elastic200[1-3]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(01|02|03)\.codfw\.wmnet$/
   elasticsearch::rack: A5
   elasticsearch::row:  A
 
 es_codfw_rack_a8:
-  __regex: !ruby/regexp /^elastic200[4-6]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(04|05|06)\.codfw\.wmnet$/
   elasticsearch::rack: A8
   elasticsearch::row:  A
 
 es_codfw_rack_b5:
-  __regex: !ruby/regexp /^elastic200[7-9]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(07|08|09)\.codfw\.wmnet$/
   elasticsearch::rack: B5
   elasticsearch::row:  B
 
 es_codfw_rack_b8:
-  __regex: !ruby/regexp /^elastic201[0-2]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(10|11|12)\.codfw\.wmnet$/
   elasticsearch::rack: B8
   elasticsearch::row:  B
 
 es_codfw_rack_c1:
-  __regex: !ruby/regexp /^elastic201[3-5]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(13|14|15)\.codfw\.wmnet$/
   elasticsearch::rack: C1
   elasticsearch::row:  C
 
 es_codfw_rack_c5:
-  __regex: !ruby/regexp /^elastic201[6-8]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(16|17|18)\.codfw\.wmnet$/
   elasticsearch::rack: C5
   elasticsearch::row:  C
 
 es_codfw_rack_d1:
-  __regex: !ruby/regexp /^elastic20(1[9]|2[0-1])\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(19|20|21)\.codfw\.wmnet$/
   elasticsearch::rack: D1
   elasticsearch::row:  D
 
 es_codfw_rack_d5:
-  __regex: !ruby/regexp /^elastic202[2-4]\.codfw\.wmnet$/
+  __regex: !ruby/regexp /^elastic20(22|23|24)\.codfw\.wmnet$/
   elasticsearch::rack: D5
   elasticsearch::row:  D
 
 es_eqiad_rack_a3:
-  __regex: !ruby/regexp /^elastic10(0[0-4]|30|31)\.eqiad\.wmnet$/
+  __regex: !ruby/regexp 
/^elastic10(01|02|03|04|30|31|32|33|34|35)\.eqiad\.wmnet$/
   elasticsearch::rack: A3
   elasticsearch::row:  A
 
+es_eqiad_rack_b3:
+  __regex: !ruby/regexp /^elastic10(36|37|38|39)\.eqiad\.wmnet$/
+  elasticsearch::rack: B3
+  elasticsearch::row:  B
+
 es_eqiad_rack_c5:
-  __regex: !ruby/regexp /^elastic10(0[7-9]|1[0-2])\.eqiad\.wmnet$/
+  __regex: !ruby/regexp 
/^elastic10(07|08|09|10|11|12|40|41|42|43)\.eqiad\.wmnet$/
   elasticsearch::rack: C5
   elasticsearch::row:  C
 
 es_eqiad_rack_d3:
-  __regex: !ruby/regexp /^elastic10(1[3-9]|2[0-2])\.eqiad\.wmnet$/
+  __regex: !ruby/regexp 
/^elastic10(13|14|15|16|17|18|19|20|21|22)\.eqiad\.wmnet$/
   elasticsearch::rack: D3
   elasticsearch::row:  D
 
 es_eqiad_rack_d4:
-  __regex: !ruby/regexp /^elastic10(2[3-9]|05|06)\.eqiad\.wmnet$/
+  __regex: !ruby/regexp /^elastic10(05|06|23|24|25|26|27|28|29)\.eqiad\.wmnet$/
   elasticsearch::rack: D4
   elasticsearch::row:  D
 
diff --git a/hieradata/role/eqiad/elasticsearch/server.yaml 
b/hieradata/role/eqiad/elasticsearch/server.yaml
index 5507891..a343e20 100644
--- a/hieradata/role/eqiad/elasticsearch/server.yaml
+++ b/hieradata/role/eqiad/elasticsearch/server.yaml
@@ -43,7 +43,24 @@
   - elastic1029.eqiad.wmnet
   - elastic1030.eqiad.wmnet
   - elastic1031.eqiad.wmnet
+  - elastic1032.eqiad.wmnet
+  - elastic1033.eqiad.wmnet
+  - elastic1034.eqiad.wmnet
+  - elastic1035.eqiad.wmnet
+  - elastic1036.eqiad.wmnet
+  - elastic1037.eqiad.wmnet
+  - elastic1038.eqiad.wmnet
+  - elastic1039.eqiad.wmnet
+  - elastic1040.eqiad.wmnet
+  - elastic1041.eqiad.wmnet
+  - elastic1042.eqiad.wmnet
+  - elastic1043.eqiad.wmnet
+  - elastic1044.eqiad.wmnet
+  - elastic1045.eqiad.wmnet
+  - elastic1046.eqiad.wmnet
+  - elastic1047.eqiad.wmnet
 
+# TODO at what point do we need to update this number?
 elasticsearch::expected_nodes: 31
 
 # We should be able to run "OK" with 24 servers.
diff --git a/manifests/site.pp b/manifests/site.pp
index 0b53d3f..75982cd 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -959,6 +959,14 @@
 include standard
 }
 
+# Let's start by installing a single new node, add the others in a second step
+node 'elastic1032.eqiad.wmnet' {
+role elasticsearch::server
+include base::firewall
+include standard
+}
+
+
 node 

[MediaWiki-commits] [Gerrit] Version 0.7.2 - change (mediawiki...ApprovedRevs)

2016-06-21 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Version 0.7.2
..


Version 0.7.2

Change-Id: I8860f31bbeb7262c0281af39bd4d389d1728ec2c
---
M ApprovedRevs.php
M README
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/ApprovedRevs.php b/ApprovedRevs.php
index 6506cf3..56d6553 100644
--- a/ApprovedRevs.php
+++ b/ApprovedRevs.php
@@ -9,7 +9,7 @@
  * @author Yaron Koren
  */
 
-define( 'APPROVED_REVS_VERSION', '0.7.1' );
+define( 'APPROVED_REVS_VERSION', '0.7.2' );
 
 // credits
 $wgExtensionCredits['other'][] = array(
diff --git a/README b/README
index 90a7126..bbb6e7f 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 Approved Revs Extension
 
-Version 0.7.1
+Version 0.7.2
 Yaron Koren
 
 This is free software licensed under the GNU General Public License. Please

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8860f31bbeb7262c0281af39bd4d389d1728ec2c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Only score the top 15 results per query source - change (wikimedia...discernatron)

2016-06-21 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged.

Change subject: Only score the top 15 results per query source
..


Only score the top 15 results per query source

After some analysis (thanks Trey!) on the current scores we have
determined that providing the top 15 results, rather than the top 25,
from each source gives sufficient data for scoring. This reduces the
maximum number of results a user must score from 80 to 48, which will
hopefully make things easier on graders.

Change-Id: I620a8e1f7290c4690910ab5fc9c16322aa3bf2df
---
M src/RelevanceScoring/RelevanceScoringProvider.php
M src/RelevanceScoring/Repository/ResultsRepository.php
M tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
M tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
4 files changed, 26 insertions(+), 10 deletions(-)

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



diff --git a/src/RelevanceScoring/RelevanceScoringProvider.php 
b/src/RelevanceScoring/RelevanceScoringProvider.php
index 139fa73..19b94e7 100644
--- a/src/RelevanceScoring/RelevanceScoringProvider.php
+++ b/src/RelevanceScoring/RelevanceScoringProvider.php
@@ -75,7 +75,10 @@
 return new Repository\QueriesRepository($app['db']);
 };
 $app['search.repository.results'] = function () use ($app) {
-$repo = new Repository\ResultsRepository($app['db']);
+$repo = new Repository\ResultsRepository(
+$app['db'],
+$app['search.importer_limit']
+);
 $repo->setLogger($app['search.logger']);
 
 return $repo;
@@ -97,7 +100,7 @@
 
 private function registerImporter(Application $app)
 {
-$app['search.importer_limit'] = 25;
+$app['search.importer_limit'] = 15;
 $app['search.importer.bing'] = function () use ($app) {
 return new HtmlResultGetter(
 $app['guzzle'],
diff --git a/src/RelevanceScoring/Repository/ResultsRepository.php 
b/src/RelevanceScoring/Repository/ResultsRepository.php
index 6d0f6d5..13a5de0 100644
--- a/src/RelevanceScoring/Repository/ResultsRepository.php
+++ b/src/RelevanceScoring/Repository/ResultsRepository.php
@@ -19,9 +19,17 @@
 /** @var Connection */
 private $db;
 
-public function __construct(Connection $db)
+/** @var int The maximum position returned for scoring */
+private $maxPosition;
+
+/**
+ * @param Connection $db
+ * @param int$maxPosition The maximum position returned for scoring
+ */
+public function __construct(Connection $db, $maxPosition)
 {
 $this->db = $db;
+$this->maxPosition = $maxPosition;
 $this->logger = new NullLogger();
 }
 
@@ -115,19 +123,24 @@
   FROM results r
   JOIN (SELECT results_id, MAX(snippet_score) as snippet_score
   FROM results_sources
- WHERE query_id = ?
+ WHERE query_id = :queryId
+   AND position <= :maxPosition
  GROUP BY results_id
) r_s_max
 ON r.id = r_s_max.results_id
   JOIN results_sources r_s
 ON r_s.results_id = r_s_max.results_id
AND r_s.snippet_score = r_s_max.snippet_score
-   AND r_s.query_id = ?
- WHERE r.query_id = ?
+   AND r_s.query_id = :queryId
+   AND r_s.position <= :maxPosition
+ WHERE r.query_id = :queryId
  GROUP BY r.id
  ORDER BY r.id DESC
 EOD;
-$results = $this->db->fetchAll($sql, [$queryId, $queryId, $queryId]);
+$results = $this->db->fetchAll($sql, [
+'queryId' => $queryId,
+'maxPosition' => $this->maxPosition,
+]);
 if ($results === false) {
 return new None();
 }
diff --git a/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php 
b/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
index 42145f2..8d527a1 100644
--- a/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
+++ b/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
@@ -69,7 +69,7 @@
  */
 protected function genResult(User $user, $queryId, array $results)
 {
-$repo = new ResultsRepository($this->db);
+$repo = new ResultsRepository($this->db, 15);
 
 return $repo->storeResults($user, $queryId, $results);
 }
diff --git a/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php 
b/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
index f23fe61..8738c2a 100644
--- a/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
+++ b/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
@@ -10,7 +10,7 @@
 public function testStoreResults()
 {
 $user = $this->genTestUser();
-$repo = new ResultsRepository($this->db);
+$repo = new ResultsRepository($this->db, 15);
 $queryId = null;
 $this->db->transactional(function () use ($repo, $user, &$queryId) {
 $queryId 

[MediaWiki-commits] [Gerrit] jsub: Strip trailing comments from jsubrc and embedded options - change (labs/toollabs)

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

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

Change subject: jsub: Strip trailing comments from jsubrc and embedded options
..

jsub: Strip trailing comments from jsubrc and embedded options

Update regex used to extract options from ~/.jsubrc and embedded
comments to strip trailing inline comments. The updated regex more
closely matches the prior perl jsub parsing behavior.

Bug: T138178
Change-Id: Ifbb2a62fc5bf192defae32c9f6146aacc83431a4
---
M jobutils/bin/jsub
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/61/295361/1

diff --git a/jobutils/bin/jsub b/jobutils/bin/jsub
index e00d9d4..88817d1 100755
--- a/jobutils/bin/jsub
+++ b/jobutils/bin/jsub
@@ -475,7 +475,7 @@
 'JOBUTILS_JSUBRC', os.path.join(homedir(), '.jsubrc'))
 if os.path.exists(jsubrc):
 args = []
-pat = re.compile(r'^(?P-[a-z]+)(?:\s+(?P.+)|\s*)$')
+pat = re.compile(r'^(?P-[a-z]+)(?:\s+(?P[^#\s]+))?')
 with open(jsubrc, 'r') as fh:
 for line in fh:
 m = pat.match(line)
@@ -513,7 +513,7 @@
 This mostly matches the behavior of SGE's qsub for non-binary programs.
 See '-C prefix_string' in `man qsub` for more ugly details.
 """
-pat = re.compile(r'\s*(?P-[a-z]+)(?:\s+(?P.+)|\s*)')
+pat = re.compile(r'\s*(?P-[a-z]+)(?:\s+(?P[^#\s]+))?')
 args = []
 with open(namespace.program, 'r') as fh:
 for line in read_script_comments(fh):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbb2a62fc5bf192defae32c9f6146aacc83431a4
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
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] Only score the top 15 results per query source - change (wikimedia...discernatron)

2016-06-21 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Only score the top 15 results per query source
..

Only score the top 15 results per query source

After some analysis (thanks Trey!) on the current scores we have
determined that providing the top 15 results, rather than the top 25,
from each source gives sufficient data for scoring. This reduces the
maximum number of results a user must score from 80 to 48, which will
hopefully make things easier on graders.

Change-Id: I620a8e1f7290c4690910ab5fc9c16322aa3bf2df
---
M src/RelevanceScoring/RelevanceScoringProvider.php
M src/RelevanceScoring/Repository/ResultsRepository.php
M tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
M tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
4 files changed, 26 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron 
refs/changes/62/295362/1

diff --git a/src/RelevanceScoring/RelevanceScoringProvider.php 
b/src/RelevanceScoring/RelevanceScoringProvider.php
index 139fa73..19b94e7 100644
--- a/src/RelevanceScoring/RelevanceScoringProvider.php
+++ b/src/RelevanceScoring/RelevanceScoringProvider.php
@@ -75,7 +75,10 @@
 return new Repository\QueriesRepository($app['db']);
 };
 $app['search.repository.results'] = function () use ($app) {
-$repo = new Repository\ResultsRepository($app['db']);
+$repo = new Repository\ResultsRepository(
+$app['db'],
+$app['search.importer_limit']
+);
 $repo->setLogger($app['search.logger']);
 
 return $repo;
@@ -97,7 +100,7 @@
 
 private function registerImporter(Application $app)
 {
-$app['search.importer_limit'] = 25;
+$app['search.importer_limit'] = 15;
 $app['search.importer.bing'] = function () use ($app) {
 return new HtmlResultGetter(
 $app['guzzle'],
diff --git a/src/RelevanceScoring/Repository/ResultsRepository.php 
b/src/RelevanceScoring/Repository/ResultsRepository.php
index 6d0f6d5..13a5de0 100644
--- a/src/RelevanceScoring/Repository/ResultsRepository.php
+++ b/src/RelevanceScoring/Repository/ResultsRepository.php
@@ -19,9 +19,17 @@
 /** @var Connection */
 private $db;
 
-public function __construct(Connection $db)
+/** @var int The maximum position returned for scoring */
+private $maxPosition;
+
+/**
+ * @param Connection $db
+ * @param int$maxPosition The maximum position returned for scoring
+ */
+public function __construct(Connection $db, $maxPosition)
 {
 $this->db = $db;
+$this->maxPosition = $maxPosition;
 $this->logger = new NullLogger();
 }
 
@@ -115,19 +123,24 @@
   FROM results r
   JOIN (SELECT results_id, MAX(snippet_score) as snippet_score
   FROM results_sources
- WHERE query_id = ?
+ WHERE query_id = :queryId
+   AND position <= :maxPosition
  GROUP BY results_id
) r_s_max
 ON r.id = r_s_max.results_id
   JOIN results_sources r_s
 ON r_s.results_id = r_s_max.results_id
AND r_s.snippet_score = r_s_max.snippet_score
-   AND r_s.query_id = ?
- WHERE r.query_id = ?
+   AND r_s.query_id = :queryId
+   AND r_s.position <= :maxPosition
+ WHERE r.query_id = :queryId
  GROUP BY r.id
  ORDER BY r.id DESC
 EOD;
-$results = $this->db->fetchAll($sql, [$queryId, $queryId, $queryId]);
+$results = $this->db->fetchAll($sql, [
+'queryId' => $queryId,
+'maxPosition' => $this->maxPosition,
+]);
 if ($results === false) {
 return new None();
 }
diff --git a/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php 
b/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
index 42145f2..8d527a1 100644
--- a/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
+++ b/tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
@@ -69,7 +69,7 @@
  */
 protected function genResult(User $user, $queryId, array $results)
 {
-$repo = new ResultsRepository($this->db);
+$repo = new ResultsRepository($this->db, 15);
 
 return $repo->storeResults($user, $queryId, $results);
 }
diff --git a/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php 
b/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
index f23fe61..8738c2a 100644
--- a/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
+++ b/tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
@@ -10,7 +10,7 @@
 public function testStoreResults()
 {
 $user = $this->genTestUser();
-$repo = new ResultsRepository($this->db);
+$repo = new ResultsRepository($this->db, 15);
 $queryId = null;
 

[MediaWiki-commits] [Gerrit] Version 0.7.2 - change (mediawiki...ApprovedRevs)

2016-06-21 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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

Change subject: Version 0.7.2
..

Version 0.7.2

Change-Id: I8860f31bbeb7262c0281af39bd4d389d1728ec2c
---
M ApprovedRevs.php
M README
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ApprovedRevs 
refs/changes/60/295360/1

diff --git a/ApprovedRevs.php b/ApprovedRevs.php
index 6506cf3..56d6553 100644
--- a/ApprovedRevs.php
+++ b/ApprovedRevs.php
@@ -9,7 +9,7 @@
  * @author Yaron Koren
  */
 
-define( 'APPROVED_REVS_VERSION', '0.7.1' );
+define( 'APPROVED_REVS_VERSION', '0.7.2' );
 
 // credits
 $wgExtensionCredits['other'][] = array(
diff --git a/README b/README
index 90a7126..bbb6e7f 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 Approved Revs Extension
 
-Version 0.7.1
+Version 0.7.2
 Yaron Koren
 
 This is free software licensed under the GNU General Public License. Please

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8860f31bbeb7262c0281af39bd4d389d1728ec2c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] Updated to latest graph2 lib - change (mediawiki...Graph)

2016-06-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Updated to latest graph2 lib
..

Updated to latest graph2 lib

Change-Id: Ie52cde6ed480c74b186a45e9959e87782ca72fa7
---
M lib/graph2.compiled.js
1 file changed, 29 insertions(+), 21 deletions(-)


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

diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js
index bfe1214..ed62c37 100644
--- a/lib/graph2.compiled.js
+++ b/lib/graph2.compiled.js
@@ -145,18 +145,12 @@
 var self = this;
 self.isTrusted = isTrusted;
 self.domains = domains;
+self.domainMap = domainMap;
 self.logger = logger;
 self.objExtender = objExtender;
 self.parseUrl = parseUrl;
 self.formatUrl = formatUrl;
-
 self.validators = {};
-Object.keys(domains).map(function(protocol) {
-// Only allow subdomains for https & http. Other protocols must be 
exact match.
-self.validators[protocol] = makeValidator(domains[protocol], protocol 
=== 'https' || protocol === 'http');
-});
-
-self.domainMap = domainMap;
 
 load.loader = function (opt, callback) {
 var error = callback || function (e) { throw e; }, url;
@@ -200,19 +194,29 @@
 // First, map the host
 host = (this.domainMap && this.domainMap[host]) || host;
 
-var result = {
-host: host
-};
-
-if (this.validators.https.test(host)) {
-result.protocol = 'https';
-} else if (this.validators.http.test(host)) {
-result.protocol = 'http';
-} else {
-result = undefined;
+if (this.testHost('https', host)) {
+return {host: host, protocol: 'https'};
+} else if (this.testHost('http', host)) {
+return {host: host, protocol: 'http'};
 }
+return undefined;
+};
 
-return result;
+/**
+ * Test host against the list of allowed domains based on the protocol
+ * @param {string} protocol
+ * @param {string} host
+ * @returns {boolean}
+ */
+VegaWrapper.prototype.testHost = function testHost(protocol, host) {
+if (!this.validators[protocol]) {
+if (this.domains[protocol]) {
+this.validators[protocol] = makeValidator(this.domains[protocol], 
protocol === 'https' || protocol === 'http');
+} else {
+return false;
+}
+}
+return this.validators[protocol].test(host);
 };
 
 /**this
@@ -241,7 +245,7 @@
 case 'https':
 if (!this.isTrusted) {
 throw new Error('HTTP and HTTPS protocols are not supported 
for untrusted graphs.\n' +
-'Use wikiraw:, wikiapi:, wikirest:, and wikirawupload: 
protocols.\n' +
+'Use wikiraw:, wikiapi:, wikirest:, wikirawupload:, and 
other protocols.\n' +
 'See 
https://www.mediawiki.org/wiki/Extension:Graph#External_data');
 }
 // keep the original URL
@@ -275,6 +279,7 @@
 // Uses mediawiki api, and extract the content after the request
 // Query value must be a valid MediaWiki title string, but we only 
ensure
 // there is no pipe symbol, the rest is handlered by the api.
+urlParts.pathname = decodeURIComponent(urlParts.pathname)
 if (!/^\/[^|]+$/.test(urlParts.pathname)) {
 throw new Error('wikiraw: invalid title');
 }
@@ -284,7 +289,7 @@
 action: 'query',
 prop: 'revisions',
 rvprop: 'content',
-titles: decodeURIComponent(urlParts.pathname.substring(1))
+titles: urlParts.pathname.substring(1)
 };
 urlParts.pathname = '/w/api.php';
 urlParts.protocol = sanitizedHost.protocol;
@@ -318,6 +323,9 @@
 // Get geo shapes data from OSM database by supplying Wikidata IDs
 // https://maps.wikimedia.org/shape?ids=Q16,Q30
 this._validateExternalService(urlParts, sanitizedHost, opt.url);
+if (!urlParts.query || !urlParts.query.ids) {
+throw new Error('geoshape: missing ids parameter in: ' + 
opt.url);
+}
 // the query object is not modified
 urlParts.pathname = '/shape';
 break;
@@ -339,7 +347,7 @@
 } else {
 urlParts.protocol = sanitizedHost.protocol;
 }
-if (!this.validators[protocol].test(urlParts.host)) {
+if (!this.testHost(protocol, urlParts.host)) {
 throw new Error(protocol + ': URL must either be relative (' + 
protocol + '///...), or use one of the allowed hosts: ' + url);
 }
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie52cde6ed480c74b186a45e9959e87782ca72fa7
Gerrit-PatchSet: 1
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] Don't resample audio with ffmpeg2theora, it's unreliable - change (mediawiki...TimedMediaHandler)

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

Change subject: Don't resample audio with ffmpeg2theora, it's unreliable
..


Don't resample audio with ffmpeg2theora, it's unreliable

A/V sync can drift badly over time when resampling audio with
ffmpeg2theora, such as 48k -> 44.1 kHz. Just let audio through
with its source rate for .ogv output for now to avoid this.

Bug: T135581
Change-Id: I0183f2e13e8615ba4f28bc7315530304deba7837
---
M WebVideoTranscode/WebVideoTranscode.php
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/WebVideoTranscode/WebVideoTranscode.php 
b/WebVideoTranscode/WebVideoTranscode.php
index 010e21c..dcf5a72 100644
--- a/WebVideoTranscode/WebVideoTranscode.php
+++ b/WebVideoTranscode/WebVideoTranscode.php
@@ -87,7 +87,6 @@
'videoBitrate'   => '160',
'framerate'  => '15',
'audioQuality'   => '-1',
-   'samplerate' => '44100',
'channels'   => '2',
'noUpscaling'=> 'true',
'twopass'=> 'false', // 
will be overridden by $wgTmhTheoraTwoPassEncoding
@@ -102,7 +101,6 @@
'maxSize'=> '426x240',
'videoBitrate'   => '512',
'audioQuality'   => '0',
-   'samplerate' => '44100',
'channels'   => '2',
'noUpscaling'=> 'true',
'twopass'=> 'false', // 
will be overridden by $wgTmhTheoraTwoPassEncoding
@@ -117,7 +115,6 @@
'maxSize'=> '640x360',
'videoBitrate'   => '1024',
'audioQuality'   => '1',
-   'samplerate' => '44100',
'channels'   => '2',
'noUpscaling'=> 'true',
'twopass'=> 'false', // 
will be overridden by $wgTmhTheoraTwoPassEncoding
@@ -132,7 +129,6 @@
'maxSize'=> '854x480',
'videoBitrate'   => '2048',
'audioQuality'   => '2',
-   'samplerate' => '44100',
'channels'   => '2',
'noUpscaling'=> 'true',
'twopass'=> 'false', // 
will be overridden by $wgTmhTheoraTwoPassEncoding

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0183f2e13e8615ba4f28bc7315530304deba7837
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Enable 720p and 1080p .ogv Ogg Theora transcodes - change (mediawiki...TimedMediaHandler)

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

Change subject: Enable 720p and 1080p .ogv Ogg Theora transcodes
..


Enable 720p and 1080p .ogv Ogg Theora transcodes

Variable bitrate HD transcodes aren't as huge overall as I had
feared -- see https://phabricator.wikimedia.org/T108172#2340964

720p plays back in ogv.js on any MacBook Pro I've tested, and on
64-bit iOS devices such as iPad Air.

1080p plays back acceptably on Macs and iPad Pro as well.

(MS Edge provides similar performance as Safari on Windows 10,
while IE stumbles along at half the decode speed.)

For the 4K rendering of 'Tears of Steel', 720p renders to an
average 2.1 Mbps and 1080p to average 4.0 Mbps, which is
actually about the same as our current constant bitrate WebMs.
Note that instantaneous bandwidth peaks rather higher during
scenes with high complexity!

Bug: T108172
Change-Id: I2a95708d25c64f747353dd9f6157894b51034cb3
---
M TimedMediaHandler.php
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php
index 68838b1..1d4faf1 100644
--- a/TimedMediaHandler.php
+++ b/TimedMediaHandler.php
@@ -172,6 +172,14 @@
// High-bitrate Ogg stream
WebVideoTranscode::ENC_OGV_480P,
 
+   // Variable-bitrate HD Ogg stream
+   // for ogv.js on reasonably speedy machines
+   WebVideoTranscode::ENC_OGV_720P,
+
+   // Variable-bitrate HD Ogg stream
+   // for ogv.js on reasonably speedy machines
+   WebVideoTranscode::ENC_OGV_1080P,
+
 /*
// MP4 H.264/AAC
// Primary format for the Apple/Microsoft world

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a95708d25c64f747353dd9f6157894b51034cb3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Deploy Graphoid with Scap3 - change (operations/puppet)

2016-06-21 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged.

Change subject: Deploy Graphoid with Scap3
..


Deploy Graphoid with Scap3

Change-Id: Ic741c7e339a8f038ba9c08faa62360a070b254a0
---
M hieradata/common/role/deployment.yaml
M hieradata/common/scap/server.yaml
M modules/graphoid/manifests/init.pp
3 files changed, 2 insertions(+), 5 deletions(-)

Approvals:
  Gehel: Looks good to me, approved
  Mobrovac: Looks good to me, but someone else must approve
  Yurik: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/hieradata/common/role/deployment.yaml 
b/hieradata/common/role/deployment.yaml
index 5b92a1e..94f5135 100644
--- a/hieradata/common/role/deployment.yaml
+++ b/hieradata/common/role/deployment.yaml
@@ -44,10 +44,6 @@
 service_name: zotero
   zotero/translators:
 upstream: 
https://gerrit.wikimedia.org/r/mediawiki/services/zotero/translators
-  graphoid/deploy:
-upstream: https://gerrit.wikimedia.org/r/mediawiki/services/graphoid/deploy
-service_name: graphoid
-checkout_submodules: true
   rcstream/rcstream:
 upstream: https://gerrit.wikimedia.org/r/mediawiki/services/rcstream
 service_name: rcstream
diff --git a/hieradata/common/scap/server.yaml 
b/hieradata/common/scap/server.yaml
index 5387b08..c9579c0 100644
--- a/hieradata/common/scap/server.yaml
+++ b/hieradata/common/scap/server.yaml
@@ -55,8 +55,8 @@
   mobileapps/deploy: {}
 
   kartotherian/deploy: {}
-
   tilerator/deploy: {}
+  graphoid/deploy: {}
 
   # cxserver is the ContentTranslation server.
   cxserver/deploy:
diff --git a/modules/graphoid/manifests/init.pp 
b/modules/graphoid/manifests/init.pp
index c00bd24..652f526 100644
--- a/modules/graphoid/manifests/init.pp
+++ b/modules/graphoid/manifests/init.pp
@@ -48,6 +48,7 @@
 },
 has_spec=> true,
 healthcheck_url => '',
+deployment  => 'scap3',
 }
 
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic741c7e339a8f038ba9c08faa62360a070b254a0
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Yurik 
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 scap3 config - change (mediawiki...deploy)

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

Change subject: Added scap3 config
..


Added scap3 config

Change-Id: I3266d2a8cc96183a5a68ab07889a6b342b7219ac
---
A scap/scap.cfg
A scap/target-canary
A scap/targets
A scap/targets-betacluster
4 files changed, 26 insertions(+), 0 deletions(-)

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



diff --git a/scap/scap.cfg b/scap/scap.cfg
new file mode 100644
index 000..baff8bb
--- /dev/null
+++ b/scap/scap.cfg
@@ -0,0 +1,20 @@
+[global]
+git_repo: graphoid/deploy
+git_deploy_dir: /srv/deployment
+git_repo_user: deploy-service
+ssh_user: deploy-service
+server_groups: canary, default
+canary_dsh_targets: target-canary
+dsh_targets: targets
+git_submodules: True
+service_name: graphoid
+service_port: 19000
+lock_file: /tmp/scap.graphoid.lock
+
+[wmnet]
+git_server: tin.eqiad.wmnet
+
+# [deployment-prep.eqiad.wmflabs]
+# git_server: deployment-tin.deployment-prep.eqiad.wmflabs
+# server_groups: default
+# dsh_targets: targets-betacluster
diff --git a/scap/target-canary b/scap/target-canary
new file mode 100644
index 000..49e9dd7
--- /dev/null
+++ b/scap/target-canary
@@ -0,0 +1 @@
+scb2001.codfw.wmnet
diff --git a/scap/targets b/scap/targets
new file mode 100644
index 000..0cd7f5f
--- /dev/null
+++ b/scap/targets
@@ -0,0 +1,4 @@
+scb1001.eqiad.wmnet
+scb1002.eqiad.wmnet
+scb2001.codfw.wmnet
+scb2002.codfw.wmnet
diff --git a/scap/targets-betacluster b/scap/targets-betacluster
new file mode 100644
index 000..29d91ac
--- /dev/null
+++ b/scap/targets-betacluster
@@ -0,0 +1 @@
+deployment-graphoid.deployment-prep.eqiad.wmflabs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3266d2a8cc96183a5a68ab07889a6b342b7219ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Yurik 
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 scap3 config - change (mediawiki...deploy)

2016-06-21 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Added scap3 config
..

Added scap3 config

Change-Id: I3266d2a8cc96183a5a68ab07889a6b342b7219ac
---
A scap/scap.cfg
A scap/target-canary
A scap/targets
A scap/targets-betacluster
4 files changed, 26 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/graphoid/deploy 
refs/changes/58/295358/1

diff --git a/scap/scap.cfg b/scap/scap.cfg
new file mode 100644
index 000..baff8bb
--- /dev/null
+++ b/scap/scap.cfg
@@ -0,0 +1,20 @@
+[global]
+git_repo: graphoid/deploy
+git_deploy_dir: /srv/deployment
+git_repo_user: deploy-service
+ssh_user: deploy-service
+server_groups: canary, default
+canary_dsh_targets: target-canary
+dsh_targets: targets
+git_submodules: True
+service_name: graphoid
+service_port: 19000
+lock_file: /tmp/scap.graphoid.lock
+
+[wmnet]
+git_server: tin.eqiad.wmnet
+
+# [deployment-prep.eqiad.wmflabs]
+# git_server: deployment-tin.deployment-prep.eqiad.wmflabs
+# server_groups: default
+# dsh_targets: targets-betacluster
diff --git a/scap/target-canary b/scap/target-canary
new file mode 100644
index 000..49e9dd7
--- /dev/null
+++ b/scap/target-canary
@@ -0,0 +1 @@
+scb2001.codfw.wmnet
diff --git a/scap/targets b/scap/targets
new file mode 100644
index 000..0cd7f5f
--- /dev/null
+++ b/scap/targets
@@ -0,0 +1,4 @@
+scb1001.eqiad.wmnet
+scb1002.eqiad.wmnet
+scb2001.codfw.wmnet
+scb2002.codfw.wmnet
diff --git a/scap/targets-betacluster b/scap/targets-betacluster
new file mode 100644
index 000..29d91ac
--- /dev/null
+++ b/scap/targets-betacluster
@@ -0,0 +1 @@
+deployment-graphoid.deployment-prep.eqiad.wmflabs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3266d2a8cc96183a5a68ab07889a6b342b7219ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] Simplify node class comparison in converter - change (VisualEditor/VisualEditor)

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

Change subject: Simplify node class comparison in converter
..


Simplify node class comparison in converter

Change-Id: Id333bce0a3fee11f7161ccafa858607cf4a81fec
---
M src/dm/ve.dm.Converter.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js
index 9699e7b..81aeb1c 100644
--- a/src/dm/ve.dm.Converter.js
+++ b/src/dm/ve.dm.Converter.js
@@ -615,7 +615,7 @@
type = ve.dm.LinearData.static.getType( data[ i ] );
if ( type ) {
itemClass = modelRegistry.lookup( type ) || 
ve.dm.AlienNode;
-   if ( !( itemClass.prototype === 
targetClass.prototype || itemClass.prototype instanceof targetClass ) ) {
+   if ( !( itemClass === targetClass || 
itemClass.prototype instanceof targetClass ) ) {
return false;
}
} else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id333bce0a3fee11f7161ccafa858607cf4a81fec
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add a node-type index - change (VisualEditor/VisualEditor)

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

Change subject: Add a node-type index
..


Add a node-type index

Bug: T135950
Change-Id: I51ae4491c26851f9a590825bff962c917bc77ee1
---
M src/dm/ve.dm.Document.js
1 file changed, 87 insertions(+), 6 deletions(-)

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



diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js
index 28f0ccb..8b34f45 100644
--- a/src/dm/ve.dm.Document.js
+++ b/src/dm/ve.dm.Document.js
@@ -50,6 +50,7 @@
// Properties
this.parentDocument = parentDocument;
this.completeHistory = [];
+   this.nodesByType = {};
 
if ( data instanceof ve.dm.ElementLinearData ) {
// Pre-split ElementLinearData
@@ -306,6 +307,7 @@
// The end state is stack = [ [this.documentNode] [ array, of, its, 
children ] ]
// so attach all nodes in stack[1] to the root node
ve.batchSplice( this.documentNode, 0, 0, currentStack );
+   this.updateNodesByType( [ this.documentNode ], [] );
 
doc.buildingNodeTree = false;
 };
@@ -954,16 +956,19 @@
  * @return {ve.dm.Node[]} Array containing the rebuilt/inserted nodes
  */
 ve.dm.Document.prototype.rebuildNodes = function ( parent, index, numNodes, 
offset, newLength ) {
-   var // Get a slice of the document where it's been changed
-   data = this.data.sliceObject( offset, offset + newLength ),
+   // Get a slice of the document where it's been changed
+   var data = this.data.sliceObject( offset, offset + newLength ),
// Build document fragment from data
fragment = new this.constructor( data, this.htmlDocument, this 
),
// Get generated child nodes from the document fragment
-   nodes = fragment.getDocumentNode().getChildren();
-   // Replace nodes in the model tree
-   ve.batchSplice( parent, index, numNodes, nodes );
+   addedNodes = fragment.getDocumentNode().getChildren(),
+   // Replace nodes in the model tree
+   removedNodes = ve.batchSplice( parent, index, numNodes, 
addedNodes );
+
+   this.updateNodesByType( addedNodes, removedNodes );
+
// Return inserted nodes
-   return nodes;
+   return addedNodes;
 };
 
 /**
@@ -981,6 +986,82 @@
 };
 
 /**
+ * Update the nodes-by-type index
+ *
+ * @param {ve.dm.Node[]} addedNodes Added nodes
+ * @param {ve.dm.Node[]} removedNodes Removed nodes
+ */
+ve.dm.Document.prototype.updateNodesByType = function ( addedNodes, 
removedNodes ) {
+   var doc = this;
+
+   function remove( node ) {
+   var type = node.getType(),
+   nodes = doc.nodesByType[ type ] || [],
+   index = nodes.indexOf( node );
+
+   if ( index !== -1 ) {
+   nodes.splice( index, 1 );
+   if ( !nodes.length ) {
+   delete doc.nodesByType[ type ];
+   }
+   }
+   }
+
+   function add( node ) {
+   var type = node.getType(),
+   nodes = doc.nodesByType[ type ] = doc.nodesByType[ type 
] || [];
+
+   nodes.push( node );
+   }
+
+   function traverse( nodes, action ) {
+   nodes.forEach( function ( node ) {
+   if ( node.hasChildren() ) {
+   node.traverse( action );
+   }
+   action( node );
+   } );
+   }
+
+   traverse( removedNodes, remove );
+   traverse( addedNodes, add );
+};
+
+/**
+ * Get all nodes in the tree for a specific type
+ *
+ * If a string type is passed only nodes of that exact type will be returned,
+ * if a node class is passed, all sub types will be matched.
+ *
+ * String type matching will be faster than class matching.
+ *
+ * @param {string|Function} type Node type name or node constructor
+ * @param {boolean} sort Sort nodes by document order
+ * @return {ve.dm.Node[]} Nodes of a specific type
+ */
+ve.dm.Document.prototype.getNodesByType = function ( type, sort ) {
+   var t, nodeType,
+   nodes = [];
+   if ( type instanceof Function ) {
+   for ( t in this.nodesByType ) {
+   nodeType = ve.dm.nodeFactory.lookup( t );
+   if ( nodeType === type || nodeType.prototype instanceof 
type ) {
+   nodes = nodes.concat( this.getNodesByType( t ) 
);
+   }
+   }
+   } else {
+   nodes = this.nodesByType[ type ];
+   }
+
+   if ( sort ) {
+   nodes.sort( function ( a, b ) {
+   return a.getOffset() - b.getOffset();
+   } );
+   }
+   return nodes;
+};
+
+/**
  * Fix up data so it can safely be inserted 

  1   2   >