[MediaWiki-commits] [Gerrit] Remove Babel check from showTermsList settings - change (mediawiki...Wikibase)
Jonas Kress (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/266477 Change subject: Remove Babel check from showTermsList settings .. Remove Babel check from showTermsList settings Bug: T124754 Change-Id: I301f26a307965de8f71142c70d5e374ed544a1ea --- M repo/Wikibase.hooks.php 1 file changed, 7 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/77/266477/1 diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index 44840c2..0b4693c 100644 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -350,19 +350,13 @@ 'type' => 'api' ); - if ( class_exists( 'Babel' ) ) { - $preferences['wikibase-entitytermsview-showEntitytermslistview'] = array( - 'type' => 'toggle', - 'label-message' => 'wikibase-setting-entitytermsview-showEntitytermslistview', - 'help-message' => 'wikibase-setting-entitytermsview-showEntitytermslistview-help', - 'section' => 'rendering/advancedrendering', - 'default' => '1', - ); - } elseif ( $user->getBoolOption( 'wikibase-entitytermsview-showEntitytermslistview' ) ) { - // Clear setting after uninstalling Babel extension. - unset( $user->mOptions['wikibase-entitytermsview-showEntitytermslistview'] ); - $user->saveSettings(); - } + $preferences['wikibase-entitytermsview-showEntitytermslistview'] = array( + 'type' => 'toggle', + 'label-message' => 'wikibase-setting-entitytermsview-showEntitytermslistview', + 'help-message' => 'wikibase-setting-entitytermsview-showEntitytermslistview-help', + 'section' => 'rendering/advancedrendering', + 'default' => '1', + ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/266477 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I301f26a307965de8f71142c70d5e374ed544a1ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE)___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [labs/tools/ptable] tox - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: [labs/tools/ptable] tox .. [labs/tools/ptable] tox Change-Id: I082550cd8651e20dd3122761b2978be7ff1eb251 --- M zuul/layout.yaml 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 6167405..52e1c7d 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -1753,6 +1753,10 @@ template: - name: tox-jessie + - name: labs/tools/ptable +template: + - name: tox-jessie + - name: labs/tools/wikibugs2 template: - name: tox-jessie -- To view, visit https://gerrit.wikimedia.org/r/265543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I082550cd8651e20dd3122761b2978be7ff1eb251 Gerrit-PatchSet: 3 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: RicordisamoaGerrit-Reviewer: Hashar Gerrit-Reviewer: Ricordisamoa 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 unused translate-edit-tmsugs - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused translate-edit-tmsugs .. Remove unused translate-edit-tmsugs Change-Id: Idabb2935d3a4ccb3f2b2ea66e80f80895a2a5d9d --- M i18n/core/en.json 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved Nemo bis: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/i18n/core/en.json b/i18n/core/en.json index 75f0b4e..eecfec9 100644 --- a/i18n/core/en.json +++ b/i18n/core/en.json @@ -56,7 +56,6 @@ "translate-edit-in-other-languages": "Message in other languages", "translate-edit-committed": "Current translation in software", "translate-edit-warnings": "Warnings about incomplete translations", - "translate-edit-tmsugs": "Suggestions from translation memories and machine translation", "translate-edit-tmmatch-source": "Translation source text: $1", "translate-edit-tmmatch": "$1% match", "translate-use-suggestion": "Replace current translation with this suggestion.", -- To view, visit https://gerrit.wikimedia.org/r/266199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idabb2935d3a4ccb3f2b2ea66e80f80895a2a5d9d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: NikerabbitGerrit-Reviewer: Nemo bis Gerrit-Reviewer: Siebrand 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 Unique Option - change (mediawiki...AJAXPoll)
Ljonka has uploaded a new change for review. https://gerrit.wikimedia.org/r/266483 Change subject: Add Unique Option .. Add Unique Option Enable unique form for each article on arg[unique]=true Change-Id: Ic1aeffa840a9ac265d0772b6718c847f30f56d41 --- M AJAXPoll_body.php 1 file changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AJAXPoll refs/changes/83/266483/1 diff --git a/AJAXPoll_body.php b/AJAXPoll_body.php index d2af185..2f6c166 100644 --- a/AJAXPoll_body.php +++ b/AJAXPoll_body.php @@ -41,13 +41,16 @@ $userName = $wgUser->getName(); } - // ID of the poll - if ( isset( $args["id"] ) ) { - $id = $args["id"]; + // ID of the poll, set from pagename if unique param is set + +if( isset( $args["unique"] ) && $args["unique"] == true ){ +$id = strtoupper( md5( $input . $wgRequest->getText("title") ) ); +} else if ( isset( $args["id"] ) ) { +$id = $args["id"]; } else { - $id = strtoupper( md5( $input ) ); +$id = strtoupper( md5( $input ) ); } - + // get the input $input = $parser->recursiveTagParse( $input, $frame ); $input = trim( strip_tags( $input ) ); -- To view, visit https://gerrit.wikimedia.org/r/266483 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1aeffa840a9ac265d0772b6718c847f30f56d41 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AJAXPoll Gerrit-Branch: master Gerrit-Owner: Ljonka___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplify Thumbor VCL - change (mediawiki/vagrant)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/266487 Change subject: Simplify Thumbor VCL .. Simplify Thumbor VCL Move the URL rewriting and xkey setting to a Thumbor extension Bug: T124293 Change-Id: I83ca34476ec4cca3de35fd13ee36d99109ed36b5 --- M puppet/modules/thumbor/manifests/init.pp M puppet/modules/thumbor/templates/thumbor.conf.erb M puppet/modules/thumbor/templates/varnish.vcl.erb M puppet/modules/varnish/files/default-subs.vcl 4 files changed, 11 insertions(+), 91 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/87/266487/1 diff --git a/puppet/modules/thumbor/manifests/init.pp b/puppet/modules/thumbor/manifests/init.pp index 8241b44..9a85a3c 100644 --- a/puppet/modules/thumbor/manifests/init.pp +++ b/puppet/modules/thumbor/manifests/init.pp @@ -142,7 +142,7 @@ varnish::backend { 'thumbor': host => '127.0.0.1', port => '', -onlyif => 'req.url ~ "^/images/thumb/.*\.(jpeg|jpg|jpe|png|apng|gif|svg|ogv|webm|xcf|djvu|pdf|tif|tiff)"', +onlyif => 'req.url ~ "^/images/thumb/.*"', } varnish::backend { 'swift': diff --git a/puppet/modules/thumbor/templates/thumbor.conf.erb b/puppet/modules/thumbor/templates/thumbor.conf.erb index c35684d..c2a8099 100644 --- a/puppet/modules/thumbor/templates/thumbor.conf.erb +++ b/puppet/modules/thumbor/templates/thumbor.conf.erb @@ -558,7 +558,8 @@ ## Extensions ## COMMUNITY_EXTENSIONS = [ -'wikimedia_thumbor.handler.multi' +'wikimedia_thumbor.handler.multi', +'wikimedia_thumbor.handler.images' ] EXIFTOOL_PATH = '/usr/bin/exiftool' @@ -585,6 +586,8 @@ VIPS_PATH = '/usr/bin/vips' +SWIFT_URI = '127.0.0.1:<%= scope['::swift::port'] %>/v1/AUTH_testproj/wiki-local-public/' + PROXY_ENGINE_ENGINES = [ 'wikimedia_thumbor.engine.svg', 'wikimedia_thumbor.engine.xcf', diff --git a/puppet/modules/thumbor/templates/varnish.vcl.erb b/puppet/modules/thumbor/templates/varnish.vcl.erb index 8ba7563..e2a42fb 100644 --- a/puppet/modules/thumbor/templates/varnish.vcl.erb +++ b/puppet/modules/thumbor/templates/varnish.vcl.erb @@ -11,18 +11,8 @@ tbf.close(); } -# vcl_recv is called whenever a request is received -# This is unfortunately a lot of copypasta from default-subs.vcl, because -# there is some default behaviour in there which we don't want (eg. If-None-Match) -# and the only way to avoid it is to run this overridden vcl_recv with a smaller order -# on the vcl sub vcl_recv { set req.http.X-Forwarded-For = client.ip; - -# Save the original URL because we need to rewrite the request url for the backend -if (req.url ~ "^/images/") { -set req.http.X-Url = req.url; -} # Since we expose varnish on the default port (6081) we need to rewrite # requests that are generated using the default wiki port (8080) @@ -38,73 +28,19 @@ return (synth(405, "This IP is not allowed to send PURGE requests.")); } -if (req.url ~ "^/images/thumb/") { -set req.http.xkey-purge = "File:" + regsub(req.url, "^/images/thumb/[^/]+/[^/]+/([^/]+)/[^/]+$", "\1"); -} else if (req.url ~ "^/images/") { -set req.http.xkey-purge = "File:" + regsub(req.url, "^/images/[^/]+/[^/]+/(.*)", "\1"); -} else { -# Not an identifiable file, regular purge -return (hash); -} - -if (xkey.purge(req.http.xkey-purge) != 0) { +if (xkey.purge(regsub(req.url, "^/(.*)", "\1")) != 0) { return (synth(200, "Purged")); } else { return (synth(404, "Key not found")); } } -# Pass any requests that Varnish does not understand straight to the backend. -if (req.method != "GET" && req.method != "HEAD" && -req.method != "PUT" && req.method != "POST" && -req.method != "TRACE" && req.method != "OPTIONS" && -req.method != "DELETE") { -return (pipe); /* Non-RFC2616 or CONNECT which is weird. */ +# Reject any methods that aren't expected to work in the context of thumbnails +if (req.method != "GET" && req.method != "HEAD") { +return (synth(405, "Method not allowed")); } -# Force lookup if the request is a no-cache request from the client. -if (req.http.Cache-Control ~ "no-cache") { -ban("req.url == " + req.url); -} - -# qlow jpg thumbs (thumbor) -if (req.url ~ "^/images/thumb/(.*)\.(jpg|jpeg|jpe)/qlow-(\d+)px-.*") { -set req.url = "/unsafe/" + regsub(req.url, "^/images/thumb/(.*)\.(jpg|jpeg|jpe)/qlow-(\d+)px-.*", "\3") + "x/filters:quality(40):conditional_sharpen(0.6,0.01,false,0.85)/127.0.0.1:<%= scope['::swift::port'] %>/v1/AUTH_testproj/wiki-local-public/" + regsub(req.url, "^/images/thumb/(.*)\.(jpg|jpeg|jpe)/qlow-(\d+)px-.*",
[MediaWiki-commits] [Gerrit] Make mediawiki.special.pageLanguage work again - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make mediawiki.special.pageLanguage work again .. Make mediawiki.special.pageLanguage work again Broken with the switch to OOUI. This also adds 'id' param to OOUI HTMLRadioField. Follow-up to b51076a84446d157bed511246450e70d26e0f945. Change-Id: I69c5fa9830a8b8b7cd6bf3468b5600325d34c070 --- M includes/htmlform/HTMLRadioField.php M resources/Resources.php M resources/src/mediawiki.special/mediawiki.special.pageLanguage.js 3 files changed, 12 insertions(+), 6 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/htmlform/HTMLRadioField.php b/includes/htmlform/HTMLRadioField.php index 2d05704..64f9cb6 100644 --- a/includes/htmlform/HTMLRadioField.php +++ b/includes/htmlform/HTMLRadioField.php @@ -49,6 +49,7 @@ return new OOUI\RadioSelectInputWidget( array( 'name' => $this->mName, + 'id' => $this->mID, 'value' => $value, 'options' => $options, 'classes' => 'mw-htmlform-flatlist-item', diff --git a/resources/Resources.php b/resources/Resources.php index 18bff51..8dac08e 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1761,6 +1761,9 @@ ), 'mediawiki.special.pageLanguage' => array( 'scripts' => 'resources/src/mediawiki.special/mediawiki.special.pageLanguage.js', + 'dependencies' => array( + 'oojs-ui', + ), ), 'mediawiki.special.pagesWithProp' => array( 'position' => 'top', diff --git a/resources/src/mediawiki.special/mediawiki.special.pageLanguage.js b/resources/src/mediawiki.special/mediawiki.special.pageLanguage.js index 7c2269f..edfbe1e 100644 --- a/resources/src/mediawiki.special/mediawiki.special.pageLanguage.js +++ b/resources/src/mediawiki.special/mediawiki.special.pageLanguage.js @@ -1,9 +1,11 @@ -( function ( $ ) { - $( document ).ready( function () { - +/*! + * JavaScript module used on Special:PageLanguage + */ +( function ( $, OO ) { + $( function () { // Select the 'Language select' option if user is trying to select language - $( '#mw-pl-languageselector' ).on( 'click', function () { - $( '#mw-pl-options-2' ).prop( 'checked', true ); + OO.ui.infuse( 'mw-pl-languageselector' ).on( 'change', function () { + OO.ui.infuse( 'mw-pl-options' ).setValue( '2' ); } ); } ); -}( jQuery ) ); +}( jQuery, OO ) ); -- To view, visit https://gerrit.wikimedia.org/r/265925 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69c5fa9830a8b8b7cd6bf3468b5600325d34c070 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: GlaisherGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Edokter Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Fomafix Gerrit-Reviewer: Glaisher 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] Really fix exceptions on Special:Translations - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Really fix exceptions on Special:Translations .. Really fix exceptions on Special:Translations Previous commit was not rebased correctly. Bug: T93855 Change-Id: Iaafd6b6dec66f5995f14cc5c9da874cee6607acf --- M specials/SpecialTranslations.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialTranslations.php b/specials/SpecialTranslations.php index 1d20988..8f9a8ee 100644 --- a/specials/SpecialTranslations.php +++ b/specials/SpecialTranslations.php @@ -224,7 +224,6 @@ $tHandle = new MessageHandle( $tTitle ); $code = $tHandle->getCode(); - $language = Language::factory( $code ); $text = TranslateUtils::getLanguageName( $code, $this->getLanguage()->getCode() ); $text .= $separator; @@ -258,6 +257,7 @@ $languageAttributes = array(); if ( Language::isKnownLanguageTag( $code ) ) { + $language = Language::factory( $code ); $languageAttributes = array( 'lang' => $language->getHtmlCode(), 'dir' => $language->getDir(), -- To view, visit https://gerrit.wikimedia.org/r/265730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaafd6b6dec66f5995f14cc5c9da874cee6607acf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: NikerabbitGerrit-Reviewer: Siebrand 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 logical redis definition for GettingStarted. - change (operations/mediawiki-config)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/266481 Change subject: Use the logical redis definition for GettingStarted. .. Use the logical redis definition for GettingStarted. Bug: T124671 Change-Id: I983d6609f7cd7b19eaba5f5801f7682b73fd5d04 --- M wmf-config/CommonSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/81/266481/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 7574b43..2750166 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -2595,7 +2595,7 @@ if ( $wmgUseGettingStarted ) { require_once( "$IP/extensions/GettingStarted/GettingStarted.php" ); - $wgGettingStartedRedis = '/var/run/nutcracker/redis_eqiad.sock'; + $wgGettingStartedRedis = $wgObjectCaches['redis_master']; $wgGettingStartedRedisOptions['password'] = $wmgRedisPassword; $wgGettingStartedCategoriesForTaskTypes = $wmgGettingStartedCategoriesForTaskTypes; $wgGettingStartedExcludedCategories = $wmgGettingStartedExcludedCategories; -- To view, visit https://gerrit.wikimedia.org/r/266481 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I983d6609f7cd7b19eaba5f5801f7682b73fd5d04 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add GENDER support for notification headers - change (mediawiki...EducationProgram)
Matěj Suchánek has uploaded a new change for review. https://gerrit.wikimedia.org/r/266484 Change subject: Add GENDER support for notification headers .. Add GENDER support for notification headers The new parameter can be used for identifying gender of the viewing user. Change-Id: Ibd20405d7a01fde9e2990015d8a3360c8fb34a89 --- M i18n/en.json M i18n/qqq.json M includes/notifications/PresentationModel/RoleAdd.php 3 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram refs/changes/84/266484/1 diff --git a/i18n/en.json b/i18n/en.json index 4bfb028..1b5fd3e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -720,10 +720,10 @@ "ep-online-add-notification-title": "You have been {{GENDER:$1|added}} as an online volunteer to [[$2|$3]] by [[User:$1|$1]].", "ep-online-add-notification-title-email-subject": "You have been {{GENDER:$1|added}} as an online volunteer to $2 by $1.", "ep-online-add-notification-title-email-body": "You have been {{GENDER:$1|added}} as an online volunteer to $2 by $1.", - "notification-header-ep-campus-add-notification": "You have been {{GENDER:$2|added}} as a campus volunteer to $3 by $1.", + "notification-header-ep-campus-add-notification": "You have been {{GENDER:$2|added}} as a campus {{GENDER:$4|volunteer}} to $3 by $1.", "notification-header-ep-course-talk-notification": "The course talk page of $3 was {{GENDER:$2|edited}} by $1.", - "notification-header-ep-instructor-add-notification": "You have been {{GENDER:$2|added}} as an instructor to $3 by $1.", - "notification-header-ep-online-add-notification": "You have been {{GENDER:$2|added}} as an online volunteer to $3 by $1.", + "notification-header-ep-instructor-add-notification": "You have been {{GENDER:$2|added}} as an {{GENDER:$4|instructor}} to $3 by $1.", + "notification-header-ep-online-add-notification": "You have been {{GENDER:$2|added}} as an online {{GENDER:$4|volunteer}} to $3 by $1.", "notification-header-ep-student-add-notification": "You have been {{GENDER:$2|added}} to $3 by $1.", "apihelp-addstudents-description": "Add multiple students to a course.", "apihelp-addstudents-param-studentusernames": "The usernames of the students to add to the course.", @@ -760,4 +760,4 @@ "apihelp-refresheducation-param-type": "Type of object to refresh.", "apihelp-refresheducation-example-1": "Refresh course 42", "apihelp-refresheducation-example-2": "Refresh students 2 and 4" -} +} \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json index f20c9ea..66ae06b 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -740,10 +740,10 @@ "ep-online-add-notification-title": "Default title for online volunteer added to course notification. Parameters:\n* $1 - the user who added another user as an online volunteer to a course\n* $2 - the full name of the course for the url\n* $3 - the human-readable name of the course with the term in parentheses\nSee also:\n* {{msg-mw|Ep-online-add-notification-title-email-subject}}\n* {{msg-mw|Ep-online-add-notification-title-email-body}}", "ep-online-add-notification-title-email-subject": "Email subject line for online volunteer added to course notification. Parameters:\n* $1 - the user who added another user as an online volunteer to a course\n* $2 - the human-readable name of the course with the term in parentheses\nSee also:\n* {{msg-mw|Ep-online-add-notification-title}}\n* {{msg-mw|Ep-online-add-notification-title-email-body}}", "ep-online-add-notification-title-email-body": "Email body content for online volunteer added to course notification. Parameters:\n* $1 - the user who added another user as an online volunteer to a course\n* $2 - the human-readable name of the course with the term in parentheses\nSee also:\n* {{msg-mw|Ep-online-add-notification-title}}\n* {{msg-mw|Ep-online-add-notification-title-email-subject}}", - "notification-header-ep-campus-add-notification": "Default title for campus volunteer added to course notification. Parameters:\n* $1 - the formatted user name (the user name, or hidden if deleted user) of the user that modified the course talk page\n* $2 - can be used for GENDER of user at $1\n* $3 - the human-readable name of the course with the term in parentheses", + "notification-header-ep-campus-add-notification": "Default title for campus volunteer added to course notification. Parameters:\n* $1 - the formatted user name (the user name, or hidden if deleted user) of the user that modified the course talk page\n* $2 - can be used for GENDER of user at $1\n* $3 - the human-readable name of the course with the term in parentheses\n* $4 - can be used for GENDER of the user who received the notification",
[MediaWiki-commits] [Gerrit] Remove "step" parameter from site, page and pagegenerators m... - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/266476 Change subject: Remove "step" parameter from site, page and pagegenerators methods. .. Remove "step" parameter from site, page and pagegenerators methods. - deprecate formal "step" parameter - rename "step" parameter of preloading generators to "groupsize" - kept for site.loadrevisions - for generators set_query_increment may be used when needed Bug: T109208 Change-Id: Iac0afb6479f2c73e08c39412903d1a8d6d5092b9 --- M pywikibot/bot.py M pywikibot/page.py M pywikibot/pagegenerators.py M pywikibot/site.py M scripts/blockpageschecker.py M scripts/category_redirect.py M scripts/patrol.py M scripts/redirect.py M scripts/reflinks.py M scripts/weblinkchecker.py M tests/isbn_tests.py M tests/pagegenerators_tests.py M tests/site_tests.py 13 files changed, 339 insertions(+), 374 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/76/266476/1 diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 18436db..27f4006 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -48,7 +48,7 @@ used. """ # -# (C) Pywikibot team, 2008-2015 +# (C) Pywikibot team, 2008-2016 # # Distributed under the terms of the MIT license. # @@ -1821,8 +1821,7 @@ @type property_name: str """ ns = self.site.data_repository().property_namespace -for page in self.site.search(property_name, step=1, total=1, - namespaces=ns): +for page in self.site.search(property_name, total=1, namespaces=ns): page = pywikibot.PropertyPage(self.site.data_repository(), page.title()) pywikibot.output(u"Assuming that %s property is %s." % diff --git a/pywikibot/page.py b/pywikibot/page.py index 82a9028..217de9b 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -902,9 +902,10 @@ disambigInPage = disambigs.intersection(templates) return self.namespace() != 10 and len(disambigInPage) > 0 +@deprecated_args(step=None) def getReferences(self, follow_redirects=True, withTemplateInclusion=True, onlyTemplateInclusion=False, redirectsOnly=False, - namespaces=None, step=None, total=None, content=False): + namespaces=None, total=None, content=False): """ Return an iterator all pages that refer to or embed the page. @@ -919,7 +920,6 @@ is used as a template. @param redirectsOnly: if True, only iterate redirects to self. @param namespaces: only iterate pages in these namespaces -@param step: limit each API call to this number of pages @param total: iterate no more than this number of pages in total @param content: if True, retrieve the content of the current version of each referring page (default False) @@ -936,13 +936,13 @@ withTemplateInclusion=withTemplateInclusion, onlyTemplateInclusion=onlyTemplateInclusion, namespaces=namespaces, -step=step, total=total, content=content ) +@deprecated_args(step=None) def backlinks(self, followRedirects=True, filterRedirects=None, - namespaces=None, step=None, total=None, content=False): + namespaces=None, total=None, content=False): """ Return an iterator for pages that link to this page. @@ -951,7 +951,6 @@ @param filterRedirects: if True, only iterate redirects; if False, omit redirects; if None, do not filter @param namespaces: only iterate pages in these namespaces -@param step: limit each API call to this number of pages @param total: iterate no more than this number of pages in total @param content: if True, retrieve the content of the current version of each referring page (default False) @@ -961,12 +960,12 @@ followRedirects=followRedirects, filterRedirects=filterRedirects, namespaces=namespaces, -step=step, total=total, content=content ) -def embeddedin(self, filter_redirects=None, namespaces=None, step=None, +@deprecated_args(step=None) +def embeddedin(self, filter_redirects=None, namespaces=None, total=None, content=False): """ Return an iterator for pages that embed this page as a template. @@ -974,7 +973,6 @@ @param filter_redirects: if True, only iterate redirects; if False, omit redirects; if None, do not filter @param namespaces: only iterate pages in these namespaces -@param step: limit each API call to this number of pages @param total: iterate no more than this number of pages in total
[MediaWiki-commits] [Gerrit] Remove debdeploy::master from palladium - change (operations/puppet)
Muehlenhoff has submitted this change and it was merged. Change subject: Remove debdeploy::master from palladium .. Remove debdeploy::master from palladium Now running on neodymium Change-Id: I0865185b545e33fbf2a54438df0f2eb78a60f91d --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Muehlenhoff: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index f0de9ee..348f912 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2181,7 +2181,7 @@ # primary puppet master node 'palladium.eqiad.wmnet' { -role ipmi, salt::masters::production, access_new_install, puppetmaster::frontend, pybal_config, debdeploy::master +role ipmi, salt::masters::production, access_new_install, puppetmaster::frontend, pybal_config include standard include role::conftool::master } -- To view, visit https://gerrit.wikimedia.org/r/266219 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0865185b545e33fbf2a54438df0f2eb78a60f91d Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MuehlenhoffGerrit-Reviewer: Muehlenhoff 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 jquery.accessKeyLabel if available - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Use jquery.accessKeyLabel if available .. Use jquery.accessKeyLabel if available Bug: T87174 Change-Id: I8da13979883ded5f3defd3cad9c7c24f147b16dd --- M resources/js/ext.translate.editor.js 1 file changed, 20 insertions(+), 8 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 5d49cd9..25506c2 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -751,14 +751,26 @@ ); if ( canTranslate ) { - $editorColumn.append( $( '' ) - .addClass( 'row shortcutinfo' ) - .text( mw.msg( 'tux-editor-shortcut-info', - ( mw.util.tooltipAccessKeyPrefix + 's' ).toUpperCase(), - ( mw.util.tooltipAccessKeyPrefix + 'd' ).toUpperCase(), - 'ALT' ) - ) - ); + // BC for MW <= 1.26 + + ( function () { + if ( mw.loader.getState( 'jquery.accessKeyLabel' ) ) { + return mw.loader.using( 'jquery.accessKeyLabel' ).then( function () { + return $.fn.updateTooltipAccessKeys.getAccessKeyPrefix(); + } ); + } + + return $.Deferred().resolve( mw.util.tooltipAccessKeyPrefix ); + }() ).done( function ( prefix ) { + $editorColumn.append( $( '' ) + .addClass( 'row shortcutinfo' ) + .text( mw.msg( 'tux-editor-shortcut-info', + ( prefix + 's' ).toUpperCase(), + ( prefix + 'd' ).toUpperCase(), + 'ALT' ) + ) + ); + } ); } return $editorColumn; -- To view, visit https://gerrit.wikimedia.org/r/265943 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8da13979883ded5f3defd3cad9c7c24f147b16dd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: NikerabbitGerrit-Reviewer: Siebrand 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 comment referencing declined task - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/266479 Change subject: Remove comment referencing declined task .. Remove comment referencing declined task Change-Id: Idc6a0386e9fe65f5f458a2b2218c1337e1b1d944 --- M client/resources/wikibase.client.PageConnector.js 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/79/266479/1 diff --git a/client/resources/wikibase.client.PageConnector.js b/client/resources/wikibase.client.PageConnector.js index b767448..c096bab 100644 --- a/client/resources/wikibase.client.PageConnector.js +++ b/client/resources/wikibase.client.PageConnector.js @@ -335,7 +335,6 @@ secondSite = wb.sites.getSite( secondSiteId ); // Labels (page titles) - // FIXME: Remove this after bug T59564 has been solved! entityData.labels[ firstSite.getLanguageCode() ] = { language: firstSite.getLanguageCode(), value: firstPageName -- To view, visit https://gerrit.wikimedia.org/r/266479 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc6a0386e9fe65f5f458a2b2218c1337e1b1d944 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move intuition/dcatap into its own repo - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Move intuition/dcatap into its own repo .. Move intuition/dcatap into its own repo Messages of this tool are now maintained in the source repository at https://gerrit.wikimedia.org/r/operations/dumps/dcat instead of shipped with the main Intuition library. Bug: T122975 Change-Id: Ie4067d57cfc9ce76cd671ca07ed2ebfaa1525f06 --- M REPOCONF M TranslateSettings.php M bin/EXTERNAL-PROJECTS M bin/repocommit M bin/repoexport M bin/repoupdate A groups/Intuition/dcatap.yaml M groups/Intuition/intuition-textdomains.txt 8 files changed, 25 insertions(+), 2 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/REPOCONF b/REPOCONF index fe484e7..3e77a13 100644 --- a/REPOCONF +++ b/REPOCONF @@ -23,6 +23,7 @@ REPO_IHRIS_MODULES="i2ce ihris-common ihris-manage ihris-qualify ihris-train" REPO_INATURALIST=git://github.com/inaturalist/inaturalist.git REPO_INTUITION=git://github.com/Krinkle/intuition.git +REPO_INTDCATAP=https://gerrit.wikimedia.org/r/operations/dumps/dcat REPO_INTORPHANTALK=git://github.com/Krinkle/mw-tool-orphantalk.git REPO_INTRAUN=git://github.com/kenrick95/Raun.git REPO_JQUERY_ULS=git://github.com/wikimedia/jquery.uls.git diff --git a/TranslateSettings.php b/TranslateSettings.php index b491663..a7786ab 100644 --- a/TranslateSettings.php +++ b/TranslateSettings.php @@ -316,6 +316,7 @@ $wgTranslateGroupFiles[] = "$GROUPS/Intuition/IntuitionAgg.yaml"; $wgTranslateGroupFiles[] = "$GROUPS/Intuition/orphantalk.yaml"; $wgTranslateGroupFiles[] = "$GROUPS/Intuition/raun.yaml"; +$wgTranslateGroupFiles[] = "$GROUPS/Intuition/dcatap.yaml"; $wgNamespaceAliases['Toolserver'] = 1240; $wgNamespaceAliases['Toolserver_talk'] = 1240; $wgTranslateSupportUrlNamespace[NS_INTUITION] = array( diff --git a/bin/EXTERNAL-PROJECTS b/bin/EXTERNAL-PROJECTS index e55953d..dc5114f 100644 --- a/bin/EXTERNAL-PROJECTS +++ b/bin/EXTERNAL-PROJECTS @@ -9,6 +9,7 @@ huggle ihris inaturalist +int-dcatap int-orphantalk int-raun intuition diff --git a/bin/repocommit b/bin/repocommit index 57285ab..811ced3 100755 --- a/bin/repocommit +++ b/bin/repocommit @@ -83,6 +83,7 @@ # TODO: Move to separate file? GERRITPROJECTS="\ crosswatch \ +int-dcatap \ pywikibot \ wikimania \ wikipedia-android" diff --git a/bin/repoexport b/bin/repoexport index b3c916f..0a135a5 100755 --- a/bin/repoexport +++ b/bin/repoexport @@ -76,6 +76,10 @@ then php "$EXPORTER" --target . --group=tsint* --lang='*' --skip "$SKIPLANGS" +elif [ "$PROJECT" = "int-dcatap" ] +then + php "$EXPORTER" --target . --group=int-dcatap --lang='*' --skip "$SKIPLANGS" + elif [ "$PROJECT" = "int-orphantalk" ] then php "$EXPORTER" --target . --group=int-orphantalk --lang='*' --skip "$SKIPLANGS" diff --git a/bin/repoupdate b/bin/repoupdate index f293cef..fd91873 100755 --- a/bin/repoupdate +++ b/bin/repoupdate @@ -86,6 +86,7 @@ done GITCLUPDATE_GERRIT="\ +int-dcatap \ pywikibot \ wikimania" diff --git a/groups/Intuition/dcatap.yaml b/groups/Intuition/dcatap.yaml new file mode 100644 index 000..d6d86c3 --- /dev/null +++ b/groups/Intuition/dcatap.yaml @@ -0,0 +1,16 @@ +--- +BASIC: + id: int-dcatap + label: DCAT-AP + namespace: NS_INTUITION + class: FileBasedMessageGroup + +MANGLER: + class: StringMatcher + prefix: dcatap- + patterns: +- "*" + +FILES: + class: JsonFFS + sourcePattern: "%GROUPROOT%/int-dcatap/i18n/%CODE%.json" diff --git a/groups/Intuition/intuition-textdomains.txt b/groups/Intuition/intuition-textdomains.txt index ebb0b20..8ac99ab 100644 --- a/groups/Intuition/intuition-textdomains.txt +++ b/groups/Intuition/intuition-textdomains.txt @@ -7,8 +7,6 @@ Cvn Overlay -Dcatap - General optional = colon-separator, dateformat, parentheses, comma-separator, word-separator -- To view, visit https://gerrit.wikimedia.org/r/262919 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie4067d57cfc9ce76cd671ca07ed2ebfaa1525f06 Gerrit-PatchSet: 3 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Lokal ProfilGerrit-Reviewer: Hoo man Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VCL: do not use illegal "trusted" XFF values for XCIP - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/266486 Change subject: VCL: do not use illegal "trusted" XFF values for XCIP .. VCL: do not use illegal "trusted" XFF values for XCIP As noted in the linked bug, our XFF-processing needs to get a lot more advanced in the long run. For now this closes the functional issue where we set X-Client-IP to a private or loopback IP when that's the first XFF entry set by a "trusted" proxy such as OperaMini. In these cases we'll fall back to acting as if there was no trusted proxy and set XCIP to the OperaMini proxy IP for now (because that's better than logging 127.0.0.1 or whatever as XCIP). Bug: T120121 Change-Id: Ib7d46cc1e527265c3f8169d483929acf44278fef --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/86/266486/1 diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 366f38f..958ac35 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -10,6 +10,7 @@ <% if @vcl_config.fetch("layer", "") == "frontend" -%> # only used in recv_fe_ip_processing on frontends import netmapper; +import ipcast; <% end %> <% @@ -319,7 +320,11 @@ } if (req.http.X-Trusted-Proxy && req.http.X-Forwarded-For) { // get last from trusted-proxy-supplied XFF - set req.http.X-Client-IP = regsub(req.http.X-Forwarded-For, "^([^,]+, )+", ""); + set req.http.maybe-xcip = regsub(req.http.X-Forwarded-For, "^([^,]+, )+", ""); + if(ipcast.ip(req.http.maybe-xcip, "127.0.0.1") !~ wikimedia_nets) { + set req.http.X-Client-IP = req.http.maybe-xcip; + } + unset req.http.maybe-xcip; } } else { // XCIP from nginx, XFF set/appended by nginx and contains at @@ -336,8 +341,12 @@ // regsub's below if there was only one (which would // alias XCIP by definition), there would be no commas // to match and XCIP gets reset to its original value. - set req.http.X-Client-IP = regsub(req.http.X-Forwarded-For, ", [^,]+$", ""); - set req.http.X-Client-IP = regsub(req.http.X-Client-IP, "^([^,]+, )+", ""); + set req.http.maybe-xcip = regsub(req.http.X-Forwarded-For, ", [^,]+$", ""); + set req.http.maybe-xcip = regsub(req.http.maybe-xcip, "^([^,]+, )+", ""); + if(ipcast.ip(req.http.maybe-xcip, "127.0.0.1") !~ wikimedia_nets) { + set req.http.X-Client-IP = req.http.maybe-xcip; + } + unset req.http.maybe-xcip; } } -- To view, visit https://gerrit.wikimedia.org/r/266486 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7d46cc1e527265c3f8169d483929acf44278fef 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] make cache_parsoid LVS IPs slightly more intuitive - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/266488 Change subject: make cache_parsoid LVS IPs slightly more intuitive .. make cache_parsoid LVS IPs slightly more intuitive moves "parsoid" down with the other similar internal service IPs (which LVS directly to appservers). Renames the label on the internal IP for parsoidcache from "parsoidsvc" to "parsoidcachesvc". Change-Id: I3b8688b00e960616547db4e47bc2ed9a83441751 --- M hieradata/common/lvs/configuration.yaml 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/88/266488/1 diff --git a/hieradata/common/lvs/configuration.yaml b/hieradata/common/lvs/configuration.yaml index 83c80ca..9343990 100644 --- a/hieradata/common/lvs/configuration.yaml +++ b/hieradata/common/lvs/configuration.yaml @@ -81,13 +81,11 @@ ulsfo: misc_weblb: 198.35.26.120 misc_weblb6: 2620:0:863:ed1a::3:d - parsoid: _block011 -eqiad: 10.2.2.28 parsoidcache: _block012 eqiad: parsoidcachelb: 208.80.154.248 parsoidcachelb6: 2620:0:861:ed1a::3:14 - parsoidsvc: 10.2.2.29 + parsoidcachesvc: 10.2.2.29 search: _block013 eqiad: 10.2.2.30 codfw: 10.2.1.30 @@ -97,6 +95,8 @@ streamlb6: 2620:0:861:ed1a::3:15 ocg: _block015 eqiad: 10.2.2.31 + parsoid: _block011 +eqiad: 10.2.2.28 mathoid: _block016 eqiad: 10.2.2.20 citoid: _block017 -- To view, visit https://gerrit.wikimedia.org/r/266488 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b8688b00e960616547db4e47bc2ed9a83441751 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] cache_parsoid: use local backends in codfw - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/266489 Change subject: cache_parsoid: use local backends in codfw .. cache_parsoid: use local backends in codfw note: these backend svc hostnames likely don't exist yet... Change-Id: If5cf6cbfeb25574085c1ca0acd27df52de0a0cf4 --- M modules/role/manifests/cache/configuration.pp M modules/role/manifests/cache/parsoid.pp 2 files changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/89/266489/1 diff --git a/modules/role/manifests/cache/configuration.pp b/modules/role/manifests/cache/configuration.pp index 2d78a17..ca403c49 100644 --- a/modules/role/manifests/cache/configuration.pp +++ b/modules/role/manifests/cache/configuration.pp @@ -22,18 +22,23 @@ }, 'parsoid' => { 'eqiad' => ['parsoid.svc.eqiad.wmnet'], +'codfw' => ['parsoid.svc.codfw.wmnet'], }, 'cxserver' => { 'eqiad' => ['cxserver.svc.eqiad.wmnet'], +'codfw' => ['cxserver.svc.codfw.wmnet'], }, 'citoid' => { 'eqiad' => ['citoid.svc.eqiad.wmnet'], +'codfw' => ['citoid.svc.codfw.wmnet'], }, 'graphoid' => { 'eqiad' => ['graphoid.svc.eqiad.wmnet'], +'codfw' => ['graphoid.svc.codfw.wmnet'], }, 'restbase' => { 'eqiad' => ['restbase.svc.eqiad.wmnet'], +'codfw' => ['restbase.svc.codfw.wmnet'], }, 'swift' => { 'eqiad' => ['ms-fe.svc.eqiad.wmnet'], diff --git a/modules/role/manifests/cache/parsoid.pp b/modules/role/manifests/cache/parsoid.pp index f405aea..7c5b5bb 100644 --- a/modules/role/manifests/cache/parsoid.pp +++ b/modules/role/manifests/cache/parsoid.pp @@ -42,7 +42,7 @@ 'backend' => { 'dynamic' => 'no', 'type' => 'hash', # probably wrong, but current value before this commit! XXX -'backends' => $::role::cache::configuration::backends[$::realm]['parsoid'][$::mw_primary], +'backends' => $::role::cache::configuration::backends[$::realm]['parsoid'][$::site], } }, vcl_config => $be_vcl_config, @@ -92,22 +92,22 @@ 'cxserver_backend' => { 'dynamic' => 'no', 'type' => 'chash', # probably wrong, but current value before this commit! XXX -'backends' => $::role::cache::configuration::backends[$::realm]['cxserver'][$::mw_primary], +'backends' => $::role::cache::configuration::backends[$::realm]['cxserver'][$::site], }, 'citoid_backend' => { 'dynamic' => 'no', 'type' => 'chash', # probably wrong, but current value before this commit! XXX -'backends' => $::role::cache::configuration::backends[$::realm]['citoid'][$::mw_primary], +'backends' => $::role::cache::configuration::backends[$::realm]['citoid'][$::site], }, 'graphoid_backend' => { 'dynamic' => 'no', 'type' => 'chash', # probably wrong, but current value before this commit! XXX -'backends' => $::role::cache::configuration::backends[$::realm]['graphoid'][$::mw_primary], +'backends' => $::role::cache::configuration::backends[$::realm]['graphoid'][$::site], }, 'restbase_backend' => { 'dynamic' => 'no', 'type' => 'chash', # probably wrong, but current value before this commit! XXX -'backends' => $::role::cache::configuration::backends[$::realm]['restbase'][$::mw_primary], +'backends' => $::role::cache::configuration::backends[$::realm]['restbase'][$::site], }, }, vcl_config => $fe_vcl_config, -- To view, visit https://gerrit.wikimedia.org/r/266489 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5cf6cbfeb25574085c1ca0acd27df52de0a0cf4 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] make default log rotation for apache be 30 days - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/266480 Change subject: make default log rotation for apache be 30 days .. make default log rotation for apache be 30 days This doesn't impact mediawiki installations, they have a separate config, but it does account for misc services where there is no explicit setting Change-Id: Ic7346157fc4ad39ea25a01c81edd2bb8b73863d6 --- M modules/apache/manifests/logrotate.pp 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/80/266480/1 diff --git a/modules/apache/manifests/logrotate.pp b/modules/apache/manifests/logrotate.pp index fbdeebe..fd4537a 100644 --- a/modules/apache/manifests/logrotate.pp +++ b/modules/apache/manifests/logrotate.pp @@ -1,11 +1,11 @@ # === Class apache::logrotate # # Allows defining rotation periodicity and the number of logs to keep -# for any host with apache directly via hiera. Defaults are what debian sets. -# We might want to make this a bit less long though +# for any host with apache directly via hiera. Defaults are short so +# that we don't worry about disks filling or about data retention. class apache::logrotate( -$period = 'weekly', -$rotate = 52, +$period = 'daily', +$rotate = 30, ) { augeas { 'Apache2 logs': -- To view, visit https://gerrit.wikimedia.org/r/266480 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7346157fc4ad39ea25a01c81edd2bb8b73863d6 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] esams: add text nodes to mobile cluster - change (operations/puppet)
Ema has submitted this change and it was merged. Change subject: esams: add text nodes to mobile cluster .. esams: add text nodes to mobile cluster This patchset adds all text nodes in esams to the mobile cluster for varnish-fe and nginx. Bug: T109286 Change-Id: Ie5467c6810205050d415477a29d7f90722ea5dab --- M conftool-data/nodes/esams.yaml 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: Ema: Verified; Looks good to me, approved Giuseppe Lavagetto: Looks good to me, but someone else must approve BBlack: Looks good to me, but someone else must approve diff --git a/conftool-data/nodes/esams.yaml b/conftool-data/nodes/esams.yaml index e0151e4..16e8400 100644 --- a/conftool-data/nodes/esams.yaml +++ b/conftool-data/nodes/esams.yaml @@ -3,6 +3,22 @@ cp3016.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] cp3017.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] cp3018.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] + cp3003.esams.wmnet: [varnish-fe, nginx] + cp3004.esams.wmnet: [varnish-fe, nginx] + cp3005.esams.wmnet: [varnish-fe, nginx] + cp3006.esams.wmnet: [varnish-fe, nginx] + cp3007.esams.wmnet: [varnish-fe, nginx] + cp3008.esams.wmnet: [varnish-fe, nginx] + cp3009.esams.wmnet: [varnish-fe, nginx] + cp3010.esams.wmnet: [varnish-fe, nginx] +# cp3011.esams.wmnet: [varnish-fe, nginx] #disabled, see T92306 + cp3012.esams.wmnet: [varnish-fe, nginx] + cp3013.esams.wmnet: [varnish-fe, nginx] + cp3014.esams.wmnet: [varnish-fe, nginx] + cp3030.esams.wmnet: [varnish-fe, nginx] + cp3031.esams.wmnet: [varnish-fe, nginx] + cp3040.esams.wmnet: [varnish-fe, nginx] + cp3041.esams.wmnet: [varnish-fe, nginx] cache_text: cp3003.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] cp3004.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] -- To view, visit https://gerrit.wikimedia.org/r/266475 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie5467c6810205050d415477a29d7f90722ea5dab Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: EmaGerrit-Reviewer: BBlack Gerrit-Reviewer: Ema Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Delay die when PluggableAuth is missing - change (mediawiki...OpenIDConnect)
jenkins-bot has submitted this change and it was merged. Change subject: Delay die when PluggableAuth is missing .. Delay die when PluggableAuth is missing Change-Id: I6fd1d7690bceeaa9397eb4f9984965bfba07b012 --- M OpenIDConnect.php 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/OpenIDConnect.php b/OpenIDConnect.php index 99db120..698cad8 100644 --- a/OpenIDConnect.php +++ b/OpenIDConnect.php @@ -22,9 +22,11 @@ * DEALINGS IN THE SOFTWARE. */ -if ( !class_exists( 'PluggableAuth' ) ) { - die( 'Error: This extension requires the PluggableAuth extension to be included first' ); -} +$wgExtensionFunctions[] = function () { + if ( !class_exists( 'PluggableAuth' ) ) { + die( 'Error: This extension requires the PluggableAuth extension to be included first' ); + } +}; if ( array_key_exists( 'PluggableAuth_Class', $GLOBALS ) ) { die( 'Error: A value for $PluggableAuth_Class has already been set.' ); -- To view, visit https://gerrit.wikimedia.org/r/265257 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6fd1d7690bceeaa9397eb4f9984965bfba07b012 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/OpenIDConnect Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] MediaWiki theme: Align `@input-*` vars to coding guidelines - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: MediaWiki theme: Align `@input-*` vars to coding guidelines .. MediaWiki theme: Align `@input-*` vars to coding guidelines Aligning `@input-*` vars to coding guidelines and clarifying usage of variables by renaming it to `*-input-binary`. Change-Id: Ic90c11727104c2ab539c19ef8a94e09dd4f2ef4d --- M src/themes/mediawiki/common.less M src/themes/mediawiki/widgets.less 2 files changed, 32 insertions(+), 31 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less index 0133a7b..ef02568 100644 --- a/src/themes/mediawiki/common.less +++ b/src/themes/mediawiki/common.less @@ -42,23 +42,16 @@ // Invalid Widget (validation error feedback) @color-invalid: #f00; +@size-icon: unit( 24 / 16 / 0.8, em ); +@size-indicator: unit( 12 / 16 / 0.8, em ); + @border-default: 1px solid #ccc; - -@input-border-color: #777; -@input-active-color: #ccc; -@input-hover-border-bottom-width: 3px; -@input-focus-border-width: 2px; -@input-size: 1.6em; - @border-radius-default: 2px; @box-shadow-dialog: 0 0.15em 0 0 rgba( 0, 0, 0, 0.15 ); @box-shadow-menu: @box-shadow-dialog; @box-shadow-popup: @box-shadow-dialog; @box-shadow-light-inset: inset 0 0 0 1px @color-default-light; - -@size-icon: unit( 24 / 16 / 0.8, em ); -@size-indicator: unit( 12 / 16 / 0.8, em ); @text-shadow-default: 0 1px 1px #fff; // 'coined' effect @text-shadow-disabled: @text-shadow-default; @@ -69,6 +62,14 @@ @transition-ease-out-back-medium: 200ms cubic-bezier( 0.175, 0.885, 0.32, 1.275 ); @transition-ease-out-sine-medium: 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 ); +// Binary Input Widgets (CheckboxInput, RadioInput, ToggleSwitch) +@background-color-input-binary-active: #ccc; +@size-input-binary: 1.6em; +@border-input-binary: 1px solid #777; +@border-color-input-binary-active: @background-color-input-binary-active; +@border-bottom-width-input-binary-hover: 3px; +@border-width-input-binary-focus: 2px; + // Theme mixins // Workaround for Safari 8 bug. Combining a selector like `input[type="checkbox"]:checked + span` diff --git a/src/themes/mediawiki/widgets.less b/src/themes/mediawiki/widgets.less index 70b6e7b..12d7ab6 100644 --- a/src/themes/mediawiki/widgets.less +++ b/src/themes/mediawiki/widgets.less @@ -343,7 +343,7 @@ .theme-oo-ui-checkboxInputWidget () { position: relative; - line-height: @input-size; + line-height: @size-input-binary; // Prevent the fake span from jumping to the next line of text white-space: nowrap; @@ -366,8 +366,8 @@ margin: 0; // Ensure the invisible input takes up the required width - width: @input-size; - height: @input-size; + width: @size-input-binary; + height: @size-input-binary; // Needed for Firefox mobile (See bug 71750 to workaround default Firefox stylesheet) max-width: none; @@ -378,10 +378,10 @@ position: absolute; left: 0; border-radius: @border-radius-default; - width: @input-size; - height: @input-size; + width: @size-input-binary; + height: @size-input-binary; background-color: white; - border: 1px solid @input-border-color; + border: @border-input-binary; .oo-ui-background-image-svg( '@{oo-ui-default-image-path}/icons/check-constructive' ); .oo-ui-background-image-safari( '@{oo-ui-default-image-path}/icons/check-constructive' ); background-repeat: no-repeat; @@ -395,17 +395,17 @@ } &:active + span { - background-color: @input-active-color; - border-color: @input-active-color; + background-color: @background-color-input-binary-active; + border-color: @border-color-input-binary-active; } &:focus + span { - border-width: @input-focus-border-width; + border-width: @border-width-input-binary-focus; } &:focus:hover + span, &:hover + span { - border-bottom-width: @input-hover-border-bottom-width; + border-bottom-width: @border-bottom-width-input-binary-hover; } &:disabled { @@ -459,7 +459,7 @@ .theme-oo-ui-radioInputWidget () { position: relative; - line-height: @input-size; + line-height: @size-input-binary; // Prevent the
[MediaWiki-commits] [Gerrit] Remove Babel check from showTermsList settings - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove Babel check from showTermsList settings .. Remove Babel check from showTermsList settings Bug: T124754 Change-Id: I301f26a307965de8f71142c70d5e374ed544a1ea --- M repo/Wikibase.hooks.php 1 file changed, 7 insertions(+), 13 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index 44840c2..0b4693c 100644 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -350,19 +350,13 @@ 'type' => 'api' ); - if ( class_exists( 'Babel' ) ) { - $preferences['wikibase-entitytermsview-showEntitytermslistview'] = array( - 'type' => 'toggle', - 'label-message' => 'wikibase-setting-entitytermsview-showEntitytermslistview', - 'help-message' => 'wikibase-setting-entitytermsview-showEntitytermslistview-help', - 'section' => 'rendering/advancedrendering', - 'default' => '1', - ); - } elseif ( $user->getBoolOption( 'wikibase-entitytermsview-showEntitytermslistview' ) ) { - // Clear setting after uninstalling Babel extension. - unset( $user->mOptions['wikibase-entitytermsview-showEntitytermslistview'] ); - $user->saveSettings(); - } + $preferences['wikibase-entitytermsview-showEntitytermslistview'] = array( + 'type' => 'toggle', + 'label-message' => 'wikibase-setting-entitytermsview-showEntitytermslistview', + 'help-message' => 'wikibase-setting-entitytermsview-showEntitytermslistview-help', + 'section' => 'rendering/advancedrendering', + 'default' => '1', + ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/266477 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I301f26a307965de8f71142c70d5e374ed544a1ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE)Gerrit-Reviewer: Adrian Lang Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New Wikidata Build - 2016-01-26T10:00:01+0000 - change (mediawiki...Wikidata)
WikidataBuilder has uploaded a new change for review. https://gerrit.wikimedia.org/r/266478 Change subject: New Wikidata Build - 2016-01-26T10:00:01+ .. New Wikidata Build - 2016-01-26T10:00:01+ Change-Id: I2f1b16ff103dba876493aa72f16a2d33f3f80879 --- M composer.lock M extensions/Wikibase/README.md M extensions/Wikibase/client/i18n/tt-cyrl.json M extensions/Wikibase/client/includes/Hooks/OtherProjectsSidebarGenerator.php M extensions/Wikibase/client/includes/LangLinkHandler.php M extensions/Wikibase/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php M extensions/Wikibase/docs/hooks.txt A extensions/Wikibase/docs/public-apis.wiki M extensions/Wikibase/lib/i18n/de.json M extensions/Wikibase/lib/i18n/en.json M extensions/Wikibase/lib/i18n/zh-hant.json M extensions/Wikibase/lib/tests/phpunit/EntityRevisionLookupTest.php M extensions/Wikibase/lib/tests/phpunit/changes/EntityChangeTest.php M extensions/Wikibase/repo/Wikibase.hooks.php M extensions/Wikibase/repo/i18n/el.json M extensions/Wikibase/repo/i18n/gd.json M extensions/Wikibase/repo/i18n/zh-hans.json M extensions/Wikibase/repo/includes/EditEntity.php M extensions/Wikibase/repo/includes/EditEntityFactory.php M extensions/Wikibase/repo/includes/Hooks/EditFilterHookRunner.php M extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php M extensions/Wikibase/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php M extensions/Wikibase/view/src/EntityTermsView.php M extensions/Wikibase/view/src/EntityViewPlaceholderExpander.php M extensions/Wikibase/view/tests/phpunit/EntityTermsViewTest.php M extensions/WikimediaBadges/WikimediaBadges.php M extensions/WikimediaBadges/composer.json R extensions/WikimediaBadges/includes/BeforePageDisplayHookHandler.php A extensions/WikimediaBadges/includes/OtherProjectsSidebarHookHandler.php A extensions/WikimediaBadges/tests/phpunit/includes/BeforePageDisplayHookHandlerTest.php A extensions/WikimediaBadges/tests/phpunit/includes/OtherProjectsSidebarHookHandlerTest.php M vendor/composer/autoload_classmap.php M vendor/composer/autoload_psr4.php M vendor/composer/installed.json 34 files changed, 863 insertions(+), 111 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/78/266478/1 diff --git a/composer.lock b/composer.lock index 44ae127..824c25e 100644 --- a/composer.lock +++ b/composer.lock @@ -1449,12 +1449,12 @@ "source": { "type": "git", "url": "https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -"reference": "b4111f6820ab6e1f6072d2b1bf4b3fddd3f775bd" +"reference": "53f56d3496a13a8ccb8c85ee4fb96001bac9b2c9" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/b4111f6820ab6e1f6072d2b1bf4b3fddd3f775bd;, -"reference": "b4111f6820ab6e1f6072d2b1bf4b3fddd3f775bd", +"url": "https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/53f56d3496a13a8ccb8c85ee4fb96001bac9b2c9;, +"reference": "53f56d3496a13a8ccb8c85ee4fb96001bac9b2c9", "shasum": "" }, "require": { @@ -1525,7 +1525,7 @@ "wikibaserepo", "wikidata" ], -"time": "2016-01-21 03:04:33" +"time": "2016-01-26 09:44:07" }, { "name": "wikibase/wikimedia-badges", @@ -1533,7 +1533,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/WikimediaBadges;, -"reference": "22cfee80965d12162f97405d38ed8ec32f56e59c" +"reference": "885441b2e0f3cab5f8b5731cf22581309dee2735" }, "require": { "php": ">=5.3.0" @@ -1543,9 +1543,9 @@ "files": [ "WikimediaBadges.php" ], -"classmap": [ -"WikimediaBadges.hooks.php" -] +"psr-4": { +"WikimediaBadges\\": "includes/" +} }, "license": [ "GNU GPL v2+" @@ -1567,7 +1567,7 @@ "support": { "irc": "irc://irc.freenode.net/wikidata" }, -"time": "2016-01-18 13:08:32" +"time": "2016-01-21 13:15:32" } ], "packages-dev": [], diff --git a/extensions/Wikibase/README.md b/extensions/Wikibase/README.md index 6a9cf38..51147d3 100644 --- a/extensions/Wikibase/README.md +++ b/extensions/Wikibase/README.md @@ -26,8 +26,6 @@ The lib bundles common code that is used by both the client and the repo. -Note that in
[MediaWiki-commits] [Gerrit] Remove multiple unused messages and make some grepable - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Remove multiple unused messages and make some grepable .. Remove multiple unused messages and make some grepable Change-Id: Ib18160290cab7c311c93900fb659337c2ec879f2 --- M Translate.php M TranslateHooks.php M i18n/core/en.json M i18n/pagetranslation/en.json M i18n/search/en.json M specials/SpecialManageGroups.php M specials/SpecialPageMigration.php M specials/SpecialSupportedLanguages.php M specials/SpecialTranslations.php M tag/PageTranslationLogFormatter.php M utils/TranslateSandbox.php M utils/UserToggles.php 12 files changed, 44 insertions(+), 11 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/Translate.php b/Translate.php index 3d4f559..111ab65 100644 --- a/Translate.php +++ b/Translate.php @@ -182,21 +182,32 @@ $wgHooks['DeleteAccount'][] = 'TranslateHooks::onDeleteAccount'; // New rights +// right-translate $wgAvailableRights[] = 'translate'; +// right-translate-import action-translate-import $wgAvailableRights[] = 'translate-import'; +// right-translate-manage action-translate-manage $wgAvailableRights[] = 'translate-manage'; +// right-translate-messagereview $wgAvailableRights[] = 'translate-messagereview'; +// right-translate-groupreview $wgAvailableRights[] = 'translate-groupreview'; +// right-translate-sandboxmanage action-translate-sandboxmanage $wgAvailableRights[] = 'translate-sandboxmanage'; // Logs. More logs are defined in TranslateHooks::setupTranslate +// log-name-translationreview log-descriptionmsg-translationreview $wgLogTypes[] = 'translationreview'; +// logentry-translationreview-message logentry-translationreview-group $wgLogActionsHandlers['translationreview/message'] = 'TranslateLogFormatter'; $wgLogActionsHandlers['translationreview/group'] = 'TranslateLogFormatter'; +// log-name-translatorsandbox log-description-translatorsandbox $wgLogTypes[] = 'translatorsandbox'; +// logentry-translatorsandbox-promoted logentry-translatorsandbox-rejected $wgLogActionsHandlers['translatorsandbox/promoted'] = 'TranslateLogFormatter'; $wgLogActionsHandlers['translatorsandbox/rejected'] = 'TranslateLogFormatter'; +// logentry-newusers-tsbpromoted $wgLogActionsHandlers['newusers/tsbpromoted'] = 'LogFormatter'; // New jobs diff --git a/TranslateHooks.php b/TranslateHooks.php index fcc671a..a2d1a6c 100644 --- a/TranslateHooks.php +++ b/TranslateHooks.php @@ -68,12 +68,21 @@ $wgSpecialPages['PageTranslation'] = 'SpecialPageTranslation'; $wgSpecialPages['PageTranslationDeletePage'] = 'SpecialPageTranslationDeletePage'; + // right-pagetranslation action-pagetranslation $wgAvailableRights[] = 'pagetranslation'; $wgSpecialPages['PageMigration'] = 'SpecialPageMigration'; $wgSpecialPages['PagePreparation'] = 'SpecialPagePreparation'; global $wgLogActionsHandlers, $wgLogTypes; + + // log-description-pagetranslation log-name-pagetranslation logentry-pagetranslation-mark + // logentry-pagetranslation-unmark logentry-pagetranslation-moveok + // logentry-pagetranslation-movenok logentry-pagetranslation-deletefok + // logentry-pagetranslation-deletefnok logentry-pagetranslation-deletelok + // logentry-pagetranslation-deletelnok logentry-pagetranslation-encourage + // logentry-pagetranslation-discourage logentry-pagetranslation-prioritylanguages + // logentry-pagetranslation-associate logentry-pagetranslation-dissociate $wgLogTypes[] = 'pagetranslation'; $wgLogActionsHandlers['pagetranslation/mark'] = 'PageTranslationLogFormatter'; $wgLogActionsHandlers['pagetranslation/unmark'] = 'PageTranslationLogFormatter'; diff --git a/i18n/core/en.json b/i18n/core/en.json index 75f0b4e..2b67253 100644 --- a/i18n/core/en.json +++ b/i18n/core/en.json @@ -36,7 +36,6 @@ "translate-page-navigation-legend": "Navigation", "translate-page-showing": "Showing messages from $1 to $2 of $3.", "translate-page-showing-all": "Showing $1 {{PLURAL:$1|message|messages}}.", - "translate-page-showing-none": "No messages to show.", "translate-page-paging-links": "[ $1 ] [ $2 ]", "translate-next": "Next page", "translate-prev": "Previous page", @@ -270,8 +269,6 @@ "translate-messagereview-no-fuzzy": "Fuzzy translations cannot be marked as reviewed.", "translate-messagereview-no-own": "You cannot mark your own translations as reviewed.", "translate-messagereview-doit": "Mark this translation as reviewed.", -
[MediaWiki-commits] [Gerrit] TitleInputWidget: Allow config to disable validation - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: TitleInputWidget: Allow config to disable validation .. TitleInputWidget: Allow config to disable validation Or to set it to something else, like 'non-empty'. Bug: T55613 Change-Id: I5e97604f0fc24176d5e89899bf0505dc442a1a7e --- M resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js b/resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js index fc1007e..101a606 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js @@ -16,13 +16,14 @@ * * @constructor * @cfg {boolean} [suggestions=true] Display search suggestions +* @cfg {RegExp|Function|string} [validate] Perform title validation */ mw.widgets.TitleInputWidget = function MwWidgetsTitleInputWidget( config ) { config = config || {}; // Parent constructor mw.widgets.TitleInputWidget.parent.call( this, $.extend( {}, config, { - validate: this.isQueryValid.bind( this ), + validate: config.validate !== undefined ? config.validate : this.isQueryValid.bind( this ), autocomplete: false } ) ); -- To view, visit https://gerrit.wikimedia.org/r/266446 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e97604f0fc24176d5e89899bf0505dc442a1a7e Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Alex MonkGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Edokter Gerrit-Reviewer: Esanders 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] Test for MutableContext in EditFilterHookRunner constructor - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Test for MutableContext in EditFilterHookRunner constructor .. Test for MutableContext in EditFilterHookRunner constructor This is a direct follow-up to the comments in I3e82e8f. The only difference this patch makes is the stack trace. Instead of triggering the warning on runtime (and possibly multiple times) it is now triggered on object creation. Change-Id: I566cf24cb1ed7fe721a744acc0d2121d39d82a1e --- M repo/includes/Hooks/EditFilterHookRunner.php 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/Hooks/EditFilterHookRunner.php b/repo/includes/Hooks/EditFilterHookRunner.php index 1de1a6d..8e199e5 100644 --- a/repo/includes/Hooks/EditFilterHookRunner.php +++ b/repo/includes/Hooks/EditFilterHookRunner.php @@ -38,7 +38,7 @@ private $entityContentFactory; /** -* @var IContextSource +* @var MutableContext */ private $context; @@ -52,6 +52,12 @@ EntityContentFactory $entityContentFactory, IContextSource $context ) { + if ( !( $context instanceof MutableContext ) ) { + wfLogWarning( '$context is not an instanceof MutableContext.' ); + + $context = new DerivativeContext( $context ); + } + $this->titleLookup = $titleLookup; $this->entityContentFactory = $entityContentFactory; $this->context = $context; @@ -131,12 +137,6 @@ // namespace IDs for Property entities. $namespace = $this->titleLookup->getNamespaceForType( $entityType ); $title = Title::makeTitle( $namespace, 'New' . ucfirst( $entityType ) ); - } - - if ( !( $context instanceof MutableContext ) ) { - wfLogWarning( '$context is not an instanceof MutableContext.' ); - - $context = new DerivativeContext( $context ); } $context->setTitle( $title ); -- To view, visit https://gerrit.wikimedia.org/r/263823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I566cf24cb1ed7fe721a744acc0d2121d39d82a1e Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE)Gerrit-Reviewer: Aude Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Thiemo Mättig (WMDE) 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 unused translate-edit-committed - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused translate-edit-committed .. Remove unused translate-edit-committed Change-Id: I80bd95bad7558f9871a50aa26cc08947b4c2a522 --- M i18n/core/en.json 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/core/en.json b/i18n/core/en.json index 75f0b4e..22f8793 100644 --- a/i18n/core/en.json +++ b/i18n/core/en.json @@ -54,7 +54,6 @@ "translate-edit-no-information": "This message has no documentation.\nIf you know where or how this message is used, you can help other translators by adding documentation to this message.", "translate-edit-information": "Information about message ($1)", "translate-edit-in-other-languages": "Message in other languages", - "translate-edit-committed": "Current translation in software", "translate-edit-warnings": "Warnings about incomplete translations", "translate-edit-tmsugs": "Suggestions from translation memories and machine translation", "translate-edit-tmmatch-source": "Translation source text: $1", -- To view, visit https://gerrit.wikimedia.org/r/266198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80bd95bad7558f9871a50aa26cc08947b4c2a522 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: NikerabbitGerrit-Reviewer: Siebrand 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 unused translate-tag-category - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused translate-tag-category .. Remove unused translate-tag-category Change-Id: I288075c3df08b0fec1a950b845f488b54c7163f2 --- M i18n/core/en.json 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/core/en.json b/i18n/core/en.json index 75f0b4e..9a46112 100644 --- a/i18n/core/en.json +++ b/i18n/core/en.json @@ -140,7 +140,6 @@ "translate-statsf-language": "Comma-separated list of language codes:", "translate-statsf-group": "Comma-separated list of group codes:", "translate-statsf-submit": "Preview", - "translate-tag-category": "Translatable pages", "translate-tag-page-desc": "Translation of the wiki page [[$2|$1]] from $3 ($4).", "translate-sidebar-alltrans": "In other languages", "translations": "All translations", -- To view, visit https://gerrit.wikimedia.org/r/266201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I288075c3df08b0fec1a950b845f488b54c7163f2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: NikerabbitGerrit-Reviewer: Siebrand 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 declension in grammar rules for Latin language - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix declension in grammar rules for Latin language .. Fix declension in grammar rules for Latin language On behalf of User:UV on la.wiki. Bug: T122022 Change-Id: Icc24b29558947989dc35468ea0f6e1741824cb58 --- M languages/classes/LanguageLa.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/classes/LanguageLa.php b/languages/classes/LanguageLa.php index e2dea1d..80cf694 100644 --- a/languages/classes/LanguageLa.php +++ b/languages/classes/LanguageLa.php @@ -53,7 +53,7 @@ '/u[ms]$/', # 2nd declension singular '/ommunia$/', # 3rd declension neuter plural (partly) '/a$/', # 1st declension singular - '/libri$/', '/nuntii$/',# 2nd declension plural (partly) + '/libri$/', '/nuntii$/', '/datae$/', # 2nd declension plural (partly) '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly) '/es$/' # 5th declension singular ); @@ -61,7 +61,7 @@ 'i', 'ommunium', 'ae', - 'librorum', 'nuntiorum', + 'librorum', 'nuntiorum', 'datorum', 'tionis', 'ntis', 'atis', 'ei' ); @@ -72,7 +72,7 @@ '/u[ms]$/', # 2nd declension singular '/a$/', # 1st declension singular '/ommuniam$/', # 3rd declension neuter plural (partly) - '/libri$/', '/nuntii$/',# 2nd declension plural (partly) + '/libri$/', '/nuntii$/', '/datam$/', # 2nd declension plural (partly) '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly) '/es$/' # 5th declension singular ); @@ -80,7 +80,7 @@ 'um', 'am', 'ommunia', - 'libros', 'nuntios', + 'libros', 'nuntios', 'data', 'tionem', 'ntem', 'atem', 'em' ); @@ -91,7 +91,7 @@ '/u[ms]$/', # 2nd declension singular '/ommunia$/', # 3rd declension neuter plural (partly) '/a$/', # 1st declension singular - '/libri$/', '/nuntii$/',# 2nd declension plural (partly) + '/libri$/', '/nuntii$/', '/data$/', # 2nd declension plural (partly) '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly) '/es$/' # 5th declension singular ); @@ -99,7 +99,7 @@ 'o', 'ommunibus', 'a', - 'libris', 'nuntiis', + 'libris', 'nuntiis', 'datis', 'tione', 'nte', 'ate', 'e' ); -- To view, visit https://gerrit.wikimedia.org/r/260426 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc24b29558947989dc35468ea0f6e1741824cb58 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ebe123Gerrit-Reviewer: Ebe123 Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Drop --verbose from castor rsync calls - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/266485 Change subject: Drop --verbose from castor rsync calls .. Drop --verbose from castor rsync calls The verbosity is annoying and fills up the console output. Dropping it. Update: castor-save integration-config-tox-dib-jessie integration-jjb-config-diff npm-node-4.2 operations-puppet-tox-pep8-jessie operations-puppet-tox-py27-jessie pywikibot-core-tox-nose-jessie pywikibot-core-tox-nose34-jessie pywikibot-wikibase-tox-flake8-py3-jessie pywikibot-wikibase-tox-nose-jessie pywikibot-wikibase-tox-nose34-jessie rake-jessie tox-doc-jessie tox-flake8-bin-jessie tox-flake8-jessie tox-jessie tox-py27-jessie tox-py34-jessie Change-Id: I4f26a9c5771cc8898508f8aed2d372c7ee35cdc2 --- M jjb/castor.yaml 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/85/266485/1 diff --git a/jjb/castor.yaml b/jjb/castor.yaml index ccfe8df..9a38add 100644 --- a/jjb/castor.yaml +++ b/jjb/castor.yaml @@ -54,7 +54,6 @@ echo "Syncing..." rsync \ --archive \ - --verbose \ --compress \ --contimeout 3 \ rsync://castor.integration.eqiad.wmflabs:/caches/${CASTOR_NAMESPACE}/ $HOME \ @@ -128,7 +127,6 @@ echo -e "Syncing cache\nFrom.. ${REMOTE_INSTANCE}\nTo ${DEST}" rsync \ --archive \ - --verbose \ --compress \ --rsh="ssh -a -T -o ConnectTimeout=6 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" \ --delete-delay \ -- To view, visit https://gerrit.wikimedia.org/r/266485 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f26a9c5771cc8898508f8aed2d372c7ee35cdc2 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Configure tox job for Jenkins - change (labs...ptable)
jenkins-bot has submitted this change and it was merged. Change subject: Configure tox job for Jenkins .. Configure tox job for Jenkins Change-Id: I4702e45f687de5444fb6ee312b38e66a2ce5b9a5 --- M tox.ini 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/tox.ini b/tox.ini index 6378111..edd51b9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,3 +1,11 @@ +[tox] +skipsdist = True +envlist = flake8 + +[testenv:flake8] +commands = flake8 +deps = flake8 + [flake8] max_line_length = 100 -- To view, visit https://gerrit.wikimedia.org/r/265544 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4702e45f687de5444fb6ee312b38e66a2ce5b9a5 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/ptable Gerrit-Branch: master Gerrit-Owner: RicordisamoaGerrit-Reviewer: Hashar Gerrit-Reviewer: Ricordisamoa Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Notify wikimedia-perf when WebPageTest fails - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Notify wikimedia-perf when WebPageTest fails .. Notify wikimedia-perf when WebPageTest fails Lets notify #wikimedia-perf on IRC when WebPageTest fails so it's easier for us to take action when there's problem with the environment. Change-Id: I2362513d9ebead7d88bcd9c5eca1e0beb4ffac3a --- M jjb/misc.yaml 1 file changed, 19 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/misc.yaml b/jjb/misc.yaml index bfd7ac3..c4b08c7 100644 --- a/jjb/misc.yaml +++ b/jjb/misc.yaml @@ -234,6 +234,7 @@ RESULT+=$? exit $RESULT publishers: + - webpagetest-irc - workspace-cleanup - job: @@ -286,7 +287,25 @@ RESULT+=$? exit $RESULT publishers: + - webpagetest-irc - workspace-cleanup + +- publisher: +name: webpagetest-irc +publishers: + - ircbot: + strategy: new-failure-and-fixed + notify-start: false + notify-committers: false + notify-culprits: false + notify-upstream: false + notify-fixers: false + message-type: 'summary' + matrix-notifier: only-parent + channels: +- name: '#wikimedia-perf' + notify-only: true + - job: name: 'fail-archived-repositories' -- To view, visit https://gerrit.wikimedia.org/r/265631 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2362513d9ebead7d88bcd9c5eca1e0beb4ffac3a Gerrit-PatchSet: 6 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: PhedenskogGerrit-Reviewer: Hashar 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] Extend compounded form in widget.js demo - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: Extend compounded form in widget.js demo .. Extend compounded form in widget.js demo Extending `widget.js` demo by adding widgets to compounded form at the end in preparation for tackling T115293 widgets' focus states. Change-Id: I980b3707eab3d1e4dbbc867d17837650928e2b98 --- M demos/pages/widgets.js 1 file changed, 76 insertions(+), 2 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js index ed16c0b..a599ae4 100644 --- a/demos/pages/widgets.js +++ b/demos/pages/widgets.js @@ -1480,7 +1480,7 @@ label: new OO.ui.HtmlSnippet( 'Fancy text formatting!' ) } ), { - label: 'LabelWidget (with html)\u200E', + label: 'LabelWidget (with HTML)\u200E', align: 'top' } ), @@ -1757,7 +1757,7 @@ action: 'widgets.php', items: [ new OO.ui.FieldsetLayout( { - label: 'Form layout', + label: 'Form layout (compounded example)', items: [ new OO.ui.FieldLayout( new OO.ui.TextInputWidget( { @@ -1776,6 +1776,73 @@ { label: 'Password', align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.ButtonSelectWidget( { + items: [ + new OO.ui.ButtonOptionWidget( { + label: 'One' + } ), + new OO.ui.ButtonOptionWidget( { + label: 'Two' + } ), + new OO.ui.ButtonOptionWidget( { + indicator: 'required', + label: 'Three' + } ) + ] + } ), + { + label: 'Select one of multiple ButtonSelectWidget Buttons', + align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.SelectFileWidget( {} ), + { + label: 'Select a file with SelectFileWidget\u200E', + align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.CapsuleMultiSelectWidget( { + menu: { + items: [ + new OO.ui.MenuOptionWidget( { data: 'abc', label: 'Abc Label' } ), + new OO.ui.MenuOptionWidget( { data: 'def', label: 'Def Label' } ), +
[MediaWiki-commits] [Gerrit] Create a more neutral warning message *visualeditor-viewpage... - change (mediawiki...VisualEditor)
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/266656 Change subject: Create a more neutral warning message *visualeditor-viewpage-savewarning .. Create a more neutral warning message *visualeditor-viewpage-savewarning Bug: T121754 Change-Id: Ibc1ba697081e60b8a797f5ea1b814a320ba812c3 --- M modules/ve-mw/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/56/266656/1 diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json index 7ae811a..50bbfd6 100644 --- a/modules/ve-mw/i18n/en.json +++ b/modules/ve-mw/i18n/en.json @@ -341,7 +341,7 @@ "visualeditor-toolbar-savedialog-short": "Save", "visualeditor-usernamespacepagelink": "Project:User namespace", "visualeditor-version-label": "Version", - "visualeditor-viewpage-savewarning": "Are you sure you want to go back to view mode without saving first?", + "visualeditor-viewpage-savewarning": "Are you sure you want to quit editing mode without saving first?", "visualeditor-viewpage-savewarning-discard": "Discard edits", "visualeditor-viewpage-savewarning-keep": "Continue editing", "visualeditor-viewpage-savewarning-title": "Are you sure?", -- To view, visit https://gerrit.wikimedia.org/r/266656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc1ba697081e60b8a797f5ea1b814a320ba812c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: MtDu___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update cxserver to e44f482 - change (mediawiki...deploy)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/24 Change subject: Update cxserver to e44f482 .. Update cxserver to e44f482 Changes: * e44f482 Merge "Stop setting the form data to rawBody" |\ | * 04ea444 Stop setting the form data to rawBody * | 3593903 Fix npm link command * | b3a4196 config: Add all available source languages for Russian in Yandex MT Change-Id: I44d71278162efa69db63923eec4e7035188f4605 --- M src 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver/deploy refs/changes/64/24/1 diff --git a/src b/src index 942ee24..e44f482 16 --- a/src +++ b/src -Subproject commit 942ee243b6413d824da0cdf6a04625c76995d7c8 +Subproject commit e44f48268c10e74a524e7bb5f6a11ccb985b3e40 -- To view, visit https://gerrit.wikimedia.org/r/24 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44d71278162efa69db63923eec4e7035188f4605 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver/deploy Gerrit-Branch: master Gerrit-Owner: KartikMistry___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use correct selector syntax in QUnit test - change (mediawiki...MobileFrontend)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/27 Change subject: Use correct selector syntax in QUnit test .. Use correct selector syntax in QUnit test Bug: T124806 Change-Id: I90917295886503b9986f52bc3d44c042b298a94d --- M tests/qunit/mobile.toggle/test_toggle.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/67/27/1 diff --git a/tests/qunit/mobile.toggle/test_toggle.js b/tests/qunit/mobile.toggle/test_toggle.js index 1612751..65f321d 100644 --- a/tests/qunit/mobile.toggle/test_toggle.js +++ b/tests/qunit/mobile.toggle/test_toggle.js @@ -55,7 +55,7 @@ } ); QUnit.test( 'Clicking hash links', 2, function ( assert ) { - this.$container.find( '[href=#First_Section]' ).trigger( 'click' ); + this.$container.find( '[href="#First_Section"]' ).trigger( 'click' ); assert.strictEqual( this.$container.find( '.collapsible-block' ).eq( 0 ).hasClass( 'open-block' ), true, 'check content is visible' ); assert.strictEqual( this.$section0.hasClass( 'open-block' ), true, 'check section is open' ); } ); -- To view, visit https://gerrit.wikimedia.org/r/27 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90917295886503b9986f52bc3d44c042b298a94d 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] Fix typo in comment - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Fix typo in comment .. Fix typo in comment Change-Id: I4e25e729138cefa85fe34e11c77882d5d013fbc1 --- M specials/SpecialContentTranslation.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php index 1d03d38..383ebe1 100644 --- a/specials/SpecialContentTranslation.php +++ b/specials/SpecialContentTranslation.php @@ -40,7 +40,7 @@ global $wgContentTranslationCampaigns; if ( $this->getUser()->isAnon() ) { - // Campigns are only for logged in users. + // Campaigns are only for logged in users. return false; } return $campaign !== null -- To view, visit https://gerrit.wikimedia.org/r/29 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e25e729138cefa85fe34e11c77882d5d013fbc1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: NikerabbitGerrit-Reviewer: Santhosh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduce replica count for commonswiki_file in codfw - change (operations/mediawiki-config)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/266658 Change subject: Reduce replica count for commonswiki_file in codfw .. Reduce replica count for commonswiki_file in codfw Missed this one when writing the unit test to verify shard counts. Should be ok reducing to 2 replicas and save having to reindex. Change-Id: I57104b666aa5fb697a40c9a7864223b59cbe19a2 --- M tests/cirrusTest.php M wmf-config/InitialiseSettings.php 2 files changed, 13 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/58/266658/1 diff --git a/tests/cirrusTest.php b/tests/cirrusTest.php index 89a678e..4e71e64 100644 --- a/tests/cirrusTest.php +++ b/tests/cirrusTest.php @@ -146,16 +146,20 @@ } } $wikis = array_unique( $wikis ); - $indexTypes = array( 'content', 'general', 'titlesuggest' ); + $indexTypes = array( 'content', 'general', 'titlesuggest', 'file' ); $clusters = array( 'eqiad' => 31, 'codfw' => 24 ); $tests = array(); foreach ( $wikis as $wiki ) { foreach ( $indexTypes as $indexType ) { + // only commonswiki has the file index + if ( $indexType === 'file' && $wiki !== 'commonswiki' ) { + continue; + } + // wikidata doesn't have completion suggester + if ( $wiki === 'wikidatawiki' && $indexType === 'titlesuggest' ) { + continue; + } foreach ( $clusters as $clusterName => $numServers ) { - // wikidata doesn't have completion suggester - if ( $wiki === 'wikidatawiki' && $indexType === 'titlesuggest' ) { - continue; - } $tests["$clusterName {$wiki}_{$indexType}"] = array( $wiki, $indexType, diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index a0b98c8..49a456f 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -15805,7 +15805,10 @@ // some of the larger ones will want more replicas for content indexes 'wmgCirrusSearchReplicas' => array( 'default' => array( 'content' => '0-2', 'general' => '0-2', 'titlesuggest' => '0-2' ), - '+commonswiki' => array( 'file' => '0-3' ), + 'commonswiki' => array( + 'eqiad' => array( 'content' => '0-4', 'general' => '0-3', 'titlesuggest' => '0-2', 'file' => '0-3' ), + 'codfw' => array( 'content' => '0-3', 'general' => '0-2', 'titlesuggest' => '0-2', 'file' => '0-2' ), + ), 'enwiki' => array( 'eqiad' => array( 'content' => '0-4', 'general' => '0-3', 'titlesuggest' => '0-2' ), 'codfw' => array( 'content' => '0-3', 'general' => '0-2', 'titlesuggest' => '0-2' ), -- To view, visit https://gerrit.wikimedia.org/r/266658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I57104b666aa5fb697a40c9a7864223b59cbe19a2 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo in comment - change (mediawiki...ContentTranslation)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/29 Change subject: Fix typo in comment .. Fix typo in comment Change-Id: I4e25e729138cefa85fe34e11c77882d5d013fbc1 --- M specials/SpecialContentTranslation.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/69/29/1 diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php index 1d03d38..383ebe1 100644 --- a/specials/SpecialContentTranslation.php +++ b/specials/SpecialContentTranslation.php @@ -40,7 +40,7 @@ global $wgContentTranslationCampaigns; if ( $this->getUser()->isAnon() ) { - // Campigns are only for logged in users. + // Campaigns are only for logged in users. return false; } return $campaign !== null -- To view, visit https://gerrit.wikimedia.org/r/29 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e25e729138cefa85fe34e11c77882d5d013fbc1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow access to graphite/events/get_data - change (operations/puppet)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/23 Change subject: Allow access to graphite/events/get_data .. Allow access to graphite/events/get_data Named and tagged events, such as a deployment, can pushed into graphite and then shown in grafana using the 'Annotations' settings. These need to be able to access https://graphite.wikimedia.org/events/get_data to work though. This makes those events accessible similar to the existing render. Change-Id: I0f9d2c13d0ee7772619ae418832568664d4802cc --- M templates/graphite/graphite.apache.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/63/23/1 diff --git a/templates/graphite/graphite.apache.erb b/templates/graphite/graphite.apache.erb index 966a56c..65192c5 100644 --- a/templates/graphite/graphite.apache.erb +++ b/templates/graphite/graphite.apache.erb @@ -15,7 +15,7 @@ SetHandler uwsgi-handler - + Satisfy Any Allow from all -- To view, visit https://gerrit.wikimedia.org/r/23 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f9d2c13d0ee7772619ae418832568664d4802cc 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] [WIP] Templatize Special:Contributions lines - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/22 Change subject: [WIP] Templatize Special:Contributions lines .. [WIP] Templatize Special:Contributions lines Bug: T122537 Change-Id: I11aac43de495881e10e393d075a231bd346ea547 --- M includes/specials/SpecialContributions.php 1 file changed, 24 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/22/1 diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 1a1b490..46c1f90 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -1095,16 +1095,13 @@ $userlink = ''; } + $flags = array(); if ( $rev->getParentId() === 0 ) { - $nflag = ChangesList::flag( 'newpage' ); - } else { - $nflag = ''; + $flags[] = ChangesList::flag( 'newpage' ); } if ( $rev->isMinor() ) { - $mflag = ChangesList::flag( 'minor' ); - } else { - $mflag = ''; + $flags[] = ChangesList::flag( 'minor' ); } $del = Linker::getRevDeleteLink( $user, $rev, $page ); @@ -1115,15 +1112,6 @@ $diffHistLinks = $this->msg( 'parentheses' ) ->rawParams( $difftext . $this->messages['pipe-separator'] . $histlink ) ->escaped(); - $ret = "{$del}{$d} {$diffHistLinks}{$chardiff}{$nflag}{$mflag} "; - $ret .= "{$link}{$userlink} {$comment} {$topmarktext}"; - - # Denote if username is redacted for this edit - if ( $rev->isDeleted( Revision::DELETED_USER ) ) { - $ret .= " " . - $this->msg( 'rev-deleted-user-contribs' )->escaped() . - ""; - } # Tags, if any. list( $tagSummary, $newClasses ) = ChangeTags::formatSummaryRow( @@ -1131,7 +1119,27 @@ 'contributions' ); $classes = array_merge( $classes, $newClasses ); - $ret .= " $tagSummary"; + + $templateParams = array( + 'articleLink' => $link, + 'charDifference' => $chardiff, + 'classes' => $classes, + 'diffHistLinks' => $diffHistLinks, + 'flags' => implode( '', $flags ), + 'logText' => $comment, + 'revDeleteLink' => $del, + 'rev-deleted-user-contribs' => $revDeletedMsg, + 'tagSummary' => $tagSummary, + 'timestamp' => $d, + 'topmarktext' => $topmarktext, + 'userlink' => $userlink, + ); + + # Denote if username is redacted for this edit + if ( $rev->isDeleted( Revision::DELETED_USER ) ) { + $templateParams['rev-deleted-user-contribs'] = + $this->msg( 'rev-deleted-user-contribs' )->escaped(); + } } // Let extensions add data -- To view, visit https://gerrit.wikimedia.org/r/22 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11aac43de495881e10e393d075a231bd346ea547 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rework transferToES.py to send to wikis sequentially - change (wikimedia...analytics)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/25 Change subject: Rework transferToES.py to send to wikis sequentially .. Rework transferToES.py to send to wikis sequentially The prior implementation of transferToES.py would send to whichever wiki it had enough items to send to. This works but pushes the elasticsearch cluster pretty hard, causing it to create segments in many different indices at the same time. This version reworks to use sort(project) which guarantees that each project will be wholly contained within a single partition. It then iterates that segment sending batches. This ensures that each worker is continuously sending documents to the same index and reduces the spread of segment creation, reducing load on the ES cluster. The one downside of this is that foreachPartition() brings the entire partition into memory, so the executors have to be sized such that any executor can hold the entirety of whichever wiki has the most scores to be sent. In the scheme of things this means using 15G of memory for the job, which is 1% of total hadoop memory. It seems small enough to be worthwhile. Change-Id: Id49b74f5ce56ac8c845fd23798500d0476946500 --- M oozie/transfer_to_es/bundle.properties M oozie/transfer_to_es/transferToES.py M oozie/transfer_to_es/workflow.xml 3 files changed, 19 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/analytics refs/changes/65/25/1 diff --git a/oozie/transfer_to_es/bundle.properties b/oozie/transfer_to_es/bundle.properties index 8fe3dc9..b949ed3 100644 --- a/oozie/transfer_to_es/bundle.properties +++ b/oozie/transfer_to_es/bundle.properties @@ -58,9 +58,10 @@ # when spark alocates this resource. This partially controls the amount # of concurrency between the hadoop cluster and the elasticsearch cluster # during export. -spark_number_executors= 1 -spark_executor_memory = 1G +spark_number_executors= 3 +spark_executor_memory = 5G spark_driver_memory = 1G +spark_sql_shuffle_partitions = 30 # Coordintator to start. oozie.bundle.application.path = ${discovery_oozie_directory}/transfer_to_es/bundle.xml diff --git a/oozie/transfer_to_es/transferToES.py b/oozie/transfer_to_es/transferToES.py index 84fe45d..d3740c7 100644 --- a/oozie/transfer_to_es/transferToES.py +++ b/oozie/transfer_to_es/transferToES.py @@ -119,37 +119,25 @@ if not sendDataToES(data, url): failedDocumentCounter.add(len(documents)) -def addToList(listNow, element): +def groupAndSend(rows): """ -Add element to list, will send the data out once batch is full +Group together documents from the same project and batch them +to elasticsearch """ -if len(listNow) < ITEMS_PER_BATCH: -return listNow + [element] -# Treshold reached, send the list out -sendDocumentsToES(listNow) -return [element] - -def mergeLists(listOne, listTwo): -""" -Merge two lists, will send the data out once batch is full -""" -newList = listOne + listTwo -if len(newList) < ITEMS_PER_BATCH: -return newList -sendDocumentsToES(newList) -return [] - -def sendCombined(data): -""" -Send data for the key (hostname) to ES -""" -sendDocumentsToES(data[1]) +group = [] +for row in rows: +if len(group) > 0 and group[0].project != row.project: +sendDocumentsToES(group) +group = [] +group.append(row) +if len(group) >= ITEMS_PER_BATCH: +sendDocumentsToES(group) +group = [] +if len(group) > 0: +sendDocumentsToES(group) data = sqlContext.load(SOURCE) # print "Count: %d\n" % data.count() -# Here's what is going on here: we combine the data by project, -# and when the list of projects reaches ITEMS_PER_BATCH we send them out -# The foreach() part will send out the ones that remained -data.map(lambda x: (x.project, x)).combineByKey(lambda x: [x], addToList, mergeLists).foreach(sendCombined) +data.sort(data.project).foreachPartition(groupAndSend) print "%d documents processed, %d failed." % (documentCounter.value, failedDocumentCounter.value,) print "%d requests successful, %d requests failed." % (updateCounter.value, errorCounter.value) diff --git a/oozie/transfer_to_es/workflow.xml b/oozie/transfer_to_es/workflow.xml index 43e967f..5b00729 100644 --- a/oozie/transfer_to_es/workflow.xml +++ b/oozie/transfer_to_es/workflow.xml @@ -122,7 +122,7 @@ cluster Discovery Transfer To ${elasticsearch_url} ${pyspark_transfer_to_es_script} ---conf
[MediaWiki-commits] [Gerrit] Suggestions: Capture the list type for the campaign identifier - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/26 Change subject: Suggestions: Capture the list type for the campaign identifier .. Suggestions: Capture the list type for the campaign identifier This helps to do more fine grained analysis of suggestion acceptance. Bug: T124490 Change-Id: I6beb95ba078056be80180811b800ecebb8292c47 --- M modules/dashboard/ext.cx.suggestionlist.js 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/66/26/1 diff --git a/modules/dashboard/ext.cx.suggestionlist.js b/modules/dashboard/ext.cx.suggestionlist.js index 46f5a87..32c5c28 100644 --- a/modules/dashboard/ext.cx.suggestionlist.js +++ b/modules/dashboard/ext.cx.suggestionlist.js @@ -709,8 +709,10 @@ * Event handlers */ CXSuggestionList.prototype.listen = function () { + var self = this; + this.$suggestionsContainer.on( 'click', '.cx-suggestionlist .cx-slitem', function () { - var cxSelector, suggestion; + var cxSelector, suggestion, campaign; cxSelector = $( this ).data( 'cxsourceselector' ); @@ -718,11 +720,13 @@ cxSelector.prefill(); } else { suggestion = $( this ).find( '.cx-slitem__translation-link' ).data( 'suggestion' ); + // Capture the list type for the campaign identifier + campaign = 'suggestions-type-' + self.lists[ suggestion.listId ].type; $( this ).cxSourceSelector( { sourceLanguage: suggestion.sourceLanguage, targetLanguage: suggestion.targetLanguage, sourceTitle: suggestion.title, - campaign: 'suggestions' + campaign: campaign } ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/26 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6beb95ba078056be80180811b800ecebb8292c47 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add application=CX in the requests to recommendation tool - change (mediawiki...ContentTranslation)
Nikerabbit has submitted this change and it was merged. Change subject: Add application=CX in the requests to recommendation tool .. Add application=CX in the requests to recommendation tool Bug: T124494 Change-Id: Iea4a586c1a8251cbb3954156a6b842faae8fc39a --- M modules/dashboard/ext.cx.recommendtool.client.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/dashboard/ext.cx.recommendtool.client.js b/modules/dashboard/ext.cx.recommendtool.client.js index 9db58d8..caa8bc1 100644 --- a/modules/dashboard/ext.cx.recommendtool.client.js +++ b/modules/dashboard/ext.cx.recommendtool.client.js @@ -76,7 +76,8 @@ s: self.sourceLanguage, t: self.targetLanguage, article: seedPages.join( '|' ), - search: algorithm + search: algorithm, + application: 'CX' } ).then( function ( response ) { return self.adapt( response.articles, algorithm ); } ); -- To view, visit https://gerrit.wikimedia.org/r/266657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea4a586c1a8251cbb3954156a6b842faae8fc39a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: SanthoshGerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Santhosh 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 hook to modify Special:Contributions lines - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/266670 Change subject: Add hook to modify Special:Contributions lines .. Add hook to modify Special:Contributions lines This gives finer-grained extensibility than the current ContributionsLineEnding hook. Change-Id: Ifca9f3f3b838a2915152f0200624ef40ee3f8a19 --- M docs/hooks.txt M includes/specials/SpecialContributions.php 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/70/266670/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index 9aacaa9..5e6d9ff 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2793,6 +2793,12 @@ $user: User object representing user contributions are being fetched for $sp: SpecialPage instance, providing context +'SpecialContributions::formatRow::flags': Called before rendering a +Special:Contributions row. +$pager: ContribsPager object, for context +$row: Revision information from the database +&$flags: List of flags on this row + 'SpecialContributions::getForm::filters': Called with a list of filters to render on Special:Contributions. $sp: SpecialContributions object, for context diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 68d934a..7ad9cf7 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -1120,6 +1120,8 @@ ); $classes = array_merge( $classes, $newClasses ); + Hooks::run( 'SpecialContributions::formatRow::flags', array( $this, $row, &$flags ) ); + $templateParams = array( 'articleLink' => $link, 'charDifference' => $chardiff, -- To view, visit https://gerrit.wikimedia.org/r/266670 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifca9f3f3b838a2915152f0200624ef40ee3f8a19 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preserve certain keys when updating central session - change (mediawiki...CentralAuth)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/266672 Change subject: Preserve certain keys when updating central session .. Preserve certain keys when updating central session If the central session is updated without dirtying the MediaWiki\Session\Session, these essential keys get lost which breaks logins in some cases. Bug: T124821 Change-Id: I0d2b07af2d946cf730c6a8da5841b904c62b1c3f (cherry picked from commit aaca722f29e2f2908ac93982a2fa4e0ce4286b5c) --- M includes/CentralAuthUtils.php 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/72/266672/1 diff --git a/includes/CentralAuthUtils.php b/includes/CentralAuthUtils.php index 6a7417c..80d128f 100644 --- a/includes/CentralAuthUtils.php +++ b/includes/CentralAuthUtils.php @@ -177,6 +177,8 @@ public static function setCentralSession( array $data, $reset = false, $session = null ) { global $wgCentralAuthCookies, $wgCentralAuthCookiePrefix; + static $keepKeys = array( 'user' => true, 'token' => true, 'expiry' => true ); + if ( class_exists( 'MediaWiki\\Session\\Session' ) ) { if ( $session === null ) { $session = MediaWiki\Session\SessionManager::getGlobalSession(); @@ -197,6 +199,13 @@ } $data['sessionId'] = $id; $key = CentralAuthUtils::memcKey( 'session', $id ); + + // Copy certain keys from the existing session, if any (T124821) + $existing = CentralAuthUtils::getSessionCache()->get( $key ); + if ( is_array( $existing ) ) { + $data += array_intersect_key( $existing, $keepKeys ); + } + $stime = microtime( true ); CentralAuthUtils::getSessionCache()->set( $key, $data, 86400 ); $real = microtime( true ) - $stime; -- To view, visit https://gerrit.wikimedia.org/r/266672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d2b07af2d946cf730c6a8da5841b904c62b1c3f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: wmf/1.27.0-wmf.11 Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Anomie ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New hook for filters on Special:Contributions form - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/266659 Change subject: New hook for filters on Special:Contributions form .. New hook for filters on Special:Contributions form Bug: T124857 Change-Id: I56a3f13e202f832c5c18c92f3ff899f032f2 --- M docs/hooks.txt M includes/specials/SpecialContributions.php 2 files changed, 17 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/59/266659/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index 2b5e1e0..9aacaa9 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2793,6 +2793,11 @@ $user: User object representing user contributions are being fetched for $sp: SpecialPage instance, providing context +'SpecialContributions::getForm::filters': Called with a list of filters to render +on Special:Contributions. +$sp: SpecialContributions object, for context +&$filters: List of filters rendered as HTML + 'SpecialListusersDefaultQuery': Called right before the end of UsersPager::getDefaultQuery(). $pager: The UsersPager instance diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index ab6614b..1a1b490 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -571,8 +571,10 @@ ) ); + $filters = array(); + if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) { - $deletedOnlyCheck = Html::rawElement( + $filters[] = Html::rawElement( 'span', array( 'class' => 'mw-input-with-label' ), Xml::checkLabel( @@ -583,11 +585,9 @@ array( 'class' => 'mw-input' ) ) ); - } else { - $deletedOnlyCheck = ''; } - $checkLabelTopOnly = Html::rawElement( + $filters[] = Html::rawElement( 'span', array( 'class' => 'mw-input-with-label' ), Xml::checkLabel( @@ -598,7 +598,7 @@ array( 'class' => 'mw-input' ) ) ); - $checkLabelNewOnly = Html::rawElement( + $filters[] = Html::rawElement( 'span', array( 'class' => 'mw-input-with-label' ), Xml::checkLabel( @@ -609,10 +609,16 @@ array( 'class' => 'mw-input' ) ) ); + + Hooks::run( + 'SpecialContributions::getForm::filters', + array( $this, &$filters ) + ); + $extraOptions = Html::rawElement( 'td', array( 'colspan' => 2 ), - $deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly + implode( '', $filters ) ); $dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ), -- To view, visit https://gerrit.wikimedia.org/r/266659 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56a3f13e202f832c5c18c92f3ff899f032f2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add application=CX in the requests to recommendation tool - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/266657 Change subject: Add application=CX in the requests to recommendation tool .. Add application=CX in the requests to recommendation tool Bug: T124494 Change-Id: Iea4a586c1a8251cbb3954156a6b842faae8fc39a --- M modules/dashboard/ext.cx.recommendtool.client.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/57/266657/1 diff --git a/modules/dashboard/ext.cx.recommendtool.client.js b/modules/dashboard/ext.cx.recommendtool.client.js index 9db58d8..caa8bc1 100644 --- a/modules/dashboard/ext.cx.recommendtool.client.js +++ b/modules/dashboard/ext.cx.recommendtool.client.js @@ -76,7 +76,8 @@ s: self.sourceLanguage, t: self.targetLanguage, article: seedPages.join( '|' ), - search: algorithm + search: algorithm, + application: 'CX' } ).then( function ( response ) { return self.adapt( response.articles, algorithm ); } ); -- To view, visit https://gerrit.wikimedia.org/r/266657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea4a586c1a8251cbb3954156a6b842faae8fc39a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] TemplateDataBlob: avoid reencoding json - change (mediawiki...TemplateData)
Cenarium has uploaded a new change for review. https://gerrit.wikimedia.org/r/21 Change subject: TemplateDataBlob: avoid reencoding json .. TemplateDataBlob: avoid reencoding json When a TemplateDataBlob is created from json and there is no status error, the json is saved in-class to avoid having to reencode it from the data. Change-Id: I3976e48b9c2cc914960271485e7c8c59ba36aa57 --- M TemplateDataBlob.php 1 file changed, 17 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData refs/changes/61/21/1 diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index e1a8371..5a54151 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -21,6 +21,11 @@ private $data; /** +* @var string +*/ + private $json; + + /** * @var Status: Cache of TemplateDataBlob::parse */ private $status; @@ -50,6 +55,9 @@ $tdb->data->format = 'inline'; $tdb->data->sets = array(); $tdb->data->maps = new stdClass(); + } else { + // data is unchanged so no need to reencode json + $tdb->json = $json; } $tdb->status = $status; return $tdb; @@ -602,8 +610,8 @@ * @return object */ public function getData() { - // TODO: Returned by reference. Data is a private member. Use clone instead? - return $this->data; + // Return deep clone so callers don't modify data (thus json is unchanged) + return unserialize( serialize( $this->data ) ); } /** @@ -616,7 +624,7 @@ public function getDataInLanguage( $langCode ) { // Deep clone, also need to clone ->params and all interfacetext objects // within param properties. - $data = unserialize( serialize( $this->data ) ); + $data = $this->getData(); // Root.description if ( $data->description !== null ) { @@ -667,7 +675,11 @@ * @return string JSON */ public function getJSON() { - return json_encode( $this->data ); + if ( $this->json === null ) { + // if json is not provided, retrieve it from data + $this->json = json_encode( $this->data ); + } + return $this->json; } /** @@ -859,6 +871,7 @@ private function __construct( $data = null ) { $this->data = $data; + $this->json = null; } } -- To view, visit https://gerrit.wikimedia.org/r/21 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3976e48b9c2cc914960271485e7c8c59ba36aa57 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateData Gerrit-Branch: master Gerrit-Owner: Cenarium___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Beta: Add cxserver registry to Beta - change (operations/puppet)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/28 Change subject: Beta: Add cxserver registry to Beta .. Beta: Add cxserver registry to Beta We still have to figure out how-to use registry from cxserver repository, until that, use this method. Change-Id: I17b6bf49cbb3b352e52f261ac35cf63569893855 --- M hieradata/labs/deployment-prep/common.yaml 1 file changed, 817 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/68/28/1 diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 2751397..5296e56 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -115,6 +115,823 @@ "cxserver::proxy": deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080 "cxserver::yandex_url": https://translate.yandex.net "cxserver::restbase_url": http://deployment-restbase02.deployment-prep.eqiad.wmflabs:7231/@lang.wikipedia.beta.wmflabs.org/api/rest_v1/page/html/@title +"cxserver::registry": + source: +- ab +- ace +- af + - ak + - am +- ang +- an +- arc +- ar +- arz +- ast +- as +- av +- ay +- az +- bar +- ba +- bcl +- be-tarask +- be +- bg +- bho +- bi +- bjn +- bm +- bn +- bo +- bpy +- br +- bs +- bug +- bxr +- ca +- cbk-zam +- cdo +- ceb +- ce +- chr +- ch +- chy +- ckb +- co +- crh-latn +- cr +- csb +- cs +- cu +- cv +- cy +- da +- de +- diq +- dsb +- dv +- dz +- ee +- el +- eml +- en +- eo +- es +- et +- eu +- ext +- fa +- ff +- fi +- fj +- fo +- frp +- frr +- fr +- fur +- fy +- gag +- gan +- ga +- gd +- glk +- gl +- gn +- gom +- got +- gsw +- gu +- gv +- hak +- ha +- haw +- he +- hif +- hi +- hr +- hsb +- ht +- hu +- hy +- ia +- id +- ie +- ig +- ik +- ilo +- io +- is +- it +- iu +- ja +- jbo +- jv +- kaa +- kab +- ka +- kbd +- kg +- ki +- kk +- kl +- km +- kn +- koi +- ko +- krc +- ksh +- ks +- ku +- kv +- kw +- ky +- lad +- la +- lbe +- lb +- lez +- lg +- lij +- li +- lmo +- ln +- lo +- lrc +- ltg +- lt +- lv +- lzh +- mai +- map-bms +- mdf +- mg +- mhr +- min +- mi +- mk +- ml +- mn +- mrj +- mr +- ms +- mt +- mwl +- myv +- my +- mzn +- nah +- nan +- nap +- na +- nds-nl +- nds +- ne +- new +- nl +- nn +- nov +- 'no' +- nrm +- nso +- nv +- ny +- oc +- om +- or +- os +- pag +- pam +- pap +- pa +- pcd +- pdc +- pfl +- pih +- pi +- pl +- pms +- pnb +- pnt +- ps +- pt +- qu +- rm +- rmy +- rn +- roa-tara +- rup +- ro +- rue +- ru +- rw +- sah +- sa +- scn +- sco +- sc +- sd +- se +- sg +- sgs +- sh +- simple +- si +- sk +- sl +- sm +- sn +- so +- sq +- srn +- sr +- ss +- stq +- st +- su +- sv +- sw +- szl +- ta +- tet +- te +- tg +- th +- ti +- tk +- tl +- tn +- to +- tpi +- tr +- ts +- tt +- tum +- tw +- tyv +- ty +- udm +- ug +- uk +- ur +- uz +- vec +- vep +- ve +- vi +- vls +- vo +- vro +- war +- wa +- wo +- wuu +- xal +- xh +- xmf +- yi +- yo +- yue +- za +- zea +- zh +- zu + target: +- ab +- ace +- af +- ak +- am +- ang +- an +- arc +- ar +- arz +- ast +- as +- av +- ay +- az +- bar +- ba +- bcl +- be-tarask +- be +- bg +- bho +- bi +- bjn +- bm +- bn +- bo +- bpy +- br +- bs +- bug +- bxr +- ca +- cbk-zam +- cdo +- ceb +- ce +- chr +- ch +- chy +- ckb +- co +- crh-latn +- cr +- csb +- cs +- cu +- cv +- cy +- da +- de +- diq +- dsb +- dv +- dz +- ee +- el +- eml +- en +- eo +- es +- et +- eu +- ext +- fa +- ff +- fi +- fj +- fo +- frp +- frr +- fr +- fur +- fy +- gag +- gan +- ga +- gd +- glk +- gl +- gn +- gom +- got
[MediaWiki-commits] [Gerrit] Avoid forceHTTPS cookie flapping if core and CA are setting ... - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Avoid forceHTTPS cookie flapping if core and CA are setting the same cookie .. Avoid forceHTTPS cookie flapping if core and CA are setting the same cookie Ib7b0f77a mostly stopped CentralAuthSessionProvider from setting the forceHTTPS cookie multiple times in one request, but if both core and CA are setting the cookie with the same domain and path it will still delete and reissue the cookie repeatedly. So detect that situation and skip the "delete". Bug: T124421 Change-Id: Ie74940d7bf4316acaaec037c6f0a3b92b96df380 --- M includes/session/CentralAuthSessionProvider.php 1 file changed, 11 insertions(+), 3 deletions(-) Approvals: BryanDavis: Looks good to me, but someone else must approve Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/session/CentralAuthSessionProvider.php b/includes/session/CentralAuthSessionProvider.php index 1350265..5b67784 100644 --- a/includes/session/CentralAuthSessionProvider.php +++ b/includes/session/CentralAuthSessionProvider.php @@ -392,17 +392,25 @@ $central = $backend ? CentralAuthUser::getInstance( $backend->getUser() )->isAttached() : false; + $sameCookie = ( + $this->cookieOptions['path'] === $this->centralCookieOptions['path'] && + $this->cookieOptions['domain'] === $this->centralCookieOptions['domain'] + ); // If the account is centralized, have the parent clear its cookie and // set the central cookie. If it's not centralized, clear the central // cookie and have the parent set its cookie as it usually would. if ( $set && $central ) { - parent::setForceHTTPSCookie( false, $backend, $request ); + if ( !$sameCookie ) { + parent::setForceHTTPSCookie( false, $backend, $request ); + } $response->setCookie( 'forceHTTPS', 'true', $backend->shouldRememberUser() ? 0 : null, array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); } else { - $response->clearCookie( 'forceHTTPS', - array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); + if ( !$sameCookie ) { + $response->clearCookie( 'forceHTTPS', + array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); + } parent::setForceHTTPSCookie( $set, $backend, $request ); } } -- To view, visit https://gerrit.wikimedia.org/r/266585 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie74940d7bf4316acaaec037c6f0a3b92b96df380 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: AnomieGerrit-Reviewer: Anomie Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Gergő Tisza 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] Suggestions: Capture the list type for the campaign identifier - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Suggestions: Capture the list type for the campaign identifier .. Suggestions: Capture the list type for the campaign identifier This helps to do more fine grained analysis of suggestion acceptance. Bug: T124490 Change-Id: I6beb95ba078056be80180811b800ecebb8292c47 --- M modules/dashboard/ext.cx.suggestionlist.js 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/dashboard/ext.cx.suggestionlist.js b/modules/dashboard/ext.cx.suggestionlist.js index 46f5a87..32c5c28 100644 --- a/modules/dashboard/ext.cx.suggestionlist.js +++ b/modules/dashboard/ext.cx.suggestionlist.js @@ -709,8 +709,10 @@ * Event handlers */ CXSuggestionList.prototype.listen = function () { + var self = this; + this.$suggestionsContainer.on( 'click', '.cx-suggestionlist .cx-slitem', function () { - var cxSelector, suggestion; + var cxSelector, suggestion, campaign; cxSelector = $( this ).data( 'cxsourceselector' ); @@ -718,11 +720,13 @@ cxSelector.prefill(); } else { suggestion = $( this ).find( '.cx-slitem__translation-link' ).data( 'suggestion' ); + // Capture the list type for the campaign identifier + campaign = 'suggestions-type-' + self.lists[ suggestion.listId ].type; $( this ).cxSourceSelector( { sourceLanguage: suggestion.sourceLanguage, targetLanguage: suggestion.targetLanguage, sourceTitle: suggestion.title, - campaign: 'suggestions' + campaign: campaign } ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/26 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6beb95ba078056be80180811b800ecebb8292c47 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: SanthoshGerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clarify some Html2Wiki messages - change (mediawiki...Html2Wiki)
jenkins-bot has submitted this change and it was merged. Change subject: Clarify some Html2Wiki messages .. Clarify some Html2Wiki messages * Avoid reference to screen position in dry-run-heading * Add documentation for upload error message Bug: T121883 Bug: T121867 Change-Id: Ie6e7c26a7607a190ecb046fcb8f1f3cfd1dd51a2 --- M i18n/en.json M i18n/qqq.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index ada8df4..a796bc6 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -9,7 +9,7 @@ "html2wiki-comment": "File imported by [https://www.mediawiki.org/wiki/Extension:Html2Wiki Html2Wiki]", "html2wiki-desc": "Import HTML content into your wiki", "html2wiki-dry-run": "Dry run:", - "html2wiki-dry-run-heading": "Preview only! Contents below were not saved:", + "html2wiki-dry-run-heading": "Preview only! Contents were not saved:", "html2wiki-summary": "Description appearing on top of [[Special:Html2Wiki]] - but it's not.", "html2wiki-importbtn": "Import", "html2wiki-intro": "Use this form to import HTML content into your wiki.\n\nIf you upload a zip file, the Collection Name field is used to differentiate the collection from a later version. Also all files will be grouped in a category by the same name. For example, let's say you're importing a collection of HTML files output from your software documentation system, you would enter a unique Collection ID like 'FluxCapacitor-v1.1' so that the whole collection is imported into an article hierarchy starting with 'FluxCapacitor-v1.1'. This way 10 different collections can be imported without clobbering each other.\n\nSpecifying an existing Collection Name (or parent path) will update existing wiki content.\n\nIf you want to import a single file into an existing article hierarchy, simply specify it's 'parent' as the Collection Name.\n\nFor example, if importing a new 'advanced_topics.html' that should exist at 'FluxCapacitor-v1.1/docs/advanced_topics.html', the parent would be 'FluxCapacitor-v1.1/docs/'", diff --git a/i18n/qqq.json b/i18n/qqq.json index ebf4174..101b098 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -24,7 +24,7 @@ "html2wiki-log-name": "for the Special:Log log name that appears in the drop-down on the Special:Log page", "html2wiki-log-description": "for the Special:Log description that appears on the Special:Log page when you filter logs on this specific log name", "html2wiki_multiple_body": "Found more than one set of tags in \n$1", - "html2wiki_uploaderror": "There was an error handling the file upload:\n$1", + "html2wiki_uploaderror": "An error message when there is a problem with the upload. Parameters:\n* $1 - the error message of the particular caught exception", "html2wiki_parse-error": "external library QueryPath was unable to parse the content at $1", "logentry-html2wiki": "Logentry on import of html pages into a wiki" } -- To view, visit https://gerrit.wikimedia.org/r/266625 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6e7c26a7607a190ecb046fcb8f1f3cfd1dd51a2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Html2Wiki Gerrit-Branch: master Gerrit-Owner: MtDuGerrit-Reviewer: Aklapper Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: Purodha Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adds filter to Special:Contributions - change (mediawiki...ORES)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/20 Change subject: Adds filter to Special:Contributions .. Adds filter to Special:Contributions TODO: Flag is still not rendered Bug: T122537 Change-Id: I5547697475f9dccfb6730209070d6c6f304140d0 --- M extension.json M i18n/en.json M i18n/qqq.json M includes/Hooks.php 4 files changed, 30 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/60/20/1 diff --git a/extension.json b/extension.json index 0f1fc29..767e1db 100644 --- a/extension.json +++ b/extension.json @@ -39,6 +39,9 @@ ], "OldChangesListRecentChangesLine": [ "ORES\\Hooks::onOldChangesListRecentChangesLine" + ], + "SpecialContributions::getForm::filters": [ + "ORES\\Hooks::onSpecialContributionsGetFormFilters" ] }, "ResourceFileModulePaths": { diff --git a/i18n/en.json b/i18n/en.json index 60b5917..c00fea0 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -6,5 +6,6 @@ "ores-damaging-filter": "$1 good edits", "ores-damaging-letter": "r", "ores-damaging-title": "This edit needs review", - "ores-damaging-legend": "ORES predicts that this change may be damaging and should be reviewed" + "ores-damaging-legend": "ORES predicts that this change may be damaging and should be reviewed", + "ores-hide-nondamaging-filter": "Only show edits needing review" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 418221e..b183e1d 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -4,5 +4,6 @@ "ores-damaging-filter": "Label to toggle filtering on ORES data. Parameters:\n* $1 - Action to be performed by toggling.", "ores-damaging-letter": "Single letter for tagging possibly damaging recent changes.", "ores-damaging-title": "Tooltip for damaging risk icon.", - "ores-damaging-legend": "Legend for damaging risk icon." + "ores-damaging-legend": "Legend for damaging risk icon.", + "ores-hide-nondamaging-filter": "Label for Contributions filter, 'only show'" } diff --git a/includes/Hooks.php b/includes/Hooks.php index 5221d29..b747af7 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -12,6 +12,8 @@ use ChangesList; use RCCacheEntry; use RecentChange; +use SpecialContributions; +use Xml; /** * TODO: @@ -180,6 +182,27 @@ } /** +* Hook into Special:Contributions filters +*/ + public static function onSpecialContributionsGetFormFilters( + SpecialContributions $page, array &$filters + ) { + $filters[] = Html::rawElement( + 'span', + array( 'class' => 'mw-input-with-label' ), + Xml::checkLabel( + $page->msg( 'ores-hide-nondamaging-filter' )->text(), + 'hidenondamaging', + 'ores-hide-nondamaging', + $page->getContext()->getRequest()->getVal( 'hidenondamaging' ), + array( 'class' => 'mw-input' ) + ) + ); + + return true; + } + + /** * Internal helper to label matching rows */ protected static function processRecentChangesList( RCCacheEntry $rcObj, array &$data ) { -- To view, visit https://gerrit.wikimedia.org/r/20 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5547697475f9dccfb6730209070d6c6f304140d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid forceHTTPS cookie flapping if core and CA are setting ... - change (mediawiki...CentralAuth)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/266671 Change subject: Avoid forceHTTPS cookie flapping if core and CA are setting the same cookie .. Avoid forceHTTPS cookie flapping if core and CA are setting the same cookie Ib7b0f77a mostly stopped CentralAuthSessionProvider from setting the forceHTTPS cookie multiple times in one request, but if both core and CA are setting the cookie with the same domain and path it will still delete and reissue the cookie repeatedly. So detect that situation and skip the "delete". Bug: T124421 Change-Id: Ie74940d7bf4316acaaec037c6f0a3b92b96df380 --- M includes/session/CentralAuthSessionProvider.php 1 file changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/71/266671/1 diff --git a/includes/session/CentralAuthSessionProvider.php b/includes/session/CentralAuthSessionProvider.php index 1350265..5b67784 100644 --- a/includes/session/CentralAuthSessionProvider.php +++ b/includes/session/CentralAuthSessionProvider.php @@ -392,17 +392,25 @@ $central = $backend ? CentralAuthUser::getInstance( $backend->getUser() )->isAttached() : false; + $sameCookie = ( + $this->cookieOptions['path'] === $this->centralCookieOptions['path'] && + $this->cookieOptions['domain'] === $this->centralCookieOptions['domain'] + ); // If the account is centralized, have the parent clear its cookie and // set the central cookie. If it's not centralized, clear the central // cookie and have the parent set its cookie as it usually would. if ( $set && $central ) { - parent::setForceHTTPSCookie( false, $backend, $request ); + if ( !$sameCookie ) { + parent::setForceHTTPSCookie( false, $backend, $request ); + } $response->setCookie( 'forceHTTPS', 'true', $backend->shouldRememberUser() ? 0 : null, array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); } else { - $response->clearCookie( 'forceHTTPS', - array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); + if ( !$sameCookie ) { + $response->clearCookie( 'forceHTTPS', + array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); + } parent::setForceHTTPSCookie( $set, $backend, $request ); } } -- To view, visit https://gerrit.wikimedia.org/r/266671 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie74940d7bf4316acaaec037c6f0a3b92b96df380 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: wmf/1.27.0-wmf.11 Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Anomie ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preserve certain keys when updating central session - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Preserve certain keys when updating central session .. Preserve certain keys when updating central session If the central session is updated without dirtying the MediaWiki\Session\Session, these essential keys get lost which breaks logins in some cases. Bug: T124821 Change-Id: I0d2b07af2d946cf730c6a8da5841b904c62b1c3f --- M includes/CentralAuthUtils.php 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, but someone else must approve Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CentralAuthUtils.php b/includes/CentralAuthUtils.php index 6a7417c..80d128f 100644 --- a/includes/CentralAuthUtils.php +++ b/includes/CentralAuthUtils.php @@ -177,6 +177,8 @@ public static function setCentralSession( array $data, $reset = false, $session = null ) { global $wgCentralAuthCookies, $wgCentralAuthCookiePrefix; + static $keepKeys = array( 'user' => true, 'token' => true, 'expiry' => true ); + if ( class_exists( 'MediaWiki\\Session\\Session' ) ) { if ( $session === null ) { $session = MediaWiki\Session\SessionManager::getGlobalSession(); @@ -197,6 +199,13 @@ } $data['sessionId'] = $id; $key = CentralAuthUtils::memcKey( 'session', $id ); + + // Copy certain keys from the existing session, if any (T124821) + $existing = CentralAuthUtils::getSessionCache()->get( $key ); + if ( is_array( $existing ) ) { + $data += array_intersect_key( $existing, $keepKeys ); + } + $stime = microtime( true ); CentralAuthUtils::getSessionCache()->set( $key, $data, 86400 ); $real = microtime( true ) - $stime; -- To view, visit https://gerrit.wikimedia.org/r/266610 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0d2b07af2d946cf730c6a8da5841b904c62b1c3f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: AnomieGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Gergő Tisza 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] Display human-readable wiki names for cross-wiki notifications - change (mediawiki...Echo)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/266474 Change subject: Display human-readable wiki names for cross-wiki notifications .. Display human-readable wiki names for cross-wiki notifications Bug: T121936 Change-Id: Ic14fe65f4ecc6db94fc6774ca0c39d1c2a47db9d --- M i18n/en.json M i18n/qqq.json M includes/ForeignNotifications.php M includes/formatters/EchoForeignPresentationModel.php 4 files changed, 54 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/74/266474/1 diff --git a/i18n/en.json b/i18n/en.json index e7e16ee..450c4d4 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -140,6 +140,7 @@ "echo-rev-deleted-text-view": "This page revision has been suppressed.", "notification-header-foreign-alert": "More alerts from $3 {{PLURAL:$4|and one other wiki|and $4 other wikis|0=}}", "notification-header-foreign-message": "More messages from $3 {{PLURAL:$4|and one other wiki|and $4 other wikis|0=}}", + "echo-foreign-wiki-lang": "$1 - $2", "apihelp-echomarkread-description": "Mark notifications as read for the current user.", "apihelp-echomarkread-param-list": "A list of notification IDs to mark as read.", "apihelp-echomarkread-param-all": "If set, marks all of a user's notifications as read.", diff --git a/i18n/qqq.json b/i18n/qqq.json index 7b5f4b9..1bbc44a 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -161,6 +161,7 @@ "echo-rev-deleted-text-view": "Short message displayed instead of edit content when revision text is suppressed.", "notification-header-foreign-alert": "Flyout-specific format for displaying notification header of having alert notifications on foreign wikis.\n\nParameters:\n* $1 - the formatted username of the current user.\n* $2 - the username for GENDER\n* $3 - 1 of the foreign wikis you have notifications on\n* $4 - the amount of remaining other wikis you have notifications on", "notification-header-foreign-message": "Flyout-specific format for displaying notification header of having message notifications on foreign wikis.\n\nParameters:\n* $1 - the formatted username of the current user.\n* $2 - the username for GENDER\n* $3 - 1 of the foreign wikis you have notifications on\n* $4 - the amount of remaining other wikis you have notifications on", + "echo-foreign-wiki-lang": "Title of the wiki for which you're seeing foreign notifications:\n\nParameters:\n* $1 - the name of the site (e.g. 'Wikipedia', 'Wikiversity', ...)\n* $2 - the language of the website (e.g. 'English', 'Deutsch', ...)", "apihelp-echomarkread-description": "{{doc-apihelp-description|echomarkread}}", "apihelp-echomarkread-param-list": "{{doc-apihelp-param|echomarkread|list}}", "apihelp-echomarkread-param-all": "{{doc-apihelp-param|echomarkread|all}}", diff --git a/includes/ForeignNotifications.php b/includes/ForeignNotifications.php index 42e26e4..0fbabfc 100644 --- a/includes/ForeignNotifications.php +++ b/includes/ForeignNotifications.php @@ -134,15 +134,58 @@ $data = array(); foreach ( $wikis as $wiki ) { - list( $major, $minor ) = $wgConf->siteFromDB( $wiki ); + $siteFromDB = $wgConf->siteFromDB( $wiki ); + list( $major, $minor ) = $siteFromDB; $server = $wgConf->get( 'wgServer', $wiki, $major, array( 'lang' => $minor, 'site' => $major ) ); $scriptPath = $wgConf->get( 'wgScriptPath', $wiki, $major, array( 'lang' => $minor, 'site' => $major ) ); + $data[$wiki] = array( - 'title' => $wiki, + 'title' => $this->getWikiTitle( $wiki, $siteFromDB ), 'url' => $server . $scriptPath . '/api.php', ); } return $data; } + + /** +* @param string $wikiId +* @param array $siteFromDB $wgConf->siteFromDB( $wikiId ) result +* @return mixed|string +*/ + protected function getWikiTitle( $wikiId, array $siteFromDB = null ) { + global $wgConf, $wgLang; + + // don't re-fetch current wiki's data if we've already done so before + static $current = array(); + if ( !$current ) { + $current = $wgConf->siteFromDB( wfWikiID() ); + } + + // don't fetch $site, $langCode if known already + if ( $siteFromDB === null ) { + $wgConf->siteFromDB( $wikiId ); + } + list( $site, $langCode ) = $siteFromDB; + + // try to fetch site name for this specific wiki, or fallback to the + //
[MediaWiki-commits] [Gerrit] Add the moving average function to the event logging's inser... - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: Add the moving average function to the event logging's insert rate alarming metric. Bug: T124204 .. Add the moving average function to the event logging's insert rate alarming metric. Bug: T124204 Change-Id: I04e52e6a57a124f5c47dad316769c4e61bdc591e Signed-off-by: elukey--- M modules/eventlogging/manifests/monitoring/graphite.pp 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Mforns: Looks good to me, but someone else must approve Ottomata: Looks good to me, but someone else must approve Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/eventlogging/manifests/monitoring/graphite.pp b/modules/eventlogging/manifests/monitoring/graphite.pp index a10606a..31b229c 100644 --- a/modules/eventlogging/manifests/monitoring/graphite.pp +++ b/modules/eventlogging/manifests/monitoring/graphite.pp @@ -18,7 +18,7 @@ # was seen that the current setup can handle 500 events/s. # Better thresholds are pending (see T86244). monitoring::graphite_threshold { 'eventlogging_throughput': -description => 'Throughput of event logging events', +description => 'Throughput of EvenLogging events', metric=> $raw_events_rate_metric, warning => 500, critical => 600, @@ -31,7 +31,7 @@ # in a 15 min period # https://meta.wikimedia.org/wiki/Schema:NavigationTiming monitoring::graphite_threshold { 'eventlogging_NavigationTiming_throughput': -description => 'Throughput of event logging NavigationTiming events', +description => 'Throughput of EventLogging NavigationTiming events', metric=> "kafka.${kafka_brokers_graphite_wildcard}.kafka.server.BrokerTopicMetrics.MessagesInPerSec.eventlogging_NavigationTiming.OneMinuteRate", warning => 1, critical => 0, @@ -63,8 +63,8 @@ # this metric is a good proxy to make sure events are flowing through the # kafka pipeline monitoring::graphite_threshold { 'eventlogging_overall_inserted_rate': -description => 'Overall insertion rate from MySQL consumer', -metric=> 'eventlogging.overall.inserted.rate', +description => 'EventLogging overall insertion rate from MySQL consumer', +metric=> 'movingAverage(eventlogging.overall.inserted.rate, "10min")', warning => 100, critical => 10, percentage=> 20, # At least 3 of the (25 - 10) = 15 readings -- To view, visit https://gerrit.wikimedia.org/r/266264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04e52e6a57a124f5c47dad316769c4e61bdc591e Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Elukey Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Joal Gerrit-Reviewer: Mforns Gerrit-Reviewer: Ottomata Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] TableSorter: Avoid FOUC and preserve styling in VisualEditor - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: TableSorter: Avoid FOUC and preserve styling in VisualEditor .. TableSorter: Avoid FOUC and preserve styling in VisualEditor Always make space for the icon and display a placeholder if JavaScript is loaded, even if we haven't set up table sorting for a given table yet. The table will not be sortable in VE mode but for layout preview we should show some disabled sort icons. Bug: T95189 Change-Id: Ieb21cf79ae68e388e824923cb6e2d7d552a4afc6 --- M resources/src/jquery/jquery.tablesorter.less M resources/src/mediawiki.skinning/content.css A resources/src/mediawiki.skinning/images/sort_both_readonly.png A resources/src/mediawiki.skinning/images/sort_both_readonly.svg 4 files changed, 22 insertions(+), 4 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, but someone else must approve Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/jquery/jquery.tablesorter.less b/resources/src/jquery/jquery.tablesorter.less index f4ef540..85c58d7 100644 --- a/resources/src/jquery/jquery.tablesorter.less +++ b/resources/src/jquery/jquery.tablesorter.less @@ -1,19 +1,20 @@ @import "mediawiki.mixins"; -/* Table Sorting */ +// Table Sorting -table.jquery-tablesorter th.headerSort { +.client-js table.jquery-tablesorter th.headerSort { .background-image-svg( 'images/sort_both.svg', 'images/sort_both.png' ); cursor: pointer; + // Keep synchronized with mediawiki.skinning.content styles background-repeat: no-repeat; background-position: center right; padding-right: 21px; } -table.jquery-tablesorter th.headerSortUp { +.client-js table.jquery-tablesorter th.headerSortUp { .background-image-svg( 'images/sort_up.svg', 'images/sort_up.png' ); } -table.jquery-tablesorter th.headerSortDown { +.client-js table.jquery-tablesorter th.headerSortDown { .background-image-svg( 'images/sort_down.svg', 'images/sort_down.png' ); } diff --git a/resources/src/mediawiki.skinning/content.css b/resources/src/mediawiki.skinning/content.css index c88d00d..a873cdf 100644 --- a/resources/src/mediawiki.skinning/content.css +++ b/resources/src/mediawiki.skinning/content.css @@ -241,3 +241,16 @@ div.tleft { margin: .5em 1.4em 1.3em 0; } + +/* Make space for the jquery.tablesorter icon and display a placeholder if JavaScript is loaded, while + tablesorter is still loading and setting up the tables for sorting. This avoids a flash of + unstyled content during page load (FOUC). The styles can also be used by WYSIWYG editors. */ +.client-js table.sortable th:not(.unsortable) { + background-image: url(images/sort_both_readonly.png); + /* @embed */ + background-image: linear-gradient(transparent, transparent), url(images/sort_both_readonly.svg); + /* Keep synchronised with jquery.tablesorter styles */ + background-repeat: no-repeat; + background-position: center right; + padding-right: 21px; +} diff --git a/resources/src/mediawiki.skinning/images/sort_both_readonly.png b/resources/src/mediawiki.skinning/images/sort_both_readonly.png new file mode 100644 index 000..bdb09e3 --- /dev/null +++ b/resources/src/mediawiki.skinning/images/sort_both_readonly.png Binary files differ diff --git a/resources/src/mediawiki.skinning/images/sort_both_readonly.svg b/resources/src/mediawiki.skinning/images/sort_both_readonly.svg new file mode 100644 index 000..3b97000 --- /dev/null +++ b/resources/src/mediawiki.skinning/images/sort_both_readonly.svg @@ -0,0 +1,4 @@ + +http://www.w3.org/2000/svg; viewBox="0 0 21 9" height="9" width="21"> + + -- To view, visit https://gerrit.wikimedia.org/r/266260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb21cf79ae68e388e824923cb6e2d7d552a4afc6 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Edokter Gerrit-Reviewer: Esanders Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge resource messages - change (mediawiki...MobileFrontend)
Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/266491 Change subject: Merge resource messages .. Merge resource messages Update 'mobile.startup/util' documentation too. Change-Id: Ia6a701f42c7dc0238671eedbd376318f970e1e2c --- M includes/Resources.php M resources/mobile.startup/util.js 2 files changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/91/266491/1 diff --git a/includes/Resources.php b/includes/Resources.php index 4ab904a..183b269 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -1474,6 +1474,8 @@ 'mobile-frontend-last-modified-with-user-months', 'mobile-frontend-last-modified-with-user-years', 'mobile-frontend-last-modified-with-user-just-now', + // mf-stop-mobile-redirect.js + 'mobile-frontend-cookies-required', ), 'scripts' => array( // FIXME: Merge preInit and init files. @@ -1482,10 +1484,6 @@ 'resources/skins.minerva.scripts/initLogging.js', 'resources/skins.minerva.scripts/mobileRedirect.js', 'resources/skins.minerva.scripts/search.js', - ), - 'messages' => array( - // mf-stop-mobile-redirect.js - 'mobile-frontend-cookies-required', ), ), // Remove when cache clears (https://phabricator.wikimedia.org/T113686) diff --git a/resources/mobile.startup/util.js b/resources/mobile.startup/util.js index b5137e4..2db21ba 100644 --- a/resources/mobile.startup/util.js +++ b/resources/mobile.startup/util.js @@ -3,7 +3,7 @@ $window = $( window ); /** -* Utility library for looking up details on the current user +* Utility library * @class util * @singleton */ -- To view, visit https://gerrit.wikimedia.org/r/266491 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6a701f42c7dc0238671eedbd376318f970e1e2c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fundraising CRM job can run concurrently now - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Fundraising CRM job can run concurrently now .. Fundraising CRM job can run concurrently now We think the last race condition has been patched, so setting this job to run concurrently. Bug: T91903 Change-Id: Ic542872721b11378e155878b959eb835d6fffc99 --- M jjb/wm-fundraising.yaml 1 file changed, 1 insertion(+), 9 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/wm-fundraising.yaml b/jjb/wm-fundraising.yaml index 2c4abc6..0d6b764 100644 --- a/jjb/wm-fundraising.yaml +++ b/jjb/wm-fundraising.yaml @@ -31,13 +31,6 @@ - postbuildscript: builders: - shell: | - # FIXME: Some junk gets left behind (e.g. database dsn), which - # corrupts later runs. Remove it. Ideally this cache would - # be stored under $WORKSPACE and would be cleaned up without - # an additional step. Also, this causes a race condition, - # the job can run concurrently once we fix this cache dir. - rm -rf $HOME/.amp - # Drop the MySQL databases. $WORKSPACE/src/wikimedia/fundraising/crm/bin/ci-drop-dbs.sh @@ -55,8 +48,7 @@ name: wikimedia-fundraising-civicrm # Run on isolated boxes because of messy MySQL behavior and unsafe fetches. node: contintLabsSlave && UbuntuTrusty -# FIXME: due to the ~/.amp thing. -concurrent: false +concurrent: true triggers: - zuul builders: -- To view, visit https://gerrit.wikimedia.org/r/266447 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic542872721b11378e155878b959eb835d6fffc99 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: AwightGerrit-Reviewer: Eileen Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] MobileFrontend Remove deprecated Class.extend - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: MobileFrontend Remove deprecated Class.extend .. MobileFrontend Remove deprecated Class.extend Remove all instances of Class.extend and introduces OO.mfExtend for extending modules. Depends-On: Ib74b95e3576ad9a2d14e243e1d1870b590362268 Bug: T123077 Change-Id: I641f9f4145b0e96b33beefcef35bc2cfa243696d --- M resources/mobile.abusefilter/AbuseFilterOverlay.js M resources/mobile.abusefilter/AbuseFilterPanel.js M resources/mobile.backtotop/BackToTopOverlay.js M resources/mobile.betaoptin/BetaOptinPanel.js M resources/mobile.categories.overlays/CategoryAddOverlay.js M resources/mobile.categories.overlays/CategoryOverlay.js M resources/mobile.commonsCategory/CommonsCategoryOverlay.js M resources/mobile.contentOverlays/PointerOverlay.js M resources/mobile.drawers/CtaDrawer.js M resources/mobile.drawers/Drawer.js M resources/mobile.editor.common/EditorOverlayBase.js M resources/mobile.editor.overlay.withtoolbar/AddReferenceOverlay.js M resources/mobile.editor.overlay.withtoolbar/EditorOverlayWithToolbar.js M resources/mobile.editor.overlay/EditorOverlay.js M resources/mobile.editor.ve/VisualEditorOverlay.js M resources/mobile.fontchanger/FontChanger.js M resources/mobile.gallery/PhotoItem.js M resources/mobile.gallery/PhotoList.js M resources/mobile.issues/CleanupOverlay.js M resources/mobile.languages/LanguageOverlay.js M resources/mobile.mainMenu/MainMenu.js M resources/mobile.mediaViewer.beta/ImageOverlayBeta.js M resources/mobile.mediaViewer/ImageOverlay.js M resources/mobile.messageBox/MessageBox.js M resources/mobile.nearby/Nearby.js M resources/mobile.notifications.overlay/NotificationsOverlay.js M resources/mobile.overlays/ContentOverlay.js M resources/mobile.overlays/LoadingOverlay.js M resources/mobile.overlays/Overlay.js M resources/mobile.pagelist.scripts/WatchstarPageList.js M resources/mobile.pagelist/PageList.js M resources/mobile.references/ReferencesDrawer.js M resources/mobile.search/SearchOverlay.js M resources/mobile.special.mobileoptions.scripts/mobileoptions.js M resources/mobile.startup/Anchor.js M resources/mobile.startup/Button.js M resources/mobile.startup/Icon.js M resources/mobile.startup/Page.js M resources/mobile.startup/Panel.js M resources/mobile.startup/Section.js M resources/mobile.startup/Skin.js M resources/mobile.startup/Thumbnail.js M resources/mobile.talk.overlays/TalkOverlay.js M resources/mobile.talk.overlays/TalkOverlayBase.js M resources/mobile.talk.overlays/TalkSectionAddOverlay.js M resources/mobile.talk.overlays/TalkSectionOverlay.js M resources/mobile.toc/TableOfContents.js M resources/mobile.view/View.js M resources/mobile.watchlist/WatchList.js M resources/mobile.watchstar/Watchstar.js M tests/qunit/mobile.overlays/test_Overlay.js M tests/qunit/mobile.view/test_View.js 52 files changed, 872 insertions(+), 788 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mobile.abusefilter/AbuseFilterOverlay.js b/resources/mobile.abusefilter/AbuseFilterOverlay.js index 5bfd2cc..f649dd6 100644 --- a/resources/mobile.abusefilter/AbuseFilterOverlay.js +++ b/resources/mobile.abusefilter/AbuseFilterOverlay.js @@ -1,6 +1,5 @@ ( function ( M, $ ) { - var AbuseFilterOverlay, - Button = M.require( 'mobile.startup/Button' ), + var Button = M.require( 'mobile.startup/Button' ), Overlay = M.require( 'mobile.overlays/Overlay' ); /** @@ -9,7 +8,11 @@ * @class AbuseFilterOverlay * @extends Overlay */ - AbuseFilterOverlay = Overlay.extend( { + function AbuseFilterOverlay() { + Overlay.apply( this, arguments ); + } + + OO.mfExtend( AbuseFilterOverlay, Overlay, { /** * @inheritdoc * @cfg {Object} defaults Default options hash. diff --git a/resources/mobile.abusefilter/AbuseFilterPanel.js b/resources/mobile.abusefilter/AbuseFilterPanel.js index 9fbf3b7..f66f761 100644 --- a/resources/mobile.abusefilter/AbuseFilterPanel.js +++ b/resources/mobile.abusefilter/AbuseFilterPanel.js @@ -2,8 +2,7 @@ var View = M.require( 'mobile.view/View' ), AbuseFilterOverlay = M.require( 'mobile.abusefilter/AbuseFilterOverlay' ), - overlayManager = M.require( 'mobile.startup/overlayManager' ), - AbuseFilterPanel; + overlayManager = M.require( 'mobile.startup/overlayManager' ); /** * Panel that shows an error message related to the abusefilter extension. @@ -12,7 +11,12 @@ * @uses AbuseFilterOverlay * FIXME: should extend Panel not View. Or the name should be changed to something meaningful. */ - AbuseFilterPanel = View.extend( { + function AbuseFilterPanel() { + this.isDisallowed = false; +
[MediaWiki-commits] [Gerrit] Remove Schema.extend - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Remove Schema.extend .. Remove Schema.extend Use OO.mfExtend instead This paves way for completely removing our Class code and reducing the JavaScript footprint at the head Depends-On: I9363c4d23bde8caf0541fd0dfb13abe15b6583e3 Change-Id: Ib74b95e3576ad9a2d14e243e1d1870b590362268 --- M resources/mobile.loggingSchemas/SchemaEdit.js M resources/mobile.loggingSchemas/SchemaMobileWebSectionUsage.js M resources/mobile.startup/Schema.js 3 files changed, 13 insertions(+), 12 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, but someone else must approve Bmansurov: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mobile.loggingSchemas/SchemaEdit.js b/resources/mobile.loggingSchemas/SchemaEdit.js index 9f79b6b..e632e40 100644 --- a/resources/mobile.loggingSchemas/SchemaEdit.js +++ b/resources/mobile.loggingSchemas/SchemaEdit.js @@ -1,13 +1,16 @@ ( function ( M, $ ) { - var SchemaEdit, - Schema = M.require( 'mobile.startup/Schema' ), + var Schema = M.require( 'mobile.startup/Schema' ), user = M.require( 'mobile.user/user' ); /** * @class SchemaEdit * @extends Schema */ - SchemaEdit = Schema.extend( { + function SchemaEdit() { + Schema.apply( this, arguments ); + } + + OO.mfExtend( SchemaEdit, Schema, { /** @inheritdoc **/ name: 'Edit', /** diff --git a/resources/mobile.loggingSchemas/SchemaMobileWebSectionUsage.js b/resources/mobile.loggingSchemas/SchemaMobileWebSectionUsage.js index 14235da..b934d2a 100644 --- a/resources/mobile.loggingSchemas/SchemaMobileWebSectionUsage.js +++ b/resources/mobile.loggingSchemas/SchemaMobileWebSectionUsage.js @@ -1,6 +1,5 @@ ( function ( M, $ ) { - var SchemaMobileWebSectionUsage, - Schema = M.require( 'mobile.startup/Schema' ), + var Schema = M.require( 'mobile.startup/Schema' ), user = M.require( 'mobile.user/user' ), browser = M.require( 'mobile.browser/browser' ), experiments = mw.config.get( 'wgMFExperiments' ); @@ -9,7 +8,11 @@ * @class SchemaMobileWebSectionUsage * @extends Schema */ - SchemaMobileWebSectionUsage = Schema.extend( { + function SchemaMobileWebSectionUsage() { + Schema.apply( this, arguments ); + } + + OO.mfExtend( SchemaMobileWebSectionUsage, Schema, { /** * @inheritdoc */ diff --git a/resources/mobile.startup/Schema.js b/resources/mobile.startup/Schema.js index 40b556b..bc04eea 100644 --- a/resources/mobile.startup/Schema.js +++ b/resources/mobile.startup/Schema.js @@ -1,6 +1,5 @@ ( function ( M, $ ) { - var Class = M.require( 'mobile.oo/Class' ), - settings = M.require( 'mobile.settings/settings' ), + var settings = M.require( 'mobile.settings/settings' ), BEACON_SETTING_KEY = 'mobileFrontend/beacon'; /** @@ -168,10 +167,6 @@ deleteBeacon(); }; - // FIXME: Needed to give time for Gather to update - Schema.extend = Class.extend; - mw.log.deprecate( Schema, 'extend', Schema.extend, - 'Schema.extend is deprecated. Do not use this. Use OO.mfExtend' ); M.define( 'mobile.startup/Schema', Schema ); -- To view, visit https://gerrit.wikimedia.org/r/262727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib74b95e3576ad9a2d14e243e1d1870b590362268 Gerrit-PatchSet: 8 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Bmansurov Gerrit-Reviewer: Catrope Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Jhernandez Gerrit-Reviewer: Phuedx Gerrit-Reviewer: Sumit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [SocialLogin] Replace jslint test with npm and add composer-... - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: [SocialLogin] Replace jslint test with npm and add composer-test .. [SocialLogin] Replace jslint test with npm and add composer-test Also add jshint and jsonlint for non-whitelisted users. https://gerrit.wikimedia.org/r/#/c/264956/ Change-Id: I4cc68e2813a5b72452c31fe091c59c3690597d9a --- M jjb/mediawiki-extensions.yaml M zuul/layout.yaml 2 files changed, 5 insertions(+), 4 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml index a9bb128..eaa70ee 100644 --- a/jjb/mediawiki-extensions.yaml +++ b/jjb/mediawiki-extensions.yaml @@ -890,7 +890,6 @@ - mwext-SkinPerNamespace - mwext-SlimboxThumbs - mwext-SmoothGallery - - mwext-SocialLogin - mwext-SocialProfile - mwext-SoftwareVersion - mwext-SolrStore diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 52e1c7d..b84406a 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -871,8 +871,6 @@ voting: false - name: mwext-SlimboxThumbs-jslint voting: false - - name: mwext-SocialLogin-jslint -voting: false - name: mwext-SoundManager2Button-jslint voting: false - name: mwext-SportsTeams-jslint @@ -5450,8 +5448,12 @@ - name: mediawiki/extensions/SocialLogin template: - - name: extension-jslint + - name: composer-test - name: extension-unittests-generic + - name: npm +check: + - jsonlint + - jshint - name: mediawiki/extensions/SocialProfile template: -- To view, visit https://gerrit.wikimedia.org/r/264967 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4cc68e2813a5b72452c31fe091c59c3690597d9a Gerrit-PatchSet: 3 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.api.parse: Use formatversion=2 for API requests - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/266492 Change subject: mediawiki.api.parse: Use formatversion=2 for API requests .. mediawiki.api.parse: Use formatversion=2 for API requests With formatversion=2 the response uses UTF-8 instead of escape sequences with hex for encoding of non-ASCII characters (e.g. "\u00e4" for "ä"). The structural change in the response of formatversion=2 is abstracted by this mw.Api plugin. Change-Id: I155d220dd4693bff6f8fc6c817698f2b4ac9660f --- M resources/src/mediawiki/api/parse.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/266492/1 diff --git a/resources/src/mediawiki/api/parse.js b/resources/src/mediawiki/api/parse.js index bc3d44f..49219d7 100644 --- a/resources/src/mediawiki/api/parse.js +++ b/resources/src/mediawiki/api/parse.js @@ -14,6 +14,7 @@ */ parse: function ( wikitext ) { var apiPromise = this.get( { + formatversion: 2, action: 'parse', contentmodel: 'wikitext', text: wikitext @@ -21,7 +22,7 @@ return apiPromise .then( function ( data ) { - return data.parse.text[ '*' ]; + return data.parse.text; } ) .promise( { abort: apiPromise.abort } ); } -- To view, visit https://gerrit.wikimedia.org/r/266492 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I155d220dd4693bff6f8fc6c817698f2b4ac9660f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix jslint test and update tests to npm and composer - change (mediawiki...SocialLogin)
jenkins-bot has submitted this change and it was merged. Change subject: Fix jslint test and update tests to npm and composer .. Fix jslint test and update tests to npm and composer Change-Id: I828221e27fb385455f93db8e4085bca50462aba0 --- M .gitignore A .jshintignore A .jshintrc A Gruntfile.js M auth.js A composer.json A package.json 7 files changed, 90 insertions(+), 10 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 98b092a..4284dfa 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ *~ *.kate-swp .*.swp +/node_modules/ +/vendor/ +/composer.lock diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..022b988 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,2 @@ +node_modules +vendor diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..8a2a10c --- /dev/null +++ b/.jshintrc @@ -0,0 +1,23 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": true, + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + + // Relaxing + "es5": false, + + // Environment + "browser": true, + "jquery": true, + + "globals": { + "mediaWiki": false + } +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..f294c83 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,26 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '**/*.js', + '!node_modules/**' + ] + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jsonlint' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/auth.js b/auth.js index 5a9f7fc..6e8fcc9 100644 --- a/auth.js +++ b/auth.js @@ -1,3 +1,4 @@ +/*jshint unused:false */ function openWindow(url, title, width, height) { var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; @@ -5,12 +6,15 @@ } function unlink(profile) { - $.ajax({ + jQuery.ajax({ url: '/Special:SocialLogin', data: {action: 'unlink', profile: profile}, success: function(response) { - if (response == 'yes') $('#' + profile.replace('@', '_').replace('.', '_')).remove(); - else alert('Не удалось отсоединить профиль социальной сети.'); + if (response === 'yes') { + jQuery('#' + profile.replace('@', '_').replace('.', '_')).remove(); + } else { + window.alert('Не удалось отсоединить профиль социальной сети.'); + } } }); } @@ -20,22 +24,22 @@ var regexS = "[\\#&]"+name+"=([^
[MediaWiki-commits] [Gerrit] Update graphoid to e564417 - change (mediawiki...deploy)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/266493 Change subject: Update graphoid to e564417 .. Update graphoid to e564417 List of changes: 01eb28f Logger: Log the stack trace only for 500 errors 56e21c3 Set the default build target to 'debian' c05ddb9 Travis YAML: Remove iojs testing and add Node 5.1 81255a0 Temp: Skip the failing gzipped content test 7ee56e7 Update dependencies ede1db1 Release v0.2.3 85a4b3e Use shared external url validation 90dc4f1 Added http & https domain support e564417 fixed shared lib domain xxx Update node module dependencies Change-Id: I79b9f8dcfad8065ab4e18790b87e205a0e2299df --- M node_modules/bluebird/LICENSE A node_modules/bluebird/js/browser/bluebird.core.js A 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 D node_modules/bluebird/js/main/any.js D node_modules/bluebird/js/main/assert.js D node_modules/bluebird/js/main/async.js D node_modules/bluebird/js/main/bluebird.js D node_modules/bluebird/js/main/call_get.js D node_modules/bluebird/js/main/cancel.js D node_modules/bluebird/js/main/captured_trace.js D node_modules/bluebird/js/main/catch_filter.js D node_modules/bluebird/js/main/direct_resolve.js D node_modules/bluebird/js/main/each.js D node_modules/bluebird/js/main/errors.js D node_modules/bluebird/js/main/es5.js D node_modules/bluebird/js/main/filter.js D node_modules/bluebird/js/main/finally.js D node_modules/bluebird/js/main/generators.js D node_modules/bluebird/js/main/join.js D node_modules/bluebird/js/main/map.js D node_modules/bluebird/js/main/nodeify.js D node_modules/bluebird/js/main/progress.js D node_modules/bluebird/js/main/promise.js D node_modules/bluebird/js/main/promise_array.js D node_modules/bluebird/js/main/promise_resolver.js D node_modules/bluebird/js/main/promisify.js D node_modules/bluebird/js/main/props.js D node_modules/bluebird/js/main/queue.js D node_modules/bluebird/js/main/race.js D node_modules/bluebird/js/main/reduce.js D node_modules/bluebird/js/main/schedule.js D node_modules/bluebird/js/main/settle.js D node_modules/bluebird/js/main/some.js D node_modules/bluebird/js/main/synchronous_inspection.js D node_modules/bluebird/js/main/thenables.js D node_modules/bluebird/js/main/timers.js D node_modules/bluebird/js/main/using.js D node_modules/bluebird/js/main/util.js R node_modules/bluebird/js/release/any.js R node_modules/bluebird/js/release/assert.js R node_modules/bluebird/js/release/async.js R node_modules/bluebird/js/release/bind.js R node_modules/bluebird/js/release/bluebird.js R node_modules/bluebird/js/release/call_get.js R node_modules/bluebird/js/release/cancel.js R node_modules/bluebird/js/release/catch_filter.js R node_modules/bluebird/js/release/context.js R node_modules/bluebird/js/release/debuggability.js R node_modules/bluebird/js/release/direct_resolve.js R node_modules/bluebird/js/release/each.js R node_modules/bluebird/js/release/errors.js R node_modules/bluebird/js/release/es5.js R node_modules/bluebird/js/release/filter.js A node_modules/bluebird/js/release/finally.js R node_modules/bluebird/js/release/generators.js R node_modules/bluebird/js/release/join.js R node_modules/bluebird/js/release/map.js R node_modules/bluebird/js/release/method.js R node_modules/bluebird/js/release/nodeback.js R node_modules/bluebird/js/release/nodeify.js A node_modules/bluebird/js/release/promise.js R node_modules/bluebird/js/release/promise_array.js R node_modules/bluebird/js/release/promisify.js R node_modules/bluebird/js/release/props.js R node_modules/bluebird/js/release/queue.js R node_modules/bluebird/js/release/race.js R node_modules/bluebird/js/release/reduce.js R node_modules/bluebird/js/release/schedule.js R node_modules/bluebird/js/release/settle.js R node_modules/bluebird/js/release/some.js R node_modules/bluebird/js/release/synchronous_inspection.js R node_modules/bluebird/js/release/thenables.js A node_modules/bluebird/js/release/timers.js R node_modules/bluebird/js/release/using.js R node_modules/bluebird/js/release/util.js D node_modules/bluebird/js/zalgo/any.js D node_modules/bluebird/js/zalgo/assert.js D node_modules/bluebird/js/zalgo/async.js D node_modules/bluebird/js/zalgo/bluebird.js D node_modules/bluebird/js/zalgo/call_get.js D node_modules/bluebird/js/zalgo/cancel.js D node_modules/bluebird/js/zalgo/captured_trace.js D node_modules/bluebird/js/zalgo/catch_filter.js D node_modules/bluebird/js/zalgo/direct_resolve.js D node_modules/bluebird/js/zalgo/each.js D node_modules/bluebird/js/zalgo/errors.js D node_modules/bluebird/js/zalgo/es5.js D node_modules/bluebird/js/zalgo/filter.js D node_modules/bluebird/js/zalgo/finally.js D node_modules/bluebird/js/zalgo/generators.js D node_modules/bluebird/js/zalgo/join.js D node_modules/bluebird/js/zalgo/map.js D node_modules/bluebird/js/zalgo/nodeify.js D
[MediaWiki-commits] [Gerrit] [WPtouch] Add jenkins tests - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: [WPtouch] Add jenkins tests .. [WPtouch] Add jenkins tests Add mw-checks-test test. Change-Id: I6c3eee5b0603a1ad81e6383c5c6ed5df133321d2 --- M zuul/layout.yaml 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index b84406a..08ba724 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2016,6 +2016,10 @@ template: - name: mw-checks + - name: mediawiki/skins/WPtouch +template: + - name: mw-checks-test + - name: mediawiki/tools/code-utils check-voter: - php53lint -- To view, visit https://gerrit.wikimedia.org/r/266306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c3eee5b0603a1ad81e6383c5c6ed5df133321d2 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Hashar Gerrit-Reviewer: Jack Phoenix 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] Remove lint:ignore:80chars comments - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Remove lint:ignore:80chars comments .. Remove lint:ignore:80chars comments We have been ignoring the 80 char limit globally since 92b59d2. Change-Id: I372e153d2b9ca18c5f52f5c9c3d771ec7203101f --- M puppet/modules/mediawiki/manifests/import/dump.pp M puppet/modules/mysql/manifests/sql.pp M puppet/modules/mysql/manifests/user.pp M puppet/modules/payments/manifests/donation_interface.pp M puppet/modules/role/manifests/antispam.pp M puppet/modules/role/manifests/centralauth.pp M puppet/modules/role/manifests/centralauth/migrate_user.pp M puppet/modules/role/manifests/cirrussearch.pp M puppet/modules/role/manifests/gettingstarted.pp M puppet/modules/role/manifests/globalcssjs.pp M puppet/modules/role/manifests/graphoid.pp M puppet/modules/role/manifests/hadoop.pp M puppet/modules/role/manifests/mobilefrontend.pp M puppet/modules/role/manifests/molhandler.pp M puppet/modules/role/manifests/poolcounter.pp M puppet/modules/role/manifests/raita.pp M puppet/modules/role/manifests/svg.pp 17 files changed, 0 insertions(+), 38 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/mediawiki/manifests/import/dump.pp b/puppet/modules/mediawiki/manifests/import/dump.pp index 8f73ea9..e4a2f7f 100644 --- a/puppet/modules/mediawiki/manifests/import/dump.pp +++ b/puppet/modules/mediawiki/manifests/import/dump.pp @@ -35,10 +35,8 @@ require ::mediawiki exec { "import_dump_${title}": -# lint:ignore:80chars command => "/usr/local/bin/mwscript importDump.php --wiki=${db_name} ${xml_dump}", unless => "/usr/local/bin/mwscript pageExists.php --wiki=${db_name} ${dump_sentinel_page}", -# lint:endignore user=> 'www-data', require => Mediawiki::Wiki[$wiki], } diff --git a/puppet/modules/mysql/manifests/sql.pp b/puppet/modules/mysql/manifests/sql.pp index d9916ef..19040ab 100644 --- a/puppet/modules/mysql/manifests/sql.pp +++ b/puppet/modules/mysql/manifests/sql.pp @@ -34,10 +34,8 @@ $quoted_unless = regsubst($unless, '"', '\\"', 'G') exec { $title: -# lint:ignore:80chars command => "/usr/bin/mysql -uroot -p${mysql::root_password} -qfsAe \"${quoted_sql}\"", unless => "/usr/bin/mysql -uroot -p${mysql::root_password} -qfsANe \"${quoted_unless}\" | /usr/bin/tail -1 | /bin/grep -q 1", -# lint:endignore require => Exec['set_mysql_password'], } } diff --git a/puppet/modules/mysql/manifests/user.pp b/puppet/modules/mysql/manifests/user.pp index 5531671..f0f98b3 100644 --- a/puppet/modules/mysql/manifests/user.pp +++ b/puppet/modules/mysql/manifests/user.pp @@ -56,10 +56,8 @@ } } else { mysql::sql { "create user ${username}": -# lint:ignore:80chars sql=> "grant ${grant} to '${username}'@'${hostname}' identified by '${password}'", unless => "select exists(select 1 from mysql.user where user = '${username}')", -# lint:endignore } } } diff --git a/puppet/modules/payments/manifests/donation_interface.pp b/puppet/modules/payments/manifests/donation_interface.pp index dea8161..ebb7f6e 100644 --- a/puppet/modules/payments/manifests/donation_interface.pp +++ b/puppet/modules/payments/manifests/donation_interface.pp @@ -26,13 +26,11 @@ # TODO: the following cruft is brought to u by a forward reference snafu. # Better if DonationInterfaceFormSettings would use relative paths? - # lint:ignore:80chars wgAdyenGatewayHtmlFormDir=> "${DI}/adyen_gateway/forms/html", wgAmazonGatewayHtmlFormDir => "${DI}/amazon_gateway/forms/html", wgGlobalCollectGatewayHtmlFormDir=> "${DI}/globalcollect_gateway/forms/html", wgPayflowProGatewayHtmlFormDir => "${DI}/payflowpro_gateway/forms/html", wgPaypalGatewayHtmlFormDir => "${DI}/paypal_gateway/forms/html", - # lint:endignore wgAdyenGatewayAccountInfo=> { 'test' => { diff --git a/puppet/modules/role/manifests/antispam.pp b/puppet/modules/role/manifests/antispam.pp index 7683553..13c4518 100644 --- a/puppet/modules/role/manifests/antispam.pp +++ b/puppet/modules/role/manifests/antispam.pp @@ -7,7 +7,6 @@ mediawiki::extension { 'AbuseFilter': needs_update => true, -# lint:ignore:80chars settings => [ '$wgGroupPermissions["sysop"]["abusefilter-modify"] = true', '$wgGroupPermissions["*"]["abusefilter-log-detail"] = true', @@ -17,7 +16,6 @@ '$wgGroupPermissions["sysop"]["abusefilter-modify-restricted"] = true', '$wgGroupPermissions["sysop"]["abusefilter-revert"] = true', ], -# lint:endignore } mediawiki::extension {
[MediaWiki-commits] [Gerrit] Bump mediawiki-vagrant plugin version in Gemfile.lock - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Bump mediawiki-vagrant plugin version in Gemfile.lock .. Bump mediawiki-vagrant plugin version in Gemfile.lock Needed after 8fc7121. Shame on me for not testing locally via Bundler and doing the bump in the same commit. Change-Id: Iff7c6414e2576577ef172a6b9e7b0b611bae2d12 --- M Gemfile.lock 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/Gemfile.lock b/Gemfile.lock index 4c60baa..a1507dd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -23,7 +23,7 @@ PATH remote: . specs: -mediawiki-vagrant (0.12.0) +mediawiki-vagrant (0.13.0) GEM remote: https://rubygems.org/ -- To view, visit https://gerrit.wikimedia.org/r/266191 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff7c6414e2576577ef172a6b9e7b0b611bae2d12 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavisGerrit-Reviewer: Dduvall Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed SMW date parsing - now all parsing done with strtoti... - change (mediawiki...SemanticForms)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/266494 Change subject: Removed SMW date parsing - now all parsing done with strtotime() .. Removed SMW date parsing - now all parsing done with strtotime() Change-Id: Ia377fcdcd77221527d9696b7bef8fb73699a0d6f --- M includes/forminputs/SF_DateInput.php 1 file changed, 1 insertion(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/94/266494/1 diff --git a/includes/forminputs/SF_DateInput.php b/includes/forminputs/SF_DateInput.php index 4a199c5..d026498 100644 --- a/includes/forminputs/SF_DateInput.php +++ b/includes/forminputs/SF_DateInput.php @@ -73,41 +73,7 @@ return array( $year, $month, $day ); } - if ( class_exists( 'SMWTimeValue' ) ) { - return self::parseDateSMW( $date ); - } else { - return self::parseDateNonSMW( $date ); - } - } - - static function parseDateSMW( $date ) { - $day = null; - $month = null; - $actual_date = new SMWTimeValue( '_dat' ); - $actual_date->setUserValue( $date ); - $year = $actual_date->getYear(); - // TODO - "BC" should be an i18n message. - if ( $year < 0 ) { - $year = ( $year * - 1 + 1 ) . ' BC'; - } - // Use precision of the date to determine whether we should - // also set the month and day. - if ( method_exists( $actual_date->getDataItem(), 'getPrecision' ) ) { - $precision = $actual_date->getDataItem()->getPrecision(); - if ( $precision > SMWDITime::PREC_Y ) { - $month = $actual_date->getMonth(); - } - if ( $precision > SMWDITime::PREC_YM ) { - $day = $actual_date->getDay(); - } - } else { - // There's some sort of error - make everything blank. - $year = null; - } - return array( $year, $month, $day ); - } - - static function parseDateNonSMW( $date ) { + // All other dates. if ( ctype_digit( $date ) ) { return array( $date, null, null ); } -- To view, visit https://gerrit.wikimedia.org/r/266494 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia377fcdcd77221527d9696b7bef8fb73699a0d6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed SMW date parsing - now all parsing done with strtoti... - change (mediawiki...SemanticForms)
Yaron Koren has submitted this change and it was merged. Change subject: Removed SMW date parsing - now all parsing done with strtotime() .. Removed SMW date parsing - now all parsing done with strtotime() Change-Id: Ia377fcdcd77221527d9696b7bef8fb73699a0d6f --- M includes/forminputs/SF_DateInput.php 1 file changed, 1 insertion(+), 35 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/forminputs/SF_DateInput.php b/includes/forminputs/SF_DateInput.php index 4a199c5..d026498 100644 --- a/includes/forminputs/SF_DateInput.php +++ b/includes/forminputs/SF_DateInput.php @@ -73,41 +73,7 @@ return array( $year, $month, $day ); } - if ( class_exists( 'SMWTimeValue' ) ) { - return self::parseDateSMW( $date ); - } else { - return self::parseDateNonSMW( $date ); - } - } - - static function parseDateSMW( $date ) { - $day = null; - $month = null; - $actual_date = new SMWTimeValue( '_dat' ); - $actual_date->setUserValue( $date ); - $year = $actual_date->getYear(); - // TODO - "BC" should be an i18n message. - if ( $year < 0 ) { - $year = ( $year * - 1 + 1 ) . ' BC'; - } - // Use precision of the date to determine whether we should - // also set the month and day. - if ( method_exists( $actual_date->getDataItem(), 'getPrecision' ) ) { - $precision = $actual_date->getDataItem()->getPrecision(); - if ( $precision > SMWDITime::PREC_Y ) { - $month = $actual_date->getMonth(); - } - if ( $precision > SMWDITime::PREC_YM ) { - $day = $actual_date->getDay(); - } - } else { - // There's some sort of error - make everything blank. - $year = null; - } - return array( $year, $month, $day ); - } - - static function parseDateNonSMW( $date ) { + // All other dates. if ( ctype_digit( $date ) ) { return array( $date, null, null ); } -- To view, visit https://gerrit.wikimedia.org/r/266494 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia377fcdcd77221527d9696b7bef8fb73699a0d6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Only build one graphics distribution (mixed/vector/ra... - change (oojs/ui)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/266495 Change subject: build: Only build one graphics distribution (mixed/vector/raster), not all .. build: Only build one graphics distribution (mixed/vector/raster), not all Honestly, there is no reason ever for anyone to use anything other than the default 'mixed' distribution. But we can pretend for a bit longer. We now only build one of the CSS graphics distributions at a time. * `grunt build` will build the 'mixed' one. * `grunt build --graphics=vector` will build the 'vector' one. * `grunt build --graphics=raster` will build the 'raster' one. There are no more `.vector.css` and `.raster.css` suffixes, as there's no more need for them. As we can only build and use one graphics distribution at once, the demo no longer has an option to choose one. It will just always use the one that OOjs UI was built with. Also, `grunt quick-build` is back to building the 'vector' distribution (reverting 02eb23b4). Previously it would build the 'mixed' one with no PNG images, because the `.vector.css` suffix was inconvenient. This hack is no longer needed, as the suffix is gone. Bug: T92464 Change-Id: Ic6309b4e98a9f855891dcd85b112d5326a50cf7a --- M Gruntfile.js M demos/demo.js M demos/widgets.php 3 files changed, 34 insertions(+), 106 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/95/266495/1 diff --git a/Gruntfile.js b/Gruntfile.js index d51e4d8..7701198 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,15 +6,12 @@ module.exports = function ( grunt ) { var modules = grunt.file.readJSON( 'build/modules.json' ), pkg = grunt.file.readJSON( 'package.json' ), - lessFiles = { - raster: {}, - vector: {}, - mixed: {} - }, + lessFiles = {}, colorizeSvgFiles = {}, requiredFiles = modules[ 'oojs-ui' ].scripts.slice(), concatCssFiles = {}, rtlFiles = {}, + lessTarget = grunt.option( 'graphics' ) || 'mixed', minBanner = '/*! OOjs UI v<%= pkg.version %> | http://oojs.mit-license.org */'; grunt.loadNpmTasks( 'grunt-jsonlint' ); @@ -39,7 +36,7 @@ grunt.loadTasks( 'build/tasks' ); ( function () { - var distFile, target, module, moduleStyleFiles; + var distFile, module, moduleStyleFiles; function rtlPath( fileName ) { return fileName.replace( /\.(\w+)$/, '.rtl.$1' ); } @@ -64,12 +61,12 @@ } }; - cssFileName = fileName.replace( /\.json$/, '.css' ).replace( /^src/, 'dist/tmp/' + target ); - lessFiles[ target ][ cssFileName ] = [ lessFileName ]; - lessFiles[ target ][ rtlPath( cssFileName ) ] = [ rtlPath( lessFileName ) ]; + cssFileName = fileName.replace( /\.json$/, '.css' ).replace( /^src/, 'dist/tmp' ); + lessFiles[ cssFileName ] = [ lessFileName ]; + lessFiles[ rtlPath( cssFileName ) ] = [ rtlPath( lessFileName ) ]; } else { - cssFileName = fileName.replace( /\.less$/, '.css' ).replace( /^src/, 'dist/tmp/' + target ); - lessFiles[ target ][ cssFileName ] = [ fileName ]; + cssFileName = fileName.replace( /\.less$/, '.css' ).replace( /^src/, 'dist/tmp' ); + lessFiles[ cssFileName ] = [ fileName ]; rtlFiles[ rtlPath( cssFileName ) ] = cssFileName; } return cssFileName; @@ -77,14 +74,12 @@ for ( module in modules ) { if ( modules[ module ].styles ) { moduleStyleFiles = modules[ module ].styles; - for ( target in lessFiles ) { - requiredFiles.push.apply( requiredFiles, moduleStyleFiles ); + requiredFiles.push.apply( requiredFiles, moduleStyleFiles ); - distFile = 'dist/' + module + ( target !== 'mixed' ? '.' + target : '' ) + '.css'; + distFile = 'dist/' + module + '.css'; - concatCssFiles[ distFile ] = moduleStyleFiles.map( processFile ); - concatCssFiles[ rtlPath( distFile ) ] = concatCssFiles[ distFile ].map( rtlPath ); - } + concatCssFiles[
[MediaWiki-commits] [Gerrit] Clarify and add GENDER support to a few messages - change (mediawiki...OpenBadges)
PranavK has uploaded a new change for review. https://gerrit.wikimedia.org/r/266496 Change subject: Clarify and add GENDER support to a few messages .. Clarify and add GENDER support to a few messages Changed "e-mail" to "email address" Added GENDER support to ob-db-user-no-email-confirmation Bug: T124744 Change-Id: Ic70d8cecd7be3fb8440ca2079bef2fa03efde43e --- M SpecialBadgeIssue.php M i18n/en.json M i18n/qqq.json 3 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenBadges refs/changes/96/266496/1 diff --git a/SpecialBadgeIssue.php b/SpecialBadgeIssue.php index 29ad480..283d0b5 100644 --- a/SpecialBadgeIssue.php +++ b/SpecialBadgeIssue.php @@ -132,7 +132,7 @@ return wfMessage( 'ob-db-user-no-email' ); } if ( $wgOpenBadgesRequireEmailConfirmation && !$recipient->isEmailConfirmed() ) { - return wfMessage( 'ob-db-user-no-email-confirmation' ); + return wfMessage( 'ob-db-user-no-email-confirmation' )->params( $recipient )->parse(); } return true; diff --git a/i18n/en.json b/i18n/en.json index b8e0730..4d6424d 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -33,8 +33,8 @@ "ob-issue-type": "Badge", "ob-issue-evidence": "Evidence URL", "ob-db-user-not-found": "User doesn't exist.", - "ob-db-user-no-email": "User hasn't entered an e-mail.", - "ob-db-user-no-email-confirmation": "User hasn't confirmed their e-mail.", + "ob-db-user-no-email": "User hasn't entered an email address.", + "ob-db-user-no-email-confirmation": "User hasn't confirmed their email address.", "ob-db-evidence-not-url": "The evidence must be a URL.", "ob-db-badge-not-found": "Badge doesn't exist.", "ob-db-unknown-error": "Unknown database error.", diff --git a/i18n/qqq.json b/i18n/qqq.json index a648e08..eb597c0 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -40,7 +40,7 @@ "ob-issue-evidence": "Evidence URL, form field to input the url of the evidence supporting the badge being awarded", "ob-db-user-not-found": "Error message if user does not exist", "ob-db-user-no-email": "Error message if user hasn't entered an e-mail", - "ob-db-user-no-email-confirmation": "Error message if user hasn't confirmed their e-mail", + "ob-db-user-no-email-confirmation": "Error message if user hasn't confirmed their e-mail. Parameters:\n* $1 - username, used for GENDER support", "ob-db-evidence-not-url": "Error message if the evidence is not a URL", "ob-db-badge-not-found": "Error message if badge does not exist", "ob-db-unknown-error": "Error message for unknown database error", -- To view, visit https://gerrit.wikimedia.org/r/266496 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic70d8cecd7be3fb8440ca2079bef2fa03efde43e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OpenBadges Gerrit-Branch: master Gerrit-Owner: PranavK___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable RPS on eth0 on labstores - change (operations/puppet)
Rush has submitted this change and it was merged. Change subject: Enable RPS on eth0 on labstores .. Enable RPS on eth0 on labstores During recent Labs NFS overload situations, we've seen timeouts on CPU #0 and ksoftirqd/0 consuming high amount of CPU. A quick look in /proc/interrupts reveals why: all network interrupts (and megasas as well) are being handled by CPU #0. No irqbalance running either. This naive patch enables Receive Packet Steering (RPS), which will hopefully improve the situation, but may need further tweaking. Change-Id: I28780014759fb0cbf4d0123cae1ae0c233a515b2 --- M modules/role/manifests/labs/nfs/fileserver.pp 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Rush: Looks good to me, approved coren: Looks good to me, but someone else must approve BBlack: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/role/manifests/labs/nfs/fileserver.pp b/modules/role/manifests/labs/nfs/fileserver.pp index ee01956..cf09d59 100644 --- a/modules/role/manifests/labs/nfs/fileserver.pp +++ b/modules/role/manifests/labs/nfs/fileserver.pp @@ -7,6 +7,9 @@ include standard include ::labstore::fileserver +# Enable RPS to balance IRQs over CPUs +interface::rps { $monitor: } + class { '::labstore::monitoring': monitor_iface => $monitor, } -- To view, visit https://gerrit.wikimedia.org/r/261598 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28780014759fb0cbf4d0123cae1ae0c233a515b2 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark BergsmaGerrit-Reviewer: BBlack Gerrit-Reviewer: Chasemp Gerrit-Reviewer: Mark Bergsma Gerrit-Reviewer: Rush Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: coren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki.page.patrol.ajax: Use formatversion=2 for API requ... - change (mediawiki/core)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/266498 Change subject: mediawiki.page.patrol.ajax: Use formatversion=2 for API requests .. mediawiki.page.patrol.ajax: Use formatversion=2 for API requests With formatversion=2 the response uses UTF-8 instead of escape sequences with hex for encoding of non-ASCII characters (e.g. "\u00e4" for "ä"). The other syntax changes of formatversion=2 have no effect here. Change-Id: I0937cb0e9f757758cbaf0a2fd8dc0ef2c9a13c64 --- M resources/src/mediawiki/page/patrol.ajax.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/266498/1 diff --git a/resources/src/mediawiki/page/patrol.ajax.js b/resources/src/mediawiki/page/patrol.ajax.js index f9b0d35..a63202f 100644 --- a/resources/src/mediawiki/page/patrol.ajax.js +++ b/resources/src/mediawiki/page/patrol.ajax.js @@ -31,6 +31,7 @@ apiRequest = new mw.Api(); apiRequest.postWithToken( 'patrol', { + formatversion: 2, action: 'patrol', rcid: rcid } ) -- To view, visit https://gerrit.wikimedia.org/r/266498 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0937cb0e9f757758cbaf0a2fd8dc0ef2c9a13c64 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [ShortUrlApi] Replace jslint test with jsonlint and jshint - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: [ShortUrlApi] Replace jslint test with jsonlint and jshint .. [ShortUrlApi] Replace jslint test with jsonlint and jshint The repo is currently empty and i am not sure why but it was using deprecated jslint test so lets migrate to jshint and jsonlint even though npm is the one we should. Change-Id: I9d99758d83ba315cf502b45c613b8616c867485f --- M jjb/mediawiki-extensions.yaml M zuul/layout.yaml 2 files changed, 2 insertions(+), 4 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml index eaa70ee..28066e4 100644 --- a/jjb/mediawiki-extensions.yaml +++ b/jjb/mediawiki-extensions.yaml @@ -878,7 +878,6 @@ - mwext-SemanticWatchlist - mwext-SemanticWebBrowser - mwext-SharedCssJs - - mwext-ShortUrlApi - mwext-ShoutBox - mwext-SidebarDonateBox - mwext-SideBarMenu diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 08ba724..943e217 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -865,8 +865,6 @@ voting: false - name: mwext-SemanticSifter-jslint voting: false - - name: mwext-ShortUrlApi-jslint -voting: false - name: mwext-SignWritingMediaWikiPlugin-jslint voting: false - name: mwext-SlimboxThumbs-jslint @@ -5359,7 +5357,8 @@ - name: mediawiki/extensions/ShortUrlApi template: - - name: extension-jslint + - name: jsonlint + - name: jshint - name: extension-unittests - name: mediawiki/extensions/ShoutBox -- To view, visit https://gerrit.wikimedia.org/r/264599 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d99758d83ba315cf502b45c613b8616c867485f Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] esams: remove varnish-fe, nginx services from mobile cluster - change (operations/puppet)
Ema has uploaded a new change for review. https://gerrit.wikimedia.org/r/266499 Change subject: esams: remove varnish-fe,nginx services from mobile cluster .. esams: remove varnish-fe,nginx services from mobile cluster Bug: T109286 Change-Id: I5f58fd5062544382dbf2b1b41b0ae0cd3426985c --- M conftool-data/nodes/esams.yaml 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/266499/1 diff --git a/conftool-data/nodes/esams.yaml b/conftool-data/nodes/esams.yaml index 16e8400..931597d6 100644 --- a/conftool-data/nodes/esams.yaml +++ b/conftool-data/nodes/esams.yaml @@ -1,8 +1,8 @@ cache_mobile: - cp3015.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] - cp3016.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] - cp3017.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] - cp3018.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] + cp3015.esams.wmnet: [varnish-be, varnish-be-rand] + cp3016.esams.wmnet: [varnish-be, varnish-be-rand] + cp3017.esams.wmnet: [varnish-be, varnish-be-rand] + cp3018.esams.wmnet: [varnish-be, varnish-be-rand] cp3003.esams.wmnet: [varnish-fe, nginx] cp3004.esams.wmnet: [varnish-fe, nginx] cp3005.esams.wmnet: [varnish-fe, nginx] -- To view, visit https://gerrit.wikimedia.org/r/266499 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5f58fd5062544382dbf2b1b41b0ae0cd3426985c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ema___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change ukwikinews logo - change (operations/mediawiki-config)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/266497 Change subject: Change ukwikinews logo .. Change ukwikinews logo Bug: T124778 Change-Id: Ifcbbb30c66fa59ce927e81493e04107fbacaf695 --- M w/static/images/project-logos/ukwikinews.png M wmf-config/InitialiseSettings.php 2 files changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/97/266497/1 diff --git a/w/static/images/project-logos/ukwikinews.png b/w/static/images/project-logos/ukwikinews.png index a2ee6cb..39bd54c 100644 --- a/w/static/images/project-logos/ukwikinews.png +++ b/w/static/images/project-logos/ukwikinews.png Binary files differ diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index d0d17af..9f462e4 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -955,6 +955,7 @@ 'srwikinews' => '/static/images/project-logos/srwikinews.png', 'tawikinews' => '/static/images/project-logos/tawikinews.png', 'thwikinews' => '/static/images/project-logos/thwikinews.png', + 'ukwikinews' => '/static/images/project-logos/ukwikinews.png', // T124778 // Wikisource 'sourceswiki' => '/static/images/project-logos/sourceswiki.png', -- To view, visit https://gerrit.wikimedia.org/r/266497 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifcbbb30c66fa59ce927e81493e04107fbacaf695 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config 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] esams: remove varnish-fe, nginx services from mobile cluster - change (operations/puppet)
Ema has submitted this change and it was merged. Change subject: esams: remove varnish-fe,nginx services from mobile cluster .. esams: remove varnish-fe,nginx services from mobile cluster Bug: T109286 Change-Id: I5f58fd5062544382dbf2b1b41b0ae0cd3426985c --- M conftool-data/nodes/esams.yaml 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Ema: Verified; Looks good to me, approved BBlack: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/conftool-data/nodes/esams.yaml b/conftool-data/nodes/esams.yaml index 16e8400..931597d6 100644 --- a/conftool-data/nodes/esams.yaml +++ b/conftool-data/nodes/esams.yaml @@ -1,8 +1,8 @@ cache_mobile: - cp3015.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] - cp3016.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] - cp3017.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] - cp3018.esams.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] + cp3015.esams.wmnet: [varnish-be, varnish-be-rand] + cp3016.esams.wmnet: [varnish-be, varnish-be-rand] + cp3017.esams.wmnet: [varnish-be, varnish-be-rand] + cp3018.esams.wmnet: [varnish-be, varnish-be-rand] cp3003.esams.wmnet: [varnish-fe, nginx] cp3004.esams.wmnet: [varnish-fe, nginx] cp3005.esams.wmnet: [varnish-fe, nginx] -- To view, visit https://gerrit.wikimedia.org/r/266499 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f58fd5062544382dbf2b1b41b0ae0cd3426985c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: EmaGerrit-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] m4-master is now the eventlogging master (pointed by dbproxy... - change (operations/software)
Jcrespo has uploaded a new change for review. https://gerrit.wikimedia.org/r/266500 Change subject: m4-master is now the eventlogging master (pointed by dbproxy1004) .. m4-master is now the eventlogging master (pointed by dbproxy1004) Change-Id: Ie4f90593d4a35c6a89db9675105feee23fca32cb --- M dbtools/eventlogging_resync.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software refs/changes/00/266500/1 diff --git a/dbtools/eventlogging_resync.sh b/dbtools/eventlogging_resync.sh index 223aa83..d4365b0 100755 --- a/dbtools/eventlogging_resync.sh +++ b/dbtools/eventlogging_resync.sh @@ -7,7 +7,7 @@ db='log' ls="regexp '^[A-Z0-9].*[0-9]+$'" -mhost='m2-master' +mhost='m4-master' shost="$1" since="$2" -- To view, visit https://gerrit.wikimedia.org/r/266500 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4f90593d4a35c6a89db9675105feee23fca32cb Gerrit-PatchSet: 1 Gerrit-Project: operations/software Gerrit-Branch: master Gerrit-Owner: Jcrespo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] m4-master is now the eventlogging master (pointed by dbproxy... - change (operations/software)
Jcrespo has submitted this change and it was merged. Change subject: m4-master is now the eventlogging master (pointed by dbproxy1004) .. m4-master is now the eventlogging master (pointed by dbproxy1004) Change-Id: Ie4f90593d4a35c6a89db9675105feee23fca32cb --- M dbtools/eventlogging_resync.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jcrespo: Verified; Looks good to me, approved Ottomata: Looks good to me, but someone else must approve diff --git a/dbtools/eventlogging_resync.sh b/dbtools/eventlogging_resync.sh index 223aa83..d4365b0 100755 --- a/dbtools/eventlogging_resync.sh +++ b/dbtools/eventlogging_resync.sh @@ -7,7 +7,7 @@ db='log' ls="regexp '^[A-Z0-9].*[0-9]+$'" -mhost='m2-master' +mhost='m4-master' shost="$1" since="$2" -- To view, visit https://gerrit.wikimedia.org/r/266500 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie4f90593d4a35c6a89db9675105feee23fca32cb Gerrit-PatchSet: 1 Gerrit-Project: operations/software Gerrit-Branch: master Gerrit-Owner: JcrespoGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add jsonlint to npm test command - change (mediawiki...ContributionTracking)
jenkins-bot has submitted this change and it was merged. Change subject: Add jsonlint to npm test command .. Add jsonlint to npm test command Bug: T63599 Change-Id: I8f1d9c4f2caa957baa5015e85d7f50525b98 --- M Gruntfile.js M package.json 2 files changed, 9 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js index bfa9a38..cd0e704 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -9,6 +9,7 @@ 'use strict'; grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.initConfig( { jshint: { @@ -22,9 +23,15 @@ }, banana: { all: ['i18n/'] + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] } } ); - grunt.registerTask( 'test', [ 'jshint', 'banana' ] ); + grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/package.json b/package.json index e43f212..f2b1966 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "grunt": "0.4.5", "grunt-cli": "0.1.13", "grunt-contrib-jshint": "0.11.3", +"grunt-jsonlint": "1.0.7", "grunt-banana-checker": "0.4.0" } } -- To view, visit https://gerrit.wikimedia.org/r/262704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f1d9c4f2caa957baa5015e85d7f50525b98 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ContributionTracking Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Awight Gerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox 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] tests: mw exts having npm do not need extension-jslint - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: tests: mw exts having npm do not need extension-jslint .. tests: mw exts having npm do not need extension-jslint The more specific jobs mwext-*-jslint were introduced so we can make them non voting until jshint/jsonlint pass. Whenever npm is already invoked, it should be used to run jshint/jsonlint. Test MediaWiki extensions in Zuul having 'npm' template no more have the 'extension-jslint' template. Drop extension-jslint from: AjaxLogin ContributionTracking jshinthttps://gerrit.wikimedia.org/r/#/c/262703/ jsonlint https://gerrit.wikimedia.org/r/#/c/262704/ DismissableSiteNotice DynamicSidebar Quiz TocTree ZeroBanner Corresponding source changes are tracked via change id Ibae36050a1d8054b7280804513a258bc7cd8960f Depends-On: Ibae36050a1d8054b7280804513a258bc7cd8960f Change-Id: Ib4755d66369c44da0282d703d4c260434b50b03b --- M jjb/mediawiki-extensions.yaml A tests/test_zuul_layout.py M zuul/layout.yaml 3 files changed, 54 insertions(+), 18 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml index 28066e4..0062eb2 100644 --- a/jjb/mediawiki-extensions.yaml +++ b/jjb/mediawiki-extensions.yaml @@ -645,7 +645,6 @@ jobs: - '{name}-jslint': name: - - mwext-AjaxLogin - mwext-ApiExplorer - mwext-ArticleCreationWorkflow - mwext-ArticleFeedback @@ -669,7 +668,6 @@ - mwext-CongressLookup - mwext-Contest - mwext-ContributionReporting - - mwext-ContributionTracking - mwext-Contributors - mwext-Convert2Wiki - mwext-CopyToClipboard @@ -686,7 +684,6 @@ - mwext-Dice - mwext-DidYouKnow - mwext-DidYouMean - - mwext-DismissableSiteNotice - mwext-DisqusTag - mwext-DjangoAnalytics - mwext-DownloadCounter @@ -695,7 +692,6 @@ - mwext-DumpHTML - mwext-Duplicator - mwext-DynamicPageList - - mwext-DynamicSidebar - mwext-EditSubpages - mwext-EnhanceContactForm - mwext-ErrorHandler @@ -835,7 +831,6 @@ - mwext-PushToWatch - mwext-Quantcast - mwext-QuickResponse - - mwext-Quiz - mwext-QuizGame - mwext-QuizTabulate - mwext-RandomFeaturedUser @@ -919,7 +914,6 @@ - mwext-TimeMachine - mwext-TimezoneSelector - mwext-TitleIcon - - mwext-TocTree - mwext-TranslateSvg - mwext-TweetANew - mwext-UIFeedback @@ -938,7 +932,6 @@ - mwext-WikivoteMapsYandex - mwext-WYSIWYG - mwext-XMLContentExtension - - mwext-ZeroBanner - project: name: 'mwext-CirrusSearch' diff --git a/tests/test_zuul_layout.py b/tests/test_zuul_layout.py new file mode 100644 index 000..767de0f --- /dev/null +++ b/tests/test_zuul_layout.py @@ -0,0 +1,37 @@ +# Parse Zuul layout.yaml file +# +# Copyright (c) 2016 - Antoine "hashar" Musso +# Copyright (c) 2016 - Wikimedia Foundation Inc. + +import os +import unittest + +import yaml + + +class TestZuulLayout(unittest.TestCase): + +layout = None + +@classmethod +def setUpClass(cls): +wmf_zuul_layout = os.path.join( +os.path.dirname(os.path.abspath(__file__)), +'../zuul/layout.yaml') +with open(wmf_zuul_layout, 'r') as f: +cls.layout = yaml.load(f) + +def test_mwext_legacy_jslint_replaced_by_npm(self): +exts = sorted([ +p['name'] +for p in self.layout['projects'] +if p['name'].startswith('mediawiki/extensions/') +and {'name': 'npm'} in p.get('template', []) +and {'name': 'extension-jslint'} in p.get('template', []) +]) + +self.maxDiff = None +self.longMessage = True +self.assertListEqual( +[], exts, +'MediaWiki extensions having npm do not need "extension-jslint"') diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 943e217..5b5cdfa 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -758,8 +758,6 @@ voting: false - name: mwext-CommunityVoice-jslint # bug 61595 voting: false - - name: mwext-ContributionTracking-jslint # bug 61599 -voting: false - name: mwext-CustomUserSignup-jslint # bug 61600 voting: false - name: mwext-Drafts-jslint # bug 61603 @@ -771,8 +769,6 @@ - name: mwext-JsonData-jslint # bug 61607 voting: false - name: mwext-LastModified-jslint # bug 61608 -voting: false - - name: mwext-Quiz-jslint # bug 61620 voting: false - name: mwext-SVGEdit-jslint # bug 61625 voting: false @@ -2948,9
[MediaWiki-commits] [Gerrit] Refactor more languages - change (mediawiki...Wikibase)
Jonas Kress (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/266501 Change subject: Refactor more languages .. Refactor more languages Change-Id: I2bd6ed3d3395ab7b3b5653b9c0d5918e66e73aae --- M view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js 1 file changed, 79 insertions(+), 39 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/01/266501/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js b/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js index 7a8df33..2b9e912 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js @@ -71,6 +71,11 @@ _isInEditMode: false, /** +* @type {Object} +*/ + _moreLanguagesItemsPerLanguage: {}, + + /** * @see jQuery.ui.TemplatedWidget._create */ _create: function() { @@ -216,56 +221,91 @@ * @private */ _createEntitytermsforlanguagelistviewMore: function() { - var self = this, - listview = this.$listview.data( 'listview' ), - lia = listview.listItemAdapter(), - languages = this._getAdditionalLanguages(), - itemsPerLanguage = {}; + var self = this; - if ( $.isEmptyObject( languages ) ) { + if ( $.isEmptyObject( this._getAdditionalLanguages() ) ) { return; } + var moreLanguagesButton = $( '' ).attr( 'href', '#' ) + .click( $.proxy( this._onMoreLanguagesButtonClicked, this ) ); + this.$entitytermsforlanguagelistviewMore = $( '' ) .addClass( 'wikibase-entitytermsforlanguagelistview-more' ) - .append( - $( '' ) - .attr( 'href', '#' ) - .text( mw.msg( 'wikibase-entitytermsforlanguagelistview-more' ) ) - .click( function() { - var $this = $( this ), - expanded = $.isEmptyObject( itemsPerLanguage ), - lang; + .append( moreLanguagesButton ); - if ( expanded ) { - for ( lang in languages ) { - var $li = listview.addItem( self._getValueForLanguage( lang ) ); - if ( self._isInEditMode ) { - lia.liInstance( $li ).startEditing(); - } - itemsPerLanguage[lang] = $li; - } - } else { - var top = $this.offset().top; - for ( lang in languages ) { - listview.removeItem( itemsPerLanguage[lang] ); - delete itemsPerLanguage[lang]; - } - self._scrollUp( $this, top ); - } - - $this.text( mw.msg( - 'wikibase-entitytermsforlanguagelistview-' + ( expanded ? 'less' : 'more' ) - ) ); - - return false; - } ) - ); - + this._toggleMoreLanguageButtonLabel(); this.element.after( this.$entitytermsforlanguagelistviewMore ); }, /** +* Click handler for more languages button +* @private +*/ + _onMoreLanguagesButtonClicked: function ( event) { + var $button = $( event.target ); + + if ( !this._isMoreLanguagesExpanded() ) { + this._addMoreLanguages(); + } else { + this._removeMoreLanguages(); + this._scrollUp( $button, $button.offset().top ); + } + + this._toggleMoreLanguageButtonLabel(); + return false; + }, + + _isMoreLanguagesExpanded: function () { + return !$.isEmptyObject( this._moreLanguagesItemsPerLanguage ); + }, + + /** +* Remove 'more' languages to listview +* @private +*/ + _removeMoreLanguages: function() { + var itemsPerLanguage =
[MediaWiki-commits] [Gerrit] Wiktionary: Add support for translingual definitions - change (mediawiki...mobileapps)
Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/266502 Change subject: Wiktionary: Add support for translingual definitions .. Wiktionary: Add support for translingual definitions Adds Translingual to the language list in code after loading the statically generated list via require(). This might later become part of a function applying several such transformations -- Norwegian Nynorsk/Bokmal headings also seem to at least sometimes differ on Wiktionary from how they appear in the list. Bug: T124727 Change-Id: I4a51f3813b1cb72ff6ee7b73fee7819a73027ac5 --- M lib/parseDefinition.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/02/266502/1 diff --git a/lib/parseDefinition.js b/lib/parseDefinition.js index c75d3e0..be164b6 100644 --- a/lib/parseDefinition.js +++ b/lib/parseDefinition.js @@ -12,6 +12,7 @@ var transforms = require('./transforms'); var parseSection = require('./parseSection'); var languageList = require('../static/languages_list.json'); +languageList.Translingual = "translingual"; /* This list has expanded beyond parts of speech to something more like "whatever categories of terms the Wiktionary editors decided to include", but we'll -- To view, visit https://gerrit.wikimedia.org/r/266502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a51f3813b1cb72ff6ee7b73fee7819a73027ac5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Let people choose a threshold - change (mediawiki...ORES)
jenkins-bot has submitted this change and it was merged. Change subject: Let people choose a threshold .. Let people choose a threshold It makes a radio button and let people choose between a "soft threshold" (high recall, low precision) and "hard threshold" (high precision, low recall). Bug: T122684 Change-Id: I295eff8ff72da84c5a446311ebe39e9eee21a11f --- M extension.json M i18n/en.json M i18n/qqq.json M includes/Hooks.php 4 files changed, 70 insertions(+), 7 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index aee13d5..4db0679 100644 --- a/extension.json +++ b/extension.json @@ -35,6 +35,9 @@ ], "OldChangesListRecentChangesLine": [ "ORES\\Hooks::onOldChangesListRecentChangesLine" + ], + "GetPreferences": [ + "ORES\\Hooks::onGetPreferences" ] }, "ResourceFileModulePaths": { @@ -57,7 +60,11 @@ "reverted", "wp10" ], - "OresDamagingThreshold": 0.87, + "OresDamagingThresholds": { + "hard": 0.70, + "soft": 0.50 + }, + "OresDamagingDefault": "hard", "OresWikiId": null, "RecentChangesFlags": { "damaging": { diff --git a/i18n/en.json b/i18n/en.json index 60b5917..3edcd59 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,7 +4,11 @@ }, "ores-desc": "Expose automated revision scores in the interface", "ores-damaging-filter": "$1 good edits", + "ores-damaging-hard": "Hard (higher)", "ores-damaging-letter": "r", + "ores-damaging-soft": "Soft (lower)", "ores-damaging-title": "This edit needs review", - "ores-damaging-legend": "ORES predicts that this change may be damaging and should be reviewed" + "ores-damaging-legend": "ORES predicts that this change may be damaging and should be reviewed", + "ores-pref-damaging": "ORES threshold for damaging model", + "prefs-ores" : "ORES" } diff --git a/i18n/qqq.json b/i18n/qqq.json index a3ca867..8e3dfd0 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -2,7 +2,11 @@ "@metadata": [], "ores-desc": "Extension summary.", "ores-damaging-filter": "Label to toggle filtering on ORES data. Parameters:\n* $1 - Action to be performed by toggling. Can be either 'show' or 'hide'.", + "ores-damaging-hard": "Name of \"Hard\" threshold ", "ores-damaging-letter": "Single letter for tagging possibly damaging recent changes.", + "ores-damaging-soft": "Name of \"Soft\" threshold ", "ores-damaging-title": "Tooltip for damaging risk icon.", - "ores-damaging-legend": "Legend for damaging risk icon." + "ores-damaging-legend": "Legend for damaging risk icon.", + "ores-pref-damaging": "Part asking for damaging threshold", + "prefs-ores" : "Name of ORES section in preferences" } diff --git a/includes/Hooks.php b/includes/Hooks.php index 835f94e..b57b671 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -76,7 +76,7 @@ $name, array &$tables, array &$fields, array &$conds, array &$query_options, array &$join_conds, FormOptions $opts ) { - global $wgOresDamagingThreshold; + $threshold = self::getThreshold(); $tables[] = 'ores_classification'; $fields[] = 'ores_probability'; @@ -84,11 +84,14 @@ 'rc_this_oldid = ores_rev AND ores_model = \'damaging\' ' . 'AND ores_is_predicted = 1 AND ores_class = \'true\'' ); + // Add user-based threshold + $fields[] = $threshold . ' AS ores_threshold'; + if ( $opts->getValue( 'hidenondamaging' ) ) { // Filter out non-damaging edits. $conds[] = 'ores_is_predicted = 1'; $conds[] = 'ores_probability > ' - . wfGetDb( DB_SLAVE )->addQuotes( $wgOresDamagingThreshold ); + . wfGetDb( DB_SLAVE )->addQuotes( $threshold ); } return true; @@ -120,6 +123,7 @@ public static function onEnhancedChangesListModifyBlockLineData( EnhancedChangesList $ecl, array &$data, RCCacheEntry $rcObj ) { + self::processRecentChangesList( $rcObj, $data ); return true; @@ -168,14 +172,58 @@ * Check if we should flag a row */ protected static function getScoreRecentChangesList( $rcObj ) { - global $wgOresDamagingThreshold; + $score =
[MediaWiki-commits] [Gerrit] eqiad: add text nodes to mobile cluster - change (operations/puppet)
Ema has uploaded a new change for review. https://gerrit.wikimedia.org/r/266503 Change subject: eqiad: add text nodes to mobile cluster .. eqiad: add text nodes to mobile cluster This patchset adds all text nodes in eqiad to the mobile cluster for varnish-fe and nginx. Bug: T109286 Change-Id: I26b4965eb6be62814528ea0c1fd4f8695f7aa83a --- M conftool-data/nodes/eqiad.yaml 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/266503/1 diff --git a/conftool-data/nodes/eqiad.yaml b/conftool-data/nodes/eqiad.yaml index a231b88..494b602 100644 --- a/conftool-data/nodes/eqiad.yaml +++ b/conftool-data/nodes/eqiad.yaml @@ -236,6 +236,14 @@ cp1047.eqiad.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] cp1059.eqiad.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] cp1060.eqiad.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] + cp1052.eqiad.wmnet: [varnish-fe, nginx] + cp1053.eqiad.wmnet: [varnish-fe, nginx] + cp1054.eqiad.wmnet: [varnish-fe, nginx] + cp1055.eqiad.wmnet: [varnish-fe, nginx] + cp1065.eqiad.wmnet: [varnish-fe, nginx] + cp1066.eqiad.wmnet: [varnish-fe, nginx] + cp1067.eqiad.wmnet: [varnish-fe, nginx] + cp1068.eqiad.wmnet: [varnish-fe, nginx] cache_upload: cp1048.eqiad.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] cp1049.eqiad.wmnet: [varnish-fe, varnish-be, varnish-be-rand, nginx] -- To view, visit https://gerrit.wikimedia.org/r/266503 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26b4965eb6be62814528ea0c1fd4f8695f7aa83a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ema___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Updated partitioning for s1 and s4 - change (operations/software)
Jcrespo has submitted this change and it was merged. Change subject: Updated partitioning for s1 and s4 .. Updated partitioning for s1 and s4 Bug: T120513 Change-Id: I522f483cea08f80a65f776c9be62489840cec702 --- M dbtools/s1-pager.sql M dbtools/s4-pager.sql 2 files changed, 107 insertions(+), 10 deletions(-) Approvals: Jcrespo: Verified; Looks good to me, approved diff --git a/dbtools/s1-pager.sql b/dbtools/s1-pager.sql index fcc3d42..125b127 100644 --- a/dbtools/s1-pager.sql +++ b/dbtools/s1-pager.sql @@ -1,7 +1,8 @@ -- enwiki select1 as n, count(rev_user) from enwiki.revision where rev_user <1 -union select 10 as n, count(rev_user) from enwiki.revision where rev_user >=1 and rev_user < 10 +union select5 as n, count(rev_user) from enwiki.revision where rev_user >=1 and rev_user <5 +union select 10 as n, count(rev_user) from enwiki.revision where rev_user >=5 and rev_user < 10 union select 20 as n, count(rev_user) from enwiki.revision where rev_user >= 10 and rev_user < 20 union select 30 as n, count(rev_user) from enwiki.revision where rev_user >= 20 and rev_user < 30 union select 40 as n, count(rev_user) from enwiki.revision where rev_user >= 30 and rev_user < 40 @@ -22,34 +23,85 @@ union select 1400 as n, count(rev_user) from enwiki.revision where rev_user >= 1200 and rev_user < 1400 union select 1600 as n, count(rev_user) from enwiki.revision where rev_user >= 1400 and rev_user < 1600 union select 1800 as n, count(rev_user) from enwiki.revision where rev_user >= 1600 and rev_user < 1800 -union select 2000 as n, count(rev_user) from enwiki.revision where rev_user >= 1800 and rev_user < 3000; +union select 2000 as n, count(rev_user) from enwiki.revision where rev_user >= 1800 and rev_user < 2000 +union select 2200 as n, count(rev_user) from enwiki.revision where rev_user >= 2000 and rev_user < 2200 +union select 2400 as n, count(rev_user) from enwiki.revision where rev_user >= 2200 and rev_user < 2400 +union select as n, count(rev_user) from enwiki.revision where rev_user >= 2400; + +-- +-- Results on 2015-12-29: +-- +-- +--+-+ +-- | n| count(rev_user) | +-- +--+-+ +-- |1 | 143012851 | +-- |5 |22262399 | +-- | 10 |17246412 | +-- | 20 |23860120 | +-- | 30 |22837407 | +-- | 40 |14815911 | +-- | 50 |13818622 | +-- | 75 |23865783 | +-- | 100 |17747080 | +-- | 150 |32002927 | +-- | 200 |26416371 | +-- | 300 |26939492 | +-- | 400 |29456398 | +-- | 500 |25721791 | +-- | 600 |19401515 | +-- | 700 |20810745 | +-- | 800 |26390816 | +-- | 900 |13651989 | +-- | 1000 |12830219 | +-- | 1200 |25810888 | +-- | 1400 |24018280 | +-- | 1600 |17205483 | +-- | 1800 |15013314 | +-- | 2000 |10100942 | +-- | 2200 | 9036396 | +-- | 2400 | 3941295 | +-- | | 5808754 | +-- +--+-+ +-- 27 rows in set (3 hours 27 min 43.58 sec) ALTER TABLE enwiki.logging DROP PRIMARY KEY, ADD PRIMARY KEY (log_id, log_user) PARTITION BY RANGE (log_user) ( PARTITION p1 VALUES LESS THAN (1), + PARTITION p5 VALUES LESS THAN (5), PARTITION p10 VALUES LESS THAN (10), PARTITION p20 VALUES LESS THAN (20), PARTITION p30 VALUES LESS THAN (30), PARTITION p40 VALUES LESS THAN (40), PARTITION p50 VALUES LESS THAN (50), - PARTITION p70 VALUES LESS THAN (75), + PARTITION p75 VALUES LESS THAN (75), PARTITION p100 VALUES LESS THAN (100), - PARTITION p120 VALUES LESS THAN (150), + PARTITION p125 VALUES LESS THAN (125), + PARTITION p150 VALUES LESS THAN (150), + PARTITION p175 VALUES LESS THAN (175), PARTITION p200 VALUES LESS THAN (200), + PARTITION p250 VALUES LESS THAN (250), PARTITION p300 VALUES LESS THAN (300), + PARTITION p350 VALUES LESS THAN (350), PARTITION p400 VALUES LESS THAN (400), + PARTITION p450 VALUES LESS THAN (450), PARTITION p500 VALUES LESS THAN (500), PARTITION p600 VALUES LESS THAN (600), PARTITION p700 VALUES LESS THAN (700), + PARTITION p750 VALUES LESS THAN (750), PARTITION p800 VALUES LESS THAN (800), PARTITION p900 VALUES LESS THAN (900), PARTITION p1000 VALUES LESS THAN (1000), + PARTITION p1100
[MediaWiki-commits] [Gerrit] Refactor MirrorMaker puppetization - change (operations...kafka)
Ottomata has submitted this change and it was merged. Change subject: Refactor MirrorMaker puppetization .. Refactor MirrorMaker puppetization This change makes MirrorMaker work with the latest 0.8.2.1-4 jessie-wikimedia .deb release at http://apt.wikimedia.org/wikimedia/pool/main/k/kafka/ Adds a kafka::mirror::jmxtrans and kafka::mirror::monitoring defines. Bug: T124077 Change-Id: I836e20a8f009ed89452630f95e570f02c522c837 --- M README.md M manifests/defaults.pp M manifests/mirror.pp M manifests/mirror/consumer.pp A manifests/mirror/init.pp A manifests/mirror/jmxtrans.pp A manifests/mirror/monitoring.pp M manifests/server/jmxtrans.pp M manifests/server/monitoring.pp D templates/consumer.properties.erb D templates/kafka-mirror.default.erb M templates/log4j.properties.erb A templates/mirror/consumer.properties.erb A templates/mirror/kafka-mirror.default.erb A templates/mirror/kafka-mirror.systemd.erb A templates/mirror/producer.properties.erb D templates/producer.properties.erb 17 files changed, 697 insertions(+), 309 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/README.md b/README.md index 31e28e0..7543730 100644 --- a/README.md +++ b/README.md @@ -72,82 +72,36 @@ `zookeeper_chroot` is optional, and allows you to specify a Znode under which Kafka will store its metadata in Zookeeper. This is useful if you want to use a single Zookeeper cluster to manage multiple Kafka clusters. -See below for information on how to create this Znode in Zookeeper. - - -## Custom Zookeeper Chroot - -If Kafka will share a Zookeeper cluster with other users, you might want to -create a Znode in zookeeper in which to store your Kafka cluster's data. -You can set the `zookeeper_chroot` parameter on the `kafka` class to do this. - -First, you'll need to create the znode manually yourself. You can use -`zkCli.sh` that ships with Zookeeper, or you can use the kafka built in -`zookeeper-shell`: - - -``` -$ kafka zookeeper-shell :2182 -Connecting to kraken-zookeeper -Welcome to ZooKeeper! -JLine support is enabled - -WATCHER:: - -WatchedEvent state:SyncConnected type:None path:null -[zk: kraken-zookeeper(CONNECTED) 0] create /my_kafka kafka -Created /my_kafka -``` - -You can use whatever chroot znode path you like. The second argument -(`data`) is arbitrary. I used 'kafka' here. - -Then: -```puppet -class { 'kafka::server': -brokers => { -'kafka-node01.example.com' => { 'id' => 1, 'port' => 12345 }, -'kafka-node02.example.com' => { 'id' => 2 }, -}, -zookeeper_hosts => ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], -# set zookeeper_chroot on the kafka class. -zookeeper_chroot => '/kafka/clusterA', -} -``` ## Kafka Mirror -Kafka MirrorMaker is usually used for inter data center Kafka cluster replication -and aggregation. You can consume from any number of source Kafka clusters, and -produce to a single destination Kafka cluster. +Kafka MirrorMaker will allow you to mirror data from multiple Kafka clusters +into another. This is useful for cross DC replication and for aggregation. ```puppet -# Configure kafka-mirror to produce to Kafka Brokers which are -# part of our kafka aggregator cluster. -class { 'kafka::mirror': -destination_brokers => { -'kafka-aggregator01.example.com' => { 'id' => 11 }, -'kafka-aggregator02.example.com' => { 'id' => 12 }, -}, -topic_whitelist => 'webrequest.*', +# Mirror the 'main' and 'secondary' Kafka clusters +# to the 'aggregate' Kafka cluster. +kafka::mirror::consumer { 'main': +mirror_name => 'aggregate', +zookeeper_url => 'zk:2181/kafka/main', } - -# Configure kafka-mirror to consume from both clusterA and clusterB -kafka::mirror::consumer { 'clusterA': -zookeeper_hosts => ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], -zookeeper_chroot => ['/kafka/clusterA'], +kafka::mirror::consumer { 'secondary': +mirror_name => 'aggregate', +zookeeper_url => 'zk:2181/kafka/secondary', } -kafka::mirror::consumer { 'clusterB': -zookeeper_hosts => ['zk-node01:2181', 'zk-node02:2181', 'zk-node03:2181'], -zookeeper_chroot => ['/kafka/clusterB'], +kafka::mirror { 'aggregate': +destination_brokers => ['ka01:9092','ka02:9092'], +whitelist => 'these_topics_only.*', } ``` +Note that the kafka-mirror service does not subscribe to its config files. If +you make changes, you will have to restart the service manually. ## jmxtrans monitoring -This module contains a class called `kafka::server::jmxtrans`. It contains -a useful jmxtrans JSON config object that can be used to tell jmxtrans to send +`kafka::server::jmxtrans` and `kafka::mirror::jmxtrans` configure +useful jmxtrans JSON config objects that can be used to tell jmxtrans to send to any output writer (Ganglia, Graphite, etc.). To you use this, you will need the
[MediaWiki-commits] [Gerrit] Updated partitioning for s1 and s4 - change (operations/software)
Jcrespo has uploaded a new change for review. https://gerrit.wikimedia.org/r/266504 Change subject: Updated partitioning for s1 and s4 .. Updated partitioning for s1 and s4 Bug: T120513 Change-Id: I522f483cea08f80a65f776c9be62489840cec702 --- M dbtools/s1-pager.sql M dbtools/s4-pager.sql 2 files changed, 107 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software refs/changes/04/266504/1 diff --git a/dbtools/s1-pager.sql b/dbtools/s1-pager.sql index fcc3d42..125b127 100644 --- a/dbtools/s1-pager.sql +++ b/dbtools/s1-pager.sql @@ -1,7 +1,8 @@ -- enwiki select1 as n, count(rev_user) from enwiki.revision where rev_user <1 -union select 10 as n, count(rev_user) from enwiki.revision where rev_user >=1 and rev_user < 10 +union select5 as n, count(rev_user) from enwiki.revision where rev_user >=1 and rev_user <5 +union select 10 as n, count(rev_user) from enwiki.revision where rev_user >=5 and rev_user < 10 union select 20 as n, count(rev_user) from enwiki.revision where rev_user >= 10 and rev_user < 20 union select 30 as n, count(rev_user) from enwiki.revision where rev_user >= 20 and rev_user < 30 union select 40 as n, count(rev_user) from enwiki.revision where rev_user >= 30 and rev_user < 40 @@ -22,34 +23,85 @@ union select 1400 as n, count(rev_user) from enwiki.revision where rev_user >= 1200 and rev_user < 1400 union select 1600 as n, count(rev_user) from enwiki.revision where rev_user >= 1400 and rev_user < 1600 union select 1800 as n, count(rev_user) from enwiki.revision where rev_user >= 1600 and rev_user < 1800 -union select 2000 as n, count(rev_user) from enwiki.revision where rev_user >= 1800 and rev_user < 3000; +union select 2000 as n, count(rev_user) from enwiki.revision where rev_user >= 1800 and rev_user < 2000 +union select 2200 as n, count(rev_user) from enwiki.revision where rev_user >= 2000 and rev_user < 2200 +union select 2400 as n, count(rev_user) from enwiki.revision where rev_user >= 2200 and rev_user < 2400 +union select as n, count(rev_user) from enwiki.revision where rev_user >= 2400; + +-- +-- Results on 2015-12-29: +-- +-- +--+-+ +-- | n| count(rev_user) | +-- +--+-+ +-- |1 | 143012851 | +-- |5 |22262399 | +-- | 10 |17246412 | +-- | 20 |23860120 | +-- | 30 |22837407 | +-- | 40 |14815911 | +-- | 50 |13818622 | +-- | 75 |23865783 | +-- | 100 |17747080 | +-- | 150 |32002927 | +-- | 200 |26416371 | +-- | 300 |26939492 | +-- | 400 |29456398 | +-- | 500 |25721791 | +-- | 600 |19401515 | +-- | 700 |20810745 | +-- | 800 |26390816 | +-- | 900 |13651989 | +-- | 1000 |12830219 | +-- | 1200 |25810888 | +-- | 1400 |24018280 | +-- | 1600 |17205483 | +-- | 1800 |15013314 | +-- | 2000 |10100942 | +-- | 2200 | 9036396 | +-- | 2400 | 3941295 | +-- | | 5808754 | +-- +--+-+ +-- 27 rows in set (3 hours 27 min 43.58 sec) ALTER TABLE enwiki.logging DROP PRIMARY KEY, ADD PRIMARY KEY (log_id, log_user) PARTITION BY RANGE (log_user) ( PARTITION p1 VALUES LESS THAN (1), + PARTITION p5 VALUES LESS THAN (5), PARTITION p10 VALUES LESS THAN (10), PARTITION p20 VALUES LESS THAN (20), PARTITION p30 VALUES LESS THAN (30), PARTITION p40 VALUES LESS THAN (40), PARTITION p50 VALUES LESS THAN (50), - PARTITION p70 VALUES LESS THAN (75), + PARTITION p75 VALUES LESS THAN (75), PARTITION p100 VALUES LESS THAN (100), - PARTITION p120 VALUES LESS THAN (150), + PARTITION p125 VALUES LESS THAN (125), + PARTITION p150 VALUES LESS THAN (150), + PARTITION p175 VALUES LESS THAN (175), PARTITION p200 VALUES LESS THAN (200), + PARTITION p250 VALUES LESS THAN (250), PARTITION p300 VALUES LESS THAN (300), + PARTITION p350 VALUES LESS THAN (350), PARTITION p400 VALUES LESS THAN (400), + PARTITION p450 VALUES LESS THAN (450), PARTITION p500 VALUES LESS THAN (500), PARTITION p600 VALUES LESS THAN (600), PARTITION p700 VALUES LESS THAN (700), + PARTITION p750 VALUES LESS THAN (750), PARTITION p800 VALUES LESS THAN (800), PARTITION p900 VALUES LESS THAN (900), PARTITION
[MediaWiki-commits] [Gerrit] Tables: Add getMaxColCount to count total columns in a table... - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/266505 Change subject: Tables: Add getMaxColCount to count total columns in a table matrix .. Tables: Add getMaxColCount to count total columns in a table matrix The number of columns varies in a sparse table. Ensure that getColCount is always called with a row parameter and fix instances of it being used incorrectly. Change-Id: Ic42f3d87f1b4f197a18791c6f0a3ff59a5a1eb0b --- M src/ce/keydownhandlers/ve.ce.LinearDeleteKeyDownHandler.js M src/ce/ve.ce.Surface.js M src/dm/ve.dm.TableMatrix.js 3 files changed, 30 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/05/266505/1 diff --git a/src/ce/keydownhandlers/ve.ce.LinearDeleteKeyDownHandler.js b/src/ce/keydownhandlers/ve.ce.LinearDeleteKeyDownHandler.js index 7486cc9..1ac16e1 100644 --- a/src/ce/keydownhandlers/ve.ce.LinearDeleteKeyDownHandler.js +++ b/src/ce/keydownhandlers/ve.ce.LinearDeleteKeyDownHandler.js @@ -43,7 +43,7 @@ */ ve.ce.LinearDeleteKeyDownHandler.static.execute = function ( surface, e ) { var docLength, startNode, tableEditingRange, position, skipNode, pairNode, linkNode, range, - documentModelSelectedNodes, i, node, nodeRange, nodeOuterRange, matrix, + documentModelSelectedNodes, i, node, nodeRange, nodeOuterRange, matrix, col, row, direction = e.keyCode === OO.ui.Keys.DELETE ? 1 : -1, unit = ( e.altKey === true || e.ctrlKey === true ) ? 'word' : 'character', offset = 0, @@ -190,8 +190,10 @@ ) ); } else { matrix = node.getMatrix(); + row = matrix.getRowCount() - 1; + col = matrix.getColCount( row ) - 1 surface.getModel().setSelection( new ve.dm.TableSelection( - documentModel, nodeOuterRange, matrix.getColCount() - 1, matrix.getRowCount() - 1 + documentModel, nodeOuterRange, col, row ) ); } e.preventDefault(); diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js index 81bc1dd..d76e359 100644 --- a/src/ce/ve.ce.Surface.js +++ b/src/ce/ve.ce.Surface.js @@ -1123,7 +1123,7 @@ */ ve.ce.Surface.prototype.afterDocumentKeyDown = function ( e ) { var direction, focusableNode, startOffset, endOffset, offsetDiff, dmFocus, dmSelection, - inNonSlug, ceSelection, ceNode, range, fixupCursorForUnicorn, matrix, $focusNode, + inNonSlug, ceSelection, ceNode, range, fixupCursorForUnicorn, matrix, col, row, $focusNode, surface = this, isArrow = ( e.keyCode === OO.ui.Keys.UP || @@ -1329,8 +1329,10 @@ ) ); } else { matrix = focusableNode.getModel().getMatrix(); + row = matrix.getRowCount() - 1; + col = matrix.getColCount( row ) - 1 this.model.setSelection( new ve.dm.TableSelection( - this.model.documentModel, range, matrix.getColCount() - 1, matrix.getRowCount() - 1 + this.model.documentModel, range, col, row ) ); } } else { @@ -2126,7 +2128,7 @@ this.getModel().setSelection( new ve.dm.TableSelection( selection.getDocument(), selection.tableRange, - 0, 0, matrix.getColCount() - 1, matrix.getRowCount() - 1 + 0, 0, matrix.getMaxColCount() - 1, matrix.getRowCount() - 1 ) ); diff --git a/src/dm/ve.dm.TableMatrix.js b/src/dm/ve.dm.TableMatrix.js index df24e5a..9ce7cf5 100644 --- a/src/dm/ve.dm.TableMatrix.js +++ b/src/dm/ve.dm.TableMatrix.js @@ -202,14 +202,32 @@ }; /** - * Get number of columns in the table + * Get number of columns in a row * - * @param {number} [row] Row to count columns in (for when the table is sparse and this is variable) + * To get the number of columns in a table use #getMaxColCount + * + * @param {number} row Row to count columns in * @return {number} Number of columns */ ve.dm.TableMatrix.prototype.getColCount = function ( row ) { var matrix = this.getMatrix(); - return matrix.length ? matrix[ row || 0 ].length : 0; + return matrix.length ? matrix[ row ].length : 0; +}; + +/** + *
[MediaWiki-commits] [Gerrit] mend - change (mediawiki...ArticlePlaceholder)
Lucie Kaffee has uploaded a new change for review. https://gerrit.wikimedia.org/r/266507 Change subject: mend .. mend Change-Id: Iecf1c61397b97e7298eea957fff9e4b40a948931 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticlePlaceholder refs/changes/07/266507/1 diff --git a/composer.json b/composer.json index ea8849b..b939a11 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "license": "GPL-2.0+", "authors": [ { - "name": "Lucie-Aimee Kaffee" + "name": "Lucie-Aimée Kaffee" } ], "support": { -- To view, visit https://gerrit.wikimedia.org/r/266507 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecf1c61397b97e7298eea957fff9e4b40a948931 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticlePlaceholder Gerrit-Branch: master Gerrit-Owner: Lucie Kaffee___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rotate kafka-mirror GC logs too - change (operations...kafka)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/266508 Change subject: Rotate kafka-mirror GC logs too .. Rotate kafka-mirror GC logs too Change-Id: I2e80f5334be17e8c8140247c1708acc709418e7a --- M templates/mirror/kafka-mirror.default.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/kafka refs/changes/08/266508/1 diff --git a/templates/mirror/kafka-mirror.default.erb b/templates/mirror/kafka-mirror.default.erb index 12dace6..5f3b5bd 100644 --- a/templates/mirror/kafka-mirror.default.erb +++ b/templates/mirror/kafka-mirror.default.erb @@ -25,4 +25,4 @@ <% end -%> #KAFKA_JVM_PERFORMANCE_OPTS="-server -XX:+UseCompressedOops -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC" KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:/etc/kafka/mirror/<%= @mirror_name %>/log4j.properties" -#KAFKA_OPTS="" +KAFKA_OPTS="-XX:GCLogFileSize=50M -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5" -- To view, visit https://gerrit.wikimedia.org/r/266508 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e80f5334be17e8c8140247c1708acc709418e7a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/kafka Gerrit-Branch: master Gerrit-Owner: Ottomata___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add .gitreview - change (operations...varnishkafka)
Ottomata has submitted this change and it was merged. Change subject: Add .gitreview .. Add .gitreview Change-Id: Ia2cb3bffb79149cd69b87a55c15556b8eaa8d47b --- A .gitreview 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Ottomata: Verified; Looks good to me, approved diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..f60e405 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=operations/puppet/varnishkafka -- To view, visit https://gerrit.wikimedia.org/r/265250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2cb3bffb79149cd69b87a55c15556b8eaa8d47b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/varnishkafka Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Elukey Gerrit-Reviewer: Hashar Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pass flake8 and add it to tox envlist - change (operations...varnishkafka)
Ottomata has submitted this change and it was merged. Change subject: Pass flake8 and add it to tox envlist .. Pass flake8 and add it to tox envlist flake8 pass pep8 and pyflakes linters which help catch a bunch of issues. Ignore a couple whitespaces related errors that are used for alignment. Instruct pep8 to ignore the 'import unittest' in the middle of the file by suffixing the line with '# noqa'. Fix all other whitespaces issues. Change-Id: I78ab5562da0fa3908b74e36c24cc13e74442e320 --- M README.md M files/varnishkafka_ganglia.py M tox.ini 3 files changed, 58 insertions(+), 39 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Ottomata: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 3944678..772633d 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,7 @@ ## Testing Run `tox` which setup appropriate virtualenvs and run commands for you. + +Python scripts should match the flake8 conventions, you can run them using: + +tox -e flake8 diff --git a/files/varnishkafka_ganglia.py b/files/varnishkafka_ganglia.py index 507a029..fee229b 100755 --- a/files/varnishkafka_ganglia.py +++ b/files/varnishkafka_ganglia.py @@ -22,7 +22,6 @@ logger = logging.getLogger('varnishkafka') - # metric keys to skip reporting to ganglia skip_metrics = [ 'app_offset', @@ -95,7 +94,6 @@ return flattened - def tail(filename, n=2): ''' Tails the last n lines from filename and returns them in a list. @@ -164,7 +162,7 @@ self.stats_file = stats_file self.key_separator= key_separator -# NOTE: It might be more elegant to +# NOTE: It might be more elegant to # store the JSON object as it comes back from stats_file, # rather than keeping the state in the flattened hash. @@ -187,7 +185,6 @@ key_separator.join(['kafka', 'varnishkafka', 'time']), key_separator.join(['kafka', 'rdkafka', 'time']), ] - def key_filter(self, key): ''' @@ -213,7 +210,6 @@ return False return key - def is_counter_stat(self, key): ''' @@ -328,6 +324,7 @@ last_run_timestamp = 0 key_prefix = '' + def metric_handler(name): """Get value of particular metric; part of Gmond interface""" global varnishkafka_stats @@ -338,7 +335,9 @@ name = name[len(key_prefix):] seconds_since_last_run = time.time() - last_run_timestamp if (seconds_since_last_run >= time_max): -logger.debug('Updating varnishkafka_stats since it has been {0} seconds, which is more than tmax of {1}'.format(seconds_since_last_run, time_max)) +logger.debug( +'Updating varnishkafka_stats since it has been {0} seconds, which ' +'is more than tmax of {1}'.format(seconds_since_last_run, time_max)) varnishkafka_stats.update_stats() last_run_timestamp = time.time() @@ -425,19 +424,17 @@ return descriptions + def metric_cleanup(): """Teardown; part of Gmond interface""" pass - - - - - # To run tests: # python -m unittest varnishkafka_ganglia -import unittest +import unittest # noqa + + class TestVarnishkafkaGanglia(unittest.TestCase): def setUp(self): self.key_separator = '&' @@ -452,17 +449,17 @@ 'value4': False, } }, -'2.1': ['a','b'], -'2.1': ['a','b'], +'2.1': ['a', 'b'], +'2.1': ['a', 'b'], # '/' should be replaced with key_separator '3/1': 'nonya', 'notme': 'nope', 'kafka': { 'varnishkafka': { 'time': time.time(), -'counter': { self.varnishkafka_stats.counter_stats[0]: 0 }, +'counter': {self.varnishkafka_stats.counter_stats[0]: 0}, }, -'rdkafka': { 'time': time.time() } +'rdkafka': {'time': time.time()} }, } self.flattened_should_be = { @@ -478,7 +475,6 @@ 'kafka&{0}'.format(self.varnishkafka_stats.counter_stats[0]): 0, 'kafka': self.json_data['kafka']['rdkafka']['time'], } - def key_filter_callback(self, key): if key == 'value2': @@ -517,15 +513,22 @@ self.flattened_should_be['kafka'] += 100.0 self.varnishkafka_stats.update_stats(self.flattened_should_be) - self.assertEquals(self.varnishkafka_stats.flattened_stats_previous[counter_key], previous_value) - self.assertEquals(self.varnishkafka_stats.flattened_stats[counter_key], self.flattened_should_be[counter_key]) - self.assertEquals(self.varnishkafka_stats.flattened_stats['kafka'], self.flattened_should_be['kafka']) +self.assertEquals( +
[MediaWiki-commits] [Gerrit] Introduce tox as a test entry point - change (operations...kafkatee)
Ottomata has submitted this change and it was merged. Change subject: Introduce tox as a test entry point .. Introduce tox as a test entry point files/kafkatee_ganglia.py embeds some tests. Use tox to setup a virtualenv and run the test command into it. Will let us enable CI for this repository. Change-Id: I868d8e51c5d37dd81bc92913464d32bc64b68979 --- A .gitignore M README.md A tox.ini 3 files changed, 15 insertions(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Ottomata: Verified; Looks good to me, approved diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..ff124d8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.tox +*.pyc diff --git a/README.md b/README.md index 212a74c..a5b93bf 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,8 @@ destination => 'grep -v "whocares" >> /path/to/mytopic-filtered.json' type=> 'pipe', } -``` \ No newline at end of file +``` + +## Testing + +Run `tox` which setup appropriate virtualenvs and run commands for you. diff --git a/tox.ini b/tox.ini new file mode 100644 index 000..4970c3d --- /dev/null +++ b/tox.ini @@ -0,0 +1,8 @@ +[tox] +# No setup.py +skipsdist = True +envlist = py27 + +[testenv] +commands = +python -m unittest discover -v -s files -p *.py -- To view, visit https://gerrit.wikimedia.org/r/264011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I868d8e51c5d37dd81bc92913464d32bc64b68979 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/kafkatee Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Hashar Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ottomata 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 .gitreview - change (operations...kafkatee)
Ottomata has submitted this change and it was merged. Change subject: Add .gitreview .. Add .gitreview Change-Id: Ia2cb3bffb79149cd69b87a55c15556b8eaa8d47b --- A .gitreview 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Ottomata: Verified; Looks good to me, approved diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..1303fa7 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=operations/puppet/kafkatee -- To view, visit https://gerrit.wikimedia.org/r/264010 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2cb3bffb79149cd69b87a55c15556b8eaa8d47b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/kafkatee Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Elukey Gerrit-Reviewer: Hashar Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pass flake8 and add it to tox envlist - change (operations...kafkatee)
Ottomata has submitted this change and it was merged. Change subject: Pass flake8 and add it to tox envlist .. Pass flake8 and add it to tox envlist flake8 pass pep8 and pyflakes linters which help catch a bunch of issues. Ignore a couple whitespaces related errors that are used for alignment. Instruct pep8 to ignore the 'import unittest' in the middle of the file by suffixing the line with '# noqa'. Fix all other whitespaces issues. Change-Id: I78ab5562da0fa3908b74e36c24cc13e74442e320 --- M README.md M files/kafkatee_ganglia.py M tox.ini 3 files changed, 38 insertions(+), 31 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Ottomata: Verified; Looks good to me, approved diff --git a/README.md b/README.md index a5b93bf..ce776f1 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,7 @@ ## Testing Run `tox` which setup appropriate virtualenvs and run commands for you. + +Python scripts should match the flake8 conventions, you can run them using: + +tox -e flake8 diff --git a/files/kafkatee_ganglia.py b/files/kafkatee_ganglia.py index dcc57a5..16cc994 100755 --- a/files/kafkatee_ganglia.py +++ b/files/kafkatee_ganglia.py @@ -21,7 +21,6 @@ logger = logging.getLogger('kafkatee') - # metric keys to skip reporting to ganglia skip_metrics = [ 'app_offset', @@ -96,7 +95,6 @@ return flattened - def tail(filename, n=2): ''' Tails the last n lines from filename and returns them in a list. @@ -158,7 +156,7 @@ self.stats_file = stats_file self.key_separator= key_separator -# NOTE: It might be more elegant to +# NOTE: It might be more elegant to # store the JSON object as it comes back from stats_file, # rather than keeping the state in the flattened hash. @@ -177,7 +175,6 @@ self.timestamp_keys = [ key_separator.join(['kafka', 'rdkafka', 'time']), ] - def key_filter(self, key): ''' @@ -313,6 +310,7 @@ time_max = 15 last_run_timestamp = 0 + def metric_handler(name): """Get value of particular metric; part of Gmond interface""" global kafkatee_stats @@ -403,19 +401,16 @@ return descriptions + def metric_cleanup(): """Teardown; part of Gmond interface""" pass - - - - - - # To run tests: # python -m unittest kafkatee_ganglia -import unittest +import unittest # noqa + + class TestKafkateeGanglia(unittest.TestCase): def setUp(self): self.key_separator = '&' @@ -430,16 +425,16 @@ 'value4': False, } }, -'2.1': ['a','b'], -'2.1': ['a','b'], +'2.1': ['a', 'b'], +'2.1': ['a', 'b'], # '/' should be replaced with key_separator '3/1': 'nonya', 'notme': 'nope', 'kafka': { 'rdkafka': { 'time': time.time(), -'counter': { self.kafkatee_stats.counter_stats[0]: 0 } - } +'counter': {self.kafkatee_stats.counter_stats[0]: 0} +} }, } self.flattened_should_be = { @@ -454,7 +449,6 @@ 'kafka&{0}'.format(self.kafkatee_stats.counter_stats[0]): 0, 'kafka': self.json_data['kafka']['rdkafka']['time'], } - def key_filter_callback(self, key): if key == 'value2': @@ -502,8 +496,6 @@ self.assertEquals(self.kafkatee_stats.flattened_stats[per_second_key], rate_should_be) - - def generate_pyconf(module_name, metric_descriptions, params={}, collect_every=15, time_threshold=15): ''' Generates a pyconf file including all of the metrics in metric_descriptions. @@ -542,14 +534,12 @@ time_threshold = %(time_threshold)s %(metrics_string)s } -""" % { 'module_name': module_name, -'params_string': params_string, -'collect_every': collect_every, -'time_threshold': time_threshold, -'metrics_string': metrics_string - } - - +""" % {'module_name': module_name, + 'params_string': params_string, + 'collect_every': collect_every, + 'time_threshold': time_threshold, + 'metrics_string': metrics_string + } if __name__ == '__main__': @@ -557,14 +547,17 @@ # metric descriptor and printing it out. cmdline = optparse.OptionParser(usage="usage: %prog [options] statsfile") -cmdline.add_option('--generate-pyconf', '-g', action='store_true', default=False, +cmdline.add_option( +'--generate-pyconf', '-g', action='store_true', default=False, help='If set, a .pyconf file will be output with flattened metrics key from statsfile.') -cmdline.add_option('--tmax', '-t', action='store', default=15, +cmdline.add_option( +'--tmax', '-t', action='store',
[MediaWiki-commits] [Gerrit] Introduce tox as a test entry point - change (operations...varnishkafka)
Ottomata has submitted this change and it was merged. Change subject: Introduce tox as a test entry point .. Introduce tox as a test entry point files/kafkatee_ganglia.py embeds some tests. Use tox to setup a virtualenv and run the test command into it. Will let us enable CI for this repository. Change-Id: I868d8e51c5d37dd81bc92913464d32bc64b68979 --- A .gitignore M README.md A tox.ini 3 files changed, 14 insertions(+), 0 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Ottomata: Verified; Looks good to me, approved diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..ff124d8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.tox +*.pyc diff --git a/README.md b/README.md index 7a965be..3944678 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,7 @@ # to Ganglia. class { 'varnishkafka::monitoring': } ``` + +## Testing + +Run `tox` which setup appropriate virtualenvs and run commands for you. diff --git a/tox.ini b/tox.ini new file mode 100644 index 000..3e5f89a --- /dev/null +++ b/tox.ini @@ -0,0 +1,8 @@ +[tox] +# No setup.py +skipsdist = True +envlist = py27 + +[testenv] +commands = + python -m unittest discover -v -s files -p *.py -- To view, visit https://gerrit.wikimedia.org/r/265251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I868d8e51c5d37dd81bc92913464d32bc64b68979 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/varnishkafka Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Hashar Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ottomata Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits