[MediaWiki-commits] [Gerrit] Add tests - change (mediawiki...InviteSignup)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/243110 Change subject: Add tests .. Add tests Fix all issues so tests pass. Change-Id: I31124bf9fe7602e57141938b414b9d78ee8dd2ac --- M .gitignore A Gruntfile.js M InviteSignup.php M InviteStore.php M SpecialInviteSignup.php M composer.json M i18n/en.json A package.json A phpcs.xml 9 files changed, 102 insertions(+), 50 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InviteSignup refs/changes/10/243110/1 diff --git a/.gitignore b/.gitignore index 98b092a..854a2d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ -.svn *~ *.kate-swp .*.swp +node_modules/ +/composer.lock +/vendor/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..9c56558 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/InviteSignup.php b/InviteSignup.php index 4323c04..d7ede9a 100644 --- a/InviteSignup.php +++ b/InviteSignup.php @@ -5,9 +5,11 @@ $wgMessagesDirs['InviteSignup'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['InviteSignup'] = __DIR__ . '/InviteSignup.alias.php'; wfWarn( - 'Deprecated PHP entry point used for InviteSignup extension. Please use wfLoadExtension instead, ' . - 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + 'Deprecated PHP entry point used for InviteSignup extension. ' . + 'Please use wfLoadExtension instead, see ' . + 'https://www.mediawiki.org/wiki/Extension_registration for more details.' ); + return; } else { die( 'This version of the InviteSignup extension requires MediaWiki 1.25+' ); diff --git a/InviteStore.php b/InviteStore.php index a50b92c..e231a7a 100644 --- a/InviteStore.php +++ b/InviteStore.php @@ -30,6 +30,7 @@ foreach ( $res as $row ) { $invites[] = $this->rowToArray( $row ); } + return $invites; } @@ -50,7 +51,6 @@ return $hash; } - public function deleteInvite( $hash ) { $conds = array( 'is_hash' => $hash ); $this->db->delete( $this->dbTable, $conds, __METHOD__ ); @@ -60,6 +60,7 @@ $fields = array( '*' ); $conds = array( 'is_hash' => $hash ); $res = $this->db->selectRow( $this->dbTable, $fields, $conds, __METHOD__ ); + return $this->rowToArray( $res ); } @@ -84,6 +85,7 @@ } $array[substr( $key, 3 )] = $value; } + return $array; } } diff --git a/SpecialInviteSignup.php b/SpecialInviteSignup.php index 38feeb0..24986e5 100644 --- a/SpecialInviteSignup.php +++ b/SpecialInviteSignup.php @@ -1,4 +1,5 @@ store === null ) { $this->store = new InviteStore( wfGetDB( DB_MASTER ), 'invitesignup' ); } + return $this->store; } @@ -52,7 +53,10 @@ if ( trim( $email ) === '' ) { // Silence } elseif ( !$okay ) { - $out->wrapWikiMsg( Html::rawElement( 'div', array( 'class' => 'error' ), "$1" ), array( 'is-invalidemail', $email ) ); + $out->wrapWikiMsg( + Html::rawElement( 'div', array( 'class' => 'error' ), "$1" ), + array( 'is-invalidemail', $email ) + ); } else { $groups = array(); foreach ( $this->groups as $group ) { @@ -104,9 +108,15 @@ Html::element( 'td', $whenSort, $when ) . Html::element( 'td', null, $email ) . Html::element( 'td', null, User::newFromId( $invite['inviter'] )->getName() ) . - Html::element( 'td', array( 'data-sort-value' => $invite['used'] ), $invite['used'] ? $lang->userTimeAndDate(
[MediaWiki-commits] [Gerrit] Add ferm rules for Spark - change (operations/puppet)
Muehlenhoff has submitted this change and it was merged. Change subject: Add ferm rules for Spark .. Add ferm rules for Spark Bug: T83597 Change-Id: Icadb64ca8ee994b81a55e21fabf295fa270b2992 --- M manifests/role/analytics/spark.pp 1 file changed, 30 insertions(+), 0 deletions(-) Approvals: Ottomata: Looks good to me, but someone else must approve Muehlenhoff: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/analytics/spark.pp b/manifests/role/analytics/spark.pp index b7c66e6..2dabd88 100644 --- a/manifests/role/analytics/spark.pp +++ b/manifests/role/analytics/spark.pp @@ -28,9 +28,39 @@ class role::analytics::spark::standalone::master { require role::analytics::spark::standalone include cdh::spark::master + +ferm::service{ 'spark-master-web-ui': +proto => 'tcp', +port => '18080', +srange => '$ANALYTICS_NETWORKS', +} + +ferm::service{ 'spark-master-rpc': +proto => 'tcp', +port => '7077', +srange => '$ANALYTICS_NETWORKS', +} + +ferm::service{ 'spark-rest-server': +proto => 'tcp', +port => '6066', +srange => '$ANALYTICS_NETWORKS', +} } class role::analytics::spark::standalone::worker { require role::analytics::spark::standalone include cdh::spark::worker + +ferm::service{ 'spark-worker-web-ui': +proto => 'tcp', +port => '18081', +srange => '$ANALYTICS_NETWORKS', +} + +ferm::service{ 'spark-worker-rpc': +proto => 'tcp', +port => '7078', +srange => '$ANALYTICS_NETWORKS', +} } -- To view, visit https://gerrit.wikimedia.org/r/240341 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icadb64ca8ee994b81a55e21fabf295fa270b2992 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MuehlenhoffGerrit-Reviewer: Muehlenhoff 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] Persian Wikipedia configuration in wikipedia_family.py - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/243111 Change subject: Persian Wikipedia configuration in wikipedia_family.py .. Persian Wikipedia configuration in wikipedia_family.py - One of category redirect templates was wrong - /doc is translated in lots of cases Change-Id: I1cdf01086717771792e6023f6d3fc7e8aa4b9cdc (cherry picked from commit 056c53f42973cee5880bf744090628c925b90334) --- M pywikibot/families/wikipedia_family.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/11/243111/1 diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py index bd13e9d..3f958b3 100644 --- a/pywikibot/families/wikipedia_family.py +++ b/pywikibot/families/wikipedia_family.py @@ -101,8 +101,7 @@ 'es': (u'Categoría redirigida',), 'eu': (u'Kategoria redirect',), 'fa': (u'رده بهتر', - u'انتقال رده', - u'فیلمهای امریکایی',), + u'انتقال رده',), 'fr': (u'Redirection de catégorie',), 'gv': (u'Aastiurey ronney',), 'hi': (u'श्रेणीअनुप्रेषित', @@ -548,7 +547,7 @@ # TODO: Remove comments for appropriate pages self.doc_subpages = { '_default': ((u'/doc', ), - ['ar', 'bn', 'cs', 'da', 'en', 'es', 'fa', + ['ar', 'bn', 'cs', 'da', 'en', 'es', 'hu', 'id', 'ilo', 'ja', 'ms', 'ms', 'pt', 'ro', 'ru', 'simple', 'vi', 'zh'] ), @@ -556,6 +555,7 @@ 'de': (u'Doku', u'/Meta'), 'dsb': (u'/Dokumentacija', ), 'eu': (u'txantiloi dokumentazioa', u'/dok'), +'fa': (u'/doc', u'/توضیحات'), # fi: no idea how to handle this type of subpage at :Metasivu: 'fi': ((), ), 'fr': (u'/documentation', ), -- To view, visit https://gerrit.wikimedia.org/r/243111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1cdf01086717771792e6023f6d3fc7e8aa4b9cdc Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John Vandenberg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [NumerAlpha] Add key to ignore - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [NumerAlpha] Add key to ignore .. [NumerAlpha] Add key to ignore https://gerrit.wikimedia.org/r/#/c/228419/7/i18n/en.json,unified Change-Id: Idd30d9cc1d46bb6c9f440d890b085d9ab3c22370 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 6e0d720..43d049c 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -1541,6 +1541,7 @@ Numbertext Numer Alpha +ignored = ext-numeralpha-list-format-outline-glue OAI-PMH repository id = ext-oai -- To view, visit https://gerrit.wikimedia.org/r/243112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd30d9cc1d46bb6c9f440d890b085d9ab3c22370 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond SpekkingGerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [NumerAlpha] Add key to ignore - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/243112 Change subject: [NumerAlpha] Add key to ignore .. [NumerAlpha] Add key to ignore https://gerrit.wikimedia.org/r/#/c/228419/7/i18n/en.json,unified Change-Id: Idd30d9cc1d46bb6c9f440d890b085d9ab3c22370 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/12/243112/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 6e0d720..43d049c 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -1541,6 +1541,7 @@ Numbertext Numer Alpha +ignored = ext-numeralpha-list-format-outline-glue OAI-PMH repository id = ext-oai -- To view, visit https://gerrit.wikimedia.org/r/243112 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idd30d9cc1d46bb6c9f440d890b085d9ab3c22370 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Converted node cache to using getMainStashInstance() - change (mediawiki...TorBlock)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243113 Change subject: Converted node cache to using getMainStashInstance() .. Converted node cache to using getMainStashInstance() * This make the loadExitNodes.php maintenance script updates the node list in all datacenters. * Also bumped the expiry to one day since relying on a "once every 20 min" cron job in puppet when the key is cached for 30 minutes seems too risky. One or two chron failures should not result in an empty node list (given that $wgTorLoadNodes may be off). Change-Id: Ie7c607e0d816dce8d1aa0d0e35a5efcf2c1a237b --- M includes/TorExitNodes.php 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TorBlock refs/changes/13/243113/1 diff --git a/includes/TorExitNodes.php b/includes/TorExitNodes.php index a6f464f..c9b41bf 100644 --- a/includes/TorExitNodes.php +++ b/includes/TorExitNodes.php @@ -60,22 +60,21 @@ return self::$mExitNodes; } - global $wgMemc; - - $nodes = $wgMemc->get( 'mw-tor-exit-nodes' ); // No use of wfMemcKey because it should be multi-wiki. + $cache = ObjectCache::getMainStashInstance(); + $nodes = $cache->get( 'mw-tor-exit-nodes' ); // No use of wfMemcKey because it should be multi-wiki. if ( is_array( $nodes ) ) { // wfDebugLog( 'torblock', "Loading Tor exit node list from memcached.\n" ); // Lucky. return self::$mExitNodes = $nodes; } else { - $liststatus = $wgMemc->get( 'mw-tor-list-status' ); + $liststatus = $cache->get( 'mw-tor-list-status' ); if ( $liststatus == 'loading' ) { // Somebody else is loading it. wfDebugLog( 'torblock', "Old Tor list expired and we are still loading the new one.\n" ); return array(); } elseif ( $liststatus == 'loaded' ) { - $nodes = $wgMemc->get( 'mw-tor-exit-nodes' ); + $nodes = $cache->get( 'mw-tor-exit-nodes' ); if ( is_array( $nodes ) ) { return self::$mExitNodes = $nodes; } else { @@ -105,10 +104,10 @@ * for future use. */ public static function loadExitNodes() { - global $wgMemc; + $cache = ObjectCache::getMainStashInstance(); // Set loading key, to prevent DoS of server. - $wgMemc->set( 'mw-tor-list-status', 'loading', intval( ini_get( 'max_execution_time' ) ) ); + $cache->set( 'mw-tor-list-status', 'loading', intval( ini_get( 'max_execution_time' ) ) ); $nodes = self::loadExitNodes_Onionoo(); if( !$nodes ) { @@ -118,8 +117,8 @@ self::$mExitNodes = $nodes; // Save to cache - $wgMemc->set( 'mw-tor-exit-nodes', $nodes, 1800 ); // Store for half an hour. - $wgMemc->set( 'mw-tor-list-status', 'loaded', 1800 ); + $cache->set( 'mw-tor-exit-nodes', $nodes, 86400 ); + $cache->set( 'mw-tor-list-status', 'loaded', 86400 ); } /** @@ -160,6 +159,7 @@ */ protected static function loadExitNodes_Onionoo() { global $wgTorOnionooServer, $wgTorOnionooCA, $wgTorBlockProxy; + $url = wfExpandUrl( "$wgTorOnionooServer/details?type=relay=true=Exit", PROTO_HTTPS ); $options = array( 'caInfo' => is_readable( $wgTorOnionooCA ) ? $wgTorOnionooCA : null -- To view, visit https://gerrit.wikimedia.org/r/243113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7c607e0d816dce8d1aa0d0e35a5efcf2c1a237b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TorBlock 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] T109077 Performance decreased saving pages for sites with n... - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/243114 Change subject: T109077 Performance decreased saving pages for sites with non-alphabetical code interwiki sort (interwiki_putfirst specified) .. T109077 Performance decreased saving pages for sites with non-alphabetical code interwiki sort (interwiki_putfirst specified) Change-Id: I97e8ecf44c3e8099113068c343f35af94bc02e84 (cherry picked from commit d3f9b7f0c2165b562d35b0da04fe9dd48a45b9fa) --- M pywikibot/textlib.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/14/243114/1 diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index a1d2c55..b40aba4 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -714,8 +714,9 @@ if putfirst: # In this case I might have to change the order firstsites = [] +validlanglinks = insite.validLanguageLinks() for code in putfirst: -if code in insite.validLanguageLinks(): +if code in validlanglinks: site = insite.getSite(code=code) if site in sites: del sites[sites.index(site)] -- To view, visit https://gerrit.wikimedia.org/r/243114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97e8ecf44c3e8099113068c343f35af94bc02e84 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John VandenbergGerrit-Reviewer: Malafaya ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Track clicks on suggestions, etc., in "Did you mean" results - change (mediawiki...WikimediaEvents)
jenkins-bot has submitted this change and it was merged. Change subject: Track clicks on suggestions, etc., in "Did you mean" results .. Track clicks on suggestions, etc., in "Did you mean" results Add wprov=cirrusDYM-* to links for suggestions, rewritten queries, and original queries in div.searchdidyoumean, based on their HTML ids. Track when those are clicked on in DidYouMean schema in didYouMeanSource field. Remove wprov parameter from query params and browser history. Bug: T110359 Change-Id: I704a9fc022887fde89878033b4083f3a3a06b400 --- M WikimediaEvents.php M modules/ext.wikimediaEvents.didyoumean.js 2 files changed, 33 insertions(+), 3 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/WikimediaEvents.php b/WikimediaEvents.php index 19857ab..d7d813a 100644 --- a/WikimediaEvents.php +++ b/WikimediaEvents.php @@ -78,7 +78,7 @@ 'schema.DidYouMean' => array( 'class' => 'ResourceLoaderSchemaModule', 'schema' => 'DidYouMean', - 'revision' => 13316693, + 'revision' => 13800499, ), 'schema.CompletionSuggestions' => array( 'class' => 'ResourceLoaderSchemaModule', @@ -131,6 +131,7 @@ 'localBasePath' => __DIR__ . '/modules', 'remoteExtPath' => 'WikimediaEvents/modules', 'targets' => array( 'desktop' ), + 'dependencies' => 'mediawiki.Uri', ), 'ext.wikimediaEvents.geoFeatures' => array( 'scripts' => array( diff --git a/modules/ext.wikimediaEvents.didyoumean.js b/modules/ext.wikimediaEvents.didyoumean.js index bee6f5b..d2616fd 100644 --- a/modules/ext.wikimediaEvents.didyoumean.js +++ b/modules/ext.wikimediaEvents.didyoumean.js @@ -6,8 +6,31 @@ * @author Erik Bernhardson*/ ( function ( mw, $ ) { + var uri = new mw.Uri( location.href ), + cirrusDYM = uri.query.wprov && uri.query.wprov.indexOf( 'cirrusDYM-' ) === 0; + + if ( cirrusDYM ) { + cirrusDYM = uri.query.wprov; + cirrusDYM = cirrusDYM.replace( /^cirrusDYM-/, '' ) + '-click'; + // cleanup the location bar in supported browsers + if ( window.history.replaceState ) { + delete uri.query.wprov; + window.history.replaceState( {}, '', uri.toString() ); + } + } else { + cirrusDYM = 'no'; + } + function oneIn( populationSize ) { return Math.floor( Math.random() * populationSize ) === 0; + } + + function updateHref() { + if ( this.id ) { + var uri = new mw.Uri( this.href ); + uri.query.wprov = this.id.replace( /^mw-search-DYM/, 'cirrusDYM' ); + this.href = uri.toString(); + } } function participateInTest() { @@ -16,7 +39,7 @@ suggestIsRewritten = $target.find( '.searchrewritten' ).length > 0, numResults = $( '.mw-search-result-heading' ).length, pageId = mw.user.generateRandomSessionId(), - runSuggestion = +new mw.Uri( window.location.href ).query.runsuggestion, + runSuggestion = +uri.query.runsuggestion, logEvent = function ( action ) { mw.eventLog.logEvent( 'DidYouMean', { // Used to correlate actions that happen on the same @@ -36,7 +59,11 @@ logId: mw.user.generateRandomSessionId(), // Records if the user explicitly opted out of auto-running // suggested queries - runsuggestion: isNaN( runSuggestion ) ? true : !!runSuggestion, + runSuggestion: isNaN( runSuggestion ) ? true : !!runSuggestion, + // Records whether the user clicked on a DYM link to get here + // 'original-click', 'rewritten-click', 'suggestion-click', or 'no' + didYouMeanSource: cirrusDYM, + // Records the action taken on this page action: action } ); }, @@ -67,6 +94,8 @@ } $( document ).ready( function () { + // tag "Did you mean" suggestion and original query + $( '#mw-content-text .searchdidyoumean > a' ).each( updateHref ); // we fire most events from click handlers, so we need to filter for //
[MediaWiki-commits] [Gerrit] Remove echo when MEDIAWIKI is not defined - change (mediawiki...UniversalLanguageSelector)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/243170 Change subject: Remove echo when MEDIAWIKI is not defined .. Remove echo when MEDIAWIKI is not defined This breaks tests like in https://integration.wikimedia.org/ci/job/php-composer-test/16960/console Change-Id: If01cb1106e3038c5f65d3fec4d4733c943a68a37 --- M UniversalLanguageSelector.php 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/70/243170/1 diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php index 5a99f50..a6fa94f 100644 --- a/UniversalLanguageSelector.php +++ b/UniversalLanguageSelector.php @@ -30,10 +30,7 @@ return; } -if ( !defined( 'MEDIAWIKI' ) ) { - echo "This file is an extension to the MediaWiki software and cannot be used standalone.\n"; - die( -1 ); -} +if ( !defined( 'MEDIAWIKI' ) ) die(); /** * Version number used in extension credits and in other placed where needed. */ -- To view, visit https://gerrit.wikimedia.org/r/243170 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If01cb1106e3038c5f65d3fec4d4733c943a68a37 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [SmashPig] add php-composer-test to experimental - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: [SmashPig] add php-composer-test to experimental .. [SmashPig] add php-composer-test to experimental Will let us run composer test from Gerrit. Bug: T104264 Change-Id: I30c473ae287474e72b18d60a3004a9e93879e888 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 00b1579..cc190b3 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2835,6 +2835,7 @@ - phplint experimental: - tox-jessie + - php-composer-test - name: wikimedia/iegreview template: -- To view, visit https://gerrit.wikimedia.org/r/243172 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30c473ae287474e72b18d60a3004a9e93879e888 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Composer entry point to run tests - change (wikimedia...SmashPig)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/243173 Change subject: Composer entry point to run tests .. Composer entry point to run tests To be able to run the PHPUnit test suite (T104264), we need an entry point to be defined in composer which reacts to 'composer test': https://www.mediawiki.org/wiki/Continuous_integration/Entry_points#PHP Add dev dependencies phpunit/phpunit jakub-onderka/php-parallel-lint Refresh composer.lock file. I have used: composer update phpunit/phpunit jakub-onderka/php-parallel-lint Create the 'test' entry point. Bug: T104264 Change-Id: I38d0b6cbb4fce8bd2b4ef20a2bb8f24b0124b030 --- M composer.json M composer.lock 2 files changed, 1,013 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/73/243173/1 diff --git a/composer.json b/composer.json index 9ef6b02..8f56671 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,16 @@ "symfony/http-foundation": ">=2.1,<2.4-dev", "amzn/login-and-pay-with-amazon-sdk-php": "dev-master" }, + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.9", + "phpunit/phpunit": "4.8.*" + }, + "scripts": { + "test": [ + "parallel-lint . --exclude vendor", + "phpunit" + ] + }, "autoload": { "psr-4": { "SmashPig\\": "./" diff --git a/composer.lock b/composer.lock index 06b52c3..ab1f06c 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", -"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, +"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, "This file is @generated automatically" ], -"hash": "5f5c36af76d4b594773cc2d4becf8546", +"hash": "eeb7419c45b56c419ac4a5ea47ff1b62", "packages": [ { "name": "amzn/login-and-pay-with-amazon-sdk-php", @@ -43,7 +43,7 @@ "payment", "payments" ], -"time": "2015-09-29 19:53:04" +"time": "2015-09-29 19:30:48" }, { "name": "fusesource/stomp-php", @@ -256,7 +256,1006 @@ "time": "2015-05-20 08:53:09" } ], -"packages-dev": [], +"packages-dev": [ +{ +"name": "doctrine/instantiator", +"version": "1.0.5", +"source": { +"type": "git", +"url": "https://github.com/doctrine/instantiator.git;, +"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" +}, +"dist": { +"type": "zip", +"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d;, +"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", +"shasum": "" +}, +"require": { +"php": ">=5.3,<8.0-DEV" +}, +"require-dev": { +"athletic/athletic": "~0.1.8", +"ext-pdo": "*", +"ext-phar": "*", +"phpunit/phpunit": "~4.0", +"squizlabs/php_codesniffer": "~2.0" +}, +"type": "library", +"extra": { +"branch-alias": { +"dev-master": "1.0.x-dev" +} +}, +"autoload": { +"psr-4": { +"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" +} +}, +"notification-url": "https://packagist.org/downloads/;, +"license": [ +"MIT" +], +"authors": [ +{ +"name": "Marco Pivetta", +"email": "ocram...@gmail.com", +"homepage": "http://ocramius.github.com/; +} +], +"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", +"homepage": "https://github.com/doctrine/instantiator;, +"keywords": [ +"constructor", +"instantiate" +], +"time": "2015-06-14 21:17:01" +}, +{ +"name": "jakub-onderka/php-parallel-lint", +"version": "v0.9", +"source": { +"type": "git", +"url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git;, +"reference": "1b693fb455201cacf595163c92bfb1adfa2158d8" +}, +
[MediaWiki-commits] [Gerrit] Do not use extension.json for MW 1.25.1 or 1.25.2, due to bu... - change (mediawiki...Cargo)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/243175 Change subject: Do not use extension.json for MW 1.25.1 or 1.25.2, due to bug in those .. Do not use extension.json for MW 1.25.1 or 1.25.2, due to bug in those Change-Id: Icfba665a8999f2cd2bc04dc11a33b86db0a713d2 --- M Cargo.php 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/75/243175/1 diff --git a/Cargo.php b/Cargo.php index 6f7ff2b..be49190 100644 --- a/Cargo.php +++ b/Cargo.php @@ -11,7 +11,12 @@ // extensions to determine whether Cargo is installed. define( 'CARGO_VERSION', '0.10-alpha' ); -if ( function_exists( 'wfLoadExtension' ) ) { +// There's a bug in extension loading in versions 1.25.1 and 1.25.2 that +// makes it unusable for Cargo - don't load extensions unless we're at +// version 1.25.3 or higher. +// (See https://phabricator.wikimedia.org/T109243) +//if ( function_exists( 'wfLoadExtension' ) ) { +if ( version_compare( $wgVersion, '1.25.3', '>=' ) ) { wfLoadExtension( 'Cargo' ); // Keep i18n globals so mergeMessageFileList.php doesn't break $wgMessagesDirs['Cargo'] = __DIR__ . '/i18n'; -- To view, visit https://gerrit.wikimedia.org/r/243175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icfba665a8999f2cd2bc04dc11a33b86db0a713d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Varnish: Add lint:ignore:quoted_booleans around a boolean th... - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Varnish: Add lint:ignore:quoted_booleans around a boolean that needs quoting. .. Varnish: Add lint:ignore:quoted_booleans around a boolean that needs quoting. Bug: T113783 Change-Id: Icbe2be0235038b40c2584f221ae23a90c1a2ecb6 --- M modules/varnish/manifests/instance.pp 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/varnish/manifests/instance.pp b/modules/varnish/manifests/instance.pp index aa9af9b..27d00a8 100644 --- a/modules/varnish/manifests/instance.pp +++ b/modules/varnish/manifests/instance.pp @@ -52,11 +52,13 @@ $inst = $name } +# lint:ignore:quoted_booleans if inline_template("<%= @directors.map{|k,v| v['dynamic'] }.include?('yes') %>") == "true" { $use_dynamic_directors = true } else { $use_dynamic_directors = false } +# lint:endignore if $use_dynamic_directors { varnish::common::directors { $vcl: -- To view, visit https://gerrit.wikimedia.org/r/243176 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icbe2be0235038b40c2584f221ae23a90c1a2ecb6 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: BBlack Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [IMPROV] nowcommons: Query at most one users - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [IMPROV] nowcommons: Query at most one users .. [IMPROV] nowcommons: Query at most one users To verify if a page is used it's only necessary to query one using page instead of all. Change-Id: I9bbb206ede1723c33410c3b50e05dae71ecc265f --- M scripts/nowcommons.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py index cfd9d0b..433dd9c 100755 --- a/scripts/nowcommons.py +++ b/scripts/nowcommons.py @@ -374,9 +374,9 @@ bot.run() # If the image is used with the urlname the # previous function won't work -if len(list(pywikibot.FilePage(self.site, - page.title()).usingPages())) > 0 and \ - self.getOption('replaceloose'): +is_used = bool(list(pywikibot.FilePage( +self.site, page.title()).usingPages(total=1))) +if is_used and self.getOption('replaceloose'): bot = ImageBot( pg.FileLinksGenerator( localImagePage), -- To view, visit https://gerrit.wikimedia.org/r/240359 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9bbb206ede1723c33410c3b50e05dae71ecc265f Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZiseGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added dummy secrets/labstore/id_labstore to make puppet comp... - change (labs/private)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/243183 Change subject: Added dummy secrets/labstore/id_labstore to make puppet compiler happy. .. Added dummy secrets/labstore/id_labstore to make puppet compiler happy. Change-Id: I8c7e41115581902cfbc009e77d4a6fd821b8b112 --- A modules/secret/secrets/labstore/id_labstore 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/private refs/changes/83/243183/1 diff --git a/modules/secret/secrets/labstore/id_labstore b/modules/secret/secrets/labstore/id_labstore new file mode 100644 index 000..e69de29 --- /dev/null +++ b/modules/secret/secrets/labstore/id_labstore -- To view, visit https://gerrit.wikimedia.org/r/243183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c7e41115581902cfbc009e77d4a6fd821b8b112 Gerrit-PatchSet: 1 Gerrit-Project: labs/private Gerrit-Branch: master Gerrit-Owner: Andrew Bogott___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added dummy secrets/labstore/id_labstore to make puppet comp... - change (labs/private)
Andrew Bogott has submitted this change and it was merged. Change subject: Added dummy secrets/labstore/id_labstore to make puppet compiler happy. .. Added dummy secrets/labstore/id_labstore to make puppet compiler happy. Change-Id: I8c7e41115581902cfbc009e77d4a6fd821b8b112 --- A modules/secret/secrets/labstore/id_labstore 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Verified; Looks good to me, approved diff --git a/modules/secret/secrets/labstore/id_labstore b/modules/secret/secrets/labstore/id_labstore new file mode 100644 index 000..e69de29 --- /dev/null +++ b/modules/secret/secrets/labstore/id_labstore -- To view, visit https://gerrit.wikimedia.org/r/243183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8c7e41115581902cfbc009e77d4a6fd821b8b112 Gerrit-PatchSet: 1 Gerrit-Project: labs/private Gerrit-Branch: master Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics: modernize the ensure => link syntax in a couple ... - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: analytics: modernize the ensure => link syntax in a couple of places. .. analytics: modernize the ensure => link syntax in a couple of places. Change-Id: Ieaa58328a80021a389aa5eb314f3ae6b72a1e839 --- M manifests/role/analytics/mysql.pp 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/analytics/mysql.pp b/manifests/role/analytics/mysql.pp index 39f7cf6..1c4bb05 100644 --- a/manifests/role/analytics/mysql.pp +++ b/manifests/role/analytics/mysql.pp @@ -16,12 +16,14 @@ } file { '/etc/init.d/mysql': -ensure => '/opt/wmf-mariadb10/service', +ensure=> link, +target=> '/opt/wmf-mariadb10/service', require => Class['mariadb::packages_wmf'], } file { '/usr/local/bin/mysql': -ensure => '/opt/wmf-mariadb10/bin/mysql', +ensure=> link, +target=> '/opt/wmf-mariadb10/bin/mysql', require => Class['mariadb::packages_wmf'], } -- To view, visit https://gerrit.wikimedia.org/r/243179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieaa58328a80021a389aa5eb314f3ae6b72a1e839 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update collector version - change (operations...cassandra-metrics-collector)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/243121 Change subject: update collector version .. update collector version * introduce discovery of cassandra instances based on cassandra.instance-id JVM property * introduce metrics blacklisting * introduce daemon mode Bug: T113733 Change-Id: I776d0e5905a89aeb7805217d15ae1e84a0d9909e --- A lib/cassandra-metrics-collector-2.0.0-20151001.182133-1-jar-with-dependencies.jar 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/cassandra-metrics-collector refs/changes/21/243121/1 diff --git a/lib/cassandra-metrics-collector-2.0.0-20151001.182133-1-jar-with-dependencies.jar b/lib/cassandra-metrics-collector-2.0.0-20151001.182133-1-jar-with-dependencies.jar new file mode 100644 index 000..1621fe6 --- /dev/null +++ b/lib/cassandra-metrics-collector-2.0.0-20151001.182133-1-jar-with-dependencies.jar @@ -0,0 +1 @@ +#$# git-fat a91f19aa2fb4cf9a8585875d4ba0ac72c7899e0c 5342469 -- To view, visit https://gerrit.wikimedia.org/r/243121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I776d0e5905a89aeb7805217d15ae1e84a0d9909e Gerrit-PatchSet: 1 Gerrit-Project: operations/software/cassandra-metrics-collector Gerrit-Branch: master Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename duplicate/outdated methods and parameters - change (mediawiki...WikibaseQualityExternalValidation)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/243125 Change subject: Rename duplicate/outdated methods and parameters .. Rename duplicate/outdated methods and parameters Focus is on two renames: 1. The duplicate "crossCheckStatement(s|List)" methods in CrossCheckInteractor. 2. Outdated "claimGuids". Change-Id: I45449638aca5ff41f2dd5d9ea69b5c90af7ef45d --- M api/RunCrossCheck.php M includes/CrossCheck/CrossCheckInteractor.php M includes/DumpMetaInformation/DumpMetaInformation.php M includes/DumpMetaInformation/SqlDumpMetaInformationRepo.php M includes/ExternalDataRepo.php M specials/SpecialCrossCheck.php M tests/phpunit/Api/RunCrossCheckTest.php M tests/phpunit/CrossCheck/CrossCheckInteractorTest.php M tests/phpunit/CrossCheck/Result/CrossCheckResultTest.php M tests/phpunit/Specials/SpecialCrossCheckTest.php 10 files changed, 58 insertions(+), 56 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityExternalValidation refs/changes/25/243125/1 diff --git a/api/RunCrossCheck.php b/api/RunCrossCheck.php index 06b2651..8bc75c2 100644 --- a/api/RunCrossCheck.php +++ b/api/RunCrossCheck.php @@ -122,9 +122,9 @@ $resultLists = $this->crossCheckInteractor->crossCheckEntitiesByIds( $entityIds ); } } elseif ( $params['claims'] ) { - $claimGuids = $params['claims']; - $this->assertAreValidClaimGuids( $claimGuids ); - $resultLists = $this->crossCheckInteractor->crossCheckStatements( $claimGuids ); + $guids = $params['claims']; + $this->assertAreValidClaimGuids( $guids ); + $resultLists = $this->crossCheckInteractor->crossCheckStatementsByGuids( $guids ); } else { $this->errorReporter->dieError( 'Either provide the ids of entities or ids of claims, that should be cross-checked.', @@ -149,11 +149,11 @@ } /** -* @param array $claimGuids +* @param string[] $guids */ - private function assertAreValidClaimGuids( array $claimGuids ) { - foreach ( $claimGuids as $claimGuid ) { - if ( $this->statementGuidValidator->validateFormat( $claimGuid ) === false ) { + private function assertAreValidClaimGuids( array $guids ) { + foreach ( $guids as $guid ) { + if ( $this->statementGuidValidator->validateFormat( $guid ) === false ) { $this->errorReporter->dieError( 'Invalid claim guid.', 'invalid-guid' ); } } diff --git a/includes/CrossCheck/CrossCheckInteractor.php b/includes/CrossCheck/CrossCheckInteractor.php index bf77f07..f263237 100644 --- a/includes/CrossCheck/CrossCheckInteractor.php +++ b/includes/CrossCheck/CrossCheckInteractor.php @@ -60,7 +60,7 @@ $entity = $this->entityLookup->getEntity( $entityId ); if ( $entity instanceof StatementListProvider ) { - return $this->crossCheckStatementList( $entity->getStatements() ); + return $this->crossCheckStatements( $entity->getStatements() ); } return null; @@ -91,7 +91,7 @@ * * @return CrossCheckResultList */ - public function crossCheckStatementList( StatementList $statements ) { + public function crossCheckStatements( StatementList $statements ) { return $this->crossChecker->crossCheckStatements( $statements, $statements ); } @@ -110,7 +110,7 @@ foreach ( $entities as $entity ) { $entityId = $entity->getId()->getSerialization(); if ( $entity instanceof StatementListProvider ) { - $results[$entityId] = $this->crossCheckStatementList( $entity->getStatements() ); + $results[$entityId] = $this->crossCheckStatements( $entity->getStatements() ); } } @@ -211,16 +211,15 @@ /** * Runs cross-check for a single statement. * -* @param string $statementGuid +* @param string $guid * -* @param string $claimGuid * @return CrossCheckResultList * @throws InvalidArgumentException */ - public function crossCheckStatement( $statementGuid ) { - $this->assertIsString( $statementGuid, '$claimGuid' ); + public function crossCheckStatementByGuid( $guid ) { + $this->assertIsString( $guid, '$guid' ); - $resultList = $this->crossCheckStatements( array( $statementGuid ) ); +
[MediaWiki-commits] [Gerrit] Introducing template format - change (mediawiki...TemplateData)
Eranroz has uploaded a new change for review. https://gerrit.wikimedia.org/r/243138 Change subject: Introducing template format .. Introducing template format Adding format for template data, which defines the preffered format for template. Possible formats: * Inline - all parameters in single line * Block - Each paramter is in its own line Bug: T64217 Change-Id: Id856c4a38890526060d0619432f06174d66f7792 --- M Specification.md M TemplateDataBlob.php M extension.json M i18n/en.json M i18n/qqq.json M modules/ext.templateDataGenerator.data.js M modules/ext.templateDataGenerator.ui.js M modules/ext.templateDataGenerator.ui.tdDialog.js 8 files changed, 113 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData refs/changes/38/243138/1 diff --git a/Specification.md b/Specification.md index 6a361a3..107551e 100644 --- a/Specification.md +++ b/Specification.md @@ -97,6 +97,9 @@ Authors MUST ensure that the `maps` object contains only `Map` objects. Authors MAY include a parameter in multiple `Map` objects. Authors are NOT REQUIRED to reference each parameter in at least one `Map` object. + 3.1.6 `format` +* Value: `inline` or `block` + ### 3.2 Param * Value: `Object` diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index f05aa16..db75ab1 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -47,6 +47,7 @@ $tdb->data->description = null; $tdb->data->params = new stdClass(); $tdb->data->paramOrder = array(); + $tdb->data->format = 'inline'; $tdb->data->sets = array(); $tdb->data->maps = new stdClass(); } @@ -83,6 +84,7 @@ 'paramOrder', 'sets', 'maps', + 'format', ); static $paramKeys = array( @@ -115,6 +117,11 @@ 'wiki-template-name', ); + static $formats = array( + 'block', + 'inline' + ); + static $typeCompatMap = array( 'string/line' => 'line', 'string/wiki-page-name' => 'wiki-page-name', @@ -144,6 +151,19 @@ $data->description = self::normaliseInterfaceText( $data->description ); } else { $data->description = null; + } + + // Root.format + if ( isset( $data->format ) ) { + if ( !in_array( $data->format, $formats ) ) { + return Status::newFatal( + 'templatedata-invalid-value', + 'format' + ); + $data->format = self::normaliseInterfaceText( $data->format ); + } + } else { + $data->format = 'inline'; } // Root.params @@ -674,6 +694,16 @@ $data->description : wfMessage( 'templatedata-doc-desc-empty' )->inLanguage( $lang )->text() ) + . Html::element( + 'p', + array( + 'class' => array( + 'mw-templatedata-doc-format', + 'mw-templatedata-doc-muted' => $data->format === null, + ) + ), + wfMessage( 'templatedata-doc-format-' . $data->format )->inLanguage( $lang )->text() + ) . '' . Html::element( 'caption', diff --git a/extension.json b/extension.json index 48d1d01..c782b67 100644 --- a/extension.json +++ b/extension.json @@ -111,6 +111,8 @@ "templatedata-modal-errormsg", "templatedata-modal-errormsg-import-noparams", "templatedata-modal-errormsg-import-paramsalreadyexist", + "templatedata-modal-format-inline", + "templatedata-modal-format-block", "templatedata-modal-json-error-replace", "templatedata-modal-notice-import-numparams", "templatedata-modal-placeholder-paramkey", @@ -151,6 +153,7 @@ "templatedata-modal-title-language",
[MediaWiki-commits] [Gerrit] Phase out yamllint - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/243137 Change subject: Phase out yamllint .. Phase out yamllint The last repo using it was wikimedia/fundraising/tools, I have proposed a patch that covers YAML linting at T114470. Remove Jenkins job 'yamllint' Deconfigure Zuul Slave scripts will be removed from integration/jenkins via T96014. Bug: T95890 Change-Id: Ida800e6d79c66a67e2e3417829d53f5717b737b3 --- M jjb/job-templates.yaml M zuul/layout.yaml 2 files changed, 0 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/37/243137/1 diff --git a/jjb/job-templates.yaml b/jjb/job-templates.yaml index 3fa8b1f..cd7c815 100644 --- a/jjb/job-templates.yaml +++ b/jjb/job-templates.yaml @@ -371,14 +371,3 @@ set -x (grep --recursive -P '^\t' --exclude-dir='.git' --include='{fileselector}' .) && HAS_TAB=1 || HAS_TAB=0 exit $HAS_TAB - - -- job: -name: 'yamllint' -defaults: use-remote-zuul-shallow-clone -node: contintLabsSlave && UbuntuPrecise -concurrent: true -triggers: - - zuul -builders: - - shell: '/srv/deployment/integration/slave-scripts/tools/yamllint.py "$WORKSPACE"' diff --git a/zuul/layout.yaml b/zuul/layout.yaml index ea76971..00b1579 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -1594,10 +1594,6 @@ success-message: 'FAILURE No layout difference. Build' failure-message: 'SUCCESS Review the Zuul layout difference. Build' - - name: 'yamllint' -success-message: 'SUCCESS This job is deprecated. Please lint YAML files with a test. T95890.' -failure-message: 'FAILURE This job is deprecated. Please lint YAML files with a test. T95890.' - - name: 'integration-zuul-layoutvalidation-gate' branch: (?!labs) @@ -2775,11 +2771,9 @@ check-voter: - jshint - jsonlint - - yamllint gate-and-submit: - jshint - jsonlint - - yamllint experimental: - tox-jessie -- To view, visit https://gerrit.wikimedia.org/r/243137 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida800e6d79c66a67e2e3417829d53f5717b737b3 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor the code that determine insertion annotations - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Refactor the code that determine insertion annotations .. Refactor the code that determine insertion annotations Also use the cursor position with respect to annotation tags, if available Change-Id: I5f7e97e279fa1a6f3c65b976a7e0da5fb9dd7c9c --- M src/dm/lineardata/ve.dm.ElementLinearData.js M tests/dm/lineardata/ve.dm.ElementLinearData.test.js 2 files changed, 35 insertions(+), 32 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/src/dm/lineardata/ve.dm.ElementLinearData.js b/src/dm/lineardata/ve.dm.ElementLinearData.js index f11f492..868de3f 100644 --- a/src/dm/lineardata/ve.dm.ElementLinearData.js +++ b/src/dm/lineardata/ve.dm.ElementLinearData.js @@ -539,44 +539,42 @@ * see https://phabricator.wikimedia.org/T113869 . * * @param {ve.Range} range The range into which text would be inserted + * @param {boolean} [startAfterAnnotations] Use annotations after cursor if collapsed * @return {ve.dm.AnnotationSet} The insertion annotations that should apply */ -ve.dm.ElementLinearData.prototype.getInsertionAnnotationsFromRange = function ( range ) { - var left, right, leftAnnotations, rightAnnotations; +ve.dm.ElementLinearData.prototype.getInsertionAnnotationsFromRange = function ( range, startAfterAnnotations ) { + var start, startAnnotations, afterAnnotations; - if ( range.isCollapsed() ) { - // Get annotations from either side of the cursor - left = Math.max( 0, range.start - 1 ); - if ( !this.isContentOffset( left ) ) { - left = -1; - } - right = Math.max( 0, range.start ); - if ( !this.isContentOffset( right ) ) { - right = -1; - } + // Get position for start annotations + if ( range.isCollapsed() && !startAfterAnnotations ) { + // Use the position just before the cursor + start = Math.max( 0, range.start - 1 ); } else { - // Get annotations from the first character of the range - // TODO: The use of getNearestContentOffset no longer makes much sense here - left = this.getNearestContentOffset( range.start ); - right = this.getNearestContentOffset( range.end ); - } - if ( left === -1 ) { - // No content offset to our left, use empty set - return new ve.dm.AnnotationSet( this.getStore() ); + // If uncollapsed, use the first character of the selection + // If collapsed, use the first position after the cursor + start = range.start; } - // Include each annotation on the left that either continues on the right - // or should get added to appended content - leftAnnotations = this.getAnnotationsFromOffset( left ); - if ( right === -1 ) { - // TODO: "return leftAnnotations" would match prior behaviour. Was that a mistake? - rightAnnotations = new ve.dm.AnnotationSet( this.getStore() ); + // Get startAnnotations: the annotations that apply at the selection start + if ( this.isContentOffset( start ) ) { + startAnnotations = this.getAnnotationsFromOffset( start ); } else { - rightAnnotations = this.getAnnotationsFromOffset( right ); + startAnnotations = new ve.dm.AnnotationSet( this.getStore() ); } - return leftAnnotations.filter( function ( annotation ) { + + // Get afterAnnotations: the annotations that apply straight after the selection + if ( this.isContentOffset( range.end ) ) { + afterAnnotations = this.getAnnotationsFromOffset( range.end ); + } else { + // Use the empty set + afterAnnotations = new ve.dm.AnnotationSet( this.getStore() ); + } + + // Return those startAnnotations that either continue in afterAnnotations or + // should get added to appended content + return startAnnotations.filter( function ( annotation ) { return annotation.constructor.static.applyToAppendedContent || - rightAnnotations.containsComparable( annotation ); + afterAnnotations.containsComparable( annotation ); } ); }; diff --git a/tests/dm/lineardata/ve.dm.ElementLinearData.test.js b/tests/dm/lineardata/ve.dm.ElementLinearData.test.js index e2d8d52..9ec66a7 100644 --- a/tests/dm/lineardata/ve.dm.ElementLinearData.test.js +++ b/tests/dm/lineardata/ve.dm.ElementLinearData.test.js @@ -391,12 +391,16 @@ { range: [ 1, 1 ], expected: [], msg: 'plain start at block start' }, { range: [ 2, 2 ], expected: [], msg: 'plain interior' }, { range: [ 3, 3
[MediaWiki-commits] [Gerrit] Use zuul source @debian/precise-wikimedia - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: Use zuul source @debian/precise-wikimedia .. Use zuul source @debian/precise-wikimedia Run tests using Zuul as deployed on the gallium server which is using a Debian package build from the `debian/precise-wikimedia` branch. integration/config has been updated back in May 2015 with: https://gerrit.wikimedia.org/r/#/c/214319/ Should get the requirements up to date. master branch is obsolete. Bug: T114461 Change-Id: I0de758f583ef3662415f3be774d477f615dbbbe3 --- M test-requirements.txt 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/test-requirements.txt b/test-requirements.txt index af3e5ac..746aeda 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,3 @@ nose PyYAML -git+https://gerrit.wikimedia.org/r/p/integration/zuul.git#egg=zuul +git+https://gerrit.wikimedia.org/r/p/integration/zuul.git@debian/precise-wikimedia#egg=zuul -- To view, visit https://gerrit.wikimedia.org/r/243126 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0de758f583ef3662415f3be774d477f615dbbbe3 Gerrit-PatchSet: 3 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Hashar Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] otrs: move systemd unit file into correct location - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: otrs: move systemd unit file into correct location .. otrs: move systemd unit file into correct location It was placed in the wrong directory Change-Id: Iaa55e1b24e9c1f4b2033adb9dcdd0eaf56d30a85 --- R modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/modules/otrs/templates/otrs-scheduler.systemd.erb b/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb similarity index 100% rename from modules/otrs/templates/otrs-scheduler.systemd.erb rename to modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb -- To view, visit https://gerrit.wikimedia.org/r/243143 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa55e1b24e9c1f4b2033adb9dcdd0eaf56d30a85 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] otrs: move systemd unit file into correct location - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/243143 Change subject: otrs: move systemd unit file into correct location .. otrs: move systemd unit file into correct location It was placed in the wrong directory Change-Id: Iaa55e1b24e9c1f4b2033adb9dcdd0eaf56d30a85 --- R modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/243143/1 diff --git a/modules/otrs/templates/otrs-scheduler.systemd.erb b/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb similarity index 100% rename from modules/otrs/templates/otrs-scheduler.systemd.erb rename to modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb -- To view, visit https://gerrit.wikimedia.org/r/243143 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa55e1b24e9c1f4b2033adb9dcdd0eaf56d30a85 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] otrs: scheduler is forking, set Type accordingly - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: otrs: scheduler is forking, set Type accordingly .. otrs: scheduler is forking, set Type accordingly Set systemd unit type to forking since that the OTRS scheduler's model Change-Id: I006c6d2ebd57702de02dab0ce0f99b7ff72c9560 --- M modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb b/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb index ed2fba1..6592627 100644 --- a/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb +++ b/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb @@ -9,6 +9,7 @@ Restart=always RestartSec=2s TimeoutStopSec=60 +Type=forking ExecStart=/opt/otrs/bin/otrs.Scheduler.pl -a start ExecStop=/opt/otrs/bin/otrs.Scheduler.pl -a stop -- To view, visit https://gerrit.wikimedia.org/r/243146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I006c6d2ebd57702de02dab0ce0f99b7ff72c9560 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] otrs: scheduler is forking, set Type accordingly - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/243146 Change subject: otrs: scheduler is forking, set Type accordingly .. otrs: scheduler is forking, set Type accordingly Set systemd unit type to forking since that the OTRS scheduler's model Change-Id: I006c6d2ebd57702de02dab0ce0f99b7ff72c9560 --- M modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/46/243146/1 diff --git a/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb b/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb index ed2fba1..6592627 100644 --- a/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb +++ b/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb @@ -9,6 +9,7 @@ Restart=always RestartSec=2s TimeoutStopSec=60 +Type=forking ExecStart=/opt/otrs/bin/otrs.Scheduler.pl -a start ExecStop=/opt/otrs/bin/otrs.Scheduler.pl -a stop -- To view, visit https://gerrit.wikimedia.org/r/243146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I006c6d2ebd57702de02dab0ce0f99b7ff72c9560 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] Add tests - change (mediawiki...TwnMainPage)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/243159 Change subject: Add tests .. Add tests Fix all issues so tests pass. Change-Id: Ifa53fe57532fcb8d58819900916b613ae20baa91 --- A .gitignore A Gruntfile.js A composer.json A package.json A phpcs.xml M specials/SpecialTwnMainPage.php 6 files changed, 61 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/59/243159/1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..854a2d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*~ +*.kate-swp +.*.swp +node_modules/ +/composer.lock +/vendor/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..9c56558 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/composer.json b/composer.json new file mode 100644 index 000..4365e8a --- /dev/null +++ b/composer.json @@ -0,0 +1,12 @@ +{ + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.9", + "mediawiki/mediawiki-codesniffer": "0.4.0" + }, + "scripts": { + "test": [ + "parallel-lint . --exclude vendor", + "phpcs -p -s" + ] + } +} diff --git a/package.json b/package.json new file mode 100644 index 000..76e8a82 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "private": true, + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.2.2", +"grunt-jsonlint": "1.0.4" + } +} diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 000..d81a292 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,8 @@ + + + + . + + + vendor + diff --git a/specials/SpecialTwnMainPage.php b/specials/SpecialTwnMainPage.php index f18d0c6..bf92300 100644 --- a/specials/SpecialTwnMainPage.php +++ b/specials/SpecialTwnMainPage.php @@ -39,7 +39,7 @@ array( 'name' => 'twnmp-s-projects', 'stats' => $stats['projects'], - 'url' => Title::makeTitle( NS_CATEGORY, 'Supported projects')->getLocalUrl(), + 'url' => Title::makeTitle( NS_CATEGORY, 'Supported projects' )->getLocalUrl(), ), array( 'name' => 'twnmp-s-translators', @@ -58,10 +58,11 @@ array( 'name' => 'twnmp-s-languages', 'stats' => $stats['languages'], - 'url' => SpecialPage::getTitleFor( 'SupportedLanguages' )->getLocalUrl(), + 'url' => SpecialPage::getTitleFor( 'SupportedLanguages' )->getLocalUrl(), ), ), ); + return $data; } @@ -331,7 +332,6 @@ $view HTML; - } else { return <<$translate -- To view, visit https://gerrit.wikimedia.org/r/243159 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa53fe57532fcb8d58819900916b613ae20baa91 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add tests - change (mediawiki...UserOptionStats)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/243162 Change subject: Add tests .. Add tests Fix all issues so tests pass. Change-Id: I06cedc55c0d64950d94225cc12c1a57b961d06c0 --- M .gitignore A Gruntfile.js M SpecialUserOptionStats.php D UserOptionStats.i18n.php M UserOptionStats.php A composer.json M i18n/en.json A package.json A phpcs.xml 9 files changed, 81 insertions(+), 59 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UserOptionStats refs/changes/62/243162/1 diff --git a/.gitignore b/.gitignore index c798be9..854a2d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -.svn *~ *.kate-swp .*.swp -.idea +node_modules/ +/composer.lock +/vendor/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..9c56558 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/SpecialUserOptionStats.php b/SpecialUserOptionStats.php index 38b5de7..cc3b98a 100644 --- a/SpecialUserOptionStats.php +++ b/SpecialUserOptionStats.php @@ -9,7 +9,7 @@ * @license GPL-2.0+ */ class SpecialUserOptionStats extends SpecialPage { - function __construct() { + public function __construct() { parent::__construct( 'UserOptionStats' ); } @@ -21,6 +21,7 @@ if ( !class_exists( 'PHPlot' ) ) { $this->getOutput()->addWikiMsg( 'uos-warn' ); + return; } @@ -53,6 +54,7 @@ } $this->getOutput()->addWikiMsg( 'uos-choose-hidden', $lang->commaList( $hiddenopts ) ); } + return; } @@ -158,6 +160,7 @@ if ( isset( $wgHiddenPrefs ) && is_array( $wgHiddenPrefs ) ) { return $wgHiddenPrefs; } + return array(); } diff --git a/UserOptionStats.i18n.php b/UserOptionStats.i18n.php deleted file mode 100644 index a1136d7..000 --- a/UserOptionStats.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = array(); -if ( !function_exists( 'wfJsonI18nShim47e6f9b4f4e0d9b2' ) ) { - function wfJsonI18nShim47e6f9b4f4e0d9b2( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim47e6f9b4f4e0d9b2'; -} diff --git a/UserOptionStats.php b/UserOptionStats.php index 285bb92..a4c4c15 100644 --- a/UserOptionStats.php +++ b/UserOptionStats.php @@ -1,5 +1,7 @@ __FILE__, - 'name' => 'User Option Statistics', - 'version'=> '1.3.0', - 'author' => 'Niklas Laxström', + 'path' => __FILE__, + 'name' => 'User Option Statistics', + 'version' => '1.4.0', + 'author' => 'Niklas Laxström', 'descriptionmsg' => 'useroptionstats-desc', -
[MediaWiki-commits] [Gerrit] Remove Python 2.6 from the build matrix - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/243161 Change subject: Remove Python 2.6 from the build matrix .. Remove Python 2.6 from the build matrix Removing it before there are problems ensures it doesnt affect people forking the repo, and clarifies the `supported` status of Python 2.6 with regards to the official distributed version. Bug: T114464 Change-Id: I6768fc2cdfc5fbfd9d379b848c088ab2a07de110 --- M .travis.yml 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/61/243161/1 diff --git a/.travis.yml b/.travis.yml index 6135c7f..f54e947 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ - '2.7' - '3.3' - '3.4' - - '2.6' # OSX builds do not yet support Python os: @@ -22,7 +21,6 @@ install: - if [[ "$SITE_ONLY" == '1' ]]; then export USE_NOSE=1; fi - - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2==0.8.0; fi - pip install six - export GITHUB_USER=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 1` - mkdir ~/.python-eggs @@ -91,7 +89,7 @@ env: LANGUAGE=zh FAMILY=wikisource SITE_ONLY=1 EXTERNALS_HTTPLIB2=1 - python: '3.4' env: LANGUAGE=test FAMILY=wikidata SITE_ONLY=1 -- python: '2.6' +- python: '2.7' env: LANGUAGE=wikidata FAMILY=wikidata SITE_ONLY=1 notifications: -- To view, visit https://gerrit.wikimedia.org/r/243161 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6768fc2cdfc5fbfd9d379b848c088ab2a07de110 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John Vandenberg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [SmashPig] add composer backed test suite - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/243174 Change subject: [SmashPig] add composer backed test suite .. [SmashPig] add composer backed test suite Drop phplint, not needed since the repo has the parallel linter. Bug: T104264 Change-Id: I38d0b6cbb4fce8bd2b4ef20a2bb8f24b0124b030 --- M zuul/layout.yaml 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/74/243174/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index cc190b3..f07d5f8 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2829,13 +2829,12 @@ - tox-jessie - name: wikimedia/fundraising/SmashPig -check-voter: - - phplint +test: + - php-composer-test gate-and-submit: - - phplint + - php-composer-test experimental: - tox-jessie - - php-composer-test - name: wikimedia/iegreview template: -- To view, visit https://gerrit.wikimedia.org/r/243174 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38d0b6cbb4fce8bd2b4ef20a2bb8f24b0124b030 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] puppet-lint: Turn on --no-puppet_url_without_modules-check - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/243177 Change subject: puppet-lint: Turn on --no-puppet_url_without_modules-check .. puppet-lint: Turn on --no-puppet_url_without_modules-check 90% of the remaining warnings are this one. Change-Id: Ibefd3c89007e5646555f1d6acffa56a11e9b3e17 --- M .puppet-lint.rc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/77/243177/1 diff --git a/.puppet-lint.rc b/.puppet-lint.rc index b4a99f8..38c888f 100644 --- a/.puppet-lint.rc +++ b/.puppet-lint.rc @@ -16,6 +16,7 @@ --no-ensure_first_param-check --no-unquoted_resource_title-check --no-arrow_alignment-check +--no-puppet_url_without_modules-check # We dont have much documentation yet: --no-documentation-check -- To view, visit https://gerrit.wikimedia.org/r/243177 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibefd3c89007e5646555f1d6acffa56a11e9b3e17 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Job for apps/android/java-mwapi - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/243181 Change subject: Job for apps/android/java-mwapi .. Job for apps/android/java-mwapi Lets run `./gradlew clean checkstyle build`. Abstract checkstyle publisher to a jjb macro 'gradle-reports-checkstyle' Create job apps-android-java-mwapi Archive build/reports and test-results Interpret Junit test-results Adjust Zuul messages reported back to Gerrit so they point to the build page instead of the console. Match behavior of others apps-* repos. Bug: T108735 Change-Id: I1532daceb85a30cb26ba903fea1c22f64f32b3ec --- M jjb/mobile.yaml M zuul/layout.yaml 2 files changed, 47 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/81/243181/1 diff --git a/jjb/mobile.yaml b/jjb/mobile.yaml index afe8cf2..61f134d 100644 --- a/jjb/mobile.yaml +++ b/jjb/mobile.yaml @@ -6,6 +6,18 @@ - '{name}-jslint' - '{name}-phplint' +- publisher: +name: gradle-reports-checkstyle +publishers: + - checkstyle: + pattern: "**/build/reports/checkstyle/checkstyle.xml" + can-run-on-failed: true + healthy: 0 + unhealthy: 100 + thresholds: + failed: + total-all: 1 + - job-template: name: 'apps-android-wikipedia-test' node: contintLabsSlave && AndroidEmulator @@ -46,14 +58,7 @@ - archive: # Capture generated .apk, ProGuard mappings, checkstyle.xml, and test results artifacts: '**/build/outputs/**,**/build/reports/**,**/test-results/**/*.xml,**/androidTest-results/**/*.xml' - - checkstyle: - pattern: "**/build/reports/checkstyle/checkstyle.xml" - can-run-on-failed: true - healthy: 0 - unhealthy: 100 - thresholds: - failed: - total-all: 1 + - gradle-reports-checkstyle - junit: results: '**/test-results/**/*.xml,**/androidTest-results/**/*.xml' @@ -122,6 +127,30 @@ - 'apps-android-wikipedia-publish' - 'apps-android-wikipedia-lint' +- job-template: +name: 'apps-android-java-mwapi' +node: contintLabsSlave && UbuntuTrusty +defaults: use-remoteonly-zuul +concurrent: true +properties: + - throttle-one-per-node +triggers: + - zuul +builders: + - shell: | + ./gradlew clean checkstyle build +publishers: + - archive: + artifacts: '**/build/reports/**,**/test-results/**/*.xml' + - gradle-reports-checkstyle + - junit: + results: '**/test-results/**/*.xml' + +- project: +name: 'apps-android-java-mwapi' +jobs: + - 'apps-android-java-mwapi' + # Build the mighty Commons application for Android Platforms # Yuvi rocks (bug 20281). - job: diff --git a/zuul/layout.yaml b/zuul/layout.yaml index cc190b3..8db2dd0 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -1554,6 +1554,10 @@ failure-pattern: 'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/artifact/app/build/outputs/lint-results-alphaDebug.html' success-pattern: 'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/artifact/app/build/outputs/lint-results-alphaDebug.html' + - name: apps-android-java-mwapi +failure-pattern: 'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/' +success-pattern: 'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/' + - name: beta-mediawiki-config-update-eqiad branch: ^master$ success-message: 'SUCCESS Change has been deployed on the EQIAD beta cluster' @@ -2126,6 +2130,12 @@ gate-and-submit: - apps-android-commons-build + - name: apps/android/java-mwapi +test: + - apps-android-java-mwapi +gate-and-submit: + - apps-android-java-mwapi + - name: apps/android/wikipedia test: - apps-jslint -- To view, visit https://gerrit.wikimedia.org/r/243181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1532daceb85a30cb26ba903fea1c22f64f32b3ec Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] otrs: disable the scheduler watchdog - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/243182 Change subject: otrs: disable the scheduler watchdog .. otrs: disable the scheduler watchdog OTRS normally ships a watchdog scheduler cron entry that watches the scheduler and restarts it if it dies. That mode unfortunately is not compatible with systemd. Purge the scheduler and rely on systemd to watch over the scheduler. Also pass --force to both start and stop to avoid the PID handling issues that may arise with the scheduler and which are not possible to happen under systemd Change-Id: Iae3b8a6288856ba789756be04e4555608050afe8 --- M modules/otrs/manifests/init.pp M modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb 2 files changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/82/243182/1 diff --git a/modules/otrs/manifests/init.pp b/modules/otrs/manifests/init.pp index 1ca2b1d..a8d4498 100644 --- a/modules/otrs/manifests/init.pp +++ b/modules/otrs/manifests/init.pp @@ -148,8 +148,12 @@ hasrestart => false, } } +# OTRS normally ships a watchdog scheduler cron entry that watches the +# scheduler and restarts it if it dies. That mode unfortunately is not +# compatible with systemd. Purge the scheduler and rely on systemd to +# watch over the scheduler file { '/etc/cron.d/otrs-scheduler': -ensure => 'file', +ensure => absent, owner => 'root', group => 'root', mode => '0444', diff --git a/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb b/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb index 6592627..c26304e 100644 --- a/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb +++ b/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb @@ -10,8 +10,8 @@ RestartSec=2s TimeoutStopSec=60 Type=forking -ExecStart=/opt/otrs/bin/otrs.Scheduler.pl -a start -ExecStop=/opt/otrs/bin/otrs.Scheduler.pl -a stop +ExecStart=/opt/otrs/bin/otrs.Scheduler.pl -a start --force +ExecStop=/opt/otrs/bin/otrs.Scheduler.pl -a stop --force [Install] WantedBy=multi-user.target -- To view, visit https://gerrit.wikimedia.org/r/243182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae3b8a6288856ba789756be04e4555608050afe8 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] Add message docs for recent updates - change (mediawiki...NumerAlpha)
jenkins-bot has submitted this change and it was merged. Change subject: Add message docs for recent updates .. Add message docs for recent updates Change-Id: I7b41af194facd488af02bac0217a74da0cf2164b --- M i18n/qqq.json 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Raimond Spekking: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/qqq.json b/i18n/qqq.json index 7cbcb58..90a1a73 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -16,5 +16,11 @@ "ext-numeralpha-list-pad-length": "Parser function parameter name for \"pad length\"", "ext-numeralpha-list-pad-char": "Parser function parameter name for \"pad character\"", "ext-numeralpha-list-prefix": "Parser function parameter name for \"prefix\"\n{{Identical|Prefix}}", - "ext-numeralpha-list-suffix": "Parser function parameter name for \"suffix\"" + "ext-numeralpha-list-suffix": "Parser function parameter name for \"suffix\"", + "ext-numeralpha-list-level-label": "Parser function parameter name for \"level\", which determines what sub-list is desired. A level of 1 indicates that it's the top-level list where a level of 2 may be like an indented-once sub-list.", + "ext-numeralpha-list-level-prefix-label": "Parser function parameter name for \"level prefix\", which determines what characters may be prefixed before each level. So a level prefix of \"*\" (no quotes) would make a level 1 item be prefixed by \"*\" (no quotes) and a level 3 item be prefixed by \"***\"", + "ext-numeralpha-list-format-label": "Parser function parameter name for \"format\", which determines if the output of the list is in \"standard\" or \"outline\" format. A level 3 item in standard format may just be displayed as \"7\", but in \"outline\" format that same item may be displayed as \"3.2.7\"", + "ext-numeralpha-list-format-standard": "Word used to indicate that the format parameter is set to the standard format", + "ext-numeralpha-list-format-outline": "Word used to indicate that the format parameter is set to the outline format", + "ext-numeralpha-list-format-outline-glue": "Default characters to put between numbers in outline format. English default is a period, which causes output like 1.6.3 or 2.5.7" } -- To view, visit https://gerrit.wikimedia.org/r/243157 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b41af194facd488af02bac0217a74da0cf2164b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/NumerAlpha Gerrit-Branch: master Gerrit-Owner: Jamesmontalvo3Gerrit-Reviewer: Jamesmontalvo3 Gerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: rearrange args to cleanup_snapshots - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/243178 Change subject: labstore: rearrange args to cleanup_snapshots .. labstore: rearrange args to cleanup_snapshots Previously we had an optional arg before a required one, which doesn't make a ton of sense. Only called in one place which is unaffected by this change. Change-Id: I6c39427c5d868ba47bb1563915d10649bda7ed68 --- M modules/labstore/manifests/fileserver/cleanup_snapshots.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/78/243178/1 diff --git a/modules/labstore/manifests/fileserver/cleanup_snapshots.pp b/modules/labstore/manifests/fileserver/cleanup_snapshots.pp index 175cfbe..65aea67 100644 --- a/modules/labstore/manifests/fileserver/cleanup_snapshots.pp +++ b/modules/labstore/manifests/fileserver/cleanup_snapshots.pp @@ -3,12 +3,12 @@ # volumes created by replication # # Parameters: -# volume_group = volume group to clean # keep_free= free space to keep (in terabytes) +# volume_group = volume group to clean # define labstore::fileserver::cleanup_snapshots( -$volume_group = $title, $keep_free, +$volume_group = $title, ) { base::service_unit { "cleanup-snapshots-${volume_group}": template_name => 'cleanup-snapshots', -- To view, visit https://gerrit.wikimedia.org/r/243178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c39427c5d868ba47bb1563915d10649bda7ed68 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: rearrange args to cleanup_snapshots - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: labstore: rearrange args to cleanup_snapshots .. labstore: rearrange args to cleanup_snapshots Previously we had an optional arg before a required one, which doesn't make a ton of sense. Only called in one place which is unaffected by this change. Change-Id: I6c39427c5d868ba47bb1563915d10649bda7ed68 --- M modules/labstore/manifests/fileserver/cleanup_snapshots.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/labstore/manifests/fileserver/cleanup_snapshots.pp b/modules/labstore/manifests/fileserver/cleanup_snapshots.pp index 175cfbe..65aea67 100644 --- a/modules/labstore/manifests/fileserver/cleanup_snapshots.pp +++ b/modules/labstore/manifests/fileserver/cleanup_snapshots.pp @@ -3,12 +3,12 @@ # volumes created by replication # # Parameters: -# volume_group = volume group to clean # keep_free= free space to keep (in terabytes) +# volume_group = volume group to clean # define labstore::fileserver::cleanup_snapshots( -$volume_group = $title, $keep_free, +$volume_group = $title, ) { base::service_unit { "cleanup-snapshots-${volume_group}": template_name => 'cleanup-snapshots', -- To view, visit https://gerrit.wikimedia.org/r/243178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c39427c5d868ba47bb1563915d10649bda7ed68 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Persian Wikipedia configuration in wikipedia_family.py - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Persian Wikipedia configuration in wikipedia_family.py .. Persian Wikipedia configuration in wikipedia_family.py - One of category redirect templates was wrong - /doc is translated in lots of cases Change-Id: I1cdf01086717771792e6023f6d3fc7e8aa4b9cdc (cherry picked from commit 056c53f42973cee5880bf744090628c925b90334) --- M pywikibot/families/wikipedia_family.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/families/wikipedia_family.py b/pywikibot/families/wikipedia_family.py index bd13e9d..3f958b3 100644 --- a/pywikibot/families/wikipedia_family.py +++ b/pywikibot/families/wikipedia_family.py @@ -101,8 +101,7 @@ 'es': (u'Categoría redirigida',), 'eu': (u'Kategoria redirect',), 'fa': (u'رده بهتر', - u'انتقال رده', - u'فیلمهای امریکایی',), + u'انتقال رده',), 'fr': (u'Redirection de catégorie',), 'gv': (u'Aastiurey ronney',), 'hi': (u'श्रेणीअनुप्रेषित', @@ -548,7 +547,7 @@ # TODO: Remove comments for appropriate pages self.doc_subpages = { '_default': ((u'/doc', ), - ['ar', 'bn', 'cs', 'da', 'en', 'es', 'fa', + ['ar', 'bn', 'cs', 'da', 'en', 'es', 'hu', 'id', 'ilo', 'ja', 'ms', 'ms', 'pt', 'ro', 'ru', 'simple', 'vi', 'zh'] ), @@ -556,6 +555,7 @@ 'de': (u'Doku', u'/Meta'), 'dsb': (u'/Dokumentacija', ), 'eu': (u'txantiloi dokumentazioa', u'/dok'), +'fa': (u'/doc', u'/توضیحات'), # fi: no idea how to handle this type of subpage at :Metasivu: 'fi': ((), ), 'fr': (u'/documentation', ), -- To view, visit https://gerrit.wikimedia.org/r/243111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1cdf01086717771792e6023f6d3fc7e8aa4b9cdc Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John VandenbergGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] interwiki: do not automatically log in - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: interwiki: do not automatically log in .. interwiki: do not automatically log in For interwiki.py, self.site is not necessarily the site we will write to, and we might want to write to different sites. Interwiki.py uses the configured usernames to determine which sites we want to write to, rather than -family: and -code:. Bug: T108802 Change-Id: Iaedd4ae371ed494c9e448cbe76eb321e7633128f (cherry picked from commit 5ce72a6d1948aaa965c3e179d61cf6b17ff3cebd) --- M scripts/interwiki.py 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/interwiki.py b/scripts/interwiki.py index fa26860..f85bd3d 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -2587,7 +2587,6 @@ hintlessPageGen = pagegenerators.CombinedPageGenerator( [hintlessPageGen, gen2]) -site.login() bot = InterwikiBot() if not hintlessPageGen: -- To view, visit https://gerrit.wikimedia.org/r/243040 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaedd4ae371ed494c9e448cbe76eb321e7633128f Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John VandenbergGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change special page title to be more human-friendly by default - change (mediawiki...MultiUpload)
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/243165 Change subject: Change special page title to be more human-friendly by default .. Change special page title to be more human-friendly by default Also added Finnish (fi) special page alias Change-Id: I7d26b62ee9f484cef4898b99962fa446998c0618 --- M MultiUpload.alias.php M i18n/en.json M i18n/fi.json 3 files changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultiUpload refs/changes/65/243165/1 diff --git a/MultiUpload.alias.php b/MultiUpload.alias.php index 6296ba5..f2cb346 100644 --- a/MultiUpload.alias.php +++ b/MultiUpload.alias.php @@ -29,4 +29,9 @@ /** English */ $specialPageAliases['en'] = array( 'MultiUpload' => array( 'MultiUpload', 'MultipleUpload' ), +); + +/** Finnish (suomi) */ +$specialPageAliases['fi'] = array( + 'MultiUpload' => array( 'Tallenna useampia tiedostoja' ), ); \ No newline at end of file diff --git a/i18n/en.json b/i18n/en.json index 9e3d5fd..0eebd4d 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,7 +4,7 @@ "Lee Worden" ] }, - "multiupload": "MultiUpload", + "multiupload": "Upload multiple files", "multiupload-desc": "[[Special:MultiUpload|Special page to upload multiple files at once]]", "multiupload-text": "Use the form below to upload multiple files.\nTo view or search previously uploaded files go to the [[Special:FileList|list of uploaded files]], (re)uploads are also logged in the [[Special:Log/upload|upload log]], deletions in the [[Special:Log/delete|deletion log]].\n\nTo include a file in a page, use a link in one of the following forms:\n* [[{{ns:file}}:File.jpg]] to use the full version of the file\n* [[{{ns:file}}:File.png|200px|thumb|left|alt text]] to use a 200 pixel wide rendition in a box in the left margin with \"alt text\" as description\n* [[{{ns:media}}:File.ogg]] for directly linking to the file without displaying the file.\n\nOnce you select a file, this page will expand, allowing you to select more files before uploading.\n\nTo unpack a .zip, .tar, .tar.gz, or .tgz file and upload the files contained within it, select the package file and then use the \"{{int:multiupload-unpack-button}}\" button that appears.", "multipleupload": "Upload files", diff --git a/i18n/fi.json b/i18n/fi.json index b1d17c8..eed0de9 100644 --- a/i18n/fi.json +++ b/i18n/fi.json @@ -4,7 +4,7 @@ "Jack Phoenix" ] }, - "multiupload": "MultiUpload", + "multiupload": "Tallenna useampia tiedostoja", "multiupload-desc": "[[Special:MultiUpload|Toimintosivu useampien tiedostojen tallentamiseen kerralla]]", "multiupload-text": "Käytä allaolevaa lomaketta useamman tiedoston tallentamiseen kerralla.\nVoit katsella luetteloa aiemmin tallennetuista tiedostoista sivulla [[Special:FileList|tiedostoluettelo]]. Kaikki tallennukset kirjataan myös [[Special:Log/upload|tallennuslokiin]] ja tiedostojen poistot [[Special:Log/delete|poistolokiin]].\n\nJotta saat tiedoston näkymään sivulla, käytä jotakin seuraavista muotoiluista linkkinä siihen:\n* [[{{ns:file}}:Tiedosto.jpg]] käyttääksesi tiedoston kokonaista versiota\n* [[{{ns:file}}:Tiedosto.png|200px|thumb|left|teksti tähän]] käyttääksesi tiedostoa sovitettuna 200 kuvapistettä leveään laatikkoon kuvatekstillä \"teksti tähän\"\n* [[{{ns:media}}:Tiedosto.ogg]] halutessasi suoran linkin tiedostoon ilman että tiedostoa näytetään.\n\nValittuasi tiedoston tämä sivu laajenee ja sallii sinun valita useampia tiedostoja ladattavaksi.\n\nPurkaaksesi tiedoston, jonka tiedostotyyppi on .zip, .tar, .tar.gz, tai .tgz ja ladataksesi sen sisältämät tiedostot, valitse pakettitiedosto ja käytä ilmaantuvaa \"{{int:multiupload-unpack-button}}\" -painiketta.", "multipleupload": "Tallenna tiedostoja", -- To view, visit https://gerrit.wikimedia.org/r/243165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d26b62ee9f484cef4898b99962fa446998c0618 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultiUpload Gerrit-Branch: master Gerrit-Owner: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Pass staging state through Document#commit to ve.dm.Node upd... - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243166 Change subject: Pass staging state through Document#commit to ve.dm.Node update event .. Pass staging state through Document#commit to ve.dm.Node update event This allows GeneratedContentNodes to know if the update was a staged update, and choose whether to render the error in the view. Staged updates only cause the node to change the colour of the focus highlight, whereas full updates will show the full error in the view. This makes generatedContentsFirstRender redundant as we call update with staged=false on initialize. Bug: T114480 Change-Id: I8ebb26d4bcd69e611c5bc2527efb335098938172 --- M src/ce/nodes/ve.ce.GeneratedContentNode.js M src/dm/ve.dm.Document.js M src/dm/ve.dm.DocumentSynchronizer.js M src/dm/ve.dm.Node.js M src/dm/ve.dm.Surface.js M src/dm/ve.dm.TransactionProcessor.js 6 files changed, 30 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/66/243166/1 diff --git a/src/ce/nodes/ve.ce.GeneratedContentNode.js b/src/ce/nodes/ve.ce.GeneratedContentNode.js index 3bb5cb3..42eedc2 100644 --- a/src/ce/nodes/ve.ce.GeneratedContentNode.js +++ b/src/ce/nodes/ve.ce.GeneratedContentNode.js @@ -16,7 +16,6 @@ // Properties this.generatingPromise = null; this.generatedContentsValid = false; - this.generatedContentsFirstRender = true; // Events this.model.connect( this, { update: 'onGeneratedContentNodeUpdate' } ); @@ -79,9 +78,11 @@ /** * Handler for the update event + * + * @param {boolean} staged Update happened in staging mode */ -ve.ce.GeneratedContentNode.prototype.onGeneratedContentNodeUpdate = function () { - this.update(); +ve.ce.GeneratedContentNode.prototype.onGeneratedContentNodeUpdate = function ( staged ) { + this.update( undefined, staged ); }; /** @@ -136,19 +137,17 @@ * Rerender the contents of this node. * * @param {Object|string|Array} generatedContents Generated contents, in the default case an HTMLElement array + * @param {boolean} [staged] Update happened in staging mode * @fires setup * @fires teardown */ -ve.ce.GeneratedContentNode.prototype.render = function ( generatedContents ) { +ve.ce.GeneratedContentNode.prototype.render = function ( generatedContents, staged ) { var $newElements; if ( this.live ) { this.emit( 'teardown' ); } $newElements = $( this.getRenderedDomElements( ve.copyDomElements( generatedContents ) ) ); - // Render if this is the first time rendering, regardless of whether there is an error; otherwise only - // render if there is no error - if ( this.generatedContentsFirstRender || this.validateGeneratedContents( $( generatedContents ) ) ) { - this.generatedContentsFirstRender = false; + if ( !staged || this.validateGeneratedContents( $( generatedContents ) ) ) { this.generatedContentsValid = true; if ( !this.$element[ 0 ].parentNode ) { // this.$element hasn't been attached yet, so just overwrite it @@ -206,14 +205,15 @@ * model and config data has been rendered before, the cached rendering in the store will be used. * * @param {Object} [config] Optional additional data to pass to generateContents() + * @param {boolean} [staged] Update happened in staging mode */ -ve.ce.GeneratedContentNode.prototype.update = function ( config ) { +ve.ce.GeneratedContentNode.prototype.update = function ( config, staged ) { var store = this.model.doc.getStore(), index = store.indexOfHash( OO.getHash( [ this.model, config ] ) ); if ( index !== null ) { - this.render( store.value( index ) ); + this.render( store.value( index ), staged ); } else { - this.forceUpdate( config ); + this.forceUpdate( config, staged ); } }; @@ -221,8 +221,9 @@ * Force the contents to be updated. Like update(), but bypasses the store. * * @param {Object} [config] Optional additional data to pass to generateContents() + * @param {boolean} [staged] Update happened in staging mode */ -ve.ce.GeneratedContentNode.prototype.forceUpdate = function ( config ) { +ve.ce.GeneratedContentNode.prototype.forceUpdate = function ( config, staged ) { var promise, node = this; if ( this.generatingPromise ) { @@ -239,7 +240,7 @@ // If this promise is no longer the currently pending one, ignore it completely .done( function ( generatedContents ) { if ( node.generatingPromise === promise ) { - node.doneGenerating( generatedContents, config ); + node.doneGenerating( generatedContents, config, staged );
[MediaWiki-commits] [Gerrit] Update tests for Translate - change (integration/config)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/243169 Change subject: Update tests for Translate .. Update tests for Translate Requires: * Change-Id: I934a9545c275c6a16fab83c52d077dd5b62a7ada Change-Id: I29dd0e1d34233dd720d960140f3815348d914da7 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/69/243169/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 00b1579..a0337f9 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -7223,11 +7223,9 @@ - name: mediawiki/extensions/Translate template: + - name: composer-test - name: extension-rubylint - - name: jshint - - name: jsonlint - name: extension-unittests - - name: extension-phpcs experimental: - php-composer-test -- To view, visit https://gerrit.wikimedia.org/r/243169 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29dd0e1d34233dd720d960140f3815348d914da7 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Siebrand___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: ec2ff26..d63dce1 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: ec2ff26..d63dce1 .. Syncronize VisualEditor: ec2ff26..d63dce1 Change-Id: I0594be2d110cd5d5a062a9627d4427c5fd35c940 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index ec2ff26..d63dce1 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit ec2ff26563f8f801a114910eb5d67fbf29a83273 +Subproject commit d63dce138dcded61bec0bdb6bb23d79c26c7c867 -- To view, visit https://gerrit.wikimedia.org/r/243171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0594be2d110cd5d5a062a9627d4427c5fd35c940 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-syncGerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [IMPROV] Use newer version of unicodecsv again - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [IMPROV] Use newer version of unicodecsv again .. [IMPROV] Use newer version of unicodecsv again Version 0.14.0 of `unicodecsv` is not compatible with Python 2.6 so that with f4ebbf92 it installed 0.13.0 (the version before that) on Python 2.6 systems. But with 0.14.1 the compatibility was restored so that we only need to skip 0.14.0 installs. Bug: T113222 Change-Id: I46ee49a95ea0491130f29d21bbc59e1610c72adf --- M requirements.txt M setup.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/requirements.txt b/requirements.txt index c7db758..827c7e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,7 +45,7 @@ git+https://github.com/nlhepler/pydot#egg=pydot-1.0.29 # wikistats.py and scripts -unicodecsv<=0.13 ; python_version < '2.7' +unicodecsv!=0.14.0 ; python_version < '2.7' unicodecsv ; python_version < '3' and python_version >= '2.7' # cosmetic_changes and scripts/isbn diff --git a/setup.py b/setup.py index 2a2d63f..65d1b13 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ # the irc module has no Python 2.6 support since 10.0 irc_dep = 'irc==8.9' if sys.version_info < (2, 7) else 'irc' -csv_dep = 'unicodecsv<=0.13' if PYTHON_VERSION < (2, 7) else 'unicodecsv' +csv_dep = 'unicodecsv!=0.14.0' if PYTHON_VERSION < (2, 7) else 'unicodecsv' extra_deps = { # Core library dependencies -- To view, visit https://gerrit.wikimedia.org/r/240574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46ee49a95ea0491130f29d21bbc59e1610c72adf Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZiseGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cassandra: dequote some booleans. - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Cassandra: dequote some booleans. .. Cassandra: dequote some booleans. Note that in e.g. https://svn.apache.org/repos/asf/cassandra/trunk/conf/cassandra.yaml booleans are left naked. Erb should handle that just fine. Bug: T113783 Change-Id: I7c9363a9546c63b5204998a876a7f117798903f3 --- M modules/cassandra/manifests/init.pp 1 file changed, 5 insertions(+), 10 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved Filippo Giunchedi: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/cassandra/manifests/init.pp b/modules/cassandra/manifests/init.pp index 2840d30..968f734 100644 --- a/modules/cassandra/manifests/init.pp +++ b/modules/cassandra/manifests/init.pp @@ -234,15 +234,15 @@ $storage_port = 7000, $listen_address = $::ipaddress, $broadcast_address= undef, -$start_native_transport = 'true', +$start_native_transport = true, $native_transport_port= 9042, -$start_rpc= 'true', +$start_rpc= true, $rpc_address = $::ipaddress, $rpc_port = 9160, $rpc_server_type = 'sync', -$incremental_backups = 'false', -$snapshot_before_compaction = 'false', -$auto_snapshot= 'true', +$incremental_backups = false, +$snapshot_before_compaction = false, +$auto_snapshot= true, $compaction_throughput_mb_per_sec = 16, $concurrent_compactors= 1, $endpoint_snitch = 'GossipingPropertyFileSnitch', @@ -276,12 +276,7 @@ validate_string($initial_token) validate_string($endpoint_snitch) -validate_re($start_rpc, '^(true|false)$') -validate_re($start_native_transport, '^(true|false)$') validate_re($rpc_server_type, '^(hsha|sync|async)$') -validate_re($incremental_backups, '^(true|false)$') -validate_re($snapshot_before_compaction, '^(true|false)$') -validate_re($auto_snapshot, '^(true|false)$') # lint:ignore:only_variable_string validate_re("${concurrent_reads}", '^[0-9]+$') validate_re("${concurrent_writes}", '^[0-9]+$') -- To view, visit https://gerrit.wikimedia.org/r/241238 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c9363a9546c63b5204998a876a7f117798903f3 Gerrit-PatchSet: 7 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added dummy user/password passwords::mysql::labsdb - change (labs/private)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/243184 Change subject: Added dummy user/password passwords::mysql::labsdb .. Added dummy user/password passwords::mysql::labsdb Change-Id: Ibca03123767062ecd7f70da63a0b262b8490a45e --- M modules/passwords/manifests/init.pp 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/private refs/changes/84/243184/1 diff --git a/modules/passwords/manifests/init.pp b/modules/passwords/manifests/init.pp index 29d3ffb..14680ca 100644 --- a/modules/passwords/manifests/init.pp +++ b/modules/passwords/manifests/init.pp @@ -244,6 +244,11 @@ $pass = 'pass' } +class passwords::mysql::labsdb { +$user = 'user' +$password = 'pass' +} + class passwords::mysql::iegreview { $admin_user = 'longcat' $app_user = 'maru' -- To view, visit https://gerrit.wikimedia.org/r/243184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibca03123767062ecd7f70da63a0b262b8490a45e Gerrit-PatchSet: 1 Gerrit-Project: labs/private Gerrit-Branch: master Gerrit-Owner: Andrew Bogott___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly identify qualifier from JSON - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Correctly identify qualifier from JSON .. Correctly identify qualifier from JSON Identifies any qualifier or reference if initialised through fromJSON() on parent claim Bug: T113212 Change-Id: I7255cf50b21bac19f44f152ddd4a189825dd7eab (cherry picked from commit eb9d3a80b84c237740152b7ffd1957aacea6fb26) --- M pywikibot/page.py 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/page.py b/pywikibot/page.py index 3f4f1be..33bbace 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -3918,7 +3918,7 @@ """ A Claim on a Wikibase entity. -Claims are standard claims as well as references. +Claims are standard claims as well as references and qualifiers. """ TARGET_CONVERTER = { @@ -3975,10 +3975,7 @@ if 'id' in data: claim.snak = data['id'] elif 'hash' in data: -claim.isReference = True claim.hash = data['hash'] -else: -claim.isQualifier = True claim.snaktype = data['mainsnak']['snaktype'] if claim.getSnakType() == 'value': value = data['mainsnak']['datavalue']['value'] @@ -4020,6 +4017,7 @@ for claimsnak in data['snaks'][prop]: claim = cls.fromJSON(site, {'mainsnak': claimsnak, 'hash': data['hash']}) +claim.isReference = True if claim.getID() not in source: source[claim.getID()] = [] source[claim.getID()].append(claim) @@ -4036,8 +4034,10 @@ @return: Claim """ -return cls.fromJSON(site, {'mainsnak': data, - 'hash': data['hash']}) +claim = cls.fromJSON(site, {'mainsnak': data, +'hash': data['hash']}) +claim.isQualifier = True +return claim def toJSON(self): data = { -- To view, visit https://gerrit.wikimedia.org/r/243043 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7255cf50b21bac19f44f152ddd4a189825dd7eab Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John VandenbergGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Lokal Profil Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] MWExtensionNode: Fix selector to find dimension-less images - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243168 Change subject: MWExtensionNode: Fix selector to find dimension-less images .. MWExtensionNode: Fix selector to find dimension-less images Change-Id: Idf219636f9b2b58e30b1a155c052ada4c60e6ec9 --- M modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/68/243168/1 diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js index bac7d55..1f143ce 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js @@ -98,7 +98,9 @@ /** */ ve.ce.MWExtensionNode.prototype.afterRender = function () { var node = this, - $images = this.$element.find( 'img:not([width]),img:not([height])' ); + $images = this.$element + .find( 'img:not([width]),img:not([height])' ) + .addBack( 'img:not([width]),img:not([height])' ); // Mixin method ve.ce.GeneratedContentNode.prototype.afterRender.call( this ); -- To view, visit https://gerrit.wikimedia.org/r/243168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf219636f9b2b58e30b1a155c052ada4c60e6ec9 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] [SmashPig] add php-composer-test to experimental - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/243172 Change subject: [SmashPig] add php-composer-test to experimental .. [SmashPig] add php-composer-test to experimental Will let us run composer test from Gerrit. Bug: T104264 Change-Id: I30c473ae287474e72b18d60a3004a9e93879e888 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/72/243172/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 00b1579..cc190b3 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2835,6 +2835,7 @@ - phplint experimental: - tox-jessie + - php-composer-test - name: wikimedia/iegreview template: -- To view, visit https://gerrit.wikimedia.org/r/243172 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30c473ae287474e72b18d60a3004a9e93879e888 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not use extension.json for MW 1.25.1 or 1.25.2, due to bu... - change (mediawiki...Cargo)
Yaron Koren has submitted this change and it was merged. Change subject: Do not use extension.json for MW 1.25.1 or 1.25.2, due to bug in those .. Do not use extension.json for MW 1.25.1 or 1.25.2, due to bug in those Change-Id: Icfba665a8999f2cd2bc04dc11a33b86db0a713d2 --- M Cargo.php 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Yaron Koren: Checked; Looks good to me, approved diff --git a/Cargo.php b/Cargo.php index 6f7ff2b..be49190 100644 --- a/Cargo.php +++ b/Cargo.php @@ -11,7 +11,12 @@ // extensions to determine whether Cargo is installed. define( 'CARGO_VERSION', '0.10-alpha' ); -if ( function_exists( 'wfLoadExtension' ) ) { +// There's a bug in extension loading in versions 1.25.1 and 1.25.2 that +// makes it unusable for Cargo - don't load extensions unless we're at +// version 1.25.3 or higher. +// (See https://phabricator.wikimedia.org/T109243) +//if ( function_exists( 'wfLoadExtension' ) ) { +if ( version_compare( $wgVersion, '1.25.3', '>=' ) ) { wfLoadExtension( 'Cargo' ); // Keep i18n globals so mergeMessageFileList.php doesn't break $wgMessagesDirs['Cargo'] = __DIR__ . '/i18n'; -- To view, visit https://gerrit.wikimedia.org/r/243175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icfba665a8999f2cd2bc04dc11a33b86db0a713d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] puppet-lint: enable quoted_booleans-check - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: puppet-lint: enable quoted_booleans-check .. puppet-lint: enable quoted_booleans-check Because mixing quoted booleans and unquoted ones are a source of confusion and nasty errors. Bug: T113783 Change-Id: Ia783c5fc0c8314809065f0fcb2412e1b66f42f86 --- M .puppet-lint.rc 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/.puppet-lint.rc b/.puppet-lint.rc index 548eaf2..b4a99f8 100644 --- a/.puppet-lint.rc +++ b/.puppet-lint.rc @@ -17,9 +17,6 @@ --no-unquoted_resource_title-check --no-arrow_alignment-check -# "true" and "false" are everywhere. ---no-quoted_booleans-check - # We dont have much documentation yet: --no-documentation-check -- To view, visit https://gerrit.wikimedia.org/r/24 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia783c5fc0c8314809065f0fcb2412e1b66f42f86 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: HasharGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/limn-mobile-data to Nodepool and run all tox env - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: analytics/limn-mobile-data to Nodepool and run all tox env .. analytics/limn-mobile-data to Nodepool and run all tox env Source patch is https://gerrit.wikimedia.org/r/#/c/242966/ Change-Id: I9132e1d4a2b4bc48c17340be8a8b9f7cfb683f63 --- M zuul/layout.yaml 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index cc190b3..1dc8651 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2074,9 +2074,9 @@ - name: analytics/limn-mobile-data test: - - tox-flake8 + - tox-jessie gate-and-submit: - - tox-flake8 + - tox-jessie - name: analytics/limn-language-data test: -- To view, visit https://gerrit.wikimedia.org/r/242977 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9132e1d4a2b4bc48c17340be8a8b9f7cfb683f63 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Hashar Gerrit-Reviewer: Milimetric Gerrit-Reviewer: Nuria Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Omit includeredirects parameter for allpages generator - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Omit includeredirects parameter for allpages generator .. Omit includeredirects parameter for allpages generator - since includeredirects is listed in deprecated_args, it is never filed to the allpages parameter list. - rewrite the filterredir mapping for backward compatibility - assign includeredirects to filterredir in prefixindex method - update doc: parameter deprecation is trivially shown by the decorator. Change-Id: Iea7ea1b5a014025c80cec9e96c9ed2cc177e3244 (cherry picked from commit 187f51bb7d9b4a5083e436d0c7027ea441da4eed) --- M pywikibot/site.py 1 file changed, 8 insertions(+), 10 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/site.py b/pywikibot/site.py index 5e3a53f..519a9a3 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3425,15 +3425,13 @@ 'subcats': 0} return category._catinfo -@deprecated_args(throttle=None, limit="total", includeredirects="filterredir") +@deprecated_args(throttle=None, limit='total', + includeredirects='filterredir') def allpages(self, start="!", prefix="", namespace=0, filterredir=None, filterlanglinks=None, minsize=None, maxsize=None, protect_type=None, protect_level=None, reverse=False, - includeredirects=None, step=None, total=None, content=False): + step=None, total=None, content=False): """Iterate pages in a single namespace. - -Note: parameters includeRedirects and throttle are deprecated and -included only for backwards compatibility. @param start: Start at this title (page need not exist). @param prefix: Only yield pages starting with this string. @@ -3455,16 +3453,16 @@ level; can only be used if protect_type is specified @param reverse: if True, iterate in reverse Unicode lexigraphic order (default: iterate in forward order) -@param includeredirects: DEPRECATED, use filterredir instead @param content: if True, load the current content of each iterated page (default False) @raises KeyError: the namespace identifier was not resolved @raises TypeError: the namespace identifier has an inappropriate type such as bool, or an iterable with more than one namespace """ -if includeredirects is not None: -if includeredirects: -if includeredirects == "only": +# backward compatibility test +if filterredir not in (True, False, None): +if filterredir: +if filterredir == 'only': filterredir = True else: filterredir = None @@ -3504,7 +3502,7 @@ """ return self.allpages(prefix=prefix, namespace=namespace, - includeredirects=includeredirects) + filterredir=includeredirects) def alllinks(self, start="!", prefix="", namespace=0, unique=False, fromids=False, step=None, total=None): -- To view, visit https://gerrit.wikimedia.org/r/243115 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea7ea1b5a014025c80cec9e96c9ed2cc177e3244 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John VandenbergGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Experiment YAML aliases and template inheritance - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/243164 Change subject: Experiment YAML aliases and template inheritance .. Experiment YAML aliases and template inheritance The Jenkins jobs have been made generic to be triggered by any repository. A side effect is Zuul dependent pipeline (gate-and-submit) handles merging almost all of the projects in the same queue 'mediawiki'. As a result, a change unrelated to MediaWiki such as for integration/config ends up being queued behind mediawiki/core changes that takes a while to run. This experiment propose to split some jobs again, but instead of prefixing them with the repository name, prefix them with the queue they are intended for. JJB job-templates support default values for parameters when they are defined inside the job template. That let you invoke the job-template without defining the variable. YAML has support for merging mappings and then override given values. Abuse that feature to craft a back compatibility job 'phpunit' with an empty queue. That let us avoid copy pasting job-templates that solely vary on the name ('phpunit' vs '{queue}phpunit'). Change-Id: I17c650acce623c3a1356dfe57ab591335c2cd169 --- A jjb/jobs.yaml 1 file changed, 52 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/64/243164/1 diff --git a/jjb/jobs.yaml b/jjb/jobs.yaml new file mode 100644 index 000..66d1104 --- /dev/null +++ b/jjb/jobs.yaml @@ -0,0 +1,52 @@ +# Runs phplint on a repository +# +# Parameters: +# {queue} prefix for the job +- job-template: +name: '{queue}-phplint' +queue: '' +builders: +- shell: "echo QUEUE [{queue}]" +- shell: "echo NAME [{name}]" + +# Generates 'phplint' for back compatibility +# +# Solely to get rid of the '{queue}-' prefix when queue='' or it would +# generate a job named '-phplint' +- job-template: +!!merge : *phplint +name: phplint + +# Jobs that are not suffixed with any queue name: +- project: +name: 'generic-jobs' +jobs: +- 'phplint' + +# Generate per queue jobs to please Zuul dependent pipeline +- project: +name: queues-jobs +queue: +- analytics +- integration +- mwgate +jobs: +- '{queue}-phplint' + +# Generates +# +# Job name: analytics-phplint +# echo QUEUE [analytics] +# echo NAME [queues-jobs] +# +# Job name: integration-phplint +# echo QUEUE [integration] +# echo NAME [queues-jobs] +# +# Job name: mwgate-phplint +# echo QUEUE [mwgate] +# echo NAME [queues-jobs] +# +# Job name: phplint +# echo QUEUE [] +# echo NAME [generic-jobs] -- To view, visit https://gerrit.wikimedia.org/r/243164 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17c650acce623c3a1356dfe57ab591335c2cd169 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Always render generated content the first time, including er... - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Always render generated content the first time, including errors .. Always render generated content the first time, including errors While using an inspector to edit an extension node, the generated content only renders if there is no error, because rendering the errors causes the node to keep changing size, causing the inspector to jump around. It is currently possible to save an extension node with errors. If this has happened, then the error message SHOULD be displayed when visual editor is opened, allowing the user to inspect and correct it. Therefore a check has been added, so that generated content is always rendered the first time, regardless of whether there is an error. Subsequently it only rerenders if there is no error. Bug: T114455 Change-Id: Id16a2ff836a84cd30e15ae9d2fd894896dc46e90 --- M src/ce/nodes/ve.ce.GeneratedContentNode.js 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ce/nodes/ve.ce.GeneratedContentNode.js b/src/ce/nodes/ve.ce.GeneratedContentNode.js index 60ef806..3bb5cb3 100644 --- a/src/ce/nodes/ve.ce.GeneratedContentNode.js +++ b/src/ce/nodes/ve.ce.GeneratedContentNode.js @@ -16,6 +16,7 @@ // Properties this.generatingPromise = null; this.generatedContentsValid = false; + this.generatedContentsFirstRender = true; // Events this.model.connect( this, { update: 'onGeneratedContentNodeUpdate' } ); @@ -144,7 +145,10 @@ this.emit( 'teardown' ); } $newElements = $( this.getRenderedDomElements( ve.copyDomElements( generatedContents ) ) ); - if ( this.validateGeneratedContents( $( generatedContents ) ) ) { + // Render if this is the first time rendering, regardless of whether there is an error; otherwise only + // render if there is no error + if ( this.generatedContentsFirstRender || this.validateGeneratedContents( $( generatedContents ) ) ) { + this.generatedContentsFirstRender = false; this.generatedContentsValid = true; if ( !this.$element[ 0 ].parentNode ) { // this.$element hasn't been attached yet, so just overwrite it -- To view, visit https://gerrit.wikimedia.org/r/243153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id16a2ff836a84cd30e15ae9d2fd894896dc46e90 Gerrit-PatchSet: 2 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: TchandersGerrit-Reviewer: Esanders Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] proofreadpage.py: Fix an error in tests and errors in docstr... - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: proofreadpage.py: Fix an error in tests and errors in docstrings .. proofreadpage.py: Fix an error in tests and errors in docstrings Change-Id: Id9943d7c8a0432495bb6415fb792e0d54c6de452 --- M pywikibot/proofreadpage.py M tests/proofreadpage_tests.py 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py index a14e2f2..4da5401 100644 --- a/pywikibot/proofreadpage.py +++ b/pywikibot/proofreadpage.py @@ -478,7 +478,7 @@ There is a 1-to-many correspondence (a label can be the same for several pages). -@return: list containing page numbers corresponding to page label. +@return: set containing page numbers corresponding to page label. """ return self._get_from_label(self._page_numbers_from_label, label) @@ -488,6 +488,6 @@ There is a 1-to-many correspondence (a label can be the same for several pages). -@return: list containing pages corresponding to page label. +@return: set containing pages corresponding to page label. """ return self._get_from_label(self._pages_from_label, label) diff --git a/tests/proofreadpage_tests.py b/tests/proofreadpage_tests.py index b16ec0e..761e68a 100644 --- a/tests/proofreadpage_tests.py +++ b/tests/proofreadpage_tests.py @@ -345,7 +345,7 @@ # Error if page does not exists. self.assertRaises(KeyError, index_page.get_label_from_page, None) -def test_get_page_number(self, key): +def test_get_page_and_number(self, key): """Test IndexPage page get_page_number functions.""" data = self.sites[key] index_page = IndexPage(self.site, self.sites[key]['index']) @@ -380,7 +380,7 @@ n = index_page._numbers_from_page[p] self.assertEqual(index_page._page_from_numbers[n], p) for n in num_set: -n = index_page._page_from_numbers[p] +p = index_page._page_from_numbers[n] self.assertEqual(index_page._numbers_from_page[p], n) def test_page_number_mapping(self, key): -- To view, visit https://gerrit.wikimedia.org/r/242751 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id9943d7c8a0432495bb6415fb792e0d54c6de452 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: MpaaGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] MWExtensionNode: Fix selector to find dimension-less images - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: MWExtensionNode: Fix selector to find dimension-less images .. MWExtensionNode: Fix selector to find dimension-less images Change-Id: Idf219636f9b2b58e30b1a155c052ada4c60e6ec9 --- M modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Tchanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js index bac7d55..1f143ce 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js @@ -98,7 +98,9 @@ /** */ ve.ce.MWExtensionNode.prototype.afterRender = function () { var node = this, - $images = this.$element.find( 'img:not([width]),img:not([height])' ); + $images = this.$element + .find( 'img:not([width]),img:not([height])' ) + .addBack( 'img:not([width]),img:not([height])' ); // Mixin method ve.ce.GeneratedContentNode.prototype.afterRender.call( this ); -- To view, visit https://gerrit.wikimedia.org/r/243168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idf219636f9b2b58e30b1a155c052ada4c60e6ec9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Tchanders Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: ec2ff26..d63dce1 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/243171 Change subject: Syncronize VisualEditor: ec2ff26..d63dce1 .. Syncronize VisualEditor: ec2ff26..d63dce1 Change-Id: I0594be2d110cd5d5a062a9627d4427c5fd35c940 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/71/243171/1 diff --git a/VisualEditor b/VisualEditor index ec2ff26..d63dce1 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit ec2ff26563f8f801a114910eb5d67fbf29a83273 +Subproject commit d63dce138dcded61bec0bdb6bb23d79c26c7c867 -- To view, visit https://gerrit.wikimedia.org/r/243171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0594be2d110cd5d5a062a9627d4427c5fd35c940 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics: modernize the ensure => link syntax in a couple ... - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/243179 Change subject: analytics: modernize the ensure => link syntax in a couple of places. .. analytics: modernize the ensure => link syntax in a couple of places. Change-Id: Ieaa58328a80021a389aa5eb314f3ae6b72a1e839 --- M manifests/role/analytics/mysql.pp 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/79/243179/1 diff --git a/manifests/role/analytics/mysql.pp b/manifests/role/analytics/mysql.pp index 39f7cf6..1c4bb05 100644 --- a/manifests/role/analytics/mysql.pp +++ b/manifests/role/analytics/mysql.pp @@ -16,12 +16,14 @@ } file { '/etc/init.d/mysql': -ensure => '/opt/wmf-mariadb10/service', +ensure=> link, +target=> '/opt/wmf-mariadb10/service', require => Class['mariadb::packages_wmf'], } file { '/usr/local/bin/mysql': -ensure => '/opt/wmf-mariadb10/bin/mysql', +ensure=> link, +target=> '/opt/wmf-mariadb10/bin/mysql', require => Class['mariadb::packages_wmf'], } -- To view, visit https://gerrit.wikimedia.org/r/243179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieaa58328a80021a389aa5eb314f3ae6b72a1e839 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP BannerHistoryLog: timeout for users without sendBeacon - change (mediawiki...CentralNotice)
AndyRussG has uploaded a new change for review. https://gerrit.wikimedia.org/r/243180 Change subject: WIP BannerHistoryLog: timeout for users without sendBeacon .. WIP BannerHistoryLog: timeout for users without sendBeacon Change-Id: I95175dbe538668528c28ede08e87df99014519b8 --- M CentralNotice.modules.php M CentralNotice.php M i18n/en.json M i18n/qqq.json M resources/subscribing/ext.centralNotice.bannerHistoryLogger.js 5 files changed, 86 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/80/243180/1 diff --git a/CentralNotice.modules.php b/CentralNotice.modules.php index 4e37b1e..db43f0c 100644 --- a/CentralNotice.modules.php +++ b/CentralNotice.modules.php @@ -145,6 +145,8 @@ 'centralnotice-banner-history-logger-max-entry-age-help', 'centralnotice-banner-history-logger-max-entries', 'centralnotice-banner-history-logger-max-entries-help', + 'centralnotice-banner-history-logger-wait-log-no-send-beacon', + 'centralnotice-banner-history-logger-wait-log-no-send-beacon-help', // Legacy campaigns 'centralnotice-set-record-impression-sample-rate', diff --git a/CentralNotice.php b/CentralNotice.php index ddc4371..faff5d7 100644 --- a/CentralNotice.php +++ b/CentralNotice.php @@ -268,6 +268,11 @@ 'type' => 'integer', 'labelMsg' => 'centralnotice-banner-history-logger-max-entries', 'helpMsg' => 'centralnotice-banner-history-logger-max-entries-help' + ), + 'waitLogNoSendBeacon' => array( + 'type' => 'integer', + 'labelMsg' => 'centralnotice-banner-history-logger-wait-log-no-send-beacon', + 'helpMsg' => 'centralnotice-banner-history-logger-wait-log-no-send-beacon-help' ) ) ), diff --git a/i18n/en.json b/i18n/en.json index 9441d1f..e4893e9 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -267,6 +267,8 @@ "centralnotice-banner-history-logger-max-entry-age-help": "Log entries older than this will be expired and will not be sent back to the server.", "centralnotice-banner-history-logger-max-entries": "Maximum number of entries to keep in log", "centralnotice-banner-history-logger-max-entries-help": "If more history is recorded before the log is sent to the server, the oldest items will disappear.", + "centralnotice-banner-history-logger-wait-log-no-send-beacon": "Timeout for sending the log without sendBeacon (in milliseconds)", + "centralnotice-banner-history-logger-wait-log-no-send-beacon-help": "If the log is sometimes sent right before navigating to a different page, some browsers require a maximum time to wait before giving up on sending the log.", "centralnotice-legacy-support": "Legacy support", "centralnotice-legacy-support-help": "Settings for compatibility with older banners that rely on Special:RecordImpression or include JavaScript that hides the banner.", "centralnotice-set-record-impression-sample-rate": "Set sample rate for Special:RecordImpression", diff --git a/i18n/qqq.json b/i18n/qqq.json index 0ffbc04..91acd42 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -290,6 +290,8 @@ "centralnotice-banner-history-logger-max-entry-age-help": "Help text for the log expiration age field", "centralnotice-banner-history-logger-max-entries": "Label for the banner history logger campaign mixin maximum number of log entries control in the administration UI", "centralnotice-banner-history-logger-max-entries-help": "Help text for the maximum log size field", + "centralnotice-banner-history-logger-wait-log-no-send-beacon": "Label for field for time limit to delay sending the log without sendBeacon, for the banner history logger campaign mixin", + "centralnotice-banner-history-logger-wait-log-no-send-beacon-help": "Help text for field for time limit to delay sending the log without sendBeacon, for the banner history logger campaign mixin", "centralnotice-legacy-support": "Name of the legacy support campaign mixin, for administration UI control", "centralnotice-legacy-support-help": "Description of the legacy support feature", "centralnotice-set-record-impression-sample-rate": "Label for the control to activate setting the sample rate for Special:RecordImpression, for the legacy support campaign mixin", diff --git a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js index 6f9160c..aa0457d 100644 --- a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js +++
[MediaWiki-commits] [Gerrit] Fix tox to be able to run tests - change (analytics/limn-mobile-data)
Nuria has submitted this change and it was merged. Change subject: Fix tox to be able to run tests .. Fix tox to be able to run tests The test-requirements.txt has been removed. Reinstate it and list the requirements needed to run the test suite: nosetests mock Adjust the default env to use the 'nosetests' command. It can be further configured via setup.cfg [nosetests] section. Tests pass locally with python2.7. Change-Id: I9132e1d4a2b4bc48c17340be8a8b9f7cfb683f63 --- A test-requirements.txt M tox.ini 2 files changed, 3 insertions(+), 0 deletions(-) Approvals: John Vandenberg: Looks good to me, but someone else must approve Nuria: Looks good to me, approved jenkins-bot: Verified diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 000..a678696 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +nose +mock diff --git a/tox.ini b/tox.ini index 63c0beb..963e865 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ [testenv] setenv = VIRTUAL_ENV={envdir} +commands = nosetests deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -- To view, visit https://gerrit.wikimedia.org/r/242966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9132e1d4a2b4bc48c17340be8a8b9f7cfb683f63 Gerrit-PatchSet: 1 Gerrit-Project: analytics/limn-mobile-data Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Hashar Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Milimetric Gerrit-Reviewer: Nuria 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] Disable NFS lookup cache on NFS client instances - change (operations/puppet)
coren has submitted this change and it was merged. Change subject: Disable NFS lookup cache on NFS client instances .. Disable NFS lookup cache on NFS client instances This disables the lookup cache (which is very aggresive by default on Trusty) to return NFS semantics closer to close-to-open. Bug: T106170 Change-Id: Ia20062ddd0aeae39c601177a4f12b2eb0e84fcb2 --- M manifests/role/labs.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: coren: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp index 43a5287..400e156 100644 --- a/manifests/role/labs.pp +++ b/manifests/role/labs.pp @@ -40,7 +40,7 @@ source => 'puppet:///files/nfs/block-for-export', } -$nfs_opts = 'vers=4,bg,hard,intr,sec=sys,proto=tcp,port=0,noatime,nofsc' +$nfs_opts = 'vers=4,bg,hard,intr,sec=sys,proto=tcp,port=0,noatime,lookupcache=none,nofsc' $nfs_server = 'labstore.svc.eqiad.wmnet' $dumps_server = 'labstore1003.eqiad.wmnet' -- To view, visit https://gerrit.wikimedia.org/r/241663 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia20062ddd0aeae39c601177a4f12b2eb0e84fcb2 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: corenGerrit-Reviewer: coren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added dummy user/password passwords::mysql::labsdb - change (labs/private)
Andrew Bogott has submitted this change and it was merged. Change subject: Added dummy user/password passwords::mysql::labsdb .. Added dummy user/password passwords::mysql::labsdb Change-Id: Ibca03123767062ecd7f70da63a0b262b8490a45e --- M modules/passwords/manifests/init.pp 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Verified; Looks good to me, approved diff --git a/modules/passwords/manifests/init.pp b/modules/passwords/manifests/init.pp index 29d3ffb..14680ca 100644 --- a/modules/passwords/manifests/init.pp +++ b/modules/passwords/manifests/init.pp @@ -244,6 +244,11 @@ $pass = 'pass' } +class passwords::mysql::labsdb { +$user = 'user' +$password = 'pass' +} + class passwords::mysql::iegreview { $admin_user = 'longcat' $app_user = 'maru' -- To view, visit https://gerrit.wikimedia.org/r/243184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibca03123767062ecd7f70da63a0b262b8490a45e Gerrit-PatchSet: 1 Gerrit-Project: labs/private Gerrit-Branch: master Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add message docs for recent updates - change (mediawiki...NumerAlpha)
Jamesmontalvo3 has uploaded a new change for review. https://gerrit.wikimedia.org/r/243157 Change subject: Add message docs for recent updates .. Add message docs for recent updates Change-Id: I7b41af194facd488af02bac0217a74da0cf2164b --- M i18n/qqq.json 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NumerAlpha refs/changes/57/243157/1 diff --git a/i18n/qqq.json b/i18n/qqq.json index 7cbcb58..90a1a73 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -16,5 +16,11 @@ "ext-numeralpha-list-pad-length": "Parser function parameter name for \"pad length\"", "ext-numeralpha-list-pad-char": "Parser function parameter name for \"pad character\"", "ext-numeralpha-list-prefix": "Parser function parameter name for \"prefix\"\n{{Identical|Prefix}}", - "ext-numeralpha-list-suffix": "Parser function parameter name for \"suffix\"" + "ext-numeralpha-list-suffix": "Parser function parameter name for \"suffix\"", + "ext-numeralpha-list-level-label": "Parser function parameter name for \"level\", which determines what sub-list is desired. A level of 1 indicates that it's the top-level list where a level of 2 may be like an indented-once sub-list.", + "ext-numeralpha-list-level-prefix-label": "Parser function parameter name for \"level prefix\", which determines what characters may be prefixed before each level. So a level prefix of \"*\" (no quotes) would make a level 1 item be prefixed by \"*\" (no quotes) and a level 3 item be prefixed by \"***\"", + "ext-numeralpha-list-format-label": "Parser function parameter name for \"format\", which determines if the output of the list is in \"standard\" or \"outline\" format. A level 3 item in standard format may just be displayed as \"7\", but in \"outline\" format that same item may be displayed as \"3.2.7\"", + "ext-numeralpha-list-format-standard": "Word used to indicate that the format parameter is set to the standard format", + "ext-numeralpha-list-format-outline": "Word used to indicate that the format parameter is set to the outline format", + "ext-numeralpha-list-format-outline-glue": "Default characters to put between numbers in outline format. English default is a period, which causes output like 1.6.3 or 2.5.7" } -- To view, visit https://gerrit.wikimedia.org/r/243157 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b41af194facd488af02bac0217a74da0cf2164b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/NumerAlpha Gerrit-Branch: master Gerrit-Owner: Jamesmontalvo3___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add tests - change (mediawiki...Translate)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/243160 Change subject: Add tests .. Add tests Fix all issues so tests pass. Change-Id: I934a9545c275c6a16fab83c52d077dd5b62a7ada --- M .gitignore A Gruntfile.js M composer.json M messagegroups/FileBasedMessageGroup.php A package.json A phpcs.xml M scripts/plural-comparison.php 7 files changed, 60 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/60/243160/1 diff --git a/.gitignore b/.gitignore index 115b5cd..854a2d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,6 @@ -.svn *~ -.*.swp *.kate-swp -.classpath -.idea -.metadata* -.project -.settings -*.bak -tests/pagetranslation/*.fail -composer.lock -extensions/ -vendor/ +.*.swp +node_modules/ +/composer.lock +/vendor/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..9c56558 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/composer.json b/composer.json index 2a1da67..4365e8a 100644 --- a/composer.json +++ b/composer.json @@ -1,48 +1,12 @@ { - "name": "mediawiki/translate", - "type": "mediawiki-extension", - "description": "The only standard solution to translate any kind of text with an avant-garde web interface within MediaWiki, including your documentation and software", - "keywords": [ - "MediaWiki", - "Translation", - "l10n", - "i18n", - "g11n", - "m17n", - "localization", - "internationalization", - "translatewiki.net" - ], - "homepage": "https://www.mediawiki.org/wiki/Extension:Translate;, - "license": "GPL-2.0+", - "authors": [ - { - "name": "Niklas Laxström", - "email": "niklas.laxst...@gmail.com", - "role": "Lead nitpicker" - }, - { - "name": "Siebrand Mazeland", - "email": "s.mazel...@xs4all.nl", - "role": "Developer" - } - ], - "support": { - "issues": "https://phabricator.wikimedia.org/tag/mediawiki-extensions-translate/;, - "irc": "irc://irc.freenode.net/mediawiki-i18n", - "forum": "https://www.mediawiki.org/wiki/Extension_talk:Translate;, - "wiki": "https://www.mediawiki.org/wiki/Extension:Translate; + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.9", + "mediawiki/mediawiki-codesniffer": "0.4.0" }, - "require": { - "php": ">=5.3.0", - "composer/installers": ">=1.0.1", - "mediawiki/universal-language-selector": "*" - }, - "suggest": { - "mediawiki/babel": "Users can easily indicate their language proficiency on their user page", - "mediawiki/translation-notifications": "Manage communication with translators", - "mustangostang/spyc": "More recent version of the bundled spyc library", - "romaricdrigon/metayaml": "If you want to validate message group configurations", - "ruflin/elastica": "Support for translation memory and search in ElasticSearch" + "scripts": { + "test": [ + "parallel-lint . --exclude vendor", + "phpcs -p -s" + ] } } diff --git a/messagegroups/FileBasedMessageGroup.php b/messagegroups/FileBasedMessageGroup.php index 0b5c383..a36dfd6 100644 --- a/messagegroups/FileBasedMessageGroup.php +++ b/messagegroups/FileBasedMessageGroup.php @@ -110,7 +110,9 @@ * @since 2014.02 Made public */ public function replaceVariables( $pattern, $code ) { + // @codingStandardsIgnoreStart Ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix global $IP, $wgTranslateGroupRoot; + // @codingStandardsIgnoreEnd $variables = array( '%CODE%' => $this->mapCode( $code ), diff --git a/package.json b/package.json new file mode 100644 index 000..76e8a82 --- /dev/null +++
[MediaWiki-commits] [Gerrit] Ensure full error message is show when inspector is closed - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243167 Change subject: Ensure full error message is show when inspector is closed .. Ensure full error message is show when inspector is closed Applying staging doesn't emit an update event on the node, so forcefully emit one with 'staged' equal to false, so the full error is rendered (if present). Logically depends on I8ebb26d4bc in core. Bug: T114480 Change-Id: I7ba54b67982fc5b10839426cdc216e14c0e33c01 --- M modules/ve-mw/ui/inspectors/ve.ui.MWLiveExtensionInspector.js 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/67/243167/1 diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWLiveExtensionInspector.js b/modules/ve-mw/ui/inspectors/ve.ui.MWLiveExtensionInspector.js index 57450e2..8340b4c 100644 --- a/modules/ve-mw/ui/inspectors/ve.ui.MWLiveExtensionInspector.js +++ b/modules/ve-mw/ui/inspectors/ve.ui.MWLiveExtensionInspector.js @@ -78,6 +78,8 @@ // to the model in staging, just need to apply them. this.updatePreview(); this.getFragment().getSurface().applyStaging(); + // Force the selected node to re-render after staging has finished + this.selectedNode.emit( 'update', false ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/243167 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ba54b67982fc5b10839426cdc216e14c0e33c01 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] Varnish: Add lint:ignore:quoted_booleans around a boolean th... - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/243176 Change subject: Varnish: Add lint:ignore:quoted_booleans around a boolean that needs quoting. .. Varnish: Add lint:ignore:quoted_booleans around a boolean that needs quoting. Bug: T113783 Change-Id: Icbe2be0235038b40c2584f221ae23a90c1a2ecb6 --- M modules/varnish/manifests/instance.pp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/76/243176/1 diff --git a/modules/varnish/manifests/instance.pp b/modules/varnish/manifests/instance.pp index aa9af9b..27d00a8 100644 --- a/modules/varnish/manifests/instance.pp +++ b/modules/varnish/manifests/instance.pp @@ -52,11 +52,13 @@ $inst = $name } +# lint:ignore:quoted_booleans if inline_template("<%= @directors.map{|k,v| v['dynamic'] }.include?('yes') %>") == "true" { $use_dynamic_directors = true } else { $use_dynamic_directors = false } +# lint:endignore if $use_dynamic_directors { varnish::common::directors { $vcl: -- To view, visit https://gerrit.wikimedia.org/r/243176 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icbe2be0235038b40c2584f221ae23a90c1a2ecb6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add tests - change (mediawiki...Renameuser)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/243119 Change subject: Add tests .. Add tests Fix all issues so tests pass. Change-Id: I4545276d84fc0d0405d7c16ab179332298eb682b --- M .gitignore M Gruntfile.js M RenameUserJob.php M Renameuser.hooks.php M Renameuser.php M RenameuserLogFormatter.php M RenameuserSQL.php M cleanupArchiveUserText.php A composer.json M i18n/en.json A phpcs.xml M renameUserCleanup.php M specials/SpecialRenameuser.php 13 files changed, 318 insertions(+), 242 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Renameuser refs/changes/19/243119/1 diff --git a/.gitignore b/.gitignore index 4bf4869..854a2d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -.svn *~ *.kate-swp .*.swp node_modules/ +/composer.lock +/vendor/ diff --git a/Gruntfile.js b/Gruntfile.js index 5a87e7b..9c56558 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,9 +3,10 @@ grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); - var conf = grunt.file.readJSON( 'extension.json' ); grunt.initConfig( { - banana: conf.MessagesDirs, + banana: { + all: 'i18n/' + }, jsonlint: { all: [ '**/*.json', diff --git a/RenameUserJob.php b/RenameUserJob.php index d2dc14c..086678d 100644 --- a/RenameUserJob.php +++ b/RenameUserJob.php @@ -1,4 +1,5 @@ params['oldname']; $userID = isset( $this->params['userID'] ) ? $this->params['userID'] : null; $uidColumn = isset( $this->params['uidColumn'] ) ? $this->params['uidColumn'] : null; - $timestampColumn = isset( $this->params['timestampColumn'] ) ? $this->params['timestampColumn'] : null; + $timestampColumn = isset( $this->params['timestampColumn'] ) ? + $this->params['timestampColumn'] : + null; $minTimestamp = $this->params['minTimestamp']; $maxTimestamp = $this->params['maxTimestamp']; $uniqueKey = isset( $this->params['uniqueKey'] ) ? $this->params['uniqueKey'] : null; @@ -45,7 +48,7 @@ if ( isset( $timestampColumn ) ) { $conds[] = "$timestampColumn >= '$minTimestamp'"; $conds[] = "$timestampColumn <= '$maxTimestamp'"; - # Otherwise, bound by key (B/C) + # Otherwise, bound by key (B/C) } elseif ( isset( $uniqueKey ) ) { $conds[$uniqueKey] = $keyId; } else { @@ -94,6 +97,7 @@ ); } } + return true; } } diff --git a/Renameuser.hooks.php b/Renameuser.hooks.php index 846f913..a9dfb01 100644 --- a/Renameuser.hooks.php +++ b/Renameuser.hooks.php @@ -11,9 +11,12 @@ public static function onShowMissingArticle( $article ) { $title = $article->getTitle(); $oldUser = User::newFromName( $title->getBaseText() ); - if ( ($title->getNamespace() == NS_USER || $title->getNamespace() == NS_USER_TALK ) && ($oldUser && $oldUser->isAnon() )) { + if ( ( $title->getNamespace() == NS_USER || $title->getNamespace() == NS_USER_TALK ) && + ( $oldUser && $oldUser->isAnon() ) + ) { // Get the title for the base userpage - $page = Title::makeTitle( NS_USER, str_replace( ' ', '_', $title->getBaseText() ) )->getPrefixedDBkey(); + $page = Title::makeTitle( NS_USER, str_replace( ' ', '_', $title->getBaseText() ) ) + ->getPrefixedDBkey(); $out = $article->getContext()->getOutput(); LogEventsList::showLogExtract( $out, @@ -51,6 +54,7 @@ array( 'oldusername' => $nt->getText() ) ); } + return true; } @@ -61,6 +65,7 @@ */ public static function onGetLogTypesOnUser( array &$types ) { $types[] = 'renameuser'; + return true; } } diff --git a/Renameuser.php b/Renameuser.php index 441b571..738ca0d 100755 --- a/Renameuser.php +++ b/Renameuser.php @@ -5,10 +5,12 @@ // Keep i18n globals so mergeMessageFileList.php doesn't break $wgMessagesDirs['Renameuser'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['RenameuserAliases'] = __DIR__ . '/Renameuser.alias.php'; + /* wfWarn( 'Deprecated PHP entry point used for Renameuser extension. Please use wfLoadExtension instead, ' . 'see
[MediaWiki-commits] [Gerrit] Adding wikiuser and wikiadmin grants to read the heartbeat t... - change (operations/puppet)
Jcrespo has submitted this change and it was merged. Change subject: Adding wikiuser and wikiadmin grants to read the heartbeat table .. Adding wikiuser and wikiadmin grants to read the heartbeat table Change-Id: I4b4c93c07c5fe8595f9a966aa07dd2d6d62b49b5 References: T111266 --- M templates/mariadb/production-grants-core.sql.erb 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Jcrespo: Looks good to me, approved Aaron Schulz: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/templates/mariadb/production-grants-core.sql.erb b/templates/mariadb/production-grants-core.sql.erb index 0ec53fa..d74844a 100644 --- a/templates/mariadb/production-grants-core.sql.erb +++ b/templates/mariadb/production-grants-core.sql.erb @@ -10,6 +10,9 @@ GRANT ALL PRIVILEGES ON `centralauth`.* TO 'wikiadmin'@'10.%'; +GRANT SELECT +ON `heartbeat`.`heartbeat` TO 'wikiadmin'@'10.%'; + -- wikiuser 10.64.% GRANT PROCESS, REPLICATION CLIENT @@ -22,6 +25,9 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON `centralauth`.* TO 'wikiuser'@'10.64.%'; +GRANT SELECT +ON `heartbeat`.`heartbeat` TO 'wikiuser'@'10.64.%'; + -- wikiuser 10.192.% GRANT PROCESS, REPLICATION CLIENT @@ -33,3 +39,7 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON `centralauth`.* TO 'wikiuser'@'10.192.%'; + +GRANT SELECT +ON `heartbeat`.`heartbeat` TO 'wikiuser'@'10.192.%'; + -- To view, visit https://gerrit.wikimedia.org/r/242211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4b4c93c07c5fe8595f9a966aa07dd2d6d62b49b5 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: JcrespoGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] sslcert: fix update-ocsp's non-proxy mode - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: sslcert: fix update-ocsp's non-proxy mode .. sslcert: fix update-ocsp's non-proxy mode update-ocsp already had code to deal with not passing a --proxy argument but it was impossible to reach with the current argparse config. Fix this and also add support for passing the Host header so that this works against e.g. GlobalSign's OCSP servers. While at it, fix a couple of bugs in the error handling path that probably wasn't previously exercised until I started poking at it. Change-Id: I9194227439d7c8f5ff320596aad9bafbbb072cdc --- M modules/sslcert/files/update-ocsp 1 file changed, 7 insertions(+), 4 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/sslcert/files/update-ocsp b/modules/sslcert/files/update-ocsp index fc8786e..f19ce96 100644 --- a/modules/sslcert/files/update-ocsp +++ b/modules/sslcert/files/update-ocsp @@ -27,6 +27,7 @@ import glob import tempfile import datetime +import urlparse def file_exists(fname): @@ -48,8 +49,7 @@ help="output filename", required=True) parser.add_argument('--proxy', '-p', dest="proxy", -help="HTTP proxy host:port to use for OCSP request", -required=True) +help="HTTP proxy host:port to use for OCSP request") parser.add_argument('--ca-certs', '-d', dest="cadir", help="SSL CA certificates directory", default='/etc/ssl/certs') @@ -73,8 +73,7 @@ (p_out, p_err) = p.communicate() if p.returncode != 0: sys.stderr.write("Command %s failed with exit code %i, stderr:\n%s" % - (p.args, p.returncode, p_err)) -raise + (" ".join(args), p.returncode, p_err)) return (p_out, p_err) @@ -168,8 +167,12 @@ "-host", proxy, ]) else: +# OpenSSL only speaks HTTP/1.0 and sends no Host header. This doesn't +# really work in many OCSP servers, so supply the Host header manually. +hosthdr = urlparse.urlparse(ocsp_uri).netloc cmd.extend([ "-url", ocsp_uri, +"-header", "Host", hosthdr, ]) for cert in certs: -- To view, visit https://gerrit.wikimedia.org/r/243133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9194227439d7c8f5ff320596aad9bafbbb072cdc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon LiambotisGerrit-Reviewer: BBlack Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [IMPROV] Don't use shell argument - change (integration/jenkins)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/243140 Change subject: [IMPROV] Don't use shell argument .. [IMPROV] Don't use shell argument The `shell` argument in `subprocess.check_output` should be used very carefully. But this is not necessary if we already split the arguments. This now also uses a custom log format which will only print the commit message not indented. This also fixes various issues that it didn't detect lines which start with "Change-Id" or "Bug" because it didn't consider the indentation. Change-Id: I7724c6c75ed100ef11082e95f4f48ef3f5d91d6a --- M tools/commit-message-validator.py 1 file changed, 6 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/40/243140/1 diff --git a/tools/commit-message-validator.py b/tools/commit-message-validator.py index 609518e..c8a532a 100755 --- a/tools/commit-message-validator.py +++ b/tools/commit-message-validator.py @@ -80,10 +80,8 @@ changeid_line = False last_bug = False for lineno, line in enumerate(lines): -# Strip leading spaces to remove `git log` indenting -stripped = line.lstrip() rline = lineno + 1 -e = line_has_errors(lineno, stripped) +e = line_has_errors(lineno, line) if e: errors.append(e) @@ -123,7 +121,7 @@ changeid_line = rline last_lineno = rline -last_line = stripped +last_line = line if last_lineno < 2: errors.append("Line %d: Expected at least 3 lines" % last_lineno) @@ -149,14 +147,11 @@ def main(): """Validate the current HEAD commit message.""" -commit = subprocess.check_output('git log --pretty=raw -1', shell=True) +commit = subprocess.check_output(['git', 'log', '--format=%B', '--no-color', + '-n1']) commit = commit.decode(locale.getpreferredencoding()) -lines = commit.splitlines() - -# Discard until the first blank line -line = lines.pop(0) -while line: -line = lines.pop(0) +# last line is always an empty line +lines = commit.splitlines()[:-1] return check_message(lines) -- To view, visit https://gerrit.wikimedia.org/r/243140 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7724c6c75ed100ef11082e95f4f48ef3f5d91d6a Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: XZise___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up entityview - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Clean up entityview .. Clean up entityview * Switch from holding a reference to the entity terms jQuery DOM element to having a reference to the `entitytermsview` jQuery UI widget * Move jQuery data initialization from _init to _create to closer mimick jQuery UI's behaviour * Remove handling of events which are already captured in `entitytermsforlanguageview` * Use jQuery UI's `_on` method for event binding, since it handles unbinding, namespacing and fixating the event handler's `this` argument Change-Id: Ic672a7267c6bb508e943d991cd296d73566868b0 --- M view/resources/jquery/wikibase/jquery.wikibase.entityview.js 1 file changed, 21 insertions(+), 32 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/view/resources/jquery/wikibase/jquery.wikibase.entityview.js b/view/resources/jquery/wikibase/jquery.wikibase.entityview.js index 8381190..9126b4e 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.entityview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.entityview.js @@ -54,10 +54,10 @@ }, /** -* @property {jQuery|null} +* @property {jQuery.wikibase.entitytermsview} * @readonly */ - $entityTerms: null, + _entityTerms: null, /** * @inheritdoc @@ -75,6 +75,8 @@ */ _createEntityview: function() { PARENT.prototype._create.call( this ); + + this.element.data( $.wikibase.entityview.prototype.widgetName, this ); }, /** @@ -88,8 +90,6 @@ throw new Error( 'Required option(s) missing' ); } - this.element.data( $.wikibase.entityview.prototype.widgetName, this ); - this._initEntityTerms(); PARENT.prototype._init.call( this ); @@ -101,41 +101,32 @@ * @protected */ _initEntityTerms: function() { - this.$entityTerms = $( '.wikibase-entitytermsview', this.element ); + var $entityTerms = $( '.wikibase-entitytermsview', this.element ); - if ( !this.$entityTerms.length ) { - this.$entityTerms = $( '' ).prependTo( this.$main ); + if ( !$entityTerms.length ) { + $entityTerms = $( '' ).prependTo( this.$main ); } - this.options.buildEntityTermsView( this.options.value.getFingerprint(), this.$entityTerms ); + this._entityTerms = this.options.buildEntityTermsView( + this.options.value.getFingerprint(), + $entityTerms + ); }, /** * @protected */ _attachEventHandlers: function() { - var self = this; + this._on( { + entitytermsviewafterstartediting: function( event ) { + event.stopPropagation(); + this._trigger( 'afterstartediting' ); + }, - this.element - .on( [ - 'labelviewafterstartediting.' + this.widgetName, - 'descriptionviewafterstartediting.' + this.widgetName, - 'aliasesviewafterstartediting.' + this.widgetName, - 'entitytermsviewafterstartediting.' + this.widgetName - ].join( ' ' ), - function( event ) { - self._trigger( 'afterstartediting' ); - } ); - - this.element - .on( [ - 'labelviewafterstopediting.' + this.widgetName, - 'descriptionviewafterstopediting.' + this.widgetName, - 'aliasesviewafterstopediting.' + this.widgetName, - 'entitytermsviewafterstopediting.' + this.widgetName - ].join( ' ' ), - function( event, dropValue ) { - self._trigger( 'afterstopediting', null, [dropValue] ); + entitytermsviewafterstopediting: function( event, dropValue ) { + event.stopPropagation(); + this._trigger( 'afterstopediting', null, [dropValue] ); + } } ); }, @@ -160,9 +151,7 @@ * @param {string} state "disable" or "enable" */ _setState: function( state ) { - if ( this.$entityTerms ) { - this.$entityTerms.data( 'entitytermsview' )[state](); - } + this._entityTerms[state](); } } ); -- To view, visit https://gerrit.wikimedia.org/r/242822 To unsubscribe, visit
[MediaWiki-commits] [Gerrit] Adding ferm::mariadb role to labsdb1004 (tools slave) - change (operations/puppet)
Jcrespo has uploaded a new change for review. https://gerrit.wikimedia.org/r/243129 Change subject: Adding ferm::mariadb role to labsdb1004 (tools slave) .. Adding ferm::mariadb role to labsdb1004 (tools slave) This will allow remote administration and monitoring from the 10.x network, and potentially, replication. Change-Id: I604865ed451a9b5478b13465be749004e30d8032 References: T88718 --- M manifests/role/labsdb.pp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/29/243129/1 diff --git a/manifests/role/labsdb.pp b/manifests/role/labsdb.pp index 26cebf3..151a2ba 100644 --- a/manifests/role/labsdb.pp +++ b/manifests/role/labsdb.pp @@ -33,6 +33,7 @@ } include role::mariadb::grants include role::mariadb::monitor + include role::mariadb::ferm class { 'mariadb::config': prompt=> "TOOLSDB slave", @@ -42,6 +43,7 @@ tmpdir=> '/tmp', read_only => 'ON', } + #mariadb::monitor_replication { 'tools': #multisource => false, -- To view, visit https://gerrit.wikimedia.org/r/243129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I604865ed451a9b5478b13465be749004e30d8032 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding ferm::mariadb role to labsdb1004 (tools slave) - change (operations/puppet)
Jcrespo has submitted this change and it was merged. Change subject: Adding ferm::mariadb role to labsdb1004 (tools slave) .. Adding ferm::mariadb role to labsdb1004 (tools slave) This will allow remote administration and monitoring from the 10.x network, and potentially, replication. Change-Id: I604865ed451a9b5478b13465be749004e30d8032 References: T88718 --- M manifests/role/labsdb.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jcrespo: Looks good to me, approved Muehlenhoff: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/manifests/role/labsdb.pp b/manifests/role/labsdb.pp index 26cebf3..cdf47ff 100644 --- a/manifests/role/labsdb.pp +++ b/manifests/role/labsdb.pp @@ -33,6 +33,7 @@ } include role::mariadb::grants include role::mariadb::monitor +include role::mariadb::ferm class { 'mariadb::config': prompt=> "TOOLSDB slave", -- To view, visit https://gerrit.wikimedia.org/r/243129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I604865ed451a9b5478b13465be749004e30d8032 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: JcrespoGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Muehlenhoff Gerrit-Reviewer: coren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] sslcert: fix update-ocsp's non-proxy mode - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/243133 Change subject: sslcert: fix update-ocsp's non-proxy mode .. sslcert: fix update-ocsp's non-proxy mode update-ocsp already had code to deal with not passing a --proxy argument but it was impossible to reach with the current argparse config. Fix this and also add support for passing the Host header so that this works against e.g. GlobalSign's OCSP servers. While at it, fix a couple of bugs in the error handling path that probably wasn't previously exercised until I started poking at it. Change-Id: I9194227439d7c8f5ff320596aad9bafbbb072cdc --- M modules/sslcert/files/update-ocsp 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/33/243133/1 diff --git a/modules/sslcert/files/update-ocsp b/modules/sslcert/files/update-ocsp index fc8786e..f19ce96 100644 --- a/modules/sslcert/files/update-ocsp +++ b/modules/sslcert/files/update-ocsp @@ -27,6 +27,7 @@ import glob import tempfile import datetime +import urlparse def file_exists(fname): @@ -48,8 +49,7 @@ help="output filename", required=True) parser.add_argument('--proxy', '-p', dest="proxy", -help="HTTP proxy host:port to use for OCSP request", -required=True) +help="HTTP proxy host:port to use for OCSP request") parser.add_argument('--ca-certs', '-d', dest="cadir", help="SSL CA certificates directory", default='/etc/ssl/certs') @@ -73,8 +73,7 @@ (p_out, p_err) = p.communicate() if p.returncode != 0: sys.stderr.write("Command %s failed with exit code %i, stderr:\n%s" % - (p.args, p.returncode, p_err)) -raise + (" ".join(args), p.returncode, p_err)) return (p_out, p_err) @@ -168,8 +167,12 @@ "-host", proxy, ]) else: +# OpenSSL only speaks HTTP/1.0 and sends no Host header. This doesn't +# really work in many OCSP servers, so supply the Host header manually. +hosthdr = urlparse.urlparse(ocsp_uri).netloc cmd.extend([ "-url", ocsp_uri, +"-header", "Host", hosthdr, ]) for cert in certs: -- To view, visit https://gerrit.wikimedia.org/r/243133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9194227439d7c8f5ff320596aad9bafbbb072cdc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mariadb: update submodule in production repo - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/243148 Change subject: mariadb: update submodule in production repo .. mariadb: update submodule in production repo Change-Id: I258817661aa6c52e75d7c46cc4108509c5fda3f9 --- M modules/mariadb 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/48/243148/1 diff --git a/modules/mariadb b/modules/mariadb index 02cb5f6..692ee3e 16 --- a/modules/mariadb +++ b/modules/mariadb -Subproject commit 02cb5f6e9c6b960b4c437ed52d6da921e499ff55 +Subproject commit 692ee3e2393456d729baafe2d12571da21c2fbad -- To view, visit https://gerrit.wikimedia.org/r/243148 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I258817661aa6c52e75d7c46cc4108509c5fda3f9 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] Rename functions from thingBuilder to buildThing - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Rename functions from thingBuilder to buildThing .. Rename functions from thingBuilder to buildThing Since they are functions, not objects, a verb is a much better name than a noun. Change-Id: I262dc991d126f52dfe4fc5cb546b8ab751258203 --- M view/resources/jquery/wikibase/jquery.wikibase.entityview.js M view/resources/jquery/wikibase/jquery.wikibase.itemview.js M view/resources/jquery/wikibase/jquery.wikibase.propertyview.js M view/resources/wikibase/view/ViewFactory.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.itemview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.propertyview.tests.js M view/tests/qunit/wikibase/view/ViewFactory.tests.js 7 files changed, 27 insertions(+), 27 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved Thiemo Mättig (WMDE): Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/view/resources/jquery/wikibase/jquery.wikibase.entityview.js b/view/resources/jquery/wikibase/jquery.wikibase.entityview.js index 1809ab3..8381190 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.entityview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.entityview.js @@ -16,7 +16,7 @@ * * @param {Object} options * @param {wikibase.datamodel.Entity} options.value - * @param {Function} options.entityTermsViewBuilder + * @param {Function} options.buildEntityTermsView */ /** * @event afterstartediting @@ -36,7 +36,7 @@ * @protected */ options: { - entityTermsViewBuilder: null, + buildEntityTermsView: null, template: 'wikibase-entityview', templateParams: [ '', // entity type @@ -84,7 +84,7 @@ * @throws {Error} if a required options is missing. */ _init: function() { - if ( !this.options.value || !this.options.entityTermsViewBuilder ) { + if ( !this.options.value || !this.options.buildEntityTermsView ) { throw new Error( 'Required option(s) missing' ); } @@ -107,7 +107,7 @@ this.$entityTerms = $( '' ).prependTo( this.$main ); } - this.options.entityTermsViewBuilder( this.options.value.getFingerprint(), this.$entityTerms ); + this.options.buildEntityTermsView( this.options.value.getFingerprint(), this.$entityTerms ); }, /** diff --git a/view/resources/jquery/wikibase/jquery.wikibase.itemview.js b/view/resources/jquery/wikibase/jquery.wikibase.itemview.js index de17967..e937813 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.itemview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.itemview.js @@ -13,8 +13,8 @@ * @author H. Snater < mediaw...@snater.com > * * @param {Object} options - * @param {Function} options.sitelinkGroupListViewBuilder - * @param {Function} options.statementGroupListViewBuilder + * @param {Function} options.buildSitelinkGroupListView + * @param {Function} options.buildStatementGroupListView * * @constructor * @@ -25,8 +25,8 @@ * @protected */ options: { - sitelinkGroupListViewBuilder: null, - statementGroupListViewBuilder: null + buildSitelinkGroupListView: null, + buildStatementGroupListView: null }, /** @@ -58,8 +58,8 @@ * @protected */ _init: function() { - if ( !this.options.sitelinkGroupListViewBuilder || - !this.options.statementGroupListViewBuilder + if ( !this.options.buildSitelinkGroupListView || + !this.options.buildStatementGroupListView ) { throw new Error( 'Required option(s) missing' ); } @@ -73,7 +73,7 @@ * @protected */ _initStatements: function() { - this.options.statementGroupListViewBuilder( this.options.value, this.$statements ); + this.options.buildStatementGroupListView( this.options.value, this.$statements ); // This is here to be sure there is never a duplicate id: $( '.wikibase-statementgrouplistview' ) @@ -86,7 +86,7 @@ * @protected */ _initSiteLinks: function() { - this.options.sitelinkGroupListViewBuilder( this.options.value.getSiteLinks(), this.$siteLinks ); + this.options.buildSitelinkGroupListView( this.options.value.getSiteLinks(), this.$siteLinks ); }, /** diff --git a/view/resources/jquery/wikibase/jquery.wikibase.propertyview.js b/view/resources/jquery/wikibase/jquery.wikibase.propertyview.js index d5bf0b2..3377b16 100644 ---
[MediaWiki-commits] [Gerrit] Revert "Revert "Include foreign files in ApiQueryPageImages"" - change (mediawiki...PageImages)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/243124 Change subject: Revert "Revert "Include foreign files in ApiQueryPageImages"" .. Revert "Revert "Include foreign files in ApiQueryPageImages"" This reverts commit 1690d99e369dbac3c7e11cf61a1b9e42d62150f6. This also fixes T114417 by testing whether there are missing titles in the File namespace before going on to operate on them anyway... Bug: T98791 Bug: T114417 Change-Id: I923e88dde3a8ced4921b4192d90b4f3dc4b19e7b --- M ApiQueryPageImages.php 1 file changed, 39 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/24/243124/1 diff --git a/ApiQueryPageImages.php b/ApiQueryPageImages.php index a629f6e..f5d6870 100644 --- a/ApiQueryPageImages.php +++ b/ApiQueryPageImages.php @@ -8,11 +8,40 @@ parent::__construct( $query, $moduleName, 'pi' ); } + /** +* Gets the set of titles to get page images for. +* +* Note well that the set of titles comprises the set of "good" titles +* (see {@see ApiPageSet::getGoodTitles}) union the set of "missing" +* titles in the File namespace that might correspond to foreign files. +* The latter are included because titles in the File namespace are +* expected to be found with {@see wfFindFile}. +* +* @return array A map of page ID, which will be negative in the case +* of missing titles in the File namespace, to Title object +*/ + private function getTitles() { + $pageSet = $this->getPageSet(); + $titles = $pageSet->getGoodTitles(); + + // T98791: We want foreign files to be treated like local files + // in #execute, so include the set of missing filespace pages, + // which were initially rejected in ApiPageSet#execute. + $missingTitles = $pageSet->getMissingTitlesByNamespace(); + $missingFileTitles = isset( $missingTitles[NS_FILE] ) + ? $missingTitles[NS_FILE] + : array(); + + // $titles is a map of ID to title object, which is ideal, + // whereas $missingFileTitles is a map of title text to ID. + $missingFileTitles = array_map( function ( $text ) { + return Title::newFromText( $text, NS_FILE ); + }, array_flip( $missingFileTitles ) ); + + return $titles + $missingFileTitles; + } + public function execute() { - $allTitles = $this->getPageSet()->getGoodTitles(); - if ( count( $allTitles ) == 0 ) { - return; - } $params = $this->extractRequestParams(); $prop = array_flip( $params['prop'] ); if ( !count( $prop ) ) { @@ -21,6 +50,12 @@ $size = $params['thumbsize']; $limit = $params['limit']; + $allTitles = $this->getTitles(); + + if ( count( $allTitles ) === 0 ) { + return; + } + // Find the offset based on the continue param $offset = 0; if ( isset( $params['continue'] ) ) { -- To view, visit https://gerrit.wikimedia.org/r/243124 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I923e88dde3a8ced4921b4192d90b4f3dc4b19e7b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Phuedx___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] releases: Move the base::firewall include into the role - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/243123 Change subject: releases: Move the base::firewall include into the role .. releases: Move the base::firewall include into the role Change-Id: I9e2cb756973d646d05cf92faa8eabef0ddf88ef7 --- M manifests/role/releases.pp M manifests/site.pp 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/243123/1 diff --git a/manifests/role/releases.pp b/manifests/role/releases.pp index 391fa08..e1f1c26 100644 --- a/manifests/role/releases.pp +++ b/manifests/role/releases.pp @@ -1,5 +1,6 @@ class role::releases { system::role { 'releases': description => 'Releases webserver' } +include base::firewall monitoring::service { 'http': description => 'HTTP', diff --git a/manifests/site.pp b/manifests/site.pp index 229b0fd..a8298f2 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -293,7 +293,6 @@ # http://releases.wikimedia.org node 'caesium.eqiad.wmnet' { role releases -include base::firewall include standard } -- To view, visit https://gerrit.wikimedia.org/r/243123 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e2cb756973d646d05cf92faa8eabef0ddf88ef7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Hiera-based assignment of grains for debdeploy - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/243142 Change subject: WIP: Hiera-based assignment of grains for debdeploy .. WIP: Hiera-based assignment of grains for debdeploy Also add two initial grains to test with. Bug: T111006 Change-Id: I83c5bb03e341032a34de44f4108d3e46623554b0 --- M hieradata/role/common/gitblit.yaml M hieradata/role/common/ve.yaml M modules/base/manifests/debdeploy.pp 3 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/42/243142/1 diff --git a/hieradata/role/common/gitblit.yaml b/hieradata/role/common/gitblit.yaml index af20d47..ed89533 100644 --- a/hieradata/role/common/gitblit.yaml +++ b/hieradata/role/common/gitblit.yaml @@ -1,3 +1,6 @@ admin::groups: - gerrit-root - gerrit-admin +debdeploy::grains: + debdeploy-gitblit: +value: standard diff --git a/hieradata/role/common/ve.yaml b/hieradata/role/common/ve.yaml index 7bddf05a..d400f68 100644 --- a/hieradata/role/common/ve.yaml +++ b/hieradata/role/common/ve.yaml @@ -1,2 +1,5 @@ admin::groups: - chromium-admin +debdeploy::grains: + debdeploy-ve: +value: standard diff --git a/modules/base/manifests/debdeploy.pp b/modules/base/manifests/debdeploy.pp index 758587d..0c062c0 100644 --- a/modules/base/manifests/debdeploy.pp +++ b/modules/base/manifests/debdeploy.pp @@ -8,4 +8,7 @@ package { 'debdeploy-minion': ensure => present, } + +$grains = hiera_hash('debdeploy::grains') +create_resources(salt::grain, $grains) } -- To view, visit https://gerrit.wikimedia.org/r/243142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83c5bb03e341032a34de44f4108d3e46623554b0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mw.Upload.BookletLayout: Show errors and try to recover from... - change (mediawiki/core)
Prtksxna has uploaded a new change for review. https://gerrit.wikimedia.org/r/243144 Change subject: mw.Upload.BookletLayout: Show errors and try to recover from warnings .. mw.Upload.BookletLayout: Show errors and try to recover from warnings Show useful errors and try and recover from warning by changing the state of the upload. Bug: T114130 Change-Id: I08704108704ffaa70245c5facfca4b063a61f01b --- M resources/Resources.php M resources/src/mediawiki/mediawiki.Upload.BookletLayout.js M resources/src/mediawiki/mediawiki.Upload.js 3 files changed, 55 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/44/243144/1 diff --git a/resources/Resources.php b/resources/Resources.php index ccc3cd5..b851916 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1220,6 +1220,7 @@ 'dependencies' => array( 'oojs-ui', 'mediawiki.Upload', + 'mediawiki.jqueryMsg', ), 'messages' => array( 'upload-process-error', @@ -1230,6 +1231,8 @@ 'upload-form-label-infoform-description', 'upload-form-label-usage-title', 'upload-form-label-usage-filename', + 'fileexists', + 'filepageexists', ), ), 'mediawiki.ForeignStructuredUpload.BookletLayout' => array( diff --git a/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js b/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js index d1e01b1..8146a4b 100644 --- a/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js +++ b/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js @@ -232,23 +232,9 @@ this.upload.setFilename( this.getFilename() ); this.upload.setText( this.getText() ); - this.uploadPromise.always( function () { - layout.upload.finishStashUpload().always( function () { + this.uploadPromise.then( function () { + layout.upload.finishStashUpload().then( function () { var name; - - if ( layout.upload.getState() === mw.Upload.State.ERROR ) { - deferred.reject( new OO.ui.Error( mw.msg( 'upload-process-error' ), { - recoverable: false - } ) ); - return false; - } - - if ( layout.upload.getState() === mw.Upload.State.WARNING ) { - deferred.reject( new OO.ui.Error( mw.msg( 'upload-process-warning' ), { - recoverable: false - } ) ); - return false; - } // Normalize page name and localise the 'File:' prefix name = new mw.Title( 'File:' + layout.upload.getFilename() ).toString(); @@ -257,6 +243,42 @@ deferred.resolve(); layout.emit( 'fileSaved' ); + }, function () { + var stateDetails = layout.upload.getStateDetails(); + console.log( stateDetails ); + + if ( layout.upload.getState() === mw.Upload.State.ERROR ) { + deferred.reject( new OO.ui.Error( stateDetails, { + recoverable: false + } ) ); + return false; + } + + if ( layout.upload.getState() === mw.Upload.State.WARNING ) { + if ( stateDetails.exists !== undefined ) { + deferred.reject( new OO.ui.Error( + $( '' ).html( + mw.message( 'filepageexists', stateDetails.exists ).parse() + ) + ) ); + } + + if ( stateDetails.duplicate !== undefined ) { + deferred.reject( new OO.ui.Error( + $( '' ).html( + mw.message( 'fileexists',
[MediaWiki-commits] [Gerrit] otrs: Fix typo in scheduler cron entry - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: otrs: Fix typo in scheduler cron entry .. otrs: Fix typo in scheduler cron entry missing the /otrs/ part Change-Id: Id05cd96b5435e723b50c44142dcc66d86c829f57 --- M modules/otrs/files/crontab.otrs-scheduler 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/modules/otrs/files/crontab.otrs-scheduler b/modules/otrs/files/crontab.otrs-scheduler index 8bd1596..c17de5f 100644 --- a/modules/otrs/files/crontab.otrs-scheduler +++ b/modules/otrs/files/crontab.otrs-scheduler @@ -3,4 +3,4 @@ MAILTO="r...@wikimedia.org" # check scheduler status -*/5 * * * * otrs /opt/bin/otrs.Scheduler.pl -w 1 > /dev/null 2>&1 +*/5 * * * * otrs /opt/otrs/bin/otrs.Scheduler.pl -w 1 > /dev/null 2>&1 -- To view, visit https://gerrit.wikimedia.org/r/243152 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id05cd96b5435e723b50c44142dcc66d86c829f57 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move base::firewall include into the role - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/243122 Change subject: Move base::firewall include into the role .. Move base::firewall include into the role All image scalers use ferm now, so move the base::firewall include into the role. Change-Id: Ie4545513fa70d7bfab2ed88d3e71bbc9736365b9 --- M manifests/role/mediawiki.pp M manifests/site.pp 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/243122/1 diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp index b24f35d..17549a0 100644 --- a/manifests/role/mediawiki.pp +++ b/manifests/role/mediawiki.pp @@ -150,6 +150,7 @@ include ::mediawiki::multimedia include ::role::mediawiki::webserver +include base::firewall } class role::mediawiki::videoscaler { diff --git a/manifests/site.pp b/manifests/site.pp index 229b0fd..5062ec4 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1982,7 +1982,6 @@ # mw1153-1160 are imagescalers (trusty) node /^mw11(5[3-9]|60)\.eqiad\.wmnet$/ { role mediawiki::imagescaler -include base::firewall } # mw1161-1188 are apaches @@ -2062,7 +2061,6 @@ #mw2086-mw2089 are imagescalers node /^mw208[6-9]\.codfw\.wmnet$/ { role mediawiki::imagescaler -include base::firewall } #mw2090-mw2119 are appservers @@ -2082,7 +2080,6 @@ #mw2148-mw2151 are imagescalers node /^mw21(4[89]|5[01])\.codfw\.wmnet$/ { role mediawiki::imagescaler -include base::firewall } #mw2152 is a videoscaler -- To view, visit https://gerrit.wikimedia.org/r/243122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4545513fa70d7bfab2ed88d3e71bbc9736365b9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Enable jscs jsDoc rule 'checkParamNames' and make pass - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: build: Enable jscs jsDoc rule 'checkParamNames' and make pass .. build: Enable jscs jsDoc rule 'checkParamNames' and make pass * order @param annotations correctly in wikibase.view.ViewFactory * add missing @param names to wikibase.entityChangers constructors DescriptionsChanger, LabelsChanger and SiteLinksChanger * moved an @event annotation after a constructor in jQuery.wikibase.snakview.variations.Variation Bug: T110811 Change-Id: I9ce24f32bf36672f6876fc46ef5cfdbf5910357f --- M .jscsrc M view/resources/jquery/wikibase/snakview/snakview.variations.Variation.js M view/resources/wikibase/entityChangers/DescriptionsChanger.js M view/resources/wikibase/entityChangers/LabelsChanger.js M view/resources/wikibase/entityChangers/SiteLinksChanger.js M view/resources/wikibase/view/ViewFactory.js 6 files changed, 17 insertions(+), 17 deletions(-) Approvals: Hoo man: Looks good to me, but someone else must approve Thiemo Mättig (WMDE): Looks good to me, approved Jeroen De Dauw: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc index bae0d05..0ab8d67 100644 --- a/.jscsrc +++ b/.jscsrc @@ -13,7 +13,7 @@ "jsDoc": { // what we don't yet follow is commented out //"checkAnnotations": "jsduck5", - //"checkParamNames": true, + "checkParamNames": true, "requireParamTypes": true, "checkRedundantParams": true, //"checkReturnTypes": true, diff --git a/view/resources/jquery/wikibase/snakview/snakview.variations.Variation.js b/view/resources/jquery/wikibase/snakview/snakview.variations.Variation.js index 32c445a..5433f19 100644 --- a/view/resources/jquery/wikibase/snakview/snakview.variations.Variation.js +++ b/view/resources/jquery/wikibase/snakview/snakview.variations.Variation.js @@ -35,11 +35,6 @@ * * @throws {Error} if a required parameter is not specified properly. */ - /** -* @event afterdraw -* Triggered on the `Variation` object after drawing the `Variation`. -* @param {jQuery.Event} event -*/ var SELF = $.wikibase.snakview.variations.Variation = function WbSnakviewVariationsVariation( viewState, $viewPort, @@ -64,6 +59,11 @@ this._init(); }; + /** +* @event afterdraw +* Triggered on the `Variation` object after drawing the `Variation`. +* @param {jQuery.Event} event +*/ $.extend( SELF.prototype, { /** * A unique class for this `Variation`, applied to the `Variation` DOM's `class` attribute. diff --git a/view/resources/wikibase/entityChangers/DescriptionsChanger.js b/view/resources/wikibase/entityChangers/DescriptionsChanger.js index c20a80d..3c73bd9 100644 --- a/view/resources/wikibase/entityChangers/DescriptionsChanger.js +++ b/view/resources/wikibase/entityChangers/DescriptionsChanger.js @@ -7,9 +7,9 @@ var MODULE = wb.entityChangers; /** -* @param {wikibase.api.RepoApi} -* @param {wikibase.RevisionStore} -* @param {wikibase.datamodel.Entity} +* @param {wikibase.api.RepoApi} api +* @param {wikibase.RevisionStore} revisionStore +* @param {wikibase.datamodel.Entity} entity */ var SELF = MODULE.DescriptionsChanger = function WbEntityChangersDescriptionsChanger( api, revisionStore, entity ) { this._api = api; diff --git a/view/resources/wikibase/entityChangers/LabelsChanger.js b/view/resources/wikibase/entityChangers/LabelsChanger.js index 66dff8c..f1d6b96 100644 --- a/view/resources/wikibase/entityChangers/LabelsChanger.js +++ b/view/resources/wikibase/entityChangers/LabelsChanger.js @@ -7,9 +7,9 @@ var MODULE = wb.entityChangers; /** -* @param {wikibase.api.RepoApi} -* @param {wikibase.RevisionStore} -* @param {wikibase.datamodel.Entity} +* @param {wikibase.api.RepoApi} api +* @param {wikibase.RevisionStore} revisionStore +* @param {wikibase.datamodel.Entity} entity */ var SELF = MODULE.LabelsChanger = function WbEntityChangersLabelsChanger( api, revisionStore, entity ) { this._api = api; diff --git a/view/resources/wikibase/entityChangers/SiteLinksChanger.js b/view/resources/wikibase/entityChangers/SiteLinksChanger.js index 4b06c7f..12987e7 100644 --- a/view/resources/wikibase/entityChangers/SiteLinksChanger.js +++ b/view/resources/wikibase/entityChangers/SiteLinksChanger.js @@ -7,9 +7,9 @@ var MODULE = wb.entityChangers; /** -* @param {wikibase.api.RepoApi} -* @param {wikibase.RevisionStore} -* @param {wikibase.datamodel.Entity} +*
[MediaWiki-commits] [Gerrit] Fix merging of entity usage aspects - change (mediawiki...Wikibase)
Jonas Kress (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/243135 Change subject: Fix merging of entity usage aspects .. Fix merging of entity usage aspects Fix merging of entity usage aspects by using array_merge instead of '+' in AffectedPagesFinder. Found while investigating bug T112649. Bug: T112649 Change-Id: I84f3b4dfa76731e4648a19913d0ad14e32ab02fb --- M client/includes/Changes/AffectedPagesFinder.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/35/243135/1 diff --git a/client/includes/Changes/AffectedPagesFinder.php b/client/includes/Changes/AffectedPagesFinder.php index b8d1376..69a5339 100644 --- a/client/includes/Changes/AffectedPagesFinder.php +++ b/client/includes/Changes/AffectedPagesFinder.php @@ -188,7 +188,7 @@ // @todo: more than one entity at once! array( $entityId ), // Look up pages that are marked as either using one of the changed or all aspects - $changedAspects + array( EntityUsage::ALL_USAGE ) + array_merge( $changedAspects, array( EntityUsage::ALL_USAGE ) ) ); // @todo: use iterators throughout! -- To view, visit https://gerrit.wikimedia.org/r/243135 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84f3b4dfa76731e4648a19913d0ad14e32ab02fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE)___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rough YAML linter for *.yaml.example files - change (wikimedia...tools)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/243134 Change subject: Rough YAML linter for *.yaml.example files .. Rough YAML linter for *.yaml.example files Iterate the repository for files matching '.yaml' or '.yaml.example' and attempt to safe_load() them. YAML files containing multiple documents are not supported, only the first document will be validated. That is because safe_load_all() does not raise any error for some reason. Add test-requirements.txt to ship nose and PyYAML. Introduce tox env 'yamllint' and add it to the default list of env to run (envlist). Usage is either: tox tox -eyamllint Bug: T114470 Change-Id: I076235213a81fd6431919f28fcead6c72f5cabb2 --- A test-requirements.txt A tests/yamllint.py M tox.ini 3 files changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools refs/changes/34/243134/1 diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 000..9c7c637 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +nose +PyYAML diff --git a/tests/yamllint.py b/tests/yamllint.py new file mode 100644 index 000..0feeef8 --- /dev/null +++ b/tests/yamllint.py @@ -0,0 +1,19 @@ +import os.path +import yaml + + +def test_valid_yaml(): +basedir = os.path.realpath(os.path.join(__file__, '..', '..')) +yaml_files = [] +for dirpath, dirnames, filenames in os.walk(basedir): +yaml_files.extend( +[os.path.join(dirpath, f) for f in filenames + if f.endswith('.yaml') or f.endswith('.yaml.example')] +) +for yaml_file in yaml_files: +yield is_valid_yaml, yaml_file + + +def is_valid_yaml(filename): +with open(filename, 'r') as f: +yaml.safe_load(f) diff --git a/tox.ini b/tox.ini index 416a825..b943a82 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,10 @@ [tox] skipsdist = True -envlist = flake8 +envlist = flake8,yamllint + +[testenv:yamllint] +commands = nosetests {posargs} {toxinidir}/tests/yamllint.py +deps = -rtest-requirements.txt [testenv:flake8] commands = flake8 {posargs} -- To view, visit https://gerrit.wikimedia.org/r/243134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I076235213a81fd6431919f28fcead6c72f5cabb2 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools Gerrit-Branch: master Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove yamllint - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: Remove yamllint .. Remove yamllint To lint yaml we are using python-yaml which has a few problems: - it can load an arbitrary python object which is rather unsafe - does not support multiple documents (T86194) - it is only for python, not for other languages implementations we use such as the javascript one. Get rid of our lame YAML linter, in favor of having developers write a test to validate their files. CI configuration is updated by https://gerrit.wikimedia.org/r/191881 Bug: T95890 Bug: T96014 Change-Id: I8e61ededf50c6ce691ffcdda35cfe6b7d09f101f --- D tools/yamllint.py 1 file changed, 0 insertions(+), 61 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/tools/yamllint.py b/tools/yamllint.py deleted file mode 100755 index ffba50f..000 --- a/tools/yamllint.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python -# -# -# Copyright 2013, Antoine Musso -# Copyright 2013, Wikimedia Foundation Inc. -# -# Released under GPLv2 -# -# Disable pylint checks about globals requiring upercase first: -# pylint: disable=C0103 - -"""A basic script that recursively find YAML files under one or more - directories and attempt to parse them using PyYAML. -""" -import argparse -import logging -import os -import sys -import yaml - -parser = argparse.ArgumentParser(description=__doc__) -parser.add_argument('-v', '-verbose', dest='verbose', action='count', -help='increase verbosity') -parser.add_argument('dirs', nargs='+', -help='paths to look for YAML files') -args = parser.parse_args() - -# Set up verbosity -if args.verbose == 1: -log_level = logging.INFO -elif args.verbose == 2: -log_level = logging.DEBUG -else: -log_level = logging.WARNING - -logging.basicConfig(level=log_level, format='%(levelname)s %(message)s') - -errors = 0 -files = 0 -for path in args.dirs: -for root, dirnames, filenames in os.walk(path): -for a_file in filenames: -if a_file.lower().endswith(('.yaml', '.yml')): -full_path = os.path.join(root, a_file) -logging.debug("Invoking yaml.safe_load_all on %s", full_path) -try: -files += 1 -yaml.safe_load(file(full_path, 'r')) -logging.info('[PASS] ' + full_path) -except Exception, exc: -logging.error("Invalid file %s raised: %s", - full_path, exc, exc_info=False) -errors += 1 - -if errors == 0: -print "Good, all %s files passed!" % files -sys.exit(0) -else: -logging.error("Oh no, found %s files with errors out of %s files.", - errors, files) -sys.exit(1) -- To view, visit https://gerrit.wikimedia.org/r/191882 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e61ededf50c6ce691ffcdda35cfe6b7d09f101f Gerrit-PatchSet: 5 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: HasharGerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] otrs: Ship systemd unit file for OTRS scheduler - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: otrs: Ship systemd unit file for OTRS scheduler .. otrs: Ship systemd unit file for OTRS scheduler Versions of OTRS > 3.3.x require an OTRS scheduler to run as a service under the otrs user. Ship a systemd file to enable that behavior. The daemon does not have a restart command Change-Id: I380b5a6a173b61e1551c07d6fae49cf8bf7d6f01 --- M modules/otrs/manifests/init.pp A modules/otrs/templates/otrs-scheduler.systemd.erb 2 files changed, 31 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/otrs/manifests/init.pp b/modules/otrs/manifests/init.pp index 7007915..3abc343 100644 --- a/modules/otrs/manifests/init.pp +++ b/modules/otrs/manifests/init.pp @@ -131,4 +131,19 @@ ensure => link, target => '/opt/otrs/Kernel/Output/HTML/Standard', } + +# TODO: Remove the safeguard once we are jessie only +if os_version('debian >= jessie') { +base::service_unit { 'otrs-scheduler': +ensure => present, +upstart => false, +systemd => true, +refresh => true, +service_params => { +enable => true, +hasstatus => true, +hasrestart => false, +} +} +} } diff --git a/modules/otrs/templates/otrs-scheduler.systemd.erb b/modules/otrs/templates/otrs-scheduler.systemd.erb new file mode 100644 index 000..ed2fba1 --- /dev/null +++ b/modules/otrs/templates/otrs-scheduler.systemd.erb @@ -0,0 +1,16 @@ +# NOTE: This file is managed by Puppet +# Systemd unit for <%= @title %> +[Unit] +Description="<%= @title %> service" + +[Service] +User=otrs +Group=otrs +Restart=always +RestartSec=2s +TimeoutStopSec=60 +ExecStart=/opt/otrs/bin/otrs.Scheduler.pl -a start +ExecStop=/opt/otrs/bin/otrs.Scheduler.pl -a stop + +[Install] +WantedBy=multi-user.target -- To view, visit https://gerrit.wikimedia.org/r/242860 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I380b5a6a173b61e1551c07d6fae49cf8bf7d6f01 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add the new OTRS scheduler watchdog cron entry - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Add the new OTRS scheduler watchdog cron entry .. Add the new OTRS scheduler watchdog cron entry OTRS since 3.3.6 needs a cron entry for the otrs.Scheduler to work as a watchdog Change-Id: If68bd98cb6d4ecfed7c50d375d6a360130419ab5 --- A modules/otrs/files/crontab.otrs-scheduler M modules/otrs/manifests/init.pp 2 files changed, 16 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/otrs/files/crontab.otrs-scheduler b/modules/otrs/files/crontab.otrs-scheduler new file mode 100644 index 000..8bd1596 --- /dev/null +++ b/modules/otrs/files/crontab.otrs-scheduler @@ -0,0 +1,6 @@ +# installed by puppet + +MAILTO="r...@wikimedia.org" + +# check scheduler status +*/5 * * * * otrs /opt/bin/otrs.Scheduler.pl -w 1 > /dev/null 2>&1 diff --git a/modules/otrs/manifests/init.pp b/modules/otrs/manifests/init.pp index 3abc343..1ca2b1d 100644 --- a/modules/otrs/manifests/init.pp +++ b/modules/otrs/manifests/init.pp @@ -133,6 +133,9 @@ } # TODO: Remove the safeguard once we are jessie only +# NOTE: We couple the move to 4.0.x OTRS with the move to jessie, since that +# should not bite back as after the move the 3.2.x install we have will be +# decomissioned if os_version('debian >= jessie') { base::service_unit { 'otrs-scheduler': ensure => present, @@ -145,5 +148,12 @@ hasrestart => false, } } +file { '/etc/cron.d/otrs-scheduler': +ensure => 'file', +owner => 'root', +group => 'root', +mode => '0444', +source => 'puppet:///modules/otrs/crontab.otrs-scheduler', +} } } -- To view, visit https://gerrit.wikimedia.org/r/242184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If68bd98cb6d4ecfed7c50d375d6a360130419ab5 Gerrit-PatchSet: 7 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a .gitreview file - change (operations...mariadb)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Add a .gitreview file .. Add a .gitreview file Useful for setting up git review Change-Id: I4abcc85bbda0350440ee7100a6d901ef35c5b07f --- A .gitreview 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..81fa52e --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=operations/puppet/mariadb.git +defaultbranch=master -- To view, visit https://gerrit.wikimedia.org/r/242453 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4abcc85bbda0350440ee7100a6d901ef35c5b07f Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet/mariadb Gerrit-Branch: master Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jjb: expand git-cxserver-and-deploy-repos macro - change (integration/config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/243149 Change subject: jjb: expand git-cxserver-and-deploy-repos macro .. jjb: expand git-cxserver-and-deploy-repos macro Only used once. Get rid of cxserver.yaml. Change-Id: I15ae9b38308bc8247e7988ccb7136fdf48b9044a --- M jjb/beta.yaml D jjb/cxserver.yaml 2 files changed, 3 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/49/243149/1 diff --git a/jjb/beta.yaml b/jjb/beta.yaml index b027e61..5af6749 100644 --- a/jjb/beta.yaml +++ b/jjb/beta.yaml @@ -200,7 +200,9 @@ logrotate: daysToKeep: 15 builders: - - git-cxserver-and-deploy-repos + - shell: | +/srv/deployment/integration/slave-scripts/bin/multigit.sh \ + mediawiki/services/cxserver mediawiki/services/cxserver/deploy - shell: | CXSERVER_TARGET=/srv/deployment/cxserver mkdir -p "$CXSERVER_TARGET" diff --git a/jjb/cxserver.yaml b/jjb/cxserver.yaml deleted file mode 100644 index 0368e4c..000 --- a/jjb/cxserver.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# Builder macro that uses multigit.sh to fetch cxserver and cxserver/deploy -# applying triggered change patch to the proper repository -- builder: -name: git-cxserver-and-deploy-repos -builders: - - shell: | -/srv/deployment/integration/slave-scripts/bin/multigit.sh \ - mediawiki/services/cxserver mediawiki/services/cxserver/deploy - -- To view, visit https://gerrit.wikimedia.org/r/243149 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15ae9b38308bc8247e7988ccb7136fdf48b9044a Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable ferm on analytics1002 - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/243150 Change subject: Enable ferm on analytics1002 .. Enable ferm on analytics1002 As discussed earlier, let's start with the standby and iptables logging and proceed with the master if everything is alright. Change-Id: If21c9a95f82a7a5629a2fa2c78caf7aa618a812e --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/50/243150/1 diff --git a/manifests/site.pp b/manifests/site.pp index 229b0fd..72fed36 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -75,6 +75,7 @@ role analytics::hadoop::standby include standard +include base::firewall } -- To view, visit https://gerrit.wikimedia.org/r/243150 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If21c9a95f82a7a5629a2fa2c78caf7aa618a812e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable ferm on analytics1001 - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/243151 Change subject: Enable ferm on analytics1001 .. Enable ferm on analytics1001 Change-Id: I35d306f27eeb83b6da3df79154dbbfa61d4b5cfe --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/51/243151/1 diff --git a/manifests/site.pp b/manifests/site.pp index 72fed36..61b29c9 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -67,6 +67,7 @@ role analytics::hadoop::master include standard +include base::firewall } -- To view, visit https://gerrit.wikimedia.org/r/243151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35d306f27eeb83b6da3df79154dbbfa61d4b5cfe Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add block/inline icons - change (mediawiki...TemplateData)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/243155 Change subject: Add block/inline icons .. Add block/inline icons Change-Id: I7d07af249318e4f39d8e4a29d1fa3ccdd216e63b --- M modules/ext.templateDataGenerator.ui.css M modules/ext.templateDataGenerator.ui.tdDialog.js A modules/images/block-ltr.svg A modules/images/block-rtl.svg A modules/images/inline.svg 5 files changed, 30 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData refs/changes/55/243155/1 diff --git a/modules/ext.templateDataGenerator.ui.css b/modules/ext.templateDataGenerator.ui.css index 32128c5..e54c842 100644 --- a/modules/ext.templateDataGenerator.ui.css +++ b/modules/ext.templateDataGenerator.ui.css @@ -79,3 +79,13 @@ /* @embed */ background-image: url(images/parameter-set-ltr.svg); } + +.oo-ui-icon-template-format-block { + /* @embed */ + background-image: url(images/block-ltr.svg); +} + +.oo-ui-icon-template-format-inline { + /* @embed */ + background-image: url(images/inline.svg); +} diff --git a/modules/ext.templateDataGenerator.ui.tdDialog.js b/modules/ext.templateDataGenerator.ui.tdDialog.js index c66ecd0..dc8bf97 100644 --- a/modules/ext.templateDataGenerator.ui.tdDialog.js +++ b/modules/ext.templateDataGenerator.ui.tdDialog.js @@ -157,13 +157,14 @@ this.templateFormatSelectWidget = new OO.ui.ButtonSelectWidget(); this.templateFormatSelectWidget.addItems( [ - // TODO: add nice icons? new OO.ui.ButtonOptionWidget( { data: 'inline', + icon: 'template-format-inline', label: mw.msg( 'templatedata-modal-format-inline' ) } ), new OO.ui.ButtonOptionWidget( { data: 'block', + icon: 'template-format-block', label: mw.msg( 'templatedata-modal-format-block' ) } ) ] ); diff --git a/modules/images/block-ltr.svg b/modules/images/block-ltr.svg new file mode 100644 index 000..ef37684 --- /dev/null +++ b/modules/images/block-ltr.svg @@ -0,0 +1,6 @@ + +http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 24"> + + + + diff --git a/modules/images/block-rtl.svg b/modules/images/block-rtl.svg new file mode 100644 index 000..ce7908c --- /dev/null +++ b/modules/images/block-rtl.svg @@ -0,0 +1,6 @@ + +http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 24"> + + + + diff --git a/modules/images/inline.svg b/modules/images/inline.svg new file mode 100644 index 000..e6a59ec --- /dev/null +++ b/modules/images/inline.svg @@ -0,0 +1,6 @@ + +http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 24"> + + + + -- To view, visit https://gerrit.wikimedia.org/r/243155 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d07af249318e4f39d8e4a29d1fa3ccdd216e63b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateData 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] build: Enable jscs jsDoc rule 'requireReturnTypes' and make ... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: build: Enable jscs jsDoc rule 'requireReturnTypes' and make pass .. build: Enable jscs jsDoc rule 'requireReturnTypes' and make pass As in MediaWiki core since b159471dd1063e397f117305f8b65e075de58131 Bug: T110811 Change-Id: Ib9ee66fb4dc2e745ed364ae66ca21e2debfd0008 --- M .jscsrc M lib/resources/wikibase.Site.js M lib/resources/wikibase.sites.js M view/resources/jquery/wikibase/jquery.wikibase.statementgrouplabelscroll.js M view/resources/jquery/wikibase/snakview/snakview.SnakTypeSelector.js M view/resources/wikibase/wikibase.getLanguageNameByCode.js 6 files changed, 16 insertions(+), 16 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc index c82e371..d3f8d33 100644 --- a/.jscsrc +++ b/.jscsrc @@ -18,7 +18,7 @@ "checkRedundantParams": true, //"checkReturnTypes": true, "checkRedundantReturns": true, - //"requireReturnTypes": true, + "requireReturnTypes": true, "checkTypes": "strictNativeCase", "checkRedundantAccess": true //"requireNewlineAfterDescription": true diff --git a/lib/resources/wikibase.Site.js b/lib/resources/wikibase.Site.js index 5afb3a7..31a0b10 100644 --- a/lib/resources/wikibase.Site.js +++ b/lib/resources/wikibase.Site.js @@ -31,7 +31,7 @@ /** * Returns the full name of the site. This will return the name in the users language. * -* @return string +* @return {string} */ getName: function() { return this._siteDetails.name; @@ -40,7 +40,7 @@ /** * Returns the short name of the site. This will return the name in the users language. * -* @return string +* @return {string} */ getShortName: function() { return this._siteDetails.shortName; @@ -51,7 +51,7 @@ * * @since 0.4 * -* @return string +* @return {string} */ getGroup: function() { return this._siteDetails.group; @@ -63,7 +63,7 @@ * @note: this might not be necessary later since we might want to do only API call to the *base wiki which will handle the calls to the sites. * -* @return string +* @return {string} */ getApi: function() { return this._siteDetails.apiUrl; @@ -78,7 +78,7 @@ * what parameters to pass in case we have a non-MW installation!) * * @param {string} pageTitle title of the page within the site -* @return string +* @return {string} */ getUrlTo: function( pageTitle ) { pageTitle = this._urlEncodeSite( $.trim( pageTitle ) ); @@ -89,7 +89,7 @@ * Returns a html link to a site of the site. To get the url only, use getUrlTo(). * * @param {string} pageTitle title of the site within the site -* @return jQuery link to the site +* @return {jQuery} link to the site */ getLinkTo: function( pageTitle ) { var url = this.getUrlTo( pageTitle ); @@ -102,7 +102,7 @@ /** * Returns the site's language code. * -* @return string language code +* @return {string} language code */ getLanguageCode: function() { return this._siteDetails.languageCode; @@ -125,7 +125,7 @@ * This should propably be over written in case the site is not a MediaWiki installation. * * @param {string} pageTitle -* @return string +* @return {string} */ _urlEncodeSite: function( pageTitle ) { // we don't create a mw.Title here since the given title should be normalized and could be one from a foreign diff --git a/lib/resources/wikibase.sites.js b/lib/resources/wikibase.sites.js index d8fb519..a191eff 100644 --- a/lib/resources/wikibase.sites.js +++ b/lib/resources/wikibase.sites.js @@ -69,7 +69,7 @@ /** * Returns an array with all known site groups. * -* @return string[] +* @return {string[]} */ this.getSiteGroups = function() { var groups = [], @@ -100,7 +100,7 @@ * related to the given ID, null will be returned. * * @param {string} siteId -* @return wikibase.Site|null +* @return {wikibase.Site|null} */ this.getSite = function( siteId ) { var sites = this.getSites(), @@ -120,7 +120,7 @@ * the Site object. *
[MediaWiki-commits] [Gerrit] Performance fix for sites using interwiki_putfirst option - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Performance fix for sites using interwiki_putfirst option .. Performance fix for sites using interwiki_putfirst option Bug: T109077 Change-Id: I97e8ecf44c3e8099113068c343f35af94bc02e84 (cherry picked from commit d3f9b7f0c2165b562d35b0da04fe9dd48a45b9fa) --- M pywikibot/textlib.py 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, approved Malafaya: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index a1d2c55..b40aba4 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -714,8 +714,9 @@ if putfirst: # In this case I might have to change the order firstsites = [] +validlanglinks = insite.validLanguageLinks() for code in putfirst: -if code in insite.validLanguageLinks(): +if code in validlanglinks: site = insite.getSite(code=code) if site in sites: del sites[sites.index(site)] -- To view, visit https://gerrit.wikimedia.org/r/243114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97e8ecf44c3e8099113068c343f35af94bc02e84 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John VandenbergGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Malafaya Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] interwiki.py: check for category before emptiness - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: interwiki.py: check for category before emptiness .. interwiki.py: check for category before emptiness Currently, page.isEmpty() requires parsing the whole page and doing some removals (langlinks and categories) which takes up significant CPU time. There are 2 checks which use page.isEmpty() as the starting condition while having a much simpler second condition of just checking the page namespace. In this patch, I reversed the checks order. For categories, the time taken in batchLoaded() is reduced to about 30% of the original time. Change-Id: I00375411ca15658c22ae6bdb49588ec9f03b8c69 (cherry picked from commit 330ebe54492c9cf7c787a3c272872d778ba34fab) --- M scripts/interwiki.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: John Vandenberg: Looks good to me, approved Malafaya: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/scripts/interwiki.py b/scripts/interwiki.py index fa26860..ca83ff4 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -1364,7 +1364,7 @@ # must be behind the page.isRedirectPage() part # otherwise a redirect error would be raised -elif page.isEmpty() and not page.isCategory(): +elif not page.isCategory() and page.isEmpty(): globalvar.remove.append(unicode(page)) if not globalvar.quiet: pywikibot.output(u"NOTE: %s is empty. Skipping." % page) @@ -1449,7 +1449,7 @@ pywikibot.output(u'File autonomous_problems.dat open or corrupted! Try again with -restore.') sys.exit() iw = () -elif page.isEmpty() and not page.isCategory(): +elif not page.isCategory() and page.isEmpty(): globalvar.remove.append(unicode(page)) if not globalvar.quiet: pywikibot.output(u"NOTE: %s is empty; ignoring it and its interwiki links" -- To view, visit https://gerrit.wikimedia.org/r/243049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00375411ca15658c22ae6bdb49588ec9f03b8c69 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John VandenbergGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Malafaya Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] '-ignore' parameter throws exception in interwiki.py - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: '-ignore' parameter throws exception in interwiki.py .. '-ignore' parameter throws exception in interwiki.py Bug: T108838 Change-Id: I2454d2a30efde7bd30a61fd9b2e85e6763f88daf (cherry picked from commit fb8ed4b3cae55b8f08ca39375d39b9ce601a7fe5) --- M scripts/interwiki.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, approved Malafaya: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/scripts/interwiki.py b/scripts/interwiki.py index fa26860..a63372e 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -583,7 +583,7 @@ elif arg.startswith('-neverlink:'): self.neverlink += arg[11:].split(",") elif arg.startswith('-ignore:'): -self.ignore += [pywikibot.Page(None, p) for p in arg[8:].split(",")] +self.ignore += [pywikibot.Page(pywikibot.Site(), p) for p in arg[8:].split(",")] elif arg.startswith('-ignorefile:'): ignorefile = arg[12:] ignorePageGen = pagegenerators.TextfilePageGenerator(ignorefile) -- To view, visit https://gerrit.wikimedia.org/r/243108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2454d2a30efde7bd30a61fd9b2e85e6763f88daf Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John VandenbergGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Malafaya Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix docs in PageEntityUsages - change (mediawiki...Wikibase)
Jonas Kress (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/243136 Change subject: Fix docs in PageEntityUsages .. Fix docs in PageEntityUsages Fix php docs in PageEntityUsages (return types) Change-Id: I3723b6afeee89334203f9514b22b83a1e1ff2d9f --- M client/includes/Usage/PageEntityUsages.php 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/36/243136/1 diff --git a/client/includes/Usage/PageEntityUsages.php b/client/includes/Usage/PageEntityUsages.php index b6f7f5b..f69f71f 100644 --- a/client/includes/Usage/PageEntityUsages.php +++ b/client/includes/Usage/PageEntityUsages.php @@ -85,7 +85,7 @@ * * @see getAspectKeys() * -* string[] Sorted list of aspect names (without modifiers). +* @return string[] Sorted list of aspect names (without modifiers). */ public function getAspects() { $aspects = array(); @@ -105,7 +105,7 @@ * * @see getAspects() * -* string[] Sorted list of full aspect names with modifiers. +* @return string[] Sorted list of full aspect names with modifiers. */ public function getAspectKeys() { $aspects = array(); @@ -174,6 +174,9 @@ return $aspects; } + /** +* @return string +*/ public function __toString() { $s = 'Page ' . $this->getPageId() . ' uses ('; $s .= implode( '|', array_keys( $this->getUsages() ) ); -- To view, visit https://gerrit.wikimedia.org/r/243136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3723b6afeee89334203f9514b22b83a1e1ff2d9f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE)___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] otrs: Fix typo in scheduler cron entry - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/243152 Change subject: otrs: Fix typo in scheduler cron entry .. otrs: Fix typo in scheduler cron entry missing the /otrs/ part Change-Id: Id05cd96b5435e723b50c44142dcc66d86c829f57 --- M modules/otrs/files/crontab.otrs-scheduler 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/52/243152/1 diff --git a/modules/otrs/files/crontab.otrs-scheduler b/modules/otrs/files/crontab.otrs-scheduler index 8bd1596..c17de5f 100644 --- a/modules/otrs/files/crontab.otrs-scheduler +++ b/modules/otrs/files/crontab.otrs-scheduler @@ -3,4 +3,4 @@ MAILTO="r...@wikimedia.org" # check scheduler status -*/5 * * * * otrs /opt/bin/otrs.Scheduler.pl -w 1 > /dev/null 2>&1 +*/5 * * * * otrs /opt/otrs/bin/otrs.Scheduler.pl -w 1 > /dev/null 2>&1 -- To view, visit https://gerrit.wikimedia.org/r/243152 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id05cd96b5435e723b50c44142dcc66d86c829f57 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