[MediaWiki-commits] [Gerrit] Remove usage of deprecated ApiResult::getData() - change (mediawiki...MobileFrontend)

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

Change subject: Remove usage of deprecated ApiResult::getData()
..


Remove usage of deprecated ApiResult::getData()

ApiResult was replaced by it's more powerful pendant ApiResult::getResultData(),
and getData() was deprecated in MediaWiki 1.25.

This commit replaces the deprecated usage of ApiResult::getData().

Change-Id: I38172f8add75e8ef55b1411029b0eb323836d0d1
---
M includes/specials/SpecialMobileCite.php
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/includes/specials/SpecialMobileCite.php 
b/includes/specials/SpecialMobileCite.php
index 5fd7bef..a4cada1 100644
--- a/includes/specials/SpecialMobileCite.php
+++ b/includes/specials/SpecialMobileCite.php
@@ -31,10 +31,12 @@
)
);
$api->execute();
-   $data = $api->getResult()->getData();
+   $data = $api->getResult()->getResultData( [ "mobileview", 
"sections" ], [
+   'Strip' => 'all',
+   ] );
$html = '';
-   if ( isset( $data["mobileview"]["sections"] ) ) {
-   foreach ( $data["mobileview"]["sections"] as $section ) 
{
+   if ( $data !== null ) {
+   foreach ( $data as $section ) {
$html .= $section['*'];
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I38172f8add75e8ef55b1411029b0eb323836d0d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mw.Upload.BookletLayout: Better handle error messages from A... - change (mediawiki/core)

2016-06-22 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: mw.Upload.BookletLayout: Better handle error messages from 
AbuseFilter and TitleBlacklist
..

mw.Upload.BookletLayout: Better handle error messages from AbuseFilter and 
TitleBlacklist

And hopefully, also other extensions, if they follow the format where
result.error.message is a message key that can be used to report the
error to the user.

The message text is loaded dynamically from the foreign wiki.

* TitleBlacklist: I42a0c5b0ea7e61088dd609b764dd7d1396c60cd5
* AbuseFilter: I5780eae96930211191ecd874aacf53fdacb58f89

Bug: T115260
Bug: T137841
Change-Id: I5d1a289cf3d3b9de53047566172ab19a859e608e
---
M languages/i18n/en.json
M languages/i18n/qqq.json
M resources/Resources.php
M resources/src/mediawiki/api/messages.js
M resources/src/mediawiki/mediawiki.Upload.BookletLayout.js
5 files changed, 55 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/295610/1

diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index ac23f6d..1f52400 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -4057,7 +4057,6 @@
"mw-widgets-dateinput-placeholder-month": "-MM",
"mw-widgets-titleinput-description-new-page": "page does not exist yet",
"mw-widgets-titleinput-description-redirect": "redirect to $1",
-   "api-error-blacklisted": "Please choose a different, descriptive 
title.",
"sessionmanager-tie": "Cannot combine multiple request authentication 
types: $1.",
"sessionprovider-generic": "$1 sessions",
"sessionprovider-mediawiki-session-cookiesessionprovider": 
"cookie-based sessions",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index db50cd2..49718e5 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -4238,7 +4238,6 @@
"mw-widgets-dateinput-placeholder-month": "Placeholder displayed in a 
date input field when it's empty, representing a date format with 4 digits for 
year and 2 digits for month, separated with hyphens (without a day). This 
should be uppercase, if possible, and must not include any additional 
explanations. If there is no good way to translate it, make this message 
blank.",
"mw-widgets-titleinput-description-new-page": "Description label for a 
new page in the title input widget.",
"mw-widgets-titleinput-description-redirect": "Description label for a 
redirect in the title input widget.",
-   "api-error-blacklisted": "Used as error message.\n\nFollowed by the 
link {{msg-mw|Mwe-upwiz-feedback-blacklist-info-prompt}}.",
"sessionmanager-tie": "Used as an error message when multiple session 
sources are tied in priority.\n\nParameters:\n* $1 - List of dession type 
descriptions, from messages like 
{{msg-mw|sessionprovider-mediawiki-session-cookiesessionprovider}}.",
"sessionprovider-generic": "Used to create a generic session type 
description when one isn't provided via the proper message. Should be phrased 
to make sense when added to a message such as 
{{msg-mw|cannotloginnow-text}}.\n\nParameters:\n* $1 - PHP classname.",
"sessionprovider-mediawiki-session-cookiesessionprovider": "Description 
of the sessions provided by the CookieSessionProvider class, which use HTTP 
cookies. Should be phrased to make sense when added to a message such as 
{{msg-mw|cannotloginnow-text}}.",
diff --git a/resources/Resources.php b/resources/Resources.php
index e31e77e..cf8c2e9 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1298,7 +1298,6 @@
'filename-thumb-name',
'badfilename',
'protectedpagetext',
-   'api-error-blacklisted', // HACK
],
],
'mediawiki.ForeignStructuredUpload.BookletLayout' => [
diff --git a/resources/src/mediawiki/api/messages.js 
b/resources/src/mediawiki/api/messages.js
index df21eb2..9ba562e 100644
--- a/resources/src/mediawiki/api/messages.js
+++ b/resources/src/mediawiki/api/messages.js
@@ -44,6 +44,25 @@
 */
loadMessages: function ( messages ) {
return this.getMessages( messages ).then( $.proxy( 
mw.messages, 'set' ) );
+   },
+
+   /**
+* Loads a set of mesages and add them to mw.messages. Only 
messages that are not already known
+* are loaded. If all messages are known, the returned promise 
is resolved immediately.
+*
+* @param {Array} messages Messages to retrieve
+* @return {jQuery.Promise}
+*/
+   loadMessagesIfMissing: function ( messages ) {
+   var missing = messages.filter( function ( msg ) {
+   return 

[MediaWiki-commits] [Gerrit] Remove usage of deprecated ApiResult::getData() - change (mediawiki...MobileFrontend)

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

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

Change subject: Remove usage of deprecated ApiResult::getData()
..

Remove usage of deprecated ApiResult::getData()

ApiResult was replaced by it's more powerful pendant ApiResult::getResultData(),
and getData() was deprecated in MediaWiki 1.25.

This commit replaces the deprecated usage of ApiResult::getData().

Change-Id: I38172f8add75e8ef55b1411029b0eb323836d0d1
---
M includes/specials/SpecialMobileCite.php
1 file changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/includes/specials/SpecialMobileCite.php 
b/includes/specials/SpecialMobileCite.php
index 5fd7bef..a4cada1 100644
--- a/includes/specials/SpecialMobileCite.php
+++ b/includes/specials/SpecialMobileCite.php
@@ -31,10 +31,12 @@
)
);
$api->execute();
-   $data = $api->getResult()->getData();
+   $data = $api->getResult()->getResultData( [ "mobileview", 
"sections" ], [
+   'Strip' => 'all',
+   ] );
$html = '';
-   if ( isset( $data["mobileview"]["sections"] ) ) {
-   foreach ( $data["mobileview"]["sections"] as $section ) 
{
+   if ( $data !== null ) {
+   foreach ( $data as $section ) {
$html .= $section['*'];
}
}

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

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

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


[MediaWiki-commits] [Gerrit] Couple of tiny maintain-meta_p.py improvements - change (operations/software)

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

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

Change subject: Couple of tiny maintain-meta_p.py improvements
..

Couple of tiny maintain-meta_p.py improvements

Change-Id: I10ed26c27e96ba7d1f8f061be9ddeefb87fec554
---
M maintain-replicas/maintain-meta_p.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/08/295608/1

diff --git a/maintain-replicas/maintain-meta_p.py 
b/maintain-replicas/maintain-meta_p.py
index 1da8c9f..f193956 100644
--- a/maintain-replicas/maintain-meta_p.py
+++ b/maintain-replicas/maintain-meta_p.py
@@ -71,7 +71,7 @@
 read_list("visualeditor-default", "has_visualeditor", True)
 read_list("wikidataclient", "has_wikidata", True)
 
-for slice in ['s1', 's2', 's3', 's4', 's5', 's6', 's7']: # TODO: silver
+for slice in ['s1', 's2', 's3', 's4', 's5', 's6', 's7']: # TODO: 
silver/labtestweb2001
 read_list(slice, "slice", slice)
 
 for family in ["wikibooks", "wikidata", "wikinews", "wikiquote", "wikisource",
@@ -145,7 +145,7 @@
 dbh = pymysql.connect(host=dbhost, port=dbport, user=dbuser, 
passwd=dbpassword, charset='utf8')
 cursor = dbh.cursor()
 
-logging.info("Update/create meta tables on", dbhost + "...")
+logging.info("Update/create meta tables on", dbhost + ":" + str(dbport) + 
"...")
 cursor.execute("CREATE DATABASE IF NOT EXISTS meta_p DEFAULT CHARACTER SET 
utf8;")
 cursor.execute("""CREATE TABLE IF NOT EXISTS meta_p.wiki (
 dbname varchar(32) PRIMARY KEY,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10ed26c27e96ba7d1f8f061be9ddeefb87fec554
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
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] [WIP/POC/POS] Add python version of maintain-replicas script - change (operations/software)

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

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

Change subject: [WIP/POC/POS] Add python version of maintain-replicas script
..

[WIP/POC/POS] Add python version of maintain-replicas script

This does not include functionality that was split into maintain-meta_p.py last
year.

This (so far) deals with the following issues:
* It was written in Perl.
* Configuration was part of the script.
* It tried to parse ~/.my.cnf instead of getting them from it's own
  configuration.
* Configuration file couldn't be specified on the CLI

It still needs to:
* Allow specifying one database to work on only.
* BE TESTED.
* Be commented more
* Do less work in file scope?
* Pause and ask for confirmation of things
* Have a "dry run" mode.
* Be more verbose.
* Be more helpful to the user in case of failure.

Change-Id: Icc51fc9a23f2fcf4c19c7adc092662d7122471e1
---
A maintain-replicas/config.json
A maintain-replicas/maintain-replicas.py
2 files changed, 312 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/07/295607/1

diff --git a/maintain-replicas/config.json b/maintain-replicas/config.json
new file mode 100644
index 000..8f9d3ff
--- /dev/null
+++ b/maintain-replicas/config.json
@@ -0,0 +1,158 @@
+{
+"slices": [
+["labsdb1001.eqiad.wmnet", 3306],
+["labsdb1002.eqiad.wmnet", 3306],
+["labsdb1003.eqiad.wmnet", 3306]
+],
+"mysql_user": "root",
+"mysql_password": "password",
+"fullviews": [
+"abuse_filter_action", "abuse_filter_history",
+"aft_article_answer", "aft_article_answer_text",
+"aft_article_feedback_properties", 
"aft_article_feedback_ratings_rollup",
+"aft_article_feedback_select_rollup", "aft_article_field", 
"aft_article_field_group",
+"aft_article_field_option", "aft_article_filter_count", 
"aft_article_revision_feedback_ratings_rollup",
+"aft_article_revision_feedback_select_rollup", "article_assessment", 
"article_assessment_pages",
+"article_assessment_ratings", "article_feedback", 
"article_feedback_pages",
+"article_feedback_properties", "article_feedback_ratings", 
"article_feedback_revisions",
+"article_feedback_stats", "article_feedback_stats_types", "category", 
"categorylinks", "change_tag",
+"ep_articles", "ep_cas", "ep_courses", "ep_events", "ep_instructors", 
"ep_oas", "ep_orgs",
+"ep_revisions", "ep_students", "ep_users_per_course", "externallinks", 
"flaggedimages",
+"flaggedpage_config", "flaggedpage_pending", "flaggedpages", 
"flaggedrevs", "flaggedrevs_promote",
+"flaggedrevs_statistics", "flaggedrevs_stats", "flaggedrevs_stats2", 
"flaggedrevs_tracking",
+"flaggedtemplates", "geo_killlist", "geo_tags", "geo_updates", 
"globalimagelinks", "global_block_whitelist",
+"hashs", "hitcounter", "image", "imagelinks", "imagelinks_old", 
"interwiki", "iwlinks",
+"l10n_cache", "langlinks", "links", "localisation", 
"localisation_file_hash",
+"math", "module_deps", "msg_resource_links", "namespaces",
+"page", "page_broken", "pagelinks", "page_props", "page_restrictions", 
"pagetriage_log",
+"pagetriage_page", "pagetriage_page_tags", "pagetriage_tags", 
"pif_edits", "povwatch_log",
+"povwatch_subscribers", "protected_titles", "pr_index", "redirect", 
"renameuser_status", "site_identifiers",
+"sites", "site_stats", "tag_summary", "templatelinks", "transcode", 
"updatelog", "updates",
+"user_former_groups", "user_groups", "valid_tag", "wikilove_image_log",
+"wikilove_log", "global_group_permissions", 
"global_group_restrictions", "global_user_groups",
+"globalblocks", "localuser", "wikiset", "wb_changes", 
"wb_changes_dispatch", "wb_changes_subscription",
+"wb_entity_per_page", "wb_id_counters", "wb_items_per_site", 
"wb_property_info", "wb_terms",
+"wbc_entity_usage", "wbs_propertypairs"
+],
+"logging_whitelist": [
+"gblrights", "globalauth", "close", "lock", "gblblock", "managetags", 
"gather", "campus",
+"institution", "instructor", "online", "merge", "massmessage", 
"course", "stable", "import",
+"abusefilter", "student", "eparticle", "rights", 
"pagetriage-deletion", "protect",
+"pagetriage-curation", "thanks", "renameuser", "review", "block", 
"upload", "move",
+"delete", "patrol", "newusers"
+],
+"customviews": {
+"abuse_filter": {
+"source": "abuse_filter",
+"view": "select af_id, if(af_hidden,null,af_pattern) as 
af_pattern, af_user, af_user_text, af_timestamp, af_enabled, 
if(af_hidden,null,af_comments) as af_comments, af_public_comments, af_hidden, 
af_hit_count, af_throttled, af_deleted, af_actions, af_global, af_group"
+},
+"abuse_filter_log": {
+"source": 

[MediaWiki-commits] [Gerrit] In the News endpoint - change (mediawiki...mobileapps)

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

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

Change subject: In the News endpoint
..

In the News endpoint

Bug: T132767
Change-Id: I78eb6ba1aab9a5bc8edcaf20454db76f4a6b0f68
---
M lib/feed/most-read.js
A lib/feed/news.js
M lib/mobile-util.js
M lib/mwapi.js
M lib/parseDefinition.js
M lib/parsoid-access.js
M routes/aggregated.js
A routes/news.js
M spec.yaml
A test/features/news/news.js
10 files changed, 196 insertions(+), 14 deletions(-)


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

diff --git a/lib/feed/most-read.js b/lib/feed/most-read.js
index bb644ce..a132fd4 100644
--- a/lib/feed/most-read.js
+++ b/lib/feed/most-read.js
@@ -52,7 +52,7 @@
 goodTitles = blacklist.filter(rankedTitles)
   .slice(0, mwapi.API_QUERY_MAX_TITLES);
 queryTitlesList = constructQueryListFrom(goodTitles);
-return mwapi.requestMostReadMetadata(app, req, 
queryTitlesList.join('|'));
+return mwapi.getFeedPageListMetadata(app, req, 
queryTitlesList.join('|'));
 }).then(function (response) {
 api.checkResponseStatus(response);
 
diff --git a/lib/feed/news.js b/lib/feed/news.js
new file mode 100644
index 000..7ac88a1
--- /dev/null
+++ b/lib/feed/news.js
@@ -0,0 +1,80 @@
+'use strict';
+
+var domino = require('domino');
+var api = require('../api-util');
+var mUtil = require('../mobile-util');
+var mwapi = require('../mwapi');
+var parsoid = require('../parsoid-access');
+
+function promise(app, req) {
+req.params.title = 'Template:In_the_news';
+var result = {
+payload: [],
+meta: {}
+};
+return parsoid.getParsoidHtml(app, req)
+.then(function (response) {
+result.meta.etag = parsoid.getRevisionFromEtag(response.headers);
+
+var linkTitles = [];
+var doc = domino.createDocument(response.body);
+var newsList = doc.getElementsByTagName('ul')[0];
+var stories = newsList.getElementsByTagName('li');
+
+for (var j = 0, m = stories.length; j < m; j++) {
+var anchors = stories[j].getElementsByTagName('a');
+var story = {
+blurb: mUtil.stripMarkup(stories[j].innerHTML),
+links: {}
+};
+
+for (var i = 0, n = anchors.length; i < n; i++) {
+var anchor = anchors[i];
+var title = anchor.href.slice(1);
+story.links[title] = {};
+linkTitles.push(title);
+}
+
+result.payload.push(story);
+}
+return mwapi.getFeedPageListMetadata(app, req, linkTitles.join('|'));
+}).then(function(response) {
+api.checkResponseStatus(response);
+
+var query = response.body && response.body.query;
+var normalizations = query && query.normalized;
+var pages = query && query.pages;
+
+mUtil.adjustMemberKeys(normalizations, [['title', 'from'],
+['normalizedtitle', 'to']]);
+mUtil.adjustMemberKeys(pages, [['normalizedtitle', 'title']]);
+mUtil.mergeByProp(pages, normalizations, 'normalizedtitle');
+mUtil.fillInMemberKeys(pages, [['title', 'normalizedtitle']]);
+
+var pageResults = {};
+
+pages.forEach(function(page) {
+pageResults[page.title] = Object.assign(page, {
+description: page.terms
+ && page.terms.description
+ && page.terms.description[0],
+terms: undefined
+});
+});
+
+result.payload.forEach(function(story) {
+var linkTitles = story.links;
+for (var title in linkTitles) {
+if (linkTitles.hasOwnProperty(title)) {
+linkTitles[title] = pageResults[title];
+}
+}
+});
+
+return result;
+});
+}
+
+module.exports = {
+promise: promise
+};
\ No newline at end of file
diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 7730343..2860537 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -151,6 +151,13 @@
 return dateString + '/' + uuid.now().toString();
 }
 
+/**
+ * Strip HTML markup from a string.
+ */
+function stripMarkup(text) {
+return text.replace(/<[^>]*>/g, '');
+}
+
 function throw404(message) {
 throw new HTTPError({
 status: 404,
@@ -171,5 +178,6 @@
 mergeByProp: mergeByProp,
 adjustMemberKeys: adjustMemberKeys,
 fillInMemberKeys: fillInMemberKeys,
+stripMarkup: stripMarkup,
 throw404: throw404
 };
diff --git a/lib/mwapi.js b/lib/mwapi.js
index ba552d2..4645462 100644
--- a/lib/mwapi.js
+++ b/lib/mwapi.js
@@ -172,7 +172,7 @@
 };
 }
 
-function requestMostReadMetadata(app, req, titlesList) {
+function getFeedPageListMetadata(app, req, 

[MediaWiki-commits] [Gerrit] Don't abort EditFilterMergedContent hook - change (mediawiki...ConfirmEdit)

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

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

Change subject: Don't abort EditFilterMergedContent hook
..

Don't abort EditFilterMergedContent hook

Other extensions may want to abort the edit, too and add additional
error messages. If they're called after the ConfirmEdit hook, the user
usually runs into a re-submit loop. To prevent this, ConfirmEdit shouldn't
abort the hook execution after adding the need of a CAPTCHA. There's also
no reason to do this, so removing it.

Bug: T22661
Change-Id: I4da603f84575daea545b0b9ba9555bd43b5049a3
---
M SimpleCaptcha/Captcha.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/05/295605/1

diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php
index 63ed6d6..3221964 100644
--- a/SimpleCaptcha/Captcha.php
+++ b/SimpleCaptcha/Captcha.php
@@ -858,7 +858,6 @@
}
$this->addCaptchaAPI( $status->apiHookResult );
$page->ConfirmEdit_ActivateCaptcha = true;
-   return $legacyMode;
}
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4da603f84575daea545b0b9ba9555bd43b5049a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Whoops: Fix possible fragment duplication. - change (apps...wikipedia)

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

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

Change subject: Whoops: Fix possible fragment duplication.
..

Whoops: Fix possible fragment duplication.

Also fix options menu behavior when switching between fragments.

Change-Id: If83dd623b657f4b7be1689f0f3fff1f8998fd6d1
---
M app/src/main/java/org/wikipedia/MainActivity.java
M app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
3 files changed, 13 insertions(+), 17 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/MainActivity.java 
b/app/src/main/java/org/wikipedia/MainActivity.java
index 7e4812a..ec48b51 100644
--- a/app/src/main/java/org/wikipedia/MainActivity.java
+++ b/app/src/main/java/org/wikipedia/MainActivity.java
@@ -579,14 +579,16 @@
 }
 
 resetFragmentsToFeedOrPage();
-FragmentTransaction trans = 
getSupportFragmentManager().beginTransaction();
-trans.setCustomAnimations(R.anim.fade_in, R.anim.fade_out, 
R.anim.fade_in, R.anim.fade_out);
-trans.add(R.id.content_fragment_container, f);
-trans.addToBackStack(null);
-if (allowStateLoss) {
-trans.commitAllowingStateLoss();
-} else {
-trans.commit();
+if (getTopFragment() == null || (getTopFragment().getClass() != 
f.getClass())) {
+FragmentTransaction trans = 
getSupportFragmentManager().beginTransaction();
+trans.setCustomAnimations(R.anim.fade_in, R.anim.fade_out, 
R.anim.fade_in, R.anim.fade_out);
+trans.add(R.id.content_fragment_container, f);
+trans.addToBackStack(null);
+if (allowStateLoss) {
+trans.commitAllowingStateLoss();
+} else {
+trans.commit();
+}
 }
 afterFragmentChanged();
 }
diff --git 
a/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java 
b/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
index 78e6303..1162bcb 100644
--- a/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
+++ b/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
@@ -23,6 +23,7 @@
 
 public void setOverrideToolbar(@NonNull Toolbar toolbar) {
 overrideToolbar = toolbar;
+defaultToolbar.getMenu().clear();
 toolbarContainerView.setVisibility(View.GONE);
 setActivityToolbar(overrideToolbar);
 }
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index 7457550..c0df2ec 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -635,7 +635,8 @@
 @Override
 public void onPrepareOptionsMenu(Menu menu) {
 super.onPrepareOptionsMenu(menu);
-if (!isAdded() || getMainActivity().isSearching()) {
+if (!isAdded() || getMainActivity().isSearching()
+|| !(getMainActivity().getTopFragment() instanceof 
PageFragment)) {
 return;
 }
 
@@ -646,14 +647,6 @@
 MenuItem contentIssues = menu.findItem(R.id.menu_page_content_issues);
 MenuItem similarTitles = menu.findItem(R.id.menu_page_similar_titles);
 MenuItem themeChooserItem = 
menu.findItem(R.id.menu_page_font_and_theme);
-
-if (otherLangItem == null) {
-// On API <= 19, it looks like onPrepareOptionsMenu can be called 
before the menu
-// is actually inflated.
-// TODO: remove when this is better understood.
-L.logRemoteErrorIfProd(new RuntimeException("onPrepareOptionsMenu 
called with empty menu."));
-return;
-}
 
 if (pageLoadStrategy.isLoading() || errorState) {
 otherLangItem.setEnabled(false);

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

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

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


[MediaWiki-commits] [Gerrit] Make sure, that "Prompt me when entering a blank edit summar... - change (mediawiki/core)

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

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

Change subject: Make sure, that "Prompt me when entering a blank edit summary" 
works with Hooks
..

Make sure, that "Prompt me when entering a blank edit summary" works with Hooks

Currently, if an extension aborts the save of an edit (e.g. ConfirmEdit or
AbufeFilter), they add a message to resubmit the form (e.g. with the correct
CAPTCHA or after reading an information message). In this case, and in case
that the user activated the "Prompt me when entering a blank edit summary"
option, MediaWiki will ask to provide an edit summary or re-submit the form
to save the edit without a summary. After clicking submit again, an extension
maybe aborts the edit again (for the same reason as for the first time), and
the user need to re-submit the form again. After the submit, MediaWiki will ask
for the edit summary again. The user only sees this loop.

The cause is, that MediaWiki doesn't know, that the edit summary warning was
acknowledged by the user already. This commit changes how the 
wpIgnoreBlankSummary
hidden field is added to the form output. It now is added, if the 
wpIgnoreBlankSummary
form field was already set in the request. This is only the case, if the user 
already
clicked the save button again (after seeing the edit notice).

Bug: T12729
Change-Id: I53a6cf277f77e033d4b75e64731fd37b46c3926e
---
M includes/EditPage.php
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/295603/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 3292f70..39c4877 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -2480,7 +2480,7 @@
 * use the EditPage::showEditForm:fields hook instead.
 */
function showEditForm( $formCallback = null ) {
-   global $wgOut, $wgUser;
+   global $wgOut, $wgUser, $wgRequest;
 
# need to parse the preview early so that we know which 
templates are used,
# otherwise users with "show preview after edit box" will get a 
blank list
@@ -2593,7 +2593,11 @@
# 
# For a bit more sophisticated detection of blank summaries, 
hash the
# automatic one and pass that in the hidden field wpAutoSummary.
-   if ( $this->missingSummary || ( $this->section == 'new' && 
$this->nosummary ) ) {
+   if (
+   $this->missingSummary ||
+   $wgRequest->getBool( 'wpIgnoreBlankSummary' ) ||
+   ( $this->section == 'new' && $this->nosummary )
+   ) {
$wgOut->addHTML( Html::hidden( 'wpIgnoreBlankSummary', 
true ) );
}
 

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

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

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


[MediaWiki-commits] [Gerrit] Configure Kartotherian geoshapes support - change (operations/puppet)

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

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

Change subject: Configure Kartotherian geoshapes support
..

Configure Kartotherian geoshapes support

Bug: T134084
Change-Id: I65c50a9d60afd1349d74c2193748172f5a4a5d83
---
M modules/kartotherian/templates/config.yaml.erb
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/02/295602/1

diff --git a/modules/kartotherian/templates/config.yaml.erb 
b/modules/kartotherian/templates/config.yaml.erb
index dbd77b7..1a537d7 100644
--- a/modules/kartotherian/templates/config.yaml.erb
+++ b/modules/kartotherian/templates/config.yaml.erb
@@ -8,3 +8,12 @@
 cassandra-pswd: '<%= @cassandra_kartotherian_pass %>'
 
 sources: <%= @conf_sources %>
+
+# TODO: allowUserQueries should be removed when geoshapes are enabled in prod
+geoshapes:
+allowUserQueries: true
+host: localhost
+database: gis
+user: '<%= @pgsql_kartotherian_user %>'
+password: '<%= @pgsql_kartotherian_pass %>'
+table: planet_osm_polygon

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65c50a9d60afd1349d74c2193748172f5a4a5d83
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] Add forward-compatibility in preparation for region-level ge... - change (wikimedia...prince)

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

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

Change subject: Add forward-compatibility in preparation for region-level 
geodata
..

Add forward-compatibility in preparation for region-level geodata

Bug: T136257
Depends-On: Ia1d27922b911a3efd3106ac165ffda689e685261
Change-Id: Ibba3cf39d084eea6b4d633819bcf99c7acf51132
---
M server.R
M ui.R
2 files changed, 31 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/prince 
refs/changes/01/295601/1

diff --git a/server.R b/server.R
index 0b47c21..898d84a 100644
--- a/server.R
+++ b/server.R
@@ -64,12 +64,36 @@
   })
   
   output$country_breakdown_dygraph <- renderDygraph({
-country_data %>%
+if (input$group_us_regions) {
+  temp <- country_data
+  temp$`United States` <- rowSums(temp[, grepl("(United States)|(U\\.S\\. 
)", colnames(temp)), drop = FALSE])
+  temp <- temp[, grep("U.S.", colnames(temp), value = TRUE, invert = TRUE, 
fixed = TRUE)]
+} else {
+  temp <- country_data
+}
+if (input$hide_less_than_5) {
+  temp[, -1] <- apply(temp[, -1], 2, function(y) {
+return(replace(y, y < 5, NA))
+  })
+}
+temp %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_country_breakdown)) %>%
-  polloi::make_dygraph(xlab = "", ylab = "Users (%)", title = "Geographic 
breakdown of portal visitors") %>%
-  dyCSS(css = "www/inverse.css") %>%
+  { .[, apply(., 2, function(y) { return(sum(!is.na(y))) }) > 0] } %>%
+  {
+if (ncol(.) > 13) { # Maximum colors that color brewer supports is 12
+  # If we have more than 12 countries, we need to make the dygraph 
manually:
+  . <- xts::xts(.[, -1], order.by = .$date)
+  dg <- dygraph(., xlab = "Date", ylab = "Users (%)", main = 
"Geographic breakdown of portal visitors")
+  dg <- dyOptions(dg, strokeWidth = 3, colors = 
colorspace::rainbow_hcl(ncol(temp)-1),
+  drawPoints = FALSE, pointSize = 3, labelsKMB = TRUE, 
includeZero = TRUE)
+  dg
+} else {
+  polloi::make_dygraph(., xlab = "Date", ylab = "Users (%)", title = 
"Geographic breakdown of portal visitors")
+}
+  } %>%
+  dyLegend(labelsDiv = "country_breakdown_legend", show = "always", width 
= 400) %>%
   dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
-  dyLegend(labelsDiv = "country_breakdown_legend", show = "always", width 
= 400)
+  dyCSS(css = "www/inverse.css")
   })
   
   output$browser_selector_container <- renderUI({
diff --git a/ui.R b/ui.R
index db5a8a1..43b7a90 100644
--- a/ui.R
+++ b/ui.R
@@ -62,7 +62,9 @@
 includeMarkdown("./tab_documentation/dwelltime.md")
 ),
 tabItem(tabName = "country_breakdown",
-polloi::smooth_select("smoothing_country_breakdown"),
+
fluidRow(column(polloi::smooth_select("smoothing_country_breakdown"), width = 
4),
+ column(checkboxInput("group_us_regions", "Group U.S. 
regions", value = FALSE), width = 4),
+ column(checkboxInput("hide_less_than_5", "Hide countries 
with <5% traffic share", value = FALSE), width = 4)),
 div(dygraphOutput("country_breakdown_dygraph"),
 div(id = "country_breakdown_legend",
 style = "height: 60px; padding-top: 30px; padding-left: 
20px;"),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibba3cf39d084eea6b4d633819bcf99c7acf51132
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/prince
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] Complete list of legacy main pages, switch default to false - change (operations/mediawiki-config)

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

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

Change subject: Complete list of legacy main pages, switch default to false
..

Complete list of legacy main pages, switch default to false

After auditing which wiki projects use the legacy wgMFSpecialCaseMainPage
option, add them all to the mobilemainpagelegacy dblist.

This will force all new wikis and existing wikis not currently using
the special casing to be forced to not use it and educate existing
projects to move away from using it.

Bug: T138425
Change-Id: I0d5e658663fef08bd1cae1d059789af6b8145bee
---
M dblists/mobilemainpagelegacy.dblist
M wmf-config/InitialiseSettings.php
2 files changed, 168 insertions(+), 5 deletions(-)


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

diff --git a/dblists/mobilemainpagelegacy.dblist 
b/dblists/mobilemainpagelegacy.dblist
index 36749e9..1ae349f 100644
--- a/dblists/mobilemainpagelegacy.dblist
+++ b/dblists/mobilemainpagelegacy.dblist
@@ -1,3 +1,170 @@
+commons
+mediawiki
+metawiki
+wikivoyage
+wikispecies
+enwikiversity
+dewikiversity
+ptwikiversity
+frwikiversity
+brwikisource
+zhwikisource
+dawikisource
+hrwikisource
+etwikisource
+arwikisource
+idwikisource
+kowikisource
+ptwikisource
+svwikisource
+vecwikisource
+tawikisource
+tewikisource
+enwikisource
+elwikisource
+mlwikisource
+bewikisource
+bnwikisource
+guwikisource
+jawikisource
+itwikisource
+eswikisource
+plwikisource
+be-x-oldwikisource
+dewikisource
+frwikisource
+ukwikisource
+itwikinews
+sqwikinews
+zhwikinews
+enwikinews
+jawikinews
+ruwikinews
+frwikinews
+ukwikinews
+arwikinews
+dewikinews
+srwikinews
+nds-nlwiki
+rwwiki
+ndswiki
+mlwiki
+napwiki
+rmwiki
+sahwiki
+tetwiki
+sdwiki
+barwiki
+bawiki
+nlwiki
+kwwiki
+fiwiki
+ffwiki
+iswiki
+ilowiki
+kmwiki
+lezwiki
+kabwiki
+dsbwiki
+kywiki
+mtwiki
+nowiki
+nahwiki
+simplewiki
+slwiki
+svwiki
+scwiki
+hsbwiki
+guwiki
+krcwiki
+kuwiki
+astwiki
+bmwiki
+bewiki
+mywiki
+cawiki
+dewiki
+jawiki
+kgwiki
+mswiki
+newiki
+nnwiki
+oswiki
+tawiki
+scowiki
+tewiki
+uzwiki
+sqwiki
+hrwiki
+etwiki
+frwiki
+knwiki
+azbwiki
+lvwiki
+thwiki
+arwiki
+avwiki
+amwiki
+eowiki
+fowiki
+elwiki
+idwiki
+cywiki
+lnwiki
+cdowiki
+mnwiki
+minwiki
+plwiki
+scnwiki
+tlwiki
+zh-yuewiki
+dawiki
+alswiki
+itwiki
+rowiki
+huwiki
+orwiki
+hewiki
+mkwiki
+azwiki
+pnbwiki
+xhwiki
+yiwiki
+ptwiki
+suwiki
+ruwiki
+ckbwiki
+tyvwiki
+fywiki
+frrwiki
+fawiki
+srwiki
+tgwiki
+ukwiki
+sowiki
+bowiki
+zawiki
+be-x-oldwiki
+urwiki
+enwikibooks
+arwikibooks
+kmwikibooks
+mswikibooks
+newikibooks
+ptwikibooks
+siwikibooks
+zhwikibooks
+frwikibooks
+kowikibooks
+idwikibooks
+fawikibooks
+viwikibooks
+hrwikibooks
+dewikibooks
+trwikibooks
+cawikibooks
+ukwikibooks
+ruwikibooks
 hrwikiquote
 enwikiquote
 frwikiquote
@@ -20,7 +187,6 @@
 crwikiquote
 cswikiquote
 nawikiquote
-sawikiquote
 viwikiquote
 kawikiquote
 astwiktionary
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 56c2fb4..75a4795 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14242,10 +14242,7 @@
 ],
 
 'wgMFSpecialCaseMainPage' => [
-   'default' => true,
-   'wikidata' => false,
-   'wikiquote' => false, // T138129
-   'wiktionary' => false, // T138129
+   'default' => false,
'mobilemainpagelegacy' => true,
 ],
 

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

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

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


[MediaWiki-commits] [Gerrit] Split the JS codebase into several modules. - change (mediawiki...Kartographer)

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

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

Change subject: Split the JS codebase into several modules.
..

Split the JS codebase into several modules.

Previously, the module/resource "ext.kartographer.live"
contained all the dependencies, and was loaded for both
MapLink and MapFrame tags.

With this refactor:
* MapLink tag only loads "ext.kartographer.maplink"
* MapFrame tag only loads "ext.kartographer.mapframe"
* These two resources define the dependencies for each
tag.
* The dependencies for displaying an interactive map
are contained in "ext.kartographer.live"
* The dependencies for displaying a map in full screen
mode are contained in "ext.kartographer.fullscreen"

Bug: T134079
Change-Id: Ifdeb529c86709ae0890d4445afce972fa26c9521
---
M extension.json
M includes/Tag/MapFrame.php
M includes/Tag/MapLink.php
A modules/fullscreen/CloseControl.js
A modules/fullscreen/MapDialog.js
A modules/fullscreen/fullscreen.js
D modules/kartographer.MapDialog.js
M modules/kartographer.js
A modules/live/FullScreenControl.js
A modules/live/live.js
A modules/mapframe/mapframe.js
A modules/maplink/maplink.js
A modules/settings/settings.js
13 files changed, 904 insertions(+), 762 deletions(-)


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

diff --git a/extension.json b/extension.json
index 9431ee6..321c337 100644
--- a/extension.json
+++ b/extension.json
@@ -129,18 +129,70 @@
"desktop"
]
},
-   "ext.kartographer.live": {
+   "ext.kartographer.init": {
"dependencies": [
-   "mapbox",
"ext.kartographer",
-   "ext.kartographer.site",
-   "mediawiki.jqueryMsg",
-   "oojs-ui.styles.icons-media",
+   "mediawiki.jqueryMsg"
+   ],
+   "scripts": [
+   "modules/kartographer.js"
+   ],
+   "targets": [
+   "mobile",
+   "desktop"
+   ]
+   },
+   "ext.kartographer.maplink": {
+   "dependencies": [
+   "ext.kartographer.init",
"mediawiki.router"
],
"scripts": [
+   "modules/maplink/maplink.js"
+   ],
+   "targets": [
+   "mobile",
+   "desktop"
+   ]
+   },
+   "ext.kartographer.settings": {
+   "dependencies": [
+   "mapbox"
+   ],
+   "scripts": [
+   "modules/settings/settings.js"
+   ],
+   "targets": [
+   "mobile",
+   "desktop"
+   ]
+   },
+   "ext.kartographer.mapframe": {
+   "dependencies": [
+   "mapbox",
+   "ext.kartographer.init",
+   "mediawiki.router",
+   "ext.kartographer.live"
+   ],
+   "scripts": [
+   "modules/mapframe/mapframe.js"
+   ],
+   "targets": [
+   "mobile",
+   "desktop"
+   ]
+   },
+   "ext.kartographer.live": {
+   "dependencies": [
+   "mapbox",
+   "ext.kartographer.settings",
+   "mediawiki.router",
+   "oojs-ui.styles.icons-media"
+   ],
+   "scripts": [
"lib/leaflet.sleep.js",
-   "modules/kartographer.js"
+   "modules/live/FullScreenControl.js",
+   "modules/live/live.js"
],
"messages": [
"kartographer-attribution"
@@ -152,11 +204,16 @@
},
"ext.kartographer.fullscreen": {
"dependencies": [
+   "ext.kartographer.init",
"ext.kartographer.site",
+   

[MediaWiki-commits] [Gerrit] Follow-up I64f5f5a8: Update maintain-meta_p.py script for db... - change (operations/software)

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

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

Change subject: Follow-up I64f5f5a8: Update maintain-meta_p.py script for 
dblist move too
..

Follow-up I64f5f5a8: Update maintain-meta_p.py script for dblist move too

Change-Id: I1d717b058786f7a0c5b4697f7103e05f0cb51c8b
---
M maintain-replicas/maintain-meta_p.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/98/295598/1

diff --git a/maintain-replicas/maintain-meta_p.py 
b/maintain-replicas/maintain-meta_p.py
index b3b8998..1da8c9f 100644
--- a/maintain-replicas/maintain-meta_p.py
+++ b/maintain-replicas/maintain-meta_p.py
@@ -54,9 +54,9 @@
 
 subprocess.call(["git", "pull"], cwd = "mediawiki-config")
 
-dbs = {db : {} for db in 
open('mediawiki-config/all.dblist').read().splitlines()}
+dbs = {db : {} for db in 
open('mediawiki-config/dblists/all.dblist').read().splitlines()}
 def read_list(listFname, prop, val):
-for db in open('mediawiki-config/' + listFname + 
'.dblist').read().splitlines():
+for db in open('mediawiki-config/dblists/' + listFname + 
'.dblist').read().splitlines():
 if db in dbs:
 dbs[db][prop] = val
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d717b058786f7a0c5b4697f7103e05f0cb51c8b
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
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] Whoops: fix toolbar coordinator logic. - change (apps...wikipedia)

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

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

Change subject: Whoops: fix toolbar coordinator logic.
..

Whoops: fix toolbar coordinator logic.

- Show/hide the correct component in the coordinator.
- Make sure to clear out the OptionsMenu when in search mode.

Change-Id: I7070b73d20fb6bd4ec5140086176b2a41cd60c9c
---
M app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
2 files changed, 5 insertions(+), 3 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java 
b/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
index c2bc5f6..78e6303 100644
--- a/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
+++ b/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
@@ -35,7 +35,7 @@
 
 public void setSearchMode(boolean enabled) {
 if (overrideToolbar != null) {
-defaultToolbar.setVisibility(enabled ? View.VISIBLE : View.GONE);
+toolbarContainerView.setVisibility(enabled ? View.VISIBLE : 
View.GONE);
 }
 }
 
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index dba9f33..7457550 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -623,11 +623,13 @@
 
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
-if (!isAdded() || getMainActivity().isSearching()) {
+if (!isAdded()) {
 return;
 }
 menu.clear();
-inflater.inflate(R.menu.menu_page_actions, menu);
+if (!getMainActivity().isSearching()) {
+inflater.inflate(R.menu.menu_page_actions, menu);
+}
 }
 
 @Override

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

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

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


[MediaWiki-commits] [Gerrit] Allow setting a custom message for filters that disallow act... - change (mediawiki...AbuseFilter)

2016-06-22 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Allow setting a custom message for filters that disallow actions
..

Allow setting a custom message for filters that disallow actions

We already have the code to produce the right response if a custom
message is set, but the user interface did not allow setting it.

Bug: T138435
Change-Id: Ib47810f78dcf1c8b01fd5e7dff9c5821e2447bbe
---
M Views/AbuseFilterViewEdit.php
1 file changed, 42 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/96/295596/1

diff --git a/Views/AbuseFilterViewEdit.php b/Views/AbuseFilterViewEdit.php
index 7cee9c7..4f2dbcf 100644
--- a/Views/AbuseFilterViewEdit.php
+++ b/Views/AbuseFilterViewEdit.php
@@ -655,11 +655,17 @@
array( 'disabled' => '1', 'class' => 
'mw-abusefilter-action-checkbox' ) );
return Xml::tags( 'p', null, $checkbox );
case 'warn':
+   case 'disallow':
global $wgAbuseFilterDefaultWarningMessage;
$output = '';
+   // abusefilter-edit-action-warn, 
abusefilter-edit-action-disallow
+   $message = 'abusefilter-edit-action-' . $action;
+   // wpFilterActionWarn, wpFilterActionDisallow
+   $form_field = 'wpFilterAction' . ucfirst( 
$action );
+   $status = $set;
$checkbox = Xml::checkLabel(
-   $this->msg( 
'abusefilter-edit-action-warn' )->text(),
-   'wpFilterActionWarn',
+   $this->msg( $message )->text(),
+   $form_field,

"mw-abusefilter-action-checkbox-$action",
$set,
array( 'class' => 
'mw-abusefilter-action-checkbox' ) + $cbReadOnlyAttrib );
@@ -667,51 +673,54 @@
if ( $set ) {
$warnMsg = $parameters[0];
} elseif (
-   $row &&
+   $action === 'warn' && $row &&
isset( $row->af_group ) && 
$row->af_group &&
isset( 
$wgAbuseFilterDefaultWarningMessage[$row->af_group] )
) {
$warnMsg = 
$wgAbuseFilterDefaultWarningMessage[$row->af_group];
-   } else {
+   } elseif ( $action === 'warn' ) {
$warnMsg = 'abusefilter-warning';
+   } else {
+   $warnMsg = 'abusefilter-disallow';
}
 
-   $warnFields['abusefilter-edit-warn-message'] =
-   $this->getExistingSelector( $warnMsg );
-   
$warnFields['abusefilter-edit-warn-other-label'] =
+   $warnFields["abusefilter-edit-warn-message"] =
+   $this->getExistingSelector( $action, 
$warnMsg );
+   
$warnFields["abusefilter-edit-warn-other-label"] =
Xml::input(
-   'wpFilterWarnMessageOther',
+   // wpFilterWarnMessageOther, 
wpFilterDisallowMessageOther
+   'wpFilter' . ucfirst( $action ) 
. 'MessageOther',
45,
$warnMsg,
-   array( 'id' => 
'mw-abusefilter-warn-message-other' ) + $cbReadOnlyAttrib
+   array( 'id' => 
"mw-abusefilter-warn-message-other" ) + $cbReadOnlyAttrib
);
 
$previewButton = Xml::element(
'input',
array(
'type' => 'button',
-   'id' => 
'mw-abusefilter-warn-preview-button',
-   'value' => $this->msg( 
'abusefilter-edit-warn-preview' )->text()
+   'id' => 

[MediaWiki-commits] [Gerrit] Disable special casing of main page where it is not required - change (operations/mediawiki-config)

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

Change subject: Disable special casing of main page where it is not required
..


Disable special casing of main page where it is not required

This feature continues to confuse people and its demise should be
accelerated rather than encouraged.

Plan is to disable config variable where the feature is not being used
to make it more obvious where changes need to be made.

* Disable on wikidata
* Disable on Wikitionary's not using the main page special casing
(via audit)
* Disable on Wikiquote's not using the main page special casing

Change-Id: I68090845d48b8598592b7c9a19943e9d60529239
---
A dblists/mobilemainpagelegacy.dblist
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
3 files changed, 75 insertions(+), 1 deletion(-)

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



diff --git a/dblists/mobilemainpagelegacy.dblist 
b/dblists/mobilemainpagelegacy.dblist
new file mode 100644
index 000..36749e9
--- /dev/null
+++ b/dblists/mobilemainpagelegacy.dblist
@@ -0,0 +1,66 @@
+hrwikiquote
+enwikiquote
+frwikiquote
+nlwikiquote
+dewikiquote
+dawikiquote
+zhwikiquote
+ruwikiquote
+tewikiquote
+tawikiquote
+etwikiquote
+trwikiquote
+ptwikiquote
+suwikiquote
+rowikiquote
+urwikiquote
+itwikiquote
+eswikiquote
+alswikiquote
+crwikiquote
+cswikiquote
+nawikiquote
+sawikiquote
+viwikiquote
+kawikiquote
+astwiktionary
+cawiktionary
+nlwiktionary
+zhwiktionary
+hrwiktionary
+jawiktionary
+mswiktionary
+simplewiktionary
+svwiktionary
+enwiktionary
+etwiktionary
+hiwiktionary
+idwiktionary
+ugwiktionary
+ltwiktionary
+mlwiktionary
+trwiktionary
+dewiktionary
+elwiktionary
+plwiktionary
+fawiktionary
+orwiktionary
+ruwiktionary
+tawiktionary
+uzwiktionary
+dawiktionary
+iowiktionary
+viwiktionary
+cswiktionary
+biwiktionary
+fiwiktionary
+frwiktionary
+gnwiktionary
+alswiktionary
+vecwiktionary
+lbwiktionary
+pnbwiktionary
+akwiktionary
+ptwiktionary
+crwiktionary
+skwiktionary
\ No newline at end of file
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 77f6b6c..3e971ea 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', 'mobilemainpagelegacy'
] as $tag ) {
$dblist = MWWikiversions::readDbListFile( $tag );
if ( in_array( $wgDBname, $dblist ) ) {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 287f1b6..37216a6 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14242,6 +14242,14 @@
'wikivoyage' => [ 'h2', 'h3', 'h4', 'h5', 'h6' ], // T110436, T110837
 ],
 
+'wgMFSpecialCaseMainPage' => [
+   'default' => true,
+   'wikidata' => false,
+   'wikiquote' => false, // T138129
+   'wiktionary' => false, // T138129
+   'mobilemainpagelegacy' => true,
+],
+
 'wgMFRemovableClasses' => [
'default' => [
'base' => [ '.navbox', '.nomobile' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68090845d48b8598592b7c9a19943e9d60529239
Gerrit-PatchSet: 7
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] RELEASE-NOTES: Don't imply that HHVM 3.1 is supported - change (mediawiki/core)

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

Change subject: RELEASE-NOTES: Don't imply that HHVM 3.1 is supported
..


RELEASE-NOTES: Don't imply that HHVM 3.1 is supported

HHVM 3.1 is no longer supported by Facebook, not packaged by any Linux
distribution I know of, and MediaWiki is not routinely tested with it
(e.g. neither Wikimedia Jenkins nor Travis CI runs automated tests
using HHVM 3.1).

The Compatibility section already has a note that "There is experimental
support for HHVM 3.6.5 or later." So instead just refer to that section.
(HHVM 3.6 is also no longer supported by Facebook or still used by
Wikimedia, as far as I know, though that's a separate matter.)

Change-Id: I62352f0edc6b9f95acaaef4cb717990e52db1146
---
M RELEASE-NOTES-1.27
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 79455cb..d291f00 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -6,8 +6,8 @@
 production.
 
 === PHP version requirement ===
-As of 1.27, MediaWiki now requires PHP 5.5.9 or higher. This corresponds with
-HHVM 3.1. Additionally, the following PHP extensions are required:
+As of 1.27, MediaWiki now requires PHP 5.5.9 or higher (see Compatibility
+section). Additionally, the following PHP extensions are required:
 * ctype
 * iconv
 * json

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62352f0edc6b9f95acaaef4cb717990e52db1146
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: PleaseStand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove references to AdminSettings.php - change (mediawiki/core)

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

Change subject: Remove references to AdminSettings.php
..


Remove references to AdminSettings.php

The use of this file is no longer possible. The few remaining strings
haven't been updated in a long time, and these references just had to be
removed now.

Bug: T138313
Change-Id: I06f66c0ca7abd4679136151bcb1d8a97d4f6a651
---
M includes/installer/i18n/ar.json
M includes/installer/i18n/ba.json
M includes/installer/i18n/nb.json
M includes/installer/i18n/ru.json
M includes/installer/i18n/tl.json
5 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/includes/installer/i18n/ar.json b/includes/installer/i18n/ar.json
index 4d16d45..10a4426 100644
--- a/includes/installer/i18n/ar.json
+++ b/includes/installer/i18n/ar.json
@@ -20,7 +20,7 @@
"config-localsettings-badkey": "مفتاح الترقية الذي قدمته غير صحيح.",
"config-upgrade-key-missing": "تنصيب موجود للميدياويكي قد تم 
اكتشافه.\nلترقية هذا التنصيب، الرجاء وضع السطر أسفل 
LocalSettings.php الخاصة بك:\n\n$1",
"config-localsettings-incomplete": "صفحة LocalSettings.php 
يبدو أنها ناقصة.\nالمتغير $1 لم يتم تعيينه.\nالرجاء تغيير 
LocalSettings.php لكي يتم تعيين المتغير، ثم اضغط على 
\"{{int:Config-continue}}\".",
-   "config-localsettings-connection-error": "تمت مصادفة خطأ أثناء الاتصال 
بقاعدة البيانات باستخدام الإعدادات المحددة في LocalSettings.php أو 
AdminSettings.php. الرجاء إصلاح هذه الإعدادات وحاول مجددًا.\n\n$1",
+   "config-localsettings-connection-error": "تمت مصادفة خطأ أثناء الاتصال 
بقاعدة البيانات باستخدام الإعدادات المحددة في LocalSettings.php أو 
LocalSettings.php. الرجاء إصلاح هذه الإعدادات وحاول مجددًا.\n\n$1",
"config-session-error": "خطأ في بدء الجلسة: $1",
"config-session-expired": "يبدو أن بيانات جلستك قد انتهت 
صلاحيتها.\nالجلسات مكونة مدى الحياة من $1.\nيمكنك زيادة هذه بتعيين 
session.gc_maxlifetime في php.ini.\nأعد تشغيل عميل التثبيت.",
"config-no-session": "بيانات جلستك قد ضاعت!\nتحقق من php.ini للتأكد أن 
session.save_path تم تعيينه كدليل مناسب.",
diff --git a/includes/installer/i18n/ba.json b/includes/installer/i18n/ba.json
index 80105f2..762efbc 100644
--- a/includes/installer/i18n/ba.json
+++ b/includes/installer/i18n/ba.json
@@ -22,7 +22,7 @@
"config-localsettings-badkey": "Дөрөҫ булмаған асҡыс күрһәттегеҙ",
"config-upgrade-key-missing": "Ҡуйылған MediaWiki копияһы булыуы 
асыҡланды. Яңыртыу өсөн файл аҙағында ҡуйығыҙ: 
LocalSettings.php:\n\n$1",
"config-localsettings-incomplete": "Ғәмәлдәге 
LocalSettings.php файла тулған. $1 билдәләнмәгән. Зинһар өсөн 
LocalSettings.php кодын үҙгәртегеҙ. Һуңынан ошонда сиртегеҙ 
«{{int:Config-continue}}».",
-   "config-localsettings-connection-error": 
"LocalSettings.php көйләүҙәрендә хата китте йәки 
AdminSettings.php көйләүҙәрендә хата. Зинһар өсөн, көйләүҙәрҙе 
тәҙәтегеҙ, яңынан эшләп ҡарағыҙ\n$1",
+   "config-localsettings-connection-error": 
"LocalSettings.php көйләүҙәрендә хата китте йәки 
LocalSettings.php көйләүҙәрендә хата. Зинһар өсөн, көйләүҙәрҙе 
тәҙәтегеҙ, яңынан эшләп ҡарағыҙ\n$1",
"config-session-error": "Эш башлағанда сыҡҡан хата: $1",
"config-session-expired": "Һеҙҙең ваҡыт үтте. Сессия $1 оҙонлоғона 
көйләнгән. Уны оҙайтыу өсөн php.ini. эсендә session.gc_maxlifetime 
кодын үҙгәртегеҙ.\nУрынлаштырыу процессын яңынан башлағыҙ.",
"config-no-session": "Был сессия юғалған!\nҮҙегеҙҙең php.ini 
тикшерегеҙ, \nsession.save_path коды тейешле каталогҡа 
урынлаштырылған икәненә ышынғыҙ.",
diff --git a/includes/installer/i18n/nb.json b/includes/installer/i18n/nb.json
index 51d0afa..5e27ad6 100644
--- a/includes/installer/i18n/nb.json
+++ b/includes/installer/i18n/nb.json
@@ -19,7 +19,7 @@
"config-localsettings-badkey": "Oppgraderingsnøkkelen du oppga er 
feil.",
"config-upgrade-key-missing": "En eksisterende installasjon av 
MediaWiki er funnet.\nFor å oppgradere denne installasjonen, vær vennlig å 
legge til følgende linje helt til slutt i din 
''LocalSettings.php''-fil:\n\n$1",
"config-localsettings-incomplete": "Den eksisterende 
''LocalSettings.php'' ser ut til å være ufullstendig.\nVariabelen 
$1 har ingen verdi.\nVær vennlig å endre ''LocalSettings.php'' 
slik at variabelen får en verdi, og klikk ''{{int:Config-continue}}''.",
-   "config-localsettings-connection-error": "Det ble funnet en feil ved 
tilknytning av databasen med innstillingene i 
''LocalSettings.php'' eller ''AdminSettings.php''. 
Vær vennlig å rette opp disse innstillingene og prøv igjen.\n\n$1",
+   "config-localsettings-connection-error": "Det ble funnet en feil ved 
tilknytning av databasen med innstillingene i 
''LocalSettings.php'' eller ''LocalSettings.php''. 
Vær vennlig å rette opp disse innstillingene og prøv 

[MediaWiki-commits] [Gerrit] Enable lazy loaded images on Ukranian and Farsi Wikipedias - change (operations/mediawiki-config)

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

Change subject: Enable lazy loaded images on Ukranian and Farsi Wikipedias
..


Enable lazy loaded images on Ukranian and Farsi Wikipedias

Target some medium sized wikis to expose us to greater levels of feedback
and NavigationTiming data.

Bug: T134003
Change-Id: I8cc62deb17aaa93be761124a5deaddebd18fab26
---
M wmf-config/InitialiseSettings.php
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ad879ce..287f1b6 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14259,6 +14259,15 @@
'base' => true,
'beta' => true,
],
+   // T134003
+   'fawiki' => [
+   'base' => true,
+   'beta' => true,
+   ],
+   'ukwiki' => [
+   'base' => true,
+   'beta' => true,
+   ],
 ],
 'wgMFLazyLoadReferences' => [
'default' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8cc62deb17aaa93be761124a5deaddebd18fab26
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: MaxSem 
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 typo in mw-config/overrides/README - change (mediawiki/core)

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

Change subject: Fix typo in mw-config/overrides/README
..


Fix typo in mw-config/overrides/README

Change-Id: I1769753ad7e49b07977e15c369f479f8e42c6385
(cherry picked from commit 1af50341b7f9e55697e3d6b287f6de8a49100d49)
---
M mw-config/overrides/README
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/mw-config/overrides/README b/mw-config/overrides/README
index f251330..68e0fad 100644
--- a/mw-config/overrides/README
+++ b/mw-config/overrides/README
@@ -4,7 +4,7 @@
 
 You can override 3 classes:
 * LocalSettingsGenerator - generates LocalSettings.php
-* WebInstaller - web instller UI
+* WebInstaller - web installer UI
 * CliInstaller - command line installer
 
 Example override:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1769753ad7e49b07977e15c369f479f8e42c6385
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] RELEASE-NOTES: Don't imply that HHVM 3.1 is supported - change (mediawiki/core)

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

Change subject: RELEASE-NOTES: Don't imply that HHVM 3.1 is supported
..


RELEASE-NOTES: Don't imply that HHVM 3.1 is supported

HHVM 3.1 is no longer supported by Facebook, not packaged by any Linux
distribution I know of, and MediaWiki is not routinely tested with it
(e.g. neither Wikimedia Jenkins nor Travis CI runs automated tests
using HHVM 3.1).

The Compatibility section already has a note that "There is experimental
support for HHVM 3.6.5 or later." So instead just refer to that section.
(HHVM 3.6 is also no longer supported by Facebook or still used by
Wikimedia, as far as I know, though that's a separate matter.)

Change-Id: I62352f0edc6b9f95acaaef4cb717990e52db1146
---
M RELEASE-NOTES-1.27
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index c13be51..6c93676 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -6,8 +6,8 @@
 production.
 
 === PHP version requirement ===
-As of 1.27, MediaWiki now requires PHP 5.5.9 or higher. This corresponds with
-HHVM 3.1. Additionally, the following PHP extensions are required:
+As of 1.27, MediaWiki now requires PHP 5.5.9 or higher (see Compatibility
+section). Additionally, the following PHP extensions are required:
 * ctype
 * iconv
 * json

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62352f0edc6b9f95acaaef4cb717990e52db1146
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: PleaseStand 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add www.photolib.noaa.gov to wgCopyUploadDomains - change (operations/mediawiki-config)

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

Change subject: Add www.photolib.noaa.gov to wgCopyUploadDomains
..


Add www.photolib.noaa.gov to wgCopyUploadDomains

Bug: T138383
Change-Id: Icf5a0200c97ae29f82f9bcc3ae8790f5dd2fd5ef
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a28b6ba..ad879ce 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12177,6 +12177,7 @@
'*.khamenei.ir',// CC-BY 4.0 content - 
T134472
'images.nypl.org',  // New York Public Library 
- T137687
'www.wpc.ncep.noaa.gov',// National Oceanic and 
Atmospheric Administration - T138383
+   'www.photolib.noaa.gov',// National Oceanic and 
Atmospheric Administration - T138383
],
 ],
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf5a0200c97ae29f82f9bcc3ae8790f5dd2fd5ef
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] RELEASE-NOTES: Don't imply that HHVM 3.1 is supported - change (mediawiki/core)

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

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

Change subject: RELEASE-NOTES: Don't imply that HHVM 3.1 is supported
..

RELEASE-NOTES: Don't imply that HHVM 3.1 is supported

HHVM 3.1 is no longer supported by Facebook, not packaged by any Linux
distribution I know of, and MediaWiki is not routinely tested with it
(e.g. neither Wikimedia Jenkins nor Travis CI runs automated tests
using HHVM 3.1).

The Compatibility section already has a note that "There is experimental
support for HHVM 3.6.5 or later." So instead just refer to that section.
(HHVM 3.6 is also no longer supported by Facebook or still used by
Wikimedia, as far as I know, though that's a separate matter.)

Change-Id: I62352f0edc6b9f95acaaef4cb717990e52db1146
---
M RELEASE-NOTES-1.27
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/295595/1

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 79455cb..d291f00 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -6,8 +6,8 @@
 production.
 
 === PHP version requirement ===
-As of 1.27, MediaWiki now requires PHP 5.5.9 or higher. This corresponds with
-HHVM 3.1. Additionally, the following PHP extensions are required:
+As of 1.27, MediaWiki now requires PHP 5.5.9 or higher (see Compatibility
+section). Additionally, the following PHP extensions are required:
 * ctype
 * iconv
 * json

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62352f0edc6b9f95acaaef4cb717990e52db1146
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Chad 
Gerrit-Reviewer: PleaseStand 

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


[MediaWiki-commits] [Gerrit] Add wikidata connection to monuments_all and Qid tester to u... - change (labs...heritage)

2016-06-22 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review.

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

Change subject: Add wikidata connection to monuments_all and Qid tester to 
updater
..

Add wikidata connection to monuments_all and Qid tester to updater

Also adds monuments_ru_(ru) as a first test case since they already
have 101012 ids in their list.

Bug: T55808
Change-Id: I8fb3db59e550826a86f2a85d40f140b7affba316
---
M erfgoedbot/monuments_config.py
M erfgoedbot/sql/fill_table_monuments_all.sql
M erfgoedbot/update_database.py
M tests/test_monuments_config.py
M tests/test_update_database.py
5 files changed, 111 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/94/295594/1

diff --git a/erfgoedbot/monuments_config.py b/erfgoedbot/monuments_config.py
index a8bbc36..e161391 100755
--- a/erfgoedbot/monuments_config.py
+++ b/erfgoedbot/monuments_config.py
@@ -6755,6 +6755,11 @@
 'dest': u'registrant_url',
 'conv': u'generateRegistrantUrl',
 },
+{
+'source': u'wdid',
+'dest': u'wd_item',
+'check': u'checkWD',
+},
 ],
 },
 ('se-bbr', 'sv'): {  # BBR Monuments in Sweden in Swedish
diff --git a/erfgoedbot/sql/fill_table_monuments_all.sql 
b/erfgoedbot/sql/fill_table_monuments_all.sql
index 587ee2c..0cbd01f 100644
--- a/erfgoedbot/sql/fill_table_monuments_all.sql
+++ b/erfgoedbot/sql/fill_table_monuments_all.sql
@@ -30,6 +30,7 @@
   `lat_int` smallint(6) DEFAULT NULL,
   `lon_int` smallint(6) DEFAULT NULL,
   `image` varchar(255) NOT NULL DEFAULT '',
+  `wd_item` varchar(255) DEFAULT NULL,
   `commonscat` varchar(255) NOT NULL DEFAULT '',
   `source` varchar(510) NOT NULL DEFAULT '',
   `changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP,
@@ -2292,7 +2293,7 @@
 /* Russia in Russian */
 REPLACE INTO
   `monuments_all_tmp` (
-`country`, `lang`, `project`, `id`, `adm0`, `adm1`, `adm2`, `adm3`, 
`adm4`, `name`, `address`, `municipality`, `lat`, `lon`, `lat_int`, `lon_int`, 
`image`, `commonscat`, `source`, `changed`, `monument_article`, `registrant_url`
+`country`, `lang`, `project`, `id`, `adm0`, `adm1`, `adm2`, `adm3`, 
`adm4`, `name`, `address`, `municipality`, `lat`, `lon`, `lat_int`, `lon_int`, 
`image`, `commonscat`, `source`, `changed`, `monument_article`, 
`registrant_url`, `wd_item`
   ) SELECT
 'ru' AS `country`,
 'ru' AS `lang`,
@@ -2315,7 +2316,8 @@
 `source` AS `source`,
 `changed` AS `changed`,
 `monument_article` AS `monument_article`,
-`registrant_url` AS `registrant_url`
+`registrant_url` AS `registrant_url`,
+`wd_item` AS `wd_item`
 FROM `monuments_ru_(ru)`;
 
 /* Sweden (BBR Monuments) in Swedish */
diff --git a/erfgoedbot/update_database.py b/erfgoedbot/update_database.py
index f337d2a..f2e6c94 100755
--- a/erfgoedbot/update_database.py
+++ b/erfgoedbot/update_database.py
@@ -128,12 +128,35 @@
 return True
 
 
+def is_int(s):
+"""Check if a string is a valid int."""
+try:
+int(s)
+return True
+except (ValueError, TypeError):
+return False
+
+
+def check_wikidata(wd_item, monumentKey, sourcePage):
+"""Check that a value is a potential wikidata entity."""
+if len(wd_item):
+if wd_item.startswith('Q') and is_int(wd_item[1:]):
+return True
+else:
+errorMsg = u"Invalid wikidata value: %s for monument %s" % (
+wd_item, monumentKey)
+reportDataError(errorMsg, sourcePage, monumentKey)
+return False
+
+
 def run_check(check, fieldValue, monumentKey, countryconfig, sourcePage):
 """Run a named check."""
 if check == 'checkLat':
 return checkLat(fieldValue, monumentKey, countryconfig, sourcePage)
 elif check == 'checkLon':
 return checkLon(fieldValue, monumentKey, countryconfig, sourcePage)
+elif check == 'checkWD':
+return check_wikidata(fieldValue, monumentKey, sourcePage)
 else:
 raise pywikibot.Error('Un-defined check in config for %s: %s'
   % (countryconfig.get('table'), check))
diff --git a/tests/test_monuments_config.py b/tests/test_monuments_config.py
index 47d0ad1..c3e4843 100644
--- a/tests/test_monuments_config.py
+++ b/tests/test_monuments_config.py
@@ -148,7 +148,7 @@
 
 def test_monuments_config_known_checkers(self):
 """Ensure the only known checkers are used in field entries."""
-recognized = ['checkLon', 'checkLat']
+recognized = ['checkLon', 'checkLat', 'checkWD']
 for key, data in config.countries.iteritems():
 self.set_label(key)
 for field in data['fields']:
diff --git a/tests/test_update_database.py b/tests/test_update_database.py
index be1be37..783157c 100644
--- 

[MediaWiki-commits] [Gerrit] Fix new first visit dashboard - change (wikimedia...prince)

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

Change subject: Fix new first visit dashboard
..


Fix new first visit dashboard

Patch in response to https://phabricator.wikimedia.org/T134199#2399480

Bug: T134199
Change-Id: I9a4f38b424bb96b42696a3d09299b0d90061dfca
---
M functions.R
M server.R
M ui.R
3 files changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/functions.R b/functions.R
index d165efe..68913f7 100644
--- a/functions.R
+++ b/functions.R
@@ -20,7 +20,8 @@
   # 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
+  data$`language search` <- 0
+  first_visit_ctrs <<- as.data.frame(data[, names(action_breakdown)])
   
   return(invisible())
 }
diff --git a/server.R b/server.R
index 9a75079..0b47c21 100644
--- a/server.R
+++ b/server.R
@@ -48,7 +48,8 @@
   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)
+  dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
+  dyLegend(labelsDiv = "first_visit_legend", show = "always", width = 400)
   })
   
   output$dwelltime_dygraph <- renderDygraph({
diff --git a/ui.R b/ui.R
index a5728b7..db5a8a1 100644
--- a/ui.R
+++ b/ui.R
@@ -51,7 +51,9 @@
 ),
 tabItem(tabName = "first_visit",
 polloi::smooth_select("smoothing_first_visit"),
-dygraphOutput("first_visit_dygraph"),
+div(dygraphOutput("first_visit_dygraph"),
+div(id = "first_visit_legend",
+style = "height: 60px; padding-top: 30px; padding-left: 
20px;")),
 includeMarkdown("./tab_documentation/first_visit.md")
 ),
 tabItem(tabName = "dwell_data",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a4f38b424bb96b42696a3d09299b0d90061dfca
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/prince
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] Fix new first visit dashboard - change (wikimedia...prince)

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

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

Change subject: Fix new first visit dashboard
..

Fix new first visit dashboard

Patch in response to https://phabricator.wikimedia.org/T134199#2399480

Bug: T134199
Change-Id: I9a4f38b424bb96b42696a3d09299b0d90061dfca
---
M functions.R
M server.R
M ui.R
3 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/prince 
refs/changes/93/295593/1

diff --git a/functions.R b/functions.R
index d165efe..68913f7 100644
--- a/functions.R
+++ b/functions.R
@@ -20,7 +20,8 @@
   # 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
+  data$`language search` <- 0
+  first_visit_ctrs <<- as.data.frame(data[, names(action_breakdown)])
   
   return(invisible())
 }
diff --git a/server.R b/server.R
index 9a75079..0b47c21 100644
--- a/server.R
+++ b/server.R
@@ -48,7 +48,8 @@
   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)
+  dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter, 
axisLabelWidth = 70) %>%
+  dyLegend(labelsDiv = "first_visit_legend", show = "always", width = 400)
   })
   
   output$dwelltime_dygraph <- renderDygraph({
diff --git a/ui.R b/ui.R
index a5728b7..db5a8a1 100644
--- a/ui.R
+++ b/ui.R
@@ -51,7 +51,9 @@
 ),
 tabItem(tabName = "first_visit",
 polloi::smooth_select("smoothing_first_visit"),
-dygraphOutput("first_visit_dygraph"),
+div(dygraphOutput("first_visit_dygraph"),
+div(id = "first_visit_legend",
+style = "height: 60px; padding-top: 30px; padding-left: 
20px;")),
 includeMarkdown("./tab_documentation/first_visit.md")
 ),
 tabItem(tabName = "dwell_data",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a4f38b424bb96b42696a3d09299b0d90061dfca
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/prince
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] Add SpecialPage::getLinkRenderer() - change (mediawiki/core)

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

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

Change subject: Add SpecialPage::getLinkRenderer()
..

Add SpecialPage::getLinkRenderer()

And SpecialPage::setLinkRenderer(), so the Parser can pass on its
LinkRenderer instance for when special pages are being included in a
page.

Change-Id: If9a9c648ab670b824ce534e7cf0d20d41e1bfd12
---
M includes/parser/Parser.php
M includes/specialpage/SpecialPage.php
M includes/specialpage/SpecialPageFactory.php
3 files changed, 41 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/295592/1

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index aca32ed..65dde21 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3147,7 +3147,7 @@
$context->setUser( 
User::newFromName( '127.0.0.1', false ) );
}
$context->setLanguage( 
$this->mOptions->getUserLangObj() );
-   $ret = SpecialPageFactory::capturePath( 
$title, $context );
+   $ret = SpecialPageFactory::capturePath( 
$title, $context, $this->getLinkRenderer() );
if ( $ret ) {
$text = 
$context->getOutput()->getHTML();

$this->mOutput->addOutputPageMetadata( $context->getOutput() );
diff --git a/includes/specialpage/SpecialPage.php 
b/includes/specialpage/SpecialPage.php
index f478203..35ecc6e 100644
--- a/includes/specialpage/SpecialPage.php
+++ b/includes/specialpage/SpecialPage.php
@@ -1,6 +1,4 @@
 linkRenderer ) {
+   return $this->linkRenderer;
+   } else {
+   return 
MediaWikiServices::getInstance()->getLinkRenderer();
+   }
+   }
+
+   /**
+* @since 1.28
+* @param LinkRenderer $linkRenderer
+*/
+   public function setLinkRenderer( LinkRenderer $linkRenderer ) {
+   $this->linkRenderer = $linkRenderer;
+   }
 }
diff --git a/includes/specialpage/SpecialPageFactory.php 
b/includes/specialpage/SpecialPageFactory.php
index 73efa4e..b69b28a 100644
--- a/includes/specialpage/SpecialPageFactory.php
+++ b/includes/specialpage/SpecialPageFactory.php
@@ -21,6 +21,7 @@
  * @ingroup SpecialPage
  * @defgroup SpecialPage SpecialPage
  */
+use MediaWiki\Linker\LinkRenderer;
 
 /**
  * Factory for handling the special page list and generating SpecialPage 
objects.
@@ -523,10 +524,13 @@
 * @param Title $title
 * @param IContextSource $context
 * @param bool $including Bool output is being captured for use in 
{{special:whatever}}
+* @param LinkRenderer|null $linkRenderer (since 1.28)
 *
 * @return bool
 */
-   public static function executePath( Title &$title, IContextSource 
&$context, $including = false ) {
+   public static function executePath( Title &$title, IContextSource 
&$context, $including = false,
+   LinkRenderer $linkRenderer = null
+   ) {
// @todo FIXME: Redirects broken due to this call
$bits = explode( '/', $title->getDBkey(), 2 );
$name = $bits[0];
@@ -586,6 +590,9 @@
}
 
$page->including( $including );
+   if ( $linkRenderer ) {
+   $page->setLinkRenderer( $linkRenderer );
+   }
 
// Execute special page
$page->run( $par );
@@ -605,9 +612,12 @@
 *
 * @param Title $title
 * @param IContextSource $context
+* @param LinkRenderer|null $linkRenderer (since 1.28)
 * @return string HTML fragment
 */
-   public static function capturePath( Title $title, IContextSource 
$context ) {
+   public static function capturePath(
+   Title $title, IContextSource $context, LinkRenderer 
$linkRenderer = null
+   ) {
global $wgTitle, $wgOut, $wgRequest, $wgUser, $wgLang;
$main = RequestContext::getMain();
 
@@ -640,7 +650,7 @@
$main->setLanguage( $context->getLanguage() );
 
// The useful part
-   $ret = self::executePath( $title, $context, true );
+   $ret = self::executePath( $title, $context, true, $linkRenderer 
);
 
// Restore old globals and context
$wgTitle = $glob['title'];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9a9c648ab670b824ce534e7cf0d20d41e1bfd12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master

[MediaWiki-commits] [Gerrit] [WIP] Implement subject+talk and null+user page grouping in ... - change (mediawiki...Echo)

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

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

Change subject: [WIP] Implement subject+talk and null+user page grouping in the 
API
..

[WIP] Implement subject+talk and null+user page grouping in the API

Also changes the format from an object to an array.

Bug: T137502
Change-Id: I443ca00ff5e5d36fd6910101226358942e6aa8ee
---
M i18n/en.json
M i18n/qqq.json
M includes/api/ApiEchoUnreadNotificationPages.php
3 files changed, 67 insertions(+), 16 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index b175404..d718b82 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -272,6 +272,7 @@
"apihelp-query+notifications-example-1": "List notifications",
"apihelp-query+notifications-example-2": "List notifications, grouped 
by section, with counts",
"apihelp-query+unreadnotificationpages-description": "Get pages for 
which there are unread notifications for the current user.",
+   "apihelp-query+unreadnotificationpages-param-grouppages": "Group talk 
pages together with their subject page, and group notifications not associated 
with a page together with the current user's user page.",
"apihelp-query+unreadnotificationpages-param-limit": "The maximum 
number of pages to return.",
"apihelp-query+unreadnotificationpages-param-wikis": "List of wikis to 
fetch pages with unread notifications from (defaults to only current wiki).",
"apihelp-query+unreadnotificationpages-example-1": "List pages with 
(their amount of) unread notifications"
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f6c2648..19da74a 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -263,6 +263,7 @@
"apihelp-query+notifications-example-1": 
"{{doc-apihelp-example|query+notifications}}",
"apihelp-query+notifications-example-2": 
"{{doc-apihelp-example|query+notifications}}",
"apihelp-query+unreadnotificationpages-description": 
"{{doc-apihelp-description|query+unreadnotificationpages}}",
+   "apihelp-query+unreadnotificationpages-param-grouppages": 
"{{doc-apihelp-param|query+unreadnotificationpages|grouppages}}",
"apihelp-query+unreadnotificationpages-param-limit": 
"{{doc-apihelp-param|query+unreadnotificationpages|limit}}",
"apihelp-query+unreadnotificationpages-param-wikis": 
"{{doc-apihelp-param|query+unreadnotificationpages|wikis}}",
"apihelp-query+unreadnotificationpages-example-1": 
"{{doc-apihelp-example|query+unreadnotificationpages}}"
diff --git a/includes/api/ApiEchoUnreadNotificationPages.php 
b/includes/api/ApiEchoUnreadNotificationPages.php
index a0fa918..5a99038 100644
--- a/includes/api/ApiEchoUnreadNotificationPages.php
+++ b/includes/api/ApiEchoUnreadNotificationPages.php
@@ -29,7 +29,7 @@
 
$result = array();
if ( in_array( wfWikiId(), $this->getRequestedWikis() ) ) {
-   $result[wfWikiID()] = $this->getFromLocal( 
$params['limit'] );
+   $result[wfWikiID()] = $this->getFromLocal( 
$params['limit'], $params['grouppages'] );
}
 
if ( $this->getRequestedForeignWikis() ) {
@@ -39,8 +39,7 @@
$apis = $this->foreignNotifications->getApiEndpoints( 
$this->getRequestedWikis() );
foreach ( $result as $wiki => $data ) {
$result[$wiki]['source'] = $apis[$wiki];
-   // StdClass to ensure empty data is json_encoded to 
`{}` instead of `[]`
-   $result[$wiki]['pages'] = $data['pages'] ?: new 
StdClass;
+   $result[$wiki]['pages'] = $data['pages'] ?: array();
}
 
$this->getResult()->addValue( 'query', $this->getModuleName(), 
$result );
@@ -48,10 +47,14 @@
 
/**
 * @param int $limit
+* @param bool $groupPages
 * @return array
 */
-   protected function getFromLocal( $limit ) {
+   protected function getFromLocal( $limit, $groupPages ) {
$dbr = MWEchoDbFactory::newFromDefault()->getEchoDb( DB_SLAVE );
+   // If $groupPages is true, we need to fetch all pages and apply 
the ORDER BY and LIMIT ourselves
+   // after grouping.
+   $extraOptions = $groupPages ? array() : array( 'ORDER BY' => 
'count DESC', 'LIMIT' => $limit );
$rows = $dbr->select(
array( 'echo_event', 'echo_notification' ),
array( 'event_page_id', 'count' => 'COUNT(*)' ),
@@ -59,14 +62,11 @@
'notification_user' => 
$this->getUser()->getId(),
'notification_read_timestamp' => null,
'notification_bundle_base' => 1,
-   'event_page_id IS NOT NULL',
 

[MediaWiki-commits] [Gerrit] Add transition animation when switching between Fragments. - change (apps...wikipedia)

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

Change subject: Add transition animation when switching between Fragments.
..


Add transition animation when switching between Fragments.

- Added a short fade effect when transitioning between fragments.
- Improved the appearance of HistoryFragment when exiting out of it, by
  explicitly setting its emptyView to null (otherwise it has the jarring
  effect of momentarily flashing the "glasses" image while closing).
- This also fixes the transparency of the system status bar when the
  default Toolbar is hidden.

Change-Id: I7e09b9e4c4ee6e025964c3e50b1ba7c3bc3b9d63
---
M app/src/main/java/org/wikipedia/MainActivity.java
M app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
M app/src/main/java/org/wikipedia/history/HistoryFragment.java
A app/src/main/res/anim/fade_in.xml
A app/src/main/res/anim/fade_out.xml
5 files changed, 20 insertions(+), 4 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/MainActivity.java 
b/app/src/main/java/org/wikipedia/MainActivity.java
index 54ec68a..e504f96 100644
--- a/app/src/main/java/org/wikipedia/MainActivity.java
+++ b/app/src/main/java/org/wikipedia/MainActivity.java
@@ -210,8 +210,8 @@
 PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
 setContentView(R.layout.activity_page);
 
-toolbarCoordinator = new MainActivityToolbarCoordinator(this, 
(Toolbar) findViewById(R.id.main_toolbar));
 toolbarContainer = findViewById(R.id.main_toolbar_container);
+toolbarCoordinator = new MainActivityToolbarCoordinator(this, 
toolbarContainer, (Toolbar) findViewById(R.id.main_toolbar));
 getSupportFragmentManager()
 .addOnBackStackChangedListener(new 
FragmentManager.OnBackStackChangedListener() {
 @Override
@@ -568,6 +568,7 @@
 
 resetFragmentsToFeedOrPage();
 FragmentTransaction trans = 
getSupportFragmentManager().beginTransaction();
+trans.setCustomAnimations(R.anim.fade_in, R.anim.fade_out, 
R.anim.fade_in, R.anim.fade_out);
 trans.add(R.id.content_fragment_container, f);
 trans.addToBackStack(null);
 if (allowStateLoss) {
diff --git 
a/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java 
b/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
index e549967..4be8b77 100644
--- a/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
+++ b/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
@@ -8,24 +8,28 @@
 
 public class MainActivityToolbarCoordinator {
 @NonNull private AppCompatActivity activity;
+@NonNull private View toolbarContainerView;
 @NonNull private Toolbar defaultToolbar;
 @Nullable private Toolbar overrideToolbar;
 
-public MainActivityToolbarCoordinator(@NonNull AppCompatActivity activity, 
@NonNull Toolbar defaultToolbar) {
+public MainActivityToolbarCoordinator(@NonNull AppCompatActivity activity,
+  @NonNull View toolbarContainerView,
+  @NonNull Toolbar defaultToolbar) {
 this.activity = activity;
+this.toolbarContainerView = toolbarContainerView;
 this.defaultToolbar = defaultToolbar;
 setActivityToolbar(defaultToolbar);
 }
 
 public void setOverrideToolbar(@NonNull Toolbar toolbar) {
 overrideToolbar = toolbar;
-defaultToolbar.setVisibility(View.GONE);
+toolbarContainerView.setVisibility(View.GONE);
 setActivityToolbar(overrideToolbar);
 }
 
 public void removeOverrideToolbar() {
 overrideToolbar = null;
-defaultToolbar.setVisibility(View.VISIBLE);
+toolbarContainerView.setVisibility(View.VISIBLE);
 setActivityToolbar(defaultToolbar);
 }
 
diff --git a/app/src/main/java/org/wikipedia/history/HistoryFragment.java 
b/app/src/main/java/org/wikipedia/history/HistoryFragment.java
index 1213d08..9f3a03d 100644
--- a/app/src/main/java/org/wikipedia/history/HistoryFragment.java
+++ b/app/src/main/java/org/wikipedia/history/HistoryFragment.java
@@ -101,6 +101,7 @@
 
 @Override
 public void onDestroyView() {
+historyEntryList.setEmptyView(null);
 
getActivity().getSupportLoaderManager().destroyLoader(HISTORY_FRAGMENT_LOADER_ID);
 entryFilter.removeTextChangedListener(textWatcher);
 historyEntryList.setOnItemClickListener(null);
diff --git a/app/src/main/res/anim/fade_in.xml 
b/app/src/main/res/anim/fade_in.xml
new file mode 100644
index 000..5d274c6
--- /dev/null
+++ b/app/src/main/res/anim/fade_in.xml
@@ -0,0 +1,5 @@
+
+http://schemas.android.com/apk/res/android;
+

[MediaWiki-commits] [Gerrit] Integrate search into Feed (with voice). - change (apps...wikipedia)

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

Change subject: Integrate search into Feed (with voice).
..


Integrate search into Feed (with voice).

Change-Id: Iff74f9054f1f6913dc1e15d433cc78e6283d1e9e
---
M app/src/main/java/org/wikipedia/MainActivity.java
M app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
M app/src/main/java/org/wikipedia/feed/FeedViewCallback.java
M app/src/main/java/org/wikipedia/feed/searchbar/SearchCardView.java
M app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java
M app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
9 files changed, 98 insertions(+), 18 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/MainActivity.java 
b/app/src/main/java/org/wikipedia/MainActivity.java
index 54ec68a..791b307 100644
--- a/app/src/main/java/org/wikipedia/MainActivity.java
+++ b/app/src/main/java/org/wikipedia/MainActivity.java
@@ -3,6 +3,7 @@
 import android.annotation.TargetApi;
 import android.app.SearchManager;
 import android.appwidget.AppWidgetManager;
+import android.content.ActivityNotFoundException;
 import android.content.ComponentName;
 import android.content.DialogInterface;
 import android.content.Intent;
@@ -13,6 +14,7 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Looper;
+import android.speech.RecognizerIntent;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.support.design.widget.BottomSheetDialog;
@@ -102,6 +104,7 @@
 public static final int ACTIVITY_REQUEST_LANGLINKS = 0;
 public static final int ACTIVITY_REQUEST_EDIT_SECTION = 1;
 public static final int ACTIVITY_REQUEST_GALLERY = 2;
+public static final int ACTIVITY_REQUEST_VOICE_SEARCH = 3;
 
 public static final int PROGRESS_BAR_MAX_VALUE = 1;
 
@@ -411,6 +414,15 @@
 return true;
 }
 
+public void setSearchMode(boolean enabled) {
+// invalidate our ActionBar, so that all action items are removed, and
+// we can fill up the whole width of the ActionBar with our SearchView.
+supportInvalidateOptionsMenu();
+toolbarCoordinator.setSearchMode(enabled);
+getSearchBarHideHandler().setForceNoFade(enabled);
+getDrawerToggle().setDrawerIndicatorEnabled(!enabled);
+}
+
 public void showToolbar() {
 ViewAnimations.ensureTranslationY(toolbarContainer, 0);
 }
@@ -456,7 +468,7 @@
 handleProcessTextIntent(intent);
 } else if (intent.hasExtra(EXTRA_SEARCH_FROM_WIDGET)) {
 new IntentFunnel(app).logSearchWidgetTap();
-openSearch();
+openSearchFromIntent();
 } else if (intent.hasExtra(EXTRA_FEATURED_ARTICLE_FROM_WIDGET)) {
 new IntentFunnel(app).logFeaturedArticleWidgetTap();
 loadMainPageInForegroundTab();
@@ -469,7 +481,7 @@
 
 private void handleShareIntent(Intent intent) {
 String text = intent.getStringExtra(Intent.EXTRA_TEXT);
-openSearch(text == null ? null : text.trim());
+openSearchFromIntent(text == null ? null : text.trim(), true);
 }
 
 @TargetApi(Build.VERSION_CODES.M)
@@ -478,18 +490,18 @@
 return;
 }
 String text = intent.getStringExtra(Intent.EXTRA_PROCESS_TEXT);
-openSearch(text == null ? null : text.trim());
+openSearchFromIntent(text == null ? null : text.trim(), true);
 }
 
-private void openSearch() {
-openSearch(null);
+private void openSearchFromIntent() {
+openSearchFromIntent(null, true);
 }
 
-private void openSearch(@Nullable final CharSequence query) {
+private void openSearchFromIntent(@Nullable final CharSequence query, 
final boolean fromWidget) {
 fragmentContainerView.post(new Runnable() {
 @Override
 public void run() {
-searchFragment.setLaunchedFromWidget(true);
+searchFragment.setLaunchedFromWidget(fromWidget);
 searchFragment.openSearch();
 if (query != null) {
 searchFragment.setSearchText(query);
@@ -814,6 +826,16 @@
 }
 
 @Override
+public void onFeedVoiceSearchRequested() {
+Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
+try {
+startActivityForResult(intent, ACTIVITY_REQUEST_VOICE_SEARCH);
+} catch (ActivityNotFoundException a) {
+FeedbackUtil.showMessage(this, 
R.string.error_voice_search_not_available);
+}
+}
+
+@Override
 public void onFeedSelectPage(PageTitle title) {
 

[MediaWiki-commits] [Gerrit] Add interactivity to "because you read" card. - change (apps...wikipedia)

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

Change subject: Add interactivity to "because you read" card.
..


Add interactivity to "because you read" card.

- Added some more methods to the Callback provided by FeedFragment, so
  that when PageActivity overrides them, the desired behavior is achieved.
- Wove a callback mechanism into the View hierarchy of feed cards.
- Created PageTitleListCardView (a descendant of ListCardView) that takes
  a PageTitle as a data provider. This is inescapable, since the original
  PageTitle (including its language code, namespace, etc) needs to be
  preserved in order to navigate to the correct page upon clicking.
- Updated the fragment backstack logic and back-behavior in MainActivity.

Change-Id: I0663b26dd247f65a28655213b73e08e07078426b
---
M app/src/main/AndroidManifest.xml
M app/src/main/java/org/wikipedia/MainActivity.java
A app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
A app/src/main/java/org/wikipedia/MainActivityToolbarProvider.java
D app/src/main/java/org/wikipedia/feed/FeedActivity.java
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
A app/src/main/java/org/wikipedia/feed/FeedViewCallback.java
M 
app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
M app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadClient.java
M 
app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadItemCard.java
M app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java
M app/src/main/java/org/wikipedia/feed/view/FeedView.java
M app/src/main/java/org/wikipedia/feed/view/ListCardItemView.java
M app/src/main/java/org/wikipedia/feed/view/ListCardView.java
A app/src/main/java/org/wikipedia/feed/view/PageTitleListCardItemView.java
A app/src/main/java/org/wikipedia/feed/view/PageTitleListCardView.java
M app/src/main/java/org/wikipedia/history/HistoryEntry.java
M app/src/main/java/org/wikipedia/history/HistoryFragment.java
M app/src/main/java/org/wikipedia/page/MwApiResultPage.java
M app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java
A app/src/main/res/drawable/ic_menu_white_24dp.xml
M app/src/main/res/layout/view_list_card_item.xml
25 files changed, 392 insertions(+), 154 deletions(-)

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



diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 59f36f6..fb74ae3 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -54,11 +54,6 @@
 
 
-
-
  0) {
-launchFeedActivity();
-
-// Uncommenting the following line gives the desired back button 
behavior but there's
-// currently no way to open a page from the Feed. todo: uncomment 
once the Feed is
-// interactive.
-// finish();
-} else {
+} else if (!Prefs.enableFeed() || 
TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - 
Prefs.pageLastShown()) == 0) {
 loadMainPageIfNoTabs();
+} else {
+showFeed();
 }
 }
 
@@ -524,8 +525,21 @@
 drawerLayout.closeDrawer(GravityCompat.START);
 }
 
-private void removeAllFragments() {
-getSupportFragmentManager().popBackStackImmediate(null, 
FragmentManager.POP_BACK_STACK_INCLUSIVE);
+public void showFeed() {
+// pop fragments until we see a FeedFragment. If there's no 
FeedFragment, then add it.
+while (getSupportFragmentManager().getBackStackEntryCount() > 0
+&& !(getTopFragment() instanceof FeedFragment)) {
+getSupportFragmentManager().popBackStackImmediate();
+}
+pushFragment(new FeedFragment());
+}
+
+private void resetFragmentsToFeedOrPage() {
+while (getSupportFragmentManager().getBackStackEntryCount() > 0
+&& !(getTopFragment() instanceof FeedFragment)
+&& !(getTopFragment() instanceof PageFragment)) {
+getSupportFragmentManager().popBackStackImmediate();
+}
 }
 
 /**
@@ -543,9 +557,7 @@
  * @param allowStateLoss Whether to allow state loss.
  */
 public void pushFragment(Fragment f, boolean allowStateLoss) {
-closeNavDrawer();
-searchBarHideHandler.setForceNoFade(false);
-searchBarHideHandler.setFadeEnabled(false);
+beforeFragmentChanged();
 // if the new fragment is the same class as the current topmost 
fragment,
 // then just keep the previous fragment there.
 // e.g. if the user selected History, and there's already a History 
fragment on top,
@@ -554,7 +566,7 

[MediaWiki-commits] [Gerrit] Followup on a8ee9bf5: Normalize newlines around new content ... - change (mediawiki...parsoid)

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

Change subject: Followup on a8ee9bf5: Normalize newlines around new content only
..


Followup on a8ee9bf5: Normalize newlines around new content only

* Since it looks like the extra newlines might be used as
  a stylistic practice in wikitext for tables, use the normalized
  single-newline form only around new content.

  Discovered via rt-testing.

* Selser changes seem expected.

Change-Id: I615d6dc3399a0bef5707463ce6188ff36b247185
---
M lib/html2wt/DOMHandlers.js
M tests/parserTests-blacklist.js
2 files changed, 37 insertions(+), 24 deletions(-)

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



diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js
index d4d6de6..a992233 100644
--- a/lib/html2wt/DOMHandlers.js
+++ b/lib/html2wt/DOMHandlers.js
@@ -561,6 +561,10 @@
}
 }
 
+function maxNLsInTable(node, origNode) {
+   return DU.isNewElt(node) || DU.isNewElt(origNode) ? 1 : 2;
+}
+
 /**
  * A map of `domHandler`s keyed on nodeNames.
  *
@@ -699,8 +703,12 @@
return { min: 0, max: 2 };
}
},
-   firstChild: id({ min: 1, max: 1 }),
-   lastChild: id({ min: 1, max: 1 }),
+   firstChild: function(node, otherNode) {
+   return { min: 1, max: maxNLsInTable(node, 
otherNode) };
+   },
+   lastChild: function(node, otherNode) {
+   return { min: 1, max: maxNLsInTable(node, 
otherNode) };
+   },
},
},
tbody: justChildren,
@@ -727,13 +735,13 @@
sepnls: {
before: function(node, otherNode) {
if (trWikitextNeeded(node, 
DU.getDataParsoid(node))) {
-   return { min: 1, max: 1 };
+   return { min: 1, max: 
maxNLsInTable(node, otherNode) };
} else {
-   return { min: 0, max: 1 };
+   return { min: 0, max: 
maxNLsInTable(node, otherNode) };
}
},
after: function(node, otherNode) {
-   return { min: 0, max: 1 };
+   return { min: 0, max: maxNLsInTable(node, 
otherNode) };
},
},
},
@@ -760,17 +768,17 @@
if (otherNode.nodeName === 'TH' &&
DU.getDataParsoid(node).stx_v 
=== 'row') {
// force single line
-   return { min: 0, max: 1 };
+   return { min: 0, max: 
maxNLsInTable(node, otherNode) };
} else {
-   return { min: 1, max: 1 };
+   return { min: 1, max: 
maxNLsInTable(node, otherNode) };
}
},
after: function(node, otherNode) {
if (otherNode.nodeName === 'TD') {
// Force a newline break
-   return { min: 1, max: 1 };
+   return { min: 1, max: 
maxNLsInTable(node, otherNode) };
} else {
-   return { min: 0, max: 1 };
+   return { min: 0, max: 
maxNLsInTable(node, otherNode) };
}
},
},
@@ -799,12 +807,14 @@
if (otherNode.nodeName === 'TD' &&
DU.getDataParsoid(node).stx_v 
=== 'row') {
// force single line
-   return { min: 0, max: 1 };
+   return { min: 0, max: 
maxNLsInTable(node, otherNode) };
} else {
-   return { min: 1, max: 1 };
+   return { min: 1, max: 
maxNLsInTable(node, otherNode) };
}
},
-   after: id({ min: 0, max: 1 }),
+   after: function(node, otherNode) {
+   return { min: 0, max: maxNLsInTable(node, 
otherNode) };
+   },
},
},
caption: {
@@ -820,9 +830,12 @@

[MediaWiki-commits] [Gerrit] Enable html2wt for some interlanguage link tests - change (mediawiki...parsoid)

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

Change subject: Enable html2wt for some interlanguage link tests
..


Enable html2wt for some interlanguage link tests

* These now serialize properly without data-parsoid info.

Change-Id: I38ecb4d77fe13c14c705a08977f11dae88013a90
---
M tests/parserTests.txt
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 7396e6e..fb27146 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -8350,8 +8350,6 @@
 
 !! test
 Interlanguage link
-!! options
-parsoid=wt2html,wt2wt,html2html
 !! wikitext
 Blah blah blah
 [[zh:Chinese]]
@@ -8380,8 +8378,6 @@
 
 !! test
 Double interlanguage link
-!! options
-parsoid=wt2html,wt2wt,html2html
 !! wikitext
 Blah blah blah
 [[es:Spanish]]

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

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

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


[MediaWiki-commits] [Gerrit] Use deployment-sca03 for beta cluster - change (mediawiki...deploy)

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

Change subject: Use deployment-sca03 for beta cluster
..


Use deployment-sca03 for beta cluster

Bug: T138445
Change-Id: I98bf1298a3850c90b17d2dff672f7d1f42ecd161
---
M scap/ores-web-labs
M scap/ores-worker-labs
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/scap/ores-web-labs b/scap/ores-web-labs
index ff85e46..65cc71f 100644
--- a/scap/ores-web-labs
+++ b/scap/ores-web-labs
@@ -1 +1 @@
-deployment-ores-web.deployment-prep.eqiad.wmflabs
+deployment-sca03.deployment-prep.eqiad.wmflabs
diff --git a/scap/ores-worker-labs b/scap/ores-worker-labs
index fb2eb2c..65cc71f 100644
--- a/scap/ores-worker-labs
+++ b/scap/ores-worker-labs
@@ -1 +1 @@
-deployment-sca01.deployment-prep.eqiad.wmflabs
+deployment-sca03.deployment-prep.eqiad.wmflabs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98bf1298a3850c90b17d2dff672f7d1f42ecd161
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ores/deploy
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] Use deployment-sca03 for beta cluster - change (mediawiki...deploy)

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

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

Change subject: Use deployment-sca03 for beta cluster
..

Use deployment-sca03 for beta cluster

Bug: T138445
Change-Id: I98bf1298a3850c90b17d2dff672f7d1f42ecd161
---
M scap/ores-web-labs
M scap/ores-worker-labs
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ores/deploy 
refs/changes/90/295590/1

diff --git a/scap/ores-web-labs b/scap/ores-web-labs
index ff85e46..65cc71f 100644
--- a/scap/ores-web-labs
+++ b/scap/ores-web-labs
@@ -1 +1 @@
-deployment-ores-web.deployment-prep.eqiad.wmflabs
+deployment-sca03.deployment-prep.eqiad.wmflabs
diff --git a/scap/ores-worker-labs b/scap/ores-worker-labs
index fb2eb2c..65cc71f 100644
--- a/scap/ores-worker-labs
+++ b/scap/ores-worker-labs
@@ -1 +1 @@
-deployment-sca01.deployment-prep.eqiad.wmflabs
+deployment-sca03.deployment-prep.eqiad.wmflabs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I98bf1298a3850c90b17d2dff672f7d1f42ecd161
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ores/deploy
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] Blank the configuration variables in extension.json - change (mediawiki...Mailgun)

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

Change subject: Blank the configuration variables in extension.json
..


Blank the configuration variables in extension.json

Bug: T138275
Change-Id: I09516c6612f7c842c5b7b941d27b661935772081
---
M MailgunHooks.php
M extension.json
2 files changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/MailgunHooks.php b/MailgunHooks.php
index 61ba017..a21cd23 100644
--- a/MailgunHooks.php
+++ b/MailgunHooks.php
@@ -33,14 +33,22 @@
 * @param string $subject
 * @param string $body
 * @return bool
+* @throws Exception
 */
public static function onAlternateUserMailer(
array $headers, array $to, MailAddress $from, $subject, $body
) {
$conf = RequestContext::getMain()->getConfig();
$client = new \Http\Adapter\Guzzle6\Client();
-   $mailgunTransport = new \Mailgun\Mailgun( $conf->get( 
'MailgunAPIKey' ), $client );
-   $message = $mailgunTransport->BatchMessage( $conf->get( 
'MailgunDomain' ) );
+
+   $mailgunAPIKey = $conf->get( 'MailgunAPIKey' );
+   $mailgunDomain = $conf->get( 'MailgunDomain' );
+   if ( $mailgunAPIKey == "" or $mailgunDomain == "" ) {
+   throw new MWException( "Please update your 
LocalSettings.php with the correct Mailgun API configurations" );
+   }
+
+   $mailgunTransport = new \Mailgun\Mailgun( $mailgunAPIKey, 
$client );
+   $message = $mailgunTransport->BatchMessage( $mailgunDomain );
 
$message->setFromAddress( $from );
$message->setSubject( $subject );
diff --git a/extension.json b/extension.json
index 0c7ace4..7418840 100644
--- a/extension.json
+++ b/extension.json
@@ -23,8 +23,8 @@
},
"load_composer_autoloader": true,
"config": {
-   "MailgunAPIKey": "key-asdfasdfasdf",
-   "MailgunDomain": "example.in"
+   "MailgunAPIKey": "",
+   "MailgunDomain": ""
},
"manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09516c6612f7c842c5b7b941d27b661935772081
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/Mailgun
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

___
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-22 Thread Gehel (Code Review)
Gehel has uploaded a new change for review.

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

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.

To avoid dependency cycle, pg-reload is not notified, following the same
pattern used in postgresql::slave.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/89/295589/1

diff --git a/modules/postgresql/manifests/master.pp 
b/modules/postgresql/manifests/master.pp
index 148a67c..2b8fb61 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,13 @@
 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'],
+ }
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b5031306bf714a4455d9291ad32b3e6ae650d61
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] r::c::perf: disable autocorking - change (operations/puppet)

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

Change subject: r::c::perf: disable autocorking
..


r::c::perf: disable autocorking

Change-Id: I96a2504dc1a6e53c1eed880a7a50dd94591581e7
---
M modules/role/manifests/cache/perf.pp
1 file changed, 13 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 4d6e622..d039d8e 100644
--- a/modules/role/manifests/cache/perf.pp
+++ b/modules/role/manifests/cache/perf.pp
@@ -147,6 +147,19 @@
 'net.ipv4.tcp_synack_retries'=> 2,
 'net.ipv4.tcp_syn_retries'   => 2,
 
+# TCP autocorking exists and defaults on from 3.14 onwards.  The
+# idea is that some applications that should be doing a better job
+# of local buffering or manual TCP_CORK aren't, and the kernel
+# detects the common patterns for this and auto-corks for them
+# (doesn't immediately send a small write, instead waits a bit to
+# see if it can coalesce it with another).  Netstat counters for
+# autocorking are running up at a huge rate (ballpark near our reqs
+# or SYNs rate), which implies this is happening commonly to nginx
+# outbound traffic.  My theory is this is probably a net loss and
+# nginx and/or openssl know what they're doing and we'd benefit 
from
+# the writes going out immediately and not autocorking...
+'net.ipv4.tcp_autocorking'   => 0,
+
 # Pure perf hacks (documented above)
 'net.ipv4.tcp_notsent_lowat' => 131072,
 'net.ipv4.tcp_slow_start_after_idle' => 0,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I96a2504dc1a6e53c1eed880a7a50dd94591581e7
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] r::c::perf: disable autocorking - change (operations/puppet)

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

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

Change subject: r::c::perf: disable autocorking
..

r::c::perf: disable autocorking

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/295588/1

diff --git a/modules/role/manifests/cache/perf.pp 
b/modules/role/manifests/cache/perf.pp
index 4d6e622..d039d8e 100644
--- a/modules/role/manifests/cache/perf.pp
+++ b/modules/role/manifests/cache/perf.pp
@@ -147,6 +147,19 @@
 'net.ipv4.tcp_synack_retries'=> 2,
 'net.ipv4.tcp_syn_retries'   => 2,
 
+# TCP autocorking exists and defaults on from 3.14 onwards.  The
+# idea is that some applications that should be doing a better job
+# of local buffering or manual TCP_CORK aren't, and the kernel
+# detects the common patterns for this and auto-corks for them
+# (doesn't immediately send a small write, instead waits a bit to
+# see if it can coalesce it with another).  Netstat counters for
+# autocorking are running up at a huge rate (ballpark near our reqs
+# or SYNs rate), which implies this is happening commonly to nginx
+# outbound traffic.  My theory is this is probably a net loss and
+# nginx and/or openssl know what they're doing and we'd benefit 
from
+# the writes going out immediately and not autocorking...
+'net.ipv4.tcp_autocorking'   => 0,
+
 # Pure perf hacks (documented above)
 'net.ipv4.tcp_notsent_lowat' => 131072,
 'net.ipv4.tcp_slow_start_after_idle' => 0,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96a2504dc1a6e53c1eed880a7a50dd94591581e7
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] add job that dumps history of flow pages - change (operations/dumps)

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

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

Change subject: add job that dumps history of flow pages
..

add job that dumps history of flow pages

Bug: T89398
Change-Id: Ib5cb869812c19e2d971f82f796df769709b8dde9
---
M xmldumps-backup/dumps/flowjob.py
M xmldumps-backup/dumps/runner.py
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/87/295587/1

diff --git a/xmldumps-backup/dumps/flowjob.py b/xmldumps-backup/dumps/flowjob.py
index 80d0100..5c3ff67 100644
--- a/xmldumps-backup/dumps/flowjob.py
+++ b/xmldumps-backup/dumps/flowjob.py
@@ -11,7 +11,7 @@
 class FlowDump(Dump):
 """Dump the flow pages."""
 
-def __init__(self, name, desc):
+def __init__(self, name, desc, history=False):
 Dump.__init__(self, name, desc)
 
 def detail(self):
@@ -44,6 +44,8 @@
 command.extend(["--wiki=%s" % runner.db_name,
 "--current", "--report=1000",
 "--output=bzip2:%s" % flow_output_file])
+if history:
+command.append("--full")
 
 pipeline = [command]
 series = [pipeline]
diff --git a/xmldumps-backup/dumps/runner.py b/xmldumps-backup/dumps/runner.py
index e3c250d..5eb3719 100644
--- a/xmldumps-backup/dumps/runner.py
+++ b/xmldumps-backup/dumps/runner.py
@@ -266,6 +266,7 @@
 
 self.append_job_if_needed(
 FlowDump("xmlflowdump", "content of flow pages in xml format"))
+FlowDump("xmlflowhistorydump", "history content of flow pages in 
xml format"), True)
 
 self.dump_items.append(
 BigXmlDump(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5cb869812c19e2d971f82f796df769709b8dde9
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] Adds flask-swaggerui==0.0.1 and flask_wikimediaui==0.0.1 - change (research...wheels)

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

Change subject: Adds flask-swaggerui==0.0.1 and flask_wikimediaui==0.0.1
..


Adds flask-swaggerui==0.0.1 and flask_wikimediaui==0.0.1

Change-Id: I2c98db3492b5440f5496367e5d2b4adba08457d9
---
A flask_swaggerui-0.0.1-py2.py3-none-any.whl
A flask_wikimediaui-0.0.1-py2.py3-none-any.whl
2 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/flask_swaggerui-0.0.1-py2.py3-none-any.whl 
b/flask_swaggerui-0.0.1-py2.py3-none-any.whl
new file mode 100644
index 000..c3dcd9e
--- /dev/null
+++ b/flask_swaggerui-0.0.1-py2.py3-none-any.whl
Binary files differ
diff --git a/flask_wikimediaui-0.0.1-py2.py3-none-any.whl 
b/flask_wikimediaui-0.0.1-py2.py3-none-any.whl
new file mode 100644
index 000..bc1afb9
--- /dev/null
+++ b/flask_wikimediaui-0.0.1-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c98db3492b5440f5496367e5d2b4adba08457d9
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 
Gerrit-Reviewer: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] Adds flask-swaggerui==0.0.1 and flask_wikimediaui==0.0.1 - change (research...wheels)

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

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

Change subject: Adds flask-swaggerui==0.0.1 and flask_wikimediaui==0.0.1
..

Adds flask-swaggerui==0.0.1 and flask_wikimediaui==0.0.1

Change-Id: I2c98db3492b5440f5496367e5d2b4adba08457d9
---
A flask_swaggerui-0.0.1-py2.py3-none-any.whl
A flask_wikimediaui-0.0.1-py2.py3-none-any.whl
2 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels 
refs/changes/86/295586/1

diff --git a/flask_swaggerui-0.0.1-py2.py3-none-any.whl 
b/flask_swaggerui-0.0.1-py2.py3-none-any.whl
new file mode 100644
index 000..c3dcd9e
--- /dev/null
+++ b/flask_swaggerui-0.0.1-py2.py3-none-any.whl
Binary files differ
diff --git a/flask_wikimediaui-0.0.1-py2.py3-none-any.whl 
b/flask_wikimediaui-0.0.1-py2.py3-none-any.whl
new file mode 100644
index 000..bc1afb9
--- /dev/null
+++ b/flask_wikimediaui-0.0.1-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c98db3492b5440f5496367e5d2b4adba08457d9
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 

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


[MediaWiki-commits] [Gerrit] Moving elasticsearch masters to new servers - change (operations/puppet)

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

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

Change subject: Moving elasticsearch masters to new servers
..

Moving elasticsearch masters to new servers

This is required to be able to decommission the old elasticsearch servers.

Bug: T138329
Change-Id: Idd7e769df8dc5ad4467cfc464af88d43778fa5ba
---
A hieradata/hosts/elastic1030.yaml
A hieradata/hosts/elastic1036.yaml
A hieradata/hosts/elastic1040.yaml
A hieradata/hosts/elastic1044.yaml
M hieradata/regex.yaml
M hieradata/role/eqiad/elasticsearch/server.yaml
6 files changed, 17 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/295585/1

diff --git a/hieradata/hosts/elastic1030.yaml b/hieradata/hosts/elastic1030.yaml
new file mode 100644
index 000..41eab79
--- /dev/null
+++ b/hieradata/hosts/elastic1030.yaml
@@ -0,0 +1,3 @@
+elasticsearch::master_eligible: true
+# make sure the elasticsearch::unicast_hosts property is updated if master
+# eligibility is modified
diff --git a/hieradata/hosts/elastic1036.yaml b/hieradata/hosts/elastic1036.yaml
new file mode 100644
index 000..41eab79
--- /dev/null
+++ b/hieradata/hosts/elastic1036.yaml
@@ -0,0 +1,3 @@
+elasticsearch::master_eligible: true
+# make sure the elasticsearch::unicast_hosts property is updated if master
+# eligibility is modified
diff --git a/hieradata/hosts/elastic1040.yaml b/hieradata/hosts/elastic1040.yaml
new file mode 100644
index 000..41eab79
--- /dev/null
+++ b/hieradata/hosts/elastic1040.yaml
@@ -0,0 +1,3 @@
+elasticsearch::master_eligible: true
+# make sure the elasticsearch::unicast_hosts property is updated if master
+# eligibility is modified
diff --git a/hieradata/hosts/elastic1044.yaml b/hieradata/hosts/elastic1044.yaml
new file mode 100644
index 000..41eab79
--- /dev/null
+++ b/hieradata/hosts/elastic1044.yaml
@@ -0,0 +1,3 @@
+elasticsearch::master_eligible: true
+# make sure the elasticsearch::unicast_hosts property is updated if master
+# eligibility is modified
diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index c31960a..b50957c 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -59,7 +59,7 @@
   elasticsearch::row:  D
 
 es_eqiad_rack_d4:
-  __regex: !ruby/regexp 
/^elastic10(05|06|23|24|25|26|27|28|29|43|44|45|46|47)\.eqiad\.wmnet$/
+  __regex: !ruby/regexp 
/^elastic10(05|06|23|24|25|26|27|28|29|44|45|46|47)\.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 a343e20..bc2f168 100644
--- a/hieradata/role/eqiad/elasticsearch/server.yaml
+++ b/hieradata/role/eqiad/elasticsearch/server.yaml
@@ -5,9 +5,10 @@
 elasticsearch::multicast_group: 224.2.2.5
 elasticsearch::multicast_enabled: false
 elasticsearch::unicast_hosts: # this should be set to the list of master 
eligible nodes
-  - elastic1001.eqiad.wmnet
-  - elastic1008.eqiad.wmnet
-  - elastic1013.eqiad.wmnet
+  - elastic1030.eqiad.wmnet
+  - elastic1036.eqiad.wmnet
+  - elastic1040.eqiad.wmnet
+  - elastic1044.eqiad.wmnet
 
 lvs::realserver::realserver_ips: "10.2.2.30"
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd7e769df8dc5ad4467cfc464af88d43778fa5ba
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] Removed i18n shim - change (mediawiki...EventLogging)

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

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

Change subject: Removed i18n shim
..

Removed i18n shim

Supports mw 1.23+ now.

Change-Id: I0cce53f5b9486b3538fe66eb4f83966a238faf9a
---
D EventLogging.i18n.php
M EventLogging.php
D includes/JsonSchema.i18n.php
3 files changed, 0 insertions(+), 72 deletions(-)


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

diff --git a/EventLogging.i18n.php b/EventLogging.i18n.php
deleted file mode 100644
index 0c264f9..000
--- a/EventLogging.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = [];
-if ( !function_exists( 'wfJsonI18nShim58963441fa6d0066' ) ) {
-   function wfJsonI18nShim58963441fa6d0066( $cache, $code, &$cachedData ) {
-   $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = __DIR__ . "/i18n/core/$csCode.json";
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim58963441fa6d0066';
-}
diff --git a/EventLogging.php b/EventLogging.php
index 37b8e47..f51699d 100644
--- a/EventLogging.php
+++ b/EventLogging.php
@@ -156,9 +156,7 @@
 $wgMessagesDirs['EventLogging'] = __DIR__ . '/i18n/core';
 $wgMessagesDirs['JsonSchema'] = __DIR__ . '/i18n/jsonschema';
 $wgExtensionMessagesFiles += [
-   'EventLogging'   => __DIR__ . '/EventLogging.i18n.php',
'EventLoggingNamespaces' => __DIR__ . '/EventLogging.namespaces.php',
-   'JsonSchema' => __DIR__ . '/includes/JsonSchema.i18n.php',
 ];
 
 // Modules
diff --git a/includes/JsonSchema.i18n.php b/includes/JsonSchema.i18n.php
deleted file mode 100644
index 464d678..000
--- a/includes/JsonSchema.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = [];
-if ( !function_exists( 'wfJsonI18nShim081e52cd9a576eeb0' ) ) {
-   function wfJsonI18nShim081e52cd9a576eeb0( $cache, $code, &$cachedData ) 
{
-   $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = __DIR__ . "/../i18n/$csCode.json";
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim081e52cd9a576eeb0';
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] Group US states into regions - change (wikimedia...golden)

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

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

Change subject: Group US states into regions
..

Group US states into regions

This patch takes the new geodata from Wikipedia Portal event logs
  (where we now record the U.S. visitor's state) and groups the
  states into five regions: Northeast, Midwest, West, South, and
  Pacific.

Bug: T136257
Depends on: Id067003604e91332d50d53b42a883a8d83b8878b
Change-Id: Ia1d27922b911a3efd3106ac165ffda689e685261
---
M portal/portal.R
1 file changed, 28 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/83/295583/1

diff --git a/portal/portal.R b/portal/portal.R
index be7d8a6..de970ee 100644
--- a/portal/portal.R
+++ b/portal/portal.R
@@ -43,17 +43,34 @@
   data <- data[order(data$type, decreasing = FALSE),]
   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")]
-  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",
-"Australia")
+  # Generate by-country breakdown with regional data for US
+  regions <- data.frame(abb = paste0("US:", as.character(state.abb)),
+region = paste0("U.S. (", as.character(state.region), 
")"),
+state = state.name,
+stringsAsFactors = FALSE)
+  regions$region[regions$region == "U.S. (North Central)"] <- "U.S. (Midwest)"
+  regions$region[state.division == "Pacific"] <- "U.S. (Pacific)" # see 
https://phabricator.wikimedia.org/T136257#2399411
+  countries <- data.frame(abb = c(regions$abb, "GB", "CA",
+  "DE", "IN", "AU", "CN",
+  "RU", "PH", "FR"),
+  name = c(regions$region, "United Kingdom", "Canada",
+   "Germany", "India", "Australia", "China",
+   "Russia", "Philippines", "France"),
+  stringsAsFactors = FALSE)
+  ## BEGIN PROTOTYPE
+  # # This can be used to test out the processing code before 
https://gerrit.wikimedia.org/r/#/c/295572/ is merged.
+  # data$country[data$country == "US" & !is.na(data$country)] <- 
sample(unique(regions$abb), sum(data$country == "US", na.rm = TRUE), replace = 
TRUE)
+  ## END PROTOTYPE
+  country_data <- as.data.frame(data) %>%
+dplyr::mutate(country = ifelse(country %in% countries$abb, country, 
"Other")) %>%
+dplyr::left_join(countries, by = c("country" = "abb")) %>%
+dplyr::mutate(name = ifelse(is.na(name), "Other", name)) %>%
+dplyr::select(-country) %>% dplyr::rename(country = name) %>%
+dplyr::group_by(country) %>%
+dplyr::summarize(events = n()) %>%
+dplyr::mutate(date = date) %>%
+dplyr::select(c(date, country, events)) %>%
+dplyr::arrange(desc(country))
 
   # Get user agent data
   wmf::set_proxies() # To allow for the latest YAML to be retrieved.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1d27922b911a3efd3106ac165ffda689e685261
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] Color extraction for large feed card images. - change (apps...wikipedia)

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

Change subject: Color extraction for large feed card images.
..


Color extraction for large feed card images.

- Moved the old ImageViewWithFace to a more general location.
- Made CardLargeHeaderView use the color extraction feature, and set its
  own background based on the extracted color.
- Made a performance improvement in FeedRecyclerAdapter, wherein it no
  longer unconditionally reloads the entire child View structure for every
  card. Instead, it now checks if a Card is being loaded into the same
  View.

Change-Id: I4cdf6599f2e064b37d6f239e09fe2a515130c66c
---
M app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
M app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java
M app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderImageView.java
M app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java
M app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
R app/src/main/java/org/wikipedia/views/FaceAndColorDetectImageView.java
M app/src/main/res/layout/view_article_header_image.xml
M app/src/main/res/layout/view_card_header_large.xml
8 files changed, 80 insertions(+), 22 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java 
b/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
index af8592b..444e1f5 100644
--- a/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
+++ b/app/src/main/java/org/wikipedia/feed/view/CardLargeHeaderView.java
@@ -1,23 +1,28 @@
 package org.wikipedia.feed.view;
 
+import android.animation.ArgbEvaluator;
+import android.animation.ObjectAnimator;
 import android.content.Context;
+import android.graphics.PointF;
 import android.net.Uri;
+import android.support.annotation.ColorInt;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.support.annotation.StringRes;
+import android.view.View;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
-import com.facebook.drawee.view.SimpleDraweeView;
-
 import org.wikipedia.R;
+import org.wikipedia.views.FaceAndColorDetectImageView;
 import org.wikipedia.views.GoneIfEmptyTextView;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
 
 public class CardLargeHeaderView extends LinearLayout {
-@BindView(R.id.view_card_header_large_image) SimpleDraweeView imageView;
+@BindView(R.id.view_card_header_large_background) View backgroundView;
+@BindView(R.id.view_card_header_large_image) FaceAndColorDetectImageView 
imageView;
 @BindView(R.id.view_card_header_large_title) TextView titleView;
 @BindView(R.id.view_card_header_large_page_title) TextView pageTitleView;
 @BindView(R.id.view_card_header_large_subtitle) GoneIfEmptyTextView 
subtitleView;
@@ -27,10 +32,15 @@
 
 inflate(getContext(), R.layout.view_card_header_large, this);
 ButterKnife.bind(this);
+imageView.setOnImageLoadListener(new ImageLoadListener());
+resetBackgroundColor();
 }
 
 @NonNull public CardLargeHeaderView setImage(@Nullable Uri uri) {
-imageView.setImageURI(uri);
+imageView.setVisibility(uri == null ? GONE : VISIBLE);
+if (uri != null) {
+imageView.loadImage(uri);
+}
 return this;
 }
 
@@ -53,4 +63,33 @@
 pageTitleView.setText(title);
 return this;
 }
+
+private void resetBackgroundColor() {
+
backgroundView.setBackgroundColor(getResources().getColor(R.color.gray_background));
+}
+
+private class ImageLoadListener implements 
FaceAndColorDetectImageView.OnImageLoadListener {
+@Override
+public void onImageLoaded(final int bmpHeight, @Nullable final PointF 
faceLocation, @ColorInt final int mainColor) {
+backgroundView.post(new Runnable() {
+@Override
+public void run() {
+animateBackgroundColor(backgroundView, mainColor);
+}
+});
+}
+
+@Override
+public void onImageFailed() {
+resetBackgroundColor();
+}
+
+public void animateBackgroundColor(@NonNull View view, @ColorInt int 
targetColor) {
+final int animDuration = 500;
+final ObjectAnimator animator = 
ObjectAnimator.ofObject(view.getBackground(), "color",
+new ArgbEvaluator(), targetColor);
+animator.setDuration(animDuration);
+animator.start();
+}
+}
 }
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java 
b/app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java
index 5e4962a..cbc5139 

[MediaWiki-commits] [Gerrit] Top o' the feed. - change (apps...wikipedia)

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

Change subject: Top o' the feed.
..


Top o' the feed.

- Composed the layout of the feed header, using a CoordinatorLayout and
  AppToolbarLayout.
- FeedView is now itself a descendant of RecyclerView, instead of
  RelativeLayout.
- FeedFragment now has a Callback through which it passes a Toolbar view,
  and expects the parent activity to take this Toolbar and make it be the
  "active" toolbar of the activity (i.e. override the default toolbar of
  the activity).

Change-Id: I93e4868594f19033c9fcd561d036719f21a8b8fe
---
M app/src/main/java/org/wikipedia/feed/FeedActivity.java
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
M app/src/main/java/org/wikipedia/feed/view/FeedView.java
M app/src/main/java/org/wikipedia/feed/view/ListCardView.java
A app/src/main/res/drawable/feed_app_bar.png
R app/src/main/res/drawable/ic_search_white_24dp.xml
M app/src/main/res/layout/fragment_feed.xml
D app/src/main/res/layout/view_feed.xml
M app/src/main/res/layout/view_search_bar.xml
A app/src/main/res/menu/menu_feed.xml
M app/src/main/res/values/dimens.xml
M app/src/main/res/values/strings_no_translate.xml
12 files changed, 121 insertions(+), 74 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/feed/FeedActivity.java 
b/app/src/main/java/org/wikipedia/feed/FeedActivity.java
index b4eb52b..d137b7d 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedActivity.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedActivity.java
@@ -2,10 +2,11 @@
 
 import android.content.Context;
 import android.content.Intent;
+import android.support.v7.widget.Toolbar;
 
 import org.wikipedia.activity.SingleFragmentActivity;
 
-public class FeedActivity extends SingleFragmentActivity {
+public class FeedActivity extends SingleFragmentActivity 
implements FeedFragment.Callback {
 public static Intent newIntent(Context context) {
 return new Intent(context, FeedActivity.class);
 }
@@ -15,4 +16,15 @@
 }
 
 @Override protected void setTheme() { }
+
+@Override
+public void onAddToolbar(Toolbar toolbar) {
+setSupportActionBar(toolbar);
+getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+}
+
+@Override
+public void onRemoveToolbar(Toolbar toolbar) {
+setSupportActionBar(null);
+}
 }
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index 4239e20..00fe3c6 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -2,8 +2,13 @@
 
 import android.os.Bundle;
 import android.support.annotation.Nullable;
+import android.support.design.widget.CollapsingToolbarLayout;
 import android.support.v4.app.Fragment;
+import android.support.v7.widget.Toolbar;
 import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
 
@@ -19,14 +24,20 @@
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
-import butterknife.OnClick;
 import butterknife.Unbinder;
 
 public class FeedFragment extends Fragment implements 
CallbackFragment {
 @BindView(R.id.fragment_feed_feed) FeedView feedView;
+@BindView(R.id.feed_collapsing_toolbar_layout) CollapsingToolbarLayout 
collapsingToolbarLayout;
+@BindView(R.id.feed_toolbar) Toolbar toolbar;
 private Unbinder unbinder;
 private WikipediaApp app;
 private FeedCoordinator coordinator;
+
+public interface Callback extends CallbackFragment.Callback {
+void onAddToolbar(Toolbar toolbar);
+void onRemoveToolbar(Toolbar toolbar);
+}
 
 public static FeedFragment newInstance() {
 return new FeedFragment();
@@ -49,6 +60,10 @@
 unbinder = ButterKnife.bind(this, view);
 feedView.set(coordinator.getCards());
 
+if (getCallback() != null) {
+getCallback().onAddToolbar(toolbar);
+}
+
 coordinator.setFeedUpdateListener(new 
FeedCoordinator.FeedUpdateListener() {
 @Override
 public void update(List cards) {
@@ -63,19 +78,40 @@
 return view;
 }
 
+@Override
+public void onActivityCreated(Bundle savedInstanceState) {
+super.onActivityCreated(savedInstanceState);
+setHasOptionsMenu(true);
+}
+
 @Override public void onDestroyView() {
+if (getCallback() != null) {
+getCallback().onRemoveToolbar(toolbar);
+}
 unbinder.unbind();
 super.onDestroyView();
+}
+
+@Override
+public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+

[MediaWiki-commits] [Gerrit] Update mobileapps to 1a981f7 - change (mediawiki...deploy)

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

Change subject: Update mobileapps to 1a981f7
..


Update mobileapps to 1a981f7

List of changes:
581fa99 Detect scheme based on request domain
cb2ed0f Minor cleanup
6be8e35 Update thumbnail property in feed endpoint responses
348eef8 Add spec entry for aggregated feed endpoint
461e451 Hygiene: move getRevision and buildSummaryResponse to library
365adeb Add "random" feed endpoint
8c1ef79 Add "random" payload to aggregated response
1a981f7 Don't throw exception for aggregated feed when not on enwiki
xxx Update node module dependencies

Change-Id: I7eb6904d94aef5804e7058be467b15937d60d653
---
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/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
C node_modules/body-parser/node_modules/bytes/package.json
M node_modules/body-parser/node_modules/http-errors/LICENSE
M node_modules/body-parser/node_modules/http-errors/index.js
A 
node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/LICENSE
A 
node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/index.js
A 
node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/package.json
M 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
M node_modules/body-parser/node_modules/http-errors/package.json
M node_modules/body-parser/node_modules/qs/.eslintrc
A node_modules/body-parser/node_modules/qs/.jscs.json
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/bower.json
D node_modules/body-parser/node_modules/qs/component.json
M node_modules/body-parser/node_modules/qs/dist/qs.js
M node_modules/body-parser/node_modules/qs/lib/parse.js
M node_modules/body-parser/node_modules/qs/lib/stringify.js
M node_modules/body-parser/node_modules/qs/lib/utils.js
M node_modules/body-parser/node_modules/qs/package.json
M node_modules/body-parser/node_modules/qs/test/parse.js
M 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
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/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/package.json
D node_modules/compression/node_modules/accepts/node_modules/negotiator/LICENSE
C node_modules/compression/node_modules/bytes/LICENSE
R node_modules/compression/node_modules/bytes/index.js
R node_modules/compression/node_modules/bytes/package.json
D 

[MediaWiki-commits] [Gerrit] Update mobileapps to 1a981f7 - change (mediawiki...deploy)

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

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

Change subject: Update mobileapps to 1a981f7
..

Update mobileapps to 1a981f7

List of changes:
581fa99 Detect scheme based on request domain
cb2ed0f Minor cleanup
6be8e35 Update thumbnail property in feed endpoint responses
348eef8 Add spec entry for aggregated feed endpoint
461e451 Hygiene: move getRevision and buildSummaryResponse to library
365adeb Add "random" feed endpoint
8c1ef79 Add "random" payload to aggregated response
1a981f7 Don't throw exception for aggregated feed when not on enwiki
xxx Update node module dependencies

Change-Id: I7eb6904d94aef5804e7058be467b15937d60d653
---
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/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
C node_modules/body-parser/node_modules/bytes/package.json
M node_modules/body-parser/node_modules/http-errors/LICENSE
M node_modules/body-parser/node_modules/http-errors/index.js
A 
node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/LICENSE
A 
node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/index.js
A 
node_modules/body-parser/node_modules/http-errors/node_modules/setprototypeof/package.json
M 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
M node_modules/body-parser/node_modules/http-errors/package.json
M node_modules/body-parser/node_modules/qs/.eslintrc
A node_modules/body-parser/node_modules/qs/.jscs.json
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/bower.json
D node_modules/body-parser/node_modules/qs/component.json
M node_modules/body-parser/node_modules/qs/dist/qs.js
M node_modules/body-parser/node_modules/qs/lib/parse.js
M node_modules/body-parser/node_modules/qs/lib/stringify.js
M node_modules/body-parser/node_modules/qs/lib/utils.js
M node_modules/body-parser/node_modules/qs/package.json
M node_modules/body-parser/node_modules/qs/test/parse.js
M 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
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/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/package.json
D node_modules/compression/node_modules/accepts/node_modules/negotiator/LICENSE
C node_modules/compression/node_modules/bytes/LICENSE
R node_modules/compression/node_modules/bytes/index.js
R node_modules/compression/node_modules/bytes/package.json
D 

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

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

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 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json
M 

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

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

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] Make messages RFC 5322 compliant - change (mediawiki...Mailgun)

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

Change subject: Make messages RFC 5322 compliant
..


Make messages RFC 5322 compliant

Looks like the problem was with adding all the headers again using the
addCustomHeaders function by Mailgun. We need only the Return-Path from
$headers, and that needs to be set with setReplyToAddress()

Working with bouncehandler too, as the headers are appended correctly.

Bug: T130493
Change-Id: I99e7ba0526c47a541a14f5ab1b31bd645713a324
---
M MailgunHooks.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/MailgunHooks.php b/MailgunHooks.php
index 61ba017..44a40ff 100644
--- a/MailgunHooks.php
+++ b/MailgunHooks.php
@@ -45,10 +45,10 @@
$message->setFromAddress( $from );
$message->setSubject( $subject );
$message->setTextBody( $body );
+   $message->setReplyToAddress( $headers['Return-Path'] );
 
-   foreach( $headers as $headerName => $headerValue ) {
-   $message->addCustomHeader( $headerName, $headerValue );
-   }
+   $message->addCustomHeader( "X-Mailer", $headers['X-Mailer'] );
+   $message->addCustomHeader( "List-Unsubscribe", 
$headers['List-Unsubscribe'] );
 
foreach( $to as $recip ) {
try {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I99e7ba0526c47a541a14f5ab1b31bd645713a324
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Mailgun
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Nemo bis 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] LABS: Enable graphoid geoshapes - change (operations/puppet)

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

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

Change subject: LABS: Enable graphoid geoshapes
..

LABS: Enable graphoid geoshapes

Bug: T138192
Change-Id: Iee133037399cb2fd3166136ccfa30c0195d67f65
---
M hieradata/labs/deployment-prep/common.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/295581/1

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 4120f7c..a5fdab6 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -40,6 +40,8 @@
   wikidatasparql:
 - query.wikidata.org
 - wdqs-test.wmflabs.org
+  geoshape:
+- maps.wikimedia.org
 graphoid::headers:
   'Cache-Control': 'public, s-maxage=360, max-age=360'
 graphoid::error_headers:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee133037399cb2fd3166136ccfa30c0195d67f65
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] Don't throw exception for aggregated feed when not on enwiki - change (mediawiki...mobileapps)

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

Change subject: Don't throw exception for aggregated feed when not on enwiki
..


Don't throw exception for aggregated feed when not on enwiki

Today's featured article feed endpoint currently only works on enwiki and 
throws an exception if it's
used on any other wiki than enwiki. While this is great for this endpoint, the 
aggregated feed endpoint
should still work on other wikis, just skip that one entry for tfa.

Change-Id: Ibe08009762a86bc9e1f6a222f49cc2b23b96ccb5
---
M lib/feed/featured.js
M routes/aggregated.js
M test/features/aggregated/aggregated.js
3 files changed, 27 insertions(+), 9 deletions(-)

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



diff --git a/lib/feed/featured.js b/lib/feed/featured.js
index 71c61ad..b4b9e8c 100644
--- a/lib/feed/featured.js
+++ b/lib/feed/featured.js
@@ -70,14 +70,18 @@
 return extract;
 }
 
-function promise(app, req) {
+function promise(app, req, dontThrow) {
 if (req.params.domain.indexOf('en') !== 0) {
-throw new HTTPError({
-status: 501,
-type: 'unsupported_language',
-title: 'Language not supported',
-detail: 'The language you have requested is not yet supported.'
-});
+if (dontThrow) {
+return {};
+} else {
+throw new HTTPError({
+status: 501,
+type: 'unsupported_language',
+title: 'Language not supported',
+detail: 'The language you have requested is not yet supported.'
+});
+}
 }
 
 var tfaPageObj, pageTitle;
diff --git a/routes/aggregated.js b/routes/aggregated.js
index cbf524f..111efaa 100644
--- a/routes/aggregated.js
+++ b/routes/aggregated.js
@@ -31,7 +31,7 @@
 router.get('/featured/:/:mm/:dd', function (req, res) {
 var dateString = dateUtil.dateStringFrom(req);
 return BBPromise.props({
-tfa: featured.promise(app, req),
+tfa: featured.promise(app, req, true),
 mostread: mostRead.promise(app, dateUtil.yesterday(req)),
 random: random.promise(app, req)
 //news: news.promise(app, req),
diff --git a/test/features/aggregated/aggregated.js 
b/test/features/aggregated/aggregated.js
index 46e6362..27c1d64 100644
--- a/test/features/aggregated/aggregated.js
+++ b/test/features/aggregated/aggregated.js
@@ -33,4 +33,18 @@
 assert.ok(body.hasOwnProperty('video'), 'Should have today\'s 
featured video');
 });
 });
-});
\ No newline at end of file
+
+it('non-enwiki doesn\'t have tfa entry', function() {
+return preq.get({ uri: server.config.uri + 
'fr.wikipedia.org/v1/feed/featured/' + dateString })
+.then(function(res) {
+var body = res.body;
+assert.deepEqual(res.status, 200);
+assert.ok(!body.hasOwnProperty('tfa'), 'Should not have 
today\'s featured article');
+assert.ok(body.hasOwnProperty('mostread'), 'Should have 
most-read articles');
+assert.ok(body.hasOwnProperty('random'), 'Should have random 
article');
+assert.ok(body.hasOwnProperty('news'), 'Should have today\'s 
news');
+assert.ok(body.hasOwnProperty('image'), 'Should have today\'s 
featured image');
+assert.ok(body.hasOwnProperty('video'), 'Should have today\'s 
featured video');
+});
+});
+});

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe08009762a86bc9e1f6a222f49cc2b23b96ccb5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
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] LABS: Enable geoshapes graph protocol - change (operations/mediawiki-config)

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

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

Change subject: LABS: Enable geoshapes graph protocol
..

LABS: Enable geoshapes graph protocol

Bug: T138192
Change-Id: I3de1409913dcd9a49288084f9c4f92107286f0da
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 053b3a1..13f30d2 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -327,6 +327,7 @@
$wgGraphAllowedDomains['http'] = [ 'wmflabs.org' ];
$wgGraphAllowedDomains['wikirawupload'][] = 'upload.beta.wmflabs.org';
$wgGraphAllowedDomains['wikidatasparql'][] = 'wdqs-test.wmflabs.org';
+   $wgGraphAllowedDomains['geoshape'] = [ 'maps.wikimedia.org' ];
 }
 
 if ( $wmgUseKartographer ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3de1409913dcd9a49288084f9c4f92107286f0da
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Add category to "Unknown fields" reports - change (labs...heritage)

2016-06-22 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review.

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

Change subject: Add category to "Unknown fields" reports
..

Add category to "Unknown fields" reports

Change-Id: Id738dfba2c2a3c003be73823d79bcc6f5f21febd
---
M erfgoedbot/update_database.py
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/79/295579/1

diff --git a/erfgoedbot/update_database.py b/erfgoedbot/update_database.py
index f337d2a..b903b90 100755
--- a/erfgoedbot/update_database.py
+++ b/erfgoedbot/update_database.py
@@ -216,12 +216,13 @@
 site, u'Commons:Monuments database/Unknown fields/%s' % 
(countryconfig.get('table'),))
 
 text = u'{| class="wikitable sortable"\n'
-text = text + u'! Field !! Count\n'
+text += u'! Field !! Count\n'
 for key, value in unknownFields.items():
-text = text + u'|-\n'
-text = text + u'| %s || %s\n' % (key, value)
+text += u'|-\n'
+text += u'| %s || %s\n' % (key, value)
 
-text = text + u'|}'
+text += u'|}\n'
+text += u'[[Category:Commons:Monuments database/Unknown fields]]'
 comment = u'Updating the list of unknown fields'
 page.put(text, comment)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id738dfba2c2a3c003be73823d79bcc6f5f21febd
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil 

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


[MediaWiki-commits] [Gerrit] LVS: sysctl netdev tuning - change (operations/puppet)

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

Change subject: LVS: sysctl netdev tuning
..


LVS: sysctl netdev tuning

Somehow we seem to have lost even basic netdev_max_backlog on the
LVS machines (other than the 2500 from base), although I think we
had it there at one point historically.  Perhaps it was lost
during mysterious-sysctl move?

This copies over the basics from the recently-updated cache server
tuning, and uses the full 10GbE recommended value for max_backlog.
netdev_budget may need a further increase, but we'll see how it
plays out on LVS and caches before raising it further.  The LVS
see more column-3 counters than even the caches do, indicating
we're pretty far off on budget today.

Change-Id: If0ce69165c5abaf4b4eaff7268be0f5c90d8c4e6
---
M modules/lvs/manifests/balancer.pp
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/modules/lvs/manifests/balancer.pp 
b/modules/lvs/manifests/balancer.pp
index b7062bf..7e6df30 100644
--- a/modules/lvs/manifests/balancer.pp
+++ b/modules/lvs/manifests/balancer.pp
@@ -58,6 +58,12 @@
 'net.ipv4.vs.drop_entry'  => 1,
 # Also schedule ICMPs, like e.g. fragmentation needed (needs Linux 
4.4.0)
 'net.ipv4.vs.schedule_icmp'   => 1,
+
+# basic netdev tuning for 10GbE interfaces at full speed with RPS.
+# See deeper details in role::cache::perf
+'net.core.netdev_max_backlog' => 30,
+'net.core.netdev_budget'  => 1024,
+'net.core.netdev_tstamp_prequeue' => 0,
 },
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0ce69165c5abaf4b4eaff7268be0f5c90d8c4e6
Gerrit-PatchSet: 5
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] r::c::perf: raise netdev_budget a bit - change (operations/puppet)

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

Change subject: r::c::perf: raise netdev_budget a bit
..


r::c::perf: raise netdev_budget a bit

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

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



diff --git a/modules/role/manifests/cache/perf.pp 
b/modules/role/manifests/cache/perf.pp
index 1604c6d..4d6e622 100644
--- a/modules/role/manifests/cache/perf.pp
+++ b/modules/role/manifests/cache/perf.pp
@@ -93,6 +93,13 @@
 # will see drops in col 2 of /proc/net/softnet_stat
 'net.core.netdev_max_backlog'=> 6,
 
+# budget: Similar to the above, default 300, and is the #packets
+# handled per NAPI polling cycle across all interfaces.  You can 
see
+# effects of this being too low in col 3 of /proc/net/softnet_stat.
+# Caches show some small numbers there, so, experimenting with
+# raising this a bit for now
+'net.core.netdev_budget' => 1024,
+
 # Default:1 - setting this to zero defers timestamping until after
 # RPS.  It's more efficient this way, but timestamp doesn't account
 # for any tiny delays in queueing before RPS, which I don't think 
is

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3692c55f8ce324edfc9eacee07e04cb3fc0af1c7
Gerrit-PatchSet: 4
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] logstash: Utilize de_dot filter for sending to es 2.x - change (operations/puppet)

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

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

Change subject: logstash: Utilize de_dot filter for sending to es 2.x
..

logstash: Utilize de_dot filter for sending to es 2.x

post process logs to make them es 2.x compatible by converting
dot's in the properties into underscores.

This needs to be tested on beta cluster before being merged.

Change-Id: I46d177ce1218eee6f86fa9468b917dc54b3d55da
Depends-On: Ibb83558
Bug: T138335
---
A files/logstash/filter-de_dot.conf
M manifests/role/logstash.pp
2 files changed, 16 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/295578/1

diff --git a/files/logstash/filter-de_dot.conf 
b/files/logstash/filter-de_dot.conf
new file mode 100644
index 000..6ae1081
--- /dev/null
+++ b/files/logstash/filter-de_dot.conf
@@ -0,0 +1,8 @@
+filter {
+  if "es" in [tags] {
+de_dot {
+  add_tag => [ "es2" ]
+  remove_tag => [ "es" ]
+}
+  }
+}
diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp
index 8656da6..f4d748a 100644
--- a/manifests/role/logstash.pp
+++ b/manifests/role/logstash.pp
@@ -125,6 +125,12 @@
 priority => 70,
 }
 
+logstash::conf { 'filter_de_dot':
+source   => 'puppet:///files/logstash/filter-do_dot.conf',
+priority => 70,
+}
+
+
 ## Outputs (90)
 # Template for Elasticsearch index creation
 file { '/etc/logstash/elasticsearch-template.json':
@@ -138,7 +144,7 @@
 
 logstash::output::elasticsearch { 'logstash':
 host=> '127.0.0.1',
-guard_condition => '"es" in [tags]',
+guard_condition => '"es in [tags]',
 manage_indices  => true,
 priority=> 90,
 template=> '/etc/logstash/elasticsearch-template.json',
@@ -150,7 +156,7 @@
 template_name   => 'logstash',
 index_prefix=> 'logstash',
 host=> $logstash_alt_host,
-guard_condition => '"es" in [tags]',
+guard_condition => '"es2" in [tags]',
 manage_indices  => true,
 priority=> 90,
 template=> '/etc/logstash/elasticsearch-template.json',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46d177ce1218eee6f86fa9468b917dc54b3d55da
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] move r::c::base classparams down as appropriate - change (operations/puppet)

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

Change subject: move r::c::base classparams down as appropriate
..


move r::c::base classparams down as appropriate

These 5 are actually specific to text or upload at this time.

Change-Id: Ibe5b7a46e707444b1f3a486569bf7c05a0740ec7
---
M hieradata/labs.yaml
M modules/role/manifests/cache/base.pp
M modules/role/manifests/cache/text.pp
M modules/role/manifests/cache/upload.pp
4 files changed, 20 insertions(+), 18 deletions(-)

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



diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index 9499dd9..7459e1f 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -107,11 +107,11 @@
 role::cache::base::zero_site: 'http://zero.wikimedia.beta.wmflabs.org'
 role::cache::base::purge_host_only_upload_re: '^upload\.beta\.wmflabs\.org$'
 role::cache::base::purge_host_not_upload_re: '^(?!upload\.beta\.wmflabs\.org)'
-role::cache::base::static_host: 'deployment.wikimedia.beta.wmflabs.org'
-role::cache::base::upload_domain: 'upload.beta.wmflabs.org'
-role::cache::base::bits_domain: 'bits.beta.wmflabs.org'
-role::cache::base::shortener_domain: 'w-beta.wmflabs.org'
-role::cache::base::top_domain: 'beta.wmflabs.org'
+role::cache::upload::upload_domain: 'upload.beta.wmflabs.org'
+role::cache::text::static_host: 'deployment.wikimedia.beta.wmflabs.org'
+role::cache::text::bits_domain: 'bits.beta.wmflabs.org'
+role::cache::text::shortener_domain: 'w-beta.wmflabs.org'
+role::cache::text::top_domain: 'beta.wmflabs.org'
 role::cache::2layer::storage_parts:
   - vdb
   - vdb
diff --git a/modules/role/manifests/cache/base.pp 
b/modules/role/manifests/cache/base.pp
index af583d9..baace7e 100644
--- a/modules/role/manifests/cache/base.pp
+++ b/modules/role/manifests/cache/base.pp
@@ -2,12 +2,6 @@
 $zero_site = 'https://zero.wikimedia.org',
 $purge_host_only_upload_re = '^upload\.wikimedia\.org$',
 $purge_host_not_upload_re = '^(?!upload\.wikimedia\.org)',
-# static_host must serve MediaWiki (e.g. not wwwportal)
-$static_host = 'en.wikipedia.org',
-$upload_domain = 'upload.wikimedia.org',
-$bits_domain = 'bits.wikimedia.org',
-$top_domain = 'org',
-$shortener_domain = 'w.wiki',
 ) {
 include standard
 include nrpe
diff --git a/modules/role/manifests/cache/text.pp 
b/modules/role/manifests/cache/text.pp
index 29726d6..beb7637 100644
--- a/modules/role/manifests/cache/text.pp
+++ b/modules/role/manifests/cache/text.pp
@@ -1,4 +1,10 @@
-class role::cache::text {
+class role::cache::text(
+# static_host must serve MediaWiki (e.g. not wwwportal)
+$static_host = 'en.wikipedia.org',
+$bits_domain = 'bits.wikimedia.org',
+$top_domain = 'org',
+$shortener_domain = 'w.wiki',
+) {
 require geoip
 require geoip::dev # for VCL compilation using libGeoIP
 include role::cache::2layer
@@ -93,10 +99,10 @@
 $common_vcl_config = {
 'cache4xx' => '1m',
 'purge_host_regex' => $::role::cache::base::purge_host_not_upload_re,
-'static_host'  => $::role::cache::base::static_host,
-'bits_domain'  => $::role::cache::base::bits_domain,
-'top_domain'   => $::role::cache::base::top_domain,
-'shortener_domain' => $::role::cache::base::shortener_domain,
+'static_host'  => $static_host,
+'bits_domain'  => $bits_domain,
+'top_domain'   => $top_domain,
+'shortener_domain' => $shortener_domain,
 'pass_random'  => true,
 }
 
diff --git a/modules/role/manifests/cache/upload.pp 
b/modules/role/manifests/cache/upload.pp
index e5acf4b..f8f3774 100644
--- a/modules/role/manifests/cache/upload.pp
+++ b/modules/role/manifests/cache/upload.pp
@@ -1,4 +1,6 @@
-class role::cache::upload {
+class role::cache::upload(
+$upload_domain = 'upload.wikimedia.org',
+) {
 include role::cache::2layer
 include role::cache::ssl::unified
 if $::standard::has_ganglia {
@@ -58,7 +60,7 @@
 $common_vcl_config = {
 'cache4xx' => '1m',
 'purge_host_regex' => $::role::cache::base::purge_host_only_upload_re,
-'upload_domain'=> $::role::cache::base::upload_domain,
+'upload_domain'=> $upload_domain,
 'allowed_methods'  => '^(GET|HEAD|OPTIONS|PURGE)$',
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe5b7a46e707444b1f3a486569bf7c05a0740ec7
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

[MediaWiki-commits] [Gerrit] Change link to help page on Special:Notifications - change (mediawiki...Echo)

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

Change subject: Change link to help page on Special:Notifications
..


Change link to help page on Special:Notifications

Bug: T138395
Change-Id: I6b9476206c53925a9d63b41da4b2fde33c739584
---
M includes/special/SpecialNotifications.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/special/SpecialNotifications.php 
b/includes/special/SpecialNotifications.php
index 432306a..a2365ba 100644
--- a/includes/special/SpecialNotifications.php
+++ b/includes/special/SpecialNotifications.php
@@ -18,7 +18,7 @@
$out = $this->getOutput();
$out->setPageTitle( $this->msg( 'echo-specialpage' )->text() );
 
-   $this->addHelpLink( 'Help:Notifications' );
+   $this->addHelpLink( 'Help:Notifications/Special:Notifications' 
);
 
$user = $this->getUser();
if ( $user->isAnon() ) {

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

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

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


[MediaWiki-commits] [Gerrit] move r::c::base classparams down as appropriate - change (operations/puppet)

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

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

Change subject: move r::c::base classparams down as appropriate
..

move r::c::base classparams down as appropriate

These 5 are actually specific to text or upload at this time.

Change-Id: Ibe5b7a46e707444b1f3a486569bf7c05a0740ec7
---
M hieradata/labs.yaml
M modules/role/manifests/cache/base.pp
M modules/role/manifests/cache/text.pp
M modules/role/manifests/cache/upload.pp
4 files changed, 20 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/77/295577/1

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index 9499dd9..7459e1f 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -107,11 +107,11 @@
 role::cache::base::zero_site: 'http://zero.wikimedia.beta.wmflabs.org'
 role::cache::base::purge_host_only_upload_re: '^upload\.beta\.wmflabs\.org$'
 role::cache::base::purge_host_not_upload_re: '^(?!upload\.beta\.wmflabs\.org)'
-role::cache::base::static_host: 'deployment.wikimedia.beta.wmflabs.org'
-role::cache::base::upload_domain: 'upload.beta.wmflabs.org'
-role::cache::base::bits_domain: 'bits.beta.wmflabs.org'
-role::cache::base::shortener_domain: 'w-beta.wmflabs.org'
-role::cache::base::top_domain: 'beta.wmflabs.org'
+role::cache::upload::upload_domain: 'upload.beta.wmflabs.org'
+role::cache::text::static_host: 'deployment.wikimedia.beta.wmflabs.org'
+role::cache::text::bits_domain: 'bits.beta.wmflabs.org'
+role::cache::text::shortener_domain: 'w-beta.wmflabs.org'
+role::cache::text::top_domain: 'beta.wmflabs.org'
 role::cache::2layer::storage_parts:
   - vdb
   - vdb
diff --git a/modules/role/manifests/cache/base.pp 
b/modules/role/manifests/cache/base.pp
index af583d9..baace7e 100644
--- a/modules/role/manifests/cache/base.pp
+++ b/modules/role/manifests/cache/base.pp
@@ -2,12 +2,6 @@
 $zero_site = 'https://zero.wikimedia.org',
 $purge_host_only_upload_re = '^upload\.wikimedia\.org$',
 $purge_host_not_upload_re = '^(?!upload\.wikimedia\.org)',
-# static_host must serve MediaWiki (e.g. not wwwportal)
-$static_host = 'en.wikipedia.org',
-$upload_domain = 'upload.wikimedia.org',
-$bits_domain = 'bits.wikimedia.org',
-$top_domain = 'org',
-$shortener_domain = 'w.wiki',
 ) {
 include standard
 include nrpe
diff --git a/modules/role/manifests/cache/text.pp 
b/modules/role/manifests/cache/text.pp
index 29726d6..beb7637 100644
--- a/modules/role/manifests/cache/text.pp
+++ b/modules/role/manifests/cache/text.pp
@@ -1,4 +1,10 @@
-class role::cache::text {
+class role::cache::text(
+# static_host must serve MediaWiki (e.g. not wwwportal)
+$static_host = 'en.wikipedia.org',
+$bits_domain = 'bits.wikimedia.org',
+$top_domain = 'org',
+$shortener_domain = 'w.wiki',
+) {
 require geoip
 require geoip::dev # for VCL compilation using libGeoIP
 include role::cache::2layer
@@ -93,10 +99,10 @@
 $common_vcl_config = {
 'cache4xx' => '1m',
 'purge_host_regex' => $::role::cache::base::purge_host_not_upload_re,
-'static_host'  => $::role::cache::base::static_host,
-'bits_domain'  => $::role::cache::base::bits_domain,
-'top_domain'   => $::role::cache::base::top_domain,
-'shortener_domain' => $::role::cache::base::shortener_domain,
+'static_host'  => $static_host,
+'bits_domain'  => $bits_domain,
+'top_domain'   => $top_domain,
+'shortener_domain' => $shortener_domain,
 'pass_random'  => true,
 }
 
diff --git a/modules/role/manifests/cache/upload.pp 
b/modules/role/manifests/cache/upload.pp
index e5acf4b..f8f3774 100644
--- a/modules/role/manifests/cache/upload.pp
+++ b/modules/role/manifests/cache/upload.pp
@@ -1,4 +1,6 @@
-class role::cache::upload {
+class role::cache::upload(
+$upload_domain = 'upload.wikimedia.org',
+) {
 include role::cache::2layer
 include role::cache::ssl::unified
 if $::standard::has_ganglia {
@@ -58,7 +60,7 @@
 $common_vcl_config = {
 'cache4xx' => '1m',
 'purge_host_regex' => $::role::cache::base::purge_host_only_upload_re,
-'upload_domain'=> $::role::cache::base::upload_domain,
+'upload_domain'=> $upload_domain,
 'allowed_methods'  => '^(GET|HEAD|OPTIONS|PURGE)$',
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe5b7a46e707444b1f3a486569bf7c05a0740ec7
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] Change-Prop: Added rules for ORES cache updates - change (operations/puppet)

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

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

Change subject: Change-Prop: Added rules for ORES cache updates
..

Change-Prop: Added rules for ORES cache updates

Change-Id: I30b5f0e1bac559c946a6538fddd708a9941feb12
---
M modules/changeprop/manifests/init.pp
M modules/changeprop/templates/config.yaml.erb
2 files changed, 120 insertions(+), 1 deletion(-)


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

diff --git a/modules/changeprop/manifests/init.pp 
b/modules/changeprop/manifests/init.pp
index 5ec01d2..0d02fe1 100644
--- a/modules/changeprop/manifests/init.pp
+++ b/modules/changeprop/manifests/init.pp
@@ -13,6 +13,9 @@
 # [*purge_host*]
 #   The vhtcpd daemon host to send purge requests to. Default: 239.128.0.112
 #
+# [*ores_host*]
+#   The host where ORES service is running. Default: ores.svc.eqiad.wmnet
+#
 # [*purge_port*]
 #   The port the vhtcp daemon listens to. Default: 4827
 #
@@ -20,11 +23,13 @@
 #   The maximum number of tasks the service can execute at any given point in
 #   time. Default: 30
 #
+
 class changeprop(
 $zk_uri,
 $purge_host   = '239.128.0.112',
+$ores_host= 'ores.svc.eqiad.wmnet',
 $purge_port   = 4827,
-$concurrency  = 50,
+$concurrency  = 50
 ) {
 
 include ::service::configuration
diff --git a/modules/changeprop/templates/config.yaml.erb 
b/modules/changeprop/templates/config.yaml.erb
index 2c2a202..c34e8f59 100644
--- a/modules/changeprop/templates/config.yaml.erb
+++ b/modules/changeprop/templates/config.yaml.erb
@@ -215,3 +215,117 @@
 #cache-control: no-cache
 #  query:
 #redirect: false
+
+# ORES caching updates
+ores_cache:
+  topic: mediawiki.revision_create
+  cases:
+- match:
+meta:
+  domain: ar.wikipedia.org
+  exec:
+uri: 'http://<%= @ores_host 
%>/v2/scores/arwiki/reverted/{{message.rev_id}}/?precache=true'
+- match:
+meta:
+  domain: en.wikipedia.org
+  exec:
+- uri: 'http://<%= @ores_host 
%>/v2/scores/enwiki/damaging/{{message.rev_id}}/?precache=true'
+- uri: 'http://<%= @ores_host 
%>/v2/scores/enwiki/reverted/{{message.rev_id}}/?precache=true'
+- uri: 'http://<%= @ores_host 
%>/v2/scores/enwiki/goodfaith/{{message.rev_id}}/?precache=true'
+- match:
+meta:
+  domain: es.wikipedia.org
+  exec:
+uri: 'http://<%= @ores_host 
%>/v2/scores/eswiki/reverted/{{message.rev_id}}/?precache=true'
+- match:
+meta:
+  domain: et.wikipedia.org
+  exec:
+uri: 'http://<%= @ores_host 
%>/v2/scores/etwiki/reverted/{{message.rev_id}}/?precache=true'
+- match:
+meta:
+  domain: fa.wikipedia.org
+  exec:
+- uri: 'http://<%= @ores_host 
%>/v2/scores/fawiki/damaging/{{message.rev_id}}/?precache=true'
+- uri: 'http://<%= @ores_host 
%>/v2/scores/fawiki/reverted/{{message.rev_id}}/?precache=true'
+- uri: 'http://<%= @ores_host 
%>/v2/scores/fawiki/goodfaith/{{message.rev_id}}/?precache=true'
+- match:
+meta:
+  domain: fr.wikipedia.org
+  exec:
+uri: 'http://<%= @ores_host 
%>/v2/scores/frwiki/reverted/{{message.rev_id}}/?precache=true'
+- match:
+meta:
+  domain: he.wikipedia.org
+  exec:
+uri: 'http://<%= @ores_host 
%>/v2/scores/hewiki/reverted/{{message.rev_id}}/?precache=true'
+- match:
+meta:
+  domain: hu.wikipedia.org
+  exec:
+uri: 'http://<%= @ores_host 
%>/v2/scores/huwiki/reverted/{{message.rev_id}}/?precache=true'
+- match:
+meta:
+  domain: id.wikipedia.org
+  exec:
+uri: 'http://<%= @ores_host 
%>/v2/scores/idwiki/reverted/{{message.rev_id}}/?precache=true'
+ 

[MediaWiki-commits] [Gerrit] Add de_dot filter and rename to logstash-filters-wikimedia - change (operations...plugins)

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

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

Change subject: Add de_dot filter and rename to logstash-filters-wikimedia
..

Add de_dot filter and rename to logstash-filters-wikimedia

To facilitate the upgrade to elasticsearch 2.x we need to add the de_dot
filter, as 2.x does not allow properties to contain a dot.  Additionally
renames the plugin to logstash-filters-wikimedia to capture the fact
that this now contains multiple plugins and not just the prune plugin.

Change-Id: Ibb835587d90a5483e8d38b2481bae5c9eae4fd83
---
R logstash-filters-wikimedia.gemspec
A logstash/filters/de_dot.rb
2 files changed, 99 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/logstash/plugins 
refs/changes/75/295575/1

diff --git a/logstash-filter-prune.gemspec b/logstash-filters-wikimedia.gemspec
similarity index 78%
rename from logstash-filter-prune.gemspec
rename to logstash-filters-wikimedia.gemspec
index 08b0340..eaa183f 100644
--- a/logstash-filter-prune.gemspec
+++ b/logstash-filters-wikimedia.gemspec
@@ -1,9 +1,9 @@
 Gem::Specification.new do |s|
 
-  s.name= 'logstash-filter-prune'
+  s.name= 'logstash-filters-wikimedia'
   s.version = '0.1.5'
   s.licenses= ['Apache License (2.0)']
-  s.summary = "The prune filter is for pruning event data from fields 
based on whitelist/blacklist of field names or their values (names and values 
can also be regular expressions)"
+  s.summary = "Backports of logstash plugins for wikimedia 
installation. Includes the prune and de_dot filters"
   s.description = "This gem is a logstash plugin required to be installed 
on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. 
This gem is not a stand-alone program"
   s.authors = ["Elastic"]
   s.email   = 'i...@elastic.co'
diff --git a/logstash/filters/de_dot.rb b/logstash/filters/de_dot.rb
new file mode 100644
index 000..5918eae
--- /dev/null
+++ b/logstash/filters/de_dot.rb
@@ -0,0 +1,97 @@
+# encoding: utf-8
+require "logstash/filters/base"
+require "logstash/namespace"
+
+# This filter _appears_ to rename fields by replacing `.` characters with a 
different
+# separator.  In reality, it's a somewhat expensive filter that has to copy the
+# source field contents to a new destination field (whose name no longer 
contains
+# dots), and then remove the corresponding source field.
+#
+# It should only be used if no other options are available.
+class LogStash::Filters::De_dot < LogStash::Filters::Base
+
+  config_name "de_dot"
+
+  # Replace dots with this value.
+  config :separator, :validate => :string, :default => "_"
+
+  # If `nested` is _true_, then create sub-fields instead of replacing dots 
with
+  # a different separator.
+  config :nested, :validate => :boolean, :default => false
+
+  # The `fields` array should contain a list of known fields to act on.
+  # If undefined, all top-level fields will be checked.  Sub-fields must be
+  # manually specified in the array.  For example: 
`["field.suffix","[foo][bar.suffix]"]`
+  # will result in "field_suffix" and nested or sub field ["foo"]["bar_suffix"]
+  #
+  # WARNING: This is an expensive operation.
+  #
+  config :fields, :validate => :array
+
+  public
+  def has_dot?(fieldref)
+fieldref =~ /\./
+  end
+
+  public
+  def register
+raise ArgumentError, "de_dot: separator cannot be or contain '.'" unless 
(@separator =~ /\./).nil?
+# Add instance variables here, if any
+  end # def register
+
+  private
+  def find_fieldref_for_delete(source)
+# In cases where fieldref may look like [a.b][c.d][e.f], we only want to 
delete
+# the first level at which the dotted field appears.
+fieldref = ''
+@logger.debug? && @logger.debug("de_dot: source fieldref for delete", 
:source => source)
+# Iterate over each level of source
+source.delete('[').split(']').each do |ref|
+  fieldref = fieldref + '['
+  if has_dot?(ref)
+# return when we find the first ref with a '.'
+@logger.debug? && @logger.debug("de_dot: fieldref for delete", 
:fieldref => fieldref + ref + ']')
+return fieldref + ref + ']'
+  else
+fieldref = fieldref + ref + ']'
+@logger.debug? && @logger.debug("de_dot: fieldref still building", 
:fieldref => fieldref)
+  end
+end
+  end
+
+  private
+  def rename_field(event, fieldref)
+@logger.debug? && @logger.debug("de_dot: preprocess", :event => 
event.to_hash.to_s)
+if @separator == ']['
+  @logger.debug? && @logger.debug("de_dot: fieldref pre-process", 
:fieldref => fieldref)
+  fieldref = '[' + fieldref if fieldref[0] != '['
+  fieldref = fieldref + ']' if fieldref[-1] != ']'
+  @logger.debug? && @logger.debug("de_dot: fieldref bounding square 
brackets should exist now", :fieldref => fieldref)
+ 

[MediaWiki-commits] [Gerrit] Change link to help page on Special:Notifications - change (mediawiki...Echo)

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

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

Change subject: Change link to help page on Special:Notifications
..

Change link to help page on Special:Notifications

Bug: T138395
Change-Id: I6b9476206c53925a9d63b41da4b2fde33c739584
---
M includes/special/SpecialNotifications.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/special/SpecialNotifications.php 
b/includes/special/SpecialNotifications.php
index 432306a..a2365ba 100644
--- a/includes/special/SpecialNotifications.php
+++ b/includes/special/SpecialNotifications.php
@@ -18,7 +18,7 @@
$out = $this->getOutput();
$out->setPageTitle( $this->msg( 'echo-specialpage' )->text() );
 
-   $this->addHelpLink( 'Help:Notifications' );
+   $this->addHelpLink( 'Help:Notifications/Special:Notifications' 
);
 
$user = $this->getUser();
if ( $user->isAnon() ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki.action.edit.stash: Restore dependency to 'jquery.g... - change (mediawiki/core)

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

Change subject: mediawiki.action.edit.stash: Restore dependency to 
'jquery.getAttrs'
..


mediawiki.action.edit.stash: Restore dependency to 'jquery.getAttrs'

mediawiki.action.edit.stash.js uses .serializeObject().
jQuery.fn.serializeObject is defined in module 'jquery.getAttrs'.
The dependency to 'jquery.getAttrs' was removed in 9bec479f.

* Follow-up 9bec479f.

Change-Id: I73bf1a29d76ab97a690b729a7e658048b011c680
---
M resources/Resources.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/Resources.php b/resources/Resources.php
index e31e77e..90510fc 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1417,6 +1417,7 @@
'mediawiki.action.edit.styles',
'jquery.textSelection',
'jquery.byteLimit',
+   'jquery.getAttrs',
'mediawiki.api',
],
'position' => 'top',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I73bf1a29d76ab97a690b729a7e658048b011c680
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Gerrit Patch Uploader 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] r::c::perf: disable prequeue timestamps - change (operations/puppet)

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

Change subject: r::c::perf: disable prequeue timestamps
..


r::c::perf: disable prequeue timestamps

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

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



diff --git a/modules/role/manifests/cache/perf.pp 
b/modules/role/manifests/cache/perf.pp
index 4599ce9..1604c6d 100644
--- a/modules/role/manifests/cache/perf.pp
+++ b/modules/role/manifests/cache/perf.pp
@@ -93,6 +93,12 @@
 # will see drops in col 2 of /proc/net/softnet_stat
 'net.core.netdev_max_backlog'=> 6,
 
+# Default:1 - setting this to zero defers timestamping until after
+# RPS.  It's more efficient this way, but timestamp doesn't account
+# for any tiny delays in queueing before RPS, which I don't think 
is
+# an issue in our case.
+'net.core.netdev_tstamp_prequeue'=> 0,
+
 # Our rate of incoming SYN on heaviest cp hosts peaks around
 # 1-2K/sec.  For somaxconn, the SYN numbers should be multiplied
 # out for a few seconds of headroom (bursts, and userspace delays)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id6e243c42b1d503febe86ee4dc142796ea758fe9
Gerrit-PatchSet: 3
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] r::c::perf: un-mysterious the rest - change (operations/puppet)

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

Change subject: r::c::perf: un-mysterious the rest
..


r::c::perf: un-mysterious the rest

timeouts/retries unchanged-but-documented.  max orphans and
tw_buckets raised to match earlier calculations in preceeding
commits and documented.

Change-Id: Ic904f21af918a515d43ec142dd97d40403a00519
---
M modules/role/manifests/cache/perf.pp
1 file changed, 25 insertions(+), 11 deletions(-)

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



diff --git a/modules/role/manifests/cache/perf.pp 
b/modules/role/manifests/cache/perf.pp
index fdceffb..4599ce9 100644
--- a/modules/role/manifests/cache/perf.pp
+++ b/modules/role/manifests/cache/perf.pp
@@ -80,9 +80,6 @@
 # ---
 
 # Network tuning for high-load HTTP caches
-# Ones marked 'mysterious' are of mysterious years-old origin, and need
-# re-investigation to document their utility and/or re-tune them for new
-# kernels and traffic levels.
 sysctl::parameters { 'cache proxy network tuning':
 values => {
 # Increase the number of ephemeral ports
@@ -112,15 +109,32 @@
 # and/or cp host depool headroom.
 'net.ipv4.tcp_max_syn_backlog'   => 524288,
 
-# Decrease FD/socket usage
-'net.ipv4.tcp_tw_reuse'  => 1,
-'net.ipv4.tcp_max_tw_buckets'=> 36, # 'mysterious'
-'net.ipv4.tcp_fin_timeout'   => 3,  # 'mysterious'
-'net.ipv4.tcp_max_orphans'   => 262144, # 'mysterious'
-'net.ipv4.tcp_synack_retries'=> 2,  # 'mysterious'
-'net.ipv4.tcp_syn_retries'   => 2,  # 'mysterious'
+# Building on the metrics above - tw_buckets should be somewhere
+# close to the concurrency/syn_backlog sort of level as well so 
that
+# we properly timewait connections when necc.  Note that tw_reuse
+# moderates the localhost<->localhost timewaits.  max_orphans 
should
+# be close to the same value, I think, as most of the lingering TW
+# will be orphans.
+'net.ipv4.tcp_max_tw_buckets'=> 524288,
+'net.ipv4.tcp_max_orphans'   => 524288,
+'net.ipv4.tcp_tw_reuse'  => 1, # documented above
 
-# Pure perf hacks
+# FIN_WAIT_2 orphan time, def 60.  Reducing this reduces wasted
+# sockets and memory, and there's no good reason to set it higher
+# than roughly the maximum reasonable client RTT in our case.
+'net.ipv4.tcp_fin_timeout'   => 3,
+
+# Defaults are synack:5 and syn:6.  These control retries on SYN
+# (outbound) and SYNACK (inbound) before giving up on connection
+# establishment.  The defaults with the normal backoff timers can
+# leave not-yet-connected sockets lingering for unacceptably-long
+# times (1-2 minutes).  Aside from waste, that's also a potential
+# DoS vector we'd rather not have.  The "2" value drops the maximum
+# time windows down to ~7 seconds.
+'net.ipv4.tcp_synack_retries'=> 2,
+'net.ipv4.tcp_syn_retries'   => 2,
+
+# Pure perf hacks (documented above)
 'net.ipv4.tcp_notsent_lowat' => 131072,
 'net.ipv4.tcp_slow_start_after_idle' => 0,
 },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic904f21af918a515d43ec142dd97d40403a00519
Gerrit-PatchSet: 3
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] r::c::perf: un-mysterious somaxconn + syn_backlog - change (operations/puppet)

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

Change subject: r::c::perf: un-mysterious somaxconn + syn_backlog
..


r::c::perf: un-mysterious somaxconn + syn_backlog

Both values are raised based on current stats and thinking, and
now better-documented.  tlsproxy template also updated so that
nginx takes advantage of the raised somaxconn.

Change-Id: I174e5be9dbf2e42022ca322affca2525e70d8ec3
---
M modules/role/manifests/cache/perf.pp
M modules/tlsproxy/templates/localssl.erb
2 files changed, 18 insertions(+), 6 deletions(-)

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



diff --git a/modules/role/manifests/cache/perf.pp 
b/modules/role/manifests/cache/perf.pp
index feaf1fa..fdceffb 100644
--- a/modules/role/manifests/cache/perf.pp
+++ b/modules/role/manifests/cache/perf.pp
@@ -96,13 +96,25 @@
 # will see drops in col 2 of /proc/net/softnet_stat
 'net.core.netdev_max_backlog'=> 6,
 
-# Increase the queue size of new TCP connections
-'net.core.somaxconn' => 4096,   # 'mysterious'
-'net.ipv4.tcp_max_syn_backlog'   => 262144, # 'mysterious'
-'net.ipv4.tcp_max_tw_buckets'=> 36, # 'mysterious'
+# Our rate of incoming SYN on heaviest cp hosts peaks around
+# 1-2K/sec.  For somaxconn, the SYN numbers should be multiplied
+# out for a few seconds of headroom (bursts, and userspace delays)
+# and then perhaps doubled again to handle the influx of depooling
+# large datacenters.  Note somaxconn is just a parameter limit, the
+# application still needs to set this explicitly (within the
+# limit).
+'net.core.somaxconn' => 16384,
+
+# Our active connection concurrency peaks in the ~100K-200K range
+# per cp host (e.g. text esams as shown in ipvsadm).  For
+# max_syn_backlog, we probably want a small multiple of peak
+# concurrency (maybe even just ~1x), as well as (again) dc failover
+# and/or cp host depool headroom.
+'net.ipv4.tcp_max_syn_backlog'   => 524288,
 
 # Decrease FD/socket usage
 'net.ipv4.tcp_tw_reuse'  => 1,
+'net.ipv4.tcp_max_tw_buckets'=> 36, # 'mysterious'
 'net.ipv4.tcp_fin_timeout'   => 3,  # 'mysterious'
 'net.ipv4.tcp_max_orphans'   => 262144, # 'mysterious'
 'net.ipv4.tcp_synack_retries'=> 2,  # 'mysterious'
diff --git a/modules/tlsproxy/templates/localssl.erb 
b/modules/tlsproxy/templates/localssl.erb
index 36bd037..d4b0635 100644
--- a/modules/tlsproxy/templates/localssl.erb
+++ b/modules/tlsproxy/templates/localssl.erb
@@ -9,8 +9,8 @@
 
 # SSL proxying
 server {
-   listen [::]:443 <%= @default_server ? "default_server deferred 
backlog=4096 reuseport ipv6only=on " : "" %>ssl http2;
-   listen 443 <%= @default_server ? "default_server deferred backlog=4096 
reuseport " : "" %>ssl http2;
+   listen [::]:443 <%= @default_server ? "default_server deferred 
backlog=16384 reuseport ipv6only=on " : "" %>ssl http2;
+   listen 443 <%= @default_server ? "default_server deferred backlog=16384 
reuseport " : "" %>ssl http2;
ssl on;
server_name <%= ([@server_name] + @server_aliases).join(" ") %>;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I174e5be9dbf2e42022ca322affca2525e70d8ec3
Gerrit-PatchSet: 2
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] r::c::perf: un-mysterious netdev_max_backlog - change (operations/puppet)

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

Change subject: r::c::perf: un-mysterious netdev_max_backlog
..


r::c::perf: un-mysterious netdev_max_backlog

This raises from 30K to 60K and documents.

Change-Id: Iddea34f9d587b68bcccbdc45a9f8bd05f823f806
---
M modules/role/manifests/cache/perf.pp
1 file changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/modules/role/manifests/cache/perf.pp 
b/modules/role/manifests/cache/perf.pp
index e94fc08..feaf1fa 100644
--- a/modules/role/manifests/cache/perf.pp
+++ b/modules/role/manifests/cache/perf.pp
@@ -88,8 +88,13 @@
 # Increase the number of ephemeral ports
 'net.ipv4.ip_local_port_range'   => [ 1024, 65535 ],
 
-# Recommended to increase this for 1000 BT or higher
-'net.core.netdev_max_backlog'=> 3,  # 'mysterious'
+# All prod caches are 10GbE, standard recommendation is 300K for 
10G
+# and 30K for 1G.  Our inbound traffic max is closer to 1G levels,
+# since we have 10G LVS splitting traffic to ~8 or more hosts for
+# high-traffic clusters.  Still, we should double the 1GbE numbers
+# at least, just in case of bursts and inequality, etc.  If low,
+# will see drops in col 2 of /proc/net/softnet_stat
+'net.core.netdev_max_backlog'=> 6,
 
 # Increase the queue size of new TCP connections
 'net.core.somaxconn' => 4096,   # 'mysterious'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iddea34f9d587b68bcccbdc45a9f8bd05f823f806
Gerrit-PatchSet: 2
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] r::c::perf: consolidate net tuning and mysterious values - change (operations/puppet)

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

Change subject: r::c::perf: consolidate net tuning and mysterious values
..


r::c::perf: consolidate net tuning and mysterious values

No-op for functional change in sysctl tuning here.

This consolidates the multiple network-sysctl blocks in r::c::perf
together with the 'mysterious' historical sysctls, and removes the
varnish/tlsproxy classes' use of the mysterious sysctl class
directly.

We'll probably never resolve/re-tune those without first breaking
apart the distinct cases that use them, so this effectively breaks
them off for the caches.  They remain marked 'mysterious' for
followup documentation, re-tuning, or removal.

This leaves only mediawiki_singlenode class and memcached role
still using the historical mysterious sysctls directly.

Change-Id: Iac8d0b951c2247a5e0ab1620fbc2c672fa6e
---
M modules/role/manifests/cache/perf.pp
M modules/tlsproxy/manifests/instance.pp
M modules/varnish/manifests/common.pp
3 files changed, 42 insertions(+), 26 deletions(-)

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



diff --git a/modules/role/manifests/cache/perf.pp 
b/modules/role/manifests/cache/perf.pp
index 219dfba..e94fc08 100644
--- a/modules/role/manifests/cache/perf.pp
+++ b/modules/role/manifests/cache/perf.pp
@@ -37,15 +37,13 @@
 },
 }
 
-# Disable TCP SSR (slow-start restart). SSR resets the congestion
-# window of connections that have gone idle, which means it has a
-# tendency to reset the congestion window of HTTP keepalive and SPDY
-# connections, which are characterized by short bursts of activity
-# separated by long idle times.
-sysctl::parameters { 'disable_ssr':
-values => { 'net.ipv4.tcp_slow_start_after_idle' => 0 },
-}
-
+# Extended notes/docs on network tunables below
+# ---
+# tcp_slow_start_after_idle: SSR resets the congestion window of
+# connections that have gone idle, which means it has a tendency to reset
+# the congestion window of HTTP keepalive and HTTP/2 connections, which are
+# characterized by short bursts of activity separated by long idle times.
+# ---
 # tcp_tw_(reuse|recycle): both are off by default
 # cf. http://vincent.bernat.im/en/blog/2014-tcp-time-wait-state-linux.html
 #_recycle is dangerous: it violates RFCs, and probably breaks clients
@@ -58,17 +56,14 @@
 # connections from nginx to varnish-fe:80 - some of our caches reach
 # connection volume/rate spikes where this is a real issue.  Without this
 # setting, turning on keepalives for nginx->varnish tends to cause 502 Bad
-# Gateway spikes (whereas without keepalives, clients were being delayed
-# or queued slightly waiting indirectly on the TIME_WAIT slots).
+# Gateway spikes (whereas without keepalives, clients were being delayed or
+# queued slightly waiting indirectly on the TIME_WAIT slots).
 #There may be better solutions for this problem in the big picture -
 # like balancing nginx->varnish local traffic across several local
 # listening ports for varnish-fe, or using unix domain sockets for these
-# connections and avoiding IP entirely (if varnishd supported them).  Or
-# of course implementing decent HTTPS support directly in varnish :P
-sysctl::parameters { 'tw_reuse':
-values => { 'net.ipv4.tcp_tw_reuse' => 1 },
-}
-
+# connections and avoiding IP entirely (if varnishd supported them).  Or of
+# course implementing decent HTTPS support directly in varnish :P
+# ---
 # 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
@@ -82,7 +77,35 @@
 # 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 },
+# ---
+
+# Network tuning for high-load HTTP caches
+# Ones marked 'mysterious' are of mysterious years-old origin, and need
+# re-investigation to document their utility and/or re-tune them for new
+# kernels and traffic levels.
+sysctl::parameters { 'cache proxy network tuning':
+values => {
+# Increase the number of ephemeral ports
+'net.ipv4.ip_local_port_range'   => [ 1024, 65535 ],
+
+# Recommended to increase this for 1000 BT or higher
+'net.core.netdev_max_backlog'=> 3,  # 'mysterious'
+
+# Increase the queue size of new TCP connections
+'net.core.somaxconn' => 4096,   # 'mysterious'
+'net.ipv4.tcp_max_syn_backlog'   => 262144, # 'mysterious'
+'net.ipv4.tcp_max_tw_buckets'=> 36, # 

[MediaWiki-commits] [Gerrit] Remove the Gather extension: its repository was emptied - change (translatewiki)

2016-06-22 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Remove the Gather extension: its repository was emptied
..

Remove the Gather extension: its repository was emptied

rakkaus:#mediawiki-i18n- AggregateMessageGroup mediawiki cannot be
primary owner of key Gather-lists-hide-collection-label

Bug: T136176
Change-Id: I20625ff230442a1b2a716899af3c4393660f7d9d
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/73/295573/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index abefeaf..d766c53 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1103,10 +1103,6 @@
 Fundraising Translate Workflow
 descmsg = fundraising-translate-workflow-desc
 
-Gather
-aliasfile = Gather/Gather.alias.php
-ignored = gather-lists-hide-protocol
-
 Gadgets
 aliasfile = Gadgets/Gadgets.alias.php
 ignored = gadgets-definition

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20625ff230442a1b2a716899af3c4393660f7d9d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nemo bis 

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


[MediaWiki-commits] [Gerrit] Adds the state label to Event Logging payload for US visitors - change (wikimedia/portals)

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

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

Change subject: Adds the state label to Event Logging payload for US visitors
..

Adds the state label to Event Logging payload for US visitors

This patch changes the geo data to include the state when the visitor
is from U.S. so that we can break down U.S. traffic into 5 regions on
the Portal dashboard.

Bug: T136257
Change-Id: Id067003604e91332d50d53b42a883a8d83b8878b
---
M dev/wikipedia.org/assets/css/sprites.css
M dev/wikipedia.org/assets/css/style.css
M dev/wikipedia.org/assets/js/wikipedia-org-event-logging.js
M dev/wikipedia.org/assets/rev-manifest.json
D prod/wikipedia.org/assets/js/index-1946de37c9.js
A prod/wikipedia.org/assets/js/index-248d8364a1.js
M prod/wikipedia.org/index.html
7 files changed, 40 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals 
refs/changes/72/295572/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id067003604e91332d50d53b42a883a8d83b8878b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/portals
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] Post-merge VCL syntax fix for e031db9e - change (operations/puppet)

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

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

Change subject: Post-merge VCL syntax fix for e031db9e
..

Post-merge VCL syntax fix for e031db9e

Change-Id: Ifced7ca12ea872670dd30114afcf34303b440cb8
---
M templates/varnish/text-backend.inc.vcl.erb
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/templates/varnish/text-backend.inc.vcl.erb 
b/templates/varnish/text-backend.inc.vcl.erb
index e14ef14..87f435d 100644
--- a/templates/varnish/text-backend.inc.vcl.erb
+++ b/templates/varnish/text-backend.inc.vcl.erb
@@ -79,9 +79,9 @@
if (req.http.host == "<%= @vcl_config.fetch('shortener_domain') 
%>") {
set bereq.http.host = "meta.wikimedia.<%= 
@vcl_config.fetch('top_domain') %>";
if (req.url == "/") {
-   set bereq.url = "/wiki/Special:UrlShortener"
+   set bereq.url = "/wiki/Special:UrlShortener";
} else {
-   set bereq.url = "/wiki/Special:UrlRedirector" + 
req.url
+   set bereq.url = "/wiki/Special:UrlRedirector" + 
req.url;
}
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifced7ca12ea872670dd30114afcf34303b440cb8
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] Post-merge VCL syntax fix for e031db9e - change (operations/puppet)

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

Change subject: Post-merge VCL syntax fix for e031db9e
..


Post-merge VCL syntax fix for e031db9e

Change-Id: Ifced7ca12ea872670dd30114afcf34303b440cb8
---
M templates/varnish/text-backend.inc.vcl.erb
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/templates/varnish/text-backend.inc.vcl.erb 
b/templates/varnish/text-backend.inc.vcl.erb
index e14ef14..87f435d 100644
--- a/templates/varnish/text-backend.inc.vcl.erb
+++ b/templates/varnish/text-backend.inc.vcl.erb
@@ -79,9 +79,9 @@
if (req.http.host == "<%= @vcl_config.fetch('shortener_domain') 
%>") {
set bereq.http.host = "meta.wikimedia.<%= 
@vcl_config.fetch('top_domain') %>";
if (req.url == "/") {
-   set bereq.url = "/wiki/Special:UrlShortener"
+   set bereq.url = "/wiki/Special:UrlShortener";
} else {
-   set bereq.url = "/wiki/Special:UrlRedirector" + 
req.url
+   set bereq.url = "/wiki/Special:UrlRedirector" + 
req.url;
}
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifced7ca12ea872670dd30114afcf34303b440cb8
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] role::cache::text: handle url shortener requests - change (operations/puppet)

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

Change subject: role::cache::text: handle url shortener requests
..


role::cache::text: handle url shortener requests

Given how painful it is to mangle the http Host header in apache and the
relative ease of doing this at the varnish layer, we perform request
masking at the varnish backend when making a request to the appservers.

Bug: T133485
Change-Id: I286e6c2a50bf4735c3fc1ac629aff3f3c35f314a
---
M hieradata/labs.yaml
M modules/role/manifests/cache/base.pp
M modules/role/manifests/cache/text.pp
M templates/varnish/text-backend.inc.vcl.erb
4 files changed, 20 insertions(+), 7 deletions(-)

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



diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index 47abafe..9499dd9 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -110,6 +110,7 @@
 role::cache::base::static_host: 'deployment.wikimedia.beta.wmflabs.org'
 role::cache::base::upload_domain: 'upload.beta.wmflabs.org'
 role::cache::base::bits_domain: 'bits.beta.wmflabs.org'
+role::cache::base::shortener_domain: 'w-beta.wmflabs.org'
 role::cache::base::top_domain: 'beta.wmflabs.org'
 role::cache::2layer::storage_parts:
   - vdb
diff --git a/modules/role/manifests/cache/base.pp 
b/modules/role/manifests/cache/base.pp
index 3a55a18..af583d9 100644
--- a/modules/role/manifests/cache/base.pp
+++ b/modules/role/manifests/cache/base.pp
@@ -6,7 +6,8 @@
 $static_host = 'en.wikipedia.org',
 $upload_domain = 'upload.wikimedia.org',
 $bits_domain = 'bits.wikimedia.org',
-$top_domain = 'org'
+$top_domain = 'org',
+$shortener_domain = 'w.wiki',
 ) {
 include standard
 include nrpe
diff --git a/modules/role/manifests/cache/text.pp 
b/modules/role/manifests/cache/text.pp
index 4fcd3c8..29726d6 100644
--- a/modules/role/manifests/cache/text.pp
+++ b/modules/role/manifests/cache/text.pp
@@ -91,12 +91,13 @@
 }
 
 $common_vcl_config = {
-'cache4xx'   => '1m',
-'purge_host_regex'   => $::role::cache::base::purge_host_not_upload_re,
-'static_host'=> $::role::cache::base::static_host,
-'bits_domain'=> $::role::cache::base::bits_domain,
-'top_domain' => $::role::cache::base::top_domain,
-'pass_random'=> true,
+'cache4xx' => '1m',
+'purge_host_regex' => $::role::cache::base::purge_host_not_upload_re,
+'static_host'  => $::role::cache::base::static_host,
+'bits_domain'  => $::role::cache::base::bits_domain,
+'top_domain'   => $::role::cache::base::top_domain,
+'shortener_domain' => $::role::cache::base::shortener_domain,
+'pass_random'  => true,
 }
 
 $be_vcl_config = $common_vcl_config
diff --git a/templates/varnish/text-backend.inc.vcl.erb 
b/templates/varnish/text-backend.inc.vcl.erb
index cd9eebc..e14ef14 100644
--- a/templates/varnish/text-backend.inc.vcl.erb
+++ b/templates/varnish/text-backend.inc.vcl.erb
@@ -74,6 +74,16 @@
if (req.url ~ "^/api/rest_v1/") {
set bereq.url = "/" + req.http.host + regsub(req.url, 
"^/api/rest_v1/", "/v1/");
}
+
+   // Redirect url shortener w.wiki urls to meta (T133485)
+   if (req.http.host == "<%= @vcl_config.fetch('shortener_domain') 
%>") {
+   set bereq.http.host = "meta.wikimedia.<%= 
@vcl_config.fetch('top_domain') %>";
+   if (req.url == "/") {
+   set bereq.url = "/wiki/Special:UrlShortener"
+   } else {
+   set bereq.url = "/wiki/Special:UrlRedirector" + 
req.url
+   }
+   }
}
 }
 <% else -%>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I286e6c2a50bf4735c3fc1ac629aff3f3c35f314a
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


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

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

Change subject: group1 wikis to 1.28.0-wmf.7
..


group1 wikis to 1.28.0-wmf.7

Change-Id: I621076fa08db0272ab16d7c80edec960cae0f793
---
M php
M wikiversions.json
2 files changed, 595 insertions(+), 595 deletions(-)

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



diff --git a/php b/php
index 71f170e..e935739 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.28.0-wmf.6
\ No newline at end of file
+php-1.28.0-wmf.7
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index 2779a50..0bc867f 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,898 +1,898 @@
 {
 "aawiki": "php-1.28.0-wmf.6",
-"aawikibooks": "php-1.28.0-wmf.6",
-"aawiktionary": "php-1.28.0-wmf.6",
+"aawikibooks": "php-1.28.0-wmf.7",
+"aawiktionary": "php-1.28.0-wmf.7",
 "abwiki": "php-1.28.0-wmf.6",
-"abwiktionary": "php-1.28.0-wmf.6",
+"abwiktionary": "php-1.28.0-wmf.7",
 "acewiki": "php-1.28.0-wmf.6",
-"advisorywiki": "php-1.28.0-wmf.6",
+"advisorywiki": "php-1.28.0-wmf.7",
 "adywiki": "php-1.28.0-wmf.6",
 "afwiki": "php-1.28.0-wmf.6",
-"afwikibooks": "php-1.28.0-wmf.6",
-"afwikiquote": "php-1.28.0-wmf.6",
-"afwiktionary": "php-1.28.0-wmf.6",
+"afwikibooks": "php-1.28.0-wmf.7",
+"afwikiquote": "php-1.28.0-wmf.7",
+"afwiktionary": "php-1.28.0-wmf.7",
 "akwiki": "php-1.28.0-wmf.6",
-"akwikibooks": "php-1.28.0-wmf.6",
-"akwiktionary": "php-1.28.0-wmf.6",
+"akwikibooks": "php-1.28.0-wmf.7",
+"akwiktionary": "php-1.28.0-wmf.7",
 "alswiki": "php-1.28.0-wmf.6",
-"alswikibooks": "php-1.28.0-wmf.6",
-"alswikiquote": "php-1.28.0-wmf.6",
-"alswiktionary": "php-1.28.0-wmf.6",
+"alswikibooks": "php-1.28.0-wmf.7",
+"alswikiquote": "php-1.28.0-wmf.7",
+"alswiktionary": "php-1.28.0-wmf.7",
 "amwiki": "php-1.28.0-wmf.6",
-"amwikiquote": "php-1.28.0-wmf.6",
-"amwiktionary": "php-1.28.0-wmf.6",
+"amwikiquote": "php-1.28.0-wmf.7",
+"amwiktionary": "php-1.28.0-wmf.7",
 "angwiki": "php-1.28.0-wmf.6",
-"angwikibooks": "php-1.28.0-wmf.6",
-"angwikiquote": "php-1.28.0-wmf.6",
-"angwikisource": "php-1.28.0-wmf.6",
-"angwiktionary": "php-1.28.0-wmf.6",
+"angwikibooks": "php-1.28.0-wmf.7",
+"angwikiquote": "php-1.28.0-wmf.7",
+"angwikisource": "php-1.28.0-wmf.7",
+"angwiktionary": "php-1.28.0-wmf.7",
 "anwiki": "php-1.28.0-wmf.6",
-"anwiktionary": "php-1.28.0-wmf.6",
+"anwiktionary": "php-1.28.0-wmf.7",
 "arbcom_dewiki": "php-1.28.0-wmf.6",
 "arbcom_enwiki": "php-1.28.0-wmf.6",
 "arbcom_fiwiki": "php-1.28.0-wmf.6",
 "arbcom_nlwiki": "php-1.28.0-wmf.6",
 "arcwiki": "php-1.28.0-wmf.6",
 "arwiki": "php-1.28.0-wmf.6",
-"arwikibooks": "php-1.28.0-wmf.6",
-"arwikimedia": "php-1.28.0-wmf.6",
-"arwikinews": "php-1.28.0-wmf.6",
-"arwikiquote": "php-1.28.0-wmf.6",
-"arwikisource": "php-1.28.0-wmf.6",
-"arwikiversity": "php-1.28.0-wmf.6",
-"arwiktionary": "php-1.28.0-wmf.6",
+"arwikibooks": "php-1.28.0-wmf.7",
+"arwikimedia": "php-1.28.0-wmf.7",
+"arwikinews": "php-1.28.0-wmf.7",
+"arwikiquote": "php-1.28.0-wmf.7",
+"arwikisource": "php-1.28.0-wmf.7",
+"arwikiversity": "php-1.28.0-wmf.7",
+"arwiktionary": "php-1.28.0-wmf.7",
 "arzwiki": "php-1.28.0-wmf.6",
 "astwiki": "php-1.28.0-wmf.6",
-"astwikibooks": "php-1.28.0-wmf.6",
-"astwikiquote": "php-1.28.0-wmf.6",
-"astwiktionary": "php-1.28.0-wmf.6",
+"astwikibooks": "php-1.28.0-wmf.7",
+"astwikiquote": "php-1.28.0-wmf.7",
+"astwiktionary": "php-1.28.0-wmf.7",
 "aswiki": "php-1.28.0-wmf.6",
-"aswikibooks": "php-1.28.0-wmf.6",
-"aswikisource": "php-1.28.0-wmf.6",
-"aswiktionary": "php-1.28.0-wmf.6",
-"auditcomwiki": "php-1.28.0-wmf.6",
+"aswikibooks": "php-1.28.0-wmf.7",
+"aswikisource": "php-1.28.0-wmf.7",
+"aswiktionary": "php-1.28.0-wmf.7",
+"auditcomwiki": "php-1.28.0-wmf.7",
 "avwiki": "php-1.28.0-wmf.6",
-"avwiktionary": "php-1.28.0-wmf.6",
+"avwiktionary": "php-1.28.0-wmf.7",
 "aywiki": "php-1.28.0-wmf.6",
-"aywikibooks": "php-1.28.0-wmf.6",
-"aywiktionary": "php-1.28.0-wmf.6",
+"aywikibooks": "php-1.28.0-wmf.7",
+"aywiktionary": "php-1.28.0-wmf.7",
 "azbwiki": "php-1.28.0-wmf.6",
 "azwiki": "php-1.28.0-wmf.6",
-"azwikibooks": "php-1.28.0-wmf.6",
-"azwikiquote": "php-1.28.0-wmf.6",
-"azwikisource": "php-1.28.0-wmf.6",
-"azwiktionary": "php-1.28.0-wmf.6",
+"azwikibooks": "php-1.28.0-wmf.7",
+"azwikiquote": "php-1.28.0-wmf.7",
+"azwikisource": "php-1.28.0-wmf.7",
+"azwiktionary": "php-1.28.0-wmf.7",
 "barwiki": "php-1.28.0-wmf.6",
 "bat_smgwiki": "php-1.28.0-wmf.6",
 "bawiki": "php-1.28.0-wmf.6",
-"bawikibooks": 

[MediaWiki-commits] [Gerrit] Split flow-* and flowusertalk-* notifications - change (mediawiki...Flow)

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

Change subject: Split flow-* and flowusertalk-* notifications
..


Split flow-* and flowusertalk-* notifications

It applies to:
 - flow-new-topic
 - flow-description-edited
 - flow-post-reply
 - flow-post-edited
 - flow-topic-renamed
 - flow-summary-edited
 - flow-topic-resolved

Bug: T138220
Change-Id: I181af1648ad16fcf1ce598e65c265f3d7bb4448f
---
M includes/Data/Listener/NotificationListener.php
M includes/Notifications/Controller.php
M includes/Notifications/HeaderEditedPresentationModel.php
M includes/Notifications/NewTopicPresentationModel.php
M includes/Notifications/Notifications.php
M includes/Notifications/PostEditedPresentationModel.php
M includes/Notifications/PostReplyPresentationModel.php
M includes/Notifications/SummaryEditedPresentationModel.php
M includes/Notifications/TopicRenamedPresentationModel.php
9 files changed, 285 insertions(+), 189 deletions(-)

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



diff --git a/includes/Data/Listener/NotificationListener.php 
b/includes/Data/Listener/NotificationListener.php
index 769dd40..fcc3c3e 100644
--- a/includes/Data/Listener/NotificationListener.php
+++ b/includes/Data/Listener/NotificationListener.php
@@ -89,7 +89,7 @@
break;
 
case 'edit-header':
-   $this->notificationController->notifyHeaderChange( 
'flow-description-edited', array(
+   $this->notificationController->notifyHeaderChange( 
array(
'revision' => $object,
'board-workflow' => $metadata['workflow'],
) );
@@ -97,7 +97,7 @@
 
case 'create-topic-summary':
case 'edit-topic-summary':
-   $this->notificationController->notifySummaryChange( 
'flow-summary-edited', array(
+   $this->notificationController->notifySummaryChange( 
array(
'revision' => $object,
'topic-workflow' => $metadata['workflow'],
'topic-title' => $metadata['topic-title'],
diff --git a/includes/Notifications/Controller.php 
b/includes/Notifications/Controller.php
index 6eb166a..ac69f3e 100644
--- a/includes/Notifications/Controller.php
+++ b/includes/Notifications/Controller.php
@@ -45,26 +45,25 @@
$icons['flow-new-topic'] = array(
'path' => 
'Flow/modules/notification/icon/flow-new-topic.svg',
);
-   $icons['flow-post-edited'] = array(
-   'path' => 
'Flow/modules/notification/icon/flow-post-edited.svg',
-   );
-   $icons['flow-topic-renamed'] = array(
-   'path' => 
'Flow/modules/notification/icon/flow-topic-renamed.svg',
-   );
$icons['flowusertalk-new-topic'] = array(
'path' => 
'Flow/modules/notification/icon/flowusertalk-new-topic.svg',
);
-   $icons['flow-topic-resolved'] = array(
+   $icons['flow-post-edited'] = $icons['flowusertalk-post-edited'] 
= array(
+   'path' => 
'Flow/modules/notification/icon/flow-post-edited.svg',
+   );
+   $icons['flow-topic-renamed'] = 
$icons['flowusertalk-topic-renamed'] = array(
+   'path' => 
'Flow/modules/notification/icon/flow-topic-renamed.svg',
+   );
+   $icons['flow-topic-resolved'] = 
$icons['flowusertalk-topic-resolved'] = array(
'path' => 
'Flow/modules/notification/icon/flow-topic-resolved.svg',
);
-   $icons['flow-topic-reopened'] = array(
+   $icons['flow-topic-reopened'] = 
$icons['flowusertalk-topic-reopened'] = array(
'path' => 
'Flow/modules/notification/icon/flow-topic-reopened.svg',
);
}
 
/**
 * Causes notifications to be fired for a Header-related event.
-* @param  String $eventName The event that occurred.
 * @param  array  $data Associative array of parameters.
 * * revision: The PostRevision created by the action. Always required.
 * * board-workflow: The Workflow object for the board. Always required.
@@ -73,7 +72,7 @@
 * @return array Array of created EchoEvent objects.
 * @throws FlowException When $data contains unexpected types/values
 */
-   public function notifyHeaderChange( $eventName, $data = array() ) {
+   public function notifyHeaderChange( $data = array() ) {
if ( !class_exists( 'EchoEvent' ) ) {
return array();
}
@@ -102,11 +101,11 @@
$extraData['target-page'] = 

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

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

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

Change subject: group1 wikis to 1.28.0-wmf.7
..

group1 wikis to 1.28.0-wmf.7

Change-Id: I621076fa08db0272ab16d7c80edec960cae0f793
---
M php
M wikiversions.json
2 files changed, 595 insertions(+), 595 deletions(-)


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

diff --git a/php b/php
index 71f170e..e935739 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.28.0-wmf.6
\ No newline at end of file
+php-1.28.0-wmf.7
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index 2779a50..0bc867f 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,898 +1,898 @@
 {
 "aawiki": "php-1.28.0-wmf.6",
-"aawikibooks": "php-1.28.0-wmf.6",
-"aawiktionary": "php-1.28.0-wmf.6",
+"aawikibooks": "php-1.28.0-wmf.7",
+"aawiktionary": "php-1.28.0-wmf.7",
 "abwiki": "php-1.28.0-wmf.6",
-"abwiktionary": "php-1.28.0-wmf.6",
+"abwiktionary": "php-1.28.0-wmf.7",
 "acewiki": "php-1.28.0-wmf.6",
-"advisorywiki": "php-1.28.0-wmf.6",
+"advisorywiki": "php-1.28.0-wmf.7",
 "adywiki": "php-1.28.0-wmf.6",
 "afwiki": "php-1.28.0-wmf.6",
-"afwikibooks": "php-1.28.0-wmf.6",
-"afwikiquote": "php-1.28.0-wmf.6",
-"afwiktionary": "php-1.28.0-wmf.6",
+"afwikibooks": "php-1.28.0-wmf.7",
+"afwikiquote": "php-1.28.0-wmf.7",
+"afwiktionary": "php-1.28.0-wmf.7",
 "akwiki": "php-1.28.0-wmf.6",
-"akwikibooks": "php-1.28.0-wmf.6",
-"akwiktionary": "php-1.28.0-wmf.6",
+"akwikibooks": "php-1.28.0-wmf.7",
+"akwiktionary": "php-1.28.0-wmf.7",
 "alswiki": "php-1.28.0-wmf.6",
-"alswikibooks": "php-1.28.0-wmf.6",
-"alswikiquote": "php-1.28.0-wmf.6",
-"alswiktionary": "php-1.28.0-wmf.6",
+"alswikibooks": "php-1.28.0-wmf.7",
+"alswikiquote": "php-1.28.0-wmf.7",
+"alswiktionary": "php-1.28.0-wmf.7",
 "amwiki": "php-1.28.0-wmf.6",
-"amwikiquote": "php-1.28.0-wmf.6",
-"amwiktionary": "php-1.28.0-wmf.6",
+"amwikiquote": "php-1.28.0-wmf.7",
+"amwiktionary": "php-1.28.0-wmf.7",
 "angwiki": "php-1.28.0-wmf.6",
-"angwikibooks": "php-1.28.0-wmf.6",
-"angwikiquote": "php-1.28.0-wmf.6",
-"angwikisource": "php-1.28.0-wmf.6",
-"angwiktionary": "php-1.28.0-wmf.6",
+"angwikibooks": "php-1.28.0-wmf.7",
+"angwikiquote": "php-1.28.0-wmf.7",
+"angwikisource": "php-1.28.0-wmf.7",
+"angwiktionary": "php-1.28.0-wmf.7",
 "anwiki": "php-1.28.0-wmf.6",
-"anwiktionary": "php-1.28.0-wmf.6",
+"anwiktionary": "php-1.28.0-wmf.7",
 "arbcom_dewiki": "php-1.28.0-wmf.6",
 "arbcom_enwiki": "php-1.28.0-wmf.6",
 "arbcom_fiwiki": "php-1.28.0-wmf.6",
 "arbcom_nlwiki": "php-1.28.0-wmf.6",
 "arcwiki": "php-1.28.0-wmf.6",
 "arwiki": "php-1.28.0-wmf.6",
-"arwikibooks": "php-1.28.0-wmf.6",
-"arwikimedia": "php-1.28.0-wmf.6",
-"arwikinews": "php-1.28.0-wmf.6",
-"arwikiquote": "php-1.28.0-wmf.6",
-"arwikisource": "php-1.28.0-wmf.6",
-"arwikiversity": "php-1.28.0-wmf.6",
-"arwiktionary": "php-1.28.0-wmf.6",
+"arwikibooks": "php-1.28.0-wmf.7",
+"arwikimedia": "php-1.28.0-wmf.7",
+"arwikinews": "php-1.28.0-wmf.7",
+"arwikiquote": "php-1.28.0-wmf.7",
+"arwikisource": "php-1.28.0-wmf.7",
+"arwikiversity": "php-1.28.0-wmf.7",
+"arwiktionary": "php-1.28.0-wmf.7",
 "arzwiki": "php-1.28.0-wmf.6",
 "astwiki": "php-1.28.0-wmf.6",
-"astwikibooks": "php-1.28.0-wmf.6",
-"astwikiquote": "php-1.28.0-wmf.6",
-"astwiktionary": "php-1.28.0-wmf.6",
+"astwikibooks": "php-1.28.0-wmf.7",
+"astwikiquote": "php-1.28.0-wmf.7",
+"astwiktionary": "php-1.28.0-wmf.7",
 "aswiki": "php-1.28.0-wmf.6",
-"aswikibooks": "php-1.28.0-wmf.6",
-"aswikisource": "php-1.28.0-wmf.6",
-"aswiktionary": "php-1.28.0-wmf.6",
-"auditcomwiki": "php-1.28.0-wmf.6",
+"aswikibooks": "php-1.28.0-wmf.7",
+"aswikisource": "php-1.28.0-wmf.7",
+"aswiktionary": "php-1.28.0-wmf.7",
+"auditcomwiki": "php-1.28.0-wmf.7",
 "avwiki": "php-1.28.0-wmf.6",
-"avwiktionary": "php-1.28.0-wmf.6",
+"avwiktionary": "php-1.28.0-wmf.7",
 "aywiki": "php-1.28.0-wmf.6",
-"aywikibooks": "php-1.28.0-wmf.6",
-"aywiktionary": "php-1.28.0-wmf.6",
+"aywikibooks": "php-1.28.0-wmf.7",
+"aywiktionary": "php-1.28.0-wmf.7",
 "azbwiki": "php-1.28.0-wmf.6",
 "azwiki": "php-1.28.0-wmf.6",
-"azwikibooks": "php-1.28.0-wmf.6",
-"azwikiquote": "php-1.28.0-wmf.6",
-"azwikisource": "php-1.28.0-wmf.6",
-"azwiktionary": "php-1.28.0-wmf.6",
+"azwikibooks": "php-1.28.0-wmf.7",
+"azwikiquote": "php-1.28.0-wmf.7",
+"azwikisource": "php-1.28.0-wmf.7",
+"azwiktionary": "php-1.28.0-wmf.7",
 "barwiki": "php-1.28.0-wmf.6",
 "bat_smgwiki": "php-1.28.0-wmf.6",
 "bawiki": 

[MediaWiki-commits] [Gerrit] Install jessie on db1001 by default - change (operations/puppet)

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

Change subject: Install jessie on db1001 by default
..


Install jessie on db1001 by default

Bug: T135973
Change-Id: Ie63f92f9b295f43a5fd30cd8d75e9047885d9643
---
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 7893134..346f5c3 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -994,8 +994,6 @@
 host db1001 {
 hardware ethernet 78:2b:cb:03:68:61;
 fixed-address db1001.eqiad.wmnet;
-option pxelinux.pathprefix "precise-installer/";
-filename "precise-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
 host db1009 {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie63f92f9b295f43a5fd30cd8d75e9047885d9643
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] use flow.dblist which now explicitly lists all flow wikis - change (operations/dumps)

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

Change subject: use flow.dblist which now explicitly lists all flow wikis
..


use flow.dblist which now explicitly lists all flow wikis

Change-Id: I3ba26b01311a928e24b93d50cf9fc25b9ae21c7a
---
M xmldumps-backup/dumps/WikiDump.py
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/xmldumps-backup/dumps/WikiDump.py 
b/xmldumps-backup/dumps/WikiDump.py
index 73d54ce..6bbedcc 100644
--- a/xmldumps-backup/dumps/WikiDump.py
+++ b/xmldumps-backup/dumps/WikiDump.py
@@ -181,7 +181,7 @@
 self.wikidata_list = MiscUtils.db_list(self.conf.get("wiki", 
"wikidatalist"))
 self.global_usage_list = MiscUtils.db_list(self.conf.get("wiki", 
"globalusagelist"))
 self.wikidata_client_list = MiscUtils.db_list(self.conf.get("wiki", 
"wikidataclientlist"))
-self.nonflow_list = MiscUtils.db_list(self.conf.get("wiki", 
"nonflowlist"))
+self.flow_list = MiscUtils.db_list(self.conf.get("wiki", "flowlist"))
 self.halt = self.conf.getint("wiki", "halt")
 
 self.db_list = list(set(self.db_list) - set(self.skip_db_list))
@@ -407,7 +407,7 @@
 return self.db_name in self.config.wikidata_client_list
 
 def has_flow(self):
-return self.db_name not in self.config.nonflow_list
+return self.db_name in self.config.flow_list
 
 # Paths and directories...
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ba26b01311a928e24b93d50cf9fc25b9ae21c7a
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] use explicit list of flow-enabled dbs for dumps config files - change (operations/puppet)

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

Change subject: use explicit list of flow-enabled dbs for dumps config files
..


use explicit list of flow-enabled dbs for dumps config files

Change-Id: I5d7505fd075edf6b977787ec4e0e48f857244b9a
---
M modules/snapshot/templates/dumps/wikidump.conf.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/snapshot/templates/dumps/wikidump.conf.erb 
b/modules/snapshot/templates/dumps/wikidump.conf.erb
index d174e27..7a0168f 100644
--- a/modules/snapshot/templates/dumps/wikidump.conf.erb
+++ b/modules/snapshot/templates/dumps/wikidump.conf.erb
@@ -14,6 +14,7 @@
 globalusagelist=<%= @dblistsdir -%>/globalusage.dblist
 wikidataclientlist=<%= @apachedir -%>/dblists/wikidataclient.dblist
 nonflowlist=<%= @apachedir -%>/dblists/nonflow.dblist
+flowlist=<%= @apachedir -%>/dblists/flow.dblist
 dir=<%= @apachedir %>
 adminsettings=private/PrivateSettings.php
 forcenormal=0

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

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

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


[MediaWiki-commits] [Gerrit] use explicit list of flow-enabled dbs for dumps config files - change (operations/puppet)

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

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

Change subject: use explicit list of flow-enabled dbs for dumps config files
..

use explicit list of flow-enabled dbs for dumps config files

Change-Id: I5d7505fd075edf6b977787ec4e0e48f857244b9a
---
M modules/snapshot/templates/dumps/wikidump.conf.erb
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/snapshot/templates/dumps/wikidump.conf.erb 
b/modules/snapshot/templates/dumps/wikidump.conf.erb
index d174e27..7a0168f 100644
--- a/modules/snapshot/templates/dumps/wikidump.conf.erb
+++ b/modules/snapshot/templates/dumps/wikidump.conf.erb
@@ -14,6 +14,7 @@
 globalusagelist=<%= @dblistsdir -%>/globalusage.dblist
 wikidataclientlist=<%= @apachedir -%>/dblists/wikidataclient.dblist
 nonflowlist=<%= @apachedir -%>/dblists/nonflow.dblist
+flowlist=<%= @apachedir -%>/dblists/flow.dblist
 dir=<%= @apachedir %>
 adminsettings=private/PrivateSettings.php
 forcenormal=0

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

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

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


[MediaWiki-commits] [Gerrit] Install jessie on db1001 by default - change (operations/puppet)

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

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

Change subject: Install jessie on db1001 by default
..

Install jessie on db1001 by default

Bug: T135973
Change-Id: Ie63f92f9b295f43a5fd30cd8d75e9047885d9643
---
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 7893134..346f5c3 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -994,8 +994,6 @@
 host db1001 {
 hardware ethernet 78:2b:cb:03:68:61;
 fixed-address db1001.eqiad.wmnet;
-option pxelinux.pathprefix "precise-installer/";
-filename "precise-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
 host db1009 {

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

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

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


[MediaWiki-commits] [Gerrit] Fix notifications query parse - change (pywikibot/core)

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

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

Change subject: Fix notifications query parse
..

Fix notifications query parse

In meta=notifications, query.notifications.list is now an actual list, so we 
shouldn't call values() on it.

Change-Id: I30c9fbd7cc6002106430d1c26a1e3d2d7e8caa65
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/67/295567/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index ce7f628..345d1e4 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2283,7 +2283,7 @@
 params['not' + key] = kwargs[key]
 
 data = self._simple_request(**params).submit()
-for notif in data['query']['notifications']['list'].values():
+for notif in data['query']['notifications']['list']:
 yield Notification.fromJSON(self, notif)
 
 @need_extension('Echo')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30c9fbd7cc6002106430d1c26a1e3d2d7e8caa65
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: APerson 

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


[MediaWiki-commits] [Gerrit] Promote db1016 as the m1 shard master, set db1001 as a m1 slave - change (operations/puppet)

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

Change subject: Promote db1016 as the m1 shard master, set db1001 as a m1 slave
..


Promote db1016 as the m1 shard master, set db1001 as a m1 slave

Bug: T106312
Change-Id: Icfa6e473e30b2f5d1087702979627de91338cc86
---
M manifests/site.pp
1 file changed, 8 insertions(+), 5 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 7cbf4ff..5727752 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -731,15 +731,18 @@
 }
 
 ## m1 shard
-node 'db1001.eqiad.wmnet' {
-class { 'role::coredb::m1':
-mariadb => true,
-}
-}
 
 node 'db1016.eqiad.wmnet' {
 class { 'role::mariadb::misc':
 shard  => 'm1',
+master => true,
+}
+include base::firewall
+}
+
+node 'db1001.eqiad.wmnet' {
+class { 'role::mariadb::misc':
+shard  => 'm1',
 }
 include base::firewall
 }

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

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

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


[MediaWiki-commits] [Gerrit] use flow.dblist which now explicitly lists all flow wikis - change (operations/dumps)

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

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

Change subject: use flow.dblist which now explicitly lists all flow wikis
..

use flow.dblist which now explicitly lists all flow wikis

Change-Id: I3ba26b01311a928e24b93d50cf9fc25b9ae21c7a
---
M xmldumps-backup/dumps/WikiDump.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/66/295566/1

diff --git a/xmldumps-backup/dumps/WikiDump.py 
b/xmldumps-backup/dumps/WikiDump.py
index 73d54ce..6bbedcc 100644
--- a/xmldumps-backup/dumps/WikiDump.py
+++ b/xmldumps-backup/dumps/WikiDump.py
@@ -181,7 +181,7 @@
 self.wikidata_list = MiscUtils.db_list(self.conf.get("wiki", 
"wikidatalist"))
 self.global_usage_list = MiscUtils.db_list(self.conf.get("wiki", 
"globalusagelist"))
 self.wikidata_client_list = MiscUtils.db_list(self.conf.get("wiki", 
"wikidataclientlist"))
-self.nonflow_list = MiscUtils.db_list(self.conf.get("wiki", 
"nonflowlist"))
+self.flow_list = MiscUtils.db_list(self.conf.get("wiki", "flowlist"))
 self.halt = self.conf.getint("wiki", "halt")
 
 self.db_list = list(set(self.db_list) - set(self.skip_db_list))
@@ -407,7 +407,7 @@
 return self.db_name in self.config.wikidata_client_list
 
 def has_flow(self):
-return self.db_name not in self.config.nonflow_list
+return self.db_name in self.config.flow_list
 
 # Paths and directories...
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ba26b01311a928e24b93d50cf9fc25b9ae21c7a
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] Add a PromisePrioritizer and use it for notifications fetching - change (mediawiki...Echo)

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

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

Change subject: Add a PromisePrioritizer and use it for notifications fetching
..

Add a PromisePrioritizer and use it for notifications fetching

This will allow us to let the user click filters quickly, effectively
changing the promises sent to the API, but let the API only resolve
with the latest requested promise.

Bug: T136895
Change-Id: I698a2b8eced6d8ee997efef353697d27d92cfb2f
---
M Resources.php
M modules/api/mw.echo.api.EchoApi.js
A modules/api/mw.echo.api.PromisePrioritizer.js
M modules/ui/mw.echo.ui.NotificationsInboxWidget.js
4 files changed, 94 insertions(+), 10 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index 84bf1b0..0f0e7cb 100644
--- a/Resources.php
+++ b/Resources.php
@@ -196,6 +196,7 @@
'ext.echo.api' => $echoResourceTemplate + array(
'scripts' => array(
'api/mw.echo.api.js',
+   'api/mw.echo.api.PromisePrioritizer.js',
'api/mw.echo.api.EchoApi.js',
'api/mw.echo.api.APIHandler.js',
'api/mw.echo.api.LocalAPIHandler.js',
diff --git a/modules/api/mw.echo.api.EchoApi.js 
b/modules/api/mw.echo.api.EchoApi.js
index a37a0b7..4bc290e 100644
--- a/modules/api/mw.echo.api.EchoApi.js
+++ b/modules/api/mw.echo.api.EchoApi.js
@@ -15,6 +15,7 @@
 
this.fetchingPromise = null;
this.limit = config.limit || 25;
+   this.fetchingPrioritizer = new mw.echo.api.PromisePrioritizer();
};
 
OO.initClass( mw.echo.api.EchoApi );
@@ -142,15 +143,17 @@
return $.Deferred().reject().promise();
}
 
-   return handler.fetchNotifications(
+   return this.fetchingPrioritizer.prioritize( 
handler.fetchNotifications(
type,
// For the remote source, we are fetching 'local' 
notifications
'local',
!!isForced,
this.convertFiltersToAPIParams( filters )
-   )
-   .then( function ( result ) {
-   return OO.getProp( result.query, 
'notifications' );
+   ) )
+   .then( function ( promise ) {
+   return promise.then( function ( result ) {
+   return OO.getProp( result.query, 
'notifications' );
+   } );
} );
};
 
@@ -172,14 +175,16 @@
[ sources ] :
'local';
 
-   return this.network.getApiHandler( 'local' ).fetchNotifications(
+   return this.fetchingPrioritizer.prioritize( 
this.network.getApiHandler( 'local' ).fetchNotifications(
type,
sources,
isForced,
this.convertFiltersToAPIParams( filters )
-   )
-   .then( function ( result ) {
-   return OO.getProp( result.query, 
'notifications' );
+   ) )
+   .then( function ( promise ) {
+   return promise.then( function ( result ) {
+   return OO.getProp( result.query, 
'notifications' );
+   } );
} );
};
 
diff --git a/modules/api/mw.echo.api.PromisePrioritizer.js 
b/modules/api/mw.echo.api.PromisePrioritizer.js
new file mode 100644
index 000..dd23536
--- /dev/null
+++ b/modules/api/mw.echo.api.PromisePrioritizer.js
@@ -0,0 +1,78 @@
+( function ( mw, $ ) {
+   /**
+* Promise prioritizer for API actions. The prioritizer takes
+* multiple promises but ignores the previous ones until one is
+* either resolved or rejected.
+*
+* This allows us to send multiple promises in quick successions but
+* trust that we get back only the latest successful request.
+*
+* @class
+*
+* @constructor
+*/
+   mw.echo.api.PromisePrioritizer = function MwEchoDmPromisePrioritizer() {
+   this.deferred = $.Deferred();
+   this.promise = null;
+   };
+
+   /* Initialization */
+
+   OO.initClass( mw.echo.api.PromisePrioritizer );
+
+   /**
+* Prioritize a promise
+*
+* @param {[type]} promise Promise
+* @return {jQuery.Promise} The main deferred object that resolves
+*  or rejects when the latest promise is resolved or rejected.
+*/
+   

[MediaWiki-commits] [Gerrit] [NOT FOR MERGING] hack maintain-replicas.pl for adywiki/jamwiki - change (operations/software)

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

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

Change subject: [NOT FOR MERGING] hack maintain-replicas.pl for adywiki/jamwiki
..

[NOT FOR MERGING] hack maintain-replicas.pl for adywiki/jamwiki

- Get credentials from DB_USER and DB_PASS envvars instead of trying to parse
  (incorrectly) ~/.my.cnf.
- Don't process any wikis except adywiki and jamwiki
- Print SQL statements on STDERR, so they can be captured and replayed.
- Replace the labs dbs with localhost. Undo this hack to run on labs dbs.

Bug: T135029
Change-Id: Ib5c28e4d9ccfbf5b76223d667eb43a7b1121efc2
---
M maintain-replicas/maintain-replicas.pl
1 file changed, 10 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/64/295564/1

diff --git a/maintain-replicas/maintain-replicas.pl 
b/maintain-replicas/maintain-replicas.pl
index c38d77a..f97702a 100755
--- a/maintain-replicas/maintain-replicas.pl
+++ b/maintain-replicas/maintain-replicas.pl
@@ -54,9 +54,10 @@
 }
 
 my %slices = (
-'c1' => [ 'labsdb1001.eqiad.wmnet', 3306 ],
-'c2' => [ 'labsdb1002.eqiad.wmnet', 3306 ],
-'c3' => [ 'labsdb1003.eqiad.wmnet', 3306 ],
+'c1' => [ 'localhost', 3306 ],
+# 'c1' => [ 'labsdb1001.eqiad.wmnet', 3306 ],
+# 'c2' => [ 'labsdb1002.eqiad.wmnet', 3306 ],
+# 'c3' => [ 'labsdb1003.eqiad.wmnet', 3306 ],
 );
 
 my @fullviews = (
@@ -335,24 +336,8 @@
 'group'  => 'wl_namespace, wl_title having wl_count >= 30', },
 );
 
-my $dbuser;
-my $dbpassword;
-my $mycnf = $ENV{'HOME'} . "/.my.cnf";
-if(open MYCNF, "<$mycnf") {
-my $client = 0;
-while() {
-if(m/^\[client\]\s*$/) {
-$client = 1;
-next;
-}
-$client = 0 if m/^\[/;
-next unless $client;
-$dbuser = $1 if m/^\s*user\s*=\s*'(.*)'\s*$/;
-$dbpassword = $1 if m/^\s*password\s*=\s*'(.*)'\s*$/;
-}
-close MYCNF;
-}
-die "No credentials for connecting to databases.\n" unless defined $dbuser and 
defined $dbpassword;
+my $dbuser = $ENV{'DB_USER'};
+my $dbpassword = $ENV{'DB_PASS'};
 
 chdir "mediawiki-config";
 
@@ -360,12 +345,8 @@
 
 my %db;
 
-open ALL, ") {
-chomp;
-$db{$_} = {};
-}
-close ALL;
+$db{'adywiki'} = {};
+$db{'jamwiki'} = {};
 
 sub dbprop($$$) {
 my($list, $prop, $val) = @_;
@@ -401,7 +382,6 @@
 # exposed through the API so we have to hardcode it here to match
 # what is in InitialiseSettings.php
 dbprop "wiktionary", "sensitive", 1;
-$db{'jbowiki'}->{'sensitive'} = 1;
 
 open IS, "{'deleted'};
 next if defined $db->{'private'};
 my $canon = $canonical{$dbk};
@@ -473,6 +454,7 @@
 
 sub sql($) {
 my ($query) = @_;
+print STDERR "$query\n";
 return $dbh->do($query);
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5c28e4d9ccfbf5b76223d667eb43a7b1121efc2
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Promote db1016 as the m1 shard master, set db1001 as a m1 slave - change (operations/puppet)

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

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

Change subject: Promote db1016 as the m1 shard master, set db1001 as a m1 slave
..

Promote db1016 as the m1 shard master, set db1001 as a m1 slave

Bug: T106312
Change-Id: Icfa6e473e30b2f5d1087702979627de91338cc86
---
M manifests/site.pp
1 file changed, 8 insertions(+), 5 deletions(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 7cbf4ff..5727752 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -731,15 +731,18 @@
 }
 
 ## m1 shard
-node 'db1001.eqiad.wmnet' {
-class { 'role::coredb::m1':
-mariadb => true,
-}
-}
 
 node 'db1016.eqiad.wmnet' {
 class { 'role::mariadb::misc':
 shard  => 'm1',
+master => true,
+}
+include base::firewall
+}
+
+node 'db1001.eqiad.wmnet' {
+class { 'role::mariadb::misc':
+shard  => 'm1',
 }
 include base::firewall
 }

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

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

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


[MediaWiki-commits] [Gerrit] Add "random" payload to aggregated response - change (mediawiki...mobileapps)

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

Change subject: Add "random" payload to aggregated response
..


Add "random" payload to aggregated response

Bug: T135209
Change-Id: Id435a1ebcd1f9a7386f0ebe5b2c22f5eb033c163
---
M routes/aggregated.js
M spec.yaml
2 files changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/routes/aggregated.js b/routes/aggregated.js
index 1e59ae8..cbf524f 100644
--- a/routes/aggregated.js
+++ b/routes/aggregated.js
@@ -12,6 +12,7 @@
 var media = require('../lib/feed/media');
 var mostRead = require('../lib/feed/most-read');
 var featured = require('../lib/feed/featured');
+var random = require('../lib/feed/random');
 
 /**
  * The main router object
@@ -32,15 +33,15 @@
 return BBPromise.props({
 tfa: featured.promise(app, req),
 mostread: mostRead.promise(app, dateUtil.yesterday(req)),
-//random: random.promise(app, req),
+random: random.promise(app, req)
 //news: news.promise(app, req),
 //image: media.featuredImagePromise(app, req),
 //video: media.featuredVideoPromise(app, req)
 }) .then(function (response) {
 var aggregate = {
 tfa: response.tfa.payload,
+random: response.random.payload,
 mostread: response.mostread.payload,
-random: 'Good random article here',
 news: 'Articles in the news here',
 image: 'Today\'s featured image here',
 video: 'Today\'s featured video here'
@@ -58,4 +59,4 @@
 api_version: 1,
 router: router
 };
-};
\ No newline at end of file
+};
diff --git a/spec.yaml b/spec.yaml
index 2e36b90..6e719d1 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -108,7 +108,8 @@
   mostread:
 date: /.+/
 articles: [ /.+/ ]
-  random: /.+/
+  random:
+title: /.+/
   news: /.+/
   image: /.+/
   video: /.+/

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id435a1ebcd1f9a7386f0ebe5b2c22f5eb033c163
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
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] Set temporarilly m1 haproxy to failover to itself (db1016) - change (operations/puppet)

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

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

Change subject: Set temporarilly m1 haproxy to failover to itself (db1016)
..

Set temporarilly m1 haproxy to failover to itself (db1016)

The current setup forces haproxy to always have a primary and a
backup node. As db1001 is only temporarily down, and will return
as the backup node, set both primary and backup nodes pointing to
db1016.

In the future, proxy configuration should allow between 0 and n
arbitrary number of hosts.

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


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

diff --git a/manifests/site.pp b/manifests/site.pp
index e24f5dc..7cbf4ff 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -876,8 +876,8 @@
 node 'dbproxy1001.eqiad.wmnet' {
 class { 'role::mariadb::proxy::master':
 shard  => 'm1',
-primary_name   => 'db1001',
-primary_addr   => '10.64.0.5',
+primary_name   => 'db1016',
+primary_addr   => '10.64.0.20',
 secondary_name => 'db1016',
 secondary_addr => '10.64.0.20',
 }

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

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

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


[MediaWiki-commits] [Gerrit] Set temporarily m1 haproxy to failover to itself (db1016) - change (operations/puppet)

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

Change subject: Set temporarily m1 haproxy to failover to itself (db1016)
..


Set temporarily m1 haproxy to failover to itself (db1016)

The current setup forces haproxy to always have a primary and a
backup node. As db1001 is only temporarily down, and will return
as the backup node, set both primary and backup nodes pointing to
db1016.

In the future, proxy configuration should allow between 0 and n
arbitrary number of hosts.

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

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



diff --git a/manifests/site.pp b/manifests/site.pp
index e24f5dc..7cbf4ff 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -876,8 +876,8 @@
 node 'dbproxy1001.eqiad.wmnet' {
 class { 'role::mariadb::proxy::master':
 shard  => 'm1',
-primary_name   => 'db1001',
-primary_addr   => '10.64.0.5',
+primary_name   => 'db1016',
+primary_addr   => '10.64.0.20',
 secondary_name => 'db1016',
 secondary_addr => '10.64.0.20',
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48703e8bc6a4a7a389e3c81897fa194ef9ac66b1
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use the actual total notification count in the special page ... - change (mediawiki...Echo)

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

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

Change subject: Use the actual total notification count in the special page 
sidebar
..

Use the actual total notification count in the special page sidebar

Adding up numbers in the front-end is not enough, because it could
be that not all pages are listed (it's a top 10). So get the
total count from the backend.

Change-Id: Ibbc76691ef88333b92132a514fdba3cde3797e10
---
M includes/api/ApiEchoUnreadNotificationPages.php
M modules/model/mw.echo.dm.SourcePagesModel.js
2 files changed, 6 insertions(+), 9 deletions(-)


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

diff --git a/includes/api/ApiEchoUnreadNotificationPages.php 
b/includes/api/ApiEchoUnreadNotificationPages.php
index 35136c0..a0fa918 100644
--- a/includes/api/ApiEchoUnreadNotificationPages.php
+++ b/includes/api/ApiEchoUnreadNotificationPages.php
@@ -88,7 +88,10 @@
);
}
 
-   return array( 'pages' => $result );
+   return array(
+   'pages' => $result,
+   'totalCount' => MWEchoNotifUser::newFromUser( 
$this->getUser() )->getLocalNotificationCount(),
+   );
}
 
/**
diff --git a/modules/model/mw.echo.dm.SourcePagesModel.js 
b/modules/model/mw.echo.dm.SourcePagesModel.js
index c5f679f..d71927e 100644
--- a/modules/model/mw.echo.dm.SourcePagesModel.js
+++ b/modules/model/mw.echo.dm.SourcePagesModel.js
@@ -189,18 +189,17 @@
 * @param {Object} details Details object
 */
mw.echo.dm.SourcePagesModel.prototype.setSourcePagesDetails = function 
( source, details ) {
-   var id, pageDetails, count;
+   var id, pageDetails;
 
// Source information
this.sources[ source ] = {
title: details.source.title,
base: details.source.base,
-   totalCount: 0,
+   totalCount: details.totalCount,
pages: {}
};
 
// Fill in pages
-   count = 0;
for ( id in details.pages ) {
pageDetails = details.pages[ id ];
this.sources[ source ].pages[ id ] = {
@@ -208,11 +207,6 @@
count: pageDetails.count,
id: id
};
-
-   count += parseInt( pageDetails.count );
}
-
-   // Update total count
-   this.sources[ source ].totalCount = count;
};
 } )( mediaWiki );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibbc76691ef88333b92132a514fdba3cde3797e10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] WIP: Disable special casing of main page where it is not req... - change (operations/mediawiki-config)

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

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

Change subject: WIP: Disable special casing of main page where it is not 
required
..

WIP: Disable special casing of main page where it is not required

This feature continues to confuse people and its demise should be
accelerated rather than encouraged.

Plan is to disable config variable where the feature is not being used
to make it more obvious where changes need to be made.

* Disable on wikidata which uses Wikidata:Main Page
* Disable on Wikitionary's not using the main page special casing
(TBC)

Bug: T138129
Change-Id: I68090845d48b8598592b7c9a19943e9d60529239
---
M wmf-config/InitialiseSettings.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a28b6ba..eee1266 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14241,6 +14241,13 @@
'wikivoyage' => [ 'h2', 'h3', 'h4', 'h5', 'h6' ], // T110436, T110837
 ],
 
+'wgMFSpecialCaseMainPage' => [
+   'default' => true,
+   'wikidata' => false,
+   'wikiquote' => false, // T138129
+   'wiktionary' => false, // T138129
+],
+
 'wgMFRemovableClasses' => [
'default' => [
'base' => [ '.navbox', '.nomobile' ],

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

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

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


[MediaWiki-commits] [Gerrit] Support for PlaceholderWidget with no link - change (mediawiki...Echo)

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

Change subject: Support for PlaceholderWidget with no link
..


Support for PlaceholderWidget with no link

Bug: T137490
Change-Id: Ia861b5aa3f100124418956a0e09603a9ba29215a
---
M includes/api/ApiEchoNotifications.php
M modules/styles/mw.echo.ui.PlaceholderItemWidget.less
M modules/ui/mw.echo.ui.PlaceholderItemWidget.js
3 files changed, 18 insertions(+), 24 deletions(-)

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



diff --git a/includes/api/ApiEchoNotifications.php 
b/includes/api/ApiEchoNotifications.php
index 3fc66d1..6a00bf6 100644
--- a/includes/api/ApiEchoNotifications.php
+++ b/includes/api/ApiEchoNotifications.php
@@ -11,6 +11,7 @@
}
 
public function execute() {
+
// To avoid API warning, register the parameter used to bust 
browser cache
$this->getMain()->getVal( '_' );
 
diff --git a/modules/styles/mw.echo.ui.PlaceholderItemWidget.less 
b/modules/styles/mw.echo.ui.PlaceholderItemWidget.less
index 9139d15..7ea644e 100644
--- a/modules/styles/mw.echo.ui.PlaceholderItemWidget.less
+++ b/modules/styles/mw.echo.ui.PlaceholderItemWidget.less
@@ -1,10 +1,5 @@
 @import '../echo.variables';
 .mw-echo-ui-placeholderItemWidget {
-   padding: 2em;
-   background-color: @notification-background-read;
-
-   &-notLinked,
-   &-notLinked a {
-   cursor: default;
-   }
-   }
+   padding: 2em;
+   background-color: @notification-background-read;
+}
diff --git a/modules/ui/mw.echo.ui.PlaceholderItemWidget.js 
b/modules/ui/mw.echo.ui.PlaceholderItemWidget.js
index 71eff32..1d64abe 100644
--- a/modules/ui/mw.echo.ui.PlaceholderItemWidget.js
+++ b/modules/ui/mw.echo.ui.PlaceholderItemWidget.js
@@ -19,31 +19,29 @@
// Mixin constructor
OO.ui.mixin.LabelElement.call( this, config );
 
-   this.$link = $( '' )
-   .addClass( 'mw-echo-ui-placeholderItemWidget-link' );
-   this.setLink( config.link || '' );
+   this.$element.addClass( 'mw-echo-ui-placeholderItemWidget' );
 
-   this.$element
-   .addClass( 'mw-echo-ui-placeholderItemWidget' )
-   .append(
-   this.$link.append( this.$label )
-   );
+   this.setLink( config.link );
};
 
OO.inheritClass( mw.echo.ui.PlaceholderItemWidget, OO.ui.Widget );
OO.mixinClass( mw.echo.ui.PlaceholderItemWidget, 
OO.ui.mixin.LabelElement );
 
/**
-* Set (or unset) the main link for this widget
+* Set (or unset) the main link url for this widget
 *
-* @param {string} link The widget link
+* @param {string} url The widget url
 */
-   mw.echo.ui.PlaceholderItemWidget.prototype.setLink = function ( link ) {
-   this.link = link;
-
-   this.$element.toggleClass( 
'mw-echo-ui-placeholderItemWidget-loadingOption-notLinked', !this.link );
-
-   this.$link.attr( 'href', this.link );
+   mw.echo.ui.PlaceholderItemWidget.prototype.setLink = function ( url ) {
+   var $link;
+   if ( url ) {
+   $link = $( '' )
+   .addClass( 
'mw-echo-ui-placeholderItemWidget-link' )
+   .attr( 'href', url );
+   this.$element.html( $link.append( this.$label ) );
+   } else {
+   this.$element.html( this.$label );
+   }
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia861b5aa3f100124418956a0e09603a9ba29215a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
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] Move changeslist CSS classes from mediawiki.legacy.shared - change (mediawiki/core)

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

Change subject: Move changeslist CSS classes from mediawiki.legacy.shared
..


Move changeslist CSS classes from mediawiki.legacy.shared

Bug: T89981
Change-Id: Ifd90292fc54875403d871429ce6e5020036d4797
---
M includes/actions/HistoryAction.php
M includes/specialpage/ChangesListSpecialPage.php
M resources/src/mediawiki.legacy/shared.css
M resources/src/mediawiki.special/mediawiki.special.changeslist.css
4 files changed, 33 insertions(+), 31 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/actions/HistoryAction.php 
b/includes/actions/HistoryAction.php
index 63fe97b..700e201 100644
--- a/includes/actions/HistoryAction.php
+++ b/includes/actions/HistoryAction.php
@@ -117,6 +117,7 @@
$out->setFeedAppendQuery( 'action=history' );
$out->addModules( 'mediawiki.action.history' );
$out->addModuleStyles( 'mediawiki.action.history.styles' );
+   $out->addModuleStyles( 'mediawiki.special.changeslist' );
if ( $config->get( 'UseMediaWikiUIEverywhere' ) ) {
$out = $this->getOutput();
$out->addModuleStyles( [
diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index 0966f80..0bd2932 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -477,6 +477,7 @@
// Styles and behavior for the legend box (see makeLegend())
$out->addModuleStyles( 'mediawiki.special.changeslist.legend' );
$out->addModules( 'mediawiki.special.changeslist.legend.js' );
+   $out->addModuleStyles( 'mediawiki.special.changeslist' );
}
 
protected function getGroupName() {
diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index 4ff403a..73e474e 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -91,37 +91,6 @@
}
 }
 
-/* Colored watchlist and recent changes numbers */
-.mw-plusminus-pos {
-   color: #006400; /* dark green */
-}
-
-.mw-plusminus-neg {
-   color: #8b; /* dark red */
-}
-
-.mw-plusminus-null {
-   color: #aaa; /* gray */
-}
-
-/*
- * Bidi-isolate these numbers.
- * See https://phabricator.wikimedia.org/T93484
- */
-.mw-plusminus-pos,
-.mw-plusminus-neg,
-.mw-plusminus-null {
-   unicode-bidi: -moz-isolate;
-   unicode-bidi: isolate;
-}
-
-/* Comment portions of RC entries */
-span.comment {
-   font-style: italic;
-   unicode-bidi: -moz-isolate;
-   unicode-bidi: isolate;
-}
-
 /**
  * Add a bit of margin space between the preview and the toolbar.
  * This replaces the ugly  we used to insert into the page source
diff --git a/resources/src/mediawiki.special/mediawiki.special.changeslist.css 
b/resources/src/mediawiki.special/mediawiki.special.changeslist.css
index bdae0dd..b27d2a5 100644
--- a/resources/src/mediawiki.special/mediawiki.special.changeslist.css
+++ b/resources/src/mediawiki.special/mediawiki.special.changeslist.css
@@ -15,3 +15,34 @@
 .mw-changeslist .mw-title {
unicode-bidi: embed;
 }
+
+/* Colored watchlist and recent changes numbers */
+.mw-plusminus-pos {
+   color: #006400; /* dark green */
+}
+
+.mw-plusminus-neg {
+   color: #8b; /* dark red */
+}
+
+.mw-plusminus-null {
+   color: #aaa; /* gray */
+}
+
+/*
+ * Bidi-isolate these numbers.
+ * See https://phabricator.wikimedia.org/T93484
+ */
+.mw-plusminus-pos,
+.mw-plusminus-neg,
+.mw-plusminus-null {
+   unicode-bidi: -moz-isolate;
+   unicode-bidi: isolate;
+}
+
+/* Comment portions of RC entries */
+span.comment {
+   font-style: italic;
+   unicode-bidi: -moz-isolate;
+   unicode-bidi: isolate;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd90292fc54875403d871429ce6e5020036d4797
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Jack Phoenix 
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 transition animation when switching between Fragments. - change (apps...wikipedia)

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

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

Change subject: Add transition animation when switching between Fragments.
..

Add transition animation when switching between Fragments.

- A short fade effect.
- This also fixes the transparency of the system status bar when the
  default Toolbar is hidden.

Change-Id: I7e09b9e4c4ee6e025964c3e50b1ba7c3bc3b9d63
---
M app/src/main/java/org/wikipedia/MainActivity.java
M app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
A app/src/main/res/anim/fade_in.xml
A app/src/main/res/anim/fade_out.xml
4 files changed, 19 insertions(+), 4 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/MainActivity.java 
b/app/src/main/java/org/wikipedia/MainActivity.java
index 54ec68a..e504f96 100644
--- a/app/src/main/java/org/wikipedia/MainActivity.java
+++ b/app/src/main/java/org/wikipedia/MainActivity.java
@@ -210,8 +210,8 @@
 PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
 setContentView(R.layout.activity_page);
 
-toolbarCoordinator = new MainActivityToolbarCoordinator(this, 
(Toolbar) findViewById(R.id.main_toolbar));
 toolbarContainer = findViewById(R.id.main_toolbar_container);
+toolbarCoordinator = new MainActivityToolbarCoordinator(this, 
toolbarContainer, (Toolbar) findViewById(R.id.main_toolbar));
 getSupportFragmentManager()
 .addOnBackStackChangedListener(new 
FragmentManager.OnBackStackChangedListener() {
 @Override
@@ -568,6 +568,7 @@
 
 resetFragmentsToFeedOrPage();
 FragmentTransaction trans = 
getSupportFragmentManager().beginTransaction();
+trans.setCustomAnimations(R.anim.fade_in, R.anim.fade_out, 
R.anim.fade_in, R.anim.fade_out);
 trans.add(R.id.content_fragment_container, f);
 trans.addToBackStack(null);
 if (allowStateLoss) {
diff --git 
a/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java 
b/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
index e549967..4be8b77 100644
--- a/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
+++ b/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
@@ -8,24 +8,28 @@
 
 public class MainActivityToolbarCoordinator {
 @NonNull private AppCompatActivity activity;
+@NonNull private View toolbarContainerView;
 @NonNull private Toolbar defaultToolbar;
 @Nullable private Toolbar overrideToolbar;
 
-public MainActivityToolbarCoordinator(@NonNull AppCompatActivity activity, 
@NonNull Toolbar defaultToolbar) {
+public MainActivityToolbarCoordinator(@NonNull AppCompatActivity activity,
+  @NonNull View toolbarContainerView,
+  @NonNull Toolbar defaultToolbar) {
 this.activity = activity;
+this.toolbarContainerView = toolbarContainerView;
 this.defaultToolbar = defaultToolbar;
 setActivityToolbar(defaultToolbar);
 }
 
 public void setOverrideToolbar(@NonNull Toolbar toolbar) {
 overrideToolbar = toolbar;
-defaultToolbar.setVisibility(View.GONE);
+toolbarContainerView.setVisibility(View.GONE);
 setActivityToolbar(overrideToolbar);
 }
 
 public void removeOverrideToolbar() {
 overrideToolbar = null;
-defaultToolbar.setVisibility(View.VISIBLE);
+toolbarContainerView.setVisibility(View.VISIBLE);
 setActivityToolbar(defaultToolbar);
 }
 
diff --git a/app/src/main/res/anim/fade_in.xml 
b/app/src/main/res/anim/fade_in.xml
new file mode 100644
index 000..5d274c6
--- /dev/null
+++ b/app/src/main/res/anim/fade_in.xml
@@ -0,0 +1,5 @@
+
+http://schemas.android.com/apk/res/android;
+android:interpolator="@android:interpolator/decelerate_quad"
+android:fromAlpha="0.0" android:toAlpha="1.0"
+android:duration="@android:integer/config_shortAnimTime" />
diff --git a/app/src/main/res/anim/fade_out.xml 
b/app/src/main/res/anim/fade_out.xml
new file mode 100644
index 000..193b69d
--- /dev/null
+++ b/app/src/main/res/anim/fade_out.xml
@@ -0,0 +1,5 @@
+
+http://schemas.android.com/apk/res/android;
+android:interpolator="@android:interpolator/accelerate_quad"
+android:fromAlpha="1.0" android:toAlpha="0.0"
+android:duration="@android:integer/config_shortAnimTime" />

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

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

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Add www.photolib.noaa.gov to wgCopyUploadDomains - change (operations/mediawiki-config)

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

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

Change subject: Add www.photolib.noaa.gov to wgCopyUploadDomains
..

Add www.photolib.noaa.gov to wgCopyUploadDomains

Bug: T138383
Change-Id: Icf5a0200c97ae29f82f9bcc3ae8790f5dd2fd5ef
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a28b6ba..ad879ce 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12177,6 +12177,7 @@
'*.khamenei.ir',// CC-BY 4.0 content - 
T134472
'images.nypl.org',  // New York Public Library 
- T137687
'www.wpc.ncep.noaa.gov',// National Oceanic and 
Atmospheric Administration - T138383
+   'www.photolib.noaa.gov',// National Oceanic and 
Atmospheric Administration - T138383
],
 ],
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf5a0200c97ae29f82f9bcc3ae8790f5dd2fd5ef
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


  1   2   3   >