[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Ban ten monst popular passwords from fawiki
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/321093 Change subject: Ban ten monst popular passwords from fawiki .. Ban ten monst popular passwords from fawiki Bug: T150570 Change-Id: Ibcfa4679db69852e50c18f0567af6b2b126d1084 --- M wmf-config/CommonSettings.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/93/321093/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 98bc0b1..9c06d6d 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -380,6 +380,11 @@ } } +// T150570 +if ( $wgDBname === 'fawiki' ) { + $wgPasswordPolicy['policies']['default']['PasswordCannotBePopular'] = 10; +} + // Enforce password policy when users login on other wikis if ( $wmgUseCentralAuth ) { $wgHooks['PasswordPoliciesForUser'][] = function( User $user, array &$effectivePolicy ) { -- To view, visit https://gerrit.wikimedia.org/r/321093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcfa4679db69852e50c18f0567af6b2b126d1084 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ladsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Clicking new tab button to make the created tab active Case ...
Kunalgrover05 has uploaded a new change for review. https://gerrit.wikimedia.org/r/321092 Change subject: Clicking new tab button to make the created tab active Case where it doesn't work: When new tab is created from the main screen .. Clicking new tab button to make the created tab active Case where it doesn't work: When new tab is created from the main screen Bug: T150019 Change-Id: I7d507f3da3d670b005e224e7c19e27ba33d14196 --- M app/src/main/java/org/wikipedia/page/PageFragment.java 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/92/321092/1 diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java b/app/src/main/java/org/wikipedia/page/PageFragment.java index cd27e86..b5548dd 100755 --- a/app/src/main/java/org/wikipedia/page/PageFragment.java +++ b/app/src/main/java/org/wikipedia/page/PageFragment.java @@ -485,6 +485,9 @@ // just load the main page into a new tab... loadMainPageInForegroundTab(); tabFunnel.logCreateNew(tabList.size()); + +// Set the current tab to the new opened tab +onCancelTabView(); } @Override -- To view, visit https://gerrit.wikimedia.org/r/321092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d507f3da3d670b005e224e7c19e27ba33d14196 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Kunalgrover05___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/compat[master]: added 'skips' (NowCommons templates) for more languages
XXN has uploaded a new change for review. https://gerrit.wikimedia.org/r/321090 Change subject: added 'skips' (NowCommons templates) for more languages .. added 'skips' (NowCommons templates) for more languages Change-Id: I9e2e07963f5c2dcacbdd51a577bef706bca277e0 --- M tag_nowcommons.py 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/90/321090/2 diff --git a/tag_nowcommons.py b/tag_nowcommons.py index e9ddae2..b3692a1 100644 --- a/tag_nowcommons.py +++ b/tag_nowcommons.py @@ -49,6 +49,18 @@ 'fy': [u'NowCommons', u'Nowcommons', ], +'ru': [u'NowCommons', + u'Now Commons', + u'AcumCommons', + u'FOP Romania', + ], +'ru': [u'NowCommons', + u'Now Commons', + u'FoP-Russia', + ], +'uk': [u'NowCommons', + u'Now Commons', + ], }, } -- To view, visit https://gerrit.wikimedia.org/r/321090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e2e07963f5c2dcacbdd51a577bef706bca277e0 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: XXN___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: New page generators (T150222), typos.
XXN has uploaded a new change for review. https://gerrit.wikimedia.org/r/321089 Change subject: New page generators (T150222), typos. .. New page generators (T150222), typos. Added pagegenerators: -wantedpages -wantedfiles -wantedcategories -wantedtemplates Bug: T150222 Change-Id: I7d5cba11c2534b8ff90d10205cc399a06ce83590 --- M pywikibot/pagegenerators.py M pywikibot/site.py 2 files changed, 110 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/89/321089/2 diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index e60c98f..b4c446a 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -246,6 +246,18 @@ -usercontribs Work on all articles that were edited by a certain user. (Example : -usercontribs:DumZiBoT) +-wantedpages Work on pages that are linked, but does not exist; + may be given as "-wantedpages:n" + +-wantedcategories Work on categories that are used, but does not exist; + may be given as "-wantedcategories:n" + +-wantedfiles Work on files that are used, but does not exist; + may be given as "-wantedfiles:n" + +-wantedtemplates Work on templates that are used, but does not exist; + may be given as "-wantedtemplates:n" + -weblink Work on all articles that contain an external link to a given URL; may be given as "-weblink:url" @@ -655,6 +667,14 @@ gen = FileLinksGenerator(page) elif arg == '-unusedfiles': gen = UnusedFilesGenerator(total=intNone(value), site=self.site) +elif arg == '-wantedpages': +gen = WantedPagesPageGenerator(total=intNone(value), site=self.site) +elif arg == '-wantedfiles': +gen = WantedFilesGenerator(total=intNone(value), site=self.site) +elif arg == '-wantedcategories': +gen = WantedCategoriesGenerator(total=intNone(value), site=self.site) +elif arg == '-wantedtemplates': +gen = WantedTemplatesGenerator(total=intNone(value), site=self.site) elif arg == '-lonelypages': gen = LonelyPagesPageGenerator(total=intNone(value), site=self.site) @@ -958,7 +978,7 @@ If includeredirects is False, redirects are not included. If includeredirects equals the string 'only', only redirects are added. -@param total: Maxmum number of pages to retrieve in total +@param total: Maximum number of pages to retrieve in total @type total: int @param content: If True, load current version of each page (default False) @param site: Site for generator results. @@ -1363,7 +1383,7 @@ total=None, _filter_unique=filter_unique): """Yield unique pages edited by user:username. -@param total: Maxmum number of pages to retrieve in total +@param total: Maximum number of pages to retrieve in total @type total: int @param namespaces: list of namespace numbers to fetch contribs from @type namespaces: list of int @@ -1953,7 +1973,7 @@ """ New file generator. -@param total: Maxmum number of pages to retrieve in total +@param total: Maximum number of pages to retrieve in total @type total: int @param site: Site for generator results. @type site: L{pywikibot.site.BaseSite} @@ -2029,7 +2049,7 @@ """ Unused files generator. -@param total: Maxmum number of pages to retrieve in total +@param total: Maximum number of pages to retrieve in total @type total: int @param site: Site for generator results. @type site: L{pywikibot.site.BaseSite} @@ -2045,7 +2065,7 @@ """ Page lacking interwikis generator. -@param total: Maxmum number of pages to retrieve in total +@param total: Maximum number of pages to retrieve in total @param site: Site for generator results. @type site: L{pywikibot.site.BaseSite} """ @@ -2060,7 +2080,7 @@ """ Uncategorized category generator. -@param total: Maxmum number of pages to retrieve in total +@param total: Maximum number of pages to retrieve in total @type total: int @param site: Site for generator results. @type site: L{pywikibot.site.BaseSite} @@ -2076,7 +2096,7 @@ """ Uncategorized file generator. -@param total: Maxmum number of pages to retrieve in total +@param total: Maximum number of pages to retrieve in total @type total: int @param site: Site for generator results. @type site: L{pywikibot.site.BaseSite} @@ -2092,7 +2112,7 @@ """ Uncategorized page generator. -@param total: Maxmum number of pages to retrieve in total +@param total: Maximum number of pages to retrieve in total @type total: int @param site: Site for
[MediaWiki-commits] [Gerrit] wikipedia...ProveIt[master]: Update Finnish translation
Sophivorus has submitted this change and it was merged. Change subject: Update Finnish translation .. Update Finnish translation Bug: T149104 Change-Id: I46b7347a94db80a4579449b7e7884963eb1ab696 --- M i18n/fi.json 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Sophivorus: Verified; Looks good to me, approved diff --git a/i18n/fi.json b/i18n/fi.json index f50b950..60cbfa5 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -15,6 +15,6 @@ "proveit-update-button": "Päivitä viite", "proveit-prompt-name": "Viite tarvitsee nimen toimiakseen:", "proveit-confirm-remove": "Oletko varma, että haluat poistaa viitteen?", -"proveit-no-template": "Viitemalline puuttuu", -"proveit-no-references": "Ilman viitemallinetta" +"proveit-no-template": "Ilman viitemallinetta", +"proveit-no-references": "Artikkelissa ei ole viitteitä." } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/321088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46b7347a94db80a4579449b7e7884963eb1ab696 Gerrit-PatchSet: 1 Gerrit-Project: wikipedia/gadgets/ProveIt Gerrit-Branch: master Gerrit-Owner: SophivorusGerrit-Reviewer: Sophivorus ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikipedia...ProveIt[master]: Update Finnish translation
Sophivorus has uploaded a new change for review. https://gerrit.wikimedia.org/r/321088 Change subject: Update Finnish translation .. Update Finnish translation Bug: T149104 Change-Id: I46b7347a94db80a4579449b7e7884963eb1ab696 --- M i18n/fi.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikipedia/gadgets/ProveIt refs/changes/88/321088/1 diff --git a/i18n/fi.json b/i18n/fi.json index f50b950..60cbfa5 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -15,6 +15,6 @@ "proveit-update-button": "Päivitä viite", "proveit-prompt-name": "Viite tarvitsee nimen toimiakseen:", "proveit-confirm-remove": "Oletko varma, että haluat poistaa viitteen?", -"proveit-no-template": "Viitemalline puuttuu", -"proveit-no-references": "Ilman viitemallinetta" +"proveit-no-template": "Ilman viitemallinetta", +"proveit-no-references": "Artikkelissa ei ole viitteitä." } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/321088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I46b7347a94db80a4579449b7e7884963eb1ab696 Gerrit-PatchSet: 1 Gerrit-Project: wikipedia/gadgets/ProveIt Gerrit-Branch: master Gerrit-Owner: Sophivorus___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Move NWE URL changes into JS
jenkins-bot has submitted this change and it was merged. Change subject: Move NWE URL changes into JS .. Move NWE URL changes into JS Bug: T148077 Change-Id: Ic9b94184a48026254cf4a0a812fe6fc8455841b5 --- M VisualEditor.hooks.php M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 2 files changed, 10 insertions(+), 30 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 086abc9..332bcc2 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -336,17 +336,6 @@ $user->getOption( 'visualeditor-tabs' ) === 'multi-tab' ) ) { - if ( - $config->get( 'VisualEditorEnableWikitext' ) && - $user->getOption( 'visualeditor-newwikitext' ) - ) { - $parsed = wfParseUrl( wfExpandUrl( $editTab['href'] ) ); - $q = wfCgiToArray( $parsed['query'] ); - unset( $q['action'] ); - $q['veaction'] = 'editsource'; - $parsed['query'] = wfArrayToCgi( $q ); - $editTab['href'] = wfAssembleUrl( $parsed ); - } // Inject the VE tab before or after the edit tab if ( $config->get( 'VisualEditorTabPosition' ) === 'before' ) { $editTab['class'] .= ' collapsible'; @@ -468,25 +457,6 @@ $sourceEditSection = $tabMessages['editsectionsource'] !== null ? $tabMessages['editsectionsource'] : 'editsection'; $result['editsection']['text'] = $skin->msg( $sourceEditSection )->inLanguage( $lang )->text(); - } - - if ( - $config->get( 'VisualEditorEnableWikitext' ) && - $user->getOption( 'visualeditor-newwikitext' ) && - ( - !$config->get( 'VisualEditorUseSingleEditTab' ) || - $user->getOption( 'visualeditor-tabs' ) === 'prefer-wt' || - $user->getOption( 'visualeditor-tabs' ) === 'multi-tab' || - ( - $user->getOption( 'visualeditor-tabs' ) === 'remember-last' && - $editor === 'wikitext' - ) - ) - ) { - $result['editsection']['query'] = [ - 'veaction' => 'editsource', - 'section' => $section - ]; } // Exit if we're using the single edit tab. diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js index 2186a8f..8fbf519 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js @@ -1003,6 +1003,16 @@ mw.libs.ve.setEditorPreference( 'wikitext' ); } + // NWE + if ( init.isWikitextAvailable && isOnlyTabWikitext() ) { + $( '.mw-editsection a, #ca-edit a' ).each( function () { + var uri = new mw.Uri( $( this ).attr( 'href' ) ); + delete uri.query.action; + uri.query.veaction = 'editsource'; + $( this ).attr( 'href', uri.toString() ); + } ); + } + // Set up the tabs appropriately if the user has VE on if ( init.isAvailable && userPrefPreferShow ) { // … on two-edit-tab wikis, or single-edit-tab wikis, where the user wants both … -- To view, visit https://gerrit.wikimedia.org/r/320318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic9b94184a48026254cf4a0a812fe6fc8455841b5 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex Monk
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: MediaWiki namespace (and talk) back to English in MessagesCd...
jenkins-bot has submitted this change and it was merged. Change subject: MediaWiki namespace (and talk) back to English in MessagesCdo.php .. MediaWiki namespace (and talk) back to English in MessagesCdo.php Bug: T122428 Change-Id: I740addd0fce913ca74394c663c6858849aa4e2d5 --- M languages/messages/MessagesCdo.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: TTO: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesCdo.php b/languages/messages/MessagesCdo.php index 9d8b1bd..6d875ae 100644 --- a/languages/messages/MessagesCdo.php +++ b/languages/messages/MessagesCdo.php @@ -19,8 +19,8 @@ NS_PROJECT_TALK => '$1討論', NS_FILE => '文件', NS_FILE_TALK=> '文件討論', - NS_MEDIAWIKI=> '媒體維基', - NS_MEDIAWIKI_TALK => '媒體維基討論', + NS_MEDIAWIKI=> 'MediaWiki', + NS_MEDIAWIKI_TALK => 'MediaWiki討論', NS_TEMPLATE => '模板', NS_TEMPLATE_TALK=> '模板討論', NS_HELP => '幫助', -- To view, visit https://gerrit.wikimedia.org/r/321009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I740addd0fce913ca74394c663c6858849aa4e2d5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MarcoAurelioGerrit-Reviewer: Siebrand Gerrit-Reviewer: TTO 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...MobileFrontend[master]: Replace window.confirm with OO.ui.confirm
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/321086 Change subject: Replace window.confirm with OO.ui.confirm .. Replace window.confirm with OO.ui.confirm Change-Id: If8b19b7c1073415e7f21a79e84d9998fb5b665b8 --- M resources/mobile.editor.ve/ve.init.mw.MobileFrontendArticleTarget.js 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/86/321086/1 diff --git a/resources/mobile.editor.ve/ve.init.mw.MobileFrontendArticleTarget.js b/resources/mobile.editor.ve/ve.init.mw.MobileFrontendArticleTarget.js index 8dd4c69..ad59853 100644 --- a/resources/mobile.editor.ve/ve.init.mw.MobileFrontendArticleTarget.js +++ b/resources/mobile.editor.ve/ve.init.mw.MobileFrontendArticleTarget.js @@ -190,11 +190,16 @@ * FIXME: @inheritdoc once this file is in the right repo */ ve.init.mw.MobileFrontendArticleTarget.prototype.editSource = function () { + var target = this; // If changes have been made tell the user they have to save first if ( !this.getSurface().getModel().hasBeenModified() ) { this.overlay.switchToSourceEditor(); - } else if ( window.confirm( mw.msg( 'mobile-frontend-editor-switch-confirm' ) ) ) { - this.showSaveDialog(); + } else { + OO.ui.confirm( mw.msg( 'mobile-frontend-editor-switch-confirm' ) ).done( function ( confirmed ) { + if ( confirmed ) { + target.showSaveDialog(); + } + } ); } }; -- To view, visit https://gerrit.wikimedia.org/r/321086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8b19b7c1073415e7f21a79e84d9998fb5b665b8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Revert "Send the irc messages to all irc channels if you res...
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Send the irc messages to all irc channels if you restart or force-restart" .. Revert "Send the irc messages to all irc channels if you restart or force-restart" This reverts commit 23a3d82cbb8843137a24c70c69d1aefd5d6adb15. Change-Id: I9571c03764a3b18ff87853d43f14c4dfdcb504f4 --- M src/relay.js 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Paladox: Looks good to me, approved jenkins-bot: Verified diff --git a/src/relay.js b/src/relay.js index 0ae394c..87b1935 100644 --- a/src/relay.js +++ b/src/relay.js @@ -196,13 +196,13 @@ logging.info('re-connecting to gerrit..'); -ircClient.say([ allChannels ], "re-connecting to gerrit"); +ircClient.say(to, "re-connecting to gerrit"); if (sshConn) { sshConn.end(); } -ircClient.say([ allChannels ], "reconnected to gerrit"); +ircClient.say(to, "reconnected to gerrit"); } else if ($irc_nick_restart && !$irc_nick1) { ircClient.say(to, "Permission is denied."); } @@ -210,7 +210,7 @@ if ($irc_nick_force_restart && $irc_nick1) { console.log(from + ' => ' + to + ' ' + text); -ircClient.say([ allChannels ], "re-connecting to gerrit and irc."); +ircClient.say(to, "re-connecting to gerrit and irc."); logging.info('Disconnecting from irc.'); @@ -224,7 +224,7 @@ logging.info('re-connected to gerrit.'); -setTimeout(function(){ ircClient.say([ allChannels ], "re-connected to gerrit and irc."); }, 17000); +setTimeout(function(){ ircClient.say(to, "re-connected to gerrit and irc."); }, 17000); logging.info('re-connected to irc.'); } else if ($irc_nick_force_restart && !$irc_nick1) { -- To view, visit https://gerrit.wikimedia.org/r/321085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9571c03764a3b18ff87853d43f14c4dfdcb504f4 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Revert "Send the irc messages to all irc channels if you res...
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/321085 Change subject: Revert "Send the irc messages to all irc channels if you restart or force-restart" .. Revert "Send the irc messages to all irc channels if you restart or force-restart" This reverts commit 23a3d82cbb8843137a24c70c69d1aefd5d6adb15. Change-Id: I9571c03764a3b18ff87853d43f14c4dfdcb504f4 --- M src/relay.js 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit refs/changes/85/321085/1 diff --git a/src/relay.js b/src/relay.js index 0ae394c..87b1935 100644 --- a/src/relay.js +++ b/src/relay.js @@ -196,13 +196,13 @@ logging.info('re-connecting to gerrit..'); -ircClient.say([ allChannels ], "re-connecting to gerrit"); +ircClient.say(to, "re-connecting to gerrit"); if (sshConn) { sshConn.end(); } -ircClient.say([ allChannels ], "reconnected to gerrit"); +ircClient.say(to, "reconnected to gerrit"); } else if ($irc_nick_restart && !$irc_nick1) { ircClient.say(to, "Permission is denied."); } @@ -210,7 +210,7 @@ if ($irc_nick_force_restart && $irc_nick1) { console.log(from + ' => ' + to + ' ' + text); -ircClient.say([ allChannels ], "re-connecting to gerrit and irc."); +ircClient.say(to, "re-connecting to gerrit and irc."); logging.info('Disconnecting from irc.'); @@ -224,7 +224,7 @@ logging.info('re-connected to gerrit.'); -setTimeout(function(){ ircClient.say([ allChannels ], "re-connected to gerrit and irc."); }, 17000); +setTimeout(function(){ ircClient.say(to, "re-connected to gerrit and irc."); }, 17000); logging.info('re-connected to irc.'); } else if ($irc_nick_force_restart && !$irc_nick1) { -- To view, visit https://gerrit.wikimedia.org/r/321085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9571c03764a3b18ff87853d43f14c4dfdcb504f4 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Use File page descriptions for picture of the day
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/321084 Change subject: Use File page descriptions for picture of the day .. Use File page descriptions for picture of the day The POTD File page seems to have the best translated descriptions available. Retrieve information about the image from the MediaWiki API but parse the translated descriptions from the File page, not the ImageDescription meta data. Bug: T144109 Bug: T139314 Change-Id: Id9beefde503800c86d2fb57f1c10e044671255b2 --- M lib/feed/featured-image.js M test/features/featured-image/pagecontent.js 2 files changed, 80 insertions(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/84/321084/1 diff --git a/lib/feed/featured-image.js b/lib/feed/featured-image.js index b122ece..f0838d5 100644 --- a/lib/feed/featured-image.js +++ b/lib/feed/featured-image.js @@ -8,32 +8,31 @@ var preq = require('preq'); var api = require('../api-util'); var dateUtil = require('../dateUtil'); +var domino = require('domino'); var mwapi = require('../mwapi'); var mUtil = require('../mobile-util'); +var parsoid = require('../parsoid-access'); var sUtil = require('../util'); var HTTPError = sUtil.HTTPError; +const COMMONS_URL = 'commons.wikimedia.org'; /** * Builds the request to get the Picture of the day of a given date. * * @param {Object} app the application object - * @param {String} domain the requested domain, e.g. 'de.wikipedia.org' * @param {Date} date for which day the featured image of theday is requested * @return {Promise} a promise resolving as an JSON object containing the response */ -function requestPictureOfTheDay(app, domain, date) { +function requestPictureOfTheDay(app, date) { var isoDate = dateUtil.formatISODate(date); -var lang = mUtil.getLanguageFromDomain(domain); -return api.mwApiGet(app, 'commons.wikimedia.org', { +return api.mwApiGet(app, COMMONS_URL, { action: 'query', format: 'json', formatversion: 2, generator: 'images', prop: 'imageinfo|revisions', -iiextmetadatafilter: 'ImageDescription', -iiextmetadatamultilang: true, -iiprop: 'url|extmetadata|dimensions', +iiprop: 'url|dimensions', iiurlwidth: mwapi.CARD_THUMB_FEATURE_SIZE, rawcontinue: '', titles: `Template:Potd/${isoDate}` @@ -60,46 +59,55 @@ return page; } -function buildPayload(page, lang) { +function buildPayload(page) { if (!page || page.notfound) { return undefined; } -let description, allDescriptions, imageinfo = page.imageinfo && page.imageinfo[0]; +const payload = { +title: page.title +}; -// extmetadata returns an empty array if no info is available :( -if (!Array.isArray(imageinfo.extmetadata)) { -allDescriptions = imageinfo.extmetadata && imageinfo.extmetadata.ImageDescription.value; -lang = allDescriptions[lang] ? lang : 'en'; -description = allDescriptions[lang]; -} - -let ret = { -title: page.title, -thumbnail: { +const imageinfo = page.imageinfo && page.imageinfo[0]; +if (imageinfo) { +payload.image = { +source: imageinfo && imageinfo.url, +width: imageinfo && imageinfo.width, +height: imageinfo && imageinfo.height +}; +payload.thumbnail = { source: imageinfo && imageinfo.thumburl, width: imageinfo && imageinfo.thumbwidth, height: imageinfo && imageinfo.thumbheight -}, -// the full res image: -image: { -source: imageinfo.url, -width: imageinfo.width, -height: imageinfo.height -} -}; -if (description) { -ret.description = { -text: description, -lang: lang }; } -return ret; + +return payload; } function buildEtag(page) { return page && page.pageid + '/' + mwapi.getRevisionFromExtract(page); +} + +/** @param {!domino.Document} doc +@return {void} */ +function removeLangLabels(doc) { +const labels = doc.querySelectorAll('span[class*=langlabel-]') || []; +labels.forEach(element => { +element.parentNode.removeChild(element); +}); +} + +/** @param {!domino.Document} doc +@return {!Object.} */ +function queryDescriptions(doc) { +const descriptions = {}; +const descriptionElements = doc.querySelectorAll('.description[class*=lang-]') || []; +descriptionElements.forEach(element => { +descriptions[element.lang] = element.innerHTML.trim(); +}); +return descriptions; } function promise(app, req) { @@ -112,17 +120,44 @@ dateUtil.throwDateError(); } -return requestPictureOfTheDay(app, req.params.domain, -
[MediaWiki-commits] [Gerrit] integration/config[master]: Re-Apply "Add ContentTranslation as dependency to ArticlePla...
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/321083 Change subject: Re-Apply "Add ContentTranslation as dependency to ArticlePlaceholder" .. Re-Apply "Add ContentTranslation as dependency to ArticlePlaceholder" Unfortunately, the dependency is still needed and the revert message does not state why it was reverted. I remember, that JanZerebecki explained it to me in irc, but I doesn't remember anymore. However, as the dependency is still needed in I10d10ab2565c66 we should add it :) This reverts commit f9af3ddcb22daeaf3f5d0edb180169fb3bd6d3c7. Change-Id: Ia6169adf602e2219aa8b9c908588dfccc7274728 --- M zuul/parameter_functions.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/83/321083/1 diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py index 38209fe..94c204f 100644 --- a/zuul/parameter_functions.py +++ b/zuul/parameter_functions.py @@ -46,7 +46,7 @@ 'AbuseFilter': ['AntiSpoof'], 'ApiFeatureUsage': ['Elastica'], 'Arrays': ['Loops', 'ParserFunctions', 'Variables'], -'ArticlePlaceholder': ['Wikibase', 'Scribunto'], +'ArticlePlaceholder': ['Wikibase', 'Scribunto', 'ContentTranslation'], 'Capiunto': ['Scribunto'], 'Cite': ['VisualEditor'], 'Citoid': ['Cite', 'VisualEditor'], -- To view, visit https://gerrit.wikimedia.org/r/321083 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6169adf602e2219aa8b9c908588dfccc7274728 Gerrit-PatchSet: 1 Gerrit-Project: integration/config 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] mediawiki...VisualEditor[master]: Teardown the toolbar properly
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/321082 Change subject: Teardown the toolbar properly .. Teardown the toolbar properly Change-Id: If9cc876a57272679584ebc653cf2ee8e17ddb821 Depends-On: I0343dfe85f967c1bb4257a6afe85804d9efa7a6c --- M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/82/321082/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 216b3d2..cf1a14f 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -1066,8 +1066,8 @@ .removeClass( 've-init-mw-desktopArticleTarget-toolbar-open' ) .removeClass( 've-init-mw-desktopArticleTarget-toolbar-opened' ); setTimeout( function () { - target.toolbar.destroy(); - target.toolbar = null; + // Parent method + ve.init.mw.DesktopArticleTarget.super.prototype.teardownToolbar.call( target ); deferred.resolve(); }, 400 ); } ); -- To view, visit https://gerrit.wikimedia.org/r/321082 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9cc876a57272679584ebc653cf2ee8e17ddb821 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Pass isModified when switching from VE to NWE
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/321080 Change subject: Pass isModified when switching from VE to NWE .. Pass isModified when switching from VE to NWE Change-Id: I9ae525aa7a5883bb45f91262db8abc082983ee1b --- M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/80/321080/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js index 4eb959e..099ac16 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js @@ -130,9 +130,7 @@ */ ve.init.mw.DesktopWikitextArticleTarget.prototype.editSource = function () { // Don't bother with a confirm dialog when switching to the new wikitext editor. - // Second argument (modified) is never checked if we are keeping changes, so - // don't bother computing it. - this.switchToWikitextEditor( false ); + this.switchToWikitextEditor( false, this.getSurface().getModel().hasBeenModified() ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/321080 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ae525aa7a5883bb45f91262db8abc082983ee1b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] maps/kartotherian[master]: Added support for building with node 6.
Ppchelko has uploaded a new change for review. https://gerrit.wikimedia.org/r/321079 Change subject: Added support for building with node 6. .. Added support for building with node 6. node-mapnik version 3.5.13 doesn't build with node v6 and pre-built binaries used by node-pre-gyp are built using a newer C++ compiler and won't run in our production environment. However, it's possible to build node-mapnik from scratch in the docker environment making it possible to deploy kartotherian using our traditional deployment method. To make this work, npm-shrinkwrap should be used, and it should point the mapnik lib to https://github.com/Pchelolo/node-mapnik The fork is the same as the node-mapnik repo, just adds the --build-from-source option to the install command. I want to create a PR for node-pre-gyp to allow controlling the build behaviour with an ENV variable, then e can drop shrinkwrapping and forking. Change-Id: I5ec951b00fd4b80ac8041afc18257aeec8496512 --- M package.json 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/maps/kartotherian refs/changes/79/321079/1 diff --git a/package.json b/package.json index 16fb11d..5f2503a 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "express": "^4.13.4", "js-yaml": "^3.6.0", "preq": "^0.4.11", -"service-runner": "^2.1.8" +"service-runner": "^2.1.9" , "heapdump": "*", "node-pre-gyp": "~0.6.25", @@ -101,7 +101,13 @@ "dependencies": { "_all": ["libcairo2-dev", "libgif-dev", "libpango1.0-dev"], "ubuntu": ["libjpeg62-dev"], - "debian": ["libjpeg62-turbo-dev"] + "debian": [ +"libjpeg62-turbo-dev fonts-dejavu libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-system-dev libboost-thread-dev libgdal-dev libicu-dev libpq-dev libcurl4-gnutls-dev libproj-dev libtiff-dev libwebp5", +{ "uri": "https://people.wikimedia.org/~faidon/mapnik/libmapbox-variant-dev_1.1.3-1~bpo8+1_all.deb; }, +{ "uri": "https://people.wikimedia.org/~faidon/mapnik/libmapnik3.0_3.0.12+ds-2~bpo8+1_amd64.deb; }, +{ "uri": "https://people.wikimedia.org/~faidon/mapnik/libmapnik-dev_3.0.12+ds-2~bpo8+1_amd64.deb; }, +{ "uri": "https://people.wikimedia.org/~faidon/mapnik/mapnik-utils_3.0.12+ds-2~bpo8+1_amd64.deb; } + ] } } } -- To view, visit https://gerrit.wikimedia.org/r/321079 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ec951b00fd4b80ac8041afc18257aeec8496512 Gerrit-PatchSet: 1 Gerrit-Project: maps/kartotherian Gerrit-Branch: master Gerrit-Owner: Ppchelko___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add !!html/php parser test for HTML comment after template name
jenkins-bot has submitted this change and it was merged. Change subject: Add !!html/php parser test for HTML comment after template name .. Add !!html/php parser test for HTML comment after template name I came looking for a test with comments inside transclusions because of bug T89615. I could only find a test for Parsoid and not for PHP, so I added it. Bug: T89615 Change-Id: I4ee3bc75ec86cc6fde6449790b81d287f0ca8345 --- M tests/parser/parserTests.txt 1 file changed, 20 insertions(+), 6 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved C. Scott Ananian: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index a18e219..9fe3029 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -2712,10 +2712,12 @@ bar}} -!! html +!! html/php foo bar +!! html/parsoid +foo bar !! end !! test @@ -2731,7 +2733,13 @@ {{echo|foo}} {{echo|foo}} -!!html/parsoid +!! html/php +foo +foo +foo +foo + +!! html/parsoid foo foo @@ -2755,7 +2763,13 @@ {{echo|1=foo}} {{echo|1=foo}} -!!html/parsoid +!! html/php +foo +foo +foo +foo + +!! html/parsoid foo foo @@ -2769,11 +2783,11 @@ Templates: Other wikitext in parameter names (bug 67657) !! wikitext {{echo|''1''=foo}} -!!html/parsoid -{{{1}}} -!!html/php +!! html/php {{{1}}} +!! html/parsoid +{{{1}}} !!end # -- To view, visit https://gerrit.wikimedia.org/r/320973 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4ee3bc75ec86cc6fde6449790b81d287f0ca8345 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80Gerrit-Reviewer: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: Tim Starling 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...VisualEditor[master]: Replace confirm with OO.ui.confirm
jenkins-bot has submitted this change and it was merged. Change subject: Replace confirm with OO.ui.confirm .. Replace confirm with OO.ui.confirm Also enable no-alert eslint rule to prevent alert/confirm/prompt being used in the future. Change-Id: I2851e1f58c1861f75dbb20192e5cf6c343da75db --- M .eslintrc.json M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 2 files changed, 15 insertions(+), 10 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/.eslintrc.json b/.eslintrc.json index be3fe6f..52f1a52 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -17,6 +17,7 @@ "rules": { "dot-notation": 0, "wrap-iife": 0, - "valid-jsdoc": 0 + "valid-jsdoc": 0, + "no-alert": "error" } } diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 216b3d2..3358499 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -601,7 +601,9 @@ * @inheritdoc */ ve.init.mw.DesktopArticleTarget.prototype.loadFail = function ( error, errorText ) { - var errorInfo, confirmPromptMessage; + var errorInfo, confirmPromptMessage, + target = this; + // Parent method ve.init.mw.DesktopArticleTarget.super.prototype.loadFail.apply( this, arguments ); @@ -637,16 +639,18 @@ } if ( confirmPromptMessage ) { - if ( confirm( confirmPromptMessage ) ) { - this.load(); - } else if ( !$( '#wpTextbox1' ).length ) { - // TODO: Some sort of progress bar? - this.switchToWikitextEditor( true, false ); - } else { + OO.ui.confirm( confirmPromptMessage ).done( function ( confirmed ) { + if ( confirmed ) { + target.load(); + } else if ( !$( '#wpTextbox1' ).length ) { + // TODO: Some sort of progress bar? + target.switchToWikitextEditor( true, false ); + } else { // If we're switching from the wikitext editor, just deactivate // don't try to switch back to it fully, that'd discard changes. - this.deactivate( true ); - } + target.deactivate( true ); + } + } ); } else { if ( error.statusText !== 'abort' ) { mw.log.warn( 'Failed to find error message', errorText, error ); -- To view, visit https://gerrit.wikimedia.org/r/320977 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2851e1f58c1861f75dbb20192e5cf6c343da75db Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Support more approved wikimedia cloaks to run the irc commands
jenkins-bot has submitted this change and it was merged. Change subject: Support more approved wikimedia cloaks to run the irc commands .. Support more approved wikimedia cloaks to run the irc commands Change-Id: I163d8205a5c3770ca8693e9f9d50e0ca7469abbd --- M src/relay.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Zppix: Looks good to me, approved jenkins-bot: Verified Dzahn: Looks good to me, but someone else must approve diff --git a/src/relay.js b/src/relay.js index 87b1935..5b72b5c 100644 --- a/src/relay.js +++ b/src/relay.js @@ -167,7 +167,7 @@ } ircClient.addListener('join', waitForChannelJoins); ircClient.addListener('message', function (from, to, text) { -var whitelist_cloaks = /(mediawiki|wikimedia|wikipedia|wiktionary)\/*/g; +var whitelist_cloaks = /(mediawiki|wikimedia|wikipedia|wiktionary|wikiquote|wikisource|wikispecies|wikibooks|wikinews|wikiversity|wikivoyage|wikidata|wikimedia-commons)\/*/g; var whitelist_nicks = [ "marktraceur", -- To view, visit https://gerrit.wikimedia.org/r/320931 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I163d8205a5c3770ca8693e9f9d50e0ca7469abbd Gerrit-PatchSet: 2 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Legoktm Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Zppix Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Send the irc messages to all irc channels if you restart or ...
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/321025 Change subject: Send the irc messages to all irc channels if you restart or force-restart .. Send the irc messages to all irc channels if you restart or force-restart Change-Id: I8f76cec4eea1a00a71a05e4ae234a408d1592945 --- M src/relay.js 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit refs/changes/25/321025/1 diff --git a/src/relay.js b/src/relay.js index 87b1935..0ae394c 100644 --- a/src/relay.js +++ b/src/relay.js @@ -196,13 +196,13 @@ logging.info('re-connecting to gerrit..'); -ircClient.say(to, "re-connecting to gerrit"); +ircClient.say([ allChannels ], "re-connecting to gerrit"); if (sshConn) { sshConn.end(); } -ircClient.say(to, "reconnected to gerrit"); +ircClient.say([ allChannels ], "reconnected to gerrit"); } else if ($irc_nick_restart && !$irc_nick1) { ircClient.say(to, "Permission is denied."); } @@ -210,7 +210,7 @@ if ($irc_nick_force_restart && $irc_nick1) { console.log(from + ' => ' + to + ' ' + text); -ircClient.say(to, "re-connecting to gerrit and irc."); +ircClient.say([ allChannels ], "re-connecting to gerrit and irc."); logging.info('Disconnecting from irc.'); @@ -224,7 +224,7 @@ logging.info('re-connected to gerrit.'); -setTimeout(function(){ ircClient.say(to, "re-connected to gerrit and irc."); }, 17000); +setTimeout(function(){ ircClient.say([ allChannels ], "re-connected to gerrit and irc."); }, 17000); logging.info('re-connected to irc.'); } else if ($irc_nick_force_restart && !$irc_nick1) { -- To view, visit https://gerrit.wikimedia.org/r/321025 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f76cec4eea1a00a71a05e4ae234a408d1592945 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: jenkins: disable cli
ArielGlenn has submitted this change and it was merged. Change subject: jenkins: disable cli .. jenkins: disable cli Workaround an undisclosed security issue. Same fix as the previous SECURITY-128: disable the Jenkins CLI entirely via a groovy script. Originally introduced by ae8abcd. Change-Id: I5376fe2b1959a74625b4450bbd8f20fce84fabde --- M modules/jenkins/manifests/init.pp 1 file changed, 13 insertions(+), 6 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/jenkins/manifests/init.pp b/modules/jenkins/manifests/init.pp index bc1ae44..f5768bc 100644 --- a/modules/jenkins/manifests/init.pp +++ b/modules/jenkins/manifests/init.pp @@ -51,15 +51,22 @@ mode=> '0644', } -# Legacy workaround for a Jenkins security issue. No more needed since -# Jenkins 1.638 and 1.625.2 -# https://jenkins.io/blog/2015/11/06/mitigating-unauthenticated-remote-code-execution-0-day-in-jenkins-cli/ -# https://github.com/jenkinsci-cert/SECURITY-218 +# Workaround for a Jenkins security issue. +# +# Same fix as a previous one: +# https://jenkins.io/blog/2015/11/06/mitigating-unauthenticated-remote-code-execution-0-day-in-jenkins-cli/ +# https://github.com/jenkinsci-cert/SECURITY-218 file { '/var/lib/jenkins/init.groovy.d': -ensure => absent, +ensure => directory, +owner => 'jenkins', +group => 'jenkins', +mode => '0755', } file { '/var/lib/jenkins/init.groovy.d/cli-shutdown.groovy': -ensure => absent, +source => 'puppet:///modules/jenkins/cli-shutdown.groovy', +owner => 'jenkins', +group => 'jenkins', +mode => '0755', } $real_ensure = $service_ensure ? { -- To view, visit https://gerrit.wikimedia.org/r/321023 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5376fe2b1959a74625b4450bbd8f20fce84fabde Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: HasharGerrit-Reviewer: ArielGlenn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: jenkins: disable cli
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/321023 Change subject: jenkins: disable cli .. jenkins: disable cli Workaround an undisclosed security issue. Same fix as the previous SECURITY-128: disable the Jenkins CLI entirely via a groovy script. Originally introduced by ae8abcd. Change-Id: I5376fe2b1959a74625b4450bbd8f20fce84fabde --- M modules/jenkins/manifests/init.pp 1 file changed, 13 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/321023/1 diff --git a/modules/jenkins/manifests/init.pp b/modules/jenkins/manifests/init.pp index bc1ae44..f5768bc 100644 --- a/modules/jenkins/manifests/init.pp +++ b/modules/jenkins/manifests/init.pp @@ -51,15 +51,22 @@ mode=> '0644', } -# Legacy workaround for a Jenkins security issue. No more needed since -# Jenkins 1.638 and 1.625.2 -# https://jenkins.io/blog/2015/11/06/mitigating-unauthenticated-remote-code-execution-0-day-in-jenkins-cli/ -# https://github.com/jenkinsci-cert/SECURITY-218 +# Workaround for a Jenkins security issue. +# +# Same fix as a previous one: +# https://jenkins.io/blog/2015/11/06/mitigating-unauthenticated-remote-code-execution-0-day-in-jenkins-cli/ +# https://github.com/jenkinsci-cert/SECURITY-218 file { '/var/lib/jenkins/init.groovy.d': -ensure => absent, +ensure => directory, +owner => 'jenkins', +group => 'jenkins', +mode => '0755', } file { '/var/lib/jenkins/init.groovy.d/cli-shutdown.groovy': -ensure => absent, +source => 'puppet:///modules/jenkins/cli-shutdown.groovy', +owner => 'jenkins', +group => 'jenkins', +mode => '0755', } $real_ensure = $service_ensure ? { -- To view, visit https://gerrit.wikimedia.org/r/321023 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5376fe2b1959a74625b4450bbd8f20fce84fabde Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: exec-manage: Change order of params to support xargs for nod...
Madhuvishy has submitted this change and it was merged. Change subject: exec-manage: Change order of params to support xargs for node names .. exec-manage: Change order of params to support xargs for node names Change-Id: Iafbb19b2bfc3ec35158d5150f03051d687ddfc2c --- M modules/toollabs/files/exec-manage 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Madhuvishy: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/files/exec-manage b/modules/toollabs/files/exec-manage index e71280d..bb82f32 100644 --- a/modules/toollabs/files/exec-manage +++ b/modules/toollabs/files/exec-manage @@ -8,10 +8,10 @@ function usage { echo -e "Usage:\n" -echo "exec-manage exec_host_name [status|depool|repool|test]" +echo "exec-manage [status|depool|repool|test] exec_host_name" echo "exec-manage [list]" echo "" -echo "Example: exec-manage tools-exec1001.eqiad.wmflabs status" +echo "Example: exec-manage status tools-exec1001.eqiad.wmflabs " } if [[ ! "$1" || "$1" == '-h' ]]; then @@ -21,12 +21,12 @@ if [ "$#" -ne 2 ]; then echo "Wrong number of parameters" -echo "Usage: exec-manage.sh exec_host_name [status|depool|repool|test] " +usage exit 1 fi -exec_host=$1 -cmd=$2 +cmd=$1 +exec_host=$2 case $cmd in status) -- To view, visit https://gerrit.wikimedia.org/r/321022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iafbb19b2bfc3ec35158d5150f03051d687ddfc2c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MadhuvishyGerrit-Reviewer: Coren Gerrit-Reviewer: Madhuvishy Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: exec-manage: Change order of params to support xargs for nod...
Madhuvishy has uploaded a new change for review. https://gerrit.wikimedia.org/r/321022 Change subject: exec-manage: Change order of params to support xargs for node names .. exec-manage: Change order of params to support xargs for node names Change-Id: Iafbb19b2bfc3ec35158d5150f03051d687ddfc2c --- M modules/toollabs/files/exec-manage 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/321022/1 diff --git a/modules/toollabs/files/exec-manage b/modules/toollabs/files/exec-manage index e71280d..bb82f32 100644 --- a/modules/toollabs/files/exec-manage +++ b/modules/toollabs/files/exec-manage @@ -8,10 +8,10 @@ function usage { echo -e "Usage:\n" -echo "exec-manage exec_host_name [status|depool|repool|test]" +echo "exec-manage [status|depool|repool|test] exec_host_name" echo "exec-manage [list]" echo "" -echo "Example: exec-manage tools-exec1001.eqiad.wmflabs status" +echo "Example: exec-manage status tools-exec1001.eqiad.wmflabs " } if [[ ! "$1" || "$1" == '-h' ]]; then @@ -21,12 +21,12 @@ if [ "$#" -ne 2 ]; then echo "Wrong number of parameters" -echo "Usage: exec-manage.sh exec_host_name [status|depool|repool|test] " +usage exit 1 fi -exec_host=$1 -cmd=$2 +cmd=$1 +exec_host=$2 case $cmd in status) -- To view, visit https://gerrit.wikimedia.org/r/321022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iafbb19b2bfc3ec35158d5150f03051d687ddfc2c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Avoid annotation set clones when unused
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/321021 Change subject: Avoid annotation set clones when unused .. Avoid annotation set clones when unused Change-Id: I374ec3510344fcafa54a4bc8fe556d9db76a2ce8 --- M src/dm/ve.dm.AnnotationSet.js M src/dm/ve.dm.Converter.js 2 files changed, 44 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/21/321021/1 diff --git a/src/dm/ve.dm.AnnotationSet.js b/src/dm/ve.dm.AnnotationSet.js index af61201..ec03595 100644 --- a/src/dm/ve.dm.AnnotationSet.js +++ b/src/dm/ve.dm.AnnotationSet.js @@ -36,7 +36,7 @@ * @return {ve.dm.AnnotationSet} Copy of annotation set */ ve.dm.AnnotationSet.prototype.clone = function () { - return new ve.dm.AnnotationSet( this.getStore(), this.storeIndexes.slice( 0 ) ); + return new ve.dm.AnnotationSet( this.getStore(), this.storeIndexes.slice() ); }; /** diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js index a94ad72..5371b65 100644 --- a/src/dm/ve.dm.Converter.js +++ b/src/dm/ve.dm.Converter.js @@ -87,49 +87,53 @@ // Close annotations as needed // Go through annotationStack from bottom to top (low to high), // and find the first annotation that's not in annotations. - targetSetOpen = targetSet.clone(); - for ( i = 0, len = currentSet.getLength(); i < len; i++ ) { - index = currentSet.getIndex( i ); - // containsComparableForSerialization is expensive, - // so do a simple contains check first - if ( - targetSetOpen.containsIndex( index ) || - targetSetOpen.containsComparableForSerialization( currentSet.get( i ) ) - ) { - targetSetOpen.removeIndex( index ); - } else { - startClosingAt = i; - break; + if ( currentSet.getLength() ) { + targetSetOpen = targetSet.clone(); + for ( i = 0, len = currentSet.getLength(); i < len; i++ ) { + index = currentSet.getIndex( i ); + // containsComparableForSerialization is expensive, + // so do a simple contains check first + if ( + targetSetOpen.containsIndex( index ) || + targetSetOpen.containsComparableForSerialization( currentSet.get( i ) ) + ) { + targetSetOpen.removeIndex( index ); + } else { + startClosingAt = i; + break; + } } - } - if ( startClosingAt !== undefined ) { - // Close all annotations from top to bottom (high to low) - // until we reach startClosingAt - for ( i = currentSet.getLength() - 1; i >= startClosingAt; i-- ) { - close( currentSet.get( i ) ); - // Remove from currentClone - currentSet.removeAt( i ); + if ( startClosingAt !== undefined ) { + // Close all annotations from top to bottom (high to low) + // until we reach startClosingAt + for ( i = currentSet.getLength() - 1; i >= startClosingAt; i-- ) { + close( currentSet.get( i ) ); + // Remove from currentClone + currentSet.removeAt( i ); + } } } - currentSetOpen = currentSet.clone(); - // Open annotations as needed - for ( i = 0, len = targetSet.getLength(); i < len; i++ ) { - index = targetSet.getIndex( i ); - // containsComparableForSerialization is expensive, - // so do a simple contains check first - if ( - currentSetOpen.containsIndex( index ) || - currentSetOpen.containsComparableForSerialization( targetSet.get( i ) ) - ) { - // If an annotation is already open remove it from the currentSetOpen list - // as it may exist multiple times in the targetSet, and so may need to be - // opened again - currentSetOpen.removeIndex( index ); - } else { - open( targetSet.get( i ) ); - // Add to currentClone - currentSet.pushIndex( index ); + if ( targetSet.getLength() ) { + currentSetOpen = currentSet.clone(); + // Open annotations as needed + for ( i = 0, len =
[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Fix Cannot read property 'match' of undefined
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/321020 Change subject: Fix Cannot read property 'match' of undefined .. Fix Cannot read property 'match' of undefined This should hopefully fix the problem, but i coulden reproduce the problem on our test bot, but it managed to happen to the prod bot Change-Id: I77fc7fb6025ca68f941c2fc49fa20cd35618dabd --- M src/relay.js 1 file changed, 57 insertions(+), 49 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit refs/changes/20/321020/1 diff --git a/src/relay.js b/src/relay.js index 21daea6..87b1935 100644 --- a/src/relay.js +++ b/src/relay.js @@ -176,75 +176,83 @@ ]; ircClient.whois(from, function(info){ + try { - var $irc_nick_restart = text.indexOf(ircClient.nick + ': ' + 'restart') === 0; - var $irc_nick_force_restart = text.indexOf(ircClient.nick + ': ' + 'force-restart') === 0; - var $irc_nick_nick = text.indexOf(ircClient.nick + ': ' + 'nick') === 0; - var $irc_nick_help = text.indexOf(ircClient.nick + ': ' + 'help') === 0; - var $irc_nick1 = (info.host.match(whitelist_cloaks) || whitelist_nicks.indexOf(from) >= 0); - var $irc_nick2 = config.nick.indexOf(ircClient.nick) >= 0; +var $irc_nick_restart = text.indexOf(ircClient.nick + ': ' + 'restart') === 0; +var $irc_nick_force_restart = text.indexOf(ircClient.nick + ': ' + 'force-restart') === 0; +var $irc_nick_nick = text.indexOf(ircClient.nick + ': ' + 'nick') === 0; +var $irc_nick_help = text.indexOf(ircClient.nick + ': ' + 'help') === 0; +var $irc_nick1; +var $irc_nick2 = config.nick.indexOf(ircClient.nick) >= 0; - if ($irc_nick_restart && $irc_nick1) { - console.log(from + ' => ' + to + ' ' + text); +if (info.host) { +$irc_nick1 = (info.host.match(whitelist_cloaks) || whitelist_nicks.indexOf(from) >= 0); +} else { +$irc_nick1 = whitelist_nicks.indexOf(from) >= 0; +} - logging.info('re-connecting to gerrit..'); +if ($irc_nick_restart && $irc_nick1) { +console.log(from + ' => ' + to + ' ' + text); - ircClient.say(to, "re-connecting to gerrit"); +logging.info('re-connecting to gerrit..'); - if (sshConn) { - sshConn.end(); - } +ircClient.say(to, "re-connecting to gerrit"); - ircClient.say(to, "reconnected to gerrit"); - } else if ($irc_nick_restart && !$irc_nick1) { - ircClient.say(to, "Permission is denied."); - } +if (sshConn) { +sshConn.end(); +} - if ($irc_nick_force_restart && $irc_nick1) { - console.log(from + ' => ' + to + ' ' + text); +ircClient.say(to, "reconnected to gerrit"); +} else if ($irc_nick_restart && !$irc_nick1) { + ircClient.say(to, "Permission is denied."); +} - ircClient.say(to, "re-connecting to gerrit and irc."); +if ($irc_nick_force_restart && $irc_nick1) { +console.log(from + ' => ' + to + ' ' + text); - logging.info('Disconnecting from irc.'); +ircClient.say(to, "re-connecting to gerrit and irc."); - ircClient.send('QUIT', "quit"); +logging.info('Disconnecting from irc.'); - logging.info('re-connecting to gerrit..'); +ircClient.send('QUIT', "quit"); - if (sshConn) { - sshConn.end(); - } +logging.info('re-connecting to gerrit..'); - logging.info('re-connected to gerrit.'); +if (sshConn) { +sshConn.end(); +} - setTimeout(function(){ ircClient.say(to, "re-connected to gerrit and irc."); }, 17000); +logging.info('re-connected to gerrit.'); - logging.info('re-connected to irc.'); - } else if ($irc_nick_force_restart && !$irc_nick1) { - ircClient.say(to, "Permission is denied."); - } +setTimeout(function(){ ircClient.say(to, "re-connected to gerrit and irc."); }, 17000); - if ($irc_nick_nick && $irc_nick1 && $irc_nick2) { - console.log(from + ' => ' + to + ' ' + text); +logging.info('re-connected to irc.'); +} else if ($irc_nick_force_restart && !$irc_nick1) { + ircClient.say(to, "Permission is denied."); +} - ircClient.say(to, "Nick is already " + ircClient.nick + " not changing the nick."); - } else if ($irc_nick_nick && $irc_nick1) { - console.log(from + ' => ' + to + ' ' + text); +if ($irc_nick_nick && $irc_nick1 && $irc_nick2) { +console.log(from + ' => ' + to
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove broken cas() method from WinCacheBagOStuff
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/321019 Change subject: Remove broken cas() method from WinCacheBagOStuff .. Remove broken cas() method from WinCacheBagOStuff Change-Id: I9406a50df8e900b4fc5861c2174ba7a63a0dd765 --- M includes/libs/objectcache/WinCacheBagOStuff.php 1 file changed, 0 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/19/321019/1 diff --git a/includes/libs/objectcache/WinCacheBagOStuff.php b/includes/libs/objectcache/WinCacheBagOStuff.php index 6996ce5..26352ed 100644 --- a/includes/libs/objectcache/WinCacheBagOStuff.php +++ b/includes/libs/objectcache/WinCacheBagOStuff.php @@ -36,9 +36,6 @@ protected function getWithToken( $key, &$casToken, $flags = 0 ) { $val = wincache_ucache_get( $key ); - - $casToken = $val; - if ( is_string( $val ) ) { $val = unserialize( $val ); } @@ -52,10 +49,6 @@ /* wincache_ucache_set returns an empty array on success if $value was an array, bool otherwise */ return ( is_array( $result ) && $result === [] ) || $result; - } - - protected function cas( $casToken, $key, $value, $exptime = 0 ) { - return wincache_ucache_cas( $key, $casToken, serialize( $value ) ); } public function delete( $key ) { -- To view, visit https://gerrit.wikimedia.org/r/321019 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9406a50df8e900b4fc5861c2174ba7a63a0dd765 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Fix service urls for secondary nfs cluster
Madhuvishy has uploaded a new change for review. https://gerrit.wikimedia.org/r/321017 Change subject: labstore: Fix service urls for secondary nfs cluster .. labstore: Fix service urls for secondary nfs cluster Change-Id: I3f7047a9913e5b6cfd1bf79c7b59bc24237c2b74 --- M modules/role/manifests/labs/nfsclient.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/17/321017/1 diff --git a/modules/role/manifests/labs/nfsclient.pp b/modules/role/manifests/labs/nfsclient.pp index 1b0f5ee..06ae66c 100644 --- a/modules/role/manifests/labs/nfsclient.pp +++ b/modules/role/manifests/labs/nfsclient.pp @@ -61,7 +61,7 @@ project => $::labsproject, options => ['rw', 'hard'], mount_path => '/mnt/nfs/labstore-secondary-tools-home', -server => 'nfs-tools-project.eqiad.wmnet', +server => 'nfs-tools-project.svc.eqiad.wmnet', share_path => '/project/tools/home', lookupcache => $lookupcache, } @@ -71,7 +71,7 @@ project => $::labsproject, options => ['rw', 'hard'], mount_path => '/mnt/nfs/labstore-secondary-tools-project', -server => 'nfs-tools-project.eqiad.wmnet', +server => 'nfs-tools-project.svc.eqiad.wmnet', share_path => '/project/tools/project', lookupcache => $lookupcache, } -- To view, visit https://gerrit.wikimedia.org/r/321017 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f7047a9913e5b6cfd1bf79c7b59bc24237c2b74 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Dual mount tools from labstore1001 and labstore-se...
Madhuvishy has submitted this change and it was merged. Change subject: labstore: Dual mount tools from labstore1001 and labstore-secondary .. labstore: Dual mount tools from labstore1001 and labstore-secondary Bug: T146154 Change-Id: If2346ad1a071b092ea04e7ab069ecf864fe0546f --- M modules/labstore/files/nfs-mounts.yaml M modules/role/manifests/labs/nfsclient.pp 2 files changed, 69 insertions(+), 0 deletions(-) Approvals: Rush: Looks good to me, but someone else must approve Madhuvishy: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/labstore/files/nfs-mounts.yaml b/modules/labstore/files/nfs-mounts.yaml index 57ca2a3..00ef65b 100644 --- a/modules/labstore/files/nfs-mounts.yaml +++ b/modules/labstore/files/nfs-mounts.yaml @@ -156,6 +156,8 @@ home: true project: true scratch: true + tools-home: true + tools-project: true toolsbeta: gid: 50610 mounts: diff --git a/modules/role/manifests/labs/nfsclient.pp b/modules/role/manifests/labs/nfsclient.pp index bad40b5..1b0f5ee 100644 --- a/modules/role/manifests/labs/nfsclient.pp +++ b/modules/role/manifests/labs/nfsclient.pp @@ -55,6 +55,73 @@ } } +if $::labsproject == 'tools' { +labstore::nfs_mount { 'tools-home-on-labstore-secondary': +mount_name => 'tools-home', +project => $::labsproject, +options => ['rw', 'hard'], +mount_path => '/mnt/nfs/labstore-secondary-tools-home', +server => 'nfs-tools-project.eqiad.wmnet', +share_path => '/project/tools/home', +lookupcache => $lookupcache, +} + +labstore::nfs_mount { 'tools-project-on-labstore-secondary': +mount_name => 'tools-project', +project => $::labsproject, +options => ['rw', 'hard'], +mount_path => '/mnt/nfs/labstore-secondary-tools-project', +server => 'nfs-tools-project.eqiad.wmnet', +share_path => '/project/tools/project', +lookupcache => $lookupcache, +} + +# Uncomment to remove existing mounts from labstore1001 + +# Temp: can remove after migration +# labstore::nfs_mount { 'tools-project-on-labstoresvc': +# ensure => 'absent', +# mount_name => 'project', +# project => $::labsproject, +# options => ['rw', $mode], +# mount_path => '/data/project', +# share_path => "/project/${::labsproject}/project", +# server => 'labstore.svc.eqiad.wmnet', +# block => true, +# lookupcache => $lookupcache, +# } +# +# labstore::nfs_mount { 'tools-home-on-labstoresvc': +# ensure => 'absent', +# mount_name => 'home', +# project => $::labsproject, +# options => ['rw', 'hard'], +# mount_path => '/home', +# share_path => "/project/${::labsproject}/home", +# server => 'labstore.svc.eqiad.wmnet', +# block => true, +# lookupcache => $lookupcache, +# } +# +# # Sets up symlinks from new tools mounts to /data/project and /home +# if mount_nfs_volume($::labsproject, 'tools-project') { +# file { '/data/project': +# ensure => 'link', +# target => '/mnt/nfs/labstore-secondary-tools-project', +# require => [Labstore::Nfs_mount['tools-project-on-labstore-secondary'], +# Labstore::Nfs_mount['tools-project-on-labstoresvc']], +# } +# } +# if mount_nfs_volume($::labsproject, 'tools-home') +# file { '/home': +# ensure => 'link', +# target => '/mnt/nfs/labstore-secondary-tools-home', +# require => [Labstore::Nfs_mount['tools-home-on-labstore-secondary'], +# Labstore::Nfs_mount['tools-home-on-labstoresvc']], +# } +# } +} + labstore::nfs_mount { 'scratch-on-labstore1003': mount_name => 'scratch', project => $::labsproject, -- To view, visit https://gerrit.wikimedia.org/r/321001 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2346ad1a071b092ea04e7ab069ecf864fe0546f Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MadhuvishyGerrit-Reviewer: Madhuvishy Gerrit-Reviewer: Rush Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Don't throw exception on IPN verify failure
Cdentinger has uploaded a new change for review. https://gerrit.wikimedia.org/r/321016 Change subject: Don't throw exception on IPN verify failure .. Don't throw exception on IPN verify failure It's being super annoying with the email Change-Id: Icaf05cb569e05744d20ba78af71639059db787e3 --- M PaymentProviders/PayPal/PayPalPaymentsAPI.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/16/321016/1 diff --git a/PaymentProviders/PayPal/PayPalPaymentsAPI.php b/PaymentProviders/PayPal/PayPalPaymentsAPI.php index 9eb9b49..c6c78eb 100644 --- a/PaymentProviders/PayPal/PayPalPaymentsAPI.php +++ b/PaymentProviders/PayPal/PayPalPaymentsAPI.php @@ -45,7 +45,7 @@ } elseif ( $response === 'INVALID' ) { return false; } else { - throw new RuntimeException( + Logger::debug( "Unknown response from PayPal IPN PB: [{$response}].\n" . "Verbose logging: $logged" ); -- To view, visit https://gerrit.wikimedia.org/r/321016 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icaf05cb569e05744d20ba78af71639059db787e3 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Cdentinger___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Remove redundant narrow-threshold calculation
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/321014 Change subject: Remove redundant narrow-threshold calculation .. Remove redundant narrow-threshold calculation This is done upstream in OOUI. Change-Id: Icc0e535f9d1113a14d2c1cc275efebbc98e3a38c --- M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/14/321014/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 3358499..2403008 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -1024,9 +1024,6 @@ */ ve.init.mw.DesktopArticleTarget.prototype.attachToolbarSaveButton = function () { this.toolbar.$actions.append( this.toolbarSaveButton.$element ); - // Make the toolbar recalculate its sizes for narrow/wide switching. - // This really should not be necessary. - this.toolbar.narrowThreshold = this.toolbar.$group.width() + this.toolbar.$actions.width(); }; /** -- To view, visit https://gerrit.wikimedia.org/r/321014 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc0e535f9d1113a14d2c1cc275efebbc98e3a38c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...toollabs-images[master]: Add libenchant to python(2)? base images
jenkins-bot has submitted this change and it was merged. Change subject: Add libenchant to python(2)? base images .. Add libenchant to python(2)? base images Bug: T143449 Change-Id: I839437a986311c06d6a6b0bcde5cbb3d9317bfc8 --- M python/base/Dockerfile.template M python2/base/Dockerfile.template 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: Madhuvishy: Looks good to me, approved jenkins-bot: Verified diff --git a/python/base/Dockerfile.template b/python/base/Dockerfile.template index a1955a9..65a1377 100644 --- a/python/base/Dockerfile.template +++ b/python/base/Dockerfile.template @@ -14,3 +14,5 @@ # under https://phabricator.wikimedia.org/T140110 # libxml2 pip package - T140117 RUN apt-get install --yes libxml2-dev libxslt-dev zlib1g-dev +# Lots of usage of PyEnchant happens. T143449 +RUN apt-get install --yes libenchant-dev \ No newline at end of file diff --git a/python2/base/Dockerfile.template b/python2/base/Dockerfile.template index ad1ef54..801f104 100644 --- a/python2/base/Dockerfile.template +++ b/python2/base/Dockerfile.template @@ -16,3 +16,5 @@ # MySQLdb-Python pip package - T140112 # python2 only, python3 should use PyMySQL RUN apt-get install --yes libmysqlclient-dev +# Lots of usage of PyEnchant happens. T143449 +RUN apt-get install --yes libenchant-dev \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/321013 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I839437a986311c06d6a6b0bcde5cbb3d9317bfc8 Gerrit-PatchSet: 1 Gerrit-Project: operations/docker-images/toollabs-images Gerrit-Branch: master Gerrit-Owner: YuvipandaGerrit-Reviewer: Madhuvishy 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...WikibaseQuality[master]: Declare compatibility with DataValues Number 0.8.0
jenkins-bot has submitted this change and it was merged. Change subject: Declare compatibility with DataValues Number 0.8.0 .. Declare compatibility with DataValues Number 0.8.0 The only feature used here is the QuantityValue class name, and the fact that QuantityValue::newFromArray can deserialize all serializations, which still holds (for both old and new serializations without bounds). Also changes repo url for jscs in .jscsrc file Change-Id: I335f607659d20fcaf1586369742eb5da7544b40f --- M .jscsrc M composer.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc index 745d6a2..9196cba 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,5 +1,5 @@ { - // https://github.com/jscs-dev/node-jscs/blob/master/presets/wikimedia.json + // https://github.com/wikimedia/jscs-preset-wikimedia/blob/master/presets/wikimedia.json "preset": "wikimedia", // diff --git a/composer.json b/composer.json index acd2596..d0a8c40 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ }, "require-dev": { "data-values/geo": "~1.0", - "data-values/number": ">=0.1 <0.7", + "data-values/number": ">=0.1 <0.9", "data-values/serialization": ">=0.1 <2.0", "data-values/time": ">=0.1 <0.9", "phpunit/phpunit": "^3.7.37|~4.5", -- To view, visit https://gerrit.wikimedia.org/r/320785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I335f607659d20fcaf1586369742eb5da7544b40f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikibaseQuality Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE)Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude 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] mediawiki...ArticlePlaceholder[master]: More generic title message for "create article" popup(s)
jenkins-bot has submitted this change and it was merged. Change subject: More generic title message for "create article" popup(s) .. More generic title message for "create article" popup(s) This is a series of very trivial changes, split from I10d10ab to make it easier to review. * Rename the title message key. * Make the title message shorter, so it does fit better into the popup (there is not much room). * Make the redirect use an absolute URL. * Prefer .msg() over .message().text(). It's exactly the same. Bug: T124036 Change-Id: I01ab147e2962652506c2bb17f6b648e6e421bfb7 --- M extension.json M i18n/en.json M i18n/qqq.json M modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.newEmptyArticle.js 4 files changed, 12 insertions(+), 7 deletions(-) Approvals: WMDE-Fisch: Looks good to me, approved Aude: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/extension.json b/extension.json index 75ebe1f..110cffa 100644 --- a/extension.json +++ b/extension.json @@ -32,7 +32,7 @@ "mediawiki.Title" ], "messages": [ - "articleplaceholder-abouttopic-create-article", + "articleplaceholder-abouttopic-create-article-title", "articleplaceholder-abouttopic-article-exists-error", "articleplaceholder-abouttopic-create-article-submit-button", "articleplaceholder-abouttopic-create-article-label", diff --git a/i18n/en.json b/i18n/en.json index e93fa17..c124b80 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -11,7 +11,7 @@ "articleplaceholder-abouttopic-entityid": "Please enter an item ID such as Q12345", "articleplaceholder-abouttopic-submit": "craft", "articleplaceholder-abouttopic-no-entity-error": "This is not a valid item ID.", - "articleplaceholder-abouttopic-create-article": "Create a new article with the title", + "articleplaceholder-abouttopic-create-article-title": "Create a new article", "articleplaceholder-abouttopic-create-article-label": "Article title", "articleplaceholder-abouttopic-create-article-mandatory": "The title of the article is mandatory.", "articleplaceholder-abouttopic-create-article-button": "Create an article", diff --git a/i18n/qqq.json b/i18n/qqq.json index 1d30006..66c2775 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -14,7 +14,7 @@ "articleplaceholder-abouttopic-entityid": "Text to encourage the user to enter an item id.", "articleplaceholder-abouttopic-submit": "Label on the submit button.\n{{Identical|Craft}}", "articleplaceholder-abouttopic-no-entity-error": "Error message in case of an invalid item id.", - "articleplaceholder-abouttopic-create-article": "Text in the popup encouraging the user to create an article with a selectable title", + "articleplaceholder-abouttopic-create-article-title": "Title of the popup window encouraging the user to create a new article.", "articleplaceholder-abouttopic-create-article-label": "Label of the article page title input in the 'Create article' popup.", "articleplaceholder-abouttopic-create-article-mandatory": "Used as an error message in the 'Create article', if the article title wasn't supplied.", "articleplaceholder-abouttopic-create-article-button": "Label on create article button", diff --git a/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.newEmptyArticle.js b/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.newEmptyArticle.js index 63654f8..68a9ec0 100644 --- a/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.newEmptyArticle.js +++ b/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.newEmptyArticle.js @@ -37,7 +37,7 @@ if ( query.pages[ 0 ].missing ) { title = mw.Title.newFromUserInput( titleRaw, 0 ); - document.location.href = title.getUrl( { action: 'edit' } ); + document.location.href = mw.config.get( 'wgServer' ) + title.getUrl( { action: 'edit' } ); deferred.resolve(); } else { deferred.reject( new OO.ui.Error( @@ -70,14 +70,19 @@ } OO.inheritClass( NewEmptyArticleDialog, OO.ui.ProcessDialog ); - NewEmptyArticleDialog.static.title = mw.message( 'articleplaceholder-abouttopic-create-article' ).text(); + NewEmptyArticleDialog.static.title = + mw.msg( 'articleplaceholder-abouttopic-create-article-title' ); + NewEmptyArticleDialog.static.actions = [
[MediaWiki-commits] [Gerrit] wikipedia...ProveIt[master]: Fix small font size for monobook skin
Sophivorus has submitted this change and it was merged. Change subject: Fix small font size for monobook skin .. Fix small font size for monobook skin Add another font-size for .skin-monobook Bug: T150102 Change-Id: I5f1bd7df40082fdc1bfe6e49326d99e10c06b06e --- M proveit.css 1 file changed, 9 insertions(+), 5 deletions(-) Approvals: Sophivorus: Verified; Looks good to me, approved diff --git a/proveit.css b/proveit.css index f84e365..a9195cb 100755 --- a/proveit.css +++ b/proveit.css @@ -1,9 +1,13 @@ #proveit { background: white; border: 1px solid #ddd; - font-size: 0.8em; + font-size: .8em; position: fixed; z-index: 2147483647; /* Max value */ +} + +.skin-monobook #proveit { + font-size: 120%; } #proveit-logo { @@ -127,7 +131,7 @@ box-sizing: border-box; font: inherit; outline: none; - padding: 0.4em; + padding: .4em; width: 100%; } @@ -142,7 +146,7 @@ border-top: 1px solid #ddd; box-sizing: border-box; margin: 0; - padding: 0.3em; + padding: .3em; pointer-events: none; position: absolute; bottom: 0; @@ -154,8 +158,8 @@ border: 1px solid #ccc; cursor: pointer; font: inherit; - margin: 0 0.2em; - padding: 0.6em; + margin: 0 .2em; + padding: .6em; pointer-events: all; } -- To view, visit https://gerrit.wikimedia.org/r/320007 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f1bd7df40082fdc1bfe6e49326d99e10c06b06e Gerrit-PatchSet: 2 Gerrit-Project: wikipedia/gadgets/ProveIt Gerrit-Branch: master Gerrit-Owner: IniquityGerrit-Reviewer: Sophivorus ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...toollabs-images[master]: Add libenchant to python(2)? base images
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/321013 Change subject: Add libenchant to python(2)? base images .. Add libenchant to python(2)? base images Bug: T143449 Change-Id: I839437a986311c06d6a6b0bcde5cbb3d9317bfc8 --- M python/base/Dockerfile.template M python2/base/Dockerfile.template 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/docker-images/toollabs-images refs/changes/13/321013/1 diff --git a/python/base/Dockerfile.template b/python/base/Dockerfile.template index a1955a9..65a1377 100644 --- a/python/base/Dockerfile.template +++ b/python/base/Dockerfile.template @@ -14,3 +14,5 @@ # under https://phabricator.wikimedia.org/T140110 # libxml2 pip package - T140117 RUN apt-get install --yes libxml2-dev libxslt-dev zlib1g-dev +# Lots of usage of PyEnchant happens. T143449 +RUN apt-get install --yes libenchant-dev \ No newline at end of file diff --git a/python2/base/Dockerfile.template b/python2/base/Dockerfile.template index ad1ef54..801f104 100644 --- a/python2/base/Dockerfile.template +++ b/python2/base/Dockerfile.template @@ -16,3 +16,5 @@ # MySQLdb-Python pip package - T140112 # python2 only, python3 should use PyMySQL RUN apt-get install --yes libmysqlclient-dev +# Lots of usage of PyEnchant happens. T143449 +RUN apt-get install --yes libenchant-dev \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/321013 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I839437a986311c06d6a6b0bcde5cbb3d9317bfc8 Gerrit-PatchSet: 1 Gerrit-Project: operations/docker-images/toollabs-images Gerrit-Branch: master Gerrit-Owner: Yuvipanda___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: fixup for I13b135e4
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/321012 Change subject: fixup for I13b135e4 .. fixup for I13b135e4 Change-Id: Ifb6516f5f63b9c00527bf96e0c275915181098c7 --- R modules/grafana/files/dashboards/server-board 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/12/321012/1 diff --git a/modules/grafana/files/dashboards/server-board.json b/modules/grafana/files/dashboards/server-board similarity index 100% rename from modules/grafana/files/dashboards/server-board.json rename to modules/grafana/files/dashboards/server-board -- To view, visit https://gerrit.wikimedia.org/r/321012 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb6516f5f63b9c00527bf96e0c275915181098c7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: MediaWiki namespace (and talk) back to English in MessagesCd...
MarcoAurelio has uploaded a new change for review. https://gerrit.wikimedia.org/r/321009 Change subject: MediaWiki namespace (and talk) back to English in MessagesCdo.php .. MediaWiki namespace (and talk) back to English in MessagesCdo.php Bug: T122428 Change-Id: I740addd0fce913ca74394c663c6858849aa4e2d5 --- M languages/messages/MessagesCdo.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/09/321009/1 diff --git a/languages/messages/MessagesCdo.php b/languages/messages/MessagesCdo.php index 9d8b1bd..6d875ae 100644 --- a/languages/messages/MessagesCdo.php +++ b/languages/messages/MessagesCdo.php @@ -19,8 +19,8 @@ NS_PROJECT_TALK => '$1討論', NS_FILE => '文件', NS_FILE_TALK=> '文件討論', - NS_MEDIAWIKI=> '媒體維基', - NS_MEDIAWIKI_TALK => '媒體維基討論', + NS_MEDIAWIKI=> 'MediaWiki', + NS_MEDIAWIKI_TALK => 'MediaWiki討論', NS_TEMPLATE => '模板', NS_TEMPLATE_TALK=> '模板討論', NS_HELP => '幫助', -- To view, visit https://gerrit.wikimedia.org/r/321009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I740addd0fce913ca74394c663c6858849aa4e2d5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MarcoAurelio___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Return an empty document when shallowCloneFromRange is colla...
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/321006 Change subject: Return an empty document when shallowCloneFromRange is collapsed .. Return an empty document when shallowCloneFromRange is collapsed Change-Id: I9d5c4eda50b8d067b720c804eb16fc6f37bbe214 --- M src/dm/ve.dm.Document.js M tests/dm/ve.dm.Document.test.js 2 files changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/06/321006/1 diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js index 3a29d5d..43aa7a1 100644 --- a/src/dm/ve.dm.Document.js +++ b/src/dm/ve.dm.Document.js @@ -484,7 +484,7 @@ i--; } - if ( selection.length === 0 ) { + if ( selection.length === 0 || range.isCollapsed() ) { // Nothing selected linearData = new ve.dm.ElementLinearData( this.getStore(), [ { type: 'paragraph', internal: { generated: 'empty' } }, diff --git a/tests/dm/ve.dm.Document.test.js b/tests/dm/ve.dm.Document.test.js index fb76918..4ad5564 100644 --- a/tests/dm/ve.dm.Document.test.js +++ b/tests/dm/ve.dm.Document.test.js @@ -652,6 +652,17 @@ balancedRange: new ve.Range( 1 ) }, { + doc: 'alienWithEmptyData', + msg: 'collapsed range in empty paragraph', + range: new ve.Range( 1 ), + expected: [ + { type: 'paragraph', internal: { generated: 'empty' } }, + { type: 'paragraph' } + ], + originalRange: new ve.Range( 1 ), + balancedRange: new ve.Range( 1 ) + }, + { msg: 'range with one character', range: new ve.Range( 2, 3 ), expected: [ -- To view, visit https://gerrit.wikimedia.org/r/321006 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d5c4eda50b8d067b720c804eb16fc6f37bbe214 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: POC: Translate extension experiment using Annotation service.
C. Scott Ananian has uploaded a new change for review. https://gerrit.wikimedia.org/r/321005 Change subject: POC: Translate extension experiment using Annotation service. .. POC: Translate extension experiment using Annotation service. Change-Id: I86f1fbe5bceef93b2654ded636719550daf72010 --- M lib/api/ParsoidService.js M lib/api/apiUtils.js M lib/api/routes.js A lib/translate/HRequest.js A lib/translate/Translator.js 5 files changed, 203 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/05/321005/1 diff --git a/lib/api/ParsoidService.js b/lib/api/ParsoidService.js index 7aa1bb5..7d6d765 100644 --- a/lib/api/ParsoidService.js +++ b/lib/api/ParsoidService.js @@ -183,6 +183,7 @@ // v3 API routes app.get('/:domain/v3/page/:format/:title/:revision?', v3, u, p, a, routes.v3Get); app.post('/:domain/v3/transform/:from/to/:format/:title?/:revision?', v3, u, p, a, routes.v3Post); + app.get('/:domain/v3/translate/:lang/:format/:title/:revision?', v3, u, p, a, routes.v3Translate); var server; return new Promise(function(resolve, reject) { diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js index e3d77e9..ad3f947 100644 --- a/lib/api/apiUtils.js +++ b/lib/api/apiUtils.js @@ -402,7 +402,7 @@ * @param {Request} req * @param {Response} res */ -apiUtils.redirectToOldid = function(req, res) { +apiUtils.redirectToOldid = function(req, res, isTranslate) { var opts = res.locals.opts; var env = res.locals.env; var metrics = env.conf.parsoid.metrics; @@ -418,7 +418,12 @@ format, encodeURIComponent(target), revid, - ].join('/'); + ]; + // HACK + if (isTranslate) { + path.splice(3, 1, 'translate', opts.lang); + } + path = path.join('/'); if (Object.keys(req.query).length > 0) { path += '?' + qs.stringify(req.query); } diff --git a/lib/api/routes.js b/lib/api/routes.js index 9a56651..c1e2ff3 100644 --- a/lib/api/routes.js +++ b/lib/api/routes.js @@ -14,6 +14,7 @@ var Promise = require('../utils/promise.js'); var LogData = require('../logger/LogData.js').LogData; var ApiRequest = require('../mw/ApiRequest.js'); +var Translator = require('../translate/Translator.js'); var TemplateRequest = ApiRequest.TemplateRequest; @@ -744,6 +745,47 @@ } return p.catch(apiUtils.timeoutResp.bind(null, env)); }; + // GET requests + routes.v3Translate = function(req, res) { + var opts = res.locals.opts; + var env = res.locals.env; + var lang = opts.lang = req.params.lang; + var oldid = res.locals.oldid; + var target = env.normalizeAndResolvePageTitle(); + // XXX explicit oldid is still going through this path! + if (!oldid) { + return TemplateRequest.setPageSrcInfo(env, target).then(function(){ + return apiUtils.redirectToOldid(req, res, 'translate'); + }); + } + return Promise.resolve().then(function() { + if (req.headers.cookie) { + // Don't cache requests with a session. + apiUtils.setHeader(res, env, 'Cache-Control', 'private,no-cache,s-maxage=0'); + } + return TemplateRequest.setPageSrcInfo(env, target, oldid); + }).then(function() { + apiUtils.setHeader(res, env, 'content-revision-id', oldid); + return env.getContentHandler().toHTML(env); + }).then(function(doc) { + return new Translator(env, lang).translate(doc); + }).then(function(doc) { + var html, pb; + if (env.pageBundle) { + var out = DU.extractDpAndSerialize(res.locals.bodyOnly ? doc.body : doc, { + innerXML: res.locals.bodyOnly, + }); + html = out.str; + pb = out.pb; + } else { + html = DU.toXML(res.locals.bodyOnly ? doc.body : doc, { + innerXML: res.locals.bodyOnly, + }); + } + apiUtils.wt2htmlRes(env, res, html, pb); + }).catch(apiUtils.timeoutResp.bind(null, env)); + }; + // POST requests routes.v3Post = function(req, res) { diff --git a/lib/translate/HRequest.js b/lib/translate/HRequest.js new file mode 100644 index 000..eec57d2 --- /dev/null
[MediaWiki-commits] [Gerrit] operations/puppet[production]: grafana: Provision the Server Board dashboard as JSON
Filippo Giunchedi has submitted this change and it was merged. Change subject: grafana: Provision the Server Board dashboard as JSON .. grafana: Provision the Server Board dashboard as JSON This will effectively make the dashboard read only and establish it as operations provisioned dashboard Change-Id: I13b135e469f69ebd7697bd7314dfa16e1616d3a6 --- A modules/grafana/files/dashboards/server-board.json M modules/role/manifests/grafana/production.pp 2 files changed, 1,472 insertions(+), 0 deletions(-) Approvals: Filippo Giunchedi: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/grafana/files/dashboards/server-board.json b/modules/grafana/files/dashboards/server-board.json new file mode 100644 index 000..ab62a45 --- /dev/null +++ b/modules/grafana/files/dashboards/server-board.json @@ -0,0 +1,1469 @@ +{ + "__inputs": [ +{ + "name": "DS_GRAPHITE", + "label": "graphite", + "description": "", + "type": "datasource", + "pluginId": "graphite", + "pluginName": "Graphite" +} + ], + "__requires": [ +{ + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" +}, +{ + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" +}, +{ + "type": "datasource", + "id": "graphite", + "name": "Graphite", + "version": "1.0.0" +} + ], + "id": null, + "title": "Server Board", + "tags": [ +"operations", +"source:puppet.git", +"readonly" + ], + "style": "light", + "timezone": "utc", + "editable": true, + "hideControls": true, + "sharedCrosshair": true, + "rows": [ +{ + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ +{ + "aliasColors": { +"idle": "#7EB26D", +"nice": "#EAB839", +"steal": "#BA43A9", +"system": "#E24D42", +"user": "#1F78C1" + }, + "annotate": { +"enable": false + }, + "bars": false, + "datasource": "${DS_GRAPHITE}", + "fill": 10, + "grid": { +"max": null, +"min": null, +"threshold1": null, +"threshold1Color": "rgba(216, 200, 27, 0.27)", +"threshold2": null, +"threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "", + "id": 7, + "interactive": true, + "legend": { +"alignAsTable": true, +"avg": true, +"current": true, +"max": true, +"min": true, +"show": true, +"total": false, +"values": true + }, + "legend_counts": true, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null", + "options": false, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "resolution": 100, + "scale": 1, + "seriesOverrides": [ +{ + "alias": "idle", + "fill": 3, + "linewidth": 1 +} + ], + "span": 4, + "spyable": true, + "stack": true, + "steppedLine": false, + "targets": [ +{ + "refId": "A", + "target": "aliasByMetric(servers.$server.cpu.total.user)" +}, +{ + "refId": "B", + "target": "aliasByMetric(servers.$server.cpu.total.nice)" +}, +{ + "refId": "C", + "target": "aliasByMetric(servers.$server.cpu.total.system)" +}, +{ + "refId": "D", + "target": "aliasByMetric(servers.$server.cpu.total.iowait)" +}, +{ + "refId": "E", + "target": "aliasByMetric(servers.$server.cpu.total.steal)" +}, +{ + "refId": "F", + "target": "aliasByMetric(servers.$server.cpu.total.idle)" +} + ], + "timeFrom": null, + "timeShift": null, + "timezone": "browser", + "title": "$server CPU", + "tooltip": { +"msResolution": false, +"query_as_alias": true, +"shared": true, +"sort": 0, +"value_type": "individual" + }, + "type": "graph", + "xaxis": { +"show": true + }, + "yaxes": [ +{ + "format": "percent", + "label": "", + "logBase": 1, + "max": 100, + "min": 0, + "show": true +}, +{ + "format":
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: eslint: Enable wrap-iife
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/321004 Change subject: eslint: Enable wrap-iife .. eslint: Enable wrap-iife Change-Id: If025d875d5cd987ebb8bd62568fbc02ea9a7789b --- M .eslintrc.json M resources/mobile.cache/Cache.js M resources/mobile.loggingSchemas/schemaEdit.js M resources/mobile.loggingSchemas/schemaMobileWebMainMenuClickTracking.js M resources/mobile.special.mobileeditor.scripts/redirectmobileeditor.js M resources/mobile.special.userlogin.scripts/userlogin.js M resources/skins.minerva.scripts/initLogging.js M resources/skins.minerva.special.watchlist.scripts/watchlist.js M tests/qunit/mobile.languages.structured/test_LanguageOverlay.js M tests/qunit/mobile.languages.structured/test_util.js M tests/qunit/mobile.modifiedBar/test_time.js M tests/qunit/mobile.overlays/test_Overlay.js M tests/qunit/mobile.references.gateway/test_ReferencesHtmlScraperGateway.js M tests/qunit/mobile.references.gateway/test_ReferencesMobileViewGateway.js 14 files changed, 13 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/04/321004/1 diff --git a/.eslintrc.json b/.eslintrc.json index ba5a4cd..480da69 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,7 +13,6 @@ }, "rules": { "dot-notation": 0, - "wrap-iife": 0, "valid-jsdoc": 0, "no-use-before-define": 0, "no-underscore-dangle": 0 diff --git a/resources/mobile.cache/Cache.js b/resources/mobile.cache/Cache.js index 17735a4..62434ef 100644 --- a/resources/mobile.cache/Cache.js +++ b/resources/mobile.cache/Cache.js @@ -59,4 +59,4 @@ MemoryCache: MemoryCache, NoCache: NoCache } ); -} )( mw.mobileFrontend ); +}( mw.mobileFrontend ) ); diff --git a/resources/mobile.loggingSchemas/schemaEdit.js b/resources/mobile.loggingSchemas/schemaEdit.js index ef5c482..714e1d7 100644 --- a/resources/mobile.loggingSchemas/schemaEdit.js +++ b/resources/mobile.loggingSchemas/schemaEdit.js @@ -34,4 +34,4 @@ schemaEdit.log( data ); } ); -} )( mw.mobileFrontend ); +}( mw.mobileFrontend ) ); diff --git a/resources/mobile.loggingSchemas/schemaMobileWebMainMenuClickTracking.js b/resources/mobile.loggingSchemas/schemaMobileWebMainMenuClickTracking.js index 551839b..fa352be 100755 --- a/resources/mobile.loggingSchemas/schemaMobileWebMainMenuClickTracking.js +++ b/resources/mobile.loggingSchemas/schemaMobileWebMainMenuClickTracking.js @@ -32,4 +32,4 @@ mw.trackSubscribe( 'mf.schemaMobileWebMainMenuClickTracking', function ( topic, data ) { schemaMobileWebMainMenuClickTracking.log( data ); } ); -} )( mw.mobileFrontend ); +}( mw.mobileFrontend ) ); diff --git a/resources/mobile.special.mobileeditor.scripts/redirectmobileeditor.js b/resources/mobile.special.mobileeditor.scripts/redirectmobileeditor.js index 2b43f73..3998c9c 100644 --- a/resources/mobile.special.mobileeditor.scripts/redirectmobileeditor.js +++ b/resources/mobile.special.mobileeditor.scripts/redirectmobileeditor.js @@ -6,4 +6,4 @@ } else { location.replace( 'index.php?title=' + mw.config.get( 'wgMainPageTitle' ) ); } -} )( jQuery ); +}( jQuery ) ); diff --git a/resources/mobile.special.userlogin.scripts/userlogin.js b/resources/mobile.special.userlogin.scripts/userlogin.js index 7455982..9539066 100644 --- a/resources/mobile.special.userlogin.scripts/userlogin.js +++ b/resources/mobile.special.userlogin.scripts/userlogin.js @@ -5,4 +5,4 @@ $( '#wpRemember' ).prop( 'checked', true ); } ); -} )( mw.mobileFrontend, jQuery ); +}( mw.mobileFrontend, jQuery ) ); diff --git a/resources/skins.minerva.scripts/initLogging.js b/resources/skins.minerva.scripts/initLogging.js index 8979e03..f75f35a 100644 --- a/resources/skins.minerva.scripts/initLogging.js +++ b/resources/skins.minerva.scripts/initLogging.js @@ -6,4 +6,4 @@ $( function () { skin.getMainMenu().enableLogging(); } ); -} )( mw.mobileFrontend, jQuery ); +}( mw.mobileFrontend, jQuery ) ); diff --git a/resources/skins.minerva.special.watchlist.scripts/watchlist.js b/resources/skins.minerva.special.watchlist.scripts/watchlist.js index 4fb5cd5..0f50f6a 100644 --- a/resources/skins.minerva.special.watchlist.scripts/watchlist.js +++ b/resources/skins.minerva.special.watchlist.scripts/watchlist.js @@ -28,4 +28,4 @@ init(); } ); -} )( mw.mobileFrontend, jQuery ); +}( mw.mobileFrontend, jQuery ) ); diff --git a/tests/qunit/mobile.languages.structured/test_LanguageOverlay.js b/tests/qunit/mobile.languages.structured/test_LanguageOverlay.js index 0ec49d6..53ce347 100644 --- a/tests/qunit/mobile.languages.structured/test_LanguageOverlay.js +++
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add missing doc param
WMDE-Fisch has uploaded a new change for review. https://gerrit.wikimedia.org/r/321003 Change subject: Add missing doc param .. Add missing doc param Change-Id: I674b0bdaab33f858a63afb1dfa04618311086ab5 --- M includes/EditPage.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/03/321003/1 diff --git a/includes/EditPage.php b/includes/EditPage.php index 5b0bc8a..00c9e75 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3407,6 +3407,7 @@ * * @param Title $title * @param string $format Output format, valid values are any function of a Message object +* @param Language|string $langcode Language code or Language object. * @return string */ public static function getCopyrightWarning( $title, $format = 'plain', $langcode = null ) { -- To view, visit https://gerrit.wikimedia.org/r/321003 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I674b0bdaab33f858a63afb1dfa04618311086ab5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: WMDE-Fisch___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Dual mount tools from labstore1001 and labstore-se...
Madhuvishy has uploaded a new change for review. https://gerrit.wikimedia.org/r/321001 Change subject: labstore: Dual mount tools from labstore1001 and labstore-secondary .. labstore: Dual mount tools from labstore1001 and labstore-secondary Bug: T146154 Change-Id: If2346ad1a071b092ea04e7ab069ecf864fe0546f --- M modules/labstore/files/nfs-mounts.yaml M modules/role/manifests/labs/nfsclient.pp 2 files changed, 57 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/01/321001/1 diff --git a/modules/labstore/files/nfs-mounts.yaml b/modules/labstore/files/nfs-mounts.yaml index 57ca2a3..5d86506 100644 --- a/modules/labstore/files/nfs-mounts.yaml +++ b/modules/labstore/files/nfs-mounts.yaml @@ -156,6 +156,7 @@ home: true project: true scratch: true + tools: true toolsbeta: gid: 50610 mounts: diff --git a/modules/role/manifests/labs/nfsclient.pp b/modules/role/manifests/labs/nfsclient.pp index bad40b5..8623a5a 100644 --- a/modules/role/manifests/labs/nfsclient.pp +++ b/modules/role/manifests/labs/nfsclient.pp @@ -55,6 +55,62 @@ } } +if $::labsproject == 'tools' { +labstore::nfs_mount { 'tools-on-labstore-secondary': +mount_name => 'tools', +project => $::labsproject, +options => ['rw', 'hard'], +mount_path => '/mnt/nfs/labstore-secondary-tools', +server => 'nfs-tools-project.eqiad.wmnet', +share_path => '/project/tools', +lookupcache => $lookupcache, +} + +# Uncomment to remove existing mounts from labstore1001 + +# Temp: can remove after migration +# labstore::nfs_mount { 'tools-project-on-labstoresvc': +# ensure => 'absent', +# mount_name => 'project', +# project => $::labsproject, +# options => ['rw', $mode], +# mount_path => '/data/project', +# share_path => "/project/${::labsproject}/project", +# server => 'labstore.svc.eqiad.wmnet', +# block => true, +# lookupcache => $lookupcache, +# } +# +# labstore::nfs_mount { 'tools-home-on-labstoresvc': +# ensure => 'absent', +# mount_name => 'home', +# project => $::labsproject, +# options => ['rw', 'hard'], +# mount_path => '/home', +# share_path => "/project/${::labsproject}/home", +# server => 'labstore.svc.eqiad.wmnet', +# block => true, +# lookupcache => $lookupcache, +# } +# +# # Sets up symlinks from new tools mount to /data/project and /home +# if mount_nfs_volume($::labsproject, 'tools') { +# file { '/data/project': +# ensure => 'link', +# target => '/mnt/nfs/labstore-secondary-tools/project', +# require => [Labstore::Nfs_mount['tools-on-labstore-secondary'], +# Labstore::Nfs_mount['tools-project-on-labstoresvc']], +# } +# +# file { '/home': +# ensure => 'link', +# target => '/mnt/nfs/labstore-secondary-tools/home', +# require => [Labstore::Nfs_mount['tools-on-labstore-secondary'], +# Labstore::Nfs_mount['tools-home-on-labstoresvc']], +# } +# } +} + labstore::nfs_mount { 'scratch-on-labstore1003': mount_name => 'scratch', project => $::labsproject, -- To view, visit https://gerrit.wikimedia.org/r/321001 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2346ad1a071b092ea04e7ab069ecf864fe0546f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "tlsproxy: turn proxy_request_buffering off for v4"
Ema has submitted this change and it was merged. Change subject: Revert "tlsproxy: turn proxy_request_buffering off for v4" .. Revert "tlsproxy: turn proxy_request_buffering off for v4" We're seeing buggy POST requests hitting our varnish frontends. Those requests have Content-Length > 0 but empty request body, and they result in 503s. Turning proxy_request_buffering on seems to improve the situation. Bug: T150503 This reverts commit 5d3c208969b6a93f71eb374a54a13e97203eb93f. Change-Id: I1cb4cc3bb200a3f3866ad721672a5f7369115d26 --- M modules/tlsproxy/templates/localssl.erb 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Ema: Verified; Looks good to me, approved diff --git a/modules/tlsproxy/templates/localssl.erb b/modules/tlsproxy/templates/localssl.erb index 0219940..491e5ac 100644 --- a/modules/tlsproxy/templates/localssl.erb +++ b/modules/tlsproxy/templates/localssl.erb @@ -69,9 +69,6 @@ proxy_redirect off; proxy_buffering off; -<% if @varnish_version4 -%> - proxy_request_buffering off; -<% end -%> } } <% if @redir_port -%> -- To view, visit https://gerrit.wikimedia.org/r/321000 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1cb4cc3bb200a3f3866ad721672a5f7369115d26 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: EmaGerrit-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] operations/puppet[production]: nfsclient: fix dependency issue with scratch
Rush has submitted this change and it was merged. Change subject: nfsclient: fix dependency issue with scratch .. nfsclient: fix dependency issue with scratch Change-Id: Ica35f908ef58214b72b4fb3cb67e843ef67f8c4b --- M modules/role/manifests/labs/nfsclient.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Rush: Verified; Looks good to me, approved diff --git a/modules/role/manifests/labs/nfsclient.pp b/modules/role/manifests/labs/nfsclient.pp index d98c3b5..bad40b5 100644 --- a/modules/role/manifests/labs/nfsclient.pp +++ b/modules/role/manifests/labs/nfsclient.pp @@ -79,7 +79,7 @@ file { '/data/scratch': ensure => 'link', target => '/mnt/nfs/labstore1003-scratch', -require => Labstore::Nfs_mount['scratch-on-labstoresvc'], +require => Labstore::Nfs_mount['scratch-on-labstore1003'], } } } -- To view, visit https://gerrit.wikimedia.org/r/320999 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica35f908ef58214b72b4fb3cb67e843ef67f8c4b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RushGerrit-Reviewer: Rush ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Karelian (krl) to Names.php and RELEASE_NOTES 1.28
MarcoAurelio has uploaded a new change for review. https://gerrit.wikimedia.org/r/320998 Change subject: Karelian (krl) to Names.php and RELEASE_NOTES 1.28 .. Karelian (krl) to Names.php and RELEASE_NOTES 1.28 Bug: T137415 Change-Id: Iee2d03d042c8b514ee2575450a37158b26c732a3 --- M RELEASE-NOTES-1.28 M languages/data/Names.php 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/320998/1 diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28 index 557162e..9059e79 100644 --- a/RELEASE-NOTES-1.28 +++ b/RELEASE-NOTES-1.28 @@ -199,6 +199,8 @@ Saiddzone Saimawnkham, Saosukham, and Sengwan. * Czech (cs) and Slovak (sk) set as reciprocal fallbacks. * (T146744) Livvi-Karelian (olo) namespace messages created thanks to translator Ilja.mos. +* Karelian (krl), thanks to translators Flrn, Ilja.mos, Likopiän tyttö, Mashoi7, Matma Rex, + Ontoi, Theunitedstatesofme, and Varvana. === Other changes in 1.28 === * (T128697) Improved handling of large diffs. diff --git a/languages/data/Names.php b/languages/data/Names.php index 1ed9a44..c00463b 100644 --- a/languages/data/Names.php +++ b/languages/data/Names.php @@ -241,6 +241,7 @@ 'krc' => 'къарачай-малкъар', # Karachay-Balkar 'kri' => 'Krio', # Krio 'krj' => 'Kinaray-a', # Kinaray-a + 'krl' => 'karjal', # Karelian 'ks' => 'कॉशुर / کٲشُر', # Kashmiri (multiple scripts - defaults to Perso-Arabic) 'ks-arab' => 'کٲشُر', # Kashmiri (Perso-Arabic script) 'ks-deva' => 'कॉशुर', # Kashmiri (Devanagari script) -- To view, visit https://gerrit.wikimedia.org/r/320998 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee2d03d042c8b514ee2575450a37158b26c732a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MarcoAurelio___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Adding Gorontalo language (gor) to Names.php
MarcoAurelio has uploaded a new change for review. https://gerrit.wikimedia.org/r/320997 Change subject: Adding Gorontalo language (gor) to Names.php .. Adding Gorontalo language (gor) to Names.php Added also to RELEASE_NOTES 1.28 Bug: T136083 Change-Id: Ib3e46962de9cc7abc2052cfdf06e95f898e36142 --- M RELEASE-NOTES-1.28 M languages/data/Names.php 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/97/320997/1 diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28 index 557162e..af1a8f5 100644 --- a/RELEASE-NOTES-1.28 +++ b/RELEASE-NOTES-1.28 @@ -199,6 +199,8 @@ Saiddzone Saimawnkham, Saosukham, and Sengwan. * Czech (cs) and Slovak (sk) set as reciprocal fallbacks. * (T146744) Livvi-Karelian (olo) namespace messages created thanks to translator Ilja.mos. +* Gorontalo (gor), thanks to translators Ilham, Lukman Tomayahu, Marwan Mohamad, Matma Rex, + NoiX180, and Zhoelyakin. === Other changes in 1.28 === * (T128697) Improved handling of large diffs. diff --git a/languages/data/Names.php b/languages/data/Names.php index 1ed9a44..0d76303 100644 --- a/languages/data/Names.php +++ b/languages/data/Names.php @@ -174,6 +174,7 @@ 'gom' => 'गोंयची कोंकणी / Gõychi Konknni', # Goan Konkani 'gom-deva' => 'गोंयची कोंकणी', # Goan Konkani (Devanagari script) 'gom-latn' => 'Gõychi Konknni', # Goan Konkani (Latin script) + 'gor' => 'Bahasa Hulontalo', # Gorontalo 'got' => '̲̹̺̿̈́̓', # Gothic 'grc' => 'Ἀρχαία ἑλληνικὴ', # Ancient Greek 'gsw' => 'Alemannisch', # Alemannic -- To view, visit https://gerrit.wikimedia.org/r/320997 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib3e46962de9cc7abc2052cfdf06e95f898e36142 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MarcoAurelio___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Fix array to string conversion when in CLI mode $value is an...
Southparkfan has uploaded a new change for review. https://gerrit.wikimedia.org/r/320996 Change subject: Fix array to string conversion when in CLI mode $value is an array here. .. Fix array to string conversion when in CLI mode $value is an array here. Change-Id: I924d35ef185c8e3b3862fccc93993862068842a1 --- M includes/Conversion/Utils.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/96/320996/1 diff --git a/includes/Conversion/Utils.php b/includes/Conversion/Utils.php index 56908df..a06ba06 100644 --- a/includes/Conversion/Utils.php +++ b/includes/Conversion/Utils.php @@ -462,7 +462,7 @@ // foo=bar; baz=bang $output = array(); foreach ( $cookies as $key => $value ) { - $output[] = "$wgCookiePrefix$key=$value"; + $output[] = "$wgCookiePrefix$key={$value['value']}"; } return implode( '; ', $output ); -- To view, visit https://gerrit.wikimedia.org/r/320996 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I924d35ef185c8e3b3862fccc93993862068842a1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Southparkfan___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools nfsclient: cleanup
Rush has uploaded a new change for review. https://gerrit.wikimedia.org/r/320995 Change subject: tools nfsclient: cleanup .. tools nfsclient: cleanup * temp absentees * organize Change-Id: Ie5934e532c85fa258df1409a911a0eb2ed565abd --- M modules/role/manifests/labs/nfsclient.pp 1 file changed, 10 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/95/320995/1 diff --git a/modules/role/manifests/labs/nfsclient.pp b/modules/role/manifests/labs/nfsclient.pp index 14e9b06..d98c3b5 100644 --- a/modules/role/manifests/labs/nfsclient.pp +++ b/modules/role/manifests/labs/nfsclient.pp @@ -26,6 +26,7 @@ } if $::labsproject == 'maps' { + labstore::nfs_mount { 'maps-on-labstore1003': mount_name => 'maps', project => $::labsproject, @@ -36,32 +37,8 @@ lookupcache => $lookupcache, } -# Temp - to remove existing mounts from labstore1001 -labstore::nfs_mount { 'maps-project-on-labstoresvc': -ensure => 'absent', -mount_name => 'project', -project => $::labsproject, -options => ['rw', $mode], -mount_path => '/data/project', -share_path => "/project/${::labsproject}/project", -server => 'labstore.svc.eqiad.wmnet', -block => true, -lookupcache => $lookupcache, -} - -labstore::nfs_mount { 'maps-home-on-labstoresvc': -ensure => 'absent', -mount_name => 'home', -project => $::labsproject, -options => ['rw', 'hard'], -mount_path => '/home', -share_path => "/project/${::labsproject}/home", -server => 'labstore.svc.eqiad.wmnet', -block => true, -lookupcache => $lookupcache, -} - if mount_nfs_volume($::labsproject, 'maps') { + file { '/data/project': ensure => 'link', target => '/mnt/nfs/labstore1003-maps/project', @@ -76,18 +53,6 @@ Labstore::Nfs_mount['maps-home-on-labstoresvc']], } } - -} - -labstore::nfs_mount { 'scratch-on-labstoresvc': -ensure => absent, -mount_name => 'scratch', -project => $::labsproject, -options => ['rw', 'soft', 'timeo=300', 'retrans=3'], -mount_path => '/data/scratch', -server => 'labstore.svc.eqiad.wmnet', -share_path => '/scratch', -lookupcache => $lookupcache, } labstore::nfs_mount { 'scratch-on-labstore1003': @@ -100,15 +65,6 @@ lookupcache => $lookupcache, } -if mount_nfs_volume($::labsproject, 'scratch') { -file { '/data/scratch': -ensure => 'link', -target => '/mnt/nfs/labstore1003-scratch', -require => [Labstore::Nfs_mount['scratch-on-labstoresvc'], -Labstore::Nfs_mount['scratch-on-labstore1003']], -} -} - labstore::nfs_mount { 'dumps-on-labstore1003': mount_name => 'dumps', project => $::labsproject, @@ -118,4 +74,12 @@ server => 'labstore1003.eqiad.wmnet', lookupcache => $lookupcache, } + +if mount_nfs_volume($::labsproject, 'scratch') { +file { '/data/scratch': +ensure => 'link', +target => '/mnt/nfs/labstore1003-scratch', +require => Labstore::Nfs_mount['scratch-on-labstoresvc'], +} +} } -- To view, visit https://gerrit.wikimedia.org/r/320995 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5934e532c85fa258df1409a911a0eb2ed565abd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Rush___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...logstash-gelf[master]: Imported Upstream version 1.11.0
Gehel has uploaded a new change for review. https://gerrit.wikimedia.org/r/320991 Change subject: Imported Upstream version 1.11.0 .. Imported Upstream version 1.11.0 Change-Id: I4658afc9c773527513d33c1b563ee2fa204ab2a7 --- A .github/CONTRIBUTING.md A .github/ISSUE_TEMPLATE.md A .github/PULL_REQUEST_TEMPLATE.md A .mvn/wrapper/maven-wrapper.jar A .mvn/wrapper/maven-wrapper.properties M .travis.yml M Makefile M README.md A mvnw A mvnw.cmd M pom.xml M src/main/assembly/assembly.xml M src/main/assembly/module.xml M src/main/java/biz/paluch/logging/RuntimeContainer.java M src/main/java/biz/paluch/logging/RuntimeContainerProperties.java M src/main/java/biz/paluch/logging/StackTraceFilter.java M src/main/java/biz/paluch/logging/gelf/DynamicMdcMessageField.java M src/main/java/biz/paluch/logging/gelf/GelfMessageAssembler.java M src/main/java/biz/paluch/logging/gelf/GelfMessageBuilder.java M src/main/java/biz/paluch/logging/gelf/GelfUtil.java M src/main/java/biz/paluch/logging/gelf/LogEvent.java M src/main/java/biz/paluch/logging/gelf/LogMessageField.java M src/main/java/biz/paluch/logging/gelf/MdcGelfMessageAssembler.java M src/main/java/biz/paluch/logging/gelf/MdcMessageField.java M src/main/java/biz/paluch/logging/gelf/MessageField.java M src/main/java/biz/paluch/logging/gelf/PropertyProvider.java M src/main/java/biz/paluch/logging/gelf/StaticMessageField.java M src/main/java/biz/paluch/logging/gelf/Values.java M src/main/java/biz/paluch/logging/gelf/intern/Charsets.java M src/main/java/biz/paluch/logging/gelf/intern/Closer.java A src/main/java/biz/paluch/logging/gelf/intern/ConfigurationSupport.java M src/main/java/biz/paluch/logging/gelf/intern/ErrorReporter.java M src/main/java/biz/paluch/logging/gelf/intern/GelfMessage.java M src/main/java/biz/paluch/logging/gelf/intern/GelfSender.java M src/main/java/biz/paluch/logging/gelf/intern/GelfSenderConfiguration.java M src/main/java/biz/paluch/logging/gelf/intern/GelfSenderFactory.java M src/main/java/biz/paluch/logging/gelf/intern/GelfSenderProvider.java M src/main/java/biz/paluch/logging/gelf/intern/HostAndPortProvider.java A src/main/java/biz/paluch/logging/gelf/intern/JsonWriter.java A src/main/java/biz/paluch/logging/gelf/intern/OutputAccessor.java A src/main/java/biz/paluch/logging/gelf/intern/PoolingGelfMessage.java A src/main/java/biz/paluch/logging/gelf/intern/PoolingGelfMessageBuilder.java A src/main/java/biz/paluch/logging/gelf/intern/ReusableGzipOutputStream.java A src/main/java/biz/paluch/logging/gelf/intern/package-info.java A src/main/java/biz/paluch/logging/gelf/intern/sender/AbstractNioSender.java M src/main/java/biz/paluch/logging/gelf/intern/sender/DefaultGelfSenderProvider.java A src/main/java/biz/paluch/logging/gelf/intern/sender/GelfBuffers.java A src/main/java/biz/paluch/logging/gelf/intern/sender/GelfHTTPSender.java M src/main/java/biz/paluch/logging/gelf/intern/sender/GelfREDISSender.java A src/main/java/biz/paluch/logging/gelf/intern/sender/GelfTCPSSLSender.java M src/main/java/biz/paluch/logging/gelf/intern/sender/GelfTCPSender.java M src/main/java/biz/paluch/logging/gelf/intern/sender/GelfUDPSender.java A src/main/java/biz/paluch/logging/gelf/intern/sender/QueryStringParser.java M src/main/java/biz/paluch/logging/gelf/intern/sender/RedisGelfSenderProvider.java A src/main/java/biz/paluch/logging/gelf/intern/sender/RedisSenderConstants.java M src/main/java/biz/paluch/logging/gelf/intern/sender/RedisSenderPoolProvider.java A src/main/java/biz/paluch/logging/gelf/intern/sender/package-info.java M src/main/java/biz/paluch/logging/gelf/jboss7/JBoss7GelfLogHandler.java M src/main/java/biz/paluch/logging/gelf/jboss7/JBoss7JulLogEvent.java M src/main/java/biz/paluch/logging/gelf/jul/GelfLogHandler.java M src/main/java/biz/paluch/logging/gelf/jul/JulLogEvent.java M src/main/java/biz/paluch/logging/gelf/jul/JulPropertyProvider.java A src/main/java/biz/paluch/logging/gelf/log4j/GelfLayout.java M src/main/java/biz/paluch/logging/gelf/log4j/GelfLogAppender.java M src/main/java/biz/paluch/logging/gelf/log4j/Log4jLogEvent.java M src/main/java/biz/paluch/logging/gelf/log4j/Log4jVersionChecker.java M src/main/java/biz/paluch/logging/gelf/log4j2/GelfDynamicMdcLogFields.java M src/main/java/biz/paluch/logging/gelf/log4j2/GelfLogAppender.java M src/main/java/biz/paluch/logging/gelf/log4j2/GelfLogField.java M src/main/java/biz/paluch/logging/gelf/log4j2/HostnameConverter.java M src/main/java/biz/paluch/logging/gelf/log4j2/Log4j2LogEvent.java M src/main/java/biz/paluch/logging/gelf/log4j2/PatternLogMessageField.java M src/main/java/biz/paluch/logging/gelf/logback/GelfLogbackAppender.java M src/main/java/biz/paluch/logging/gelf/logback/LogbackLogEvent.java M src/main/java/biz/paluch/logging/gelf/standalone/BeanPropertyExtraction.java M src/main/java/biz/paluch/logging/gelf/standalone/Datenpumpe.java M src/main/java/biz/paluch/logging/gelf/standalone/DatenpumpeImpl.java M
[MediaWiki-commits] [Gerrit] operations...linux44[master]: Update to 4.4.31
Muehlenhoff has submitted this change and it was merged. Change subject: Update to 4.4.31 .. Update to 4.4.31 Change-Id: I712b74c843ab9e7bbcb346899d9510e14d67e007 --- M debian/changelog D debian/patches/bugfix/all/CVE-2016-7042.patch A debian/patches/bugfix/all/stable-4.4.31.patch M debian/patches/series 4 files changed, 1,725 insertions(+), 59 deletions(-) Approvals: Muehlenhoff: Looks good to me, approved jenkins-bot: Verified diff --git a/debian/changelog b/debian/changelog index b2caccc..e37446f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +linux (4.4.2-3+wmf8) jessie-wikimedia; urgency=medium + + * Update to 4.4.31: +https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.31 +- CVE-2016-7042 [03dab869b7b239c4e013ec82aea22e181e441cfc] + (drop previously locally applied CVE-2016-7042.patch) +- CVE-2016-8630 [d9092f52d7e61dd1557f2db2400ddb430e85937e] +- CVE-2016-8633 [667121ace9dbafb368618dbabcf07901c962ddac] +- CVE-2016-9178 [different fix upstream, in stable as + dc1555e670c373bfa4ca2e1e2f839d5fe2b4501a] +- Drop 1d79b67c4a8a98247407dc245ba7cad2692da3c2, which is + only needed for recent GGC releases and clashes with + Debian-specific patches + + -- Moritz MuehlenhoffFri, 11 Nov 2016 15:57:32 +0100 + linux (4.4.2-3+wmf7) jessie-wikimedia; urgency=medium * Bump the kernel ABI to 3 (caused by posix ACL changes in 4.4.29) diff --git a/debian/patches/bugfix/all/CVE-2016-7042.patch b/debian/patches/bugfix/all/CVE-2016-7042.patch deleted file mode 100644 index 5257ea9..000 --- a/debian/patches/bugfix/all/CVE-2016-7042.patch +++ /dev/null @@ -1,58 +0,0 @@ -KEYS: Fix short sprintf buffer in /proc/keys show function - -Fix a short sprintf buffer in proc_keys_show(). If the gcc stack protector -is turned on, this can cause a panic due to stack corruption. - -The problem is that xbuf[] is not big enough to hold a 64-bit timeout -rendered as weeks: - - (gdb) p 0xULL/(60*60*24*7) - $2 = 30500568904943 - -That's 14 chars plus NUL, not 11 chars plus NUL. - -Expand the buffer to 16 chars. - -I think the unpatched code apparently works if the stack-protector is not -enabled because on a 32-bit machine the buffer won't be overflowed and on a -64-bit machine there's a 64-bit aligned pointer at one side and an int that -isn't checked again on the other side. - -The panic incurred looks something like: - -Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: 81352ebe -CPU: 0 PID: 1692 Comm: reproducer Not tainted 4.7.2-201.fc24.x86_64 #1 -Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 - 0086 fbbd2679 8800a044bc00 813d941f - 81a28d58 8800a044bc98 8800a044bc88 811b2cb6 - 8810 8800a044bc98 8800a044bc30 fbbd2679 -Call Trace: - [] dump_stack+0x63/0x84 - [] panic+0xde/0x22a - [] ? proc_keys_show+0x3ce/0x3d0 - [] __stack_chk_fail+0x19/0x30 - [] proc_keys_show+0x3ce/0x3d0 - [] ? key_validate+0x50/0x50 - [] ? key_default_cmp+0x20/0x20 - [] seq_read+0x2cc/0x390 - [] proc_reg_read+0x42/0x70 - [] __vfs_read+0x37/0x150 - [] ? security_file_permission+0xa0/0xc0 - [] vfs_read+0x96/0x130 - [] SyS_read+0x55/0xc0 - [] entry_SYSCALL_64_fastpath+0x1a/0xa4 - -Reported-by: Ondrej Kozina -Signed-off-by: David Howells -Tested-by: Ondrej Kozina a/security/keys/proc.c -+++ a/security/keys/proc.c -@@ -181,7 +181,7 @@ static int proc_keys_show(struct seq_file *m, void *v) - struct timespec now; - unsigned long timo; - key_ref_t key_ref, skey_ref; -- char xbuf[12]; -+ char xbuf[16]; - int rc; - - struct keyring_search_context ctx = { diff --git a/debian/patches/bugfix/all/stable-4.4.31.patch b/debian/patches/bugfix/all/stable-4.4.31.patch new file mode 100644 index 000..2c6363f --- /dev/null +++ b/debian/patches/bugfix/all/stable-4.4.31.patch @@ -0,0 +1,1708 @@ +diff --git a/Makefile b/Makefile +index 98239d56924c..7c6f28e7a2f6 100644 +--- a/Makefile b/Makefile +@@ -1,6 +1,6 @@ + VERSION = 4 + PATCHLEVEL = 4 +-SUBLEVEL = 30 ++SUBLEVEL = 31 + EXTRAVERSION = + NAME = Blurry Fish Butt + +diff --git a/arch/arm/include/asm/floppy.h b/arch/arm/include/asm/floppy.h +index f4882553fbb0..85a34cc8316a 100644 +--- a/arch/arm/include/asm/floppy.h b/arch/arm/include/asm/floppy.h +@@ -17,7 +17,7 @@ + + #define fd_outb(val,port) \ + do {\ +- if ((port) == FD_DOR) \ ++ if ((port) == (u32)FD_DOR) \ +
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Fix "configuration" spelling in en.json
jenkins-bot has submitted this change and it was merged. Change subject: Fix "configuration" spelling in en.json .. Fix "configuration" spelling in en.json Change-Id: Ib1e97c5687dfed70442f10ee7f1fbcfd0b097d86 --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: MtDu: Looks good to me, but someone else must approve Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 0684de4..5f23dd1 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,7 +17,7 @@ "ores-pref-rc-hidenondamaging": "Hide probably good edits from recent changes", "ores-pref-watchlist-hidenondamaging": "Hide probably good edits from the watchlist", "prefs-ores" : "Revision scoring", - "apihelp-query+ores-description": "Return ORES configruation and model data for this wiki.", + "apihelp-query+ores-description": "Return ORES configuration and model data for this wiki.", "apihelp-query+ores-example-simple": "Fetch ORES data:", "apihelp-query+revisions-paramvalue-prop-oresscores": "ORES scores for the revision.", "apihelp-query+allrevisions-paramvalue-prop-oresscores": "ORES scores for the revision.", -- To view, visit https://gerrit.wikimedia.org/r/320983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1e97c5687dfed70442f10ee7f1fbcfd0b097d86 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Amire80Gerrit-Reviewer: MtDu Gerrit-Reviewer: Siebrand 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] mediawiki...MultimediaViewer[master]: Skip deocorative images in Multimedia viewer
TheDJ has uploaded a new change for review. https://gerrit.wikimedia.org/r/320987 Change subject: Skip deocorative images in Multimedia viewer .. Skip deocorative images in Multimedia viewer Let's skip any images that we know are purely decorative and thus not likely to be part of what we consider 'content'. For an example see https://meta.wikimedia.org/wiki/CopyPatrol Change-Id: Id3c17c765afd9cbc33609fbfc9e5fba32749aed2 --- M resources/mmv/mmv.bootstrap.js 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/87/320987/1 diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js index 978ad6d..29fe721 100644 --- a/resources/mmv/mmv.bootstrap.js +++ b/resources/mmv/mmv.bootstrap.js @@ -161,6 +161,11 @@ * @return {boolean} */ MMVB.isAllowedThumb = function ( $thumb ) { + // images that set explicit empty string alt are considered to be decorative + // and can thus be excluded + if ( $thumb.attr( 'alt' ) === '' ) { + return false; + } // .metadata means this is inside an informational template like {{refimprove}} on enwiki. // .noviewer means MediaViewer has been specifically disabled for this image // .noarticletext means we are on an error page for a non-existing article, the image is part of some -- To view, visit https://gerrit.wikimedia.org/r/320987 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3c17c765afd9cbc33609fbfc9e5fba32749aed2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: TheDJ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: profile::docker::builder: Conditionalize hiera lookups
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/320985 Change subject: profile::docker::builder: Conditionalize hiera lookups .. profile::docker::builder: Conditionalize hiera lookups hiera can not return *undef*, which makes it impossible to have this profile class without a proxy set. So, create a 3rd hiera key and use it as a flag to check whether to lookup the hiera variables or not Change-Id: I4929c471fbba565e6257f0ab80e4ffcd37432f4e --- M modules/profile/manifests/docker/builder.pp 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/320985/1 diff --git a/modules/profile/manifests/docker/builder.pp b/modules/profile/manifests/docker/builder.pp index 85ae87f..729cdf2 100644 --- a/modules/profile/manifests/docker/builder.pp +++ b/modules/profile/manifests/docker/builder.pp @@ -1,6 +1,12 @@ class profile::docker::builder { -$proxy_address = hiera('profile::docker::builder::proxy_address') -$proxy_port = hiera('profile::docker::builder::proxy_port') +$proxy = hiera('profile::docker::builder::proxy') +if $proxy { +$proxy_address = hiera('profile::docker::builder::proxy_address') +$proxy_port = hiera('profile::docker::builder::proxy_port') +} else { +$proxy_address = undef +$proxy_port = undef +} system::role { 'role::docker::builder': description => 'Docker images builder' -- To view, visit https://gerrit.wikimedia.org/r/320985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4929c471fbba565e6257f0ab80e4ffcd37432f4e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Fix "configuration" spelling in en.json
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/320983 Change subject: Fix "configuration" spelling in en.json .. Fix "configuration" spelling in en.json Change-Id: Ib1e97c5687dfed70442f10ee7f1fbcfd0b097d86 --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/83/320983/1 diff --git a/i18n/en.json b/i18n/en.json index 0684de4..5f23dd1 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,7 +17,7 @@ "ores-pref-rc-hidenondamaging": "Hide probably good edits from recent changes", "ores-pref-watchlist-hidenondamaging": "Hide probably good edits from the watchlist", "prefs-ores" : "Revision scoring", - "apihelp-query+ores-description": "Return ORES configruation and model data for this wiki.", + "apihelp-query+ores-description": "Return ORES configuration and model data for this wiki.", "apihelp-query+ores-example-simple": "Fetch ORES data:", "apihelp-query+revisions-paramvalue-prop-oresscores": "ORES scores for the revision.", "apihelp-query+allrevisions-paramvalue-prop-oresscores": "ORES scores for the revision.", -- To view, visit https://gerrit.wikimedia.org/r/320983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1e97c5687dfed70442f10ee7f1fbcfd0b097d86 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Amire80___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: RESTBase config: Use special project for wikidata domains.
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: RESTBase config: Use special project for wikidata domains. .. RESTBase config: Use special project for wikidata domains. It's been decided that most of RESTBase endpoints are completely useless on wikidata domains, like mobile, summary, feed etc. So we need to use a special wikidata project there that only switches on a limited subset of RESTBase modules. Change-Id: I57567951e6ec42dcd6b02b95390c0009e8f39a9c --- M modules/restbase/templates/config.labs.yaml.erb M modules/restbase/templates/config.yaml.erb 2 files changed, 13 insertions(+), 3 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/restbase/templates/config.labs.yaml.erb b/modules/restbase/templates/config.labs.yaml.erb index a97873b..cf45e4d 100644 --- a/modules/restbase/templates/config.labs.yaml.erb +++ b/modules/restbase/templates/config.labs.yaml.erb @@ -59,6 +59,10 @@ pageviews: host: <%= @aqs_uri %> +wikidata.org: + x-modules: +- path: projects/wmf_wikidata.yaml + options: *default_options # Swagger spec root. root_spec: _spec @@ -108,7 +112,7 @@ /{domain:sq.wikipedia.beta.wmflabs.org}: *default_project /{domain:test.wikimedia.beta.wmflabs.org}: *default_project /{domain:uk.wikipedia.beta.wmflabs.org}: *default_project -/{domain:wikidata.beta.wmflabs.org}: *default_project +/{domain:wikidata.beta.wmflabs.org}: *wikidata.org /{domain:zero.wikimedia.beta.wmflabs.org}: *default_project /{domain:zh.wikipedia.beta.wmflabs.org}: *default_project diff --git a/modules/restbase/templates/config.yaml.erb b/modules/restbase/templates/config.yaml.erb index 576cb2d..d84e663 100644 --- a/modules/restbase/templates/config.yaml.erb +++ b/modules/restbase/templates/config.yaml.erb @@ -83,6 +83,12 @@ pageviews: host: <%= @aqs_uri %> +# A different project for wikidata since we have limited RESTBase support there. +wikidata.org: + x-modules: +- path: projects/wmf_wikidata.yaml + options: *default_options + # wiktionaries config wiktionary: _project x-modules: @@ -868,8 +874,8 @@ /{domain:www.mediawiki.org}: *default_project /{domain:wikisource.org}: *default_project /{domain:beta.wikiversity.org}: *default_project -/{domain:www.wikidata.org}: *default_project -/{domain:test.wikidata.org}: *default_project +/{domain:www.wikidata.org}: *wikidata.org +/{domain:test.wikidata.org}: *wikidata.org # global domain /{domain:wikimedia.org}: *wikimedia.org -- To view, visit https://gerrit.wikimedia.org/r/320529 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57567951e6ec42dcd6b02b95390c0009e8f39a9c Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: PpchelkoGerrit-Reviewer: GWicke Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Popups[mpga]: WIP: Add gateway
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/320982 Change subject: WIP: Add gateway .. WIP: Add gateway Change-Id: Ieb00709e353f0b960375fdaa0ca0dcdf950f2eb9 --- M Popups.hooks.php M extension.json M resources/ext.popups/experiment.js A resources/ext.popups/gateway.js A tests/qunit/ext.popups/gateway.test.js 5 files changed, 250 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/82/320982/1 diff --git a/Popups.hooks.php b/Popups.hooks.php index 09c968c..c3559d9 100644 --- a/Popups.hooks.php +++ b/Popups.hooks.php @@ -94,12 +94,16 @@ * @return bool */ public static function onResourceLoaderTestModules( array &$testModules, ResourceLoader &$resourceLoader ) { + $localBasePath = __DIR__; + $scripts = glob( "{$localBasePath}/tests/qunit/ext.popups/*.test.js" ); + $start = strlen( $localBasePath ) + 1; + + $scripts = array_map( function ( $script ) use ( $start ) { + return substr( $script, $start ); + }, $scripts ); + $testModules['qunit']['ext.popups.tests'] = [ - 'scripts' => [ - 'tests/qunit/ext.popups/userSettings.test.js', - 'tests/qunit/ext.popups/experiment.test.js', - 'tests/qunit/ext.popups/processLinks.test.js', - ], + 'scripts' => $scripts, 'dependencies' => [ 'ext.popups', ], diff --git a/extension.json b/extension.json index 5bb8cbe..4596e99 100644 --- a/extension.json +++ b/extension.json @@ -62,6 +62,7 @@ "resources/ext.popups/experiment.js", "resources/ext.popups/actions.js", "resources/ext.popups/processLinks.js", + "resources/ext.popups/gateway.js", "resources/ext.popups/boot.js" ], "templates": { diff --git a/resources/ext.popups/experiment.js b/resources/ext.popups/experiment.js index 9858fde..fb35e5c 100644 --- a/resources/ext.popups/experiment.js +++ b/resources/ext.popups/experiment.js @@ -1,7 +1,7 @@ ( function ( mw ) { /** -* Given the global state of the application, creates a function which that +* Given the global state of the application, creates a function that gets * whether or not the user should have Link Previews enabled, i.e. whether * they are in the experiment condition. * diff --git a/resources/ext.popups/gateway.js b/resources/ext.popups/gateway.js new file mode 100644 index 000..c9907e7 --- /dev/null +++ b/resources/ext.popups/gateway.js @@ -0,0 +1,113 @@ +( function ( mw, $ ) { + + // FIXME: These constants (and others like 'em) should be in some top-level + // configuration file. + var EXTRACT_LENGTH = 525, + THUMBNAIL_SIZE = 300 * $.bracketedDevicePixelRatio(), + CACHE_LIFETIME = 300; // Public and private cache lifetime (5 minutes) + + /** +* Creates a function that fetches all of the data required to give the user a +* preview of the page given the title of the page (see +* `mw.popups.processLinks` for the definition of "title"). +* +* @param {mw.Api} api +* @return {Function} +*/ + mw.popups.createGateway = function ( api ) { + return function ( title ) { + return api.get( { + action: 'query', + prop: 'info|extracts|pageimages|revisions|info', + formatversion: 2, + redirects: true, + exintro: true, + exchars: EXTRACT_LENGTH, + + // There is an added geometric limit on .mwe-popups-extract + // so that text does not overflow from the card. + explaintext: true, + + piprop: 'thumbnail', + pithumbsize: THUMBNAIL_SIZE, + rvprop: 'timestamp', + inprop: 'url', + titles: title, + smaxage: CACHE_LIFETIME, + maxage: CACHE_LIFETIME, + uselang: 'content' + }, + { + headers: { + 'X-Analytics': 'preview=1' +
[MediaWiki-commits] [Gerrit] mediawiki...Popups[mpga]: Add LINK_CLICK action
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/320981 Change subject: Add LINK_CLICK action .. Add LINK_CLICK action Change-Id: I2f3b5d51a68e4830abaf7f2dcd5d9ae0eb60d1e7 --- M resources/ext.popups/actions.js M resources/ext.popups/boot.js 2 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/81/320981/1 diff --git a/resources/ext.popups/actions.js b/resources/ext.popups/actions.js index 45117de..793d07c 100644 --- a/resources/ext.popups/actions.js +++ b/resources/ext.popups/actions.js @@ -42,6 +42,20 @@ }; /** +* Represents the user clicking on a link with their mouse, keyboard, or an +* assistive device. +* +* @param {jQuery} $el +* @return {Object} +*/ + actions.linkClick = function ( $el ) { + return { + type: 'LINK_CLICK', + el: $el + }; + }; + + /** * Creates an object whose methods encapsulate all actions that can be * dispatched to the given * [store](http://redux.js.org/docs/api/Store.html#store). diff --git a/resources/ext.popups/boot.js b/resources/ext.popups/boot.js index e778294..1692bea 100644 --- a/resources/ext.popups/boot.js +++ b/resources/ext.popups/boot.js @@ -69,7 +69,11 @@ } ) .on( 'mouseout blur', function () { actions.linkAbandon( this ); + } ) + .on( 'click', function () { + actions.linkClick( this ); } ); + } ); } ); -- To view, visit https://gerrit.wikimedia.org/r/320981 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f3b5d51a68e4830abaf7f2dcd5d9ae0eb60d1e7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: mpga Gerrit-Owner: Phuedx___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: [WIP] test job jenkins with mw-core
DCausse has uploaded a new change for review. https://gerrit.wikimedia.org/r/320980 Change subject: [WIP] test job jenkins with mw-core .. [WIP] test job jenkins with mw-core Bug: T143932 Change-Id: I9936dbd17dc33abc79a4aa2b94639a8caa17a783 --- D tests/SiteConfiguration.php M tests/cirrusTest.php 2 files changed, 1 insertion(+), 608 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/80/320980/1 diff --git a/tests/SiteConfiguration.php b/tests/SiteConfiguration.php deleted file mode 100644 index eaef9e2..000 --- a/tests/SiteConfiguration.php +++ /dev/null @@ -1,607 +0,0 @@ -http://www.gnu.org/copyleft/gpl.html - * - * @file - */ - -/** - * This is a class for holding configuration settings, particularly for - * multi-wiki sites. - * - * A basic synopsis: - * - * Consider a wikifarm having three sites: two production sites, one in English - * and one in German, and one testing site. You can assign them easy-to-remember - * identifiers - ISO 639 codes 'en' and 'de' for language wikis, and 'beta' for - * the testing wiki. - * - * You would thus initialize the site configuration by specifying the wiki - * identifiers: - * - * @code - * $conf = new SiteConfiguration; - * $conf->wikis = array( 'de', 'en', 'beta' ); - * @endcode - * - * When configuring the MediaWiki global settings (the $wg variables), - * the identifiers will be available to specify settings on a per wiki basis. - * - * @code - * $conf->settings = array( - * 'wgSomeSetting' => array( - * - * # production: - * 'de' => false, - * 'en' => false, - * - * # test: - * 'beta=> true, - * ), - * ); - * @endcode - * - * With three wikis, that is easy to manage. But what about a farm with - * hundreds of wikis? Site configuration provides a special keyword named - * 'default' which is the value used when a wiki is not found. Hence - * the above code could be written: - * - * @code - * $conf->settings = array( - * 'wgSomeSetting' => array( - * - * 'default' => false, - * - * # Enable feature on test - * 'beta'=> true, - * ), - * ); - * @endcode - * - * - * Since settings can contain arrays, site configuration provides a way - * to merge an array with the default. This is very useful to avoid - * repeating settings again and again while still maintaining specific changes - * on a per wiki basis. - * - * @code - * $conf->settings = array( - * 'wgMergeSetting' = array( - * # Value that will be shared among all wikis: - * 'default' => array( NS_USER => true ), - * - * # Leading '+' means merging the array of value with the defaults - * '+beta' => array( NS_HELP => true ), - * ), - * ); - * - * # Get configuration for the German site: - * $conf->get( 'wgMergeSetting', 'de' ); - * // --> array( NS_USER => true ); - * - * # Get configuration for the testing site: - * $conf->get( 'wgMergeSetting', 'beta' ); - * // --> array( NS_USER => true, NS_HELP => true ); - * @endcode - * - * Finally, to load all configuration settings, extract them in global context: - * - * @code - * # Name / identifier of the wiki as set in $conf->wikis - * $wikiID = 'beta'; - * $globals = $conf->getAll( $wikiID ); - * extract( $globals ); - * @endcode - * - * @todo Give examples for, - * suffixes: - * $conf->suffixes = array( 'wiki' ); - * localVHosts - * callbacks! - */ -class SiteConfiguration { - - /** -* Array of suffixes, for self::siteFromDB() -*/ - public $suffixes = array(); - - /** -* Array of wikis, should be the same as $wgLocalDatabases -*/ - public $wikis = array(); - - /** -* The whole array of settings -*/ - public $settings = array(); - - /** -* Array of domains that are local and can be handled by the same server -* -* @deprecated since 1.25; use $wgLocalVirtualHosts instead. -*/ - public $localVHosts = array(); - - /** -* Optional callback to load full configuration data. -* @var string|array -*/ - public $fullLoadCallback = null; - - /** Whether or not all data has been loaded */ - public $fullLoadDone = false; - - /** -* A callback function that returns an array with the following keys (all -* optional): -* - suffix: site's suffix -* - lang: site's lang -* - tags: array of wiki tags -* - params: array of parameters to be replaced -* The function will receive the SiteConfiguration instance in the first -* argument and the wiki in the second one. -* if suffix and lang are passed they will be used for the return value of -* self::siteFromDB() and self::$suffixes will be ignored -* -* @var
[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Use diff for changes instead of a textarea
jenkins-bot has submitted this change and it was merged. Change subject: Use diff for changes instead of a textarea .. Use diff for changes instead of a textarea To later color the text in the changed text column the textarea is replaced by a div element styled with textarea CSS. We also set the editor textarea to a fixed height so that both boxes look almost the same and align well. Change-Id: I81f1f2fe355b258606a781116adaf893e3b33e80 --- M includes/TwoColConflictPage.php M modules/ext.TwoColConflict.css M tests/browser/features/support/pages/edit_conflict_page.rb 3 files changed, 38 insertions(+), 15 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/TwoColConflictPage.php b/includes/TwoColConflictPage.php index 2b35630..101c834 100644 --- a/includes/TwoColConflictPage.php +++ b/includes/TwoColConflictPage.php @@ -83,18 +83,18 @@ private function buildChangesTextbox() { global $wgUser; - $name = 'wpTextbox2'; + $name = 'mw-twocolconflict-changes-editor'; $wikitext = $this->safeUnicodeOutput( $this->textbox1 ); $wikitext = $this->addNewLineAtEnd( $wikitext ); - $customAttribs = [ 'readonly' ]; + $customAttribs = []; if ( $this->wikiEditorIsEnabled() ) { $customAttribs[ 'class' ] = 'mw-twocolconflict-wikieditor'; } $attribs = $this->buildTextboxAttribs( $name, $customAttribs, $wgUser ); - return Html::textarea( $name, $wikitext, $attribs ); + return Html::rawElement( 'div', $attribs, $wikitext ); } private function buildConflictPageEditorCol() { diff --git a/modules/ext.TwoColConflict.css b/modules/ext.TwoColConflict.css index dba2ffa..f2bfa06 100644 --- a/modules/ext.TwoColConflict.css +++ b/modules/ext.TwoColConflict.css @@ -14,22 +14,45 @@ font-size: 0.9em; } -.mw-twocolconflict-changes-col textarea { - background-color: #f2f2f2; - -} - .editOptions { border-top: 1px solid #c0c0c0; margin-top: 1em; } -#wpTextbox2 { - margin-top: 23px; /* height of the toolbar in the editor textbox */ +#mw-twocolconflict-changes-editor { + margin-top: 24px; /* height of the toolbar in the editor textbox */ + white-space: pre-wrap; + word-wrap: break-word; + flex-direction: column; + resize: vertical; + -moz-appearance: textfield-multiline; + -webkit-appearance: textarea; + -webkit-user-select: text; + border: 1px solid #c0c0c0; + box-sizing: border-box; + font: medium -moz-fixed; + font: -webkit-small-control; + font-family: monospace; + text-rendering: auto; + color: initial; + letter-spacing: normal; + word-spacing: normal; + text-transform: none; + text-indent: 0; + text-shadow: none; + text-align: start; + overflow: auto; + padding: 0.1em; + width: 100%; + height: 400px; + background-color: #f2f2f2; } -#wpTextbox2.mw-twocolconflict-wikieditor { -line-height: 1.5em; -resize: vertical; -margin-top: 33px; +#mw-twocolconflict-changes-editor.mw-twocolconflict-wikieditor { + margin-top: 34px; + line-height: 1.5em; +} + +.mw-twocolconflict-editor-col #wpTextbox1 { + height: 400px; } diff --git a/tests/browser/features/support/pages/edit_conflict_page.rb b/tests/browser/features/support/pages/edit_conflict_page.rb index 9188b49..bbeb44a 100644 --- a/tests/browser/features/support/pages/edit_conflict_page.rb +++ b/tests/browser/features/support/pages/edit_conflict_page.rb @@ -3,7 +3,7 @@ div(:twocolconflict_explanation_header, class: 'mw-twocolconflict-explainconflict') div(:twocolconflict_changes_desc, css: '.mw-twocolconflict-changes-col .mw-twocolconflict-col-desc') - text_area(:twocolconflict_changes_text, css: '.mw-twocolconflict-changes-col textarea') + div(:twocolconflict_changes_text, id: 'mw-twocolconflict-changes-editor') div(:twocolconflict_editor_desc, css: '.mw-twocolconflict-editor-col .mw-twocolconflict-col-desc') text_area(:twocolconflict_editor_text, css: '.mw-twocolconflict-editor-col textarea') end -- To view, visit https://gerrit.wikimedia.org/r/320974 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81f1f2fe355b258606a781116adaf893e3b33e80 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/TwoColConflict Gerrit-Branch: master Gerrit-Owner: WMDE-FischGerrit-Reviewer: Addshore Gerrit-Reviewer: Tobias Gritschacher Gerrit-Reviewer: WMDE-Fisch Gerrit-Reviewer: jenkins-bot <>
[MediaWiki-commits] [Gerrit] mediawiki...Cognate[master]: Add .gitignore
WMDE-leszek has uploaded a new change for review. https://gerrit.wikimedia.org/r/320979 Change subject: Add .gitignore .. Add .gitignore Makes git ignore IDEA IDEs files Change-Id: Idac6ea7e513ebe6da40f2c7eda95beb306ed0690 --- A .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cognate refs/changes/79/320979/1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ -- To view, visit https://gerrit.wikimedia.org/r/320979 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idac6ea7e513ebe6da40f2c7eda95beb306ed0690 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cognate Gerrit-Branch: master Gerrit-Owner: WMDE-leszek___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Replace confirm with OO.ui.confirm
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/320977 Change subject: Replace confirm with OO.ui.confirm .. Replace confirm with OO.ui.confirm Also enable no-alert eslint rule to prevent alert/confirm/prompt being used in the future. Change-Id: I2851e1f58c1861f75dbb20192e5cf6c343da75db --- M .eslintrc.json M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 2 files changed, 15 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/77/320977/1 diff --git a/.eslintrc.json b/.eslintrc.json index be3fe6f..52f1a52 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -17,6 +17,7 @@ "rules": { "dot-notation": 0, "wrap-iife": 0, - "valid-jsdoc": 0 + "valid-jsdoc": 0, + "no-alert": "error" } } diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 216b3d2..3358499 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -601,7 +601,9 @@ * @inheritdoc */ ve.init.mw.DesktopArticleTarget.prototype.loadFail = function ( error, errorText ) { - var errorInfo, confirmPromptMessage; + var errorInfo, confirmPromptMessage, + target = this; + // Parent method ve.init.mw.DesktopArticleTarget.super.prototype.loadFail.apply( this, arguments ); @@ -637,16 +639,18 @@ } if ( confirmPromptMessage ) { - if ( confirm( confirmPromptMessage ) ) { - this.load(); - } else if ( !$( '#wpTextbox1' ).length ) { - // TODO: Some sort of progress bar? - this.switchToWikitextEditor( true, false ); - } else { + OO.ui.confirm( confirmPromptMessage ).done( function ( confirmed ) { + if ( confirmed ) { + target.load(); + } else if ( !$( '#wpTextbox1' ).length ) { + // TODO: Some sort of progress bar? + target.switchToWikitextEditor( true, false ); + } else { // If we're switching from the wikitext editor, just deactivate // don't try to switch back to it fully, that'd discard changes. - this.deactivate( true ); - } + target.deactivate( true ); + } + } ); } else { if ( error.statusText !== 'abort' ) { mw.log.warn( 'Failed to find error message', errorText, error ); -- To view, visit https://gerrit.wikimedia.org/r/320977 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2851e1f58c1861f75dbb20192e5cf6c343da75db Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cognate[master]: Use original titles of the page in links for to the particul...
WMDE-leszek has uploaded a new change for review. https://gerrit.wikimedia.org/r/320976 Change subject: Use original titles of the page in links for to the particular site .. Use original titles of the page in links for to the particular site Not normalized form of the title must be used to generate correct link to the page at particular site. Bug: T150514 Change-Id: I616b7425fbe009b137e3fab7a9472e6a97bd6cd4 --- M src/CognateHooks.php M src/CognateRepo.php M src/CognateStore.php M src/LocalJobSubmitJob.php M tests/phpunit/CognateIntegrationTest.php M tests/phpunit/CognateRepoIntegrationTest.php M tests/phpunit/CognateRepoUnitTest.php M tests/phpunit/CognateStoreTest.php 8 files changed, 29 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cognate refs/changes/76/320976/1 diff --git a/src/CognateHooks.php b/src/CognateHooks.php index 48a0ce9..a85d326 100644 --- a/src/CognateHooks.php +++ b/src/CognateHooks.php @@ -5,6 +5,7 @@ use DatabaseUpdater; use MediaWiki\MediaWikiServices; use Title; +use TitleValue; class CognateHooks { @@ -69,12 +70,11 @@ /** @var CognateRepo $repo */ $repo = MediaWikiServices::getInstance()->getService( 'CognateRepo' ); - $cognateLanguages = $repo->getLinksForPage( $wgLanguageCode, $title ); + $cognateLinks = $repo->getLinksForPage( $wgLanguageCode, $title ); - $dbKey = $title->getDBkey(); - foreach ( $cognateLanguages as $lang ) { + foreach ( $cognateLinks as $lang => $langTitle ) { if ( !array_key_exists( $lang, $presentLanguages ) ) { - $links[] = $lang . ':' . $dbKey; + $links[] = $lang . ':' . ( new TitleValue( $title->getNamespace(), $langTitle ) )->getDBkey(); } } diff --git a/src/CognateRepo.php b/src/CognateRepo.php index 4930189..081d54d 100644 --- a/src/CognateRepo.php +++ b/src/CognateRepo.php @@ -68,7 +68,9 @@ /** * @param string $languageCode The language code of the site being linked from * @param LinkTarget $linkTarget -* @return string[] language codes, excluding the language passed into this method. +* +* @return string[] Associative array mapping language codes, excluding the language passed into this method, +* to page titles */ public function getLinksForPage( $languageCode, LinkTarget $linkTarget ) { return $this->store->getLinksForPage( $languageCode, $linkTarget ); diff --git a/src/CognateStore.php b/src/CognateStore.php index ae5c7c9..60fa744 100644 --- a/src/CognateStore.php +++ b/src/CognateStore.php @@ -80,13 +80,15 @@ /** * @param string $languageCode The language code of the site being linked from * @param LinkTarget $linkTarget -* @return string[] language codes, excluding the language passed into this method. +* +* @return string[] Associative array mapping language codes, excluding the language passed into this method, +* to page titles */ public function getLinksForPage( $languageCode, LinkTarget $linkTarget ) { - $dbr = $this->loadBalancer->getConnectionRef( DB_SLAVE, [], $this->databaseName ); + $dbr = $this->loadBalancer->getConnectionRef( DB_REPLICA, [], $this->databaseName ); $result = $dbr->select( self::TITLES_TABLE_NAME, - [ 'cgti_site' ], + [ 'cgti_site', 'cgti_title' ], [ 'cgti_site != ' . $dbr->addQuotes( $languageCode ), 'cgti_key' => $this->stringNormalizer->normalize( $linkTarget->getDBkey() ), @@ -96,7 +98,7 @@ $languageCodes = []; while ( $row = $result->fetchRow() ) { - $languageCodes[] = $row[ 'cgti_site' ]; + $languageCodes[$row['cgti_site']] = $row['cgti_title']; } return $languageCodes; diff --git a/src/LocalJobSubmitJob.php b/src/LocalJobSubmitJob.php index 0301018..64e2bb3 100644 --- a/src/LocalJobSubmitJob.php +++ b/src/LocalJobSubmitJob.php @@ -25,7 +25,7 @@ /** @var CognateRepo $repo */ $repo = MediaWikiServices::getInstance()->getService( 'CognateRepo' ); $group = MediaWikiServices::getInstance()->getMainConfig()->get( 'CognateGroup' ); - $languages = $repo->getLinksForPage( $this->languageCode, $this->getTitle() ); + $languages = array_keys( $repo->getLinksForPage( $this->languageCode, $this->getTitle() ) ); // In the case of a delete causing
[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Add browsertests for two column edit conflict page
WMDE-Fisch has submitted this change and it was merged. Change subject: Add browsertests for two column edit conflict page .. Add browsertests for two column edit conflict page Bug: T149719 Change-Id: Ia215a2d5753a55a196f05cda013764be4ed707b4 --- A Gemfile A Gemfile.lock A tests/browser/README.mediawiki A tests/browser/environments.yml A tests/browser/features/edit_conflict.feature A tests/browser/features/support/env.rb A tests/browser/features/support/hooks.rb A tests/browser/features/support/pages/edit_conflict_page.rb A tests/browser/features/support/step_definitions/edit_conflict_steps.rb A tests/browser/features/support/step_definitions/edit_steps.rb 10 files changed, 248 insertions(+), 0 deletions(-) Approvals: WMDE-Fisch: Looks good to me, approved jenkins-bot: Verified diff --git a/Gemfile b/Gemfile new file mode 100644 index 000..b8d1b27 --- /dev/null +++ b/Gemfile @@ -0,0 +1,8 @@ +source 'http://rubygems.org' + +gem 'chunky_png', '~> 1.3.4' +gem 'jsduck', '~> 5.3.4' +gem 'mediawiki_selenium', '~> 1.7.0' +gem 'require_all', '~> 1.3', '>= 1.3.3' +gem 'rake', '~> 10.4', '>= 10.4.2' +gem 'rubocop', '~> 0.41.0', require: false \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000..0a5a6d9 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,132 @@ +GEM + remote: http://rubygems.org/ + specs: +ast (2.3.0) +builder (3.2.2) +childprocess (0.5.9) + ffi (~> 1.0, >= 1.0.11) +chunky_png (1.3.7) +cucumber (1.3.20) + builder (>= 2.1.2) + diff-lcs (>= 1.1.3) + gherkin (~> 2.12) + multi_json (>= 1.7.5, < 2.0) + multi_test (>= 0.1.2) +data_magic (0.22) + faker (>= 1.1.2) + yml_reader (>= 0.6) +diff-lcs (1.2.5) +dimensions (1.2.0) +domain_name (0.5.20161021) + unf (>= 0.0.5, < 1.0.0) +faker (1.6.6) + i18n (~> 0.5) +faraday (0.9.2) + multipart-post (>= 1.2, < 3) +faraday-cookie_jar (0.0.6) + faraday (>= 0.7.4) + http-cookie (~> 1.0.0) +faraday_middleware (0.10.0) + faraday (>= 0.7.4, < 0.10) +ffi (1.9.14) +ffi (1.9.14-x86-mingw32) +gherkin (2.12.2) + multi_json (~> 1.3) +gherkin (2.12.2-x86-mingw32) + multi_json (~> 1.3) +headless (2.3.1) +http-cookie (1.0.3) + domain_name (~> 0.5) +i18n (0.7.0) +jsduck (5.3.4) + dimensions (~> 1.2.0) + json (~> 1.8.0) + parallel (~> 0.7.1) + rdiscount (~> 2.1.6) + rkelly-remix (~> 0.0.4) +json (1.8.3) +mediawiki_api (0.7.0) + faraday (~> 0.9, >= 0.9.0) + faraday-cookie_jar (~> 0.0, >= 0.0.6) + faraday_middleware (~> 0.10, >= 0.10.0) +mediawiki_selenium (1.7.2) + cucumber (~> 1.3, >= 1.3.20) + headless (~> 2.0, >= 2.1.0) + json (~> 1.8, >= 1.8.1) + mediawiki_api (~> 0.7, >= 0.7.0) + page-object (~> 1.0) + rest-client (~> 1.6, >= 1.6.7) + rspec-core (~> 2.14, >= 2.14.4) + rspec-expectations (~> 2.14, >= 2.14.4) + syntax (~> 1.2, >= 1.2.0) + thor (~> 0.19, >= 0.19.1) +mime-types (2.99.3) +multi_json (1.12.1) +multi_test (0.1.2) +multipart-post (2.0.0) +netrc (0.11.0) +page-object (1.2.0) + page_navigation (>= 0.9) + selenium-webdriver (>= 2.44.0) + watir-webdriver (>= 0.6.11) +page_navigation (0.10) + data_magic (>= 0.22) +parallel (0.7.1) +parser (2.3.1.4) + ast (~> 2.2) +powerpack (0.1.1) +rainbow (2.1.0) +rake (10.5.0) +rdiscount (2.1.8) +require_all (1.3.3) +rest-client (1.8.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 3.0) + netrc (~> 0.7) +rest-client (1.8.0-x86-mingw32) + ffi (~> 1.9) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 3.0) + netrc (~> 0.7) +rkelly-remix (0.0.7) +rspec-core (2.99.2) +rspec-expectations (2.99.2) + diff-lcs (>= 1.1.3, < 2.0) +rubocop (0.41.2) + parser (>= 2.3.1.1, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) +ruby-progressbar (1.8.1) +rubyzip (1.2.0) +selenium-webdriver (3.0.1) + childprocess (~> 0.5) + rubyzip (~> 1.0) + websocket (~> 1.0) +syntax (1.2.1) +thor (0.19.1) +unf (0.1.4) + unf_ext +unf_ext (0.0.7.2) +unf_ext (0.0.7.2-x86-mingw32) +unicode-display_width (1.1.1) +watir-webdriver (0.9.9) + selenium-webdriver (>= 2.46.2) +websocket (1.2.3) +yml_reader (0.7) + +PLATFORMS + ruby + x86-mingw32 + +DEPENDENCIES + chunky_png (~> 1.3.4) + jsduck (~> 5.3.4) + mediawiki_selenium (~> 1.7.0) + rake (~> 10.4, >= 10.4.2) + require_all (~> 1.3, >= 1.3.3) + rubocop (~> 0.41.0) + +BUNDLED WITH + 1.10.6 diff --git a/tests/browser/README.mediawiki b/tests/browser/README.mediawiki new file mode 100644 index
[MediaWiki-commits] [Gerrit] operations/puppet[production]: VCL: fixups for synthetic error status
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/320975 Change subject: VCL: fixups for synthetic error status .. VCL: fixups for synthetic error status Change-Id: If9fe979bf79f92c5746786ab29c93ff0695c2dcf --- M modules/varnish/templates/vcl/wikimedia-backend.vcl.erb M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 3 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/75/320975/1 diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb index 5a2636f..86e1b80 100644 --- a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb @@ -144,6 +144,7 @@ // Varnish4 vcl_synth+vcl_backend_error sub vcl_synth { + set resp.http.X-CDIS = "int"; call wm_common_xcache_deliver; if (resp.status > 400 && resp.status != 413) { call synth_errorpage; @@ -152,6 +153,7 @@ } sub vcl_backend_error { + set beresp.http.X-CDIS = "int"; if (beresp.status > 400 && beresp.status != 413) { call backend_error_errorpage; } diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb index c210fd9..473d6b8 100644 --- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb @@ -388,7 +388,7 @@ } if (!req.http.X-CDIS) { // internally-generated response (not a cache object hit, and not a miss|pass to a deeper layer either) - set req.http.X-CDIS = "int"; + set req.http.X-CDIS = "bug"; } // X-Cache-Int gets appended-to as we traverse cache layers diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb index c3ca69a..a1aca5c 100644 --- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb @@ -429,6 +429,7 @@ // Varnish4 vcl_synth+vcl_backend_error sub vcl_synth { + set resp.http.X-CDIS = "int"; call deliver_synth_; call https_error_redirect; call cluster_fe_err_synth; @@ -444,6 +445,7 @@ if (beresp.status == 503 && bereq.retries == 0 && bereq.method ~ "^(GET|HEAD|OPTIONS|PUT|DELETE)$") { return(retry); } + set beresp.http.X-CDIS = "int"; if (beresp.status > 400 && beresp.status != 413) { call backend_error_errorpage; } -- To view, visit https://gerrit.wikimedia.org/r/320975 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9fe979bf79f92c5746786ab29c93ff0695c2dcf 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] mediawiki/core[master]: Add !!html parser test for HTML comment after template name
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/320973 Change subject: Add !!html parser test for HTML comment after template name .. Add !!html parser test for HTML comment after template name I came looking for a test with comments inside transclusions because of bug T89615. I could only find a test for Parsoid and not for PHP, so I added it. Change-Id: I4ee3bc75ec86cc6fde6449790b81d287f0ca8345 --- M tests/parser/parserTests.txt 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/73/320973/1 diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index a18e219..ece12de 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -2731,6 +2731,12 @@ {{echo|foo}} {{echo|foo}} +!!html +foo +foo +foo +foo + !!html/parsoid foo -- To view, visit https://gerrit.wikimedia.org/r/320973 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4ee3bc75ec86cc6fde6449790b81d287f0ca8345 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: grafana: Provision the Server Board dashboard as JSON
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/320972 Change subject: grafana: Provision the Server Board dashboard as JSON .. grafana: Provision the Server Board dashboard as JSON This will effectively make the dashboard read only and establish it as operations provisioned dashboard Change-Id: I13b135e469f69ebd7697bd7314dfa16e1616d3a6 --- A modules/grafana/files/dashboards/server-board.json M modules/role/manifests/grafana/production.pp 2 files changed, 1,472 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/72/320972/1 diff --git a/modules/grafana/files/dashboards/server-board.json b/modules/grafana/files/dashboards/server-board.json new file mode 100644 index 000..ab62a45 --- /dev/null +++ b/modules/grafana/files/dashboards/server-board.json @@ -0,0 +1,1469 @@ +{ + "__inputs": [ +{ + "name": "DS_GRAPHITE", + "label": "graphite", + "description": "", + "type": "datasource", + "pluginId": "graphite", + "pluginName": "Graphite" +} + ], + "__requires": [ +{ + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" +}, +{ + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" +}, +{ + "type": "datasource", + "id": "graphite", + "name": "Graphite", + "version": "1.0.0" +} + ], + "id": null, + "title": "Server Board", + "tags": [ +"operations", +"source:puppet.git", +"readonly" + ], + "style": "light", + "timezone": "utc", + "editable": true, + "hideControls": true, + "sharedCrosshair": true, + "rows": [ +{ + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ +{ + "aliasColors": { +"idle": "#7EB26D", +"nice": "#EAB839", +"steal": "#BA43A9", +"system": "#E24D42", +"user": "#1F78C1" + }, + "annotate": { +"enable": false + }, + "bars": false, + "datasource": "${DS_GRAPHITE}", + "fill": 10, + "grid": { +"max": null, +"min": null, +"threshold1": null, +"threshold1Color": "rgba(216, 200, 27, 0.27)", +"threshold2": null, +"threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "", + "id": 7, + "interactive": true, + "legend": { +"alignAsTable": true, +"avg": true, +"current": true, +"max": true, +"min": true, +"show": true, +"total": false, +"values": true + }, + "legend_counts": true, + "lines": true, + "linewidth": 0, + "links": [], + "nullPointMode": "null", + "options": false, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "resolution": 100, + "scale": 1, + "seriesOverrides": [ +{ + "alias": "idle", + "fill": 3, + "linewidth": 1 +} + ], + "span": 4, + "spyable": true, + "stack": true, + "steppedLine": false, + "targets": [ +{ + "refId": "A", + "target": "aliasByMetric(servers.$server.cpu.total.user)" +}, +{ + "refId": "B", + "target": "aliasByMetric(servers.$server.cpu.total.nice)" +}, +{ + "refId": "C", + "target": "aliasByMetric(servers.$server.cpu.total.system)" +}, +{ + "refId": "D", + "target": "aliasByMetric(servers.$server.cpu.total.iowait)" +}, +{ + "refId": "E", + "target": "aliasByMetric(servers.$server.cpu.total.steal)" +}, +{ + "refId": "F", + "target": "aliasByMetric(servers.$server.cpu.total.idle)" +} + ], + "timeFrom": null, + "timeShift": null, + "timezone": "browser", + "title": "$server CPU", + "tooltip": { +"msResolution": false, +"query_as_alias": true, +"shared": true, +"sort": 0, +"value_type": "individual" + }, + "type": "graph", + "xaxis": { +"show": true + }, + "yaxes": [ +{ + "format": "percent", + "label": "", + "logBase": 1, + "max": 100, + "min": 0, + "show": true +}, +
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Manual template param adaptation using placeholder
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/320971 Change subject: Manual template param adaptation using placeholder .. Manual template param adaptation using placeholder * Similar to paragaph translation, placeholders are given for each parameter. A dropdown can be used to pick the corresponding param in target language. Initial value is copy of source param value. TODO: * Use the automatic mapping to prefill the fields * Render the restored template on form editor. * Alignment plugin integraiton For another iteration: * Additional parameters in target language that does not exist in source. * Template param field card * Descriptions in template param selector * Remove values that are already picked in selector or move them down Bug: T145857 Change-Id: Ic75165f55e23959f37dc0673b4acfb1e84980dfc --- M extension.json M modules/tools/ext.cx.tools.template.editor.js M modules/tools/ext.cx.tools.template.js M modules/tools/styles/ext.cx.tools.template.editor.less M modules/util/ext.cx.util.js 5 files changed, 221 insertions(+), 114 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/71/320971/1 diff --git a/extension.json b/extension.json index e9e55e1..adbf6e5 100644 --- a/extension.json +++ b/extension.json @@ -699,7 +699,8 @@ "tools/styles/ext.cx.tools.template.less" ], "dependencies": [ - "mediawiki.RegExp" + "mediawiki.RegExp", + "oojs-ui-widgets" ] }, "ext.cx.tools.template.card": { @@ -733,7 +734,8 @@ "dependencies": [ "ext.cx.model", "ext.cx.util", - "ext.cx.widgets.overlay" + "ext.cx.widgets.overlay", + "oojs-ui-widgets" ], "messages": [] }, diff --git a/modules/tools/ext.cx.tools.template.editor.js b/modules/tools/ext.cx.tools.template.editor.js index 27b7da3..d6add22 100644 --- a/modules/tools/ext.cx.tools.template.editor.js +++ b/modules/tools/ext.cx.tools.template.editor.js @@ -28,6 +28,7 @@ this.$targetTemplateForm = null; this.templateValues = {}; this.changed = false; + this.initialized = false; this.init(); } @@ -74,55 +75,51 @@ ); this.sourceTemplate.$template.after( this.$editor ); this.sourceTemplate.init().then( function () { - self.prepareTemplateForm( self.sourceTemplate, 'source' ); + self.prepareSourceTemplateForm(); } ); this.targetTemplate.init().then( function () { - self.prepareTemplateForm( self.targetTemplate, 'target' ); + // self.prepareTargetTemplateForm(); } ); this.listen(); }; /** -* Prepare the form with parameter and their values. -* -* @param {mw.cx.Template} template The template object from data-mw attribute -* @param {string} type Whether the template is source or target +* Prepare the source template form with parameter and their values. */ - TemplateEditor.prototype.prepareTemplateForm = function ( template, type ) { + TemplateEditor.prototype.prepareSourceTemplateForm = function () { var $form, $editorTitle, $param, language, desc, sortedKeys, self = this; - if ( type === 'source' ) { - $form = this.$sourceTemplateForm; - language = this.sourceTemplate.language; - } else { - $form = this.$targetTemplateForm; - language = this.targetTemplate.language; - } + $form = this.$sourceTemplateForm; + language = this.sourceTemplate.language; - $form.empty(); - desc = template.templateData && template.templateData.description && - template.templateData.description[ language ]; + desc = this.sourceTemplate.templateData && this.sourceTemplate.templateData.description && + this.sourceTemplate.templateData.description[ language ]; $editorTitle = $( '' ) .addClass( 'cx-template-editor-title' ) .attr( 'title', desc ) - .text( template.title ); + .text( this.sourceTemplate.title ); +
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add DispatchingEntityRevisionLookup
jenkins-bot has submitted this change and it was merged. Change subject: Add DispatchingEntityRevisionLookup .. Add DispatchingEntityRevisionLookup DispatchingEntityLookup picks the right EntityRevisionLookup object to perform the lookup depending on the repository the input EntityId object belongs to. Bug: T146990 Change-Id: Idd3efea6ec1fbd2df3c13a91db8e11ced12097ae --- M composer.json A lib/includes/Store/DispatchingEntityRevisionLookup.php A lib/tests/phpunit/Store/DispatchingEntityRevisionLookupTest.php 3 files changed, 276 insertions(+), 1 deletion(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 33a8399..ae892e1 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "data-values/serialization": "~1.1", "data-values/javascript": "~0.8.0", "data-values/value-view": "~0.18.0", - "wikibase/data-model": "~6.2", + "wikibase/data-model": "~6.3", "wikibase/data-model-serialization": "~2.2", "wikibase/internal-serialization": "~2.3", "wikibase/data-model-services": "~3.5", diff --git a/lib/includes/Store/DispatchingEntityRevisionLookup.php b/lib/includes/Store/DispatchingEntityRevisionLookup.php new file mode 100644 index 000..6727a5f --- /dev/null +++ b/lib/includes/Store/DispatchingEntityRevisionLookup.php @@ -0,0 +1,87 @@ +lookups = $lookups; + } + + /** +* @see EntityRevisionLookup::getEntityRevision +* Returns null also when $entityId does not belong to the repository with the configured lookup. +* +* @param EntityId $entityId +* @param int $revisionId The desired revision id, or 0 for the latest revision. +* @param string $mode LATEST_FROM_SLAVE, LATEST_FROM_SLAVE_WITH_FALLBACK or LATEST_FROM_MASTER +* +* @throws RevisionedUnresolvedRedirectException +* @throws StorageException +* @return EntityRevision|null +*/ + public function getEntityRevision( + EntityId $entityId, + $revisionId = 0, + $mode = self::LATEST_FROM_SLAVE + ) { + $lookup = $this->getLookupForEntityId( $entityId ); + return $lookup !== null ? $lookup->getEntityRevision( $entityId, $revisionId, $mode ) : null; + } + + /** +* @see EntityRevisionLookup::getLatestRevisionId +* Returns false also when $entityId does not belong to the repository with the configured lookup. +* +* @param EntityId $entityId +* @param string $mode LATEST_FROM_SLAVE, LATEST_FROM_SLAVE_WITH_FALLBACK or LATEST_FROM_MASTER +* +* @return int|false +*/ + public function getLatestRevisionId( EntityId $entityId, $mode = self::LATEST_FROM_SLAVE ) { + $lookup = $this->getLookupForEntityId( $entityId ); + return $lookup !== null ? $lookup->getLatestRevisionId( $entityId, $mode ) : false; + } + + /** +* @param EntityId $entityId +* +* @return EntityRevisionLookup|null +*/ + private function getLookupForEntityId( EntityId $entityId ) { + $repo = $entityId->getRepositoryName(); + return isset( $this->lookups[$repo] ) ? $this->lookups[$repo] : null; + } + +} diff --git a/lib/tests/phpunit/Store/DispatchingEntityRevisionLookupTest.php b/lib/tests/phpunit/Store/DispatchingEntityRevisionLookupTest.php new file mode 100644 index 000..f1db713 --- /dev/null +++ b/lib/tests/phpunit/Store/DispatchingEntityRevisionLookupTest.php @@ -0,0 +1,188 @@ +getMock( EntityRevisionLookup::class ); + } + + public function testGivenExistingRevision_getEntityRevisionReturnsIt() { + $itemId = new ItemId( 'Q123' ); + $item = new Item( $itemId ); + + $localLookup = $this->getDummyEntityRevisionLookup(); + $localLookup->expects( $this->any() ) + ->method( 'getEntityRevision' ) + ->with( $itemId ) + ->willReturn( new EntityRevision( $item, 123 ) ); + + $foreignItemId = new ItemId( 'foo:Q303' ); + $foreignItem = new Item( $foreignItemId ); + + $fooLookup = $this->getDummyEntityRevisionLookup(); + $fooLookup->expects( $this->any() ) + ->method( 'getEntityRevision' ) + ->with( $foreignItemId ) + ->willReturn( new EntityRevision( $foreignItem, 100 ) ); + + $dispatchingLookup = new DispatchingEntityRevisionLookup( + array( '' => $localLookup, 'foo' => $fooLookup, ) + ); + + $revision =
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Use vslow with forceSearchIndex db queries
DCausse has uploaded a new change for review. https://gerrit.wikimedia.org/r/320969 Change subject: Use vslow with forceSearchIndex db queries .. Use vslow with forceSearchIndex db queries These queries should not affect normal cluster operations. Bug: T147957 Change-Id: Iaca6e9840709c8a04f12368f2d63f25da411d747 --- M maintenance/forceSearchIndex.php 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/69/320969/1 diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php index 2868a4e..71b1c27 100644 --- a/maintenance/forceSearchIndex.php +++ b/maintenance/forceSearchIndex.php @@ -337,7 +337,7 @@ } protected function getDeletesIterator() { - $dbr = $this->getDB( DB_REPLICA ); + $dbr = $this->getDB( DB_REPLICA, ['vslow'] ); $it = new BatchRowIterator( $dbr, 'archive', @@ -370,7 +370,7 @@ protected function getIdsIterator() { - $dbr = $this->getDB( DB_REPLICA ); + $dbr = $this->getDB( DB_REPLICA, ['vslow'] ); $it = new BatchRowIterator( $dbr, 'page', 'page_id', $this->mBatchSize ); $it->addConditions( [ 'page_id in (' . $dbr->makeList( $this->pageIds, LIST_COMMA ) . ')', @@ -381,7 +381,7 @@ } protected function getUpdatesByDateIterator() { - $dbr = $this->getDB( DB_REPLICA ); + $dbr = $this->getDB( DB_REPLICA, ['vslow'] ); $it = new BatchRowIterator( $dbr, [ 'page', 'revision' ], @@ -400,7 +400,7 @@ } protected function getUpdatesByIdIterator() { - $dbr = $this->getDB( DB_REPLICA ); + $dbr = $this->getDB( DB_REPLICA, ['vslow'] ); $it = new BatchRowIterator( $dbr, 'page', 'page_id', $this->mBatchSize ); $fromId = $this->getOption( 'fromId', 0 ); if ( $fromId > 0 ) { @@ -545,7 +545,7 @@ * will be spat out sized to cover the entire wiki. */ private function buildChunks( $buildChunks ) { - $dbr = $this->getDB( DB_REPLICA ); + $dbr = $this->getDB( DB_REPLICA, ['vslow'] ); if ( $this->toId === null ) { $this->toId = $dbr->selectField( 'page', 'MAX(page_id)' ); if ( $this->toId === false ) { -- To view, visit https://gerrit.wikimedia.org/r/320969 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaca6e9840709c8a04f12368f2d63f25da411d747 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: DCausse___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: Non-ASCII characters. Replacing umlauts with transliterated ...
ItSpiderman has uploaded a new change for review. https://gerrit.wikimedia.org/r/320968 Change subject: Non-ASCII characters. Replacing umlauts with transliterated values rather than removing them :# Please enter the commit message for your changes. Lines starting .. Non-ASCII characters. Replacing umlauts with transliterated values rather than removing them :# Please enter the commit message for your changes. Lines starting Change-Id: Ic1bcc0016f823d300615a4391004348939e180c4 --- M resources/bluespice.extjs/BS/panel/Upload.js 1 file changed, 22 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/68/320968/1 diff --git a/resources/bluespice.extjs/BS/panel/Upload.js b/resources/bluespice.extjs/BS/panel/Upload.js index 13036cf..97e2815 100755 --- a/resources/bluespice.extjs/BS/panel/Upload.js +++ b/resources/bluespice.extjs/BS/panel/Upload.js @@ -31,7 +31,7 @@ fieldLabel: mw.message('bs-upload-uploaddestfilelabel').plain(), id: this.getId()+'-filename', /*jshint ignore:start */ - maskRe: new RegExp( /[^\/\?\*\"\#\<\>\|\\]/gmi ), + maskRe: new RegExp( /[^\/\?\*\"\#\<\>\|\ö\ä\ü\Ö\Ä\Ü\á\à\â\é\è\ê\ú\ù\û\ó\ò\ô\Á\À\Â\É\È\Ê\Ú\Ù\Û\Ó\Ò\Ô\ß\\]/gmi ), /*jshint ignore:end */ name: 'filename' }); @@ -156,7 +156,26 @@ value = value.replace(/^.*?([^\\\/:]*?\.[a-z0-9]+)$/img, "$1"); value = value.replace(/\s/g, "_"); if( mw.config.get('bsIsWindows') ) { - value = value.replace(/[^\u-\u007F]/gmi, ''); //Replace Non-ASCII + //replace non-ASCII + var matcher = /[öäüÖÄÜáàâéèêúùûóòôÁÀÂÉÈÊÚÙÛÓÒÔß]/g; + var dictionary = { + "ä": "ae", "ö": "oe", "ü": "ue", + "Ä": "Ae", "Ö": "Oe", "Ü": "Ue", + "á": "a", "à": "a", "â": "a", + "é": "e", "è": "e", "ê": "e", + "ú": "u", "ù": "u", "û": "u", + "ó": "o", "ò": "o", "ô": "o", + "Á": "A", "À": "A", "Â": "A", + "É": "E", "È": "E", "Ê": "E", + "Ú": "U", "Ù": "U", "Û": "U", + "Ó": "O", "Ò": "O", "Ô": "O", + "ß": "ss" + }; + var translator = function( match ) { + return dictionary[match] || match; + } + value = value.replace( matcher, translator ); + value = value.replace( /[^\u-\u007F]/gmi, '' ); //Replace remaining Non-ASCII } //apply value without 'C:\fakepath\' to file filed as well field.setRawValue(value); @@ -444,4 +463,4 @@ ); }); } -}); \ No newline at end of file +}); -- To view, visit https://gerrit.wikimedia.org/r/320968 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1bcc0016f823d300615a4391004348939e180c4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: ItSpiderman___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Disable connection tracking for kafka broker
Elukey has submitted this change and it was merged. Change subject: Disable connection tracking for kafka broker .. Disable connection tracking for kafka broker During several traffic peaks we've run into exhausting the connection tracking table in the past and rather than bumping the size further, let's disable connection tracking as we already do for other high volume services. Change-Id: If26b300e0cae4d8adf26b1516d18a80d08b4f3de --- M modules/role/manifests/kafka/analytics/broker.pp 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Elukey: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/role/manifests/kafka/analytics/broker.pp b/modules/role/manifests/kafka/analytics/broker.pp index 45e6cd5..a68e3b7 100644 --- a/modules/role/manifests/kafka/analytics/broker.pp +++ b/modules/role/manifests/kafka/analytics/broker.pp @@ -115,11 +115,12 @@ } # firewall Kafka Broker ferm::service { 'kafka-broker': -proto => 'tcp', +proto => 'tcp', # TODO: $::confluent::kafka::broker::port doesn't # seem to work as expected. Hardcoding this for now. -port => 9092, -srange => '($PRODUCTION_NETWORKS $FRACK_NETWORKS)', +port=> 9092, +notrack => true, +srange => '($PRODUCTION_NETWORKS $FRACK_NETWORKS)', } include ::ferm::ipsec_allow -- To view, visit https://gerrit.wikimedia.org/r/320758 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If26b300e0cae4d8adf26b1516d18a80d08b4f3de Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MuehlenhoffGerrit-Reviewer: Elukey 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] apps...wikipedia[master]: Handle abusefilters in Wikidata description editing
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/320965 Change subject: Handle abusefilters in Wikidata description editing .. Handle abusefilters in Wikidata description editing Add checks for abusefilter warning and disallowed when checking server response after editing a Wikidata description. Similarly to the (Page) EditClient abusefilter cases use the success callback. This is mainly because we don't throw an Exception in this case. Alternatively, we could create distinct callbacks for these cases. Bug: T146641 Change-Id: I5c6abcb5425ce6c8d602e6d794610c1778d138ea --- M app/src/main/java/org/wikipedia/dataclient/mwapi/MwPostResponse.java M app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java M app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java M app/src/main/java/org/wikipedia/server/mwapi/MwServiceError.java M app/src/test/java/org/wikipedia/descriptions/DescriptionEditClientTest.java A app/src/test/res/raw/description_edit_abusefilter_disallowed.json A app/src/test/res/raw/description_edit_abusefilter_warning.json 7 files changed, 137 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/65/320965/1 diff --git a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwPostResponse.java b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwPostResponse.java index 3f17d30..149291e 100644 --- a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwPostResponse.java +++ b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwPostResponse.java @@ -24,6 +24,10 @@ return error != null; } +@Nullable public MwServiceError getError() { +return error; +} + public boolean badToken() { return error != null && error.badToken(); } diff --git a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java index 4a2abed..8c1fd1a 100644 --- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java +++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditClient.java @@ -9,6 +9,7 @@ import org.wikipedia.dataclient.retrofit.RetrofitException; import org.wikipedia.login.User; import org.wikipedia.page.PageTitle; +import org.wikipedia.server.mwapi.MwServiceError; import retrofit2.Call; import retrofit2.Response; @@ -27,8 +28,14 @@ = new MwCachedService<>(Service.class); public interface Callback { -void success(@NonNull Call call); +void success(@NonNull Call call, @NonNull ResultType resultType); void failure(@NonNull Call call, @NonNull Throwable caught); +} + +enum ResultType { +SUCCESS, +ABUSE_FILTER_WARNING, +ABUSE_FILTER_DISALLOWED } /** @@ -62,13 +69,11 @@ public void onResponse(Call call, Response response) { if (response.isSuccessful()) { -if (response.body().editWasSuccessful()) { -cb.success(call); -} else if (response.body().hasError()) { -String info = response.body().info(); -RuntimeException exception = new RuntimeException(info != null -? info : "An unknown error occurred"); -cb.failure(call, RetrofitException.unexpectedError(exception)); +final DescriptionEdit body = response.body(); +if (body.editWasSuccessful()) { +cb.success(call, ResultType.SUCCESS); +} else if (body.hasError()) { +handleError(call, body, cb); } else { cb.failure(call, RetrofitException.unexpectedError(new RuntimeException( @@ -88,6 +93,21 @@ return call; } +private void handleError(@NonNull Call call, @NonNull DescriptionEdit body, + @NonNull Callback cb) { +MwServiceError error = body.getError(); +if (error != null && error.hasMessageName("abusefilter-disallowed")) { +cb.success(call, ResultType.ABUSE_FILTER_DISALLOWED); +} else if (error != null && error.hasMessageName("abusefilter-warning")) { +cb.success(call, ResultType.ABUSE_FILTER_WARNING); +} else { +String info = body.info(); +RuntimeException exception = new RuntimeException(info != null +? info : "An unknown error occurred"); +cb.failure(call, RetrofitException.unexpectedError(exception)); +} +} + @VisibleForTesting interface Service { @FormUrlEncoded @POST("w/api.php?action=wbsetdescription=json") diff --git