[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Allow enabling of tls/ssl (keep default of none for ...
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406145 ) Change subject: Gerrit: Allow enabling of tls/ssl (keep default of none for now) .. Gerrit: Allow enabling of tls/ssl (keep default of none for now) Change-Id: Ib105feca46c7e9602dd595228fb3518e481d7e3b --- M modules/gerrit/manifests/jetty.pp M modules/gerrit/templates/gerrit.config.erb 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/45/406145/1 diff --git a/modules/gerrit/manifests/jetty.pp b/modules/gerrit/manifests/jetty.pp index dc35759..8842aab 100644 --- a/modules/gerrit/manifests/jetty.pp +++ b/modules/gerrit/manifests/jetty.pp @@ -18,6 +18,7 @@ $log_port = '4560', $config = 'gerrit.config.erb', $git_open_files = 2, +$smtp_encryption = 'none', ) { group { 'gerrit2': diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index d7ab5c6..31ae707 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -173,6 +173,7 @@ includeDiff = true connectTimeout = 1 min smtpServer = <%= @mail_smarthost[0] %> +smtpEncryption = <%= @smtp_encryption %> [sshd] <%- if @slave %> listenAddress = off -- To view, visit https://gerrit.wikimedia.org/r/406145 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib105feca46c7e9602dd595228fb3518e481d7e3b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Strip everything before the first pf token
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406057 ) Change subject: Strip everything before the first pf token .. Strip everything before the first pf token In this isolate case, {{safesubst:#if:{{{1} only "subst:" is part of the same token as the prefix so `normalizeTarget` doesn't take care of remove the "safesubst:" The fix here is from noting that we wouldn't be at this place in the code if the target didn't normalize a canonical function name, so the contents before the prefix can be safely discarded. This is another patch along the line of 5608e83 and bcd5572 Bug: T185643 Change-Id: I7002804fcf5305ffb6c88d93c201d9e972f9037f --- M lib/wt2html/tt/TemplateHandler.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/wt2html/tt/TemplateHandler.js b/lib/wt2html/tt/TemplateHandler.js index bd00531..33968e4 100644 --- a/lib/wt2html/tt/TemplateHandler.js +++ b/lib/wt2html/tt/TemplateHandler.js @@ -473,7 +473,7 @@ if (canonicalFunctionName !== undefined) { // Extract toks that make up pfArg var pfArgToks; - var re = new RegExp(prefix, 'i'); + var re = new RegExp('^(.*?)' + prefix, 'i'); // Because of the lenient stringifying above, we need to find the prefix var i = targetToks.findIndex(function(t) { -- To view, visit https://gerrit.wikimedia.org/r/406057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7002804fcf5305ffb6c88d93c201d9e972f9037f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Sbailey Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Remove hardcoding of the smtp port
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406144 ) Change subject: Gerrit: Remove hardcoding of the smtp port .. Gerrit: Remove hardcoding of the smtp port Gerrit uses sane defaults: 25 if not encrypted, or 465 if smtpEncryption is 'ssl' or 'tls' Change-Id: Iee2b6ee5c05be382b420c13e659ac796c0f7e6bf --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/44/406144/1 diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index ac4b8dc..d7ab5c6 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -171,7 +171,6 @@ ownerGroup = ldap/ops [sendemail] includeDiff = true -smtpServerPort = 25 connectTimeout = 1 min smtpServer = <%= @mail_smarthost[0] %> [sshd] -- To view, visit https://gerrit.wikimedia.org/r/406144 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee2b6ee5c05be382b420c13e659ac796c0f7e6bf Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Add ldap.connectTimeout
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406143 ) Change subject: Gerrit: Add ldap.connectTimeout .. Gerrit: Add ldap.connectTimeout No timeout is kinda insane. Change-Id: Ieb18d392155068756a707fb057377f4886f127c3 --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/406143/1 diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index ac4b8dc..012e7e6 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -129,6 +129,7 @@ groupScope = one # Fixes T152640 localUsernameToLowerCase = true +connectTimeout = 5 s [lfs] plugin = lfs [mimetype "application/javascript"] -- To view, visit https://gerrit.wikimedia.org/r/406143 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb18d392155068756a707fb057377f4886f127c3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use array_merge in RevisionStore::getArchiveQueryInfo
Addshore has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406141 ) Change subject: Use array_merge in RevisionStore::getArchiveQueryInfo .. Use array_merge in RevisionStore::getArchiveQueryInfo [ 'foo' ] + [ 'bar' ] = [ 'foo' ] which is incorrect. Change-Id: I5cb0926b7f0eb91c8864a17791a452965eb29d7e --- M includes/Storage/RevisionStore.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/41/406141/1 diff --git a/includes/Storage/RevisionStore.php b/includes/Storage/RevisionStore.php index 79ecec6..87d6f68 100644 --- a/includes/Storage/RevisionStore.php +++ b/includes/Storage/RevisionStore.php @@ -1639,9 +1639,10 @@ */ public function getArchiveQueryInfo() { $commentQuery = CommentStore::newKey( 'ar_comment' )->getJoin(); + $ret = [ - 'tables' => [ 'archive' ] + $commentQuery['tables'], - 'fields' => [ + 'tables' => array_merge( [ 'archive' ], $commentQuery['tables'] ), + 'fields' => array_merge( [ 'ar_id', 'ar_page_id', 'ar_namespace', @@ -1657,7 +1658,7 @@ 'ar_len', 'ar_parent_id', 'ar_sha1', - ] + $commentQuery['fields'], + ], $commentQuery['fields'] ), 'joins' => $commentQuery['joins'], ]; -- To view, visit https://gerrit.wikimedia.org/r/406141 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5cb0926b7f0eb91c8864a17791a452965eb29d7e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Addshore ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Mock CommentStore in RevisionTest
Addshore has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406142 ) Change subject: Mock CommentStore in RevisionTest .. Mock CommentStore in RevisionTest Change-Id: I16b00a5514547d93a2308393098e3b363505374e --- M tests/phpunit/includes/RevisionTest.php 1 file changed, 71 insertions(+), 303 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/42/406142/1 diff --git a/tests/phpunit/includes/RevisionTest.php b/tests/phpunit/includes/RevisionTest.php index 73d69a5..54d60c4 100644 --- a/tests/phpunit/includes/RevisionTest.php +++ b/tests/phpunit/includes/RevisionTest.php @@ -882,6 +882,31 @@ ); } + private function overrideCommentStoreFactory() { + $mockStore = $this->getMockBuilder( CommentStore::class ) + ->disableOriginalConstructor() + ->getMock(); + $mockStore->expects( $this->any() ) + ->method( 'getFields' ) + ->willReturn( [ 'commentstore' => 'fields' ] ); + $mockStore->expects( $this->any() ) + ->method( 'getJoin' ) + ->willReturn( [ + 'tables' => [ 'commentstore-table' ], + 'fields' => [ 'commentstore-field' ], + 'joins' => [ 'commentstore-join' ], + ] ); + + $mockFactory = $this->getMockBuilder( CommentStoreFactory::class ) + ->disableOriginalConstructor() + ->getMock(); + $mockFactory->expects( $this->any() ) + ->method( 'newForKey' ) + ->willReturn( $mockStore ); + + $this->setService( 'CommentStoreFactory', $mockFactory ); + } + public function provideSelectFields() { yield [ true, @@ -897,9 +922,7 @@ 'rev_len', 'rev_parent_id', 'rev_sha1', - 'rev_comment_text' => 'rev_comment', - 'rev_comment_data' => 'NULL', - 'rev_comment_cid' => 'NULL', + 'commentstore' => 'fields', 'rev_content_format', 'rev_content_model', ] @@ -918,9 +941,7 @@ 'rev_len', 'rev_parent_id', 'rev_sha1', - 'rev_comment_text' => 'rev_comment', - 'rev_comment_data' => 'NULL', - 'rev_comment_cid' => 'NULL', + 'commentstore' => 'fields', ] ]; } @@ -928,12 +949,11 @@ /** * @dataProvider provideSelectFields * @covers Revision::selectFields -* @todo a true unit test would mock CommentStore */ public function testSelectFields( $contentHandlerUseDB, $expected ) { + $this->overrideCommentStoreFactory(); $this->hideDeprecated( 'Revision::selectFields' ); $this->setMwGlobals( 'wgContentHandlerUseDB', $contentHandlerUseDB ); - $this->setMwGlobals( 'wgCommentTableSchemaMigrationStage', MIGRATION_OLD ); $this->assertEquals( $expected, Revision::selectFields() ); } @@ -954,9 +974,7 @@ 'ar_len', 'ar_parent_id', 'ar_sha1', - 'ar_comment_text' => 'ar_comment', - 'ar_comment_data' => 'NULL', - 'ar_comment_cid' => 'NULL', + 'commentstore' => 'fields', 'ar_content_format', 'ar_content_model', ] @@ -977,9 +995,7 @@ 'ar_len', 'ar_parent_id', 'ar_sha1', - 'ar_comment_text' => 'ar_comment', - 'ar_comment_data' => 'NULL', - 'ar_comment_cid' => 'NULL', + 'commentstore' => 'fields', ] ]; } @@ -987,12 +1003,11 @@ /** * @dataProvider provideSelectArchiveFields * @covers Revision::selectArchiveFields -* @todo a true unit test would mock CommentStore */ public function testSelectArchiveFields( $contentHandlerUseDB, $expected ) { +
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Set groups.newGroupsVisibleToAll = true
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406140 ) Change subject: Gerrit: Set groups.newGroupsVisibleToAll = true .. Gerrit: Set groups.newGroupsVisibleToAll = true Why shouldn't they be? Can always override if needed Change-Id: I730508125a8ad690fb0153d758fa65caa83cd74e --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/40/406140/1 diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index ac4b8dc..648c1fd 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -99,6 +99,8 @@ roottree = "/r/p/${project}/;browse/HEAD/;${commit}" linkname = diffusion urlEncode = false +[groups] +newGroupsVisibleToAll = true [httpd] listenUrl = proxy-https://127.0.0.1:8080/r/ maxQueued = 500 -- To view, visit https://gerrit.wikimedia.org/r/406140 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I730508125a8ad690fb0153d758fa65caa83cd74e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Set gc.aggressive = true
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406139 ) Change subject: Gerrit: Set gc.aggressive = true .. Gerrit: Set gc.aggressive = true We're not re-enabling auto-gc just yet, but I want to so let's at least have the overall config section ready Change-Id: I51e0d04d9fd7d434f9c23fc105f273b9836ae74c --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/39/406139/1 diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index ac4b8dc..7087642 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -82,6 +82,8 @@ database = <%= @db_name %> username = <%= @db_user %> url = jdbc:mysql://<%= @db_host %>/<%= @db_name %>?characterSetResults=utf8&characterEncoding=utf8&connectionCollation=utf8_unicode_ci +[gc] +aggressive = true [gerrit] basePath = <%= @git_dir %> canonicalWebUrl = <%= @url %> -- To view, visit https://gerrit.wikimedia.org/r/406139 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I51e0d04d9fd7d434f9c23fc105f273b9836ae74c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Set changeCleanup.startTime
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406138 ) Change subject: Gerrit: Set changeCleanup.startTime .. Gerrit: Set changeCleanup.startTime We don't have changeCleanup.abandonChanges set to true, so this doesn't *do* anything other than silence a stupid warning on startup Change-Id: I651f002807e18da4c769a1a99fcc7495190b6bba --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/38/406138/1 diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index ac4b8dc..3981042 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -24,6 +24,7 @@ [changeCleanup] # Not actually used, but Gerrit complains if unset interval = 1 week +startTime = Sat 02:59 [changeMerge] test = true checkFrequency = 0 -- To view, visit https://gerrit.wikimedia.org/r/406138 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I651f002807e18da4c769a1a99fcc7495190b6bba Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Shut up completely useless WARN-level spam from Even...
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406137 ) Change subject: Gerrit: Shut up completely useless WARN-level spam from EventUtil .. Gerrit: Shut up completely useless WARN-level spam from EventUtil Change-Id: Ie617bd013c5834de5f8a24da05b3959b18ac3ed6 --- M modules/gerrit/templates/log4j.xml.erb 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/37/406137/1 diff --git a/modules/gerrit/templates/log4j.xml.erb b/modules/gerrit/templates/log4j.xml.erb index 7e3b32f..e2083eb 100644 --- a/modules/gerrit/templates/log4j.xml.erb +++ b/modules/gerrit/templates/log4j.xml.erb @@ -159,6 +159,10 @@ + + + + -- To view, visit https://gerrit.wikimedia.org/r/406137 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie617bd013c5834de5f8a24da05b3959b18ac3ed6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "mariadb: Depool es2011 for reimage"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406132 ) Change subject: Revert "mariadb: Depool es2011 for reimage" .. Revert "mariadb: Depool es2011 for reimage" This reverts commit b425c808e6adca3b8aedac4a2216b51b91ff4955. Change-Id: I2b0e827dcd02b984057bb4657005c5a3bfe5dff1 --- M wmf-config/db-codfw.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php index 037ad9c..2887712 100644 --- a/wmf-config/db-codfw.php +++ b/wmf-config/db-codfw.php @@ -14,7 +14,7 @@ ]; $wmgOldExtTemplate = [ - # '10.192.16.171' => 1, # es2011, B1 11TB 128GB, being reimaged + '10.192.16.171' => 1, # es2011, B1 11TB 128GB '10.192.32.129' => 1, # es2012, C1 11TB 128GB '10.192.48.40' => 1, # es2013, D1 11TB 128GB ]; -- To view, visit https://gerrit.wikimedia.org/r/406132 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b0e827dcd02b984057bb4657005c5a3bfe5dff1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb: Reenable notifications on es2011 after reimage
Jcrespo has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406135 ) Change subject: mariadb: Reenable notifications on es2011 after reimage .. mariadb: Reenable notifications on es2011 after reimage Change-Id: Ic4bba79686ebab87c0966f56b8f4c605654a4f71 --- M hieradata/hosts/es2011.yaml 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/hieradata/hosts/es2011.yaml b/hieradata/hosts/es2011.yaml index f4d4530..ddb347d 100644 --- a/hieradata/hosts/es2011.yaml +++ b/hieradata/hosts/es2011.yaml @@ -1,4 +1,3 @@ mariadb::shard: 'es1' mariadb::mysql_role: 'standalone' mariadb::binlog_format: 'ROW' -profile::base::notifications_enabled: '0' -- To view, visit https://gerrit.wikimedia.org/r/406135 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4bba79686ebab87c0966f56b8f4c605654a4f71 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo Gerrit-Reviewer: Giuseppe Lavagetto 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] mediawiki...MultimediaViewer[master]: Unify SVG markup
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/388833 ) Change subject: Unify SVG markup .. Unify SVG markup Align SVG markup across Foundation products by: - unifying XML declaration, - removing unnecessary `standalone="no"` attribute as it's default, - removing unnecessary `enable-background` attribute as it got removed from standard - removing all SVG editor metadata - adding `width` and `height` attributes where missing, - removing all `g` group elements except where necessary for transforms, - putting attributes on `path`, - removing unnecessary ids and - unifying whitespace. Also - changing 'expand' and 'gear' icon colors to resemble general button style, - while at this renaming 'gear_gray' to 'gear' including CSS reference, - slightly adapt remaining colors to WikimediaUI color palette and - deleting unused, unreferenced icon files. Saving up to 79% file size before gzipping. Bug: T178867 Change-Id: I9e54a3a972903811f5205def05397383f3484d63 --- M resources/mmv/img/down.svg M resources/mmv/img/expand.svg A resources/mmv/img/gear.svg D resources/mmv/img/gear_gray.svg M resources/mmv/img/x_gray.svg M resources/mmv/mmv.bootstrap.less D resources/mmv/ui/img/angle-separator.svg D resources/mmv/ui/img/assessments.svg M resources/mmv/ui/img/cc.svg D resources/mmv/ui/img/commons.svg D resources/mmv/ui/img/commons_gray.svg M resources/mmv/ui/img/commons_white.svg M resources/mmv/ui/img/ellipsis_darkgray.svg M resources/mmv/ui/img/ellipsis_gray.svg M resources/mmv/ui/img/ellipsis_lightgray.svg M resources/mmv/ui/img/error-media-icon.svg M resources/mmv/ui/img/file.svg M resources/mmv/ui/img/gear.svg M resources/mmv/ui/img/grayscale.svg D resources/mmv/ui/img/horn_grey.svg M resources/mmv/ui/img/icon_mmv.svg M resources/mmv/ui/img/icon_page.svg M resources/mmv/ui/img/license.svg M resources/mmv/ui/img/link-hover.svg M resources/mmv/ui/img/link.svg M resources/mmv/ui/img/location.svg M resources/mmv/ui/img/mw-close.svg M resources/mmv/ui/img/mw-defullscreen-ltr.svg M resources/mmv/ui/img/mw-defullscreen-rtl.svg D resources/mmv/ui/img/mw-dezoom-ltr.svg D resources/mmv/ui/img/mw-dezoom-rtl.svg M resources/mmv/ui/img/mw-download.svg M resources/mmv/ui/img/mw-fullscreen-ltr.svg M resources/mmv/ui/img/mw-fullscreen-rtl.svg D resources/mmv/ui/img/mw-open-control-ltr.svg D resources/mmv/ui/img/mw-open-control-rtl.svg D resources/mmv/ui/img/mw-zoom-ltr.svg D resources/mmv/ui/img/mw-zoom-rtl.svg M resources/mmv/ui/img/next-ltr.svg M resources/mmv/ui/img/next-rtl.svg M resources/mmv/ui/img/open.svg M resources/mmv/ui/img/page.svg M resources/mmv/ui/img/pasting-hover.svg M resources/mmv/ui/img/pasting.svg M resources/mmv/ui/img/pd.svg M resources/mmv/ui/img/prev-ltr.svg M resources/mmv/ui/img/prev-rtl.svg D resources/mmv/ui/img/repo.svg M resources/mmv/ui/img/restrict-2257.svg M resources/mmv/ui/img/restrict-aus-reserve.svg M resources/mmv/ui/img/restrict-communist.svg M resources/mmv/ui/img/restrict-costume.svg M resources/mmv/ui/img/restrict-currency.svg M resources/mmv/ui/img/restrict-default.svg M resources/mmv/ui/img/restrict-design.svg M resources/mmv/ui/img/restrict-fan-art.svg M resources/mmv/ui/img/restrict-ihl.svg M resources/mmv/ui/img/restrict-insignia.svg M resources/mmv/ui/img/restrict-ita-mibac.svg M resources/mmv/ui/img/restrict-nazi.svg M resources/mmv/ui/img/restrict-personality.svg M resources/mmv/ui/img/time.svg M resources/mmv/ui/img/use-ltr.svg M resources/mmv/ui/img/use-rtl.svg M resources/mmv/ui/img/user-ltr.svg M resources/mmv/ui/img/user-rtl.svg M resources/mmv/ui/img/x_darkgreen.svg M resources/mmv/ui/img/x_gray.svg M viewer-ltr.svg M viewer-rtl.svg 70 files changed, 284 insertions(+), 2,371 deletions(-) Approvals: Prtksxna: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/388833 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e54a3a972903811f5205def05397383f3484d63 Gerrit-PatchSet: 11 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Esanders Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Prtksxna Gerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Fix multiple PHP class declarations in one file
Phantom42 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406136 ) Change subject: Fix multiple PHP class declarations in one file .. Fix multiple PHP class declarations in one file All files containing more than one PHP class were split into multiple files. extension.json was updated to match new class locations. phpcs `OneObjectStructurePerFile.MultipleFound` rule was re-enabled. Bug: T177809 Change-Id: If3c9024ec5456a3fae17989b99d16f53b8c8165a --- M .phpcs.xml M extension.json M includes/specials/SpecialUploadWizard.php A includes/specials/UploadWizardSimpleForm.php 4 files changed, 25 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/36/406136/1 diff --git a/.phpcs.xml b/.phpcs.xml index 5595999..1b1f247 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,7 +1,6 @@ - diff --git a/extension.json b/extension.json index 1dfeb69..8ac3610 100644 --- a/extension.json +++ b/extension.json @@ -98,7 +98,7 @@ "SpecialCampaigns": "includes/specials/SpecialCampaigns.php", "ApiQueryAllCampaigns": "includes/ApiQueryAllCampaigns.php", "ApiFlickrBlacklist": "includes/ApiFlickrBlacklist.php", - "UploadWizardSimpleForm": "includes/specials/SpecialUploadWizard.php" + "UploadWizardSimpleForm": "includes/specials/UploadWizardSimpleForm.php" }, "ResourceModules": { "ext.uploadWizard.formDataTransport": { diff --git a/includes/specials/SpecialUploadWizard.php b/includes/specials/SpecialUploadWizard.php index cc34855..7108d38 100644 --- a/includes/specials/SpecialUploadWizard.php +++ b/includes/specials/SpecialUploadWizard.php @@ -367,17 +367,3 @@ return 'media'; } } - -/** - * This is a hack on UploadForm, to make one that works from UploadWizard when JS is not available. - */ -class UploadWizardSimpleForm extends UploadForm { - - /** -* Normally, UploadForm adds its own Javascript. -* We wish to prevent this, because we want to control the case where we have Javascript. -* So, we make the addUploadJS a no-op. -*/ - protected function addUploadJS() { - } -} diff --git a/includes/specials/UploadWizardSimpleForm.php b/includes/specials/UploadWizardSimpleForm.php new file mode 100644 index 000..692c995 --- /dev/null +++ b/includes/specials/UploadWizardSimpleForm.php @@ -0,0 +1,24 @@ +https://gerrit.wikimedia.org/r/406136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3c9024ec5456a3fae17989b99d16f53b8c8165a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Phantom42 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb: Reenable notifications on es2011 after reimage
Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406135 ) Change subject: mariadb: Reenable notifications on es2011 after reimage .. mariadb: Reenable notifications on es2011 after reimage Change-Id: Ic4bba79686ebab87c0966f56b8f4c605654a4f71 --- M hieradata/hosts/es2011.yaml 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/35/406135/1 diff --git a/hieradata/hosts/es2011.yaml b/hieradata/hosts/es2011.yaml index f4d4530..ddb347d 100644 --- a/hieradata/hosts/es2011.yaml +++ b/hieradata/hosts/es2011.yaml @@ -1,4 +1,3 @@ mariadb::shard: 'es1' mariadb::mysql_role: 'standalone' mariadb::binlog_format: 'ROW' -profile::base::notifications_enabled: '0' -- To view, visit https://gerrit.wikimedia.org/r/406135 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4bba79686ebab87c0966f56b8f4c605654a4f71 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] mediawiki...Flow[master]: OptInController catch both errors and exception
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406051 ) Change subject: OptInController catch both errors and exception .. OptInController catch both errors and exception The problem that is currently causing the opt-out to fail is not an Exception but an Error. Catching Throwable to make sure we revert the transations in all cases. Bug: T184670 Change-Id: Id0f4271d635094bf99f2fc8fa9cbbc4b08f07b46 --- M includes/Import/OptInController.php 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Import/OptInController.php b/includes/Import/OptInController.php index 49d9e84..c79f58d 100644 --- a/includes/Import/OptInController.php +++ b/includes/Import/OptInController.php @@ -6,7 +6,6 @@ use DateTimeZone; use DeferredUpdates; use DerivativeContext; -use Exception; use Flow\DbFactory; use Flow\Collection\HeaderCollection; use Flow\Content\BoardContent; @@ -124,18 +123,19 @@ } else { $logger->error( $outerMethod . ': unrecognized action: ' . $action ); } - } catch ( Exception $e ) { + } catch ( \Throwable $t ) { $logger->error( - $outerMethod . ' failed to {action} Flow on \'{talkpage}\' for user \'{user}\'. Exception: {exception}', + $outerMethod . ' failed to {action} Flow on \'{talkpage}\' for user \'{user}\'. {message} {trace}', [ 'action' => $action, 'talkpage' => $talkpage, 'user' => $user, - 'exception' => $e, + 'message' => $t->getMessage(), + 'trace' => $t->getTraceAsString(), ] ); // rollback both Flow and Core DBs - MWExceptionHandler::rollbackMasterChangesAndLog( $e ); + MWExceptionHandler::rollbackMasterChangesAndLog( $t ); $this->dbFactory->getDB( DB_MASTER )->rollback( $outerMethod ); } }, -- To view, visit https://gerrit.wikimedia.org/r/406051 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id0f4271d635094bf99f2fc8fa9cbbc4b08f07b46 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Sbisson Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Revert "mariadb: Reimage es2011 into stretch/MariaDB...
Jcrespo has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406133 ) Change subject: Revert "Revert "mariadb: Reimage es2011 into stretch/MariaDB 10.1"" .. Revert "Revert "mariadb: Reimage es2011 into stretch/MariaDB 10.1"" This reverts commit 4b7ac422aaf7430856e210063b4e42fbc7da0581. Change-Id: I81c71619824246c6d66ba1ec3d978c07662f45b2 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 5c8fced..dc655bb 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2897,8 +2897,6 @@ host es2011 { hardware ethernet 14:18:77:54:48:37; fixed-address es2011.codfw.wmnet; -option pxelinux.pathprefix "http://apt.wikimedia.org/tftpboot/jessie-installer/";; -filename "lpxelinux.0"; } host es2012 { -- To view, visit https://gerrit.wikimedia.org/r/406133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81c71619824246c6d66ba1ec3d978c07662f45b2 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "mariadb-partman: Modify recipe, to test with es2011"
Jcrespo has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406134 ) Change subject: Revert "mariadb-partman: Modify recipe, to test with es2011" .. Revert "mariadb-partman: Modify recipe, to test with es2011" This reverts commit a0026cd3f341085dee0c2b3d9846d8038e93b597. Change-Id: Ied2521e47157288f5c50096d4c7f70fe9c60f1f8 --- M modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg 1 file changed, 33 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg b/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg index 872dbcd..ae153f1 100644 --- a/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg +++ b/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg @@ -16,4 +16,37 @@ d-ipartman-lvm/confirm_nooverwrite boolean true d-ipartman/confirm boolean true +# standardize vg name for snapshots (otherwise uses hostname) +d-ipartman-auto-lvm/new_vg_name string tank + +d-ipartman-auto/expert_recipe string es :: \ + 4 4 4 ext4 \ + $primary{ } \ + $bootable{ }\ + method{ format }\ + format{ } \ + use_filesystem{ } \ + filesystem{ ext4 } \ + mountpoint{ / } \ + . \ + 8000 8000 8000 linux-swap \ + method{ swap } \ + format{ } \ + . \ + 64 1000 1000 xfs\ + lv_name{ data } \ + $defaultignore{ } \ + $lvmok{ } \ + mountpoint{ /srv } \ + options/nobarrier { nobarrier } \ + options/noatime { noatime } \ + . + +d-ipartman-auto-lvm/guided_sizestring 87% + +d-ipartman/choose_partition\ + select finish +d-ipartman-partitioning/confirm_write_new_labelboolean true + d-ipartman-auto/choose_recipe es +d-ipartman/confirm_nooverwrite boolean true -- To view, visit https://gerrit.wikimedia.org/r/406134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied2521e47157288f5c50096d4c7f70fe9c60f1f8 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "mariadb-partman: Modify recipe, to test with es2011"
Hello jenkins-bot, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/406134 to review the following change. Change subject: Revert "mariadb-partman: Modify recipe, to test with es2011" .. Revert "mariadb-partman: Modify recipe, to test with es2011" This reverts commit a0026cd3f341085dee0c2b3d9846d8038e93b597. Change-Id: Ied2521e47157288f5c50096d4c7f70fe9c60f1f8 --- M modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg 1 file changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/34/406134/1 diff --git a/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg b/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg index 872dbcd..ae153f1 100644 --- a/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg +++ b/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg @@ -16,4 +16,37 @@ d-ipartman-lvm/confirm_nooverwrite boolean true d-ipartman/confirm boolean true +# standardize vg name for snapshots (otherwise uses hostname) +d-ipartman-auto-lvm/new_vg_name string tank + +d-ipartman-auto/expert_recipe string es :: \ + 4 4 4 ext4 \ + $primary{ } \ + $bootable{ }\ + method{ format }\ + format{ } \ + use_filesystem{ } \ + filesystem{ ext4 } \ + mountpoint{ / } \ + . \ + 8000 8000 8000 linux-swap \ + method{ swap } \ + format{ } \ + . \ + 64 1000 1000 xfs\ + lv_name{ data } \ + $defaultignore{ } \ + $lvmok{ } \ + mountpoint{ /srv } \ + options/nobarrier { nobarrier } \ + options/noatime { noatime } \ + . + +d-ipartman-auto-lvm/guided_sizestring 87% + +d-ipartman/choose_partition\ + select finish +d-ipartman-partitioning/confirm_write_new_labelboolean true + d-ipartman-auto/choose_recipe es +d-ipartman/confirm_nooverwrite boolean true -- To view, visit https://gerrit.wikimedia.org/r/406134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied2521e47157288f5c50096d4c7f70fe9c60f1f8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: 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] operations/puppet[production]: Revert "Revert "mariadb: Reimage es2011 into stretch/MariaDB...
Hello Marostegui, jenkins-bot, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/406133 to review the following change. Change subject: Revert "Revert "mariadb: Reimage es2011 into stretch/MariaDB 10.1"" .. Revert "Revert "mariadb: Reimage es2011 into stretch/MariaDB 10.1"" This reverts commit 4b7ac422aaf7430856e210063b4e42fbc7da0581. Change-Id: I81c71619824246c6d66ba1ec3d978c07662f45b2 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/33/406133/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index fa58c44..eb28863 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2897,8 +2897,6 @@ host es2011 { hardware ethernet 14:18:77:54:48:37; fixed-address es2011.codfw.wmnet; -option pxelinux.pathprefix "http://apt.wikimedia.org/tftpboot/jessie-installer/";; -filename "lpxelinux.0"; } host es2012 { -- To view, visit https://gerrit.wikimedia.org/r/406133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81c71619824246c6d66ba1ec3d978c07662f45b2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "mariadb: Depool es2011 for reimage"
Hello Urbanecm, jenkins-bot, Zoranzoki21, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/406132 to review the following change. Change subject: Revert "mariadb: Depool es2011 for reimage" .. Revert "mariadb: Depool es2011 for reimage" This reverts commit b425c808e6adca3b8aedac4a2216b51b91ff4955. Change-Id: I2b0e827dcd02b984057bb4657005c5a3bfe5dff1 --- M wmf-config/db-codfw.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/32/406132/1 diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php index 037ad9c..2887712 100644 --- a/wmf-config/db-codfw.php +++ b/wmf-config/db-codfw.php @@ -14,7 +14,7 @@ ]; $wmgOldExtTemplate = [ - # '10.192.16.171' => 1, # es2011, B1 11TB 128GB, being reimaged + '10.192.16.171' => 1, # es2011, B1 11TB 128GB '10.192.32.129' => 1, # es2012, C1 11TB 128GB '10.192.48.40' => 1, # es2013, D1 11TB 128GB ]; -- To view, visit https://gerrit.wikimedia.org/r/406132 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b0e827dcd02b984057bb4657005c5a3bfe5dff1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Introduce and use CommentStoreFactory
Addshore has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406131 ) Change subject: Introduce and use CommentStoreFactory .. Introduce and use CommentStoreFactory Change-Id: I3abb62a5cfb0dcd456da9f4eb35583476ae41cfb --- M autoload.php M includes/CommentStore.php A includes/CommentStoreFactory.php M includes/MediaWikiServices.php M includes/ServiceWiring.php M includes/Title.php M includes/api/ApiQueryAllUsers.php M includes/api/ApiQueryBlocks.php M includes/api/ApiQueryDeletedrevs.php M includes/api/ApiQueryFilearchive.php M includes/api/ApiQueryLogEvents.php M includes/api/ApiQueryProtectedTitles.php M includes/api/ApiQueryRecentChanges.php M includes/api/ApiQueryUserContributions.php M includes/api/ApiQueryUsers.php M includes/api/ApiQueryWatchlist.php M includes/filerepo/file/LocalFile.php M includes/page/WikiPage.php M includes/watcheditem/WatchedItemQueryService.php M maintenance/orphans.php M maintenance/rebuildrecentchanges.php A tests/phpunit/includes/CommentStoreFactoryTest.php M tests/phpunit/includes/MediaWikiServicesTest.php 23 files changed, 102 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/406131/1 diff --git a/autoload.php b/autoload.php index 6fb2cc4..b7bf2f6 100644 --- a/autoload.php +++ b/autoload.php @@ -279,6 +279,7 @@ 'CommandLineInc' => __DIR__ . '/maintenance/commandLine.inc', 'CommandLineInstaller' => __DIR__ . '/maintenance/install.php', 'CommentStore' => __DIR__ . '/includes/CommentStore.php', + 'CommentStoreFactory' => __DIR__ . '/includes/CommentStoreFactory.php', 'CommentStoreComment' => __DIR__ . '/includes/CommentStoreComment.php', 'CompareParserCache' => __DIR__ . '/maintenance/compareParserCache.php', 'CompareParsers' => __DIR__ . '/maintenance/compareParsers.php', diff --git a/includes/CommentStore.php b/includes/CommentStore.php index 0d679d3..102cb05 100644 --- a/includes/CommentStore.php +++ b/includes/CommentStore.php @@ -20,6 +20,7 @@ * @file */ +use MediaWiki\MediaWikiServices; use Wikimedia\Rdbms\IDatabase; /** @@ -97,12 +98,10 @@ * @param Language $lang Language to use for comment truncation. Defaults * to $wgContLang. */ - public function __construct( $key, Language $lang = null ) { - global $wgCommentTableSchemaMigrationStage, $wgContLang; - + public function __construct( $key, Language $lang, $migrationStage ) { $this->key = $key; - $this->stage = $wgCommentTableSchemaMigrationStage; - $this->lang = $lang ?: $wgContLang; + $this->stage = $migrationStage; + $this->lang = $lang; } /** @@ -112,7 +111,9 @@ * @return CommentStore */ public static function newKey( $key ) { - return new CommentStore( $key ); + return MediaWikiServices::getInstance() + ->getCommentStoreFactory() + ->newForKey( $key ); } /** diff --git a/includes/CommentStoreFactory.php b/includes/CommentStoreFactory.php new file mode 100644 index 000..9174f7d --- /dev/null +++ b/includes/CommentStoreFactory.php @@ -0,0 +1,34 @@ +lang = $lang; + $this->migrationStage = $migrationStage; + } + + /** +* @since 1.31 +* +* @param string $key A key such as "rev_comment" identifying the comment +* field being fetched. +* @return CommentStore +*/ + public function newForKey( $key ) { + return new CommentStore( $key, $this->lang, $this->migrationStage ); + } + +} diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php index c283793..31b3c1c 100644 --- a/includes/MediaWikiServices.php +++ b/includes/MediaWikiServices.php @@ -1,6 +1,7 @@ getService( 'HttpRequestFactory' ); } + /** +* @since 1.31 +* @return CommentStoreFactory +*/ + public function getCommentStoreFactory() { + return $this->getService( 'CommentStoreFactory' ); + } + /// // NOTE: When adding a service getter here, don't forget to add a test // case for it in MediaWikiServicesTest::provideGetters() and in diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index a89619f..5b5535e 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -520,6 +520,14 @@ return new \MediaWiki\Http\HttpRequestFactory(); }, + 'CommentStoreFactory' => function ( MediaWikiServices $services ) { + global $wgContLang, $wgCommentTableSchemaMigrationStage; + return new CommentStoreFactory( + $wgContLang
[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb: Move socket location, disable notifications of es2011
Jcrespo has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406130 ) Change subject: mariadb: Move socket location, disable notifications of es2011 .. mariadb: Move socket location, disable notifications of es2011 Change-Id: I5491472065b73867a31d26140ef8322d84b27b91 --- M hieradata/hosts/es2011.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/hieradata/hosts/es2011.yaml b/hieradata/hosts/es2011.yaml index e7fde35..f4d4530 100644 --- a/hieradata/hosts/es2011.yaml +++ b/hieradata/hosts/es2011.yaml @@ -1,4 +1,4 @@ mariadb::shard: 'es1' mariadb::mysql_role: 'standalone' mariadb::binlog_format: 'ROW' -mariadb::socket: '/tmp/mysql.sock' +profile::base::notifications_enabled: '0' -- To view, visit https://gerrit.wikimedia.org/r/406130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5491472065b73867a31d26140ef8322d84b27b91 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb: Move socket location, disable notifications of es2011
Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406130 ) Change subject: mariadb: Move socket location, disable notifications of es2011 .. mariadb: Move socket location, disable notifications of es2011 Change-Id: I5491472065b73867a31d26140ef8322d84b27b91 --- M hieradata/hosts/es2011.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/30/406130/1 diff --git a/hieradata/hosts/es2011.yaml b/hieradata/hosts/es2011.yaml index e7fde35..f4d4530 100644 --- a/hieradata/hosts/es2011.yaml +++ b/hieradata/hosts/es2011.yaml @@ -1,4 +1,4 @@ mariadb::shard: 'es1' mariadb::mysql_role: 'standalone' mariadb::binlog_format: 'ROW' -mariadb::socket: '/tmp/mysql.sock' +profile::base::notifications_enabled: '0' -- To view, visit https://gerrit.wikimedia.org/r/406130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5491472065b73867a31d26140ef8322d84b27b91 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] operations/puppet[production]: eventlog1002 install params
RobH has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406129 ) Change subject: eventlog1002 install params .. eventlog1002 install params setting install params for new eventlog1002 system Bug: T185667 Change-Id: Ibe64b5fe9db9e603295a9c347bc770f7e2a5b35e --- M manifests/site.pp M modules/install_server/files/autoinstall/netboot.cfg M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 3 files changed, 10 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified RobH: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 2ca7f64..9669574 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -834,6 +834,10 @@ role(eventlogging::analytics) } +node 'eventlog1002.eqiad.wmnet' { +role(spare::system) +} + # virtual machine for mailman list server node 'fermium.wikimedia.org' { role(lists) diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index fb5043a..93a821b 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -75,7 +75,7 @@ dumpsdata100[12]|labstore100[67]) echo partman/dumpsdata100X.cfg ;; \ eeden|maerlant|multatuli|nescio) echo partman/raid1-1partition.cfg ;; \ elastic101[7-9]|elastic102[0-9]|elastic103[0-1]) echo partman/elasticsearch-raid0.cfg ;; \ -elastic103[2-9]|elastic104[0-9]|elastic105[0-2]) echo partman/raid1-lvm-ext4-srv-noswap.cfg ;; \ +elastic103[2-9]|elastic104[0-9]|elastic105[0-2]|eventlog1002) echo partman/raid1-lvm-ext4-srv-noswap.cfg ;; \ elastic20[0-2][0-9]|elastic203[0-6]) echo partman/raid1-lvm-ext4-srv-noswap.cfg ;; \ labcontrol100[34]|labmon100[12]|mwlog[12]001|relforge100[12]|scb200[1-6]|stat100[56]) echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \ analytics1003|cobalt|thorium) echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \ diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index fa58c44..5c8fced 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2964,6 +2964,11 @@ filename "lpxelinux.0"; } +host eventlog1002 { +hardware ethernet 14:18:77:5B:0D:42; +fixed-address eventlog1001.eqiad.wmnet; +} + host flerovium { hardware ethernet F4:E9:D4:CD:90:30; fixed-address flerovium.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/406129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe64b5fe9db9e603295a9c347bc770f7e2a5b35e Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: eventlog1002 install params
RobH has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406129 ) Change subject: eventlog1002 install params .. eventlog1002 install params setting install params for new eventlog1002 system Bug: T185667 Change-Id: Ibe64b5fe9db9e603295a9c347bc770f7e2a5b35e --- M manifests/site.pp M modules/install_server/files/autoinstall/netboot.cfg M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 3 files changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/29/406129/1 diff --git a/manifests/site.pp b/manifests/site.pp index 2ca7f64..9669574 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -834,6 +834,10 @@ role(eventlogging::analytics) } +node 'eventlog1002.eqiad.wmnet' { +role(spare::system) +} + # virtual machine for mailman list server node 'fermium.wikimedia.org' { role(lists) diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index fb5043a..93a821b 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -75,7 +75,7 @@ dumpsdata100[12]|labstore100[67]) echo partman/dumpsdata100X.cfg ;; \ eeden|maerlant|multatuli|nescio) echo partman/raid1-1partition.cfg ;; \ elastic101[7-9]|elastic102[0-9]|elastic103[0-1]) echo partman/elasticsearch-raid0.cfg ;; \ -elastic103[2-9]|elastic104[0-9]|elastic105[0-2]) echo partman/raid1-lvm-ext4-srv-noswap.cfg ;; \ +elastic103[2-9]|elastic104[0-9]|elastic105[0-2]|eventlog1002) echo partman/raid1-lvm-ext4-srv-noswap.cfg ;; \ elastic20[0-2][0-9]|elastic203[0-6]) echo partman/raid1-lvm-ext4-srv-noswap.cfg ;; \ labcontrol100[34]|labmon100[12]|mwlog[12]001|relforge100[12]|scb200[1-6]|stat100[56]) echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \ analytics1003|cobalt|thorium) echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \ diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index fa58c44..5c8fced 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2964,6 +2964,11 @@ filename "lpxelinux.0"; } +host eventlog1002 { +hardware ethernet 14:18:77:5B:0D:42; +fixed-address eventlog1001.eqiad.wmnet; +} + host flerovium { hardware ethernet F4:E9:D4:CD:90:30; fixed-address flerovium.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/406129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe64b5fe9db9e603295a9c347bc770f7e2a5b35e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Error if wiktionary creation attempted without using aawikti...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/391271 ) Change subject: Error if wiktionary creation attempted without using aawiktionary .. Error if wiktionary creation attempted without using aawiktionary Bug: T179863 Change-Id: I0e0f284f47c3baec01f52c02b710e1311cfbf28e --- M addWiki.php 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/addWiki.php b/addWiki.php index be26cbc..b5ac0a5 100644 --- a/addWiki.php +++ b/addWiki.php @@ -67,6 +67,13 @@ $domain = $this->getArg( 3 ); $languageNames = Language::fetchLanguageNames(); + if ( $siteGroup === 'wiktionary' && strpos( 'wiktionary', $this->getOption( 'wiki' ) ) === false ) { + $this->error( + 'Wiktionaries must be created using --wiki aawiktionary due to the need to load Cognate classes.', + true + ); + } + if ( !isset( $languageNames[$lang] ) ) { $this->fatalError( "Language $lang not found in Names.php" ); } -- To view, visit https://gerrit.wikimedia.org/r/391271 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0e0f284f47c3baec01f52c02b710e1311cfbf28e Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: Addshore Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Reedy Gerrit-Reviewer: Thiemo Kreuz (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Load preferences js/css in mobile
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406125 ) Change subject: Load preferences js/css in mobile .. Load preferences js/css in mobile Change-Id: Idbf62486c787179ee67deb22e4644f4fc742d9db --- M resources/Resources.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/Resources.php b/resources/Resources.php index b494429..4405fe0 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -2112,6 +2112,7 @@ 'styles' => 'resources/src/mediawiki.special/mediawiki.special.pagesWithProp.css', ], 'mediawiki.special.preferences' => [ + 'targets' => [ 'desktop', 'mobile' ], 'scripts' => [ 'resources/src/mediawiki.special/mediawiki.special.preferences.confirmClose.js', 'resources/src/mediawiki.special/mediawiki.special.preferences.convertmessagebox.js', @@ -2132,6 +2133,7 @@ ], ], 'mediawiki.special.preferences.styles' => [ + 'targets' => [ 'desktop', 'mobile' ], 'styles' => 'resources/src/mediawiki.special/mediawiki.special.preferences.styles.css', ], 'mediawiki.special.recentchanges' => [ -- To view, visit https://gerrit.wikimedia.org/r/406125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idbf62486c787179ee67deb22e4644f4fc742d9db Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jdlrobson Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use RevisionLookup and RevisionFactory interfaces in Revision
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403117 ) Change subject: Use RevisionLookup and RevisionFactory interfaces in Revision .. Use RevisionLookup and RevisionFactory interfaces in Revision Lets not depend on the big blob that is RevisionStore. Try to bind to the nice interfaces that we have where possible. In the future RevisionStore should be split up further into it's individual interfaces. It looks like there are some more methods which should be moved to both RevisionLookup and RevisionFactory. See draft: I214c5952d4a0fad55ff4116e90eab9ac3ba54fd3 Change-Id: I8df61374e24abcf4a7e38e53647489b8ecc1fd77 --- M includes/MediaWikiServices.php M includes/Revision.php M includes/ServiceWiring.php M tests/phpunit/includes/MediaWikiServicesTest.php 4 files changed, 55 insertions(+), 11 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php index 00767c7..c283793 100644 --- a/includes/MediaWikiServices.php +++ b/includes/MediaWikiServices.php @@ -15,6 +15,8 @@ use MediaWiki\Shell\CommandFactory; use MediaWiki\Storage\BlobStore; use MediaWiki\Storage\BlobStoreFactory; +use MediaWiki\Storage\RevisionFactory; +use MediaWiki\Storage\RevisionLookup; use MediaWiki\Storage\RevisionStore; use Wikimedia\Rdbms\LBFactory; use LinkCache; @@ -729,6 +731,22 @@ /** * @since 1.31 +* @return RevisionLookup +*/ + public function getRevisionLookup() { + return $this->getService( 'RevisionLookup' ); + } + + /** +* @since 1.31 +* @return RevisionFactory +*/ + public function getRevisionFactory() { + return $this->getService( 'RevisionFactory' ); + } + + /** +* @since 1.31 * @return PreferencesFactory */ public function getPreferencesFactory() { diff --git a/includes/Revision.php b/includes/Revision.php index 510c1ee..d5449b4 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -22,6 +22,8 @@ use MediaWiki\Storage\MutableRevisionRecord; use MediaWiki\Storage\RevisionAccessException; +use MediaWiki\Storage\RevisionFactory; +use MediaWiki\Storage\RevisionLookup; use MediaWiki\Storage\RevisionRecord; use MediaWiki\Storage\RevisionStore; use MediaWiki\Storage\RevisionStoreRecord; @@ -65,6 +67,20 @@ } /** +* @return RevisionLookup +*/ + protected static function getRevisionLookup() { + return MediaWikiServices::getInstance()->getRevisionLookup(); + } + + /** +* @return RevisionFactory +*/ + protected static function getRevisionFactory() { + return MediaWikiServices::getInstance()->getRevisionFactory(); + } + + /** * @param bool|string $wiki The ID of the target wiki database. Use false for the local wiki. * * @return SqlBlobStore @@ -97,7 +113,7 @@ * @return Revision|null */ public static function newFromId( $id, $flags = 0 ) { - $rec = self::getRevisionStore()->getRevisionById( $id, $flags ); + $rec = self::getRevisionLookup()->getRevisionById( $id, $flags ); return $rec === null ? null : new Revision( $rec, $flags ); } @@ -116,7 +132,7 @@ * @return Revision|null */ public static function newFromTitle( LinkTarget $linkTarget, $id = 0, $flags = 0 ) { - $rec = self::getRevisionStore()->getRevisionByTitle( $linkTarget, $id, $flags ); + $rec = self::getRevisionLookup()->getRevisionByTitle( $linkTarget, $id, $flags ); return $rec === null ? null : new Revision( $rec, $flags ); } @@ -135,7 +151,7 @@ * @return Revision|null */ public static function newFromPageId( $pageId, $revId = 0, $flags = 0 ) { - $rec = self::getRevisionStore()->getRevisionByPageId( $pageId, $revId, $flags ); + $rec = self::getRevisionLookup()->getRevisionByPageId( $pageId, $revId, $flags ); return $rec === null ? null : new Revision( $rec, $flags ); } @@ -184,7 +200,7 @@ } } - $rec = self::getRevisionStore()->newRevisionFromArchiveRow( $row, 0, $title, $overrides ); + $rec = self::getRevisionFactory()->newRevisionFromArchiveRow( $row, 0, $title, $overrides ); return new Revision( $rec, self::READ_NORMAL, $title ); } @@ -202,9 +218,9 @@ */ public static function newFromRow( $row ) { if ( is_array( $row ) ) { - $rec = self::getRevisionStore()->newMutableRevisionFromArray( $row ); + $rec = self::getRevision
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add 'RevisionStore' to wmgMonologChannels
Addshore has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406128 ) Change subject: Add 'RevisionStore' to wmgMonologChannels .. Add 'RevisionStore' to wmgMonologChannels Logging for this channel is introduced in: I6cf13e6baba354b08533a6151bbbc88a317be9d6 Change-Id: Idf5a15b74202a8b800e5c3d1ede6c7e4213ced01 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/28/406128/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index cb57bdf..1c29446 100755 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -5247,6 +5247,7 @@ 'Renameuser' => 'debug', 'resourceloader' => 'info', 'ResourceLoaderImage' => 'debug', // - demon, matmarex + 'RevisionStore' => 'info', 'runJobs' => [ 'logstash' => 'warning' ], // - bd808, T113571 'session' => [ 'udp2log' => false, 'logstash' => 'warning' ], 'session-ip' => [ 'udp2log' => false, 'logstash' => 'info' ], -- To view, visit https://gerrit.wikimedia.org/r/406128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf5a15b74202a8b800e5c3d1ede6c7e4213ced01 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Addshore ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Extra tests for SqlBlobStore with 'windows-1252' legacy enco...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403754 ) Change subject: Extra tests for SqlBlobStore with 'windows-1252' legacy encoding .. Extra tests for SqlBlobStore with 'windows-1252' legacy encoding Bug: T184749 Change-Id: Ida717dbe6ae742b3b61f0f09dc60712307c53a96 --- M tests/phpunit/includes/Storage/SqlBlobStoreTest.php 1 file changed, 35 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/Storage/SqlBlobStoreTest.php b/tests/phpunit/includes/Storage/SqlBlobStoreTest.php index 6d2b09b..dbbef11 100644 --- a/tests/phpunit/includes/Storage/SqlBlobStoreTest.php +++ b/tests/phpunit/includes/Storage/SqlBlobStoreTest.php @@ -134,6 +134,18 @@ [ 'gzip', 'object' ], '2®Àþ2', ]; + yield 'T184749 (windows-1252 encoding), string in string out' => [ + 'windows-1252', + iconv( 'utf-8', 'windows-1252', "sammansättningar" ), + [], + 'sammansättningar', + ]; + yield 'T184749 (windows-1252 encoding), string in string out with gzip' => [ + 'windows-1252', + gzdeflate( iconv( 'utf-8', 'windows-1252', "sammansättningar" ) ), + [ 'gzip' ], + 'sammansättningar', + ]; } /** @@ -190,6 +202,7 @@ public function provideBlobs() { yield [ '' ]; yield [ 'someText' ]; + yield [ "sammansättningar" ]; } /** @@ -203,4 +216,26 @@ $this->assertSame( $blob, $store->getBlob( $address ) ); } + /** +* @dataProvider provideBlobs +* @covers \MediaWiki\Storage\SqlBlobStore::storeBlob +* @covers \MediaWiki\Storage\SqlBlobStore::getBlob +*/ + public function testSimpleStoreGetBlobSimpleRoundtripWindowsLegacyEncoding( $blob ) { + $store = $this->getBlobStore( 'windows-1252' ); + $address = $store->storeBlob( $blob ); + $this->assertSame( $blob, $store->getBlob( $address ) ); + } + + /** +* @dataProvider provideBlobs +* @covers \MediaWiki\Storage\SqlBlobStore::storeBlob +* @covers \MediaWiki\Storage\SqlBlobStore::getBlob +*/ + public function testSimpleStoreGetBlobSimpleRoundtripWindowsLegacyEncodingGzip( $blob ) { + $store = $this->getBlobStore( 'windows-1252', true ); + $address = $store->storeBlob( $blob ); + $this->assertSame( $blob, $store->getBlob( $address ) ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/403754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida717dbe6ae742b3b61f0f09dc60712307c53a96 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Addshore Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: setting dns entries for eventlog1002
RobH has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406127 ) Change subject: setting dns entries for eventlog1002 .. setting dns entries for eventlog1002 setting the production and mgmt hostname entries Bug: T185667 Change-Id: Iabf63bfc1e050c502e20d4fb2c9ba30f2fbd3648 --- M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa M templates/10.in-addr.arpa M templates/wmnet 3 files changed, 6 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified RobH: Looks good to me, approved diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa index 27016b4..5e1aa52 100644 --- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa +++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa @@ -190,6 +190,7 @@ 7.0.1.0.8.4.0.0.4.6.0.0.0.1.0.0 1H IN PTR cp1073.eqiad.wmnet. 8.0.1.0.8.4.0.0.4.6.0.0.0.1.0.0 1H IN PTR cp1074.eqiad.wmnet. 2.5.0.0.8.4.0.0.4.6.0.0.0.1.0.0 1H IN PTR kubernetes1004.eqiad.wmnet. +5.9.0.0.8.4.0.0.4.6.0.0.0.1.0.0 1H IN PTR kubernetes1004.eqiad.wmnet. ; analytics1-d-eqiad (2620:0:861:108::/64) $ORIGIN 8.0.1.0.{{ zonename }}. diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index e72ab38..97c3822 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -1118,6 +1118,7 @@ 92 1H IN PTR mw1257.eqiad.wmnet. 93 1H IN PTR mw1258.eqiad.wmnet. 94 1H IN PTR lawrencium.eqiad.wmnet. +95 1H IN PTR eventlog1002.eqiad.wmnet. 97 1H IN PTR restbase1018.eqiad.wmnet. 98 1H IN PTR restbase1018-a.eqiad.wmnet. @@ -2666,6 +2667,7 @@ 77 1H IN PTR wmf4748.mgmt.eqiad.wmnet. 78 1H IN PTR wmf4749.mgmt.eqiad.wmnet. 79 1H IN PTR wmf4750.mgmt.eqiad.wmnet. +80 1H IN PTR eventlog1002.mgmt.eqiad.wmnet. 80 1H IN PTR wmf4751.mgmt.eqiad.wmnet. 81 1H IN PTR wdqs1004.mgmt.eqiad.wmnet. 81 1H IN PTR wmf7117.mgmt.eqiad.wmnet. diff --git a/templates/wmnet b/templates/wmnet index f0a8863..c92861a 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -435,6 +435,8 @@ etherpad10011H IN A10.64.32.177 ; VM on the ganeti01.svc.eqiad.wmnet cluster eventlog10011H IN A10.64.32.167 eventlog10011H IN 2620:0:861:103:10:64:32:167 +eventlog10021H IN A10.64.48.95 +eventlog10021H IN 2620:0:861:103:10:64:48:95 flerovium 1H IN A10.64.48.112 francium1H IN A10.64.32.168 ganeti1001 1H IN A10.64.32.169 @@ -2356,6 +2358,7 @@ deploy1001 1H IN A10.65.7.77 wmf4749 1H IN A10.65.7.78 wmf4750 1H IN A10.65.7.79 +eventlog10021H IN A10.65.7.80 wmf4751 1H IN A10.65.7.80 wmf6990 1H IN A10.65.4.75 puppetmaster1001 1H IN A10.65.4.75 -- To view, visit https://gerrit.wikimedia.org/r/406127 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iabf63bfc1e050c502e20d4fb2c9ba30f2fbd3648 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: RobH Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Consolidate bailing out from ext/wiki links
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406126 ) Change subject: Consolidate bailing out from ext/wiki links .. Consolidate bailing out from ext/wiki links So that extlinks get the same expanded attribute treatment. Fixes the regression in, http://localhost:8000/ar.wikipedia.org/v3/page/html/%D8%B0%D8%B1%D8%A9_%D8%A7%D9%84%D9%87%D9%8A%D8%AF%D8%B1%D9%88%D8%AC%D9%8A%D9%86/25945469 Follows up to 217c68a by adding typeof "mw:ExpandedAttrs" to the nodes where xmlish attributes contain extension tags for expanding. Change-Id: I188f1c903619320052b0502ba13c7b3be7040e6f --- M lib/wt2html/tt/AttributeExpander.js M lib/wt2html/tt/LinkHandler.js M tests/parserTests.txt 3 files changed, 75 insertions(+), 102 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/26/406126/1 diff --git a/lib/wt2html/tt/AttributeExpander.js b/lib/wt2html/tt/AttributeExpander.js index 59d88e8..bb7a751 100644 --- a/lib/wt2html/tt/AttributeExpander.js +++ b/lib/wt2html/tt/AttributeExpander.js @@ -124,7 +124,6 @@ * -- */ function stripMetaTags(env, tokens, wrapTemplates) { var buf = []; - var isPushed = false; var hasGeneratedContent = false; for (var i = 0, l = tokens.length; i < l; i++) { @@ -141,10 +140,12 @@ return prev + next.textContent; }, ''); buf.push(str); + hasGeneratedContent = true; + continue; // TODO: Maybe cleanup the remaining about sibbling wrappers // but the sanitizer will drop them anyways } - isPushed = false; + if (wrapTemplates) { // Strip all meta tags. var type = t.getAttribute("typeof"); @@ -154,12 +155,12 @@ hasGeneratedContent = true; } } else { - isPushed = true; buf.push(t); + continue; } } - if (!isPushed && t.name !== "meta") { + if (t.name !== "meta") { // Dont strip token if it is not a meta-tag buf.push(t); } diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js index 7397b3c..a9aa56c 100644 --- a/lib/wt2html/tt/LinkHandler.js +++ b/lib/wt2html/tt/LinkHandler.js @@ -210,13 +210,71 @@ }); }; +var bailTokens = function(env, token, isExtLink) { + var count = isExtLink ? 1 : 2; + var tokens = ["[".repeat(count)]; + + if (/mw:ExpandedAttrs/.test(token.getAttribute("typeof"))) { + var dataMW = JSON.parse(token.getAttribute("data-mw")).attribs; + var html; + for (var i = 0; i < dataMW.length; i++) { + if (dataMW[i][0].txt === "href") { + html = dataMW[i][1].html; + break; + } + } + + // Since we are splicing off '['s and ']'s from the incoming token, + // adjust TSR of the DOM-fragment by `count` each on both end. + var tsr = token.dataAttribs && token.dataAttribs.tsr; + if (tsr && typeof (tsr[0]) === 'number' && typeof (tsr[1]) === 'number') { + tsr = [tsr[0] + count, tsr[1] - count]; + } else { + tsr = null; + } + + var body = DU.ppToDOM(html); + var dft = DU.buildDOMFragmentTokens(env, token, body, null, { + noPWrapping: true, + tsr: tsr, + }); + + tokens = tokens.concat(dft); + } else { + // FIXME: Duplicate work + tokens = tokens.concat(token.getAttribute("href")); + } + + // Append rest of the attributes + if (isExtLink) { + var content = Util.lookup(token.attribs, 'mw:content'); + + // FIXME: Use this attribute in regular extline + // cases to rt spaces correctly maybe? Unsure + // it is worth it. + var spaces = token.getAttribute('spaces') || ''; + + tokens = tokens.concat(spaces, content); + } else { + token.attribs.forEach(function(a) { + if (a.k === "mw:maybeContent") { +
[MediaWiki-commits] [Gerrit] operations/dns[master]: setting dns entries for eventlog1002
RobH has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406127 ) Change subject: setting dns entries for eventlog1002 .. setting dns entries for eventlog1002 setting the production and mgmt hostname entries Bug: T185667 Change-Id: Iabf63bfc1e050c502e20d4fb2c9ba30f2fbd3648 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/27/406127/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index e72ab38..97c3822 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -1118,6 +1118,7 @@ 92 1H IN PTR mw1257.eqiad.wmnet. 93 1H IN PTR mw1258.eqiad.wmnet. 94 1H IN PTR lawrencium.eqiad.wmnet. +95 1H IN PTR eventlog1002.eqiad.wmnet. 97 1H IN PTR restbase1018.eqiad.wmnet. 98 1H IN PTR restbase1018-a.eqiad.wmnet. @@ -2666,6 +2667,7 @@ 77 1H IN PTR wmf4748.mgmt.eqiad.wmnet. 78 1H IN PTR wmf4749.mgmt.eqiad.wmnet. 79 1H IN PTR wmf4750.mgmt.eqiad.wmnet. +80 1H IN PTR eventlog1002.mgmt.eqiad.wmnet. 80 1H IN PTR wmf4751.mgmt.eqiad.wmnet. 81 1H IN PTR wdqs1004.mgmt.eqiad.wmnet. 81 1H IN PTR wmf7117.mgmt.eqiad.wmnet. diff --git a/templates/wmnet b/templates/wmnet index f0a8863..c92861a 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -435,6 +435,8 @@ etherpad10011H IN A10.64.32.177 ; VM on the ganeti01.svc.eqiad.wmnet cluster eventlog10011H IN A10.64.32.167 eventlog10011H IN 2620:0:861:103:10:64:32:167 +eventlog10021H IN A10.64.48.95 +eventlog10021H IN 2620:0:861:103:10:64:48:95 flerovium 1H IN A10.64.48.112 francium1H IN A10.64.32.168 ganeti1001 1H IN A10.64.32.169 @@ -2356,6 +2358,7 @@ deploy1001 1H IN A10.65.7.77 wmf4749 1H IN A10.65.7.78 wmf4750 1H IN A10.65.7.79 +eventlog10021H IN A10.65.7.80 wmf4751 1H IN A10.65.7.80 wmf6990 1H IN A10.65.4.75 puppetmaster1001 1H IN A10.65.4.75 -- To view, visit https://gerrit.wikimedia.org/r/406127 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iabf63bfc1e050c502e20d4fb2c9ba30f2fbd3648 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: RobH ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Preferences tabs should be horizontally scrollable
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406124 ) Change subject: Preferences tabs should be horizontally scrollable .. Preferences tabs should be horizontally scrollable Change-Id: I6766b4ef5a99c66ebb54079b07739315294c86a7 --- M skinStyles/mediawiki.special.preferences.styles/styles.less 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue refs/changes/24/406124/1 diff --git a/skinStyles/mediawiki.special.preferences.styles/styles.less b/skinStyles/mediawiki.special.preferences.styles/styles.less index 7e5599b..a4838f9 100644 --- a/skinStyles/mediawiki.special.preferences.styles/styles.less +++ b/skinStyles/mediawiki.special.preferences.styles/styles.less @@ -3,6 +3,11 @@ // FIXME: All this code can be removed when T117781/T171238 is resolved. #preftoc { text-align: center; + // Horizontal scrolling + overflow-x: scroll; + overflow-y: hidden; + white-space: nowrap; + padding: 0; li { display: inline-block; -- To view, visit https://gerrit.wikimedia.org/r/406124 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6766b4ef5a99c66ebb54079b07739315294c86a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/MinervaNeue Gerrit-Branch: master Gerrit-Owner: Jdlrobson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Remove MobilePreferences in favor of core
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406123 ) Change subject: Remove MobilePreferences in favor of core .. Remove MobilePreferences in favor of core Change-Id: I01a377494d77d39c5a620907dd22cec888a6f7b8 Depends-On: I6766b4ef5a99c66ebb54079b07739315294c86a7 Depends-On: Idbf62486c787179ee67deb22e4644f4fc742d9db --- M extension.json M includes/MobileFrontend.hooks.php D includes/specials/SpecialMobilePreferences.php 3 files changed, 0 insertions(+), 110 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/23/406123/1 diff --git a/extension.json b/extension.json index d45c9f3..b65224b 100644 --- a/extension.json +++ b/extension.json @@ -76,7 +76,6 @@ "SpecialNearby": "includes/specials/SpecialNearby.php", "SpecialMobileLanguages": "includes/specials/SpecialMobileLanguages.php", "SpecialMobileCite": "includes/specials/SpecialMobileCite.php", - "SpecialMobilePreferences": "includes/specials/SpecialMobilePreferences.php", "MobileSpecialPage": "includes/specials/MobileSpecialPage.php", "MobileSpecialPageFeed": "includes/specials/MobileSpecialPageFeed.php", "MFResourceLoaderParsedMessageModule": "includes/modules/MFResourceLoaderParsedMessageModule.php", diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 457ca02..a4604ec 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -488,7 +488,6 @@ // Replace the standard watchlist view with our custom one $list['Watchlist'] = 'SpecialMobileWatchlist'; $list['EditWatchlist'] = 'SpecialMobileEditWatchlist'; - $list['Preferences'] = 'SpecialMobilePreferences'; /* Special:MobileContributions redefines Special:History in * such a way that for Special:Contributions/Foo, Foo is a diff --git a/includes/specials/SpecialMobilePreferences.php b/includes/specials/SpecialMobilePreferences.php deleted file mode 100644 index 58ea8c0..000 --- a/includes/specials/SpecialMobilePreferences.php +++ /dev/null @@ -1,108 +0,0 @@ -getUser(); - $ctx = $this->getContext(); - - // load any preferences element - $removePrefs = Preferences::getPreferences( $user, $ctx ); - // check, if the element shouldn't be rendered - foreach ( $removePrefs as $formElement => $formDescriptor ) { - if ( - // we render only preferences, which are in a specific section, ... - isset( $formDescriptor['section'] ) && - ( - // ...which is specified by the given $key - $formDescriptor['section'] === $key || - strpos( $formDescriptor['section'], $key ) !== false - ) - ) { - // remove the preferences element from the array of elements, which are removed - unset( $removePrefs[$formElement] ); - } - } - // we need the keys only - $removePrefs = array_keys( $removePrefs ); - - // get the form element (the $removePrefs param specifies, which elements shouldn't be rendered) - $htmlForm = Preferences::getFormObject( $user, $ctx, 'PreferencesForm', $removePrefs ); - $htmlForm->suppressReset(); - $htmlForm->setModifiedUser( $user ); - $htmlForm->setId( 'mw-prefs-form' ); - $htmlForm->setSubmitText( $ctx->msg( 'saveprefs' )->text() ); - $htmlForm->setSubmitCallback( [ 'Preferences', 'tryUISubmit' ] ); - $htmlForm->setAction( SpecialPage::getTitleFor( $this->getName(), $key )->getLocalUrl() ); - return $htmlForm; - } - - /** -* @param string $par Key of section to display -* -* @throws MWException -* @throws ReadOnlyError -* @throws UserNotLoggedIn -*/ - public function execute( $par = '' ) { - $this->setHeaders(); - $this->outputHeader(); - $out = $this->getOutput(); - - // Prevent hijacked user scripts from sniffing passwords etc. - $out->disallowUserJs(); - - $this->requireLogin( 'prefsnologintext2' ); - $this->checkReadOnly(); - - if ( $this->getRequest()->getCheck( 'success' ) ) { - $out->addHtml( MobileUI::successBox( $this->msg( 's
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Load preferences js/css in mobile
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406125 ) Change subject: Load preferences js/css in mobile .. Load preferences js/css in mobile Change-Id: Idbf62486c787179ee67deb22e4644f4fc742d9db --- M resources/Resources.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/25/406125/1 diff --git a/resources/Resources.php b/resources/Resources.php index b494429..4405fe0 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -2112,6 +2112,7 @@ 'styles' => 'resources/src/mediawiki.special/mediawiki.special.pagesWithProp.css', ], 'mediawiki.special.preferences' => [ + 'targets' => [ 'desktop', 'mobile' ], 'scripts' => [ 'resources/src/mediawiki.special/mediawiki.special.preferences.confirmClose.js', 'resources/src/mediawiki.special/mediawiki.special.preferences.convertmessagebox.js', @@ -2132,6 +2133,7 @@ ], ], 'mediawiki.special.preferences.styles' => [ + 'targets' => [ 'desktop', 'mobile' ], 'styles' => 'resources/src/mediawiki.special/mediawiki.special.preferences.styles.css', ], 'mediawiki.special.recentchanges' => [ -- To view, visit https://gerrit.wikimedia.org/r/406125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idbf62486c787179ee67deb22e4644f4fc742d9db Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jdlrobson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: D'oh: fix creation/import of Default list.
Dbrant has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406122 ) Change subject: D'oh: fix creation/import of Default list. .. D'oh: fix creation/import of Default list. Change-Id: I3d8539856a37a7bbb16097698a73e94706d6f983 --- M app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/22/406122/1 diff --git a/app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java b/app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java index be1aaf5..287d650 100644 --- a/app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java +++ b/app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java @@ -132,8 +132,8 @@ private void renameListsWithIdenticalNameAsDefault(SQLiteDatabase db, List lists) { for (ReadingList list : lists) { -if (list.title().equalsIgnoreCase(WikipediaApp.getInstance().getString(R.string.default_reading_list_name))) { - list.title(String.format(WikipediaApp.getInstance().getString(R.string.reading_list_saved_list_rename), list.title())); +if (list.dbTitle().equalsIgnoreCase(WikipediaApp.getInstance().getString(R.string.default_reading_list_name))) { + list.title(String.format(WikipediaApp.getInstance().getString(R.string.reading_list_saved_list_rename), list.dbTitle())); ReadingListDbHelper.instance().updateList(db, list, false); } } @@ -188,7 +188,7 @@ } ReadingList origList = null; for (ReadingList list : lists) { -if (listKeys.contains(getListKey(list.title( { +if (listKeys.contains(getListKey(list.dbTitle( { origList = list; break; } @@ -202,9 +202,9 @@ while (newList.pages().size() >= Constants.MAX_READING_LIST_ARTICLE_LIMIT) { shouldShowLargeSplitMessage = true; newList = null; -String newListName = origList.title() + " (" + Integer.toString(++splitListIndex) + ")"; +String newListName = origList.dbTitle() + " (" + Integer.toString(++splitListIndex) + ")"; for (ReadingList list : lists) { -if (list.title().equals(newListName)) { +if (list.dbTitle().equals(newListName)) { newList = list; break; } -- To view, visit https://gerrit.wikimedia.org/r/406122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d8539856a37a7bbb16097698a73e94706d6f983 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dbrant ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: partman: Add temporary hack to test es2011 partitioning
Jcrespo has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406121 ) Change subject: partman: Add temporary hack to test es2011 partitioning .. partman: Add temporary hack to test es2011 partitioning Change-Id: I56a845fb0ba730a9aa404010a7344e2778b308ac --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index 966ca10..fb5043a 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -68,7 +68,7 @@ cp[12345][0-9][0-9][0-9]) echo partman/varnish.cfg ;; \ db1063) echo partman/db.cfg ;; \ db2036|db2034|db2078|db2090|db2092) echo partman/db.cfg ;; \ -db[12][01][0-9][0-9]|dbstore[12]00[1-9]|es[12]01[1-9]) echo partman/db-no-srv-format.cfg ;; \ +db[12][01][0-9][0-9]|dbstore[12]00[1-9]|es[12]01[2-9]) echo partman/db-no-srv-format.cfg ;; \ deploy[12]001|flerovium|furud) echo partman/raid1-lvm-ext4-srv-noswap.cfg;; \ d-i-test) echo partman/flat.cfg virtual.cfg ;; \ druid100[1-6]) echo partman/druid-4ssd-raid10.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/406121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56a845fb0ba730a9aa404010a7344e2778b308ac Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: partman: Add temporary hack to test es2011 partitioning
Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406121 ) Change subject: partman: Add temporary hack to test es2011 partitioning .. partman: Add temporary hack to test es2011 partitioning Change-Id: I56a845fb0ba730a9aa404010a7344e2778b308ac --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/406121/1 diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index 966ca10..fb5043a 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -68,7 +68,7 @@ cp[12345][0-9][0-9][0-9]) echo partman/varnish.cfg ;; \ db1063) echo partman/db.cfg ;; \ db2036|db2034|db2078|db2090|db2092) echo partman/db.cfg ;; \ -db[12][01][0-9][0-9]|dbstore[12]00[1-9]|es[12]01[1-9]) echo partman/db-no-srv-format.cfg ;; \ +db[12][01][0-9][0-9]|dbstore[12]00[1-9]|es[12]01[2-9]) echo partman/db-no-srv-format.cfg ;; \ deploy[12]001|flerovium|furud) echo partman/raid1-lvm-ext4-srv-noswap.cfg;; \ d-i-test) echo partman/flat.cfg virtual.cfg ;; \ druid100[1-6]) echo partman/druid-4ssd-raid10.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/406121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56a845fb0ba730a9aa404010a7344e2778b308ac 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] mediawiki...PageViewInfo[master]: Add @covers tags
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406120 ) Change subject: Add @covers tags .. Add @covers tags Change-Id: Iff08056bf98a4d59315d34cd853e1d37ccb0e0f6 --- M tests/phpunit/CachedPageViewServiceTest.php M tests/phpunit/WikimediaPageViewServiceTest.php 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageViewInfo refs/changes/20/406120/1 diff --git a/tests/phpunit/CachedPageViewServiceTest.php b/tests/phpunit/CachedPageViewServiceTest.php index 1c3f09d..c817eac 100644 --- a/tests/phpunit/CachedPageViewServiceTest.php +++ b/tests/phpunit/CachedPageViewServiceTest.php @@ -5,6 +5,9 @@ use HashBagOStuff; use StatusValue; +/* + * @covers \MediaWiki\Extensions\PageViewInfo\CachedPageViewService + */ class CachedPageViewServiceTest extends \PHPUnit_Framework_TestCase { /** @var CachedPageViewService */ protected $service; diff --git a/tests/phpunit/WikimediaPageViewServiceTest.php b/tests/phpunit/WikimediaPageViewServiceTest.php index ae092c0..afa849a 100644 --- a/tests/phpunit/WikimediaPageViewServiceTest.php +++ b/tests/phpunit/WikimediaPageViewServiceTest.php @@ -4,6 +4,9 @@ use Wikimedia\TestingAccessWrapper; +/* + * @covers \MediaWiki\Extensions\PageViewInfo\WikimediaPageViewService + */ class WikimediaPageViewServiceTest extends \PHPUnit_Framework_TestCase { /** @var [ \PHPUnit_Framework_MockObject_MockObject, callable ] */ protected $calls = []; -- To view, visit https://gerrit.wikimedia.org/r/406120 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff08056bf98a4d59315d34cd853e1d37ccb0e0f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageViewInfo Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "mariadb: Reimage es2011 into stretch/MariaDB 10.1"
Jcrespo has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406117 ) Change subject: Revert "mariadb: Reimage es2011 into stretch/MariaDB 10.1" .. Revert "mariadb: Reimage es2011 into stretch/MariaDB 10.1" Even with this, it still doesn't work. This reverts commit c466891f5bea0a5e1833e855ad66ed2f40ca25ae. Change-Id: I00c10a61404512be0a5a4cad86f4b0b6afe9cfde --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index eb28863..fa58c44 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2897,6 +2897,8 @@ host es2011 { hardware ethernet 14:18:77:54:48:37; fixed-address es2011.codfw.wmnet; +option pxelinux.pathprefix "http://apt.wikimedia.org/tftpboot/jessie-installer/";; +filename "lpxelinux.0"; } host es2012 { -- To view, visit https://gerrit.wikimedia.org/r/406117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00c10a61404512be0a5a4cad86f4b0b6afe9cfde Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Remove some backwards-compatibility in tests
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406119 ) Change subject: Remove some backwards-compatibility in tests .. Remove some backwards-compatibility in tests Change-Id: I1d3f5a838952c246af7491e355d65714f58a5e62 --- M tests/phpunit/ApiPageTriageActionTest.php M tests/phpunit/SpecialNewPagesFeedTest.php 2 files changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage refs/changes/19/406119/1 diff --git a/tests/phpunit/ApiPageTriageActionTest.php b/tests/phpunit/ApiPageTriageActionTest.php index 12c04df..9c65506 100644 --- a/tests/phpunit/ApiPageTriageActionTest.php +++ b/tests/phpunit/ApiPageTriageActionTest.php @@ -17,16 +17,14 @@ function setUp() { parent::setUp(); - $testUserClass = class_exists( 'ApiTestUser' ) ? 'ApiTestUser' : 'TestUser'; - - self::$users['one'] = new $testUserClass( + self::$users['one'] = new TestUser( 'ApitestuserA', 'Api Test UserA', 'api_test_us...@example.com', [ 'sysop' ] ); - self::$users['two'] = new $testUserClass( + self::$users['two'] = new TestUser( 'ApitestuserB', 'Api Test UserB', 'api_test_us...@example.com', diff --git a/tests/phpunit/SpecialNewPagesFeedTest.php b/tests/phpunit/SpecialNewPagesFeedTest.php index 828402e..102716b 100644 --- a/tests/phpunit/SpecialNewPagesFeedTest.php +++ b/tests/phpunit/SpecialNewPagesFeedTest.php @@ -17,8 +17,7 @@ public static $users; public function setUp() { - $testUserClass = class_exists( 'ApiTestUser' ) ? 'ApiTestUser' : 'TestUser'; - self::$users['one'] = new $testUserClass( + self::$users['one'] = new TestUser( 'PageTriageUser1', 'PageTriage Test User 1', 'pagetriage_test_use...@example.com', -- To view, visit https://gerrit.wikimedia.org/r/406119 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d3f5a838952c246af7491e355d65714f58a5e62 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageTriage Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Add @covers tags
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406118 ) Change subject: Add @covers tags .. Add @covers tags Change-Id: Ib82168281bdf80522bbadef9fd2a3fcd4731074b --- M tests/phpunit/ApiPageTriageActionTest.php M tests/phpunit/ArticleMetadataTest.php M tests/phpunit/SpecialNewPagesFeedTest.php 3 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage refs/changes/18/406118/1 diff --git a/tests/phpunit/ApiPageTriageActionTest.php b/tests/phpunit/ApiPageTriageActionTest.php index 78c2a96..12c04df 100644 --- a/tests/phpunit/ApiPageTriageActionTest.php +++ b/tests/phpunit/ApiPageTriageActionTest.php @@ -4,6 +4,7 @@ * * @group medium * @group EditorEngagement + * @covers ApiPageTriageAction */ class ApiPageTriageActionTest extends ApiTestCase { diff --git a/tests/phpunit/ArticleMetadataTest.php b/tests/phpunit/ArticleMetadataTest.php index 146dee0..076edb8 100644 --- a/tests/phpunit/ArticleMetadataTest.php +++ b/tests/phpunit/ArticleMetadataTest.php @@ -5,6 +5,7 @@ * @group EditorEngagement * @group Broken * @author Ian Baker + * @covers ArticleMetadata */ class ArticleMetadataTest extends MediaWikiTestCase { diff --git a/tests/phpunit/SpecialNewPagesFeedTest.php b/tests/phpunit/SpecialNewPagesFeedTest.php index 79c57be..828402e 100644 --- a/tests/phpunit/SpecialNewPagesFeedTest.php +++ b/tests/phpunit/SpecialNewPagesFeedTest.php @@ -1,10 +1,11 @@ https://gerrit.wikimedia.org/r/406118 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib82168281bdf80522bbadef9fd2a3fcd4731074b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageTriage Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "mariadb: Reimage es2011 into stretch/MariaDB 10.1"
Hello Marostegui, jenkins-bot, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/406117 to review the following change. Change subject: Revert "mariadb: Reimage es2011 into stretch/MariaDB 10.1" .. Revert "mariadb: Reimage es2011 into stretch/MariaDB 10.1" Even with this, it still doesn't work. This reverts commit c466891f5bea0a5e1833e855ad66ed2f40ca25ae. Change-Id: I00c10a61404512be0a5a4cad86f4b0b6afe9cfde --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/17/406117/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index eb28863..fa58c44 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2897,6 +2897,8 @@ host es2011 { hardware ethernet 14:18:77:54:48:37; fixed-address es2011.codfw.wmnet; +option pxelinux.pathprefix "http://apt.wikimedia.org/tftpboot/jessie-installer/";; +filename "lpxelinux.0"; } host es2012 { -- To view, visit https://gerrit.wikimedia.org/r/406117 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00c10a61404512be0a5a4cad86f4b0b6afe9cfde Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...LoginNotify[master]: Add @covers tag
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406116 ) Change subject: Add @covers tag .. Add @covers tag Change-Id: Ifb241ba3f2ec6c25eee812b5c36cc354e3164765 --- M tests/phpunit/LoginNotifyTests.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/LoginNotifyTests.php b/tests/phpunit/LoginNotifyTests.php index 9261a46..643fd95 100644 --- a/tests/phpunit/LoginNotifyTests.php +++ b/tests/phpunit/LoginNotifyTests.php @@ -5,6 +5,9 @@ use Wikimedia\TestingAccessWrapper; // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong +/** + * @covers \LoginNotify\LoginNotify + */ class LoginNotifyTests extends MediaWikiTestCase { private $inst; -- To view, visit https://gerrit.wikimedia.org/r/406116 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifb241ba3f2ec6c25eee812b5c36cc354e3164765 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LoginNotify Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Yurik Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Add @covers tags
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406115 ) Change subject: Add @covers tags .. Add @covers tags Change-Id: I0633c93c9b9c9d048ad318e1c3ccaddf812d605e --- M tests/phpunit/ApiSanitizeMapDataTest.php M tests/phpunit/CoordFormatterTest.php M tests/phpunit/SimpleStyleParserTest.php M tests/phpunit/SpecialMapTest.php M tests/phpunit/ValidationTest.php 5 files changed, 5 insertions(+), 0 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/ApiSanitizeMapDataTest.php b/tests/phpunit/ApiSanitizeMapDataTest.php index cfafe99..d2a43c3 100644 --- a/tests/phpunit/ApiSanitizeMapDataTest.php +++ b/tests/phpunit/ApiSanitizeMapDataTest.php @@ -10,6 +10,7 @@ use UsageException; /** + * @covers \Kartographer\ApiSanitizeMapData * @group Kartographer */ class ApiSanitizeMapDataTest extends MediaWikiTestCase { diff --git a/tests/phpunit/CoordFormatterTest.php b/tests/phpunit/CoordFormatterTest.php index d7e52b0..8c2a530 100644 --- a/tests/phpunit/CoordFormatterTest.php +++ b/tests/phpunit/CoordFormatterTest.php @@ -7,6 +7,7 @@ use MediaWikiTestCase; /** + * @covers \Kartographer\CoordFormatter * @group Kartographer */ class CoordFormatterTest extends MediaWikiTestCase { diff --git a/tests/phpunit/SimpleStyleParserTest.php b/tests/phpunit/SimpleStyleParserTest.php index e46fbcb..0ff1788 100644 --- a/tests/phpunit/SimpleStyleParserTest.php +++ b/tests/phpunit/SimpleStyleParserTest.php @@ -9,6 +9,7 @@ use Title; /** + * @covers \Kartographer\SimpleStyleParser * @group Kartographer */ class SimpleStyleParserTest extends MediaWikiTestCase { diff --git a/tests/phpunit/SpecialMapTest.php b/tests/phpunit/SpecialMapTest.php index 4f2c79a..f1a067c 100644 --- a/tests/phpunit/SpecialMapTest.php +++ b/tests/phpunit/SpecialMapTest.php @@ -8,6 +8,7 @@ use Title; /** + * @covers \Kartographer\SpecialMap * @group Kartographer */ class SpecialMapTest extends MediaWikiTestCase { diff --git a/tests/phpunit/ValidationTest.php b/tests/phpunit/ValidationTest.php index 6153994..630de6c 100644 --- a/tests/phpunit/ValidationTest.php +++ b/tests/phpunit/ValidationTest.php @@ -10,6 +10,7 @@ use Title; /** + * @covers \Kartographer\SimpleStyleParser * @group Kartographer */ class ValidationTest extends MediaWikiTestCase { -- To view, visit https://gerrit.wikimedia.org/r/406115 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0633c93c9b9c9d048ad318e1c3ccaddf812d605e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Kartographer Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Yurik Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...LoginNotify[master]: Add @covers tag
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406116 ) Change subject: Add @covers tag .. Add @covers tag Change-Id: Ifb241ba3f2ec6c25eee812b5c36cc354e3164765 --- M tests/phpunit/LoginNotifyTests.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LoginNotify refs/changes/16/406116/1 diff --git a/tests/phpunit/LoginNotifyTests.php b/tests/phpunit/LoginNotifyTests.php index 9261a46..643fd95 100644 --- a/tests/phpunit/LoginNotifyTests.php +++ b/tests/phpunit/LoginNotifyTests.php @@ -5,6 +5,9 @@ use Wikimedia\TestingAccessWrapper; // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong +/** + * @covers \LoginNotify\LoginNotify + */ class LoginNotifyTests extends MediaWikiTestCase { private $inst; -- To view, visit https://gerrit.wikimedia.org/r/406116 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb241ba3f2ec6c25eee812b5c36cc354e3164765 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LoginNotify Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Rearrange UsageDeduplicator implementation
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405896 ) Change subject: Rearrange UsageDeduplicator implementation .. Rearrange UsageDeduplicator implementation This is basically the exact same implementation, just moved around a bit. I found the way the code was previously arranged not that optimal. The code was spread out quite a lot. Significant changes are: * The actual deduplication intentionally replaces an array of usages with a single usage. This makes the later array_walk_recursive run faster because it does have less 1-element arrays to iterate. * The actual deduplication use &-references to manipulate the one array, instead of constantly constructing new ones. * Structuring is done in one step instead of two. $array[$foo][$bar][] works just fine here. * Note that labels and descriptions are not mentioned any more! The same deduplication logic is applied to all aspects, not only labels and descriptions. This might be a mistake, but no test fails. If you think this is a mistake, please add a test that demonstrates why. Bug: T178079 Change-Id: Ic8ec86088d49b5979a78e99d2cafce5f6c86f94d --- M client/includes/Usage/UsageDeduplicator.php 1 file changed, 39 insertions(+), 45 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/Usage/UsageDeduplicator.php b/client/includes/Usage/UsageDeduplicator.php index 8c7e4ce..8a5fe66 100644 --- a/client/includes/Usage/UsageDeduplicator.php +++ b/client/includes/Usage/UsageDeduplicator.php @@ -12,81 +12,75 @@ /** * @param EntityUsage[] $usages +* * @return EntityUsage[] */ public function deduplicate( array $usages ) { $structuredUsages = $this->structureUsages( $usages ); - - foreach ( $structuredUsages as $entityId => $usages ) { - $structuredUsages[$entityId] = $this->deduplicateUsagesPerEntity( $usages ); - } - - // Flatten the structured array - $return = []; - array_walk_recursive( - $structuredUsages, - function ( EntityUsage $usage ) use ( &$return ) { - $return[$usage->getIdentityString()] = $usage; - } - ); - return $return; + $structuredUsages = $this->deduplicateStructuredUsages( $structuredUsages ); + return $this->flattenStructuredUsages( $structuredUsages ); } /** * @param EntityUsage[] $usages -* @return array[] +* +* @return array[][] three-dimensional array of +* [ $entityId => [ $aspectKey => [ EntityUsage $usage, … ], … ], … ] */ private function structureUsages( array $usages ) { $structuredUsages = []; - foreach ( $usages as $usage ) { - $entityId = $usage->getEntityId(); - $structuredUsages[$entityId->getSerialization()][] = $usage; - } - return array_map( [ $this, 'structureUsagesPerEntity' ], $structuredUsages ); - } - - /** -* @param EntityUsage[] $usages -* @return array[] -*/ - private function structureUsagesPerEntity( array $usages ) { - $structuredUsages = [ - EntityUsage::DESCRIPTION_USAGE => [], - EntityUsage::LABEL_USAGE => [], - ]; foreach ( $usages as $usage ) { + $entityId = $usage->getEntityId()->getSerialization(); $aspect = $usage->getAspect(); - $structuredUsages[$aspect][] = $usage; + $structuredUsages[$entityId][$aspect][] = $usage; } return $structuredUsages; } /** -* @param array[] $usages +* @param array[][] $structuredUsages +* * @return array[] */ - private function deduplicateUsagesPerEntity( array $usages ) { - $usages[EntityUsage::DESCRIPTION_USAGE] = $this->deduplicatePerType( - $usages[EntityUsage::DESCRIPTION_USAGE] - ); - $usages[EntityUsage::LABEL_USAGE] = $this->deduplicatePerType( - $usages[EntityUsage::LABEL_USAGE] - ); - return $usages; + private function deduplicateStructuredUsages( array $structuredUsages ) { + foreach ( $structuredUsages as &$usagesPerEntity ) { + foreach ( $usagesPerEntity as &$usagesPerAspect ) { + $this->deduplicatePerAspect( $usagesPerAspect ); + } + } + +
[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Add @covers tags
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406115 ) Change subject: Add @covers tags .. Add @covers tags Change-Id: I0633c93c9b9c9d048ad318e1c3ccaddf812d605e --- M tests/phpunit/ApiSanitizeMapDataTest.php M tests/phpunit/CoordFormatterTest.php M tests/phpunit/SimpleStyleParserTest.php M tests/phpunit/SpecialMapTest.php M tests/phpunit/ValidationTest.php 5 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/15/406115/1 diff --git a/tests/phpunit/ApiSanitizeMapDataTest.php b/tests/phpunit/ApiSanitizeMapDataTest.php index cfafe99..d2a43c3 100644 --- a/tests/phpunit/ApiSanitizeMapDataTest.php +++ b/tests/phpunit/ApiSanitizeMapDataTest.php @@ -10,6 +10,7 @@ use UsageException; /** + * @covers \Kartographer\ApiSanitizeMapData * @group Kartographer */ class ApiSanitizeMapDataTest extends MediaWikiTestCase { diff --git a/tests/phpunit/CoordFormatterTest.php b/tests/phpunit/CoordFormatterTest.php index d7e52b0..8c2a530 100644 --- a/tests/phpunit/CoordFormatterTest.php +++ b/tests/phpunit/CoordFormatterTest.php @@ -7,6 +7,7 @@ use MediaWikiTestCase; /** + * @covers \Kartographer\CoordFormatter * @group Kartographer */ class CoordFormatterTest extends MediaWikiTestCase { diff --git a/tests/phpunit/SimpleStyleParserTest.php b/tests/phpunit/SimpleStyleParserTest.php index e46fbcb..0ff1788 100644 --- a/tests/phpunit/SimpleStyleParserTest.php +++ b/tests/phpunit/SimpleStyleParserTest.php @@ -9,6 +9,7 @@ use Title; /** + * @covers \Kartographer\SimpleStyleParser * @group Kartographer */ class SimpleStyleParserTest extends MediaWikiTestCase { diff --git a/tests/phpunit/SpecialMapTest.php b/tests/phpunit/SpecialMapTest.php index 4f2c79a..f1a067c 100644 --- a/tests/phpunit/SpecialMapTest.php +++ b/tests/phpunit/SpecialMapTest.php @@ -8,6 +8,7 @@ use Title; /** + * @covers \Kartographer\SpecialMap * @group Kartographer */ class SpecialMapTest extends MediaWikiTestCase { diff --git a/tests/phpunit/ValidationTest.php b/tests/phpunit/ValidationTest.php index 6153994..630de6c 100644 --- a/tests/phpunit/ValidationTest.php +++ b/tests/phpunit/ValidationTest.php @@ -10,6 +10,7 @@ use Title; /** + * @covers \Kartographer\SimpleStyleParser * @group Kartographer */ class ValidationTest extends MediaWikiTestCase { -- To view, visit https://gerrit.wikimedia.org/r/406115 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0633c93c9b9c9d048ad318e1c3ccaddf812d605e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Kartographer Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb-partman: Modify recipe, to test with es2011
Jcrespo has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406114 ) Change subject: mariadb-partman: Modify recipe, to test with es2011 .. mariadb-partman: Modify recipe, to test with es2011 es2011 fails its install complaining about a "root partition". In this updated recipe, we remove all references to partitioning to aim for a manual partitioning, to test if it is installer-related or something else preventing the installation. Change-Id: I0305251a6bf50fc188c19fb9f2f41064c647da8c --- M modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg 1 file changed, 0 insertions(+), 33 deletions(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg b/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg index ae153f1..872dbcd 100644 --- a/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg +++ b/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg @@ -16,37 +16,4 @@ d-ipartman-lvm/confirm_nooverwrite boolean true d-ipartman/confirm boolean true -# standardize vg name for snapshots (otherwise uses hostname) -d-ipartman-auto-lvm/new_vg_name string tank - -d-ipartman-auto/expert_recipe string es :: \ - 4 4 4 ext4 \ - $primary{ } \ - $bootable{ }\ - method{ format }\ - format{ } \ - use_filesystem{ } \ - filesystem{ ext4 } \ - mountpoint{ / } \ - . \ - 8000 8000 8000 linux-swap \ - method{ swap } \ - format{ } \ - . \ - 64 1000 1000 xfs\ - lv_name{ data } \ - $defaultignore{ } \ - $lvmok{ } \ - mountpoint{ /srv } \ - options/nobarrier { nobarrier } \ - options/noatime { noatime } \ - . - -d-ipartman-auto-lvm/guided_sizestring 87% - -d-ipartman/choose_partition\ - select finish -d-ipartman-partitioning/confirm_write_new_labelboolean true - d-ipartman-auto/choose_recipe es -d-ipartman/confirm_nooverwrite boolean true -- To view, visit https://gerrit.wikimedia.org/r/406114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0305251a6bf50fc188c19fb9f2f41064c647da8c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb-partman: Modify recipe, to test with es2011
Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406114 ) Change subject: mariadb-partman: Modify recipe, to test with es2011 .. mariadb-partman: Modify recipe, to test with es2011 es2011 fails its install complaining about a "root partition". In this updated recipe, we remove all references to partitioning to aim for a manual partitioning, to test if it is installer-related or something else preventing the installation. Change-Id: I0305251a6bf50fc188c19fb9f2f41064c647da8c --- M modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg 1 file changed, 0 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/14/406114/1 diff --git a/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg b/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg index ae153f1..872dbcd 100644 --- a/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg +++ b/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg @@ -16,37 +16,4 @@ d-ipartman-lvm/confirm_nooverwrite boolean true d-ipartman/confirm boolean true -# standardize vg name for snapshots (otherwise uses hostname) -d-ipartman-auto-lvm/new_vg_name string tank - -d-ipartman-auto/expert_recipe string es :: \ - 4 4 4 ext4 \ - $primary{ } \ - $bootable{ }\ - method{ format }\ - format{ } \ - use_filesystem{ } \ - filesystem{ ext4 } \ - mountpoint{ / } \ - . \ - 8000 8000 8000 linux-swap \ - method{ swap } \ - format{ } \ - . \ - 64 1000 1000 xfs\ - lv_name{ data } \ - $defaultignore{ } \ - $lvmok{ } \ - mountpoint{ /srv } \ - options/nobarrier { nobarrier } \ - options/noatime { noatime } \ - . - -d-ipartman-auto-lvm/guided_sizestring 87% - -d-ipartman/choose_partition\ - select finish -d-ipartman-partitioning/confirm_write_new_labelboolean true - d-ipartman-auto/choose_recipe es -d-ipartman/confirm_nooverwrite boolean true -- To view, visit https://gerrit.wikimedia.org/r/406114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0305251a6bf50fc188c19fb9f2f41064c647da8c 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] mediawiki...parsoid[master]: Stop clearing tplInfo if don't find a table for fostered con...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406049 ) Change subject: Stop clearing tplInfo if don't find a table for fostered content .. Stop clearing tplInfo if don't find a table for fostered content Also, remove some commented out code that should have gone with dd4bda7 Fixes the following and others, http://localhost:8000/en.wikipedia.org/v3/page/html/Phulwari_(Vidhan_Sabha_constituency)/793701085 http://localhost:8000/en.wikipedia.org/v3/page/html/User%3ADylanrocks96%2Fsandbox/776441874 Bug: T185346 Change-Id: Ib3c635715ed8936e514e4e8f2f725ab345921f76 --- M lib/wt2html/pp/processors/linter.js 1 file changed, 5 insertions(+), 15 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/wt2html/pp/processors/linter.js b/lib/wt2html/pp/processors/linter.js index 7d093e4..55206a7 100644 --- a/lib/wt2html/pp/processors/linter.js +++ b/lib/wt2html/pp/processors/linter.js @@ -377,15 +377,19 @@ */ function logFosteredContent(env, node, dp, tplInfo) { var maybeTable = node.nextSibling; + var clear = false; + while (maybeTable && !DU.hasNodeName(maybeTable, 'table')) { if (tplInfo && maybeTable === tplInfo.last) { - tplInfo.clear = true; + clear = true; } maybeTable = maybeTable.nextSibling; } if (!maybeTable) { return null; + } else if (clear && tplInfo) { + tplInfo.clear = true; } // In pathological cases, we might walk past fostered nodes @@ -832,21 +836,7 @@ function logWikitextFixups(node, env, tplInfo) { var dp = DU.getDataParsoid(node); - /* -* Turn this off since this is wasted processing -* that is not really actionable at this time. -* - if (tplInfo && tplInfo.first === node) { - // Log transclusions with more than one part - logTransclusions(env, node, dp, tplInfo); - } - */ - logTreeBuilderFixup(env, node, dp, tplInfo); - // Turning this off for now since - // (a) this needs fixing (b) not exposed in linter extension output yet - // (c) this is source of error logspam in kibana - // logIgnoredTableAttr(env, node, dp, tplInfo); logDeletableTables(env, node, dp, tplInfo); // For T161341 logBadPWrapping(env, node, dp, tplInfo);// For T161306 logObsoleteHTMLTags(env, node, dp, tplInfo); -- To view, visit https://gerrit.wikimedia.org/r/406049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib3c635715ed8936e514e4e8f2f725ab345921f76 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Sbailey Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Scap: Bring back all target nodes
Mobrovac has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406113 ) Change subject: Scap: Bring back all target nodes .. Scap: Bring back all target nodes Bug: T184100 Change-Id: I62f06e25068a2127c6381515ddab451815e7603c --- M scap/targets 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Mobrovac: Verified; Looks good to me, approved diff --git a/scap/targets b/scap/targets index 2fdcb9d..7a8ee83 100644 --- a/scap/targets +++ b/scap/targets @@ -3,7 +3,9 @@ restbase1010.eqiad.wmnet restbase1011.eqiad.wmnet restbase1012.eqiad.wmnet +restbase1013.eqiad.wmnet restbase1014.eqiad.wmnet +restbase1015.eqiad.wmnet restbase1016.eqiad.wmnet restbase1017.eqiad.wmnet restbase1018.eqiad.wmnet @@ -12,6 +14,9 @@ restbase2004.codfw.wmnet restbase2005.codfw.wmnet restbase2006.codfw.wmnet +restbase2007.codfw.wmnet +restbase2008.codfw.wmnet +restbase2009.codfw.wmnet restbase2010.codfw.wmnet restbase2011.codfw.wmnet restbase2012.codfw.wmnet -- To view, visit https://gerrit.wikimedia.org/r/406113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62f06e25068a2127c6381515ddab451815e7603c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/restbase/deploy Gerrit-Branch: master Gerrit-Owner: Mobrovac Gerrit-Reviewer: Mobrovac ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Scap: Bring back all target nodes
Mobrovac has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406113 ) Change subject: Scap: Bring back all target nodes .. Scap: Bring back all target nodes Bug: T184100 Change-Id: I62f06e25068a2127c6381515ddab451815e7603c --- M scap/targets 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy refs/changes/13/406113/1 diff --git a/scap/targets b/scap/targets index 2fdcb9d..7a8ee83 100644 --- a/scap/targets +++ b/scap/targets @@ -3,7 +3,9 @@ restbase1010.eqiad.wmnet restbase1011.eqiad.wmnet restbase1012.eqiad.wmnet +restbase1013.eqiad.wmnet restbase1014.eqiad.wmnet +restbase1015.eqiad.wmnet restbase1016.eqiad.wmnet restbase1017.eqiad.wmnet restbase1018.eqiad.wmnet @@ -12,6 +14,9 @@ restbase2004.codfw.wmnet restbase2005.codfw.wmnet restbase2006.codfw.wmnet +restbase2007.codfw.wmnet +restbase2008.codfw.wmnet +restbase2009.codfw.wmnet restbase2010.codfw.wmnet restbase2011.codfw.wmnet restbase2012.codfw.wmnet -- To view, visit https://gerrit.wikimedia.org/r/406113 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62f06e25068a2127c6381515ddab451815e7603c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/restbase/deploy Gerrit-Branch: master Gerrit-Owner: Mobrovac ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [Delete Batch] Ignore some messages
MarcoAurelio has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406078 ) Change subject: [Delete Batch] Ignore some messages .. [Delete Batch] Ignore some messages Change-Id: If6f9e2e6b7962fd61939347bc9f7c85ae051f125 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/78/406078/1 -- To view, visit https://gerrit.wikimedia.org/r/406078 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6f9e2e6b7962fd61939347bc9f7c85ae051f125 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: MarcoAurelio Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Gadgets[master]: Fix PHPDocs of GadgetDefinitionContent::getDeletionUpdates
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406031 ) Change subject: Fix PHPDocs of GadgetDefinitionContent::getDeletionUpdates .. Fix PHPDocs of GadgetDefinitionContent::getDeletionUpdates DataUpdate is a specific implementation (currently the only one), while DeferrableUpdate is the interface. Binding against the interface is enough, and what the base classes already do. I'm also removing a line of meaningless documentation. "Creates an instance of this class" is a general description that is true for all constructors. Change-Id: Ia6dc86b078628db5e0ab68ef46bf0396567b767c --- M includes/GadgetResourceLoaderModule.php M includes/content/GadgetDefinitionContent.php 2 files changed, 1 insertion(+), 3 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/GadgetResourceLoaderModule.php b/includes/GadgetResourceLoaderModule.php index e1b2602..13d16cd 100644 --- a/includes/GadgetResourceLoaderModule.php +++ b/includes/GadgetResourceLoaderModule.php @@ -16,8 +16,6 @@ private $gadget; /** -* Creates an instance of this class -* * @param array $options */ public function __construct( array $options ) { diff --git a/includes/content/GadgetDefinitionContent.php b/includes/content/GadgetDefinitionContent.php index b5aa7cf..cede38d 100644 --- a/includes/content/GadgetDefinitionContent.php +++ b/includes/content/GadgetDefinitionContent.php @@ -97,7 +97,7 @@ /** * @param WikiPage $page * @param ParserOutput $parserOutput -* @return DataUpdate[] +* @return DeferrableUpdate[] */ public function getDeletionUpdates( WikiPage $page, ParserOutput $parserOutput = null ) { return array_merge( -- To view, visit https://gerrit.wikimedia.org/r/406031 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia6dc86b078628db5e0ab68ef46bf0396567b767c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gadgets Gerrit-Branch: master Gerrit-Owner: Thiemo Kreuz (WMDE) Gerrit-Reviewer: Legoktm Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb: Reimage es2011 into stretch/MariaDB 10.1
Jcrespo has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406062 ) Change subject: mariadb: Reimage es2011 into stretch/MariaDB 10.1 .. mariadb: Reimage es2011 into stretch/MariaDB 10.1 We will test stretch on es2011, if everything workse, we will extend it to all External Storage servers by default- even if there are no plass to do mass-reimages/upgrades for now. Change-Id: I2d3109e253846b0a9c3c15e4a29471bc633cbac1 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index fa58c44..eb28863 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2897,8 +2897,6 @@ host es2011 { hardware ethernet 14:18:77:54:48:37; fixed-address es2011.codfw.wmnet; -option pxelinux.pathprefix "http://apt.wikimedia.org/tftpboot/jessie-installer/";; -filename "lpxelinux.0"; } host es2012 { -- To view, visit https://gerrit.wikimedia.org/r/406062 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d3109e253846b0a9c3c15e4a29471bc633cbac1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] marvin[master]: Chore: don't exclude ESLint config from linting
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406076 ) Change subject: Chore: don't exclude ESLint config from linting .. Chore: don't exclude ESLint config from linting Specify that the ESLint config itself, as a JSON file, is to be considered when linting. Change-Id: Ic7deaa2e08ac1f9e7ea20ef49e0efbfbaa02f4b0 --- M .eslintignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/76/406076/1 diff --git a/.eslintignore b/.eslintignore index 178135c..f22cff7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ +!/.eslintrc.json /dist/ -- To view, visit https://gerrit.wikimedia.org/r/406076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7deaa2e08ac1f9e7ea20ef49e0efbfbaa02f4b0 Gerrit-PatchSet: 1 Gerrit-Project: marvin Gerrit-Branch: master Gerrit-Owner: Niedzielski Gerrit-Reviewer: Sniedzielski ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] marvin[master]: WIP: Update: add search box UI
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406077 ) Change subject: WIP: Update: add search box UI .. WIP: Update: add search box UI Refactor the Header component to use the Grid and add a search box. Change-Id: I684392b9df09c1f798ca79d45d4040b68a1bd9fa --- M package.json M src/client/index.css M src/common/components/header/header.css M src/common/components/header/header.tsx M src/common/components/icon/icon.tsx A src/common/components/search-input/search-input.css A src/common/components/search-input/search-input.tsx 7 files changed, 97 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/77/406077/1 diff --git a/package.json b/package.json index 6f16817..a459c43 100644 --- a/package.json +++ b/package.json @@ -111,11 +111,11 @@ "bundlesize": [ { "path": "dist/public/index.*.js", - "maxSize": "4.1KB" + "maxSize": "4.8KB" }, { "path": "dist/public/index.*.css", - "maxSize": "5.8KB" + "maxSize": "5.9KB" }, { "path": "dist/public/runtime.*.js", diff --git a/src/client/index.css b/src/client/index.css index 7a71189..1743b98 100644 --- a/src/client/index.css +++ b/src/client/index.css @@ -36,6 +36,7 @@ /* TODO: Upstream to wikimedia-ui-base once reviewed by design */ --space: 16px; + --quarter-space: calc(var(--space) / 4); --half-space: calc(var(--space) / 2); --double-space: calc(var(--space) * 2); diff --git a/src/common/components/header/header.css b/src/common/components/header/header.css index 1b925e3..8b80431 100644 --- a/src/common/components/header/header.css +++ b/src/common/components/header/header.css @@ -1,31 +1,21 @@ .Header { - /* Header height set by design spec */ - height: 60px; + /* Header height set by design spec (but don't limit height when wrapping). */ + min-height: 60px; - /* Evenly space out placeholders and vertically align them */ - display: flex; - justify-content: space-between; + /* Center items vertically. */ align-items: center; - /* Spacing */ - padding: 0 var(--space); + /* The gutter is a half space. The top and bottom margins are also a half + space but must be broken up between container and children so that wrapping + items don't have a double margin. */ + margin: var(--quarter-space) var(--half-space); } -/* Vertically align placeholder's contents too */ .Header-left, -.Header-right, -.Header-center { - display: flex; - align-items: center; -} - -.Header-left > * { - /* Contained items on the left part are spaced to the right */ - margin-right: var(--space); -} -.Header-right > * { - /* Contained items on the right part are spaced to the left */ - margin-left: var(--space); +.Header-right { + /* When items are stacked or layout horizontally, they have a cumulative + margin of a half space. */ + margin: var(--quarter-space) 0; } .Header-wordmark { diff --git a/src/common/components/header/header.tsx b/src/common/components/header/header.tsx index e0148f5..7b3b790 100644 --- a/src/common/components/header/header.tsx +++ b/src/common/components/header/header.tsx @@ -1,21 +1,25 @@ import { h } from "preact"; +import { SearchInput } from "../search-input/search-input"; import Wordmark from "../wordmark/wordmark"; import Link from "../link/link"; import { ClassProps, classOf } from "../preact-utils"; import { home } from "../../router/routes"; import "./header.css"; +import { Grid, Size } from "../grid/grid"; export default function Header(props: ClassProps): JSX.Element { return ( - - + + {/* The center placeholder will be used later for desktop sizes */} - - - + + + + + ); } diff --git a/src/common/components/icon/icon.tsx b/src/common/components/icon/icon.tsx index 4d7492a..c58d4c0 100644 --- a/src/common/components/icon/icon.tsx +++ b/src/common/components/icon/icon.tsx @@ -1,4 +1,5 @@ import { h } from "preact"; +import { ClassProps, classOf } from "../preact-utils"; import menu from "./icons/menu.svg"; import search from "./icons/search.svg"; import "./icon.css"; @@ -9,6 +10,14 @@ export { menu, search }; -export default function Icon({ svg }: Props): JSX.Element { - return ; +export default function Icon({ + svg, + ...props +}: Props & ClassProps): JSX.Element { + return ( + + ); } diff --git a/src/common/components/search-input/search-input.css b/src/common/components/search-input/search-input.css new file mode 100644 index 000..aacca0c --- /dev/null +++ b/src/common/components/search-input/search-input.css @@ -0,0 +1,48 @@ +.SearchInput { + /* Set the layout to flex to allow the input to grow. */ + display: flex; +} + +.SearchInput-input { + /* Button and input border width and padding are identical. */ + border: var(--b
[MediaWiki-commits] [Gerrit] translatewiki[master]: [Cite] Message is empty
Raimond Spekking has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406075 ) Change subject: [Cite] Message is empty .. [Cite] Message is empty Change-Id: I927649c94822368a88c0384524dd3bc1952f5288 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 3 insertions(+), 3 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 64e873c..d14e127 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -438,9 +438,9 @@ Cite file = Cite/i18n/%CODE%.json optional = cite_reference_link_key_with_num, cite_reference_link_prefix, cite_reference_link_suffix, cite_references_link_prefix -optional = cite_references_link_suffix, cite_reference_link, cite_references_link_one, cite_references_link_many +optional = cite_reference_link, cite_references_link_one, cite_references_link_many optional = cite_references_link_many_format, cite_references_link_many_format_backlink_labels, cite_references_link_many_sep, cite_references_link_many_and -ignored = cite_references_no_link +ignored = cite_references_no_link, cite_references_link_suffix ignored = cite_error_refs_without_references_category, visualeditor-cite-tool-definition.json, cite-tool-definition.json Cite - VisualEditor @@ -1299,7 +1299,7 @@ Link Target -# Linked Wiki // 2016-09-19 Missing qqq +# Linked Wiki // T185523 to merge 6 en.json into 1 file Linter aliasfile = Linter/Linter.alias.php -- To view, visit https://gerrit.wikimedia.org/r/406075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I927649c94822368a88c0384524dd3bc1952f5288 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: Raimond Spekking ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] translatewiki[master]: [Cite] Message is empty
Raimond Spekking has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406075 ) Change subject: [Cite] Message is empty .. [Cite] Message is empty Change-Id: I927649c94822368a88c0384524dd3bc1952f5288 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/75/406075/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 64e873c..d14e127 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -438,9 +438,9 @@ Cite file = Cite/i18n/%CODE%.json optional = cite_reference_link_key_with_num, cite_reference_link_prefix, cite_reference_link_suffix, cite_references_link_prefix -optional = cite_references_link_suffix, cite_reference_link, cite_references_link_one, cite_references_link_many +optional = cite_reference_link, cite_references_link_one, cite_references_link_many optional = cite_references_link_many_format, cite_references_link_many_format_backlink_labels, cite_references_link_many_sep, cite_references_link_many_and -ignored = cite_references_no_link +ignored = cite_references_no_link, cite_references_link_suffix ignored = cite_error_refs_without_references_category, visualeditor-cite-tool-definition.json, cite-tool-definition.json Cite - VisualEditor @@ -1299,7 +1299,7 @@ Link Target -# Linked Wiki // 2016-09-19 Missing qqq +# Linked Wiki // T185523 to merge 6 en.json into 1 file Linter aliasfile = Linter/Linter.alias.php -- To view, visit https://gerrit.wikimedia.org/r/406075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I927649c94822368a88c0384524dd3bc1952f5288 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] wikidata...rdf[master]: Add timeout to Wikibase requests
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405825 ) Change subject: Add timeout to Wikibase requests .. Add timeout to Wikibase requests Bug: T179239 Change-Id: Ib027a457a10a268ed365b11390cf03308bcb7b84 --- M tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java 1 file changed, 26 insertions(+), 1 deletion(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified Gehel: Looks good to me, but someone else must approve diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java b/tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java index b7d3e16..ae1a703 100644 --- a/tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java +++ b/tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java @@ -30,6 +30,7 @@ import org.apache.http.NameValuePair; import org.apache.http.client.HttpRequestRetryHandler; import org.apache.http.client.ServiceUnavailableRetryStrategy; +import org.apache.http.client.config.RequestConfig; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; @@ -79,6 +80,14 @@ private static final Logger log = LoggerFactory.getLogger(WikibaseRepository.class); /** + * Timeout for communications to Wikidata, in ms. + */ +private static final String TIMEOUT_MILLIS = "5000"; +/** + * Request timeout property. + */ +public static final String TIMEOUT_PROPERTY = WikibaseRepository.class + ".timeout"; +/** * How many retries allowed on error. */ private static final int RETRIES = 3; @@ -104,6 +113,19 @@ .setUserAgent("Wikidata Query Service Updater") .build(); +/** + * Configured timeout for requests. + */ +private final int requestTimeout = Integer +.parseInt(System.getProperty(TIMEOUT_PROPERTY, TIMEOUT_MILLIS)); + +/** + * Request configuration including timeout. + */ +private final RequestConfig configWithTimeout = RequestConfig.custom() +.setSocketTimeout(requestTimeout) +.setConnectTimeout(requestTimeout) +.setConnectionRequestTimeout(requestTimeout).build(); /** * Builds uris to get stuff from wikibase. */ @@ -236,8 +258,10 @@ throws RetryableException { URI uri = uris.recentChanges(nextStartTime, lastContinue, batchSize); log.debug("Polling for changes from {}", uri); +HttpGet request = new HttpGet(uri); +request.setConfig(configWithTimeout); try { -return checkApi(getJson(new HttpGet(uri), RecentChangeResponse.class)); +return checkApi(getJson(request, RecentChangeResponse.class)); } catch (UnknownHostException | SocketException e) { // We want to bail on this, since it happens to be sticky for some reason throw new RuntimeException(e); @@ -264,6 +288,7 @@ StatementCollector collector = new StatementCollector(); parser.setRDFHandler(new NormalizingRdfHandler(collector)); HttpGet request = new HttpGet(uri); +request.setConfig(configWithTimeout); try { try (CloseableHttpResponse response = client.execute(request)) { if (response.getStatusLine().getStatusCode() == 404) { -- To view, visit https://gerrit.wikimedia.org/r/405825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib027a457a10a268ed365b11390cf03308bcb7b84 Gerrit-PatchSet: 2 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: Smalyshev Gerrit-Reviewer: Gehel Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Fixup xgboost training
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406068 ) Change subject: Fixup xgboost training .. Fixup xgboost training * Use tree_method = hist when training on a single worker. This is significantly faster than the approx method used by default. * We've always trained with dense feature matrix's, and the ltr plugin only supports dense evaluation, but the DataWriter was writing out sparse matrixs. This caused a degredation in ndcg. * The txt file emitted by DataWriter has to be read by lightgbm and xgboost. As such it starts features at idx 1 to make lightgbm happy (which stores the label at idx 0). This broke XGBoostModel.eval because it was not providing the empty feature at index 0 that training sees. * XGBoostModel.loadModelFrom* always failed because the summary method on the jvm side throws an exception (metrics are not serialized). Wrap in try/except and set summary to None when not available. Change-Id: I48d7bf96a300313b6f62e3f60742345e8bd1a83f --- M jvm/src/main/scala/org/wikimedia/search/mjolnir/DataWriter.scala M jvm/src/test/scala/org/wikimedia/search/mjolnir/DataWriterSuite.scala M mjolnir/training/xgboost.py M mjolnir/utilities/make_folds.py 4 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR refs/changes/68/406068/1 diff --git a/jvm/src/main/scala/org/wikimedia/search/mjolnir/DataWriter.scala b/jvm/src/main/scala/org/wikimedia/search/mjolnir/DataWriter.scala index 8d6976b..01fcf6d 100644 --- a/jvm/src/main/scala/org/wikimedia/search/mjolnir/DataWriter.scala +++ b/jvm/src/main/scala/org/wikimedia/search/mjolnir/DataWriter.scala @@ -28,7 +28,7 @@ ) extends Serializable { // Accepting JavaSparkContext for py4j compatability - def this(sc: JavaSparkContext) = this(sc.broadcast(new SerializableConfiguration(sc.hadoopConfiguration))) + def this(sc: JavaSparkContext, sparse: Boolean) = this(sc.broadcast(new SerializableConfiguration(sc.hadoopConfiguration)), sparse) private def asHDFSPath(path: String): HDFSPath = if (path.charAt(0) == '/') { new HDFSPath(s"file://$path") diff --git a/jvm/src/test/scala/org/wikimedia/search/mjolnir/DataWriterSuite.scala b/jvm/src/test/scala/org/wikimedia/search/mjolnir/DataWriterSuite.scala index ca85260..06004a7 100644 --- a/jvm/src/test/scala/org/wikimedia/search/mjolnir/DataWriterSuite.scala +++ b/jvm/src/test/scala/org/wikimedia/search/mjolnir/DataWriterSuite.scala @@ -44,7 +44,7 @@ try { val df = makeData() val pattern = s"$testDir/%s-fold-%s-partition-%d" -val writer = new DataWriter(spark.sparkContext) +val writer = new DataWriter(spark.sparkContext, true) val folds = writer.write(df, numWorkers, pattern, foldCol) assert(folds.length == expectedFolds) diff --git a/mjolnir/training/xgboost.py b/mjolnir/training/xgboost.py index abeaabf..4d6bb9d 100644 --- a/mjolnir/training/xgboost.py +++ b/mjolnir/training/xgboost.py @@ -4,6 +4,7 @@ import mjolnir.training.hyperopt from mjolnir.training.tuning import make_cv_objective, ModelSelection import numpy as np +import py4j import pyspark import pyspark.sql from pyspark.sql import functions as F @@ -114,6 +115,8 @@ # ints, so this gets all the types right for Java. Also makes # a copy of params so we don't modifying the incoming dict. params = _coerce_params(params) +# Histogram doesn't work with distributed training +params['tree_method'] = 'hist' if len(fold) == 1 else 'approx' # TODO: Maybe num_rounds should just be external? But it's easier # to do hyperparameter optimization with a consistent dict interface kwargs = { @@ -158,7 +161,10 @@ class XGBoostModel(object): def __init__(self, j_xgb_model): self._j_xgb_model = j_xgb_model -self.summary = XGBoostSummary(self._j_xgb_model.summary()) +try: +self.summary = XGBoostSummary(self._j_xgb_model.summary()) +except py4j.protocol.Py4JJavaError: +self.summary = None @staticmethod def trainWithFiles(fold, train_matrix, params, num_rounds=100, diff --git a/mjolnir/utilities/make_folds.py b/mjolnir/utilities/make_folds.py index c7ac04d..5cbd682 100644 --- a/mjolnir/utilities/make_folds.py +++ b/mjolnir/utilities/make_folds.py @@ -64,7 +64,7 @@ write_xgb(local_input, local_output.name) # Write out as text files from scala, much faster than shuffling to python -writer = sc._jvm.org.wikimedia.search.mjolnir.DataWriter(sc._jsc) +writer = sc._jvm.org.wikimedia.search.mjolnir.DataWriter(sc._jsc, False) j_paths = writer.write(df._jdf, num_workers, path_format, fold_col) # Convert everything to python objects -- To view, visit https://gerrit.wikimedia.org/r/406068 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-Messa
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Make preloading generators work with arbitrary entity...
Matěj Suchánek has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/342588 ) Change subject: [IMPR] Make preloading generators work with arbitrary entity types .. [IMPR] Make preloading generators work with arbitrary entity types Bug: T160397 Change-Id: Ie068ca3427063ff13ba4545544a1b3965ab7d88d --- M pywikibot/pagegenerators.py M pywikibot/site.py 2 files changed, 47 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/88/342588/2 diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 13618af..fab81fc 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -14,7 +14,7 @@ ¶ms; """ # -# (C) Pywikibot team, 2008-2017 +# (C) Pywikibot team, 2008-2018 # # Distributed under the terms of the MIT license. # @@ -488,7 +488,7 @@ dupfiltergen, self.subpage_max_depth) if self.claimfilter_list: -dupfiltergen = PreloadingItemGenerator(dupfiltergen) +dupfiltergen = PreloadingEntityGenerator(dupfiltergen) for claim in self.claimfilter_list: dupfiltergen = ItemClaimFilterPageGenerator(dupfiltergen, claim[0], claim[1], @@ -1948,11 +1948,11 @@ @deprecated_args(step='groupsize') -def PreloadingItemGenerator(generator, groupsize=50): +def PreloadingEntityGenerator(generator, groupsize=50): """ Yield preloaded pages taken from another generator. -Function basically is copied from above, but for ItemPage's +Function basically is copied from above, but for Wikibase entites. @param generator: pages to iterate over @param groupsize: how many pages to preload at once @@ -1960,26 +1960,16 @@ """ sites = {} for page in generator: -if not isinstance(page, pywikibot.page.WikibasePage): -datasite = page.site.data_repository() -if page.namespace() != datasite.item_namespace: -pywikibot.output( -u'PreloadingItemGenerator skipping %s as it is not in %s' -% (page, datasite.item_namespace)) -continue - -page = pywikibot.ItemPage(datasite, page.title()) - site = page.site sites.setdefault(site, []).append(page) if len(sites[site]) >= groupsize: # if this site is at the groupsize, process it group = sites.pop(site) -for i in site.preloaditempages(group, groupsize): +for i in site.preload_entities(group, groupsize): yield i for site, pages in sites.items(): # process any leftover sites that never reached the groupsize -for i in site.preloaditempages(pages, groupsize): +for i in site.preload_entities(pages, groupsize): yield i @@ -2880,6 +2870,8 @@ yield page +PreloadingItemGenerator = redirect_func(PreloadingEntityGenerator, +old_name='PreloadingItemGenerator') # Deprecated old names available for compatibility with compat. ImageGenerator = redirect_func(PageClassGenerator, old_name='ImageGenerator') FileGenerator = redirect_func(PageClassGenerator, old_name='FileGenerator') diff --git a/pywikibot/site.py b/pywikibot/site.py index c715902..7451931 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -6,7 +6,7 @@ groups of wikis on the same topic in different languages. """ # -# (C) Pywikibot team, 2008-2017 +# (C) Pywikibot team, 2008-2018 # # Distributed under the terms of the MIT license. # @@ -7056,6 +7056,11 @@ class DataSite(APISite): +type_to_class = { +'item': pywikibot.page.ItemPage, +'property': pywikibot.page.PropertyPage, +} + """Wikibase data capable site.""" def __init__(self, *args, **kwargs): @@ -7255,9 +7260,9 @@ raise api.APIError(data['errors']) return data['entities'] -def preloaditempages(self, pagelist, groupsize=50): +def preload_entities(self, pagelist, groupsize=50): """ -Yield ItemPages with content prefilled. +Yield sublasses of WikibasePages with content prefilled. Note that pages will be iterated in a different order than in the underlying pagelist. @@ -7275,6 +7280,37 @@ for key in ident: req[key].append(ident[key]) else: +if p.site == self and p.namespace() in ( +self.item_namespace, self.property_namespace): +req['ids'].append(p.title(withNamespace=False)) +else: +assert p.site.has_data_repository, \ +'Site must have a data repository' +req['sites'].append(p.site.dbNam
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [Bugfix] Fix invalid exception argument
Matěj Suchánek has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406072 ) Change subject: [Bugfix] Fix invalid exception argument .. [Bugfix] Fix invalid exception argument Change-Id: I0f4cebece8a5b654ab04089c01007ffc2c6819b8 --- M pywikibot/page.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/72/406072/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index 0ca875bc..12d847b 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -3592,7 +3592,7 @@ self._namespace = site.property_namespace else: raise ValueError('%r: Namespace "%d" is not valid' - % self.site) + % (site, ns)) if 'entity_type' in kwargs: entity_type = kwargs.pop('entity_type') -- To view, visit https://gerrit.wikimedia.org/r/406072 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f4cebece8a5b654ab04089c01007ffc2c6819b8 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Matěj Suchánek ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Pull make_cv_objective outside tuner
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406067 ) Change subject: Pull make_cv_objective outside tuner .. Pull make_cv_objective outside tuner This really had no business in tuner, it's function is independant and it didn't require any of the state. Adds a test that verifies the function works roughly as expected. Also drop the 'condition' argument from tuner stages. A standard if condition should be used when building the stage list. Change-Id: Ic3dff6a1a055cba3fc57debd4a1e3417476ddd4a --- M mjolnir/test/training/test_tuning.py M mjolnir/training/tuning.py M mjolnir/training/xgboost.py M mjolnir/utils.py 4 files changed, 72 insertions(+), 63 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR refs/changes/67/406067/1 diff --git a/mjolnir/test/training/test_tuning.py b/mjolnir/test/training/test_tuning.py index 22402f1..15389d7 100644 --- a/mjolnir/test/training/test_tuning.py +++ b/mjolnir/test/training/test_tuning.py @@ -46,7 +46,7 @@ } tuner = mjolnir.training.tuning.ModelSelection(initial_space, tune_stages) -train_func = tuner.make_cv_objective(f, folds, num_cv_jobs, **kwargs) +train_func = mjolnir.training.tuning.make_cv_objective(f, folds, num_cv_jobs, **kwargs) trials_pool = tuner.build_pool(folds, num_cv_jobs) result = tuner(train_func, trials_pool) return result, stats['called'] @@ -80,39 +80,14 @@ assert result['params']['baz'] == 0 -def test_ModelSelection_stage_condition(): -num_iterations = 3 -result, called = run_model_selection([ -('a', { -'condition': lambda: False, -'iterations': num_iterations, -'space': { -'foo': hyperopt.hp.uniform('foo', 1, 9), -} -}), -('b', { -'iterations': num_iterations, -'space': { -'bar': hyperopt.hp.uniform('bar', 1, 9), -} -}), -]) -# iterations * folds -assert called == num_iterations * 2 -assert result['params']['foo'] == 10 -assert 1 <= result['params']['bar'] <= 9 -assert result['params']['baz'] == 0 - - def test_ModelSelection_kwargs_pass_thru(): -tuner = mjolnir.training.tuning.ModelSelection(None, None) expected_kwargs = {'hi': 5, 'there': 'test'} def f(fold, params, **kwargs): assert kwargs == expected_kwargs return {'test': [fold[0]], 'train': [fold[0]]} -obj = tuner.make_cv_objective(f, [[1], [2]], 1, **expected_kwargs) +obj = mjolnir.training.tuning.make_cv_objective(f, [[1], [2]], 1, **expected_kwargs) res = obj(None) assert res == [ @@ -144,3 +119,23 @@ folds = [[1] * num_workers for i in range(num_folds)] pool = tuner.build_pool(folds, num_cv_jobs) assert (pool is not None) == expect_pool + + +def test_ModelSelection_transformer(): +stats = {'called': 0} + +def transformer(result, params): +assert 'foo' in result +assert result['foo'] == 'bar' +assert params == 'some params' +stats['called'] += 1 +return 'baz' + +def f(fold, params): +assert params == 'some params' +return {'foo': 'bar'} + +folds = [[1, 2, 3], [4, 5, 6]] +obj = mjolnir.training.tuning.make_cv_objective(f, folds, 1, transformer) +assert obj('some params') == ['baz', 'baz'] +assert stats['called'] == 2 diff --git a/mjolnir/training/tuning.py b/mjolnir/training/tuning.py index 7d2df68..81bfafe 100644 --- a/mjolnir/training/tuning.py +++ b/mjolnir/training/tuning.py @@ -133,11 +133,48 @@ return with_retry +def make_cv_objective(train_func, folds, num_cv_jobs, transformer=None, **kwargs): +"""Create a cross-validation objective function + +Parameters +-- +train_func : callable +Function accepting a fold and hyperparameters to perform training +num_cv_jobs : int +The total number of folds to train in parallel +transformer : callable or None, optional +Function accepting output of train_func and hyperparameters to +return stats about the individual fold train/test performance + +Returns +--- +callable +Accepts a set of hyperparameters as only argument and returns +list of per-fold train/test performance. +""" +train_func = _py4j_retry(train_func, None) +if num_cv_jobs > 1: +cv_pool = Pool(num_cv_jobs) +cv_mapper = cv_pool.map +else: +cv_mapper = map + +def f(params): +def inner(fold): +return train_func(fold, params, **kwargs) + +return cv_mapper(inner, folds) + +if transformer is None: +return f +else: +return lambda params: [transformer(scores, params) for scores in f(params)] + + class ModelSelection(object): -def __init__(self, initial_space, tune_stages, t
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: widget: Fix accidental change of copyright year
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406066 ) Change subject: widget: Fix accidental change of copyright year .. widget: Fix accidental change of copyright year Fixes up e8b10f68049c19a. Change-Id: I474e508a2bd4d783272eda87c1cc91f5597bc1b1 --- M includes/widget/SelectWithInputWidget.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/66/406066/1 diff --git a/includes/widget/SelectWithInputWidget.php b/includes/widget/SelectWithInputWidget.php index a3482fe..5ceed4c 100644 --- a/includes/widget/SelectWithInputWidget.php +++ b/includes/widget/SelectWithInputWidget.php @@ -8,7 +8,7 @@ /** * Select and input widget. * - * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt + * @copyright 2011-2017 MediaWiki Widgets Team and others; see AUTHORS.txt * @license MIT */ class SelectWithInputWidget extends \OOUI\Widget { -- To view, visit https://gerrit.wikimedia.org/r/406066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I474e508a2bd4d783272eda87c1cc91f5597bc1b1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: add python interface to scala dbn
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406069 ) Change subject: add python interface to scala dbn .. add python interface to scala dbn It turns out only the driver has a py4j connection to the jvm, executors talk to spark directly through sockets. To use jvm implementations in the executors we need to trigger that from jvm. Added an implementation and some basic tests. Change-Id: Iee7f79662e89bcf64cdb447aac0df5b68ee1170c --- M jvm/src/main/scala/org/wikimedia/search/mjolnir/DBN.scala M jvm/src/main/scala/org/wikimedia/search/mjolnir/DataWriter.scala M jvm/src/test/scala/org/wikimedia/search/mjolnir/DBNSuite.scala M mjolnir/dbn.py M mjolnir/test/conftest.py M mjolnir/test/training/test_xgboost.py M mjolnir/utilities/data_pipeline.py M setup.py 8 files changed, 164 insertions(+), 197 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR refs/changes/69/406069/1 diff --git a/jvm/src/main/scala/org/wikimedia/search/mjolnir/DBN.scala b/jvm/src/main/scala/org/wikimedia/search/mjolnir/DBN.scala index faac7dc..d051c7d 100644 --- a/jvm/src/main/scala/org/wikimedia/search/mjolnir/DBN.scala +++ b/jvm/src/main/scala/org/wikimedia/search/mjolnir/DBN.scala @@ -13,7 +13,12 @@ * implementation was ported from python clickmodels by Aleksandr Chuklin and the * notes on math were added in an attempt to understand why the implementation works. */ +import org.apache.spark.rdd.RDD + import scala.collection.mutable +import org.apache.spark.sql.{DataFrame, Row, functions => F} +import org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema +import org.apache.spark.sql.{types => T} import org.json4s.{JArray, JBool, JString} import org.json4s.jackson.JsonMethods @@ -29,7 +34,7 @@ def urlToId(queryId: Int, url: String): Int = { val urlToIdMap = queryIdToUrlToIdMap.getOrElseUpdate(queryId, { mutable.Map() }) urlToIdMap.getOrElseUpdate(url, { - var nextUrlId = queryIdToNextUrlId.getOrElse(queryId, 0) + val nextUrlId = queryIdToNextUrlId.getOrElse(queryId, 0) queryIdToNextUrlId(queryId) = nextUrlId + 1 nextUrlId }) @@ -79,7 +84,7 @@ c } -val hasClicks = allClicks.take(n).exists { x => x} +val hasClicks = allClicks.exists { x => x } if (urls.length < minDocsPerQuery || (discardNoClicks && !hasClicks) ) { @@ -185,20 +190,14 @@ // attractiveness and satisfaction values for each position class PositionRel(var a: Array[Double], var s: Array[Double]) -case class SessionEstimate( - a: (Double, Double), s: (Double, Double), - e: Array[(Double, Double)], C: Double, - clicks: Array[Double]) - - class DbnModel(gamma: Double, config: Config) { val invGamma: Double = 1D - gamma def train(sessions: Seq[SessionItem]): Array[Array[UrlRel]] = { // This is basically a multi-dimensional array with queryId in the first -// dimension and urlId in the second dimension. Because queries only reference -// a subset of the known urls we use a map at the second level instead of -// creating the entire matrix. +// dimension and urlId in the second dimension. InputReader guarantees +// that queryId starts at 0 and is continuous, and that per-query id urlId +// also starts at 0 and is continuous, allowing static sized arrays to be used. val urlRelevances: Array[Array[UrlRel]] = (0 to config.maxQueryId).map { queryId => (0 to config.maxUrlIds(queryId)).map { _ => new UrlRel(config.defaultRel, config.defaultRel) }.toArray }.toArray @@ -267,7 +266,7 @@ val queryUrlRelFrac = urlRelFractions(s.queryId) i = 0 while (i < N) { -var urlId = s.urlIds(i) +val urlId = s.urlIds(i) // update attraction val rel = queryUrlRelFrac(urlId) val estA = sessionEstimate.a(i) @@ -410,7 +409,7 @@ // (alpha, beta) } - var sessionEstimate = new PositionRel(new Array[Double](config.serpSize), new Array[Double](config.serpSize)) + val sessionEstimate = new PositionRel(new Array[Double](config.serpSize), new Array[Double](config.serpSize)) // Returns // a: P(A_i|C_i,G) - Probability of attractiveness at position i conditioned on clicked and gamma // s: P(S_i|C_i,G) - Probability of satisfaction at position i conditioned on clicked and gamma @@ -461,4 +460,95 @@ } } +private class DbnHitPage(val hitPageId: Int, val hitPosition: Double, val clicked: Boolean) +/** + * Predict relevance of query/page pairs from individual user search sessions. + */ +object DBN { + // TODO: These should all be configurable? Perhaps + // also simplified somehow... + private val CLICKED = "clicked" + private val HITS = "hits" + private val HIT_PAGE_ID = "hit_page_id" + private val HIT_POSITION = "hit_position" + private val NORM_QUERY_ID = "norm_query_id" + private val RELEVANCE = "relevance" + privat
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] pwb.py: bad 'user-config.py' was not found
Framawiki has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406065 ) Change subject: [bugfix] pwb.py: bad 'user-config.py' was not found .. [bugfix] pwb.py: bad 'user-config.py' was not found Bug: T185647 Change-Id: I6a749d822f9f3b96398ffc8f268434854510646d --- M pwb.py 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/65/406065/1 diff --git a/pwb.py b/pwb.py index f4ff16d..6d16eb7 100755 --- a/pwb.py +++ b/pwb.py @@ -185,8 +185,9 @@ pwb = pywikibot except RuntimeError as err: # user-config.py to be created -print("NOTE: 'user-config.py' was not found!") -if filename is not None and not filename.startswith('generate_'): +if filename is not None and not (filename.startswith('generate_') +or filename == 'version'): +print("NOTE: 'user-config.py' was not found!") print("Please follow the prompts to create it:") run_python_file('generate_user_files.py', ['generate_user_files.py'], -- To view, visit https://gerrit.wikimedia.org/r/406065 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a749d822f9f3b96398ffc8f268434854510646d Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Framawiki ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...cookiecutter-library[master]: Add ockcyp/covers-validator
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406071 ) Change subject: Add ockcyp/covers-validator .. Add ockcyp/covers-validator This validates @covers tags without needing to run coverage itself. Bug: T185659 Change-Id: I7a32f5137aea4ba450e684a5c976391139d2494a --- M hooks/post_gen_project.py M {{ cookiecutter.library_name }}/composer.json 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/cookiecutter-library refs/changes/71/406071/1 diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 0e0aa13..3e325c4 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -27,6 +27,7 @@ 'jakub-onderka/php-console-highlighter': '0.3.2', 'mediawiki/mediawiki-codesniffer': '15.0.0', 'mediawiki/minus-x': '0.2.1', +'ockcyp/covers-validator': '0.5.1', 'phpunit/phpunit': '4.8.36', } diff --git "a/\173\173 cookiecutter.library_name \175\175/composer.json" "b/\173\173 cookiecutter.library_name \175\175/composer.json" index 8859b3e..81fb220 100644 --- "a/\173\173 cookiecutter.library_name \175\175/composer.json" +++ "b/\173\173 cookiecutter.library_name \175\175/composer.json" @@ -22,6 +22,7 @@ "test": [ "parallel-lint . --exclude vendor", "phpunit", + "covers-validator", "phpcs -sp", "minus-x check ." ], -- To view, visit https://gerrit.wikimedia.org/r/406071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a32f5137aea4ba450e684a5c976391139d2494a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/cookiecutter-library Gerrit-Branch: master Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Add end-to-end integration test
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406070 ) Change subject: Add end-to-end integration test .. Add end-to-end integration test A basic end to end run through of the training pipeline. It's of course a bit slow, but worthwhile to see the whole operation run from end to end. * verifies that the general premise works * outputs from one stage are expected by the input from the next * models are in expected places and loadable * evaluations run against the models match train time metrics Change-Id: I8ad5fe1dbbbd50b897362b44411cfc19650b0390 --- M jvm/src/main/scala/org/wikimedia/search/mjolnir/PythonUtils.scala M mjolnir/test/conftest.py A mjolnir/test/fixtures/requests/test_integration.sqlite3 M mjolnir/test/training/test_xgboost.py M mjolnir/training/xgboost.py M mjolnir/utilities/data_pipeline.py M mjolnir/utilities/make_folds.py M mjolnir/utilities/training_pipeline.py 8 files changed, 63 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR refs/changes/70/406070/1 diff --git a/jvm/src/main/scala/org/wikimedia/search/mjolnir/PythonUtils.scala b/jvm/src/main/scala/org/wikimedia/search/mjolnir/PythonUtils.scala index 8c6929e..9200fe9 100644 --- a/jvm/src/main/scala/org/wikimedia/search/mjolnir/PythonUtils.scala +++ b/jvm/src/main/scala/org/wikimedia/search/mjolnir/PythonUtils.scala @@ -1,7 +1,7 @@ package org.wikimedia.search.mjolnir import org.apache.spark.ml.feature.{LabeledPoint => MLLabeledPoint} -import org.apache.spark.ml.linalg.{Vector => MLVector} +import org.apache.spark.ml.linalg.{DenseVector, SparseVector, Vectors, Vector => MLVector} import org.apache.spark.rdd.RDD import org.apache.spark.sql.functions.col import org.apache.spark.sql.{Dataset, Row} @@ -13,22 +13,38 @@ * pyspark. */ object PythonUtils { + private def shiftVector(vec: MLVector): MLVector = vec match { +case y: DenseVector => Vectors.dense(Array(0D) ++ y.toArray) +case y: SparseVector => Vectors.sparse(y.size + 1, y.indices.map(_ + 1), y.values) + } + /** * There is no access to LabeledPoint from pyspark, but various methods such as * trainWithRDD and eval require an RDD[MLLabeledPoint]. This offers a bridge to * convert a Dataset into the required format. * + * @deprecated * @param ds Input dataframe containing features and label * @param featureCol Name of the column containing feature vectors * @param labelCol Name of the column containing numeric labels + * @param shiftRight Shift all features to index + 1. This is a disapointing hack, + * but due to the way data files are created feature indices start + * at 1 and the 0 feature is empty. This allows to shift to match + * when evaluating a dataframe againts a model trained that way. */ - def toLabeledPoints(ds: Dataset[_], featureCol: String, labelCol: String): RDD[MLLabeledPoint] = { + def toLabeledPoints(ds: Dataset[_], featureCol: String, labelCol: String, shiftRight: Boolean): RDD[MLLabeledPoint] = { ds.select(col(featureCol), col(labelCol).cast(DoubleType)).rdd.map { case Row(feature: MLVector, label: Double) => +val shiftedFeature = if (shiftRight) shiftVector(feature) else feature MLLabeledPoint(label, feature) } } + def toLabeledPoints(ds: Dataset[_], featureCol: String, labelCol: String): RDD[MLLabeledPoint] = { +toLabeledPoints(ds, featureCol, labelCol, shiftRight = false) + } + + /** * Training/evaluating a ranking model in XGBoost requires rows for the same * query to be provided sequentially, and it needs to know for each partition diff --git a/mjolnir/test/conftest.py b/mjolnir/test/conftest.py index efc8441..c4c3d77 100644 --- a/mjolnir/test/conftest.py +++ b/mjolnir/test/conftest.py @@ -72,7 +72,8 @@ .set('spark.jars.packages', ','.join([ 'ml.dmlc:xgboost4j-spark:0.8-wmf-1', 'org.wikimedia.search:mjolnir:0.4-SNAPSHOT', -'org.apache.spark:spark-streaming-kafka-0-8_2.11:2.1.0'])) +'org.apache.spark:spark-streaming-kafka-0-8_2.11:2.1.0', +'org.wikimedia.analytics.refinery.hive:refinery-hive:0.0.57'])) # By default spark will shuffle to 200 partitions, which is # way too many for our small test cases. This cuts execution # time of the tests in half. diff --git a/mjolnir/test/fixtures/requests/test_integration.sqlite3 b/mjolnir/test/fixtures/requests/test_integration.sqlite3 new file mode 100644 index 000..44957bf --- /dev/null +++ b/mjolnir/test/fixtures/requests/test_integration.sqlite3 Binary files differ diff --git a/mjolnir/test/training/test_xgboost.py b/mjolnir/test/training/test_xgboost.py index 100a3e8..ba8dc48 100644 --- a/mjolnir/test/training/test_xgboost.py +++ b/mjolnir/test/training/test_xgboost.py @@ -1,7
[MediaWiki-commits] [Gerrit] integration/config[master]: Move Internet Explorer tests in WebPageTest to own test files
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/404925 ) Change subject: Move Internet Explorer tests in WebPageTest to own test files .. Move Internet Explorer tests in WebPageTest to own test files By moving the tests, it will make it easier to deploy the Linux agent side by side with the current agent by only changing Jenkins configuration. Needs https://gerrit.wikimedia.org/r/#/c/404918/ Bug: T175240 Depends-On: I786ea6153a26364c9880b314826695094a022d71 Change-Id: I534c6f9fc3ce9c43131a5db928567848e0b8bd07 --- M jjb/misc.yaml 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved Hashar: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/jjb/misc.yaml b/jjb/misc.yaml index ed5bfa1..6fe8082 100644 --- a/jjb/misc.yaml +++ b/jjb/misc.yaml @@ -330,6 +330,8 @@ RESULT+=$? ./bin/index.js --batch ./scripts/batch/desktop.txt RESULT+=$? +./bin/index.js --batch ./scripts/batch/desktop-ie.txt +RESULT+=$? ./bin/index.js --batch ./scripts/batch/login-mobile.txt RESULT+=$? ./bin/index.js --batch ./scripts/batch/login-desktop.txt @@ -338,6 +340,8 @@ RESULT+=$? ./bin/index.js --batch ./scripts/batch/second-view-desktop.txt RESULT+=$? +./bin/index.js --batch ./scripts/batch/second-view-desktop-ie.txt +RESULT+=$? exit $RESULT publishers: - webpagetest-irc -- To view, visit https://gerrit.wikimedia.org/r/404925 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I534c6f9fc3ce9c43131a5db928567848e0b8bd07 Gerrit-PatchSet: 4 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Phedenskog Gerrit-Reviewer: Gilles Gerrit-Reviewer: Hashar Gerrit-Reviewer: Imarlier Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Paladox Gerrit-Reviewer: Phedenskog Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] performance/WebPageTest[master]: Move Internet Explorer tests to own test files.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/404918 ) Change subject: Move Internet Explorer tests to own test files. .. Move Internet Explorer tests to own test files. By moving all IE tests to separate files, we can setup the new runs by only adding a extra job in Jenkins for the Linux agent. Bug: T175240 Change-Id: I786ea6153a26364c9880b314826695094a022d71 --- A scripts/batch/desktop-ie.txt M scripts/batch/desktop.txt A scripts/batch/second-view-desktop-ie.txt M scripts/batch/second-view-desktop.txt M test/rulethemall.sh 5 files changed, 46 insertions(+), 13 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/batch/desktop-ie.txt b/scripts/batch/desktop-ie.txt new file mode 100644 index 000..2449fed --- /dev/null +++ b/scripts/batch/desktop-ie.txt @@ -0,0 +1,29 @@ +## This batch file contains runs testing Wikipedia desktop using WebPageTest +## for Internet Explorer 11. The IE tests is in it own file to make it +## easy to move to Linux test agents. + +# To run this you need to set the following environment variables: +# WMF_WPT_KEY - The secret API key for our WebPageTest instance +# STATSV_ENDPOINT - The endpoint of where we send the statsv data +# WPT_RUNS - The number of runs per test +# WMF_WPT_LOCATION - The AWS location to run the test example: us-west-1 + +# Example (make sure to change WMF_WPT_KEY) +# $ WMF_WPT_KEY=SECRET_KEY STATSV_ENDPOINT=http://localhost WPT_RUNS=1 WMF_WPT_LOCATION=us-west-1 bin/index.js --batch scripts/batch/desktop.txt + +--webPageTestKey <%WMF_WPT_KEY> --webPageTestHost wpt.wmftest.org --median SpeedIndex --location <%WMF_WPT_LOCATION>_IE11 --label ie11 --runs <%WPT_RUNS> --endpoint <%STATSV_ENDPOINT> --namespace webpagetest.enwiki.anonymous.Facebook --reporter statsv --first true https://en.wikipedia.org/wiki/Facebook + +--webPageTestKey <%WMF_WPT_KEY> --webPageTestHost wpt.wmftest.org --median SpeedIndex --location <%WMF_WPT_LOCATION>_IE11 --label ie11 --runs <%WPT_RUNS> --endpoint <%STATSV_ENDPOINT> --namespace webpagetest.enwiki.anonymous.Barack_Obama --reporter statsv --first true https://en.wikipedia.org/wiki/Barack_Obama + +# Test the portal page +--webPageTestKey <%WMF_WPT_KEY> --webPageTestHost wpt.wmftest.org --median SpeedIndex --location <%WMF_WPT_LOCATION>_IE11 --label ie11-portals --runs <%WPT_RUNS> --endpoint <%STATSV_ENDPOINT> --namespace webpagetest.portals.anonymous.wikipedia_org --reporter statsv --first true https://www.wikipedia.org/ + +--webPageTestKey <%WMF_WPT_KEY> --webPageTestHost wpt.wmftest.org --median SpeedIndex --location <%WMF_WPT_LOCATION>_IE11 --label ie11-portals-beta --runs <%WPT_RUNS> --endpoint <%STATSV_ENDPOINT> --namespace webpagetest.portals-beta.anonymous.wikipedia_org --reporter statsv --first true https://www.wikipedia.beta.wmflabs.org/ + +### WIKIDATA + +--webPageTestKey <%WMF_WPT_KEY> --webPageTestHost wpt.wmftest.org --median SpeedIndex --location <%WMF_WPT_LOCATION>_IE11 --label ie11 --runs <%WPT_RUNS> --endpoint <%STATSV_ENDPOINT> --namespace webpagetest.wikidatawiki.anonymous.Main_Page --reporter statsv --first true https://www.wikidata.org/wiki/Wikidata:Main_Page + +--webPageTestKey <%WMF_WPT_KEY> --webPageTestHost wpt.wmftest.org --median SpeedIndex --location <%WMF_WPT_LOCATION>_IE11 --label ie11 --runs <%WPT_RUNS> --endpoint <%STATSV_ENDPOINT> --reporter statsv --namespace webpagetest.wikidatawiki.anonymous.Berlin --first true https://www.wikidata.org/wiki/Q64 + +--webPageTestKey <%WMF_WPT_KEY> --webPageTestHost wpt.wmftest.org --median SpeedIndex --location <%WMF_WPT_LOCATION>_IE11 --label ie11-beta --runs <%WPT_RUNS> --endpoint <%STATSV_ENDPOINT> --reporter statsv --namespace webpagetest.wikidatawiki-beta.anonymous.Italy --first true https://wikidata.beta.wmflabs.org/wiki/Q15905 diff --git a/scripts/batch/desktop.txt b/scripts/batch/desktop.txt index 51fa048..2151e69 100644 --- a/scripts/batch/desktop.txt +++ b/scripts/batch/desktop.txt @@ -1,4 +1,5 @@ ## This batch file contains runs testing Wikipedia desktop using WebPageTest +## for Chrome and Firefox. # To run this you need to set the following environment variables: # WMF_WPT_KEY - The secret API key for our WebPageTest instance @@ -12,14 +13,10 @@ # Test Facebook page --webPageTestKey <%WMF_WPT_KEY> --webPageTestHost wpt.wmftest.org --median SpeedIndex --location <%WMF_WPT_LOCATION>:Chrome --label chrome --runs <%WPT_RUNS> --endpoint <%STATSV_ENDPOINT> --namespace webpagetest.enwiki.anonymous.Facebook --reporter statsv --timeline true --bodies true https://en.wikipedia.org/wiki/Facebook ---webPageTestKey <%WMF_WPT_KEY> --webPageTestHost wpt.wmftest.org --median SpeedIndex --location <%WMF_WPT_LOCATION>_IE11 --label ie11 --runs <%WPT_RUNS> --endpoint <%STATSV_ENDPOINT> --namespace webpagetest.enwiki.anonymous.Facebook --reporter statsv
[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Add Persian Wikipedia to clickstream dataset
Ladsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406064 ) Change subject: Add Persian Wikipedia to clickstream dataset .. Add Persian Wikipedia to clickstream dataset I really need it and this wiki is rather small also I can help in testing. Change-Id: I3c078f9eee398bf385532803a2321b5dd18aec53 --- M oozie/clickstream/coordinator.properties 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery refs/changes/64/406064/1 diff --git a/oozie/clickstream/coordinator.properties b/oozie/clickstream/coordinator.properties index 4c2aefd..10ef39b 100644 --- a/oozie/clickstream/coordinator.properties +++ b/oozie/clickstream/coordinator.properties @@ -64,7 +64,7 @@ spark_executor_memory_overhead= 4096 spark_driver_memory = 8G spark_max_executors = 32 -clickstream_wikis = enwiki,ruwiki,dewiki,eswiki,jawiki,frwiki,zhwiki,itwiki,plwiki,ptwiki +clickstream_wikis = enwiki,ruwiki,dewiki,eswiki,jawiki,frwiki,zhwiki,itwiki,plwiki,ptwiki,fawiki clickstream_minimum_links = 10 temporary_directory = ${name_node}/tmp clickstream_archive_base_path = ${name_node}/wmf/data/archive/clickstream @@ -85,4 +85,4 @@ # Coordinator to start. oozie.coord.application.path = ${coordinator_file} oozie.use.system.libpath = true -oozie.action.external.stats.write = true \ No newline at end of file +oozie.action.external.stats.write = true -- To view, visit https://gerrit.wikimedia.org/r/406064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c078f9eee398bf385532803a2321b5dd18aec53 Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery Gerrit-Branch: master Gerrit-Owner: Ladsgroup ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/docroot[master]: cover: Convert coverage sub-nav from breadcrumbs to nav-tabs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405995 ) Change subject: cover: Convert coverage sub-nav from breadcrumbs to nav-tabs .. cover: Convert coverage sub-nav from breadcrumbs to nav-tabs Breadcrumbs are mainly intended as a way to go from a subpage back to an ancestor. Not as a way of going to a subpage. Given the similarity, it looks somewhat confusing to see the breadcrumbs visually end with 'MediaWiki extensions' when the user isn't actually on that page. Nav-tabs seems like a more appropiate fit within the building blocks that Bootstrap provides. Change-Id: Ic7b0cf9d76ed79f12074adf07d054e1fd2456746 --- M shared/CoveragePage.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Krinkle: Looks good to me, approved Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/shared/CoveragePage.php b/shared/CoveragePage.php index 5314f43..81583ec 100644 --- a/shared/CoveragePage.php +++ b/shared/CoveragePage.php @@ -52,18 +52,18 @@ if ( $this->pageName === 'Test coverage' ) { $href = $this->fixNavUrl( '/cover-extensions/' ); $breadcrumbs = << - Coverage home + + Coverage home MediaWiki extensions - + HTML; } else { $href = $this->fixNavUrl( '/cover/' ); $breadcrumbs = << + Coverage home - MediaWiki extensions - + MediaWiki extensions + HTML; } $this->addHtmlContent( $breadcrumbs ); -- To view, visit https://gerrit.wikimedia.org/r/405995 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic7b0cf9d76ed79f12074adf07d054e1fd2456746 Gerrit-PatchSet: 3 Gerrit-Project: integration/docroot Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Hashar Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: rdbms: Simplify Database::factory()
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406063 ) Change subject: rdbms: Simplify Database::factory() .. rdbms: Simplify Database::factory() Follows-up 0ff2b7a776 (T120333) which removed support for the deprecated php 'mysql' extension. It surprised that the 'DatabaseMysql' entry could safely be removed from $classAliases. This was because the key is not direct input, but based on $canonicalDBTypes, which maps mysql to mysqli. Take this further by removing the indirection between type, driver and class name. * Map built-in db types directly to their class and driver. * Change fallback to assign $class directly from $dbType, without indirection of a $driver variable. * Remove unused $classAliases. Change-Id: I1200b07f66f23624410d848b6f382cb2dafa5c59 --- M includes/libs/rdbms/database/Database.php 1 file changed, 31 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/63/406063/1 diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 323c147..1515855 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -336,51 +336,49 @@ * @since 1.18 */ final public static function factory( $dbType, $p = [] ) { - static $canonicalDBTypes = [ - 'mysql' => [ 'mysqli' ], - 'postgres' => [], - 'sqlite' => [], - 'oracle' => [], - 'mssql' => [], - ]; - static $classAliases = [ - 'DatabaseMssql' => DatabaseMssql::class, - 'DatabaseMysqli' => DatabaseMysqli::class, - 'DatabaseSqlite' => DatabaseSqlite::class, - 'DatabasePostgres' => DatabasePostgres::class + // For database types with built-in support, the below maps type to IDatabase + // implementations. For types with multipe driver implementations (PHP extensions), + // an array can be used, keyed by extension name. In case of an array, the + // optional 'driver' parameter can be used to force a specific driver. Otherwise, + // we auto-detect the first available driver. For types without built-in support, + // an class named "Database" us used, eg. DatabaseFoo for type 'foo'. + static $builtinTypes = [ + 'mssql' => DatabaseMssql::class, + 'mysql' => [ 'mysqli' => DatabaseMysqli::class ], + 'sqlite' => DatabaseSqlite::class, + 'postgres' => DatabasePostgres::class, ]; - $driver = false; $dbType = strtolower( $dbType ); - if ( isset( $canonicalDBTypes[$dbType] ) && $canonicalDBTypes[$dbType] ) { - $possibleDrivers = $canonicalDBTypes[$dbType]; - if ( !empty( $p['driver'] ) ) { - if ( in_array( $p['driver'], $possibleDrivers ) ) { - $driver = $p['driver']; - } else { - throw new InvalidArgumentException( __METHOD__ . - " type '$dbType' does not support driver '{$p['driver']}'" ); - } + $class = false; + if ( isset( $builtinTypes[$dbType] ) ) { + $possibleDrivers = $builtinTypes[$dbType]; + if ( is_string( $possibleDrivers ) ) { + $class = $possibleDrivers; } else { - foreach ( $possibleDrivers as $posDriver ) { - if ( extension_loaded( $posDriver ) ) { - $driver = $posDriver; - break; + if ( !empty( $p['driver'] ) { + if ( !isset( $possibleDrivers[$p['driver']] ) ) { + throw new InvalidArgumentException( __METHOD__ . + " type '$dbType' does not support driver '{$p['driver']}'" ); + } else { + $class = $possibleDrivers[$p['driver']]; + } + } else { + foreach ( $possibleDrivers as posDriver => $possibleClass ) { + if ( extension_loaded( posDriver ) ) { +
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: mariadb: Depool es2011 for reimage
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406060 ) Change subject: mariadb: Depool es2011 for reimage .. mariadb: Depool es2011 for reimage We are going to test es2011 as the first ES storage with stretch/ MariaDB 10.1. As they are very large servers, we will reimage them without removing its data. Change-Id: I8849063daa383cd1f90762f8b35acccb44d80f1f --- M wmf-config/db-codfw.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php index 2887712..037ad9c 100644 --- a/wmf-config/db-codfw.php +++ b/wmf-config/db-codfw.php @@ -14,7 +14,7 @@ ]; $wmgOldExtTemplate = [ - '10.192.16.171' => 1, # es2011, B1 11TB 128GB + # '10.192.16.171' => 1, # es2011, B1 11TB 128GB, being reimaged '10.192.32.129' => 1, # es2012, C1 11TB 128GB '10.192.48.40' => 1, # es2013, D1 11TB 128GB ]; -- To view, visit https://gerrit.wikimedia.org/r/406060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8849063daa383cd1f90762f8b35acccb44d80f1f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb: Reimage es2011 into stretch/MariaDB 10.1
Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406062 ) Change subject: mariadb: Reimage es2011 into stretch/MariaDB 10.1 .. mariadb: Reimage es2011 into stretch/MariaDB 10.1 We will test stretch on es2011, if everything workse, we will extend it to all External Storage servers by default- even if there are no plass to do mass-reimages/upgrades for now. Change-Id: I2d3109e253846b0a9c3c15e4a29471bc633cbac1 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/62/406062/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index fa58c44..eb28863 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2897,8 +2897,6 @@ host es2011 { hardware ethernet 14:18:77:54:48:37; fixed-address es2011.codfw.wmnet; -option pxelinux.pathprefix "http://apt.wikimedia.org/tftpboot/jessie-installer/";; -filename "lpxelinux.0"; } host es2012 { -- To view, visit https://gerrit.wikimedia.org/r/406062 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d3109e253846b0a9c3c15e4a29471bc633cbac1 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] operations/puppet[production]: rename piwik::server to just piwik
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406061 ) Change subject: rename piwik::server to just piwik .. rename piwik::server to just piwik There were historic reasons why it was organized in foo::bar fashion but there isn't a reason for this anymore. Just like gerrit_server, phabricator_server etc, drop the useless "server" part from role and profile class names etc. Change-Id: I701b7ace781a0fd2ae553faad21c97a12d8c20b1 --- R hieradata/role/common/piwik.yaml M manifests/site.pp M modules/profile/templates/cumin/aliases.yaml.erb R modules/role/manifests/piwik.pp 4 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/61/406061/1 diff --git a/hieradata/role/common/piwik/server.yaml b/hieradata/role/common/piwik.yaml similarity index 100% rename from hieradata/role/common/piwik/server.yaml rename to hieradata/role/common/piwik.yaml diff --git a/manifests/site.pp b/manifests/site.pp index 2ca7f64..aa1bd8a 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -107,7 +107,7 @@ } node 'bohrium.eqiad.wmnet' { -role(piwik::server) +role(piwik) } # VM with webserver for misc. static sites diff --git a/modules/profile/templates/cumin/aliases.yaml.erb b/modules/profile/templates/cumin/aliases.yaml.erb index b6a9820..3e9e14a 100644 --- a/modules/profile/templates/cumin/aliases.yaml.erb +++ b/modules/profile/templates/cumin/aliases.yaml.erb @@ -192,7 +192,7 @@ yubiauth: P{O:yubiauth_server} # Miscellaneous groups -misc-analytics: P{O:statistics::web or O:piwik::server or O:analytics_cluster::coordinator} or A:eventlogging +misc-analytics: P{O:statistics::web or O:piwik or O:analytics_cluster::coordinator} or A:eventlogging misc-apache: P{O:microsites::peopleweb or C:grafana::production or O:requesttracker or O:releases or O:otrs} or A:planet misc-devel: P{O:webperf or O:ve or O:archiva} or A:debugproxy or A:mwlog misc-nonprod: P{O:spare::system or O:test or O:pybaltest or O:restbase::test_cluster or O:authdns::testns or O:cache::canary} diff --git a/modules/role/manifests/piwik/server.pp b/modules/role/manifests/piwik.pp similarity index 77% rename from modules/role/manifests/piwik/server.pp rename to modules/role/manifests/piwik.pp index 2c79971..98eca30 100644 --- a/modules/role/manifests/piwik/server.pp +++ b/modules/role/manifests/piwik.pp @@ -1,6 +1,6 @@ -# == Class: role::piwik::server +# == Class: role::piwik # -class role::piwik::server { +class role::piwik { include ::standard include ::profile::base::firewall include ::profile::piwik::webserver @@ -9,7 +9,7 @@ include ::profile::piwik::backup include ::profile::piwik::database -system::role { 'piwik::server': +system::role { 'piwik': description => 'Analytics piwik server', } } -- To view, visit https://gerrit.wikimedia.org/r/406061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I701b7ace781a0fd2ae553faad21c97a12d8c20b1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: mariadb: Depool es2011 for reimage
Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406060 ) Change subject: mariadb: Depool es2011 for reimage .. mariadb: Depool es2011 for reimage We are going to test es2011 as the first ES storage with stretch/ MariaDB 10.1. As they are very large servers, we will reimage them without removing its data. Change-Id: I8849063daa383cd1f90762f8b35acccb44d80f1f --- M wmf-config/db-codfw.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/60/406060/1 diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php index 2887712..037ad9c 100644 --- a/wmf-config/db-codfw.php +++ b/wmf-config/db-codfw.php @@ -14,7 +14,7 @@ ]; $wmgOldExtTemplate = [ - '10.192.16.171' => 1, # es2011, B1 11TB 128GB + # '10.192.16.171' => 1, # es2011, B1 11TB 128GB, being reimaged '10.192.32.129' => 1, # es2012, C1 11TB 128GB '10.192.48.40' => 1, # es2013, D1 11TB 128GB ]; -- To view, visit https://gerrit.wikimedia.org/r/406060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8849063daa383cd1f90762f8b35acccb44d80f1f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Simplify documentation headers of includes/widgets/…Widget.p...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/400584 ) Change subject: Simplify documentation headers of includes/widgets/…Widget.php files .. Simplify documentation headers of includes/widgets/…Widget.php files Most notably: The documentation header repeats the file name. This appears to be fully automatically generated, but does not add helpful information. Change-Id: I9edf15dd25ef6cc52fe931fffde69f0bd9042474 --- M includes/widget/ComplexNamespaceInputWidget.php M includes/widget/ComplexTitleInputWidget.php M includes/widget/DateInputWidget.php M includes/widget/DateTimeInputWidget.php M includes/widget/NamespaceInputWidget.php M includes/widget/SearchInputWidget.php M includes/widget/SelectWithInputWidget.php M includes/widget/TitleInputWidget.php M includes/widget/UserInputWidget.php M includes/widget/UsersMultiselectWidget.php 10 files changed, 41 insertions(+), 63 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/widget/ComplexNamespaceInputWidget.php b/includes/widget/ComplexNamespaceInputWidget.php index 69844d9..5f5d1cd 100644 --- a/includes/widget/ComplexNamespaceInputWidget.php +++ b/includes/widget/ComplexNamespaceInputWidget.php @@ -1,15 +1,13 @@ https://gerrit.wikimedia.org/r/400584 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9edf15dd25ef6cc52fe931fffde69f0bd9042474 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Kreuz (WMDE) Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Thiemo Kreuz (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CLDRPluralRuleParser[master]: tests: Update phpunit and enable coverage for all classes
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406055 ) Change subject: tests: Update phpunit and enable coverage for all classes .. tests: Update phpunit and enable coverage for all classes The structure of the Evaluator is that there is a single class that serves as the main entry point, and everything else is called internally, so at this point we might as well allow coverage of all classes from our current tests, which are essentially integration tests. This is normally achieved by disabling 'forceCoversAnnotation', but that is disabled by default and wasn't enabled. The reason the test coverage report was behaving this way was due to the presence of one @covers annotation, which I removed. Also: * Minor phpunit update. * Remove redundant variable assignment in test. * Add 'composer cover' command. * Add /coverage to gitignore. * Add visibility to tests. Change-Id: I9f671dbf5b575799570db307df3fa310fad7976f --- M .gitignore M composer.json M tests/EvaluatorTest.php 3 files changed, 12 insertions(+), 17 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index de4a392..a37efea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +/coverage /vendor /composer.lock diff --git a/composer.json b/composer.json index f71a4b0..db5ce9f 100644 --- a/composer.json +++ b/composer.json @@ -24,11 +24,11 @@ } }, "require": { - "php": ">=5.3.3" + "php": ">=5.5.9" }, "require-dev": { "jakub-onderka/php-parallel-lint": "^0.9.0.0", - "phpunit/phpunit": "^4.7.7.0", + "phpunit/phpunit": "^4.8", "mediawiki/mediawiki-codesniffer": "15.0.0" }, "scripts": { @@ -37,6 +37,7 @@ "phpunit $PHPUNIT_ARGS", "phpcs -p" ], + "cover": "phpunit --coverage-html coverage/", "fix": [ "phpcbf" ] diff --git a/tests/EvaluatorTest.php b/tests/EvaluatorTest.php index cc44f37..3243d4d 100644 --- a/tests/EvaluatorTest.php +++ b/tests/EvaluatorTest.php @@ -8,28 +8,25 @@ use CLDRPluralRuleParser\Evaluator; -/** - * @covers \CLDRPluralRuleParser\Evaluator - */ class EvaluatorTest extends \PHPUnit_Framework_TestCase { /** -* @dataProvider validTestCases +* @dataProvider provideValidCases */ - function testValidRules( $expected, $rules, $number, $comment ) { + public function testValidRules( $expected, $rules, $number, $comment ) { $result = Evaluator::evaluate( $number, (array)$rules ); $this->assertEquals( $expected, $result, $comment ); } /** -* @dataProvider invalidTestCases +* @dataProvider provideInvalidCases * @expectedException CLDRPluralRuleParser\Error */ - function testInvalidRules( $rules, $comment ) { + public function testInvalidRules( $rules, $comment ) { Evaluator::evaluate( 1, (array)$rules ); } - function validTestCases() { - $tests = [ + public static function provideValidCases() { + return [ # expected, rule, number, comment [ 0, 'n is 1', 1, 'integer number and is' ], [ 0, 'n is 1', "1", 'string integer number and is' ], @@ -139,17 +136,13 @@ array( 1, 'v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14', '10.0', 'bs other' ), // @codingStandardsIgnoreEnd ]; - - return $tests; } - function invalidTestCases() { - $tests = [ + public static function provideInvalidCases() { + return [ [ 'n mod mod 5 is 1', 'mod mod' ], [ 'n', 'just n' ], [ 'n is in 5', 'is in' ], ]; - - return $tests; } } -- To view, visit https://gerrit.wikimedia.org/r/406055 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f671dbf5b575799570db307df3fa310fad7976f Gerrit-PatchSet: 1 Gerrit-Project: CLDRPluralRuleParser Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Add tests for two uncovered CheckResult methods
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406059 ) Change subject: Add tests for two uncovered CheckResult methods .. Add tests for two uncovered CheckResult methods Change-Id: I6a38d5068b0149d6e98eaf370855cc13b905 --- M tests/phpunit/Result/CheckResultTest.php 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints refs/changes/59/406059/1 diff --git a/tests/phpunit/Result/CheckResultTest.php b/tests/phpunit/Result/CheckResultTest.php index 0c4d8fa..9566952 100644 --- a/tests/phpunit/Result/CheckResultTest.php +++ b/tests/phpunit/Result/CheckResultTest.php @@ -65,4 +65,26 @@ $checkResult->getDataValue(); } + public function testAddParameter() { + $context = new FakeSnakContext( new PropertyNoValueSnak( new PropertyId( 'P1' ) ) ); + $constraint = new Constraint( '', new PropertyId( 'P1' ), 'Q1', [] ); + $checkResult = new CheckResult( $context, $constraint ); + + $this->assertSame( [], $checkResult->getParameters() ); + + $checkResult->addParameter( 'constraint_status', 'mandatory' ); + $this->assertSame( [ 'constraint_status' => [ 'mandatory' ] ], $checkResult->getParameters() ); + } + + public function testSetStatus() { + $context = new FakeSnakContext( new PropertyNoValueSnak( new PropertyId( 'P1' ) ) ); + $constraint = new Constraint( '', new PropertyId( 'P1' ), 'Q1', [] ); + $checkResult = new CheckResult( $context, $constraint, [], CheckResult::STATUS_VIOLATION ); + + $this->assertSame( CheckResult::STATUS_VIOLATION, $checkResult->getStatus() ); + + $checkResult->setStatus( CheckResult::STATUS_WARNING ); + $this->assertSame( CheckResult::STATUS_WARNING, $checkResult->getStatus() ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/406059 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a38d5068b0149d6e98eaf370855cc13b905 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints Gerrit-Branch: master Gerrit-Owner: Lucas Werkmeister (WMDE) ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...GoogleDocTag[master]: Convert GoogleDocTag to use extension registration
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406016 ) Change subject: Convert GoogleDocTag to use extension registration .. Convert GoogleDocTag to use extension registration Bug: T185621 Change-Id: I00b6b8867fae24c736bfb302daf65841828dc13f --- M GoogleDocTag.php A extension.json 2 files changed, 36 insertions(+), 14 deletions(-) Approvals: Mainframe98: Looks good to me, but someone else must approve Sophivorus: Looks good to me, approved jenkins-bot: Verified diff --git a/GoogleDocTag.php b/GoogleDocTag.php index 3e5635f..68a88bf 100644 --- a/GoogleDocTag.php +++ b/GoogleDocTag.php @@ -1,16 +1,15 @@ __FILE__, - 'name' => 'GoogleDocTag', - 'descriptionmsg' => 'googledoctag-desc', - 'author' => array( 'Reddo', 'Luis Felipe Schenone' ), - 'version'=> '0.4.0', - 'url'=> 'http://www.mediawiki.org/wiki/Extension:GoogleDocTag', -); - -$wgMessagesDirs['GoogleDocTag'] = __DIR__ . '/i18n'; - -$wgAutoloadClasses['GoogleDocTag'] = __DIR__ . '/GoogleDocTag.body.php'; - -$wgHooks['ParserFirstCallInit'][] = 'GoogleDocTag::setParserHook'; +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'GoogleDocTag' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['GoogleDocTag'] = __DIR__ . '/i18n'; + wfWarn( + 'Deprecated PHP entry point used for the GoogleDocTag extension. ' . + 'Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); + return; +} else { + die( 'This version of the GoogleDocTag extension requires MediaWiki 1.29+' ); +} diff --git a/extension.json b/extension.json new file mode 100644 index 000..90fb327 --- /dev/null +++ b/extension.json @@ -0,0 +1,23 @@ +{ + "name": "GoogleDocTag", + "version": "0.5.0", + "author": [ + "Reddo", + "Luis Felipe Schenone" + ], + "url": "http://www.mediawiki.org/wiki/Extension:GoogleDocTag";, + "descriptionmsg": "googledoctag-desc", + "type": "parserhook", + "MessagesDirs": { + "GoogleDocTag": [ + "i18n" + ] + }, + "AutoloadClasses": { + "GoogleDocTag": "GoogleDocTag.body.php" + }, + "Hooks": { + "ParserFirstCallInit": "GoogleDocTag::setParserHook" + }, + "manifest_version": 2 +} -- To view, visit https://gerrit.wikimedia.org/r/406016 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00b6b8867fae24c736bfb302daf65841828dc13f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/GoogleDocTag Gerrit-Branch: master Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com> Gerrit-Reviewer: Felipeschenone Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Jayprakash12345 <0freerunn...@gmail.com> Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Mainframe98 Gerrit-Reviewer: MarcoAurelio Gerrit-Reviewer: Sophivorus Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Only rerender summary after mobile-sections were rerendered.
Ppchelko has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406058 ) Change subject: Only rerender summary after mobile-sections were rerendered. .. Only rerender summary after mobile-sections were rerendered. Bug: T184753 Change-Id: I610611f2a64997e72d9049b8c10da44c19ade2ce --- M scap/templates/config.yaml.j2 1 file changed, 21 insertions(+), 54 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy refs/changes/58/406058/1 diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2 index db503d3..96ba6e4 100644 --- a/scap/templates/config.yaml.j2 +++ b/scap/templates/config.yaml.j2 @@ -72,9 +72,10 @@ cases: - match: meta: -uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^\/]+)$/' +uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/mobile-sections\/([^\/]+)$/' tags: - restbase +- mobile-sections match_not: - meta: domain: '/wiktionary\.org$/' @@ -92,10 +93,11 @@ meta: # These URIs are coming from RESTBase, so we know that article titles will be normalized # and main namespace articles will not have : (uri-encoded, so %3a or %3A) -uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/((?:(?!%3a|%3A|\/).)+)$/' +uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/mobile-sections\/((?:(?!%3a|%3A|\/).)+)$/' domain: '/^en\.wiktionary\.org$/' tags: - restbase +- mobile-sections exec: method: get # Don't encode title since it should be already encoded @@ -112,7 +114,6 @@ match: meta: uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^/]+)$/' -domain: '/\.wikipedia\.org$/' tags: - restbase exec: @@ -164,14 +165,8 @@ if-unmodified-since: '{{date(message.meta.dt)}}' query: redirect: false -# The HTML might not change but sometimes editors use a purge to drop incorrectly rendered summary/MCS +# The HTML might not change but sometimes editors use a purge to drop incorrectly rendered MCS # content, so let's purge them as well just in case. The rate is low. - - method: get -uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/summary/{decode(match.meta.uri.title)}' -headers: - cache-control: no-cache -query: - redirect: false - method: get uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/mobile-sections/{decode(match.meta.uri.title)}' headers: @@ -205,14 +200,8 @@ if-unmodified-since: '{{date(message.meta.dt)}}' query: redirect: false -# The HTML might not change but sometimes editors use a purge to drop incorrectly rendered summary/MCS +# The HTML might not change but sometimes editors use a purge to drop incorrectly rendered MCS # content, so let's purge them as well just in case. The rate is low. - - method: get -uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/summary/{decode(match.meta.uri.title)}' -headers: - cache-control: no-cache -query: - redirect: false - method: get uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/mobile-sections/{decode(match.meta.uri.title)}' headers: @@ -661,38 +650,20 @@ on_wikidata_description_change: topic: change-prop.wikidata.resource-change cases: - - match: - meta: -uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/' -domain: '/\.wikipedia\.org$/' - tags: [ 'wikidata' ] -exec: - - method: get -uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri.title}}' -headers: - cache-control: no-cache -query: -
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Strip everything before the first pf token
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406057 ) Change subject: Strip everything before the first pf token .. Strip everything before the first pf token In this isolate case, {{safesubst:#if:{{{1} only "subst:" is part of the same token as the prefix so `normalizeTarget` doesn't take care of remove the "safesubst:" The fix here is from noting that we wouldn't be at this place in the code if the target didn't normalize a canonical function name, so the contents before the prefix can be safely discarded. This is another patch along the line of 5608e83 and bcd5572 Bug: T185643 Change-Id: I7002804fcf5305ffb6c88d93c201d9e972f9037f --- M lib/wt2html/tt/TemplateHandler.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/57/406057/1 diff --git a/lib/wt2html/tt/TemplateHandler.js b/lib/wt2html/tt/TemplateHandler.js index bd00531..33968e4 100644 --- a/lib/wt2html/tt/TemplateHandler.js +++ b/lib/wt2html/tt/TemplateHandler.js @@ -473,7 +473,7 @@ if (canonicalFunctionName !== undefined) { // Extract toks that make up pfArg var pfArgToks; - var re = new RegExp(prefix, 'i'); + var re = new RegExp('^(.*?)' + prefix, 'i'); // Because of the lenient stringifying above, we need to find the prefix var i = targetToks.findIndex(function(t) { -- To view, visit https://gerrit.wikimedia.org/r/406057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7002804fcf5305ffb6c88d93c201d9e972f9037f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: poolcounter: Fix type hint for PoolWorkArticleView::getParse...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406038 ) Change subject: poolcounter: Fix type hint for PoolWorkArticleView::getParserOutput .. poolcounter: Fix type hint for PoolWorkArticleView::getParserOutput Change-Id: Ib6a71e198481cf2a0230b3f8721c019ef3c7288c --- M includes/poolcounter/PoolWorkArticleView.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/poolcounter/PoolWorkArticleView.php b/includes/poolcounter/PoolWorkArticleView.php index 17b62d7..7b888ab 100644 --- a/includes/poolcounter/PoolWorkArticleView.php +++ b/includes/poolcounter/PoolWorkArticleView.php @@ -79,7 +79,7 @@ /** * Get the ParserOutput from this object, or false in case of failure * -* @return ParserOutput +* @return ParserOutput|bool */ public function getParserOutput() { return $this->parserOutput; -- To view, visit https://gerrit.wikimedia.org/r/406038 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6a71e198481cf2a0230b3f8721c019ef3c7288c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Kreuz (WMDE) Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Move path array prepending logic to ClaimDifferenceVisualizer
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403963 ) Change subject: Move path array prepending logic to ClaimDifferenceVisualizer .. Move path array prepending logic to ClaimDifferenceVisualizer With this patch I am making the prepended path a private implementation detail of the ClaimDifferenceVisualizer class, and remove it entirely from DifferencesSnakVisualizer where it was before. That solves all concerns I had with the original patch Ia4bebd8: * The $path is not passed so deeply into code that does not really need to know anything about it. * Many of the optional $path parameters are gone. I had multiple reason to do it this way and would like to explain them, if needed. One reason is that a method called "getPropertyHeader" should only do exactly that: return the substring that describes a property. Note this patch does not change anything that is needed for I50eb048. The code I am touching in this patch is not used outside of the Wikibase code base. Bug: T182424 Change-Id: I0408672f42b9822f0fe380d8f692b15a7d64f73d --- M repo/includes/Diff/ClaimDifferenceVisualizer.php M repo/includes/Diff/DifferencesSnakVisualizer.php M repo/tests/phpunit/includes/Diff/ClaimDifferenceVisualizerTest.php M repo/tests/phpunit/includes/Diff/DifferencesSnakVisualizerTest.php 4 files changed, 81 insertions(+), 93 deletions(-) Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified Thiemo Kreuz (WMDE): Looks good to me, approved diff --git a/repo/includes/Diff/ClaimDifferenceVisualizer.php b/repo/includes/Diff/ClaimDifferenceVisualizer.php index d75f9a6..1828309 100644 --- a/repo/includes/Diff/ClaimDifferenceVisualizer.php +++ b/repo/includes/Diff/ClaimDifferenceVisualizer.php @@ -55,6 +55,7 @@ Statement $baseStatement, array $path = [] ) { + $headerPrefix = $path ? implode( ' / ', $path ) . ' / ' : ''; $newestMainSnak = $baseStatement->getMainSnak(); $oldestMainSnak = $newestMainSnak; $html = ''; @@ -63,40 +64,40 @@ if ( $mainSnakChange !== null ) { $oldestMainSnak = $mainSnakChange->getOldValue() ?: $newestMainSnak; $html .= $this->visualizeMainSnakChange( + $headerPrefix, $mainSnakChange, $oldestMainSnak, - $newestMainSnak, - $path + $newestMainSnak ); } $rankChange = $claimDifference->getRankChange(); if ( $rankChange !== null ) { $html .= $this->visualizeRankChange( + $headerPrefix, $rankChange, $oldestMainSnak, - $newestMainSnak, - $path + $newestMainSnak ); } $qualifierChanges = $claimDifference->getQualifierChanges(); if ( $qualifierChanges !== null ) { $html .= $this->visualizeQualifierChanges( + $headerPrefix, $qualifierChanges, $oldestMainSnak, - $newestMainSnak, - $path + $newestMainSnak ); } $referenceChanges = $claimDifference->getReferenceChanges(); if ( $referenceChanges !== null ) { $html .= $this->visualizeReferenceChanges( + $headerPrefix, $referenceChanges, $oldestMainSnak, - $newestMainSnak, - $path + $newestMainSnak ); } @@ -132,22 +133,22 @@ } /** +* @param string $headerPrefix * @param DiffOpChange $mainSnakChange * @param Snak $oldestMainSnak The old main snak, if present; otherwise, the new main snak * @param Snak $newestMainSnak The new main snak, if present; otherwise, the old main snak -* @param string[] $path The path to prepend in the header * * @return string HTML */ private function visualizeMainSnakChange( + $headerPrefix, DiffOpChange $mainSnakChange, Snak $oldestMainSnak, - Snak $newestMainSnak, - array $path + Snak $newestMainSnak
[MediaWiki-commits] [Gerrit] mediawiki...ArticlePlaceholder[master]: Type hint against IDatabase instead of Database
Thiemo Kreuz (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406056 ) Change subject: Type hint against IDatabase instead of Database .. Type hint against IDatabase instead of Database The interface is smaller, and all that's needed here. This patch also removes an obsolete documentation that is 100% identical to the method header. Change-Id: Ia666dec4dfea7089183d4adb5c42bf6ffbf0b4f6 --- M includes/BaseTemplateToolboxHookHandler.php M includes/ItemNotabilityFilter.php 2 files changed, 3 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticlePlaceholder refs/changes/56/406056/1 diff --git a/includes/BaseTemplateToolboxHookHandler.php b/includes/BaseTemplateToolboxHookHandler.php index 986ff2c..afbc19d 100644 --- a/includes/BaseTemplateToolboxHookHandler.php +++ b/includes/BaseTemplateToolboxHookHandler.php @@ -49,11 +49,6 @@ ); } - /** -* @param EntityIdParser $entityIdParser -* @param RepoLinker $repoLinker -* @param EntityLookup $entityLookup -*/ public function __construct( EntityIdParser $entityIdParser, RepoLinker $repoLinker, diff --git a/includes/ItemNotabilityFilter.php b/includes/ItemNotabilityFilter.php index 3974a62..d41d2d3 100644 --- a/includes/ItemNotabilityFilter.php +++ b/includes/ItemNotabilityFilter.php @@ -5,7 +5,7 @@ use Wikibase\DataModel\Entity\ItemId; use Wikibase\Lib\Store\EntityNamespaceLookup; use Wikibase\Lib\Store\SiteLinkLookup; -use Wikimedia\Rdbms\Database; +use Wikimedia\Rdbms\IDatabase; use Wikimedia\Rdbms\ResultWrapper; use Wikimedia\Rdbms\SessionConsistentConnectionManager; @@ -120,12 +120,12 @@ } /** -* @param Database $dbr +* @param IDatabase $dbr * @param ItemId[] $itemIds * * @return ResultWrapper */ - private function selectPagePropsPage( Database $dbr, array $itemIds ) { + private function selectPagePropsPage( IDatabase $dbr, array $itemIds ) { $entityNamespace = $this->entityNamespaceLookup->getEntityNamespace( 'item' ); if ( !is_int( $entityNamespace ) ) { -- To view, visit https://gerrit.wikimedia.org/r/406056 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia666dec4dfea7089183d4adb5c42bf6ffbf0b4f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticlePlaceholder Gerrit-Branch: master Gerrit-Owner: Thiemo Kreuz (WMDE) ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CLDRPluralRuleParser[master]: tests: Update phpunit and enable coverage for all classes
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406055 ) Change subject: tests: Update phpunit and enable coverage for all classes .. tests: Update phpunit and enable coverage for all classes The structure of the Evaluator is that there is a single class that serves as the main entry point, and everything else is called internally, so at this point we might as well allow coverage of all classes from our current tests, which are essentially integration tests. This is normally achieved by disabling 'forceCoversAnnotation', but that is disabled by default and wasn't enabled. The reason the test coverage report was behaving this way was due to the presence of one @covers annotation, which I removed. Also: * Minor phpunit update. * Remove redundant variable assignment in test. * Add 'composer cover' command. * Add /coverage to gitignore. * Add visibility to tests. Change-Id: I9f671dbf5b575799570db307df3fa310fad7976f --- M .gitignore M composer.json M tests/EvaluatorTest.php 3 files changed, 12 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/CLDRPluralRuleParser refs/changes/55/406055/1 diff --git a/.gitignore b/.gitignore index de4a392..a37efea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +/coverage /vendor /composer.lock diff --git a/composer.json b/composer.json index f71a4b0..db5ce9f 100644 --- a/composer.json +++ b/composer.json @@ -24,11 +24,11 @@ } }, "require": { - "php": ">=5.3.3" + "php": ">=5.5.9" }, "require-dev": { "jakub-onderka/php-parallel-lint": "^0.9.0.0", - "phpunit/phpunit": "^4.7.7.0", + "phpunit/phpunit": "^4.8", "mediawiki/mediawiki-codesniffer": "15.0.0" }, "scripts": { @@ -37,6 +37,7 @@ "phpunit $PHPUNIT_ARGS", "phpcs -p" ], + "cover": "phpunit --coverage-html coverage/", "fix": [ "phpcbf" ] diff --git a/tests/EvaluatorTest.php b/tests/EvaluatorTest.php index cc44f37..3243d4d 100644 --- a/tests/EvaluatorTest.php +++ b/tests/EvaluatorTest.php @@ -8,28 +8,25 @@ use CLDRPluralRuleParser\Evaluator; -/** - * @covers \CLDRPluralRuleParser\Evaluator - */ class EvaluatorTest extends \PHPUnit_Framework_TestCase { /** -* @dataProvider validTestCases +* @dataProvider provideValidCases */ - function testValidRules( $expected, $rules, $number, $comment ) { + public function testValidRules( $expected, $rules, $number, $comment ) { $result = Evaluator::evaluate( $number, (array)$rules ); $this->assertEquals( $expected, $result, $comment ); } /** -* @dataProvider invalidTestCases +* @dataProvider provideInvalidCases * @expectedException CLDRPluralRuleParser\Error */ - function testInvalidRules( $rules, $comment ) { + public function testInvalidRules( $rules, $comment ) { Evaluator::evaluate( 1, (array)$rules ); } - function validTestCases() { - $tests = [ + public static function provideValidCases() { + return [ # expected, rule, number, comment [ 0, 'n is 1', 1, 'integer number and is' ], [ 0, 'n is 1', "1", 'string integer number and is' ], @@ -139,17 +136,13 @@ array( 1, 'v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14', '10.0', 'bs other' ), // @codingStandardsIgnoreEnd ]; - - return $tests; } - function invalidTestCases() { - $tests = [ + public static function provideInvalidCases() { + return [ [ 'n mod mod 5 is 1', 'mod mod' ], [ 'n', 'just n' ], [ 'n is in 5', 'is in' ], ]; - - return $tests; } } -- To view, visit https://gerrit.wikimedia.org/r/406055 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f671dbf5b575799570db307df3fa310fad7976f Gerrit-PatchSet: 1 Gerrit-Project: CLDRPluralRuleParser Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ArticlePlaceholder[master]: Add more test cases to improve overall test coverage
Thiemo Kreuz (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406054 ) Change subject: Add more test cases to improve overall test coverage .. Add more test cases to improve overall test coverage Change-Id: I28547aa378977d1c379e7e709357d9916c511e1f --- M tests/phpunit/includes/HooksTest.php A tests/phpunit/includes/Lua/Scribunto_LuaArticlePlaceholderLibraryTest.php 2 files changed, 99 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticlePlaceholder refs/changes/54/406054/1 diff --git a/tests/phpunit/includes/HooksTest.php b/tests/phpunit/includes/HooksTest.php index 1e9a960..e5c9e5a 100644 --- a/tests/phpunit/includes/HooksTest.php +++ b/tests/phpunit/includes/HooksTest.php @@ -15,6 +15,15 @@ */ class HooksTest extends PHPUnit_Framework_TestCase { + public function testOnScribuntoExternalLibraries() { + $instance = new Hooks(); + $extraLibraries = []; + $instance->onScribuntoExternalLibraries( 'lua', $extraLibraries ); + $this->assertCount( 1, $extraLibraries ); + $this->assertContainsOnly( 'array', $extraLibraries ); + $this->assertArrayHasKey( 'class', reset( $extraLibraries ) ); + } + public function testRegisterScribuntoExternalLibraryPaths() { $instance = new Hooks(); $paths = []; diff --git a/tests/phpunit/includes/Lua/Scribunto_LuaArticlePlaceholderLibraryTest.php b/tests/phpunit/includes/Lua/Scribunto_LuaArticlePlaceholderLibraryTest.php new file mode 100644 index 000..ffaec0f --- /dev/null +++ b/tests/phpunit/includes/Lua/Scribunto_LuaArticlePlaceholderLibraryTest.php @@ -0,0 +1,90 @@ +setMwGlobals( [ + 'wgArticlePlaceholderImageProperty' => 'P2001', + 'wgArticlePlaceholderReferencesBlacklist' => 'P2002', + ] ); + } + + public function testGetImageProperty() { + $instance = $this->newInstance(); + + $actual = $instance->getImageProperty(); + $this->assertSame( [ 'P2001' ], $actual ); + } + + public function testGetImageProperty_throwsException() { + $this->setMwGlobals( 'wgArticlePlaceholderImageProperty', '' ); + $instance = $this->newInstance(); + + $this->setExpectedException( RuntimeException::class ); + $instance->getImageProperty(); + } + + public function testGetReferencesBlacklist() { + $instance = $this->newInstance(); + + $actual = $instance->getReferencesBlacklist(); + $this->assertSame( [ 'P2002' ], $actual ); + } + + public function testGetReferencesBlacklist_returnsNull() { + $this->setMwGlobals( 'wgArticlePlaceholderReferencesBlacklist', '' ); + $instance = $this->newInstance(); + + $actual = $instance->getReferencesBlacklist(); + $this->assertNull( $actual ); + } + + public function testRegister() { + $engine = $this->getMockBuilder( Scribunto_LuaEngine::class ) + ->disableOriginalConstructor() + ->getMock(); + $engine->expects( $this->once() ) + ->method( 'registerInterface' ) + ->willReturnCallback( function ( + $moduleFileName, + array $interfaceFuncs, + array $setupOptions + ) { + $this->assertFileExists( $moduleFileName ); + $this->assertInternalType( 'callable', $interfaceFuncs['getImageProperty'] ); + $this->assertInternalType( 'callable', $interfaceFuncs['getReferencesBlacklist'] ); + + return 'dummyReturnValue'; + } ); + $instance = new Scribunto_LuaArticlePlaceholderLibrary( $engine ); + + $actual = $instance->register(); + $this->assertSame( 'dummyReturnValue', $actual ); + } + + private function newInstance() { + $engine = $this->getMockBuilder( Scribunto_LuaEngine::class ) + ->disableOriginalConstructor() + ->getMock(); + + return new Scribunto_LuaArticlePlaceholderLibrary( $engine ); + } + +} -- To view, visit https://gerrit.wikimedia.org/r/406054 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28547aa378977d1c379e7e709357d9916c511e1f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticlePlaceholder Gerrit-Branch: master Gerrit-Owner: Thiemo Kreuz (WMDE)
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Remove arbitrary SSH thread settings
RobH has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/406052 ) Change subject: Gerrit: Remove arbitrary SSH thread settings .. Gerrit: Remove arbitrary SSH thread settings They're from a long long time ago and system defaults make more sense. sshd.batchThreads defaults to 2 on multi-core systems...so why bother? sshd.threads defaults to 2x cores. Well there's 4 physical cores, plus HT so 8...that should be 16!! Bug: T182756 Change-Id: I04a59c8bf94b9ed221bdc7cebe50cc14133070c4 --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified RobH: Looks good to me, approved diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index 13fec20..ac4b8dc 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -183,8 +183,6 @@ listenAddress = [<%= @ipv6 %>]:29418 <%- end -%> <%- end -%> -threads = 8 -batchThreads = 2 idleTimeout = 864000 mac = -hmac-md5 mac = -hmac-md5-96 -- To view, visit https://gerrit.wikimedia.org/r/406052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04a59c8bf94b9ed221bdc7cebe50cc14133070c4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...LanguageTag[master]: Convert LanguageTag to use extension resistration
Jayprakash12345 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406053 ) Change subject: Convert LanguageTag to use extension resistration .. Convert LanguageTag to use extension resistration Bug: T185648 Change-Id: I0bc583645aac1f15750c72a66ffe2dbefadfaaf2 --- M LanguageTag.php A extension.json 2 files changed, 32 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LanguageTag refs/changes/53/406053/1 diff --git a/LanguageTag.php b/LanguageTag.php index 9371499..905a391 100644 --- a/LanguageTag.php +++ b/LanguageTag.php @@ -9,21 +9,16 @@ */ // Yes, this is an extension, not a standalone script, we are coming from LocalSettings.php -if( !defined( 'MEDIAWIKI' ) ) { -echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" ); -die( -1 ); +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'LanguageTag' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['LanguageTag'] = __DIR__ . '/i18n'; + wfWarn( + 'Deprecated PHP entry point used for the LanguageTag extension. ' . + 'Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); + return; +} else { + die( 'This version of the LanguageTag extension requires MediaWiki 1.29+' ); } - -// Standard crediting -$wgExtensionCredits['parserhook'][] = array( -'path' => __FILE__, -'name' => 'LanguageTag', -'version'=> '1.1.0', -'author' => 'István Király', -'url'=> 'https://www.mediawiki.org/wiki/Extension:LanguageTag', - 'descriptionmsg' => 'languagetag-desc', -); - -$wgMessagesDirs['LanguageTag'] = __DIR__ . '/i18n'; -$wgAutoloadClasses['LanguageTag'] = __DIR__ . '/LanguageTag.body.php'; -$wgHooks['ParserFirstCallInit'][] = 'LanguageTag::LanguageTagParserInit'; diff --git a/extension.json b/extension.json new file mode 100644 index 000..4b32e82 --- /dev/null +++ b/extension.json @@ -0,0 +1,20 @@ +{ + "name": "LanguageTag", + "version": "1.2.0", + "author": "István Király", + "url": "https://www.mediawiki.org/wiki/Extension:LanguageTag";, + "descriptionmsg": "languagetag-desc", + "type": "parserhook", + "MessagesDirs": { + "LanguageTag": [ + "i18n" + ] + }, + "AutoloadClasses": { + "LanguageTag": "LanguageTag.body.php" + }, + "Hooks": { + "ParserFirstCallInit": "LanguageTag::LanguageTagParserInit" + }, + "manifest_version": 2 +} -- To view, visit https://gerrit.wikimedia.org/r/406053 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0bc583645aac1f15750c72a66ffe2dbefadfaaf2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LanguageTag Gerrit-Branch: master Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Remove arbitrary SSH thread settings
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406052 ) Change subject: Gerrit: Remove arbitrary SSH thread settings .. Gerrit: Remove arbitrary SSH thread settings They're from a long long time ago and system defaults make more sense. sshd.batchThreads defaults to 2 on multi-core systems...so why bother? sshd.threads defaults to 2x cores. Well there's 4 physical cores, plus HT so 8...that should be 16!! Bug: T182756 Change-Id: I04a59c8bf94b9ed221bdc7cebe50cc14133070c4 --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/52/406052/1 diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index 13fec20..ac4b8dc 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -183,8 +183,6 @@ listenAddress = [<%= @ipv6 %>]:29418 <%- end -%> <%- end -%> -threads = 8 -batchThreads = 2 idleTimeout = 864000 mac = -hmac-md5 mac = -hmac-md5-96 -- To view, visit https://gerrit.wikimedia.org/r/406052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I04a59c8bf94b9ed221bdc7cebe50cc14133070c4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: OptInController catch both errors and exception
Sbisson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406051 ) Change subject: OptInController catch both errors and exception .. OptInController catch both errors and exception The problem that is currently causing the opt-out to fail is not an Exception but an Error. Catching Throwable to make sure we revert the transations in all cases. Bug: T184670 Change-Id: Id0f4271d635094bf99f2fc8fa9cbbc4b08f07b46 --- M includes/Import/OptInController.php 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/51/406051/1 diff --git a/includes/Import/OptInController.php b/includes/Import/OptInController.php index 49d9e84..5499036 100644 --- a/includes/Import/OptInController.php +++ b/includes/Import/OptInController.php @@ -124,18 +124,19 @@ } else { $logger->error( $outerMethod . ': unrecognized action: ' . $action ); } - } catch ( Exception $e ) { + } catch ( \Throwable $t ) { $logger->error( - $outerMethod . ' failed to {action} Flow on \'{talkpage}\' for user \'{user}\'. Exception: {exception}', + $outerMethod . ' failed to {action} Flow on \'{talkpage}\' for user \'{user}\'. {message} {trace}', [ 'action' => $action, 'talkpage' => $talkpage, 'user' => $user, - 'exception' => $e, + 'message' => $t->getMessage(), + 'trace' => $t->getTraceAsString(), ] ); // rollback both Flow and Core DBs - MWExceptionHandler::rollbackMasterChangesAndLog( $e ); + MWExceptionHandler::rollbackMasterChangesAndLog( $t ); $this->dbFactory->getDB( DB_MASTER )->rollback( $outerMethod ); } }, -- To view, visit https://gerrit.wikimedia.org/r/406051 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0f4271d635094bf99f2fc8fa9cbbc4b08f07b46 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Sbisson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Split up and test CheckConstraints::newFromGlobalState
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406050 ) Change subject: Split up and test CheckConstraints::newFromGlobalState .. Split up and test CheckConstraints::newFromGlobalState CheckConstraints::newFromGlobalState was one giant method that initialized the dependency injection for everything else. This commit splits it up into several methods and adds tests for all of them. I’ll be the first to admit that this still isn’t great, and that the tests don’t do very much, but at least we’ll now get test failures if one of the classes instantiated here gains a parameter, which previously would only be detected by manual tests. Bug: T183373 Change-Id: Ie075eade0f9155128898564874bea9f38a86f443 --- M src/Api/CheckConstraints.php M tests/phpunit/Api/CheckConstraintsTest.php 2 files changed, 221 insertions(+), 72 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints refs/changes/50/406050/1 diff --git a/src/Api/CheckConstraints.php b/src/Api/CheckConstraints.php index 46b5303..6d092ba 100644 --- a/src/Api/CheckConstraints.php +++ b/src/Api/CheckConstraints.php @@ -4,9 +4,11 @@ use ApiBase; use ApiMain; +use Config; use IBufferingStatsdDataFactory; use MediaWiki\MediaWikiServices; use RequestContext; +use TitleParser; use ValueFormatters\FormatterOptions; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\EntityIdParser; @@ -19,6 +21,7 @@ use Wikibase\Repo\Api\ResultBuilder; use Wikibase\Repo\EntityIdLabelFormatterFactory; use Wikibase\Repo\WikibaseRepo; +use WikibaseQuality\ConstraintReport\ConstraintCheck\DelegatingConstraintChecker; use WikibaseQuality\ConstraintReport\ConstraintCheck\Helper\ConstraintParameterParser; use WikibaseQuality\ConstraintReport\ConstraintCheck\Result\CheckResult; use WikibaseQuality\ConstraintReport\ConstraintParameterRenderer; @@ -75,32 +78,91 @@ * @param string $prefix * * @return self +* +* @codeCoverageIgnore hard to test and only delegates to other methods */ public static function newFromGlobalState( ApiMain $main, $name, $prefix = '' ) { - $repo = WikibaseRepo::getDefaultInstance(); + return self::getCheckConstraints( + MediaWikiServices::getInstance(), + WikibaseRepo::getDefaultInstance(), + $main, + $name, + $prefix + ); + } + public static function getCheckConstraints( + MediaWikiServices $services, + WikibaseRepo $repo, + ApiMain $main, + $name, + $prefix + ) { + $config = $services->getMainConfig(); + $dataFactory = $services->getStatsdDataFactory(); + $titleParser = $services->getTitleParser(); + + $constraintParameterRenderer = self::getConstraintParameterRenderer( + $config, + $repo + ); + $constraintReportFactory = self::getConstraintReportFactory( + $config, + $dataFactory, + $titleParser, + $repo, + $constraintParameterRenderer + ); + $resultsBuilder = self::getResultsBuilder( + $config, + $dataFactory, + $repo, + $constraintParameterRenderer, + $constraintReportFactory->getConstraintChecker() + ); + + return new CheckConstraints( + $main, + $name, + $prefix, + $repo->getEntityIdParser(), + $repo->getStatementGuidValidator(), + $repo->getApiHelperFactory( RequestContext::getMain() ), + $resultsBuilder, + $dataFactory + ); + } + + public static function getConstraintParameterRenderer( + Config $config, + WikibaseRepo $repo + ) { $language = $repo->getUserLanguage(); - $formatterOptions = new FormatterOptions(); - $formatterOptions->setOption( SnakFormatter::OPT_LANG, $language->getCode() ); - $valueFormatterFactory = $repo->getValueFormatterFactory(); - $valueFormatter = $valueFormatterFactory->getValueFormatter( SnakFormatter::FORMAT_HTML, $formatterOptions ); - - $languageFallbackLabelDescriptionLookupFactory = $repo->getLanguageFallbackLabelDescriptionLookupFactory(); - $labelDescriptionLookup = $languageFallbackLabelDescri
[MediaWiki-commits] [Gerrit] generator-wikimedia-php-library[master]: Archive repository
Krinkle has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405929 ) Change subject: Archive repository .. Archive repository Bug: T174416 Change-Id: I0a4a291607da3acf6ba4de7da140c3d8fd4117af --- D .gitignore D .jshintrc D .travis.yml D LICENSE D NOTICE M README.md D generators/app/index.js D generators/app/licenses.js D generators/app/packagist.js D generators/app/templates/_.editorconfig D generators/app/templates/_.gitreview D generators/app/templates/_Doxyfile D generators/app/templates/_Library.php D generators/app/templates/_LibraryTest.php D generators/app/templates/_composer.json D generators/app/templates/_phpcs.xml D generators/app/templates/_phpunit.xml.dist D generators/app/templates/gitattributes D generators/app/templates/gitignore D generators/app/templates/licenses/Apache/LICENSE D generators/app/templates/licenses/Apache/_NOTICE D generators/app/templates/licenses/Apache/_header D generators/app/templates/licenses/GPLv2/COPYING D generators/app/templates/licenses/GPLv2/_header D generators/app/templates/licenses/MIT/_LICENSE D generators/app/templates/licenses/MIT/_header D generators/app/templates/travis.yml D package.json D test/test-app.js 29 files changed, 5 insertions(+), 1,316 deletions(-) Approvals: Krinkle: Verified; Looks good to me, approved BryanDavis: Looks good to me, approved diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c2658d7..000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index e1ea67d..000 --- a/.jshintrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - // Enforcing - "bitwise": true, - "eqeqeq": true, - "freeze": true, - "latedef": true, - "noarg": true, - "nonew": true, - "undef": true, - "unused": true, - "strict": false, - "node": true -} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dedfc07..000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -sudo: false -language: node_js -node_js: - - 'iojs' - - '0.12' - - '0.10' diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d645695..000 --- a/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 -http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner -
[MediaWiki-commits] [Gerrit] integration/docroot[master]: cover: Add sort=cover parameter to coverage report
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405996 ) Change subject: cover: Add sort=cover parameter to coverage report .. cover: Add sort=cover parameter to coverage report When enabled, the sorting changes from alphabetical by name, to be ascending by coverage percentage. This helps identify projects with low code coverage, and as potential area to contribute. Change-Id: I4ff4bb7191ad8579427cf74fd865fe23b85b234d --- M .phpcs.xml M shared/CoveragePage.php 2 files changed, 33 insertions(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/.phpcs.xml b/.phpcs.xml index 311ca42..44a6bd0 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -11,6 +11,7 @@ + . diff --git a/shared/CoveragePage.php b/shared/CoveragePage.php index 8bb60e5..5314f43 100644 --- a/shared/CoveragePage.php +++ b/shared/CoveragePage.php @@ -47,6 +47,8 @@ $results = glob( $this->coverageDir . '/*/clover.xml' ); $this->embedCSS( file_get_contents( __DIR__ . '/cover.css' ) ); + $sort = isset( $_GET['sort'] ) ? (string)$_GET['sort'] : null; + if ( $this->pageName === 'Test coverage' ) { $href = $this->fixNavUrl( '/cover-extensions/' ); $breadcrumbs = <addHtmlContent( $sortNav ); $this->addHtmlContent( '' ); $html = ''; + $clovers = []; foreach ( $results as $clover ) { - $info = $this->parseClover( $clover ); + $clovers[$clover] = $this->parseClover( $clover ); + } + if ( isset( $_GET['sort'] ) && $_GET['sort'] === 'cov' ) { + // Order by coverage, ascending + uasort( $clovers, function ( $a, $b ) { + if ( $a['percent'] === $b['percent'] ) { + return 0; + } + return ( $a['percent'] < $b['percent'] ) ? -1 : 1; + } ); + } + foreach ( $clovers as $clover => $info ) { $dirName = htmlspecialchars( basename( dirname( $clover ) ) ); $percent = (string)round( $info['percent'] ); $color = $this->getLevelColor( $info['percent'] ); -- To view, visit https://gerrit.wikimedia.org/r/405996 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4ff4bb7191ad8579427cf74fd865fe23b85b234d Gerrit-PatchSet: 4 Gerrit-Project: integration/docroot Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Hashar Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/docroot[master]: cover: Fix cover-extension breadcrumbs to work on different ...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/405986 ) Change subject: cover: Fix cover-extension breadcrumbs to work on different mount paths .. cover: Fix cover-extension breadcrumbs to work on different mount paths For local dev. Matches logic we use in top nav already. Change-Id: Ifcd41842ca5944ef29ca6c4d04d4e466fb69271c --- M shared/CoveragePage.php M shared/Page.php 2 files changed, 13 insertions(+), 6 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified Objections: Reedy: There's a problem with this change, please improve diff --git a/shared/CoveragePage.php b/shared/CoveragePage.php index 67d583a..8bb60e5 100644 --- a/shared/CoveragePage.php +++ b/shared/CoveragePage.php @@ -48,16 +48,18 @@ $this->embedCSS( file_get_contents( __DIR__ . '/cover.css' ) ); if ( $this->pageName === 'Test coverage' ) { + $href = $this->fixNavUrl( '/cover-extensions/' ); $breadcrumbs = << Coverage home - MediaWiki extensions + MediaWiki extensions HTML; } else { + $href = $this->fixNavUrl( '/cover/' ); $breadcrumbs = << - Coverage home + Coverage home MediaWiki extensions HTML; diff --git a/shared/Page.php b/shared/Page.php index 801aa40..c82aa7a 100644 --- a/shared/Page.php +++ b/shared/Page.php @@ -248,15 +248,20 @@ ); } + protected function fixNavUrl( $href ) { + if ( $href[0] === '/' ) { + // Expand relatively so that it works even if the site is mounted in a sub directory. + $href = substr( $this->getRootPath(), 0, -1 ) . $href; + } + return $href; + } + protected function getNavHtml() { $html = ''; $cur = $this->getRequestPath(); foreach ( $this->getNavItems() as $href => $text ) { $active = ( $href === "/$cur" ? ' class="active"' : '' ); - if ( $href[0] === '/' ) { - // Expand relatively so that it works even if the site is mounted in a sub directory. - $href = substr( $this->getRootPath(), 0, -1 ) . $href; - } + $href = $this->fixNavUrl( $href ); $html .= '' . htmlspecialchars( $text ) . ''; } $html .= ''; -- To view, visit https://gerrit.wikimedia.org/r/405986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifcd41842ca5944ef29ca6c4d04d4e466fb69271c Gerrit-PatchSet: 2 Gerrit-Project: integration/docroot Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Hashar Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Paladox Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits