[MediaWiki-commits] [Gerrit] Don't retry invalid thumbnail requests due to impossible width - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Don't retry invalid thumbnail requests due to impossible width .. Don't retry invalid thumbnail requests due to impossible width At the moment this isn't going to work in production, because varnish turns 400s into 500s. But I'll try to fix that separately. Bug: T106740 Change-Id: Id156ee4ac986ad2a6d7e49dfe8aa7577764eca11 --- M includes/jobqueue/jobs/ThumbnailRenderJob.php 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/jobqueue/jobs/ThumbnailRenderJob.php b/includes/jobqueue/jobs/ThumbnailRenderJob.php index d1d..f558c48 100644 --- a/includes/jobqueue/jobs/ThumbnailRenderJob.php +++ b/includes/jobqueue/jobs/ThumbnailRenderJob.php @@ -55,11 +55,10 @@ wfDebug( __METHOD__ . ": received status {$status}\n" ); - if ( $status === 200 || $status === 301 || $status === 302 ) { + // 400 happens when requesting a size greater or equal than the original + if ( $status === 200 || $status === 301 || $status === 302 || $status === 400 ) { return true; } elseif ( $status ) { - // Note that this currently happens (500) when requesting sizes larger then or - // equal to the original, which is harmless. $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status . ' when hitting ' . $thumbUrl ); return false; } else { -- To view, visit https://gerrit.wikimedia.org/r/227456 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id156ee4ac986ad2a6d7e49dfe8aa7577764eca11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gilles Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Modify cache conditions for replacing the last-modified-bar - change (mediawiki...MobileFrontend)
Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/227495 Change subject: Modify cache conditions for replacing the last-modified-bar .. Modify cache conditions for replacing the last-modified-bar Under normal page view, the .last-modified-bar element should also have the classes, .pre-content and .post-content In certain cached page situations the child element causing the padding to be applied inside the .last-modified-bar Bug: T107104 Change-Id: Iba6e4160d23282ecd309ed64cfa8fbb1da012b6c --- M resources/mobile.head/init.js 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/95/227495/1 diff --git a/resources/mobile.head/init.js b/resources/mobile.head/init.js index d0df854..a4fb107 100644 --- a/resources/mobile.head/init.js +++ b/resources/mobile.head/init.js @@ -57,7 +57,11 @@ ] ); // FIXME: remove the if part when the cache clears. - if ( isPageCached || $lastModifiedLink.hasClass( 'truncated-text' ) ) { + if ( + isPageCached || + $lastModifiedLink.hasClass( 'truncated-text' ) || + $lastModified.hasClass( 'pre-content' ) + ) { $lastModifiedBar.replaceWith( $( '' ) .html( -- To view, visit https://gerrit.wikimedia.org/r/227495 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba6e4160d23282ecd309ed64cfa8fbb1da012b6c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Robmoen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implement redirects in CssContent - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Implement redirects in CssContent .. Implement redirects in CssContent Just like ad9f14d662f959 which was for JavaScript. The redirect will be of the form "/* #REDIRECT */@import url(...);". Bug: T73201 Bug: T35973 Change-Id: I10bae44af4b4923f8797172702974cd45dc25ab4 --- M includes/content/CssContent.php M includes/content/CssContentHandler.php A tests/phpunit/includes/content/CssContentHandlerTest.php M tests/phpunit/includes/content/CssContentTest.php 4 files changed, 115 insertions(+), 2 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/content/CssContent.php b/includes/content/CssContent.php index 8290603..b4f5196 100644 --- a/includes/content/CssContent.php +++ b/includes/content/CssContent.php @@ -33,6 +33,11 @@ class CssContent extends TextContent { /** +* @var bool|Title|null +*/ + private $redirectTarget = false; + + /** * @param string $text CSS code. * @param string $modelId the content content model */ @@ -74,4 +79,43 @@ return $html; } + /** +* @param Title $target +* @return CssContent +*/ + public function updateRedirect( Title $target ) { + if ( !$this->isRedirect() ) { + return $this; + } + + return $this->getContentHandler()->makeRedirectContent( $target ); + } + + /** +* @return Title|null +*/ + public function getRedirectTarget() { + if ( $this->redirectTarget !== false ) { + return $this->redirectTarget; + } + $this->redirectTarget = null; + $text = $this->getNativeData(); + if ( strpos( $text, '/* #REDIRECT */' ) === 0 ) { + // Extract the title from the url + preg_match( '/title=(.*?)&action=raw/', $text, $matches ); + if ( isset( $matches[1] ) ) { + $title = Title::newFromText( $matches[1] ); + if ( $title ) { + // Have a title, check that the current content equals what + // the redirect content should be + if ( $this->equals( $this->getContentHandler()->makeRedirectContent( $title ) ) ) { + $this->redirectTarget = $title; + } + } + } + } + + return $this->redirectTarget; + } + } diff --git a/includes/content/CssContentHandler.php b/includes/content/CssContentHandler.php index b2a8676..dfa01e2 100644 --- a/includes/content/CssContentHandler.php +++ b/includes/content/CssContentHandler.php @@ -39,4 +39,23 @@ protected function getContentClass() { return 'CssContent'; } + + public function supportsRedirects() { + return true; + } + + /** +* Create a redirect that is also valid CSS +* +* @param Title $destination +* @param string $text ignored +* @return JavaScriptContent +*/ + public function makeRedirectContent( Title $destination, $text = '' ) { + // The parameters are passed as a string so the / is not url-encoded by wfArrayToCgi + $url = $destination->getFullURL( 'action=raw&ctype=text/css', false, PROTO_RELATIVE ); + $class = $this->getContentClass(); + return new $class( '/* #REDIRECT */@import ' . CSSMin::buildUrlValue( $url ) . ';' ); + } + } diff --git a/tests/phpunit/includes/content/CssContentHandlerTest.php b/tests/phpunit/includes/content/CssContentHandlerTest.php new file mode 100644 index 000..e1785a9 --- /dev/null +++ b/tests/phpunit/includes/content/CssContentHandlerTest.php @@ -0,0 +1,30 @@ +setMwGlobals( array( + 'wgServer' => '//example.org', + 'wgScript' => '/w/index.php', + ) ); + $ch = new CssContentHandler(); + $content = $ch->makeRedirectContent( Title::newFromText( $title ) ); + $this->assertInstanceOf( 'CssContent', $content ); + $this->assertEquals( $expected, $content->serialize( CONTENT_FORMAT_CSS ) ); + } + + /** +* Keep this in sync with CssContentTest::provideGetRedirectTarget() +*/ + public static function provideMakeRedirectContent() { + return array( + array( 'MediaWiki:MonoBook.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=MediaWik
[MediaWiki-commits] [Gerrit] Gather more information about pre rendering 500s - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Gather more information about pre rendering 500s .. Gather more information about pre rendering 500s Bug: T106740 Change-Id: I4a1436f1724fcc74d4c1076b21fcdb3b5d58b1de --- M includes/jobqueue/jobs/ThumbnailRenderJob.php 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/jobqueue/jobs/ThumbnailRenderJob.php b/includes/jobqueue/jobs/ThumbnailRenderJob.php index a58fa8b..d1d 100644 --- a/includes/jobqueue/jobs/ThumbnailRenderJob.php +++ b/includes/jobqueue/jobs/ThumbnailRenderJob.php @@ -50,7 +50,8 @@ return false; } } elseif ( $wgUploadThumbnailRenderMethod === 'http' ) { - $status = $this->hitThumbUrl( $file, $transformParams ); + $thumbUrl = ''; + $status = $this->hitThumbUrl( $file, $transformParams, $thumbUrl ); wfDebug( __METHOD__ . ": received status {$status}\n" ); @@ -59,7 +60,7 @@ } elseif ( $status ) { // Note that this currently happens (500) when requesting sizes larger then or // equal to the original, which is harmless. - $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status ); + $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status . ' when hitting ' . $thumbUrl ); return false; } else { $this->setLastError( __METHOD__ . ': HTTP request failure' ); @@ -75,7 +76,7 @@ } } - protected function hitThumbUrl( $file, $transformParams ) { + protected function hitThumbUrl( $file, $transformParams, &$thumbUrl ) { global $wgUploadThumbnailRenderHttpCustomHost, $wgUploadThumbnailRenderHttpCustomDomain; $thumbName = $file->thumbName( $transformParams ); -- To view, visit https://gerrit.wikimedia.org/r/227453 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a1436f1724fcc74d4c1076b21fcdb3b5d58b1de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gilles Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump jscs version in package.json to 2.0.0 - change (mediawiki...Metrolook)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/227494 Change subject: Bump jscs version in package.json to 2.0.0 .. Bump jscs version in package.json to 2.0.0 Change-Id: I6a95a950ceee0e7522436deaa0ac0abc1c3a5b91 --- M i18n/vi.json M package.json 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook refs/changes/94/227494/1 diff --git a/i18n/vi.json b/i18n/vi.json index 58e199f..570cc7b 100644 --- a/i18n/vi.json +++ b/i18n/vi.json @@ -4,6 +4,7 @@ "Minh Nguyen" ] }, + "skinmetrolook-collapsiblenav-preference": "Bật trình đơn chuyển hướng gấp lại được ở bên phải trong giao diện Metrolook", "metrolook-desc": "Giao diện Metrolook dành cho MediaWiki", "metrolook-guest": "Khách" } diff --git a/package.json b/package.json index 93beca9..7a6ece4 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "grunt-cli": "0.1.13", "grunt-contrib-jshint": "0.11.2", "grunt-banana-checker": "0.2.2", -"grunt-jscs": "1.8.0", +"grunt-jscs": "2.0.0", "grunt-jsonlint": "1.0.4" } } -- To view, visit https://gerrit.wikimedia.org/r/227494 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a95a950ceee0e7522436deaa0ac0abc1c3a5b91 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Metrolook Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Put "userjs-" in in apihelp-options-description - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Put "userjs-" in in apihelp-options-description .. Put "userjs-" in in apihelp-options-description This is good for markup, and is also useful for applying dir="ltr" in languages where it is needed. Change-Id: I4fbe7af8a3a83e3137a5bd014032a5ffa2ca4939 --- M includes/api/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index 5a6a53f..b19c821 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -254,7 +254,7 @@ "apihelp-opensearch-param-warningsaserror": "If warnings are raised with format=json, return an API error instead of ignoring them.", "apihelp-opensearch-example-te": "Find pages beginning with Te.", - "apihelp-options-description": "Change preferences of the current user.\n\nOnly options which are registered in core or in one of installed extensions, or options with keys prefixed with \"userjs-\" (intended to be used by user scripts), can be set.", + "apihelp-options-description": "Change preferences of the current user.\n\nOnly options which are registered in core or in one of installed extensions, or options with keys prefixed with userjs- (intended to be used by user scripts), can be set.", "apihelp-options-param-reset": "Resets preferences to the site defaults.", "apihelp-options-param-resetkinds": "List of types of options to reset when the $1reset option is set.", "apihelp-options-param-change": "List of changes, formatted name=value (e.g. skin=vector). Value cannot contain pipe characters. If no value is given (not even an equals sign), e.g., optionname|otheroption|..., the option will be reset to its default value.", -- To view, visit https://gerrit.wikimedia.org/r/227340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4fbe7af8a3a83e3137a5bd014032a5ffa2ca4939 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80 Gerrit-Reviewer: Anomie Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Labs: Remove various obsolete migration code - change (operations/puppet)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/227493 Change subject: Labs: Remove various obsolete migration code .. Labs: Remove various obsolete migration code Change-Id: Ie0de2def6b309d3d03dc383a07304601af768c4f --- M manifests/role/labs.pp M modules/toollabs/manifests/bastion.pp M modules/toollabs/manifests/init.pp M modules/toollabs/manifests/master.pp 4 files changed, 0 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/93/227493/1 diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp index b690c43..417a488 100644 --- a/manifests/role/labs.pp +++ b/manifests/role/labs.pp @@ -167,11 +167,6 @@ ensure => absent, } -# TODO: Remove after Puppet cycle. -file { '/usr/local/sbin/reboot-if-idmap': -ensure => absent, -} - # In production, we try to be punctilious about having Puppet manage # system state, and thus it's reasonable to purge Apache site configs # that have not been declared via Puppet. But on Labs we want to allow diff --git a/modules/toollabs/manifests/bastion.pp b/modules/toollabs/manifests/bastion.pp index 880a151..588f3cc 100644 --- a/modules/toollabs/manifests/bastion.pp +++ b/modules/toollabs/manifests/bastion.pp @@ -78,9 +78,4 @@ group => 'root', content => template('toollabs/crontab.erb'), } -# TODO: Remove after deployment. -file { '/usr/local/bin/xcrontab': -ensure => absent, -} - } diff --git a/modules/toollabs/manifests/init.pp b/modules/toollabs/manifests/init.pp index cc60b24..8089a8f 100644 --- a/modules/toollabs/manifests/init.pp +++ b/modules/toollabs/manifests/init.pp @@ -138,10 +138,6 @@ handle => 'tools-project', require => File[$toollabs::sysdir], } -# TODO: Remove after migration. -file { '/etc/apt/sources.list.d/local.list': -ensure => absent, -} # Trustworthy enough # Only necessary on precise hosts, trusty has its own mariadb package diff --git a/modules/toollabs/manifests/master.pp b/modules/toollabs/manifests/master.pp index fa12a23..44534be 100644 --- a/modules/toollabs/manifests/master.pp +++ b/modules/toollabs/manifests/master.pp @@ -63,20 +63,5 @@ source => 'puppet:///modules/toollabs/host_aliases', require => Mount['/var/lib/gridengine'], } - -# TODO: Remove after migration. -file { "${toollabs::repo}/update-repo.sh": -ensure => absent, -} -exec { 'Move Tools all packages to new structure': -command => "/bin/mv -i ${toollabs::repo}/all/*.deb ${toollabs::repo}/ && /bin/rm -f ${toollabs::repo}/all/Packages && /bin/rmdir ${toollabs::repo}/all", -onlyif => "/usr/bin/test -d ${toollabs::repo}/all", -notify => Exec["Turn ${toollabs::repo} into deb repo"], -} -exec { 'Move Tools amd64 packages to new structure': -command => "/bin/mv -i ${toollabs::repo}/amd64/*.deb ${toollabs::repo}/ && /bin/rm -f ${toollabs::repo}/amd64/Packages && /bin/rmdir ${toollabs::repo}/amd64", -onlyif => "/usr/bin/test -d ${toollabs::repo}/amd64", -notify => Exec["Turn ${toollabs::repo} into deb repo"], -} } -- To view, visit https://gerrit.wikimedia.org/r/227493 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0de2def6b309d3d03dc383a07304601af768c4f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove ungroupedlist api parameters - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove ungroupedlist api parameters .. Remove ungroupedlist api parameters Will be deployed with 1.26wmf17, and was announced on the mediawiki-api-announce list. Bug: T106863 Change-Id: I10b424b8c31996d8de4c63ae1c9482689c07cebb --- M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/api/GetClaims.php M repo/includes/api/GetEntities.php M repo/tests/phpunit/includes/api/GetClaimsTest.php M repo/tests/phpunit/includes/api/GetEntitiesTest.php 6 files changed, 6 insertions(+), 67 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/i18n/en.json b/repo/i18n/en.json index 53133fe..30421da 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -502,7 +502,6 @@ "apihelp-wbgetclaims-param-claim": "A GUID identifying the claim. Required unless entity is provided. The GUID is the globally unique identifier for a claim, e.g. \"q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F\".", "apihelp-wbgetclaims-param-rank": "Optional filter to return only the claims that have the specified rank", "apihelp-wbgetclaims-param-props": "Some parts of the claim are returned optionally. This parameter controls which ones are returned.", - "apihelp-wbgetclaims-param-ungroupedlist": "Do not group snaks by property ID", "apihelp-wbgetclaims-example-1": "Get claims for item with ID Q42", "apihelp-wbgetclaims-example-2": "Get claims for item with ID Q42 and property with ID P2", "apihelp-wbgetclaims-example-3": "Get claims for item with ID Q42 that are ranked as normal", @@ -516,7 +515,6 @@ "apihelp-wbgetentities-param-languages": "By default the internationalized values are returned in all available languages.\nThis parameter allows filtering these down to one or more languages by providing one or more language codes.", "apihelp-wbgetentities-param-languagefallback": "Apply language fallback for languages defined in the \"languages\" parameter, with the current context of API call.", "apihelp-wbgetentities-param-normalize": "Try to normalize the page title against the client site.\nThis only works if exactly one site and one page have been given.", - "apihelp-wbgetentities-param-ungroupedlist": "Do not group snaks by property ID.", "apihelp-wbgetentities-param-sitefilter": "Filter sitelinks in entities to those with these siteids.", "apihelp-wbgetentities-example-1": "Get entities with ID Q42 with all available attributes in all available languages", "apihelp-wbgetentities-example-2": "Get entities with ID P17 with all available attributes in all available languages", diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json index f52dc12..2cd9e5e 100644 --- a/repo/i18n/qqq.json +++ b/repo/i18n/qqq.json @@ -530,7 +530,6 @@ "apihelp-wbgetclaims-param-claim": "{{doc-apihelp-param|wbgetclaims|claim}}", "apihelp-wbgetclaims-param-rank": "{{doc-apihelp-param|wbgetclaims|rank}}", "apihelp-wbgetclaims-param-props": "{{doc-apihelp-param|wbgetclaims|props}}", - "apihelp-wbgetclaims-param-ungroupedlist": "{{doc-apihelp-param|wbgetclaims|ungroupedlist}}", "apihelp-wbgetclaims-example-1": "{{doc-apihelp-example|wbgetclaims}}", "apihelp-wbgetclaims-example-2": "{{doc-apihelp-example|wbgetclaims}}", "apihelp-wbgetclaims-example-3": "{{doc-apihelp-example|wbgetclaims}}", @@ -544,7 +543,6 @@ "apihelp-wbgetentities-param-languages": "{{doc-apihelp-param|wbgetentities|languages}}", "apihelp-wbgetentities-param-languagefallback": "{{doc-apihelp-param|wbgetentities|languagefallback}}", "apihelp-wbgetentities-param-normalize": "{{doc-apihelp-param|wbgetentities|normalize}}", - "apihelp-wbgetentities-param-ungroupedlist": "{{doc-apihelp-param|wbgetentities|ungroupedlist}}", "apihelp-wbgetentities-param-sitefilter": "{{doc-apihelp-param|wbgetentities|sitefilter}}", "apihelp-wbgetentities-example-1": "{{doc-apihelp-example|wbgetentities}}", "apihelp-wbgetentities-example-2": "{{doc-apihelp-example|wbgetentities}}", diff --git a/repo/includes/api/GetClaims.php b/repo/includes/api/GetClaims.php index fe63dff..6b96643 100644 --- a/repo/includes/api/GetClaims.php +++ b/repo/includes/api/GetClaims.php @@ -104,15 +104,6 @@ ); $entity = $entityRevision->getEntity(); - if ( $params['ungroupedlist'] ) { - $this->logFeatureUsage( 'action=wbgetclaims&ungroupedlist' ); - $this->resultBuilder->getOptions() - ->setOption( - SerializationOptions::OPT_GROUP_BY_PROPERTIES, - array() - ); - } -
[MediaWiki-commits] [Gerrit] Stop using LibSerializerFactory in GetClaimsTest - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Stop using LibSerializerFactory in GetClaimsTest .. Stop using LibSerializerFactory in GetClaimsTest Change-Id: Ieef15e0a2201a3a9472196563ff01c60f570eaf6 --- M repo/tests/phpunit/includes/api/GetClaimsTest.php 1 file changed, 31 insertions(+), 9 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/api/GetClaimsTest.php b/repo/tests/phpunit/includes/api/GetClaimsTest.php index acb9dca..a825131 100644 --- a/repo/tests/phpunit/includes/api/GetClaimsTest.php +++ b/repo/tests/phpunit/includes/api/GetClaimsTest.php @@ -3,22 +3,22 @@ namespace Wikibase\Test\Repo\Api; use ApiTestCase; +use DataValues\Serializers\DataValueSerializer; use DataValues\StringValue; use UsageException; -use Wikibase\DataModel\Claim\Claims; use Wikibase\DataModel\Entity\EntityDocument; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Entity\PropertyDataTypeLookup; use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\DataModel\SerializerFactory; use Wikibase\DataModel\Snak\PropertyNoValueSnak; use Wikibase\DataModel\Snak\PropertySomeValueSnak; use Wikibase\DataModel\Snak\PropertyValueSnak; use Wikibase\DataModel\Statement\Statement; +use Wikibase\DataModel\Statement\StatementList; use Wikibase\DataModel\Statement\StatementListProvider; use Wikibase\Lib\Serializers\ClaimSerializer; -use Wikibase\Lib\Serializers\SerializationOptions; -use Wikibase\Lib\Serializers\LibSerializerFactory; use Wikibase\Repo\WikibaseRepo; /** @@ -39,6 +39,21 @@ * @author Adam Shorland */ class GetClaimsTest extends ApiTestCase { + + /** +* @var SerializerFactory +*/ + private $serializerFactory; + + protected function setUp() { + parent::setUp(); + + $this->serializerFactory = new SerializerFactory( + new DataValueSerializer(), + SerializerFactory::OPTION_SERIALIZE_REFERENCE_SNAKS_WITHOUT_HASH + + SerializerFactory::OPTION_SERIALIZE_MAIN_SNAKS_WITHOUT_HASH + ); + } /** * @param EntityDocument $entity @@ -162,19 +177,26 @@ * @param Statement[] $statements */ public function doTestValidRequest( array $params, array $statements ) { - $claims = new Claims( $statements ); - $options = new SerializationOptions(); + $statements = new StatementList( $statements ); - $serializerFactory = new LibSerializerFactory( null, $this->getDataTypeLookup() ); - $serializer = $serializerFactory->newClaimsSerializer( $options ); - $serializer->setOptions( $options ); - $expected = $serializer->getSerialized( $claims ); + $serializer = $this->serializerFactory->newStatementListSerializer(); + $expected = $serializer->serialize( $statements ); list( $resultArray, ) = $this->doApiRequest( $params ); $this->assertInternalType( 'array', $resultArray, 'top level element is an array' ); $this->assertArrayHasKey( 'claims', $resultArray, 'top level element has a claims key' ); + // Assert that value mainsnaks have a datatype added + foreach ( $resultArray['claims'] as &$claimsByProperty ) { + foreach ( $claimsByProperty as &$claimArray ) { + if ( $claimArray['mainsnak']['snaktype'] === 'value' ) { + $this->assertArrayHasKey( 'datatype', $claimArray['mainsnak'] ); + unset( $claimArray['mainsnak']['datatype'] ); + } + } + } + $this->assertEquals( $expected, $resultArray['claims'] ); } -- To view, visit https://gerrit.wikimedia.org/r/226645 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieef15e0a2201a3a9472196563ff01c60f570eaf6 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: Bene Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: JanZerebecki Gerrit-Reviewer: Jeroen De Dauw Gerrit-Reviewer: Jonas Kress (WMDE) Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix wbgetclaims props parameter - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix wbgetclaims props parameter .. Fix wbgetclaims props parameter It looks like this param has existed, well, forever but it doesn't look like anything has been done with it before... Bug: T106899 Change-Id: I934e7eb6a18ab24d84f43fcde144189079654323 --- M repo/includes/api/GetClaims.php M repo/includes/api/ResultBuilder.php M repo/tests/phpunit/includes/api/ResultBuilderTest.php 3 files changed, 60 insertions(+), 2 deletions(-) Approvals: Bene: Looks good to me, approved Legoktm: Looks good to me, but someone else must approve Jonas Kress (WMDE): Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/repo/includes/api/GetClaims.php b/repo/includes/api/GetClaims.php index d87331c..fe63dff 100644 --- a/repo/includes/api/GetClaims.php +++ b/repo/includes/api/GetClaims.php @@ -114,7 +114,7 @@ } $claims = $this->getClaims( $entity, $guid ); - $this->resultBuilder->addClaims( $claims, null ); + $this->resultBuilder->addClaims( $claims, null, $params['props'] ); } private function validateParameters( array $params ) { @@ -254,6 +254,7 @@ 'references', ), self::PARAM_DFLT => 'references', + self::PARAM_ISMULTI => true, ), 'ungroupedlist' => array( self::PARAM_TYPE => 'boolean', diff --git a/repo/includes/api/ResultBuilder.php b/repo/includes/api/ResultBuilder.php index ed788ea..b301b4f 100644 --- a/repo/includes/api/ResultBuilder.php +++ b/repo/includes/api/ResultBuilder.php @@ -582,12 +582,24 @@ * * @param Claim[] $claims the labels to set in the result * @param array|string $path where the data is located +* @param array|string $props a list of fields to include, or "all" */ - public function addClaims( array $claims, $path ) { + public function addClaims( array $claims, $path, $props = 'all' ) { $claimsSerializer = $this->libSerializerFactory->newClaimsSerializer( $this->getOptions() ); $values = $claimsSerializer->getSerialized( new Claims( $claims ) ); + if ( is_array( $props ) && !in_array( 'references', $props ) ) { + $values = $this->modifier->modifyUsingCallback( + $values, + '*/*', + function ( $array ) { + unset( $array['references'] ); + return $array; + } + ); + } + // HACK: comply with ApiResult::setIndexedTagName $tag = isset( $values['_element'] ) ? $values['_element'] : 'claim'; $this->setList( $path, 'claims', $values, $tag ); diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php b/repo/tests/phpunit/includes/api/ResultBuilderTest.php index 538983f..e10f2ca 100644 --- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php +++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php @@ -1151,6 +1151,51 @@ $this->assertEquals( $expected, $data ); } + public function testAddClaimsNoProps() { + $result = $this->getDefaultResult(); + $path = array( 'entities', 'Q1' ); + + $statement = new Statement( + new PropertySomeValueSnak( new PropertyId( 'P12' ) ), + null, + new Referencelist( array( + new Reference( array( + new PropertyValueSnak( new PropertyId( 'P12' ), new StringValue( 'refSnakVal' ) ), + ) ), + ) ), + 'fooguidbar' + ); + + $expected = array( + 'entities' => array( + 'Q1' => array( + 'claims' => array( + 'P12' => array( + array( + 'id' => 'fooguidbar', + 'mainsnak' => array( + 'snaktype' => 'somevalue', + 'property' => 'P12', + ), +
[MediaWiki-commits] [Gerrit] Labs: Remove reboot-if-idmap - change (operations/puppet)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/227492 Change subject: Labs: Remove reboot-if-idmap .. Labs: Remove reboot-if-idmap The script reboot-if-idmap was needed for interactively disabling idmap. With that task resolved, it has no purpose anymore. Bug: T9 Change-Id: I19f5734c6290ca3175f33f0a561ee48f7bcb9b06 --- D files/nfs/reboot-if-idmap M manifests/role/labs.pp 2 files changed, 2 insertions(+), 54 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/92/227492/1 diff --git a/files/nfs/reboot-if-idmap b/files/nfs/reboot-if-idmap deleted file mode 100644 index 2cccadf..000 --- a/files/nfs/reboot-if-idmap +++ /dev/null @@ -1,46 +0,0 @@ -#! /bin/bash -# -# This simply tries to create a test file in /home -# and chown it to a numeric UID known to not exist -# on the labstore - this is known to fail iff -# idmap is currently enabled. -# - -testfile="/home/._._testfile" - -if [ -e $testfile ]; then -echo "$testfile: already exists\n" -exit 1 -fi - -trap "rm -f $testfile" 0 - -if ! touch $testfile 2>/dev/null; then -echo "$testfile: unable to create\n" -exit 1 -fi - -if ! chown 456 $testfile 2>/dev/null; then -# UID 456 picked because known to not be on labstore - -# Rather than reboot outright, try to unmount the NFS -# filesystems and unload the kernel module. This will -# fail if anything is using NFS but will prevent a -# needless reboot for instances that aren't actually -# using it at this time. - -if /bin/umount -a -t nfs 2>/dev/null; then -if /sbin/rmmod nfs 2>/dev/null; then -if /sbin/modprobe nfs 2>/dev/null; then -if /bin/mount -a -t nfs 2>/dev/null; then -echo "skipped - was able to reload the module" -exit 1 -fi -fi -fi -fi - -/sbin/reboot -echo "rebooting" -exit 0 -fi diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp index dfeb2b7..b690c43 100644 --- a/manifests/role/labs.pp +++ b/manifests/role/labs.pp @@ -167,15 +167,9 @@ ensure => absent, } -# This short script allows verifying whether an instance uses -# idmap and will reboot it if it does. It's meant to be invoked -# by salt, not automatically. - +# TODO: Remove after Puppet cycle. file { '/usr/local/sbin/reboot-if-idmap': -ensure => present, -owner => root, -mode => '0555', -source => 'puppet:///files/nfs/reboot-if-idmap', +ensure => absent, } # In production, we try to be punctilious about having Puppet manage -- To view, visit https://gerrit.wikimedia.org/r/227492 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I19f5734c6290ca3175f33f0a561ee48f7bcb9b06 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] role::maps::master: Import waterlines on init and then weekly - change (operations/puppet)
Jcrespo has submitted this change and it was merged. Change subject: role::maps::master: Import waterlines on init and then weekly .. role::maps::master: Import waterlines on init and then weekly Change-Id: Id2f35738fa2f4b1d6451134e06cf199bce5b69d6 --- M manifests/role/maps.pp A modules/osm/manifests/import_waterlines.pp M modules/osm/manifests/init.pp A modules/osm/templates/import_waterlines.erb 4 files changed, 63 insertions(+), 0 deletions(-) Approvals: Jcrespo: Verified; Looks good to me, approved diff --git a/manifests/role/maps.pp b/manifests/role/maps.pp index 139b3c2..b0c0cf4 100644 --- a/manifests/role/maps.pp +++ b/manifests/role/maps.pp @@ -5,6 +5,7 @@ include ::postgresql::master include ::postgresql::postgis include ::osm +include ::osm::import_waterlines include ::cassandra include ::role::kartotherian if $::realm == 'production' { diff --git a/modules/osm/manifests/import_waterlines.pp b/modules/osm/manifests/import_waterlines.pp new file mode 100644 index 000..1302f96 --- /dev/null +++ b/modules/osm/manifests/import_waterlines.pp @@ -0,0 +1,38 @@ +# Definition: osm::import_waterlines +# +# Sets up waterlines +# Parameters: +#* database - postgres database name +#* proxy - web proxy used for downloading shapefiles +class osm::import_waterlines ( +$database = 'gis', +$proxy = 'webproxy.eqiad.wmnet:8080' +) { +file { '/usr/local/bin/import_waterlines': +ensure => present, +owner => 'root', +group => 'root', +mode=> 0555, +content => template( 'osm/import_waterlines.erb' ), +} + +# Check if database exists +$shapeline_exists = "/usr/bin/psql -d ${database} --tuples-only -c \'SELECT table_name FROM information_schema.tables;\' | /bin/grep \'water_polygons\'" + +exec { 'import_waterlines': +command => '/usr/local/bin/import_waterlines', +user=> 'postgres', +unless => $shapeline_exists, +refreshonly => true, +} + +cron { 'import_waterlines': +ensure => present, +hour=> 17, +minute => 0, +weekday => 'Tue', +user=> 'postgres', +command => '/usr/local/bin/import_waterlines', +require => [File['/usr/local/bin/import_waterlines'], Class['osm']], +} +} diff --git a/modules/osm/manifests/init.pp b/modules/osm/manifests/init.pp index 8512ed1..f4c45c7 100644 --- a/modules/osm/manifests/init.pp +++ b/modules/osm/manifests/init.pp @@ -7,4 +7,11 @@ ]: ensure => $ensure, } + +file { '/srv/downloads': +ensure => 'directory', +owner => 'postgres', +group => 'postgres', +mode => 0755, +} } diff --git a/modules/osm/templates/import_waterlines.erb b/modules/osm/templates/import_waterlines.erb new file mode 100644 index 000..c19a4db --- /dev/null +++ b/modules/osm/templates/import_waterlines.erb @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e +cd /srv/downloads +curl -O -x <%= @proxy %> http://data.openstreetmapdata.com/water-polygons-split-3857.zip +unzip water-polygons-split-3857.zip +rm water-polygons-split-3857.zip +shp2pgsql -d -s 3857:900913 -g way water-polygons-split-3857/water_polygons.shp water_polygons_tmp | psql <%= @database %> +rm -rf water-polygons-split-3857 + +echo " + ALTER TABLE water_polygons_tmp OWNER TO osmimporter; + + BEGIN; + DROP TABLE IF EXISTS water_polygons; + ALTER TABLE water_polygons_tmp RENAME TO water_polygons; + COMMIT;" | psql <%= @database %> -- To view, visit https://gerrit.wikimedia.org/r/225702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id2f35738fa2f4b1d6451134e06cf199bce5b69d6 Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MaxSem Gerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: Jcrespo 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] Hygiene: Split off page content loading into two variants - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Split off page content loading into two variants .. Hygiene: Split off page content loading into two variants Currently they are using the same code. Will update in future patch to be different. Bug: T104714 Change-Id: I3dfa7b0e964bf8cdd9fc93b891debd7a00c82776 --- M wikipedia/src/androidTest/java/org/wikipedia/test/PageFetchTaskTests.java M wikipedia/src/main/java/org/wikipedia/ApiTask.java M wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java A wikipedia/src/main/java/org/wikipedia/page/fetch/Fetcher.java A wikipedia/src/main/java/org/wikipedia/page/fetch/LeadSectionFetcher.java A wikipedia/src/main/java/org/wikipedia/page/fetch/LeadSectionFetcherFactory.java A wikipedia/src/main/java/org/wikipedia/page/fetch/LeadSectionFetcherPHP.java A wikipedia/src/main/java/org/wikipedia/page/fetch/LeadSectionFetcherRB.java A wikipedia/src/main/java/org/wikipedia/page/fetch/OldSectionsFetchTask.java A wikipedia/src/main/java/org/wikipedia/page/fetch/RestSectionFetcher.java A wikipedia/src/main/java/org/wikipedia/page/fetch/RestSectionFetcherFactory.java A wikipedia/src/main/java/org/wikipedia/page/fetch/RestSectionFetcherPHP.java A wikipedia/src/main/java/org/wikipedia/page/fetch/RestSectionFetcherRB.java R wikipedia/src/main/java/org/wikipedia/page/fetch/SectionsFetcherPHP.java C wikipedia/src/main/java/org/wikipedia/page/fetch/SectionsFetcherRB.java M wikipedia/src/main/java/org/wikipedia/savedpages/RefreshSavedPageTask.java M wikipedia/src/main/java/org/wikipedia/settings/Prefs.java M wikipedia/src/main/java/org/wikipedia/widgets/WidgetProviderFeaturedPage.java 18 files changed, 272 insertions(+), 50 deletions(-) Approvals: Mholloway: Looks good to me, approved Niedzielski: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wikipedia/src/androidTest/java/org/wikipedia/test/PageFetchTaskTests.java b/wikipedia/src/androidTest/java/org/wikipedia/test/PageFetchTaskTests.java index 717dfa0..90a2ee3 100644 --- a/wikipedia/src/androidTest/java/org/wikipedia/test/PageFetchTaskTests.java +++ b/wikipedia/src/androidTest/java/org/wikipedia/test/PageFetchTaskTests.java @@ -7,7 +7,7 @@ import org.wikipedia.page.PageTitle; import org.wikipedia.Site; import org.wikipedia.page.Section; -import org.wikipedia.page.SectionsFetchTask; +import org.wikipedia.page.fetch.OldSectionsFetchTask; import java.util.List; import java.util.concurrent.CountDownLatch; @@ -40,7 +40,7 @@ @Override public void run() { final WikipediaApp app = WikipediaApp.getInstance(); -new SectionsFetchTask(app, new PageTitle(null, title, new Site("test.wikipedia.org")), "all") { +new OldSectionsFetchTask(app, new PageTitle(null, title, new Site("test.wikipedia.org")), "all") { @Override public void onFinish(List result) { assertNotNull(result); diff --git a/wikipedia/src/main/java/org/wikipedia/ApiTask.java b/wikipedia/src/main/java/org/wikipedia/ApiTask.java index 92240b0..6888a17 100644 --- a/wikipedia/src/main/java/org/wikipedia/ApiTask.java +++ b/wikipedia/src/main/java/org/wikipedia/ApiTask.java @@ -8,6 +8,7 @@ import org.mediawiki.api.json.ApiException; import org.mediawiki.api.json.ApiResult; import org.mediawiki.api.json.RequestBuilder; +import org.wikipedia.page.fetch.Fetcher; import org.wikipedia.concurrency.SaneAsyncTask; import org.wikipedia.util.NetworkUtils; import org.wikipedia.util.ThrowableUtil; @@ -19,7 +20,7 @@ import javax.net.ssl.SSLException; -public abstract class ApiTask extends SaneAsyncTask { +public abstract class ApiTask extends SaneAsyncTask implements Fetcher { private static final boolean VERBOSE = WikipediaApp.getInstance().isDevRelease(); private final Api api; @@ -73,10 +74,6 @@ protected ApiResult makeRequest(RequestBuilder builder) throws ApiException { return builder.get(); } - -public abstract RequestBuilder buildRequest(Api api); -public abstract T processResult(ApiResult result) throws Throwable; - private String buildUrl(String url, Map params) { Uri.Builder builder = new Uri.Builder().encodedPath(url); diff --git a/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java b/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java index 6daaa82..af704a2 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java +++ b/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java @@ -1,7 +1,9 @@ package org.wikipedia.page; import org.acra.ACRA; +import org.wikipedia.ApiTask; import org.wikipedia.R; +import org.wikipedia.Site; import org.wikipedia.Utils; import org.wikipedia.WikipediaApp; import org.wikipedia.bridge.CommunicationBridg
[MediaWiki-commits] [Gerrit] Fix typo: requiered -> required - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix typo: requiered -> required .. Fix typo: requiered -> required Thanks to Ricordisamoa Follow-Up: I095c545f77aa50d6be4cd48588bd1ae1c82cf343 Change-Id: I3c40b02865170ba0391f3637a5bebb6058c053fd --- M includes/installer/Installer.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index c4a9b76..662469b 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -539,7 +539,7 @@ $wgAutoloadClasses = array(); // LocalSettings.php should not call functions, except wfLoadSkin/wfLoadExtensions - // Define the requiered globals here, to ensure, the functions can do it work correctly. + // Define the required globals here, to ensure, the functions can do it work correctly. global $wgExtensionDirectory, $wgStyleDirectory; MediaWiki\suppressWarnings(); -- To view, visit https://gerrit.wikimedia.org/r/227485 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c40b02865170ba0391f3637a5bebb6058c053fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Waldir Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up the messages-posted and moderation-actions queries - change (analytics/limn-flow-data)
Matthias Mullie has submitted this change and it was merged. Change subject: Clean up the messages-posted and moderation-actions queries .. Clean up the messages-posted and moderation-actions queries * Compute the week in two steps * Human-readable column names * Correct weekstart computation Change-Id: I7f08359228477acd70d16e16b53ab6e48257f151 --- M flow/messages-posted.sql M flow/moderation-actions.sql 2 files changed, 28 insertions(+), 25 deletions(-) Approvals: Matthias Mullie: Verified; Looks good to me, approved diff --git a/flow/messages-posted.sql b/flow/messages-posted.sql index 89e1611..fa0c7d9 100644 --- a/flow/messages-posted.sql +++ b/flow/messages-posted.sql @@ -1,7 +1,12 @@ -SELECT DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000), interval DAYOFWEEK( FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) day)) as weekstart, - count( rev_id ) as num_replies - FROM flow_revision - WHERE rev_change_type = 'reply' - AND rev_user_wiki NOT IN ( 'testwiki', 'test2wiki' ) - GROUP BY weekstart - HAVING weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW()) day); +SELECT + DATE_SUB(d, interval DAYOFWEEK(d)-1 day) AS Week, + COUNT(*) AS Replies +FROM ( + SELECT DATE(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) AS d + FROM flow_revision + WHERE rev_change_type = 'reply' + AND rev_user_wiki NOT IN ('testwiki', 'test2wiki') +) x +GROUP BY Week +HAVING Week < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW())-1 day) +ORDER BY Week; diff --git a/flow/moderation-actions.sql b/flow/moderation-actions.sql index 7e92d88..b25ccbe 100644 --- a/flow/moderation-actions.sql +++ b/flow/moderation-actions.sql @@ -1,18 +1,16 @@ - select weekstart as Date, -sum(if(rev_change_type = 'restore-post', 1, 0)) as "Restore Post", -sum(if(rev_change_type = 'hide-post', 1, 0)) as "Hide Post", -sum(if(rev_change_type = 'delete-post', 1, 0)) as "Delete Post", -sum(if(rev_change_type = 'restore-topic', 1, 0)) as "Restore Topic", -sum(if(rev_change_type = 'hide-topic', 1, 0)) as "Hide Topic", -sum(if(rev_change_type = 'delete-topic', 1, 0)) as "Delete Topic" - - from (select DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000), interval DAYOFWEEK( FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) day)) as weekstart, -rev_change_type - from flow_revision - where rev_user_wiki not in ('testwiki', 'test2wiki') -) change_type_by_week - - where weekstart > DATE_SUB(CURDATE(), INTERVAL 12 WEEK) - and weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW()) day) - group by weekstart - order by weekstart +SELECT + DATE_SUB(d, interval DAYOFWEEK(d)-1 day) AS Week, + SUM(IF(rev_change_type = 'restore-post', 1, 0)) AS "Restore Post", + SUM(IF(rev_change_type = 'hide-post', 1, 0)) AS "Hide Post", + SUM(IF(rev_change_type = 'delete-post', 1, 0)) AS "Delete Post", + SUM(IF(rev_change_type = 'restore-topic', 1, 0)) AS "Restore Topic", + SUM(IF(rev_change_type = 'hide-topic', 1, 0)) AS "Hide Topic", + SUM(IF(rev_change_type = 'delete-topic', 1, 0)) AS "Delete Topic" +FROM ( + SELECT DATE(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) AS d, rev_change_type + FROM flow_revision + WHERE rev_user_wiki NOT IN ('testwiki', 'test2wiki') +) AS x +GROUP BY Week +HAVING Week < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW())-1 day) +ORDER BY Week; -- To view, visit https://gerrit.wikimedia.org/r/227399 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f08359228477acd70d16e16b53ab6e48257f151 Gerrit-PatchSet: 1 Gerrit-Project: analytics/limn-flow-data Gerrit-Branch: master Gerrit-Owner: Catrope Gerrit-Reviewer: Matthias Mullie Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Springle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correct weekstart computation in the remaining queries - change (analytics/limn-flow-data)
Matthias Mullie has submitted this change and it was merged. Change subject: Correct weekstart computation in the remaining queries .. Correct weekstart computation in the remaining queries Change-Id: If708233ea096f13b79bc44ed860533ccd9cc80a7 --- M flow/active-boards.sql M flow/active-topics.sql 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Matthias Mullie: Verified; Looks good to me, approved diff --git a/flow/active-boards.sql b/flow/active-boards.sql index f4efe81..0d9d83a 100644 --- a/flow/active-boards.sql +++ b/flow/active-boards.sql @@ -3,7 +3,7 @@ FROM flow_workflow JOIN ( SELECT a.tree_ancestor_id, - DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000), interval DAYOFWEEK( FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000)) day)) as weekstart + DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000), interval DAYOFWEEK( FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000))-1 day)) as weekstart FROM flow_tree_node a JOIN ( SELECT b.tree_descendant_id, MAX(b.tree_depth) as max @@ -12,5 +12,5 @@ ) y ON y.max = a.tree_depth AND y.tree_descendant_id = a.tree_descendant_id ) z ON z.tree_ancestor_id = workflow_id WHERE workflow_wiki NOT IN ( 'testwiki', 'test2wiki' ) - AND weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW()) day) + AND weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW())-1 day) GROUP BY z.weekstart; diff --git a/flow/active-topics.sql b/flow/active-topics.sql index e1c8887..3fdc365 100644 --- a/flow/active-topics.sql +++ b/flow/active-topics.sql @@ -2,7 +2,7 @@ FROM flow_workflow JOIN ( SELECT a.tree_ancestor_id, - DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000), interval DAYOFWEEK( FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000)) day)) as weekstart + DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000), interval DAYOFWEEK( FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000))-1 day)) as weekstart FROM flow_tree_node a JOIN ( SELECT b.tree_descendant_id, MAX(b.tree_depth) as max @@ -11,5 +11,5 @@ ) y ON y.max = a.tree_depth AND y.tree_descendant_id = a.tree_descendant_id ) z ON z.tree_ancestor_id = workflow_id WHERE workflow_wiki NOT IN ( 'testwiki', 'test2wiki' ) - AND weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW()) day) + AND weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW())-1 day) GROUP BY z.weekstart; -- To view, visit https://gerrit.wikimedia.org/r/227400 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If708233ea096f13b79bc44ed860533ccd9cc80a7 Gerrit-PatchSet: 1 Gerrit-Project: analytics/limn-flow-data Gerrit-Branch: master Gerrit-Owner: Catrope Gerrit-Reviewer: Matthias Mullie Gerrit-Reviewer: Springle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix unique-users query - change (analytics/limn-flow-data)
Matthias Mullie has submitted this change and it was merged. Change subject: Fix unique-users query .. Fix unique-users query The way it was using GROUP BY was breaking things somehow. This may have been related to rev_user_ip being NULL for logged-in users, or maybe GROUP BY is just weird. COUNT(DISTINCT rev_user_id, rev_user_ip, rev_user_wiki) also doesn't work because that drops any row where any of those fields is NULL; but COALESCE()ing the nullable field fixes that. Bonus: Renamed fields to readable names, and fixed weekstart value to be the actual day the week starts (Sunday), rather than the day before (Saturday) which isn't even part of the week in question! Bug: T106564 Change-Id: I3d08c7d6b7367103aacf1c906ebe62da9dc99759 --- M flow/unique-users.sql 1 file changed, 11 insertions(+), 12 deletions(-) Approvals: Matthias Mullie: Verified; Looks good to me, approved diff --git a/flow/unique-users.sql b/flow/unique-users.sql index 4b933fa..e5ebef7 100644 --- a/flow/unique-users.sql +++ b/flow/unique-users.sql @@ -1,12 +1,11 @@ -SELECT weekstart, - SUM(user) as unique_users - FROM ( -SELECT 1 as user, - DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000), interval DAYOFWEEK( FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) day)) as weekstart - FROM flow_revision - WHERE rev_user_wiki NOT IN ( 'testwiki', 'test2wiki' ) - GROUP BY rev_user_wiki, rev_user_id, rev_user_ip - ) x - WHERE weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW()) day) - GROUP BY weekstart; - +SELECT + DATE_SUB(d, interval DAYOFWEEK(d)-1 day) AS Week, + COUNT(DISTINCT rev_user_id, COALESCE(rev_user_ip, ''), rev_user_wiki) AS "Unique users" +FROM ( + SELECT DATE(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) AS d, rev_user_id, rev_user_ip, rev_user_wiki + FROM flow_revision + WHERE rev_user_wiki NOT IN ('testwiki', 'test2wiki') +) AS x +GROUP BY Week +HAVING Week < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW())-1 day) +ORDER BY Week; -- To view, visit https://gerrit.wikimedia.org/r/227398 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d08c7d6b7367103aacf1c906ebe62da9dc99759 Gerrit-PatchSet: 1 Gerrit-Project: analytics/limn-flow-data Gerrit-Branch: master Gerrit-Owner: Catrope Gerrit-Reviewer: Matthias Mullie ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow up to Ied1db3f, use lazyPush, remove unused imports, ... - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/227491 Change subject: Follow up to Ied1db3f, use lazyPush, remove unused imports, etc. .. Follow up to Ied1db3f, use lazyPush, remove unused imports, etc. Change-Id: If209bbeb8871a3ac9e6c45b3258006a6b45bbad5 --- M client/includes/Hooks/DataUpdateHookHandlers.php M client/includes/Usage/EntityUsage.php 2 files changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/91/227491/1 diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php b/client/includes/Hooks/DataUpdateHookHandlers.php index 42d9d78..27fb64c 100644 --- a/client/includes/Hooks/DataUpdateHookHandlers.php +++ b/client/includes/Hooks/DataUpdateHookHandlers.php @@ -4,7 +4,6 @@ use Content; use JobQueueGroup; -use JobSpecification; use LinksUpdate; use ManualLogEntry; use ParserCache; @@ -14,7 +13,6 @@ use User; use Wikibase\Client\Store\AddUsagesForPageJob; use Wikibase\Client\Store\UsageUpdater; -use Wikibase\Client\Usage\EntityUsage; use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\Client\WikibaseClient; use WikiPage; @@ -162,7 +160,7 @@ * Implemented to update usage tracking information via UsageUpdater. * * @param ParserOutput $parserOutput -* @param $title $title +* @param Title $title */ public function doParserCacheSaveComplete( ParserOutput $parserOutput, Title $title ) { $usageAcc = new ParserOutputUsageAccumulator( $parserOutput ); @@ -186,7 +184,7 @@ //TODO: Before posting a job, check slave database. If no changes are needed, skip update. $addUsagesForPageJob = AddUsagesForPageJob::newSpec( $title, $usageAcc->getUsages(), $touched ); - $this->jobScheduler->push( $addUsagesForPageJob ); + $this->jobScheduler->lazyPush( $addUsagesForPageJob ); } /** diff --git a/client/includes/Usage/EntityUsage.php b/client/includes/Usage/EntityUsage.php index ba6938e..864efce 100644 --- a/client/includes/Usage/EntityUsage.php +++ b/client/includes/Usage/EntityUsage.php @@ -4,7 +4,6 @@ use InvalidArgumentException; use Wikibase\DataModel\Entity\EntityId; -use Wikibase\DataModel\Entity\EntityIdParsingException; /** * Value object representing the usage of an entity. This includes information about -- To view, visit https://gerrit.wikimedia.org/r/227491 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If209bbeb8871a3ac9e6c45b3258006a6b45bbad5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix content-type for new firefoxos manifest URL - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Fix content-type for new firefoxos manifest URL .. Fix content-type for new firefoxos manifest URL Bug: T107165 Change-Id: I7d02356d55c384ac15d2c03fbea673098b614ec0 --- M modules/mediawiki/files/apache/sites/remnant.conf 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Dr0ptp4kt: Looks good to me, but someone else must approve BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/mediawiki/files/apache/sites/remnant.conf b/modules/mediawiki/files/apache/sites/remnant.conf index f59c3a6..392e9d3 100644 --- a/modules/mediawiki/files/apache/sites/remnant.conf +++ b/modules/mediawiki/files/apache/sites/remnant.conf @@ -14,6 +14,9 @@ # Uploads are offsite RewriteRule ^/upload/(.*)$ %{ENV:RW_PROTO}://upload.wikimedia.org/wikipedia/meta/$1 [R=302] + +# Used for Firefox OS web application manifest living on meta.wikimedia.org +AddType application/x-web-app-manifest+json .webapp # Wikisource -- To view, visit https://gerrit.wikimedia.org/r/227486 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d02356d55c384ac15d2c03fbea673098b614ec0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack Gerrit-Reviewer: BBlack Gerrit-Reviewer: Dr0ptp4kt Gerrit-Reviewer: Jhobs 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] Syncronize VisualEditor: 7b787de..b9149e3 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/227490 Change subject: Syncronize VisualEditor: 7b787de..b9149e3 .. Syncronize VisualEditor: 7b787de..b9149e3 Change-Id: I1c15df43f705e0ebcae03e312a9bc58850d2ef37 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/90/227490/1 diff --git a/VisualEditor b/VisualEditor index 7b787de..b9149e3 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 7b787deb324ebc371421c74d4d3cf959bf70f226 +Subproject commit b9149e35e3ea0ff56206f3a104c8a349ad968138 -- To view, visit https://gerrit.wikimedia.org/r/227490 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c15df43f705e0ebcae03e312a9bc58850d2ef37 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 7b787de..b9149e3 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 7b787de..b9149e3 .. Syncronize VisualEditor: 7b787de..b9149e3 Change-Id: I1c15df43f705e0ebcae03e312a9bc58850d2ef37 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 7b787de..b9149e3 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 7b787deb324ebc371421c74d4d3cf959bf70f226 +Subproject commit b9149e35e3ea0ff56206f3a104c8a349ad968138 -- To view, visit https://gerrit.wikimedia.org/r/227490 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c15df43f705e0ebcae03e312a9bc58850d2ef37 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VE core submodule to master (cb14f66) - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Update VE core submodule to master (cb14f66) .. Update VE core submodule to master (cb14f66) New changes: adaa490 Localisation updates from https://translatewiki.net. 3e9e89c Localisation updates from https://translatewiki.net. e166731 Localisation updates from https://translatewiki.net. cb14f66 ContextItem: Update documentation, code to show that model is optional Change-Id: If6072bc1b72c9676d3c8a74b9ecba4c8aaf58f50 --- M lib/ve 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/ve b/lib/ve index a6dabf8..cb14f66 16 --- a/lib/ve +++ b/lib/ve -Subproject commit a6dabf8fe4c06c897e15022f3f34f0db8d8987b7 +Subproject commit cb14f66f50ace8069ba3646293cb27069b30f24c -- To view, visit https://gerrit.wikimedia.org/r/227487 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6072bc1b72c9676d3c8a74b9ecba4c8aaf58f50 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Phabricator: Fetch all references in Git - change (operations/puppet)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/227489 Change subject: Phabricator: Fetch all references in Git .. Phabricator: Fetch all references in Git I'm not 100% sure on the syntax, yet. Change-Id: I1a4c2cb727d3d8fbd586709ffd8a47857e60dfcd --- M modules/phabricator/files/system.gitconfig 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/89/227489/1 diff --git a/modules/phabricator/files/system.gitconfig b/modules/phabricator/files/system.gitconfig index 2cc9362..b04b18f 100644 --- a/modules/phabricator/files/system.gitconfig +++ b/modules/phabricator/files/system.gitconfig @@ -1,2 +1,4 @@ [http] proxy = http://url-downloader.wikimedia.org:8080/ +[remote "*"] + fetch = +refs/* -- To view, visit https://gerrit.wikimedia.org/r/227489 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a4c2cb727d3d8fbd586709ffd8a47857e60dfcd 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] Phabricator: Setup git config for all repositories - change (operations/puppet)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/227488 Change subject: Phabricator: Setup git config for all repositories .. Phabricator: Setup git config for all repositories Start with HTTP proxy setting, so we can properly replicate to Github Change-Id: I00172a9f75a7e928b27f3ceae099424078995096 --- A modules/phabricator/files/system.gitconfig M modules/phabricator/manifests/vcs.pp 2 files changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/88/227488/1 diff --git a/modules/phabricator/files/system.gitconfig b/modules/phabricator/files/system.gitconfig new file mode 100644 index 000..2cc9362 --- /dev/null +++ b/modules/phabricator/files/system.gitconfig @@ -0,0 +1,2 @@ +[http] + proxy = http://url-downloader.wikimedia.org:8080/ diff --git a/modules/phabricator/manifests/vcs.pp b/modules/phabricator/manifests/vcs.pp index bdc65e3..2e897b0 100644 --- a/modules/phabricator/manifests/vcs.pp +++ b/modules/phabricator/manifests/vcs.pp @@ -14,6 +14,11 @@ require => Package['git-core'], } +# Configure all git repositories we host +file { '/etc/gitconfig': +source => 'puppet:///modules/phabricator/system.gitconfig', +require => Package['git-core'], +} user { $settings['diffusion.ssh-user']: home => "/var/lib/${settings['diffusion.ssh-user']}", -- To view, visit https://gerrit.wikimedia.org/r/227488 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00172a9f75a7e928b27f3ceae099424078995096 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] Update VE core submodule to master (cb14f66) - change (mediawiki...VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/227487 Change subject: Update VE core submodule to master (cb14f66) .. Update VE core submodule to master (cb14f66) New changes: adaa490 Localisation updates from https://translatewiki.net. 3e9e89c Localisation updates from https://translatewiki.net. e166731 Localisation updates from https://translatewiki.net. cb14f66 ContextItem: Update documentation, code to show that model is optional Change-Id: If6072bc1b72c9676d3c8a74b9ecba4c8aaf58f50 --- M lib/ve 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/87/227487/1 diff --git a/lib/ve b/lib/ve index a6dabf8..cb14f66 16 --- a/lib/ve +++ b/lib/ve -Subproject commit a6dabf8fe4c06c897e15022f3f34f0db8d8987b7 +Subproject commit cb14f66f50ace8069ba3646293cb27069b30f24c -- To view, visit https://gerrit.wikimedia.org/r/227487 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6072bc1b72c9676d3c8a74b9ecba4c8aaf58f50 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix content-type for new firefoxos manifest URL - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/227486 Change subject: Fix content-type for new firefoxos manifest URL .. Fix content-type for new firefoxos manifest URL Bug: T107165 Change-Id: I7d02356d55c384ac15d2c03fbea673098b614ec0 --- M modules/mediawiki/files/apache/sites/remnant.conf 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/86/227486/1 diff --git a/modules/mediawiki/files/apache/sites/remnant.conf b/modules/mediawiki/files/apache/sites/remnant.conf index f59c3a6..392e9d3 100644 --- a/modules/mediawiki/files/apache/sites/remnant.conf +++ b/modules/mediawiki/files/apache/sites/remnant.conf @@ -14,6 +14,9 @@ # Uploads are offsite RewriteRule ^/upload/(.*)$ %{ENV:RW_PROTO}://upload.wikimedia.org/wikipedia/meta/$1 [R=302] + +# Used for Firefox OS web application manifest living on meta.wikimedia.org +AddType application/x-web-app-manifest+json .webapp # Wikisource -- To view, visit https://gerrit.wikimedia.org/r/227486 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d02356d55c384ac15d2c03fbea673098b614ec0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ContextItem: Update documentation, code to show that model i... - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: ContextItem: Update documentation, code to show that model is optional .. ContextItem: Update documentation, code to show that model is optional Bug: T107102 Change-Id: I7352065cec33a5f9a9927ca2e25334d0b8d2925d --- M src/ui/ve.ui.ContextItem.js 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ui/ve.ui.ContextItem.js b/src/ui/ve.ui.ContextItem.js index 56ce159..e24c5af 100644 --- a/src/ui/ve.ui.ContextItem.js +++ b/src/ui/ve.ui.ContextItem.js @@ -15,7 +15,7 @@ * * @constructor * @param {ve.ui.Context} context Context item is in - * @param {ve.dm.Model} model Model item is related to + * @param {ve.dm.Model} [model] Model item is related to * @param {Object} [config] Configuration options * @cfg {boolean} [basic] Render only basic information */ @@ -156,7 +156,7 @@ * @return {boolean} Item is editable */ ve.ui.ContextItem.prototype.isEditable = function () { - return this.constructor.static.editable && this.model.isEditable(); + return this.constructor.static.editable && ( !this.model || this.model.isEditable() ); }; /** @@ -176,7 +176,7 @@ ve.ui.ContextItem.prototype.getFragment = function () { if ( !this.fragment ) { var surfaceModel = this.context.getSurface().getModel(); - this.fragment = this.model instanceof ve.dm.Node ? + this.fragment = this.model && this.model instanceof ve.dm.Node ? surfaceModel.getLinearFragment( this.model.getOuterRange() ) : surfaceModel.getFragment(); } -- To view, visit https://gerrit.wikimedia.org/r/227434 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7352065cec33a5f9a9927ca2e25334d0b8d2925d Gerrit-PatchSet: 2 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo: requiered -> required - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/227485 Change subject: Fix typo: requiered -> required .. Fix typo: requiered -> required Thanks to Ricordisamoa Follow-Up: I095c545f77aa50d6be4cd48588bd1ae1c82cf343 Change-Id: I3c40b02865170ba0391f3637a5bebb6058c053fd --- M includes/installer/Installer.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/85/227485/1 diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index c4a9b76..662469b 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -539,7 +539,7 @@ $wgAutoloadClasses = array(); // LocalSettings.php should not call functions, except wfLoadSkin/wfLoadExtensions - // Define the requiered globals here, to ensure, the functions can do it work correctly. + // Define the required globals here, to ensure, the functions can do it work correctly. global $wgExtensionDirectory, $wgStyleDirectory; MediaWiki\suppressWarnings(); -- To view, visit https://gerrit.wikimedia.org/r/227485 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c40b02865170ba0391f3637a5bebb6058c053fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Init commit - change (pywikibot/wikibase)
Ladsgroup has submitted this change and it was merged. Change subject: Init commit .. Init commit Codes moved from pywikibot/core. Change-Id: I3aa14b0fa0083c855bb1d7773bb6898db8d13b3f --- A README.rst A pywikibase/__init__.py A pywikibase/claim.py A pywikibase/coordinate.py A pywikibase/exceptions.py A pywikibase/itempage.py A pywikibase/propertypage.py A pywikibase/wbproperty.py A pywikibase/wbquantity.py A pywikibase/wbtime.py A pywikibase/wikibasepage.py 11 files changed, 1,298 insertions(+), 0 deletions(-) Approvals: Ladsgroup: Verified; Looks good to me, approved diff --git a/README.rst b/README.rst new file mode 100644 index 000..281af27 --- /dev/null +++ b/README.rst @@ -0,0 +1,6 @@ +pywikibase is the library designed to handle DataModel of Wikiabse. + +It was forked from pywikibot-core in 28 July 2015. + +Credits of this code belong to pywikibot team. +pywikibase and pywikibot are distributed under MIT license. diff --git a/pywikibase/__init__.py b/pywikibase/__init__.py new file mode 100644 index 000..91cc203 --- /dev/null +++ b/pywikibase/__init__.py @@ -0,0 +1,12 @@ +from coordinate import Coordinate +from wbtime import WbTime +from wbquantity import WbQuantity +from itempage import ItemPage +from wbproperty import Property +from propertypage import PropertyPage +from wikibasepage import WikibasePage +from claim import Claim + +# Not to mess with pyflakes +__all__ = (Coordinate, WbQuantity, WbTime, ItemPage, Property, PropertyPage, + WikibasePage, Claim) diff --git a/pywikibase/claim.py b/pywikibase/claim.py new file mode 100644 index 000..5d40fcd --- /dev/null +++ b/pywikibase/claim.py @@ -0,0 +1,424 @@ +# -*- coding: utf-8 -*- +""" +Handling claims in a Wikibase entity. +""" + +# +# (C) Pywikibot team, 2008-2015 +# +# Distributed under the terms of the MIT license. +# +from __future__ import unicode_literals +from collections import defaultdict, OrderedDict + +from coordinate import Coordinate +from wbtime import WbTime +from wbquantity import WbQuantity +from itempage import ItemPage +from wbproperty import Property + + +class Claim(Property): + +""" +A Claim on a Wikibase entity. + +Claims are standard claims as well as references. +""" + +TARGET_CONVERTER = { +'wikibase-item': lambda value, site: +ItemPage(site, 'Q' + str(value['numeric-id'])), +'globe-coordinate': Coordinate.fromWikibase, +'time': lambda value, site: WbTime.fromWikibase(value), +'quantity': lambda value, site: WbQuantity.fromWikibase(value), +} + +def __init__(self, site, pid, snak=None, hash=None, isReference=False, + isQualifier=False, **kwargs): +""" +Constructor. + +Defined by the "snak" value, supplemented by site + pid + +@param site: repository the claim is on +@type site: pywikibot.site.DataSite or None +@param pid: property id, with "P" prefix +@param snak: snak identifier for claim +@param hash: hash identifier for references +@param isReference: whether specified claim is a reference +@param isQualifier: whether specified claim is a qualifier +""" +Property.__init__(self, site, pid, **kwargs) +self.snak = snak +self.hash = hash +self.isReference = isReference +self.isQualifier = isQualifier +if self.isQualifier and self.isReference: +raise ValueError( +u'Claim cannot be both a qualifier and reference.') +self.sources = [] +self.qualifiers = OrderedDict() +self.target = None +self.snaktype = 'value' +self.rank = 'normal' +self.on_item = None # The item it's on + +@classmethod +def fromJSON(cls, site, data): +""" +Create a claim object from JSON returned in the API call. + +@param data: JSON containing claim data +@type data: dict + +@return: Claim +""" +claim = cls(site, data['mainsnak']['property'], +datatype=data['mainsnak'].get('datatype', None)) +if 'id' in data: +claim.snak = data['id'] +elif 'hash' in data: +claim.isReference = True +claim.hash = data['hash'] +else: +claim.isQualifier = True +claim.snaktype = data['mainsnak']['snaktype'] +if claim.getSnakType() == 'value': +value = data['mainsnak']['datavalue']['value'] +# The default covers string, url types +claim.target = Claim.TARGET_CONVERTER.get( +claim.type, lambda value, site: value)(value, site) +if 'rank' in data: # References/Qualifiers don't have ranks +claim.rank = data['rank'] +if 'references' in data: +for source in data['references']: +claim.sources.append(cls.referenceF
[MediaWiki-commits] [Gerrit] Downgrade log message for empty ffname - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Downgrade log message for empty ffname .. Downgrade log message for empty ffname Links to specific gateways from e.g. Ways To Give don't necessarily have ffname specified, but we can figure out which one to show. Still logs an error if an invalid ffname is specified. Change-Id: Ic750486f94a0c4db8eb23bf3e8e83dbd23dc33ab --- M gateway_common/gateway.adapter.php 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index f834c10..be86a22 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -3470,15 +3470,21 @@ $message = "ffname '$ffname' was invalid, but the country-specific '$ffname-$country' works. utm_source = '$utm', referrer = '$ref'"; $this->logger->warning( $message ); } else { - //Invalid form. Go get one that is valid, and squak in the error logs. + //Invalid form. Go get one that is valid, and squawk in the error logs. $new_ff = GatewayFormChooser::getOneValidForm( $country, $currency, $payment_method, $payment_submethod, $recurring, $gateway ); $this->addRequestData( array ( 'ffname' => $new_ff ) ); //now construct a useful error message - $this->logger->error( - "ffname '{$ffname}' is invalid. Assigning ffname '{$new_ff}'. " . - "I currently am choosing for: " . $this->getLogDebugJSON() - ); + $message = "ffname '{$ffname}' is invalid. Assigning ffname '{$new_ff}'. " . + "I currently am choosing for: " . $this->getLogDebugJSON(); + + if ( empty( $ffname ) ) { + // Gateway-specific link didn't specify a form, but we have a + // default. Don't squawk too loud. + $this->logger->warning( $message ); + } else { + $this->logger->error( $message ); + } //Turn these off by setting the LogDebug global to false. $this->logger->debug( "GET: " . json_encode( $_GET ) ); -- To view, visit https://gerrit.wikimedia.org/r/227484 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic750486f94a0c4db8eb23bf3e8e83dbd23dc33ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg Gerrit-Reviewer: Awight Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Downgrade log message for empty ffname - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/227484 Change subject: Downgrade log message for empty ffname .. Downgrade log message for empty ffname Links to specific gateways from e.g. Ways To Give don't necessarily have ffname specified, but we can figure out which one to show. Still logs an error if an invalid ffname is specified. Change-Id: Ic750486f94a0c4db8eb23bf3e8e83dbd23dc33ab --- M gateway_common/gateway.adapter.php 1 file changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/84/227484/1 diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index f834c10..be86a22 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -3470,15 +3470,21 @@ $message = "ffname '$ffname' was invalid, but the country-specific '$ffname-$country' works. utm_source = '$utm', referrer = '$ref'"; $this->logger->warning( $message ); } else { - //Invalid form. Go get one that is valid, and squak in the error logs. + //Invalid form. Go get one that is valid, and squawk in the error logs. $new_ff = GatewayFormChooser::getOneValidForm( $country, $currency, $payment_method, $payment_submethod, $recurring, $gateway ); $this->addRequestData( array ( 'ffname' => $new_ff ) ); //now construct a useful error message - $this->logger->error( - "ffname '{$ffname}' is invalid. Assigning ffname '{$new_ff}'. " . - "I currently am choosing for: " . $this->getLogDebugJSON() - ); + $message = "ffname '{$ffname}' is invalid. Assigning ffname '{$new_ff}'. " . + "I currently am choosing for: " . $this->getLogDebugJSON(); + + if ( empty( $ffname ) ) { + // Gateway-specific link didn't specify a form, but we have a + // default. Don't squawk too loud. + $this->logger->warning( $message ); + } else { + $this->logger->error( $message ); + } //Turn these off by setting the LogDebug global to false. $this->logger->debug( "GET: " . json_encode( $_GET ) ); -- To view, visit https://gerrit.wikimedia.org/r/227484 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic750486f94a0c4db8eb23bf3e8e83dbd23dc33ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Init commit - change (pywikibot/wikibase)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/227483 Change subject: Init commit .. Init commit Codes moved from pywikibot/core. Change-Id: I3aa14b0fa0083c855bb1d7773bb6898db8d13b3f --- A README.rst A pywikibase/__init__.py A pywikibase/claim.py A pywikibase/coordinate.py A pywikibase/exceptions.py A pywikibase/itempage.py A pywikibase/propertypage.py A pywikibase/wbproperty.py A pywikibase/wbquantity.py A pywikibase/wbtime.py A pywikibase/wikibasepage.py 11 files changed, 1,298 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/wikibase refs/changes/83/227483/1 diff --git a/README.rst b/README.rst new file mode 100644 index 000..281af27 --- /dev/null +++ b/README.rst @@ -0,0 +1,6 @@ +pywikibase is the library designed to handle DataModel of Wikiabse. + +It was forked from pywikibot-core in 28 July 2015. + +Credits of this code belong to pywikibot team. +pywikibase and pywikibot are distributed under MIT license. diff --git a/pywikibase/__init__.py b/pywikibase/__init__.py new file mode 100644 index 000..91cc203 --- /dev/null +++ b/pywikibase/__init__.py @@ -0,0 +1,12 @@ +from coordinate import Coordinate +from wbtime import WbTime +from wbquantity import WbQuantity +from itempage import ItemPage +from wbproperty import Property +from propertypage import PropertyPage +from wikibasepage import WikibasePage +from claim import Claim + +# Not to mess with pyflakes +__all__ = (Coordinate, WbQuantity, WbTime, ItemPage, Property, PropertyPage, + WikibasePage, Claim) diff --git a/pywikibase/claim.py b/pywikibase/claim.py new file mode 100644 index 000..5d40fcd --- /dev/null +++ b/pywikibase/claim.py @@ -0,0 +1,424 @@ +# -*- coding: utf-8 -*- +""" +Handling claims in a Wikibase entity. +""" + +# +# (C) Pywikibot team, 2008-2015 +# +# Distributed under the terms of the MIT license. +# +from __future__ import unicode_literals +from collections import defaultdict, OrderedDict + +from coordinate import Coordinate +from wbtime import WbTime +from wbquantity import WbQuantity +from itempage import ItemPage +from wbproperty import Property + + +class Claim(Property): + +""" +A Claim on a Wikibase entity. + +Claims are standard claims as well as references. +""" + +TARGET_CONVERTER = { +'wikibase-item': lambda value, site: +ItemPage(site, 'Q' + str(value['numeric-id'])), +'globe-coordinate': Coordinate.fromWikibase, +'time': lambda value, site: WbTime.fromWikibase(value), +'quantity': lambda value, site: WbQuantity.fromWikibase(value), +} + +def __init__(self, site, pid, snak=None, hash=None, isReference=False, + isQualifier=False, **kwargs): +""" +Constructor. + +Defined by the "snak" value, supplemented by site + pid + +@param site: repository the claim is on +@type site: pywikibot.site.DataSite or None +@param pid: property id, with "P" prefix +@param snak: snak identifier for claim +@param hash: hash identifier for references +@param isReference: whether specified claim is a reference +@param isQualifier: whether specified claim is a qualifier +""" +Property.__init__(self, site, pid, **kwargs) +self.snak = snak +self.hash = hash +self.isReference = isReference +self.isQualifier = isQualifier +if self.isQualifier and self.isReference: +raise ValueError( +u'Claim cannot be both a qualifier and reference.') +self.sources = [] +self.qualifiers = OrderedDict() +self.target = None +self.snaktype = 'value' +self.rank = 'normal' +self.on_item = None # The item it's on + +@classmethod +def fromJSON(cls, site, data): +""" +Create a claim object from JSON returned in the API call. + +@param data: JSON containing claim data +@type data: dict + +@return: Claim +""" +claim = cls(site, data['mainsnak']['property'], +datatype=data['mainsnak'].get('datatype', None)) +if 'id' in data: +claim.snak = data['id'] +elif 'hash' in data: +claim.isReference = True +claim.hash = data['hash'] +else: +claim.isQualifier = True +claim.snaktype = data['mainsnak']['snaktype'] +if claim.getSnakType() == 'value': +value = data['mainsnak']['datavalue']['value'] +# The default covers string, url types +claim.target = Claim.TARGET_CONVERTER.get( +claim.type, lambda value, site: value)(value, site) +if 'rank' in data: # References/Qualifiers don't have ranks +claim.rank = data['rank'] +if 'references' in data: +for source in data['refere
[MediaWiki-commits] [Gerrit] Fix other RDF tests on Windows - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix other RDF tests on Windows .. Fix other RDF tests on Windows This fixes the normalization method in the test to also trim all resulting array elements. On windows I presume \r is left at the end of every element causing the tests to fail.. With this trim call the tests now pass on windows See https://gerrit.wikimedia.org/r/#/c/226508/ Change-Id: I29087376a7bdfc40de3549c7ad7cecb615c9ee3a --- M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php M repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php M repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php 3 files changed, 3 insertions(+), 0 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php index f34d128..1105f39 100644 --- a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php +++ b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php @@ -109,6 +109,7 @@ $data = $builder->getRDF(); $dataSplit = explode( "\n", trim( $data ) ); sort( $dataSplit ); + $dataSplit = array_map( 'trim', $dataSplit ); return $dataSplit; } diff --git a/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php b/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php index 90b9791..77ca78a 100644 --- a/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php +++ b/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php @@ -101,6 +101,7 @@ $data = trim( file_get_contents( $filename ) ); $data = explode( "\n", $data ); sort( $data ); + $data = array_map( 'trim', $data ); return $data; } diff --git a/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php b/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php index c222d1d..c9b7311 100644 --- a/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php +++ b/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php @@ -71,6 +71,7 @@ $lines = explode( "\n", trim( $ntriples ) ); sort( $lines ); + $lines = array_map( 'trim', $lines ); return $lines; } -- To view, visit https://gerrit.wikimedia.org/r/227479 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29087376a7bdfc40de3549c7ad7cecb615c9ee3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Bene Gerrit-Reviewer: Addshore Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] session_redis twemproxy pool: listen on TCP, not Unix domain... - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: session_redis twemproxy pool: listen on TCP, not Unix domain socket .. session_redis twemproxy pool: listen on TCP, not Unix domain socket UNIX domain sockets aren't supported by the HHVM port of phpredis. Change-Id: I459a97e70c3a7524a8871a173ad91a5d02eba31e --- M manifests/role/mediawiki.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp index 65c115e..5f0fb18 100644 --- a/manifests/role/mediawiki.pp +++ b/manifests/role/mediawiki.pp @@ -45,7 +45,7 @@ distribution => 'ketama', redis=> true, hash => 'md5', -listen => '/var/run/nutcracker/session_redis.sock 0666', +listen => '127.0.0.1:6379', preconnect => true, server_connections => 2, server_failure_limit => 3, -- To view, visit https://gerrit.wikimedia.org/r/227482 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I459a97e70c3a7524a8871a173ad91a5d02eba31e Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change Polish translation of Topic namespace - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Change Polish translation of Topic namespace .. Change Polish translation of Topic namespace In Polish, use of "topic" (temat) causes a pleonasm "topic title" (tytuł tematu). In pl-lang part of internet, the word "thread" (wątek) instead of "topic" (temat) is used in such cases. That word was used consistently in all translatewiki messages. The issue was discussed within Polish community. Change-Id: I57463d89da3c643a922905ef12dc739098c5f108 --- M Flow.namespaces.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/Flow.namespaces.php b/Flow.namespaces.php index a46409a..775efe9 100644 --- a/Flow.namespaces.php +++ b/Flow.namespaces.php @@ -86,7 +86,7 @@ /** Polish */ $namespaceNames['pl'] = array( - NS_TOPIC => 'Temat', + NS_TOPIC => 'Wątek', ); /** Portuguese */ -- To view, visit https://gerrit.wikimedia.org/r/227468 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57463d89da3c643a922905ef12dc739098c5f108 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Catrope Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Tar Lócesilion Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] session_redis twemproxy pool: listen on TCP, not Unix domain... - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/227482 Change subject: session_redis twemproxy pool: listen on TCP, not Unix domain socket .. session_redis twemproxy pool: listen on TCP, not Unix domain socket UNIX domain sockets aren't supported by the HHVM port of phpredis. Change-Id: I459a97e70c3a7524a8871a173ad91a5d02eba31e --- M manifests/role/mediawiki.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/82/227482/1 diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp index 65c115e..5f0fb18 100644 --- a/manifests/role/mediawiki.pp +++ b/manifests/role/mediawiki.pp @@ -45,7 +45,7 @@ distribution => 'ketama', redis=> true, hash => 'md5', -listen => '/var/run/nutcracker/session_redis.sock 0666', +listen => '127.0.0.1:6379', preconnect => true, server_connections => 2, server_failure_limit => 3, -- To view, visit https://gerrit.wikimedia.org/r/227482 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I459a97e70c3a7524a8871a173ad91a5d02eba31e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add HSTS preload for wikipedia.org, refactor related regexes - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Add HSTS preload for wikipedia.org, refactor related regexes .. Add HSTS preload for wikipedia.org, refactor related regexes At this point, all but one of our unified cert domains are "clean" in that they have no subdomains that don't match the certs to worry about. The odd man out is just wikimedia.org now, which still needs a special match to only catch the exact hostnames matching the cert. This patch aligns the primary regexes for TLS redirects and HSTS preload to be identical and match any hostname ending in any of our unified-cert domains other than wikimedia.org. wikimedia.org is moved to a separate clause for redirects, and takes the default in the HSTS case (no preload/includesub). Bug: T104244 Change-Id: If57e7110b6ec23abe26b2ecb3027017b073fa8a8 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 11 insertions(+), 3 deletions(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 2c626b5..15d4ab8 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -192,8 +192,15 @@ sub https_recv_redirect { if (req.request == "GET" || req.request == "HEAD") { if (req.http.X-Forwarded-Proto != "https") { - // This filter should exactly match our set of SSL cert wildcards - if (req.http.Host ~ "(?i)^([^.]+\.)?(zero\.wikipedia|(m\.)?(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimedia|wikimediafoundation|wiktionary|mediawiki))\.org$") { + // This is all of our unified cert wildcard domains which are TLS-clean (cert matches all extant hostnames within) + // The lone exception now is wikimedia.org, in the next block + if (req.http.Host ~ "(?i)^(^|\.)(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org$") { + set req.http.Location = "https://"; + req.http.Host + req.url; + error 751 "TLS Redirect"; + } + // wikimedia.org has multi-level subdomains used for HTTP for which we have no certs, so they must be avoided here: + // Ref: T102826 + T102827 + else if(req.http.Host ~ "(?i)^([^.]+\.)?(m\.)?wikimedia\.org$") { // For now, avoid matching commons for MW UAs. Ref: T102566 if (!(req.http.Host ~ "(?i)^commons\.wikimedia\.org$" && req.http.User-Agent ~ "^MediaWiki/")) { set req.http.Location = "https://"; + req.http.Host + req.url; @@ -221,7 +228,8 @@ // HSTS to reach a client, the client implicitly has to have already // successfully reached us over HTTPS for the given domainname. if (req.http.X-Forwarded-Proto == "https") { - if (req.http.Host ~ "(?i)(^|\.)(wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org$") { + // This is the same regex as the first one in https_recv_redirect (all unified except wikimedia.org) + if (req.http.Host ~ "(?i)(^|\.)(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org$") { set resp.http.Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"; } else { -- To view, visit https://gerrit.wikimedia.org/r/227455 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If57e7110b6ec23abe26b2ecb3027017b073fa8a8 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack Gerrit-Reviewer: BBlack Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] cassandra: add restbase1007 - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: cassandra: add restbase1007 .. cassandra: add restbase1007 this will include restbase1007 in the seeds and allow the host to talk to other nodes via firewall rules Bug: T102015 Change-Id: I1fe43a064e3a62089a2ae92e9d1a4622444f8a5c --- M conftool-data/nodes/eqiad.yaml M hieradata/role/common/cassandra.yaml M hieradata/role/common/restbase.yaml 3 files changed, 3 insertions(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved GWicke: Looks good to me, but someone else must approve diff --git a/conftool-data/nodes/eqiad.yaml b/conftool-data/nodes/eqiad.yaml index 50cfd14..b20e595 100644 --- a/conftool-data/nodes/eqiad.yaml +++ b/conftool-data/nodes/eqiad.yaml @@ -322,6 +322,7 @@ restbase1004.eqiad.wmnet: [restbase] restbase1005.eqiad.wmnet: [restbase] restbase1006.eqiad.wmnet: [restbase] + restbase1007.eqiad.wmnet: [restbase] elasticsearch: elastic1001.eqiad.wmnet: [elasticsearch] elastic1002.eqiad.wmnet: [elasticsearch] diff --git a/hieradata/role/common/cassandra.yaml b/hieradata/role/common/cassandra.yaml index 71b883b..1f3cbc1 100644 --- a/hieradata/role/common/cassandra.yaml +++ b/hieradata/role/common/cassandra.yaml @@ -11,6 +11,7 @@ - restbase1004.eqiad.wmnet - restbase1005.eqiad.wmnet - restbase1006.eqiad.wmnet +- restbase1007.eqiad.wmnet cassandra::max_heap_size: 16g # 1/4 heap size, no more than 100m/thread cassandra::heap_newsize: 2048m diff --git a/hieradata/role/common/restbase.yaml b/hieradata/role/common/restbase.yaml index 30e83fe..b85323d 100644 --- a/hieradata/role/common/restbase.yaml +++ b/hieradata/role/common/restbase.yaml @@ -9,6 +9,7 @@ - restbase1004.eqiad.wmnet - restbase1005.eqiad.wmnet - restbase1006.eqiad.wmnet +- restbase1007.eqiad.wmnet restbase::logstash_host: logstash1001.eqiad.wmnet restbase::cassandra_defaultConsistency: localQuorum restbase::cassandra_localDc: "%{::site}" -- To view, visit https://gerrit.wikimedia.org/r/227475 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1fe43a064e3a62089a2ae92e9d1a4622444f8a5c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi Gerrit-Reviewer: Eevans Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: GWicke Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove smart nowikier - change (mediawiki...parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/227481 Change subject: Remove smart nowikier .. Remove smart nowikier * Nowikis are expected to be rare and the original use case (which might have been valid back in the day) of trying to reduce the number of nowiki wrappers is no longer relevant. * A bit of noise in parserTests. The one new html2html failure is for a test that fails html2wt. Change-Id: I7aa00ee0020c5f69c3acb1cab069ceab77b75ab4 --- M lib/wts.escapeWikitext.js M tests/parserTests-blacklist.js M tests/parserTests.txt 3 files changed, 146 insertions(+), 114 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/81/227481/1 diff --git a/lib/wts.escapeWikitext.js b/lib/wts.escapeWikitext.js index b6d73c7..7c09872 100644 --- a/lib/wts.escapeWikitext.js +++ b/lib/wts.escapeWikitext.js @@ -379,8 +379,9 @@ /* * This function attempts to wrap smallest escapable units into * nowikis (which can potentially add multiple nowiki pairs in a - * single string). However, it does attempt to coalesce adjacent - * nowiki segments into a single nowiki wrapper. + * single string). The idea here is that since this should all be + * text, anything that tokenizes to another construct needs to be + * wrapped. * * Full-wrapping is enabled in the following cases: * - origText has url triggers (RFC, ISBN, etc.) @@ -391,15 +392,13 @@ var match = origText.match(/^((?:.*?|[\r\n]+[^\r\n]|[~]{3,5})*?)((?:\r?\n)*)$/); var text = match[1]; var nls = match[2]; - var nowikisAdded = false; - - // console.warn("SOL: " + sol + "; text: " + text); if (fullWrap) { return "" + text + "" + nls; } else { var buf = ''; var inNowiki = false; + var nowikisAdded = false; var tokensWithoutClosingTag = new Set([ // These token types don't come with a closing tag 'listItem', 'td', 'tr' @@ -414,40 +413,28 @@ var tokens = this.tokenizeStr(text, sol); tokens.pop(); - // Add nowikis intelligently - var smartNowikier = function(open, close, str, i, numToks) { - // Max length of string that gets "unnecessarily" - // sucked into a nowiki (40 is an arbitrary number) - var maxExcessWrapLength = 40; - + var nowikiWrap = function(str, open, close) { // If we are being asked to close a nowiki - // without opening one, we open a nowiki. + // without an opening one, we open it first. // // Ex: "" will parse to an end-tag if (open || (close && !inNowiki)) { if (!inNowiki) { - buf += ""; + buf += ''; inNowiki = true; nowikisAdded = true; } } - buf += str; - if (close) { - if ((i < numToks - 1 && tokens[i + 1].constructor === String && tokens[i + 1].length >= maxExcessWrapLength) || - (i === numToks - 2 && tokens[i + 1].constructor === String)) { - buf += ""; - inNowiki = false; - } + buf += ''; + inNowiki = false; } }; for (var i = 0, n = tokens.length; i < n; i++) { var t = tokens[i]; var tsr = (t.dataAttribs || {}).tsr; - - // console.warn("SOL: " + sol + "; T[" + i + "]=" + JSON.stringify(t)); // Ignore display hacks, so text like "A : B" doesn't produce // an unnecessary nowiki. @@ -459,22 +446,17 @@ case String: if (t.length > 0) { t = escape
[MediaWiki-commits] [Gerrit] Fix other RDF tests on Windows - change (mediawiki...Wikibase)
Bene has uploaded a new change for review. https://gerrit.wikimedia.org/r/227479 Change subject: Fix other RDF tests on Windows .. Fix other RDF tests on Windows This fixes the normalization method in the test to also trim all resulting array elements. On windows I presume \r is left at the end of every element causing the tests to fail.. With this trim call the tests now pass on windows See https://gerrit.wikimedia.org/r/#/c/226508/ Change-Id: I29087376a7bdfc40de3549c7ad7cecb615c9ee3a --- M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php M repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php M repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php 3 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/79/227479/1 diff --git a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php index f34d128..1105f39 100644 --- a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php +++ b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php @@ -109,6 +109,7 @@ $data = $builder->getRDF(); $dataSplit = explode( "\n", trim( $data ) ); sort( $dataSplit ); + $dataSplit = array_map( 'trim', $dataSplit ); return $dataSplit; } diff --git a/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php b/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php index 90b9791..77ca78a 100644 --- a/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php +++ b/repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php @@ -101,6 +101,7 @@ $data = trim( file_get_contents( $filename ) ); $data = explode( "\n", $data ); sort( $data ); + $data = array_map( 'trim', $data ); return $data; } diff --git a/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php b/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php index c222d1d..c9b7311 100644 --- a/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php +++ b/repo/tests/phpunit/includes/rdf/TruthyStatementsRdfBuilderTest.php @@ -71,6 +71,7 @@ $lines = explode( "\n", trim( $ntriples ) ); sort( $lines ); + $lines = array_map( 'trim', $lines ); return $lines; } -- To view, visit https://gerrit.wikimedia.org/r/227479 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29087376a7bdfc40de3549c7ad7cecb615c9ee3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Bene ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Add reverse suggestion field - change (mediawiki...CirrusSearch)
DCausse has uploaded a new change for review. https://gerrit.wikimedia.org/r/227478 Change subject: WIP: Add reverse suggestion field .. WIP: Add reverse suggestion field This patch removes the unused title.suggest and redirect.suggest and adds a new suggest_reverse field. It will help to detect typos in the first 2 characters of the word. WIP: because it requires more testing, and should fail with cindy because it requires a reindxing. Bug: T107006 Change-Id: If796b8524e2c124149c17d87715c4e141be47236 --- M CirrusSearch.php M includes/Maintenance/AnalysisConfigBuilder.php M includes/Maintenance/MappingConfigBuilder.php M includes/Searcher.php M tests/browser/features/did_you_mean_api.feature M tests/jenkins/FullyFeaturedConfig.php 6 files changed, 51 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/78/227478/1 diff --git a/CirrusSearch.php b/CirrusSearch.php index e8eea80..5bbd7ce 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -296,6 +296,17 @@ // (This is the minimal value) $wgCirrusSearchPhraseSuggestPrefixLengthHardLimit = 2; +// Use a reverse field to build the did you mean suggestions. +// This is usefull to workaround the prefix length limitation, by working with a reverse +// field we can suggest typos correction that appears in the first 2 characters of the word. +// i.e. Suggesting "search" if the user types "saerch" is possible with the reverse field. +// NOTE: if you have an index that has been built with mapping < 1.9 and analysis config < 0.11 +// you must first do an inplace reindex. +// An easy to check if your index is compatible with this setting is to use the link : +// http://mediawiki_url/w/api.php?action=cirrus-mapping-dump and check that you have a field +// named "suggest_reverse" listed in the mapping. +$wgCirrusSearchPhraseSuggestUseReverseField = false; + // Look for suggestions in the article text? Changing this from false to true will // break search until you perform an in place index rebuild. Changing it from true // to false is ok and then you can change it back to true so long as you _haven't_ diff --git a/includes/Maintenance/AnalysisConfigBuilder.php b/includes/Maintenance/AnalysisConfigBuilder.php index 57418ca..6d9e8e7 100644 --- a/includes/Maintenance/AnalysisConfigBuilder.php +++ b/includes/Maintenance/AnalysisConfigBuilder.php @@ -31,7 +31,7 @@ * and change the minor version when it changes but isn't * incompatible */ - const VERSION = '0.10'; + const VERSION = '0.11'; /** * Language code we're building analysis for @@ -107,6 +107,16 @@ 'tokenizer' => 'standard', 'filter' => array( 'standard', 'lowercase', 'suggest_shingle' ), ), + 'suggest_reverse' => array( + 'type' => 'custom', + 'tokenizer' => 'standard', + 'filter' => array( 'standard', 'lowercase', 'suggest_shingle', 'reverse' ), + ), + 'token_reverse' => array( + 'type' => 'custom', + 'tokenizer' => 'no_splitting', + 'filter' => array('reverse') + ), 'near_match' => array( 'type' => 'custom', 'tokenizer' => 'no_splitting', diff --git a/includes/Maintenance/MappingConfigBuilder.php b/includes/Maintenance/MappingConfigBuilder.php index 9260e2f..18a4be3 100644 --- a/includes/Maintenance/MappingConfigBuilder.php +++ b/includes/Maintenance/MappingConfigBuilder.php @@ -74,11 +74,9 @@ $wgCirrusSearchWeights, $wgCirrusSearchWikimediaExtraPlugin; - $suggestExtra = array( 'analyzer' => 'suggest' ); // Note never to set something as type='object' here because that isn't returned by elasticsearch // and is infered anyway. $titleExtraAnalyzers = array( - $suggestExtra, array( 'index_analyzer' => 'prefix', 'search_analyzer' => 'near_match', 'index_options' => 'docs' ), array( 'index_analyzer' => 'prefix_asciifolding', 'search_analyzer' => 'near_match_asciifolding', 'index_options' => 'docs' ), array( 'analyzer' => 'near_match', 'index_options' => 'docs' ), @@ -104,7 +102,6 @@ $textExtraAnalyzers = array(); $textOptions = MappingConfigBuilder::ENABLE_NORMS | MappingConfigBuilder::SPEED_UP_H
[MediaWiki-commits] [Gerrit] Add support for title of each field into NamespaceInputWidget - change (mediawiki/core)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/227476 Change subject: Add support for title of each field into NamespaceInputWidget .. Add support for title of each field into NamespaceInputWidget Each field can have it's own title attribute to give further information about the field. Depends on: I0bdb599faf40b1f12c365b7df74504c7aa99cba6 Change-Id: I3cf06f50786e9b3baced741b0f6bb165fb01eab2 --- M includes/widget/NamespaceInputWidget.php 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/76/227476/1 diff --git a/includes/widget/NamespaceInputWidget.php b/includes/widget/NamespaceInputWidget.php index 2d69ed7..e6c60a6 100644 --- a/includes/widget/NamespaceInputWidget.php +++ b/includes/widget/NamespaceInputWidget.php @@ -49,6 +49,9 @@ 'valueNamespace' => null, 'valueInvert' => false, 'valueAssociated' => false, + 'titleNamespace' => null, + 'titleAssociated' => null, + 'titleInvert' => null, ), $config ); @@ -63,6 +66,11 @@ 'value' => $config['valueNamespace'], 'options' => $this->getNamespaceDropdownOptions( $config ), ) ); + + // Mixins + $this->namespace->mixin( new \OOUI\TitledElement( $this->namespace, + array_merge( $config, array( 'titled' => $this->namespace, 'title' => $config['titleNamespace'] ) ) ) ); + if ( $config['nameAssociated'] !== null ) { // FIXME Should use a LabelWidget? But they don't work like HTML s yet $this->associated = new \OOUI\FieldLayout( @@ -76,6 +84,9 @@ 'label' => $config['labelAssociated'], ) ); + // Mixins + $this->associated->mixin( new \OOUI\TitledElement( $this->associated, + array_merge( $config, array( 'titled' => $this->associated, 'title' => $config['titleAssociated'] ) ) ) ); } if ( $config['nameInvert'] !== null ) { $this->invert = new \OOUI\FieldLayout( @@ -89,6 +100,9 @@ 'label' => $config['labelInvert'], ) ); + // Mixins + $this->invert->mixin( new \OOUI\TitledElement( $this->invert, + array_merge( $config, array( 'titled' => $this->invert, 'title' => $config['titleInvert'] ) ) ) ); } // Initialization -- To view, visit https://gerrit.wikimedia.org/r/227476 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3cf06f50786e9b3baced741b0f6bb165fb01eab2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Mixin TitledElement into DropdownInputWidget and FieldLayout - change (oojs/ui)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/227477 Change subject: Mixin TitledElement into DropdownInputWidget and FieldLayout .. Mixin TitledElement into DropdownInputWidget and FieldLayout A DropddownInputWidget (because it's an input) should support the title tag to give further information about the scope of the field or any help text, as well as the FieldLayout (the title should be available on the field itself, as well as on the label, which can be added). Change-Id: I0bdb599faf40b1f12c365b7df74504c7aa99cba6 --- M src/layouts/FieldLayout.js M src/widgets/DropdownInputWidget.js 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/77/227477/1 diff --git a/src/layouts/FieldLayout.js b/src/layouts/FieldLayout.js index a4e1a03..d27d107 100644 --- a/src/layouts/FieldLayout.js +++ b/src/layouts/FieldLayout.js @@ -47,6 +47,7 @@ // Mixin constructors OO.ui.mixin.LabelElement.call( this, config ); + OO.ui.mixin.TitledElement.call( this, config ); // Properties this.fieldWidget = fieldWidget; @@ -97,6 +98,7 @@ OO.inheritClass( OO.ui.FieldLayout, OO.ui.Layout ); OO.mixinClass( OO.ui.FieldLayout, OO.ui.mixin.LabelElement ); +OO.mixinClass( OO.ui.FieldLayout, OO.ui.mixin.TitledElement ); /* Methods */ diff --git a/src/widgets/DropdownInputWidget.js b/src/widgets/DropdownInputWidget.js index bf08b3b..2399eac 100644 --- a/src/widgets/DropdownInputWidget.js +++ b/src/widgets/DropdownInputWidget.js @@ -40,6 +40,9 @@ // Parent constructor OO.ui.DropdownInputWidget.parent.call( this, config ); + // Mixin constructor + OO.ui.mixin.TitledElement.call( this, config ); + // Events this.dropdownWidget.getMenu().connect( this, { select: 'onMenuSelect' } ); @@ -53,6 +56,7 @@ /* Setup */ OO.inheritClass( OO.ui.DropdownInputWidget, OO.ui.InputWidget ); +OO.mixinClass( OO.ui.DropdownInputWidget, OO.ui.mixin.TitledElement ); /* Methods */ -- To view, visit https://gerrit.wikimedia.org/r/227477 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0bdb599faf40b1f12c365b7df74504c7aa99cba6 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo in reverse DNS for ms-fe2003.codfw.wmnet - change (operations/dns)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/227474 Change subject: Fix typo in reverse DNS for ms-fe2003.codfw.wmnet .. Fix typo in reverse DNS for ms-fe2003.codfw.wmnet wment -> wmnet Change-Id: I5ad09127c004281d4f9474d59e8dc3e0de494b52 --- M templates/10.in-addr.arpa 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/74/227474/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 74dee14..6bb1489 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -2649,7 +2649,7 @@ 22 1H IN PTR ms-be2006.codfw.wmnet. 23 1H IN PTR ms-be2007.codfw.wmnet. 24 1H IN PTR ms-be2008.codfw.wmnet. -25 1H IN PTR ms-fe2003.codfw.wment. +25 1H IN PTR ms-fe2003.codfw.wmnet. 26 1H IN PTR ms-fe2004.codfw.wmnet. 27 1H IN PTR es2003.codfw.wmnet. 28 1H IN PTR es2004.codfw.wmnet. -- To view, visit https://gerrit.wikimedia.org/r/227474 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ad09127c004281d4f9474d59e8dc3e0de494b52 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] cassandra: add restbase1007 - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/227475 Change subject: cassandra: add restbase1007 .. cassandra: add restbase1007 this will include restbase1007 in the seeds and allow the host to talk to other nodes via firewall rules Bug: T102015 Change-Id: I1fe43a064e3a62089a2ae92e9d1a4622444f8a5c --- M conftool-data/nodes/eqiad.yaml M hieradata/role/common/cassandra.yaml M hieradata/role/common/restbase.yaml 3 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/75/227475/1 diff --git a/conftool-data/nodes/eqiad.yaml b/conftool-data/nodes/eqiad.yaml index 50cfd14..b20e595 100644 --- a/conftool-data/nodes/eqiad.yaml +++ b/conftool-data/nodes/eqiad.yaml @@ -322,6 +322,7 @@ restbase1004.eqiad.wmnet: [restbase] restbase1005.eqiad.wmnet: [restbase] restbase1006.eqiad.wmnet: [restbase] + restbase1007.eqiad.wmnet: [restbase] elasticsearch: elastic1001.eqiad.wmnet: [elasticsearch] elastic1002.eqiad.wmnet: [elasticsearch] diff --git a/hieradata/role/common/cassandra.yaml b/hieradata/role/common/cassandra.yaml index 71b883b..1f3cbc1 100644 --- a/hieradata/role/common/cassandra.yaml +++ b/hieradata/role/common/cassandra.yaml @@ -11,6 +11,7 @@ - restbase1004.eqiad.wmnet - restbase1005.eqiad.wmnet - restbase1006.eqiad.wmnet +- restbase1007.eqiad.wmnet cassandra::max_heap_size: 16g # 1/4 heap size, no more than 100m/thread cassandra::heap_newsize: 2048m diff --git a/hieradata/role/common/restbase.yaml b/hieradata/role/common/restbase.yaml index 30e83fe..b85323d 100644 --- a/hieradata/role/common/restbase.yaml +++ b/hieradata/role/common/restbase.yaml @@ -9,6 +9,7 @@ - restbase1004.eqiad.wmnet - restbase1005.eqiad.wmnet - restbase1006.eqiad.wmnet +- restbase1007.eqiad.wmnet restbase::logstash_host: logstash1001.eqiad.wmnet restbase::cassandra_defaultConsistency: localQuorum restbase::cassandra_localDc: "%{::site}" -- To view, visit https://gerrit.wikimedia.org/r/227475 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1fe43a064e3a62089a2ae92e9d1a4622444f8a5c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Check wgLocalVirtualHosts instead of just $wgConf->isLocalVHost - change (mediawiki...ZeroBanner)
jenkins-bot has submitted this change and it was merged. Change subject: Check wgLocalVirtualHosts instead of just $wgConf->isLocalVHost .. Check wgLocalVirtualHosts instead of just $wgConf->isLocalVHost I25204d37 deprecated $wgConf->localVHosts, and changed core to check $wgLocalVirtualHosts as well as isLocalVHost. Once Ie3fefa19 is deployed only wgLocalVirtualHosts will be set in WMF production. Change-Id: Ibb81fee38d91e26e143160da8b5b2b06ae268396 --- M includes/ZeroSpecialPage.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ZeroSpecialPage.php b/includes/ZeroSpecialPage.php index 1ddc43e..4e174b6 100644 --- a/includes/ZeroSpecialPage.php +++ b/includes/ZeroSpecialPage.php @@ -319,6 +319,7 @@ * @return string */ private function renderUnknownZeroPartnerPage( PageRendering $state ) { + global $wgLocalVirtualHosts; // This page contains client IP and should not be cached $this->getOutput()->enableClientCache( false ); $req = $this->getRequest(); @@ -340,7 +341,9 @@ global $wgZeroSiteOverride, $wgConf; if ( $wgZeroSiteOverride || $wgConf->isLocalVHost( implode( '.', array_slice( $hp, -2, 2 ) ) ) || - $wgConf->isLocalVHost( implode( '.', array_slice( $hp, -3, 3 ) ) ) + in_array( implode( '.', array_slice( $hp, -2, 2 ) ), $wgLocalVirtualHosts ) || + $wgConf->isLocalVHost( implode( '.', array_slice( $hp, -3, 3 ) ) ) || + in_array( implode( '.', array_slice( $hp, -3, 3 ) ), $wgLocalVirtualHosts ) ) { if ( $hp[1] === 'zero' ) { $hp[1] = 'm'; -- To view, visit https://gerrit.wikimedia.org/r/227471 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb81fee38d91e26e143160da8b5b2b06ae268396 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ZeroBanner Gerrit-Branch: master Gerrit-Owner: Alex Monk Gerrit-Reviewer: Dr0ptp4kt Gerrit-Reviewer: Jhobs Gerrit-Reviewer: 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] Use DM serializer in SnakSerializationRendererTest - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227473 Change subject: Use DM serializer in SnakSerializationRendererTest .. Use DM serializer in SnakSerializationRendererTest Change-Id: Ia708232a14405d1dfd83beb0c9a49b11389ad770 --- M client/tests/phpunit/includes/DataAccess/Scribunto/SnakSerializationRendererTest.php 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/73/227473/1 diff --git a/client/tests/phpunit/includes/DataAccess/Scribunto/SnakSerializationRendererTest.php b/client/tests/phpunit/includes/DataAccess/Scribunto/SnakSerializationRendererTest.php index 3854bd3..624eacf 100644 --- a/client/tests/phpunit/includes/DataAccess/Scribunto/SnakSerializationRendererTest.php +++ b/client/tests/phpunit/includes/DataAccess/Scribunto/SnakSerializationRendererTest.php @@ -3,15 +3,17 @@ namespace Wikibase\Client\Tests\DataAccess\Scribunto; use DataValues\DataValue; +use DataValues\Serializers\DataValueSerializer; use DataValues\StringValue; use Language; use PHPUnit_Framework_TestCase; use Wikibase\Client\DataAccess\Scribunto\SnakSerializationRenderer; +use Wikibase\Client\Usage\UsageAccumulator; use Wikibase\Client\WikibaseClient; use Wikibase\DataModel\Entity\EntityIdValue; use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\DataModel\Serializers\SnakSerializer; use Wikibase\DataModel\Snak\PropertyValueSnak; -use Wikibase\Lib\Serializers\SnakSerializer; /** * @covers Wikibase\Client\DataAccess\Scribunto\SnakSerializationRenderer @@ -36,8 +38,8 @@ $value ); - $snakSerializer = new SnakSerializer(); - $serialized = $snakSerializer->getSerialized( $snak ); + $snakSerializer = new SnakSerializer( new DataValueSerializer() ); + $serialized = $snakSerializer->serialize( $snak ); return $serialized; } -- To view, visit https://gerrit.wikimedia.org/r/227473 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia708232a14405d1dfd83beb0c9a49b11389ad770 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase 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] WikidataPageBanner check for invalid Property name - change (mediawiki...WikidataPageBanner)
jenkins-bot has submitted this change and it was merged. Change subject: WikidataPageBanner check for invalid Property name .. WikidataPageBanner check for invalid Property name Return null from getWikidataBanner() if banner property is empty. Fix description of getWikidataBanner(). Bug: T107001 Change-Id: Iade85972f384c2644a4b27e6bce76079c6a2697d --- M includes/WikidataPageBanner.hooks.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/WikidataPageBanner.hooks.php b/includes/WikidataPageBanner.hooks.php index dea3058..c284aa6 100644 --- a/includes/WikidataPageBanner.hooks.php +++ b/includes/WikidataPageBanner.hooks.php @@ -254,12 +254,15 @@ * Fetches banner from wikidata for the specified page * * @param Title $title Title of the page -* @return String|null file name of the banner from wikitata [description] +* @return String|null file name of the banner from wikidata * or null if none found */ public static function getWikidataBanner( $title ) { global $wgBannerProperty; $banner = null; + if ( empty( $wgBannerProperty ) ) { + return null; + } // Ensure Wikibase client is installed if ( class_exists( 'Wikibase\Client\WikibaseClient' ) ) { $entityIdLookup = Wikibase\Client\WikibaseClient::getDefaultInstance() -- To view, visit https://gerrit.wikimedia.org/r/227176 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iade85972f384c2644a4b27e6bce76079c6a2697d Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Sumit Gerrit-Reviewer: Bene Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Sumit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Fix path in write_credentials_file() - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: labstore: Fix path in write_credentials_file() .. labstore: Fix path in write_credentials_file() At the moment, write_credentials_file() is always called with the parameter path set to the variable replica_path, but the direct use of the variable was an oversight. Change-Id: I1986ab3569af6c171f1d3f16b7378e5dad25a091 --- M modules/labstore/files/create-dbusers 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index 43e3bb5..a4ad4e8 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -103,7 +103,7 @@ # and not just return the value as a string directly replica_buffer = io.StringIO() replica_config.write(replica_buffer) -sg.write_user_file(replica_path, replica_buffer.getvalue()) +sg.write_user_file(path, replica_buffer.getvalue()) def check_user_exists(self, user): exists = True -- To view, visit https://gerrit.wikimedia.org/r/227469 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1986ab3569af6c171f1d3f16b7378e5dad25a091 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixing repo - forgot to add downloads file - change (analytics/limn-extdist-data)
Milimetric has submitted this change and it was merged. Change subject: Fixing repo - forgot to add downloads file .. Fixing repo - forgot to add downloads file Change-Id: Id1cf477ce8f5f0910486eed2abd6e8ab7f0dbb60 --- A extdist/downloads.sql 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Milimetric: Verified; Looks good to me, approved diff --git a/extdist/downloads.sql b/extdist/downloads.sql new file mode 100644 index 000..8d53379 --- /dev/null +++ b/extdist/downloads.sql @@ -0,0 +1,21 @@ +SELECT +LEFT(timestamp, 6) AS month, +event_type, +event_name, +event_version, +COUNT(uuid) AS count + +FROM +ExtDistDownloads_12369387 + +GROUP BY +month, +event_type, +event_name, +event_version + +ORDER BY +month ASC, +event_type ASC, +event_name, +event_version; -- To view, visit https://gerrit.wikimedia.org/r/227470 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id1cf477ce8f5f0910486eed2abd6e8ab7f0dbb60 Gerrit-PatchSet: 1 Gerrit-Project: analytics/limn-extdist-data Gerrit-Branch: master Gerrit-Owner: Milimetric Gerrit-Reviewer: Milimetric ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Check wgLocalVirtualHosts instead of just $wgConf->isLocalVHost - change (mediawiki...ZeroBanner)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/227471 Change subject: Check wgLocalVirtualHosts instead of just $wgConf->isLocalVHost .. Check wgLocalVirtualHosts instead of just $wgConf->isLocalVHost I25204d37 deprecated $wgConf->localVHosts, and changed core to check $wgLocalVirtualHosts as well as isLocalVHost. Once Ie3fefa19 is deployed only wgLocalVirtualHosts will be set in WMF production. Change-Id: Ibb81fee38d91e26e143160da8b5b2b06ae268396 --- M includes/ZeroSpecialPage.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroBanner refs/changes/71/227471/1 diff --git a/includes/ZeroSpecialPage.php b/includes/ZeroSpecialPage.php index 1ddc43e..4e174b6 100644 --- a/includes/ZeroSpecialPage.php +++ b/includes/ZeroSpecialPage.php @@ -319,6 +319,7 @@ * @return string */ private function renderUnknownZeroPartnerPage( PageRendering $state ) { + global $wgLocalVirtualHosts; // This page contains client IP and should not be cached $this->getOutput()->enableClientCache( false ); $req = $this->getRequest(); @@ -340,7 +341,9 @@ global $wgZeroSiteOverride, $wgConf; if ( $wgZeroSiteOverride || $wgConf->isLocalVHost( implode( '.', array_slice( $hp, -2, 2 ) ) ) || - $wgConf->isLocalVHost( implode( '.', array_slice( $hp, -3, 3 ) ) ) + in_array( implode( '.', array_slice( $hp, -2, 2 ) ), $wgLocalVirtualHosts ) || + $wgConf->isLocalVHost( implode( '.', array_slice( $hp, -3, 3 ) ) ) || + in_array( implode( '.', array_slice( $hp, -3, 3 ) ), $wgLocalVirtualHosts ) ) { if ( $hp[1] === 'zero' ) { $hp[1] = 'm'; -- To view, visit https://gerrit.wikimedia.org/r/227471 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb81fee38d91e26e143160da8b5b2b06ae268396 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ZeroBanner Gerrit-Branch: master Gerrit-Owner: Alex Monk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixing repo - forgot to add downloads file - change (analytics/limn-extdist-data)
Milimetric has uploaded a new change for review. https://gerrit.wikimedia.org/r/227470 Change subject: Fixing repo - forgot to add downloads file .. Fixing repo - forgot to add downloads file Change-Id: Id1cf477ce8f5f0910486eed2abd6e8ab7f0dbb60 --- A extdist/downloads.sql 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-extdist-data refs/changes/70/227470/1 diff --git a/extdist/downloads.sql b/extdist/downloads.sql new file mode 100644 index 000..8d53379 --- /dev/null +++ b/extdist/downloads.sql @@ -0,0 +1,21 @@ +SELECT +LEFT(timestamp, 6) AS month, +event_type, +event_name, +event_version, +COUNT(uuid) AS count + +FROM +ExtDistDownloads_12369387 + +GROUP BY +month, +event_type, +event_name, +event_version + +ORDER BY +month ASC, +event_type ASC, +event_name, +event_version; -- To view, visit https://gerrit.wikimedia.org/r/227470 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1cf477ce8f5f0910486eed2abd6e8ab7f0dbb60 Gerrit-PatchSet: 1 Gerrit-Project: analytics/limn-extdist-data Gerrit-Branch: master Gerrit-Owner: Milimetric ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Fix path in write_credentials_file() - change (operations/puppet)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/227469 Change subject: labstore: Fix path in write_credentials_file() .. labstore: Fix path in write_credentials_file() At the moment, write_credentials_file() is always called with the parameter path set to the variable replica_path, but the direct use of the variable was an oversight. Change-Id: I1986ab3569af6c171f1d3f16b7378e5dad25a091 --- M modules/labstore/files/create-dbusers 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/69/227469/1 diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index 9acc4e6..e59082d 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -103,7 +103,7 @@ # and not just return the value as a string directly replica_buffer = io.StringIO() replica_config.write(replica_buffer) -sg.write_user_file(replica_path, replica_buffer.getvalue()) +sg.write_user_file(path, replica_buffer.getvalue()) def check_user_exists(self, user): exists = True -- To view, visit https://gerrit.wikimedia.org/r/227469 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1986ab3569af6c171f1d3f16b7378e5dad25a091 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change Polish translation of Topic namespace - change (mediawiki...Flow)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/227468 Change subject: Change Polish translation of Topic namespace .. Change Polish translation of Topic namespace In Polish, use of "topic" (temat) causes a pleonasm "topic title" (tytuł tematu). In pl-lang part of internet, the word "thread" (wątek) instead of "topic" (temat) is used in such cases. That word was used consistently in all translatewiki messages. The issue was discussed within Polish community. Change-Id: I57463d89da3c643a922905ef12dc739098c5f108 --- M Flow.namespaces.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/68/227468/1 diff --git a/Flow.namespaces.php b/Flow.namespaces.php index a46409a..775efe9 100644 --- a/Flow.namespaces.php +++ b/Flow.namespaces.php @@ -86,7 +86,7 @@ /** Polish */ $namespaceNames['pl'] = array( - NS_TOPIC => 'Temat', + NS_TOPIC => 'Wątek', ); /** Portuguese */ -- To view, visit https://gerrit.wikimedia.org/r/227468 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I57463d89da3c643a922905ef12dc739098c5f108 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Catrope Gerrit-Reviewer: Tar Lócesilion ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Do not follow symlinks in create-dbusers - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: labstore: Do not follow symlinks in create-dbusers .. labstore: Do not follow symlinks in create-dbusers Change-Id: I033baeb6d1a2686e0b5c1de1607a6ee5801e03d0 --- M modules/labstore/files/create-dbusers 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index 9acc4e6..43e3bb5 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -60,7 +60,7 @@ return users def write_user_file(self, path, content): -f = os.open(path, os.O_CREAT | os.O_WRONLY) +f = os.open(path, os.O_CREAT | os.O_WRONLY | os.O_NOFOLLOW) try: os.write(f, content.encode('utf-8')) # uid == gid -- To view, visit https://gerrit.wikimedia.org/r/227467 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I033baeb6d1a2686e0b5c1de1607a6ee5801e03d0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Do not follow symlinks in create-dbusers - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/227467 Change subject: labstore: Do not follow symlinks in create-dbusers .. labstore: Do not follow symlinks in create-dbusers Change-Id: I033baeb6d1a2686e0b5c1de1607a6ee5801e03d0 --- M modules/labstore/files/create-dbusers 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/67/227467/1 diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index 9acc4e6..43e3bb5 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -60,7 +60,7 @@ return users def write_user_file(self, path, content): -f = os.open(path, os.O_CREAT | os.O_WRONLY) +f = os.open(path, os.O_CREAT | os.O_WRONLY | os.O_NOFOLLOW) try: os.write(f, content.encode('utf-8')) # uid == gid -- To view, visit https://gerrit.wikimedia.org/r/227467 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I033baeb6d1a2686e0b5c1de1607a6ee5801e03d0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump grunt-banana-checker to 0.2.2 - change (mediawiki...WikidataPageBanner)
jenkins-bot has submitted this change and it was merged. Change subject: Bump grunt-banana-checker to 0.2.2 .. Bump grunt-banana-checker to 0.2.2 Change-Id: Ibba426fc1d16fa5fdeaf3dab8c29369c3d7e2761 --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index c14a4cb..16d4081 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "devDependencies": { "grunt": "0.4.5", "grunt-cli": "0.1.13", -"grunt-banana-checker": "0.2.1", +"grunt-banana-checker": "0.2.2", "grunt-contrib-jshint": "0.11.2" } } -- To view, visit https://gerrit.wikimedia.org/r/227429 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibba426fc1d16fa5fdeaf3dab8c29369c3d7e2761 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Paladox Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] phragile: Add role class - change (operations/puppet)
WMDE-leszek has uploaded a new change for review. https://gerrit.wikimedia.org/r/227466 Change subject: phragile: Add role class .. phragile: Add role class Introduces role::phragile class that can be applied to instances. Bug: T101235 Change-Id: Ia81a711c1a53f47bd7bbc10d16a4079ceb44b66b --- A manifests/role/phragile.pp 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/66/227466/1 diff --git a/manifests/role/phragile.pp b/manifests/role/phragile.pp new file mode 100644 index 000..27736fb --- /dev/null +++ b/manifests/role/phragile.pp @@ -0,0 +1,3 @@ +class role::phragile { +include ::phragile +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/227466 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia81a711c1a53f47bd7bbc10d16a4079ceb44b66b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: WMDE-leszek ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update DonationInterface for deploy - change (mediawiki/core)
Ejegg has submitted this change and it was merged. Change subject: Update DonationInterface for deploy .. Update DonationInterface for deploy Change-Id: I9e4fe7e7514f5a0656f9a86d03a1ae40132f95bb --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 0127857..bdbbab5 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 0127857d07af386ae4cec9bbb84ad9bde15158b1 +Subproject commit bdbbab52920ca12a2643affa5168c664d0dd157f -- To view, visit https://gerrit.wikimedia.org/r/227465 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e4fe7e7514f5a0656f9a86d03a1ae40132f95bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_25 Gerrit-Owner: Ejegg Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update DonationInterface for deploy - change (mediawiki/core)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/227465 Change subject: Update DonationInterface for deploy .. Update DonationInterface for deploy Change-Id: I9e4fe7e7514f5a0656f9a86d03a1ae40132f95bb --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/227465/1 diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 0127857..bdbbab5 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 0127857d07af386ae4cec9bbb84ad9bde15158b1 +Subproject commit bdbbab52920ca12a2643affa5168c664d0dd157f -- To view, visit https://gerrit.wikimedia.org/r/227465 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e4fe7e7514f5a0656f9a86d03a1ae40132f95bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_25 Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add extra integration test for EntityAccessor - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227464 Change subject: Add extra integration test for EntityAccessor .. Add extra integration test for EntityAccessor I am abuot to touch this and would prefer not to break it ... ;) Change-Id: Ie9d42fcfce4502a945b353ec96b090f7d781386d --- M client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php 1 file changed, 153 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/64/227464/1 diff --git a/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php b/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php index bde8949..466e901 100644 --- a/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php +++ b/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php @@ -2,6 +2,7 @@ namespace Wikibase\Client\Tests\DataAccess\Scribunto; +use DataValues\StringValue; use Language; use ReflectionMethod; use Wikibase\Client\DataAccess\Scribunto\EntityAccessor; @@ -12,6 +13,13 @@ use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; +use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\DataModel\Reference; +use Wikibase\DataModel\ReferenceList; +use Wikibase\DataModel\SiteLink; +use Wikibase\DataModel\Snak\PropertySomeValueSnak; +use Wikibase\DataModel\Snak\PropertyValueSnak; +use Wikibase\DataModel\Snak\SnakList; use Wikibase\LanguageFallbackChainFactory; use Wikibase\Lib\Store\EntityLookup; use Wikibase\Test\MockRepository; @@ -39,9 +47,10 @@ private function getEntityAccessor( EntityLookup $entityLookup = null, - UsageAccumulator $usageAccumulator = null + UsageAccumulator $usageAccumulator = null, + $langCode = 'en' ) { - $language = new Language( 'en' ); + $language = new Language( $langCode ); $propertyDataTypeLookup = $this->getMock( 'Wikibase\DataModel\Entity\PropertyDataTypeLookup' ); $propertyDataTypeLookup->expects( $this->any() ) @@ -56,7 +65,7 @@ $termsLanguages = $this->getMock( 'Wikibase\Lib\ContentLanguages' ); $termsLanguages->expects( $this->any() ) ->method( 'getLanguages' ) - ->will( $this->returnValue( array( 'de', 'en', 'es', 'ja' ) ) ); + ->will( $this->returnValue( array( 'de', $langCode, 'es', 'ja' ) ) ); return new EntityAccessor( new BasicEntityIdParser(), @@ -166,4 +175,145 @@ ); } + public function testFullEntityGetEntityResponse() { + $item = new Item( new ItemId( 'Q123098' ) ); + + //Basic + $item->setLabel( 'de', 'foo-de' ); + $item->setLabel( 'qu', 'foo-qu' ); + $item->addAliases( 'en', array( 'bar', 'baz' ) ); + $item->addAliases( 'de-formal', array( 'bar', 'baz' ) ); + $item->setDescription( 'en', 'en-desc' ); + $item->setDescription( 'pt', 'ptDesc' ); + $item->addSiteLink( new SiteLink( 'enwiki', 'Berlin', array( new ItemId( 'Q333' ) ) ) ); + $item->addSiteLink( new SiteLink( 'zh_classicalwiki', 'User:Addshore', array() ) ); + + $snak = new PropertyValueSnak( new PropertyId( 'P65' ), new StringValue( 'snakStringValue' ) ); + + $qualifiers = new SnakList(); + $qualifiers->addSnak( new PropertyValueSnak( new PropertyId( 'P65' ), new StringValue( 'string!' ) ) ); + $qualifiers->addSnak( new PropertySomeValueSnak( new PropertyId( 'P65' ) ) ); + + $references = new ReferenceList(); + $referenceSnaks = new SnakList(); + $referenceSnaks->addSnak( new PropertySomeValueSnak( new PropertyId( 'P65' ) ) ); + $referenceSnaks->addSnak( new PropertySomeValueSnak( new PropertyId( 'P68' ) ) ); + $references->addReference( new Reference( $referenceSnaks ) ); + + $guid = 'imaguid'; + $item->getStatements()->addNewStatement( $snak, $qualifiers, $references, $guid ); + + $entityLookup = new MockRepository(); + $entityLookup->putEntity( $item ); + + $entityAccessor = $this->getEntityAccessor( $entityLookup, null, 'qug' ); + + $expected = array( + 'id' => 'Q123098', + 'type' => 'item', + 'labels' => array( + 'de' => array( + 'language' => 'de', + 'value' => 'foo-de', +
[MediaWiki-commits] [Gerrit] Fix inline-tex input format - change (mediawiki...mathoid)
jenkins-bot has submitted this change and it was merged. Change subject: Fix inline-tex input format .. Fix inline-tex input format * inline-tex input format was broken in previous commit * handle input format (type) and output format in the same way * throw an error if an unrecognized input format is used Change-Id: I2e6758efb9d722d03caf8a6b361d3d04320a21a3 --- M routes/mathoid.js M test/features/math/simple.js 2 files changed, 34 insertions(+), 7 deletions(-) Approvals: Mobrovac: Looks good to me, approved jenkins-bot: Verified diff --git a/routes/mathoid.js b/routes/mathoid.js index d14ab47..3c7ceeb 100644 --- a/routes/mathoid.js +++ b/routes/mathoid.js @@ -39,8 +39,7 @@ var png = false; var img = false; //Keep format variables constant -if (type === "tex") { -type = "TeX"; +if (type === "TeX" || type === "inline-TeX") { var sanitizationOutput = texvcjs.check(q); // XXX properly handle errors here! if (sanitizationOutput.status === '+') { @@ -54,12 +53,8 @@ png = app.conf.png && (outFormat === "png" || outFormat === "json"); svg = app.conf.svg && (outFormat === "svg" || outFormat === "json"); img = app.conf.img && outFormat === "json"; -if (type === "mml" || type === "MathML") { -type = "MathML"; +if (type === "MathML") { mml = false; // use the original MathML -} -if (type === "ascii" || type === "asciimath") { -type = "AsciiMath"; } if (speakText && outFormat === "png") { speakText = false; @@ -127,6 +122,25 @@ } var q = req.body.q; var type = (req.body.type || 'tex').toLowerCase(); +switch (type) { +case "tex": +type = "TeX"; +break; +case "inline-tex": +type = "inline-TeX"; +break; +case "mml": +case "mathml": +type = "MathML"; +break; +case "ascii": +case "asciimathml": +case "asciimath": +type = "AsciiMath"; +break; +default : +emitError("Input format \""+type+"\" is not recognized!"); +} if (req.body.noSpeak){ speakText = false; } diff --git a/test/features/math/simple.js b/test/features/math/simple.js index dd0f172..50f7ed6 100644 --- a/test/features/math/simple.js +++ b/test/features/math/simple.js @@ -159,6 +159,19 @@ assert.deepEqual(res.body.log, "F: \\newcommand"); }); }); +it("reject invalid input type", function () { +return preq.post({ +uri: baseURL, +body: {q: "E=mc^2}", type: "invalid"} +}).then(function (res) { +// if we are here, no error was thrown, not good +throw new Error('Expected an error to be thrown, got status: ' + res.status); +}, function (res) { +assert.status(res, 400); +assert.deepEqual(res.body.success, false); +assert.deepEqual(res.body.detail, "Input format \"invalid\" is not recognized!"); +}); +}); }); }); -- To view, visit https://gerrit.wikimedia.org/r/227457 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e6758efb9d722d03caf8a6b361d3d04320a21a3 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/services/mathoid Gerrit-Branch: master Gerrit-Owner: Physikerwelt Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge branch 'master' into deployment - change (mediawiki...DonationInterface)
Ejegg has submitted this change and it was merged. Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment 1afab3e Parse more of AstroPay's error descriptions cb1e381 Add country-specific versions of fiscal_number 3b868b0 Check error['context'] to place error messages ea35c3e Use old error forms for AstroPay fail page 8205cfb Generate new order IDs for each NewInvoice call 4ac357a Move deleteMessage out of legacy antimessage function 4a00d5e Localisation updates from https://translatewiki.net. fc023c9 Localisation updates from https://translatewiki.net. 85821e3 Localisation updates from https://translatewiki.net. f801889 Give Japan forms correct selection weight d3d31c5 Localisation updates from https://translatewiki.net. 643abbe Undo last commit's fiscal number normalization 082a3f5 Validate fiscal number when exists, require for AstroPay df64fe1 Localisation updates from https://translatewiki.net. Conflicts: tests/Adapter/Astropay/AstropayTest.php tests/Adapter/GatewayAdapterTest.php tests/Adapter/Worldpay/WorldpayTest.php tests/DataValidatorTest.php tests/includes/Responses/astropay/NewInvoice_1.testresponse Change-Id: Id7f7faae0c5c64f218791c4ae713442642cd7426 --- D tests/Adapter/Astropay/AstropayTest.php D tests/Adapter/GatewayAdapterTest.php D tests/Adapter/Worldpay/WorldpayTest.php D tests/DataValidatorTest.php D tests/MessageTest.php D tests/includes/Responses/astropay/NewInvoice_1.testresponse D tests/includes/Responses/astropay/NewInvoice_collision.testresponse D tests/includes/Responses/astropay/NewInvoice_could_not_register.testresponse D tests/includes/Responses/astropay/NewInvoice_fiscal_number.testresponse D tests/includes/Responses/astropay/NewInvoice_limit_exceeded.testresponse D tests/includes/Responses/astropay/NewInvoice_user_unauthorized.testresponse 11 files changed, 0 insertions(+), 1,376 deletions(-) Approvals: Ejegg: Looks good to me, approved diff --git a/tests/Adapter/Astropay/AstropayTest.php b/tests/Adapter/Astropay/AstropayTest.php deleted file mode 100644 index 95d2884..000 --- a/tests/Adapter/Astropay/AstropayTest.php +++ /dev/null @@ -1,512 +0,0 @@ -<<< HEAD (012785 Merge branch 'master' into deployment) -=== -testAdapterClass = 'TestingAstropayAdapter'; - } - - function setUp() { - parent::setUp(); - $this->setMwGlobals( array( - 'wgAstropayGatewayEnabled' => true, - ) ); - } - - function tearDown() { - TestingAstropayAdapter::clearGlobalsCache(); - parent::tearDown(); - } - - /** -* Ensure we're setting the right url for each transaction -* @covers AstropayAdapter::getCurlBaseOpts -*/ - function testCurlUrl() { - $init = $this->getDonorTestData( 'BR' ); - $gateway = $this->getFreshGatewayObject( $init ); - $gateway->setCurrentTransaction( 'NewInvoice' ); - - $result = $gateway->getCurlBaseOpts(); - - $this->assertEquals( - 'https://sandbox.astropay.example.com/api_curl/streamline/NewInvoice', - $result[CURLOPT_URL], - 'Not setting URL to transaction-specific value.' - ); - } - - /** -* Test the NewInvoice transaction is making a sane request and signing -* it correctly -*/ - function testNewInvoiceRequest() { - $init = $this->getDonorTestData( 'BR' ); - $this->setLanguage( $init['language'] ); - $_SESSION['Donor']['order_id'] = '123456789'; - $gateway = $this->getFreshGatewayObject( $init ); - - $gateway->do_transaction( 'NewInvoice' ); - parse_str( $gateway->curled[0], $actual ); - - $expected = array( - 'x_login' => 'createlogin', - 'x_trans_key' => 'createpass', - 'x_invoice' => '123456789', - 'x_amount' => '100.00', - 'x_currency' => 'BRL', - 'x_bank' => 'TE', - 'x_country' => 'BR', - 'x_description' => wfMessage( 'donate_interface-donation-description' )->inLanguage( $init['language'] )->text(), - 'x_iduser' => 'nob...@example.org', - 'x_cpf' => '3456789', - 'x_name' => 'Nome Apelido', - 'x_email' => 'nob...@example.org', - // 'x_address' => 'Rua Falso 123', - // 'x_zip' => '01110-111', - // 'x_city' => 'São Paulo', - // 'x_state' => 'SP', - 'control' => 'AC43664E0C4DF30607A26F271C89
[MediaWiki-commits] [Gerrit] Merge branch 'master' into deployment - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/227463 Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment 1afab3e Parse more of AstroPay's error descriptions cb1e381 Add country-specific versions of fiscal_number 3b868b0 Check error['context'] to place error messages ea35c3e Use old error forms for AstroPay fail page 8205cfb Generate new order IDs for each NewInvoice call 4ac357a Move deleteMessage out of legacy antimessage function 4a00d5e Localisation updates from https://translatewiki.net. fc023c9 Localisation updates from https://translatewiki.net. 85821e3 Localisation updates from https://translatewiki.net. f801889 Give Japan forms correct selection weight d3d31c5 Localisation updates from https://translatewiki.net. 643abbe Undo last commit's fiscal number normalization 082a3f5 Validate fiscal number when exists, require for AstroPay df64fe1 Localisation updates from https://translatewiki.net. Conflicts: tests/Adapter/Astropay/AstropayTest.php tests/Adapter/GatewayAdapterTest.php tests/Adapter/Worldpay/WorldpayTest.php tests/DataValidatorTest.php tests/includes/Responses/astropay/NewInvoice_1.testresponse Change-Id: Id7f7faae0c5c64f218791c4ae713442642cd7426 --- D tests/Adapter/Astropay/AstropayTest.php D tests/Adapter/GatewayAdapterTest.php D tests/Adapter/Worldpay/WorldpayTest.php D tests/DataValidatorTest.php D tests/MessageTest.php D tests/includes/Responses/astropay/NewInvoice_1.testresponse D tests/includes/Responses/astropay/NewInvoice_collision.testresponse D tests/includes/Responses/astropay/NewInvoice_could_not_register.testresponse D tests/includes/Responses/astropay/NewInvoice_fiscal_number.testresponse D tests/includes/Responses/astropay/NewInvoice_limit_exceeded.testresponse D tests/includes/Responses/astropay/NewInvoice_user_unauthorized.testresponse 11 files changed, 0 insertions(+), 1,376 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/63/227463/1 diff --git a/tests/Adapter/Astropay/AstropayTest.php b/tests/Adapter/Astropay/AstropayTest.php deleted file mode 100644 index 95d2884..000 --- a/tests/Adapter/Astropay/AstropayTest.php +++ /dev/null @@ -1,512 +0,0 @@ -<<< HEAD (012785 Merge branch 'master' into deployment) -=== -testAdapterClass = 'TestingAstropayAdapter'; - } - - function setUp() { - parent::setUp(); - $this->setMwGlobals( array( - 'wgAstropayGatewayEnabled' => true, - ) ); - } - - function tearDown() { - TestingAstropayAdapter::clearGlobalsCache(); - parent::tearDown(); - } - - /** -* Ensure we're setting the right url for each transaction -* @covers AstropayAdapter::getCurlBaseOpts -*/ - function testCurlUrl() { - $init = $this->getDonorTestData( 'BR' ); - $gateway = $this->getFreshGatewayObject( $init ); - $gateway->setCurrentTransaction( 'NewInvoice' ); - - $result = $gateway->getCurlBaseOpts(); - - $this->assertEquals( - 'https://sandbox.astropay.example.com/api_curl/streamline/NewInvoice', - $result[CURLOPT_URL], - 'Not setting URL to transaction-specific value.' - ); - } - - /** -* Test the NewInvoice transaction is making a sane request and signing -* it correctly -*/ - function testNewInvoiceRequest() { - $init = $this->getDonorTestData( 'BR' ); - $this->setLanguage( $init['language'] ); - $_SESSION['Donor']['order_id'] = '123456789'; - $gateway = $this->getFreshGatewayObject( $init ); - - $gateway->do_transaction( 'NewInvoice' ); - parse_str( $gateway->curled[0], $actual ); - - $expected = array( - 'x_login' => 'createlogin', - 'x_trans_key' => 'createpass', - 'x_invoice' => '123456789', - 'x_amount' => '100.00', - 'x_currency' => 'BRL', - 'x_bank' => 'TE', - 'x_country' => 'BR', - 'x_description' => wfMessage( 'donate_interface-donation-description' )->inLanguage( $init['language'] )->text(), - 'x_iduser' => 'nob...@example.org', - 'x_cpf' => '3456789', - 'x_name' => 'Nome Apelido', - 'x_email' => 'nob...@example.org', - // 'x_address' => 'Rua Falso 123', - // 'x_zip' => '01110-111', - // 'x_city' => 'São Paulo', -
[MediaWiki-commits] [Gerrit] Add manage-snapshots script - change (operations/puppet)
coren has uploaded a new change for review. https://gerrit.wikimedia.org/r/227462 Change subject: Add manage-snapshots script .. Add manage-snapshots script This script cleans up snapshots in the specified volume group by discarding: (a) snapshots that are over 80% full; and (b) enough snapshots, oldest first, so that there is at least terabytes of allocatable space in the volume group. Bug: T106474 Change-Id: I098a9081b5c629a5fddcc268a1f6b98fcd08509f --- A modules/labstore/files/manage-snapshots 1 file changed, 102 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/62/227462/1 diff --git a/modules/labstore/files/manage-snapshots b/modules/labstore/files/manage-snapshots new file mode 100755 index 000..4f91f9c --- /dev/null +++ b/modules/labstore/files/manage-snapshots @@ -0,0 +1,102 @@ +#! /usr/bin/python3 +# -*- coding: utf-8 -*- +# +# Copyright © 2015 Marc-André Pelletier +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +# +# THIS FILE IS MANAGED BY PUPPET +# +# Source: modules/labstore/manage-snapshots +# From: modules/labstore/manifests/fileserve.rpp +# + +""" +manage-snapshots + +usage: manage-snapshots + +This script cleans up snapshots in the specified volume +group by discarding: + +(a) snapshots that are over 80% full; and +(b) enough snapshots, oldest first, so that there +is at least terabytes of allocatable space +in the volume group. + +The script will cowardly refuse to touch any mounted +snapshot. +""" + +import argparse +import subprocess +import logging +import re + +def parsed_run(*cmd): +entries = [] +for entry in subprocess.check_output(list(cmd)).decode().splitlines(): +entries.append(list(col.strip() for col in entry.split(':'))) +return entries + +def terabytes(num): +match = re.match(r'^([0-9.]+)t$', num) +if match: +return float(match.group(1)) +raise ValueError('Unexpected non-size value "%s"' % num) + +def discard(name): +if subprocess.call(['/sbin/lvremove', '-f', name]) == 0: +return True +return False + +parser = argparse.ArgumentParser() +parser.add_argument('vg', help='Volume group to clean snapshots from') +parser.add_argument('space', help='Free space to leave in the volume group (in terabytes)') +args = parser.parse_args() + +logging.basicConfig(level=logging.INFO, format='%(message)s') + +free = None +for vg in parsed_run('/sbin/vgs', '--separator', ':', '--options', 'name,size,free', '--units', 't'): +if vg[0] == args.vg: +free = terabytes(vg[2]) +if not free: +raise ValueError('%s is not a volume group' % args.vg) + +snapshots = {} +for lv in parsed_run('/sbin/lvs', '--separator', ':', '--options', 'vg_name,name,origin,size,snap_percent', '--units', 't'): +if lv[0] == args.vg: +match = re.match(r'^(.*?)([0-9]+)$', lv[1]) +if match and match.group(1) == lv[2]: +snapshots["%s/%s" % (lv[0], lv[1])] = (lv[3], lv[4], match.group(2)) + +# sort by timestamp (lexicographically, which works out) +oldest = sorted(snapshots.items(), key=lambda x: x[1][2]) + +overfull = [] +for lv, entry in snapshots.items(): +if float(entry[1]) > 80.0: +overfull.append(lv) +if discard(lv): +free += terabytes(entry[0]) + +while free < float(args.space): +if len(oldest) < 1: +break +if not oldest[0][0] in overfull: +if discard(oldest[0][0]): +free += terabytes(oldest[0][1][0]) +oldest.pop(0) + -- To view, visit https://gerrit.wikimedia.org/r/227462 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I098a9081b5c629a5fddcc268a1f6b98fcd08509f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: coren ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Add new preference for experimental json page load - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Add new preference for experimental json page load .. Hygiene: Add new preference for experimental json page load Renamed the methods for the old HTML preference. Hide the HTML option in the dev settings to keep it simpler. Bug: T104714 Change-Id: Ib166e24a63d2ceb7ce064bf7d1dfc683e2f22ef7 --- M wikipedia/res/values/preference_keys.xml M wikipedia/res/xml/developer_preferences.xml M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java M wikipedia/src/main/java/org/wikipedia/settings/Prefs.java 4 files changed, 21 insertions(+), 9 deletions(-) Approvals: Sniedzielski: Looks good to me, approved Mholloway: Looks good to me, but someone else must approve Niedzielski: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wikipedia/res/values/preference_keys.xml b/wikipedia/res/values/preference_keys.xml index 9eef114..2de5ee6 100644 --- a/wikipedia/res/values/preference_keys.xml +++ b/wikipedia/res/values/preference_keys.xml @@ -21,7 +21,8 @@ featureSelectTextAndShareTutorialsEnabled tocTutorialEnabled showImages -expPageLoad +expHtmlPageLoad +expJsonPageLoad dailyEventTask username password diff --git a/wikipedia/res/xml/developer_preferences.xml b/wikipedia/res/xml/developer_preferences.xml index c82e108..5d91908 100644 --- a/wikipedia/res/xml/developer_preferences.xml +++ b/wikipedia/res/xml/developer_preferences.xml @@ -17,9 +17,13 @@ android:key="@string/preference_key_link_preview_version" android:title="@string/preference_key_link_preview_version" /> + + + + +android:key="@string/preference_key_exp_json_page_load" +android:title="@string/preference_key_exp_json_page_load" /> diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java index 82341ea..ae8710b 100755 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java @@ -187,7 +187,7 @@ super.onCreate(savedInstanceState); app = (WikipediaApp) getActivity().getApplicationContext(); model = new PageViewModel(); -if (Prefs.isExperimentalPageLoadEnabled()) { +if (Prefs.isExperimentalHtmlPageLoadEnabled()) { pageLoadStrategy = new HtmlPageLoadStrategy(); } else { pageLoadStrategy = new JsonPageLoadStrategy(); @@ -310,7 +310,7 @@ } }; -if (!Prefs.isExperimentalPageLoadEnabled()) { +if (!Prefs.isExperimentalHtmlPageLoadEnabled()) { bridge.injectStyleBundle(StyleBundle.getAvailableBundle(StyleBundle.BUNDLE_PAGEVIEW)); } diff --git a/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java b/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java index 3f54322..7d38748 100644 --- a/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java +++ b/wikipedia/src/main/java/org/wikipedia/settings/Prefs.java @@ -215,14 +215,21 @@ return getBoolean(R.string.preference_key_eventlogging_opt_in, true); } -public static boolean isExperimentalPageLoadEnabled() { -return getBoolean(R.string.preference_key_exp_page_load, false); +public static boolean isExperimentalHtmlPageLoadEnabled() { +return getBoolean(R.string.preference_key_exp_html_page_load, false); } -public static void setExperimentalPageLoadEnabled(boolean enabled) { -setBoolean(R.string.preference_key_exp_page_load, enabled); +public static void setExperimentalHtmlPageLoadEnabled(boolean enabled) { +setBoolean(R.string.preference_key_exp_html_page_load, enabled); } +public static boolean isExperimentalJsonPageLoadEnabled() { +return getBoolean(R.string.preference_key_exp_json_page_load, false); +} + +public static void setExperimentalJsonPageLoadEnabled(boolean enabled) { +setBoolean(R.string.preference_key_exp_json_page_load, enabled); +} @NonNull public static long getLastRunTime(@NonNull String task) { -- To view, visit https://gerrit.wikimedia.org/r/226673 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib166e24a63d2ceb7ce064bf7d1dfc683e2f22ef7 Gerrit-PatchSet: 13 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND Gerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: Sniedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-com
[MediaWiki-commits] [Gerrit] nodepool: stop using diskimage - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/227461 Change subject: nodepool: stop using diskimage .. nodepool: stop using diskimage Diskimage is yet another image creation tool and we probably have enough. Moreover Nodepool would require root access on the machine to rebuild image periodically. Stop using diskimage-builder Switch to `base-image` which instructs Nodepool to use the given image name provided by the cloud provider (wmflabs) Change image name from ci-dib-jessie-wikimedia to ci-jessie-wikimedia RelEng will build and upload the image manually for now. Change-Id: I27fb0bf5843bfad53ba610da948bc4935f0391df --- M modules/nodepool/templates/nodepool.yaml.erb 1 file changed, 5 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/61/227461/1 diff --git a/modules/nodepool/templates/nodepool.yaml.erb b/modules/nodepool/templates/nodepool.yaml.erb index 6e0a80e..c6ee675 100644 --- a/modules/nodepool/templates/nodepool.yaml.erb +++ b/modules/nodepool/templates/nodepool.yaml.erb @@ -47,8 +47,8 @@ # Jenkins labels labels: - - name: ci-dib-jessie-wikimedia -image: ci-dib-jessie-wikimedia + - name: ci-jessie-wikimedia +image: ci-jessie-wikimedia #ready-script: ready.sh min-ready: 1 providers: @@ -69,8 +69,9 @@ # 'eqiad.wmflabs' is magically added by wmflabs template-hostname: '{image.name}-{timestamp}' images: - - name: ci-dib-jessie-wikimedia -diskimage: ci-dib-jessie-wikimedia + - name: ci-jessie-wikimedia +# RelEng manually build and upload the image to Glance +base-image: ci-jessie-wikimedia meta: properties: # Let Horizon/Wikitech display the image (T105015) @@ -80,30 +81,3 @@ #setup: setup.sh username: jenkins private-key: /var/lib/nodepool/.ssh/dib_jenkins_id_rsa - -# See doc at http://docs.openstack.org/developer/diskimage-builder/ -diskimages: - - name: ci-dib-jessie-wikimedia -elements: - - debian - - debian-systemd - - cloud-init-datasources - - vm - - devuser - - wikimedia-networking - - nodepool-base -release: jessie -env-vars: - DIB_IMAGE_CACHE: '<%= @dib_cache_dir -%>' - QEMU_IMG_OPTIONS: compat=0.10 - - # debian element - DIB_RELEASE: jessie - DIB_DISTRIBUTION_MIRROR: http://mirrors.wikimedia.org/debian/ - - # cloud-init-datasources - DIB_CLOUD_INIT_DATASOURCES: Ec2 - - # devuser element - DIB_DEV_USER_USERNAME: jenkins - DIB_DEV_USER_AUTHORIZED_KEYS: /var/lib/nodepool/.ssh/dib_jenkins_id_rsa.pub -- To view, visit https://gerrit.wikimedia.org/r/227461 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27fb0bf5843bfad53ba610da948bc4935f0391df Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Extract calculating lead image width - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Extract calculating lead image width .. Hygiene: Extract calculating lead image width And make metadata (mobileview) JSON object key more generic in preparation of a simpler switch between mobileview and mobile content service. Bug: T104714 Change-Id: I5d71dee14f1e5fa4e15b3a1c1c03c3319523d33a --- M wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java 1 file changed, 11 insertions(+), 8 deletions(-) Approvals: Sniedzielski: Looks good to me, approved Niedzielski: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java b/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java index 7cda167..6daaa82 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java +++ b/wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java @@ -616,6 +616,7 @@ private class LeadSectionFetchTask extends SectionsFetchTask { private final int startSequenceNum; private PageProperties pageProperties; +private String pagePropsResponseName = "mobileview"; public LeadSectionFetchTask(int startSequenceNum) { super(app, model.getTitle(), "0"); @@ -628,10 +629,7 @@ builder.param("prop", builder.getParams().get("prop") + "|thumb|image|id|revision|description|" + Page.API_REQUEST_PROPS); -Resources res = app.getResources(); -builder.param("thumbsize", -Integer.toString((int) (res.getDimension(R.dimen.leadImageWidth) -/ res.getDisplayMetrics().density))); +builder.param("thumbsize", Integer.toString(calculateLeadImageWidth())); return builder; } @@ -640,10 +638,10 @@ if (startSequenceNum != currentSequenceNum) { return super.processResult(result); } -JSONObject mobileView = result.asObject().optJSONObject("mobileview"); -if (mobileView != null) { -pageProperties = new PageProperties(mobileView); - model.setTitle(fragment.adjustPageTitleFromMobileview(model.getTitle(), mobileView)); +JSONObject metadata = result.asObject().optJSONObject(pagePropsResponseName); +if (metadata != null) { +pageProperties = new PageProperties(metadata); + model.setTitle(fragment.adjustPageTitleFromMobileview(model.getTitle(), metadata)); } return super.processResult(result); } @@ -705,6 +703,11 @@ } } +private int calculateLeadImageWidth() { +Resources res = app.getResources(); +return (int) (res.getDimension(R.dimen.leadImageWidth) / res.getDisplayMetrics().density); +} + private class RestSectionsFetchTask extends SectionsFetchTask { private final int startSequenceNum; -- To view, visit https://gerrit.wikimedia.org/r/226674 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d71dee14f1e5fa4e15b3a1c1c03c3319523d33a Gerrit-PatchSet: 12 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND Gerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: Sniedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] imagescalers: fix mpm worker config - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: imagescalers: fix mpm worker config .. imagescalers: fix mpm worker config Change-Id: Iff8c59bd26b36e49d718f1b4b64d823524474f4c --- M hieradata/hosts/mw1152.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/hieradata/hosts/mw1152.yaml b/hieradata/hosts/mw1152.yaml index d99de5b..c5adaef 100644 --- a/hieradata/hosts/mw1152.yaml +++ b/hieradata/hosts/mw1152.yaml @@ -1,2 +1,3 @@ apache::mpm::mpm: worker mediawiki::web::mpm_config::mpm: worker +mediawiki::web::mpm_config::threads_per_child: 15 -- To view, visit https://gerrit.wikimedia.org/r/227460 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff8c59bd26b36e49d718f1b4b64d823524474f4c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] imagescalers: fix mpm worker config - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/227460 Change subject: imagescalers: fix mpm worker config .. imagescalers: fix mpm worker config Change-Id: Iff8c59bd26b36e49d718f1b4b64d823524474f4c --- M hieradata/hosts/mw1152.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/60/227460/1 diff --git a/hieradata/hosts/mw1152.yaml b/hieradata/hosts/mw1152.yaml index d99de5b..c5adaef 100644 --- a/hieradata/hosts/mw1152.yaml +++ b/hieradata/hosts/mw1152.yaml @@ -1,2 +1,3 @@ apache::mpm::mpm: worker mediawiki::web::mpm_config::mpm: worker +mediawiki::web::mpm_config::threads_per_child: 15 -- To view, visit https://gerrit.wikimedia.org/r/227460 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff8c59bd26b36e49d718f1b4b64d823524474f4c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove LibSerializer from ParserOutputJsConfigBuilderTest - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227459 Change subject: Remove LibSerializer from ParserOutputJsConfigBuilderTest .. Remove LibSerializer from ParserOutputJsConfigBuilderTest This might be the last usage :O Change-Id: Icdcfc7352c5cf08b080afa95dbec2e6203ae9a1b --- M repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php 1 file changed, 3 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/59/227459/1 diff --git a/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php b/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php index 5cb79f2..5f56fa5 100644 --- a/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php +++ b/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php @@ -9,9 +9,8 @@ use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Snak\PropertyValueSnak; -use Wikibase\Lib\Serializers\SerializationOptions; -use Wikibase\Lib\Serializers\LibSerializerFactory; use Wikibase\ParserOutputJsConfigBuilder; +use Wikibase\Repo\WikibaseRepo; /** * @covers Wikibase\ParserOutputJsConfigBuilder @@ -42,11 +41,8 @@ } public function assertSerializationEqualsEntity( Entity $entity, $serialization ) { - $serializerFactory = new LibSerializerFactory(); - $options = new SerializationOptions(); - - $unserializer = $serializerFactory->newUnserializerForEntity( $entity->getType(), $options ); - $unserializedEntity = $unserializer->newFromSerialization( $serialization ); + $deserializer = WikibaseRepo::getDefaultInstance()->getEntityDeserializer(); + $unserializedEntity = $deserializer->deserialize( $serialization ); $this->assertTrue( $unserializedEntity->equals( $entity ), 'unserialized entity equals entity' ); } -- To view, visit https://gerrit.wikimedia.org/r/227459 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icdcfc7352c5cf08b080afa95dbec2e6203ae9a1b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase 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] [Core] Add new message to ignore - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [Core] Add new message to ignore .. [Core] Add new message to ignore https://gerrit.wikimedia.org/r/#/c/226916/ Change-Id: I0b64cc6b74fa778bb2099df488faee0cfc1cbe8b --- M groups/MediaWiki/MediaWiki.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/MediaWiki.yaml b/groups/MediaWiki/MediaWiki.yaml index eb4f855..6f4b4d8 100644 --- a/groups/MediaWiki/MediaWiki.yaml +++ b/groups/MediaWiki/MediaWiki.yaml @@ -502,6 +502,7 @@ - sp-contributions-footer-anon - sp-contributions-footer-newbies - specialpages-summary +- statistics-articles-desc - statistics-footer - statistics-summary - suppressedarticle -- To view, visit https://gerrit.wikimedia.org/r/227458 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0b64cc6b74fa778bb2099df488faee0cfc1cbe8b Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking Gerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix inline-tex input format - change (mediawiki...mathoid)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/227457 Change subject: Fix inline-tex input format .. Fix inline-tex input format * inline-tex input format was broken in previous commit * handle input format (type) and output format in the same way * throw an error if an unrecognized input format is used Change-Id: I2e6758efb9d722d03caf8a6b361d3d04320a21a3 --- M routes/mathoid.js 1 file changed, 21 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid refs/changes/57/227457/1 diff --git a/routes/mathoid.js b/routes/mathoid.js index d14ab47..6c61bc2 100644 --- a/routes/mathoid.js +++ b/routes/mathoid.js @@ -39,8 +39,7 @@ var png = false; var img = false; //Keep format variables constant -if (type === "tex") { -type = "TeX"; +if (type === "TeX" || type === "inline-TeX" ) { var sanitizationOutput = texvcjs.check(q); // XXX properly handle errors here! if (sanitizationOutput.status === '+') { @@ -54,12 +53,8 @@ png = app.conf.png && (outFormat === "png" || outFormat === "json"); svg = app.conf.svg && (outFormat === "svg" || outFormat === "json"); img = app.conf.img && outFormat === "json"; -if (type === "mml" || type === "MathML") { -type = "MathML"; +if ( type === "MathML") { mml = false; // use the original MathML -} -if (type === "ascii" || type === "asciimath") { -type = "AsciiMath"; } if (speakText && outFormat === "png") { speakText = false; @@ -127,6 +122,25 @@ } var q = req.body.q; var type = (req.body.type || 'tex').toLowerCase(); +switch ( type ) { +case "tex": +type = "TeX"; +break; +case "inline-tex": +type = "inline-TeX"; +break; +case "mml": +case "mathml": +type = "MathML"; +break; +case "ascii": +case "asciimathml": +case "asciimath": +type = "AsciiMath"; +break; +default : +emitError("Input format \""+type+"\" is not recognized!"); +} if (req.body.noSpeak){ speakText = false; } -- To view, visit https://gerrit.wikimedia.org/r/227457 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e6758efb9d722d03caf8a6b361d3d04320a21a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mathoid Gerrit-Branch: master Gerrit-Owner: Physikerwelt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Core] Add new message to ignore - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/227458 Change subject: [Core] Add new message to ignore .. [Core] Add new message to ignore https://gerrit.wikimedia.org/r/#/c/226916/ Change-Id: I0b64cc6b74fa778bb2099df488faee0cfc1cbe8b --- M groups/MediaWiki/MediaWiki.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/58/227458/1 diff --git a/groups/MediaWiki/MediaWiki.yaml b/groups/MediaWiki/MediaWiki.yaml index eb4f855..6f4b4d8 100644 --- a/groups/MediaWiki/MediaWiki.yaml +++ b/groups/MediaWiki/MediaWiki.yaml @@ -502,6 +502,7 @@ - sp-contributions-footer-anon - sp-contributions-footer-newbies - specialpages-summary +- statistics-articles-desc - statistics-footer - statistics-summary - suppressedarticle -- To view, visit https://gerrit.wikimedia.org/r/227458 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b64cc6b74fa778bb2099df488faee0cfc1cbe8b 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] Don't retry invalid thumbnail requests due to impossible width - change (mediawiki/core)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/227456 Change subject: Don't retry invalid thumbnail requests due to impossible width .. Don't retry invalid thumbnail requests due to impossible width At the moment this isn't going to work in production, because varnish turns 400s into 500s. But I'll try to fix that separately. Bug: T106740 Change-Id: Id156ee4ac986ad2a6d7e49dfe8aa7577764eca11 --- M includes/jobqueue/jobs/ThumbnailRenderJob.php 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/227456/1 diff --git a/includes/jobqueue/jobs/ThumbnailRenderJob.php b/includes/jobqueue/jobs/ThumbnailRenderJob.php index d1d..f558c48 100644 --- a/includes/jobqueue/jobs/ThumbnailRenderJob.php +++ b/includes/jobqueue/jobs/ThumbnailRenderJob.php @@ -55,11 +55,10 @@ wfDebug( __METHOD__ . ": received status {$status}\n" ); - if ( $status === 200 || $status === 301 || $status === 302 ) { + // 400 happens when requesting a size greater or equal than the original + if ( $status === 200 || $status === 301 || $status === 302 || $status === 400 ) { return true; } elseif ( $status ) { - // Note that this currently happens (500) when requesting sizes larger then or - // equal to the original, which is harmless. $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status . ' when hitting ' . $thumbUrl ); return false; } else { -- To view, visit https://gerrit.wikimedia.org/r/227456 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id156ee4ac986ad2a6d7e49dfe8aa7577764eca11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gilles ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T99795: Improve handling of calendar dates and introduce XSD... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: T99795: Improve handling of calendar dates and introduce XSD 1.1 .. T99795: Improve handling of calendar dates and introduce XSD 1.1 NB: The default is set to XSD 1.1. I think that's what we want, but that's a change from what we had before. Change-Id: Ia8d40797f1731766557336498007c7c6ce24fd72 --- M repo/includes/rdf/DateTimeValueCleaner.php M repo/includes/rdf/JulianDateTimeValueCleaner.php M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_all.nt M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_minimal.nt M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_statements.nt M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_values.nt M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q6_with_qualifiers.nt M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q7_refs.nt M repo/tests/phpunit/data/rdf/Q4_all_statements.nt M repo/tests/phpunit/data/rdf/Q4_claims.nt M repo/tests/phpunit/data/rdf/Q4_props.nt M repo/tests/phpunit/data/rdf/Q4_resolved.nt M repo/tests/phpunit/data/rdf/Q4_truthy_statements.nt M repo/tests/phpunit/data/rdf/Q4_values.nt M repo/tests/phpunit/data/rdf/Q6_qualifiers.nt M repo/tests/phpunit/data/rdf/Q6_with_qualifiers.nt M repo/tests/phpunit/data/rdf/Q7_Q9_dedup.nt M repo/tests/phpunit/data/rdf/Q7_references.nt M repo/tests/phpunit/data/rdf/Q7_refs.nt M repo/tests/phpunit/data/rdf/Q8.json M repo/tests/phpunit/data/rdf/Q8_baddates.nt M repo/tests/phpunit/data/rdf/TruthyStatementRdfBuilder/Q4_statements.nt M repo/tests/phpunit/data/rdf/dump_refs.nt M repo/tests/phpunit/includes/rdf/ComplexValueRdfBuilderTest.php M repo/tests/phpunit/includes/rdf/DateValueCleanerTest.php M repo/tests/phpunit/includes/rdf/SimpleValueRdfBuilderTest.php 26 files changed, 275 insertions(+), 170 deletions(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/rdf/DateTimeValueCleaner.php b/repo/includes/rdf/DateTimeValueCleaner.php index c421a41..05ddd7e 100644 --- a/repo/includes/rdf/DateTimeValueCleaner.php +++ b/repo/includes/rdf/DateTimeValueCleaner.php @@ -3,6 +3,7 @@ namespace Wikibase\Rdf; use DataValues\TimeValue; +use DataValues\IllegalValueException; /** * Very basic cleaner that assumes the date is Gregorian and only @@ -13,16 +14,32 @@ class DateTimeValueCleaner { /** -* Clean up Wikidata date value in Gregorian calendar -* - remove + from the start - not all data stores like that -* - validate month and date value -* @param string $dateValue -* @return string Value compatible with xsd:dateTime type +* Are we using XSD 1.1 standard or XSD 1.0? +* XSD 1.1 has year 0 and it's 1 BCE +* XSD 1.0 doesn't have year 0 and year -1 is 1 BCE +* Internally, 1BCE is represented as -0001, same does PHP +* @var bool */ - protected function cleanupGregorianValue( $dateValue ) { - list( $date, $time ) = explode( 'T', $dateValue, 2 ); - if ( $date[0] === '-' ) { - $minus = '-'; + protected $xsd11 = true; + + /** +* +* @param bool $xsd11 Should we use XSD 1.1 standard? +*/ + public function __construct( $xsd11 = true ) { + $this->xsd11 = $xsd11; + } + + /** +* Parse date value and fix weird numbers there. +* @param string $dateValue +* @throws IllegalValueException +* @return array Parsed value in parts: $minus, $y, $m, $d, $time +*/ + protected function parseDateValue( $dateValue ) { + list( $date, $time ) = explode( "T", $dateValue, 2 ); + if ( $date[0] == "-" ) { + $minus = "-"; } else { $minus = ''; } @@ -31,11 +48,6 @@ $m = (int)$m; $d = (int)$d; $y = ltrim( $y, '0' ); - - if ( $y === '' ) { - // Year 0 is invalid for now, see T94064 for discussion - return null; - } if ( $m <= 0 ) { $m = 1; @@ -47,6 +59,37 @@ if ( $d <= 0 ) { $d = 1; } + + if($y === "") { + // Year 0 is invalid for now, see T94064 for discussion + throw new IllegalValueException(); + } + return array( $minus, $y, $m, $d, $time ); + } + + /** +* Clean up Wikidata date value in Gregorian calendar +* - remove + from the start - not all data stores like that +* - validate month and date value +* @param string $dateValue +* @param int $precision Date precision constant (e.g. TimeValue::PRECISION_SEC
[MediaWiki-commits] [Gerrit] Add HSTS preload for wikipedia.org, refactor related regexes - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/227455 Change subject: Add HSTS preload for wikipedia.org, refactor related regexes .. Add HSTS preload for wikipedia.org, refactor related regexes At this point, all but one of our unified cert domains are "clean" in that they have no subdomains that don't match the certs to worry about. The odd man out is just wikimedia.org now, which still needs a special match to only catch the exact hostnames matching the cert. This patch aligns the primary regexes for TLS redirects and HSTS preload to be identical and match any hostname ending in any of our unified-cert domains other than wikimedia.org. wikimedia.org is moved to a separate clause for redirects, and takes the default in the HSTS case (no preload/includesub). Bug: T104244 Change-Id: If57e7110b6ec23abe26b2ecb3027017b073fa8a8 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/55/227455/1 diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 2c626b5..a9f58b9 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -192,8 +192,14 @@ sub https_recv_redirect { if (req.request == "GET" || req.request == "HEAD") { if (req.http.X-Forwarded-Proto != "https") { - // This filter should exactly match our set of SSL cert wildcards - if (req.http.Host ~ "(?i)^([^.]+\.)?(zero\.wikipedia|(m\.)?(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimedia|wikimediafoundation|wiktionary|mediawiki))\.org$") { + // This is all of our unified cert wildcard domains which are TLS-clean (cert matches all extant hostnames within) + // The lone exception now is wikimedia.org, in the next block + if (req.http.Host ~ "(?i)^(^|\.)(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org$") { + set req.http.Location = "https://"; + req.http.Host + req.url; + error 751 "TLS Redirect"; + } + // wikimedia.org has multi-level subdomains used for HTTP for which we have no certs, so they must be avoided here: + else if(req.http.Host ~ "(?i)^([^.]+\.)?(m\.)?wikimedia\.org$") { // For now, avoid matching commons for MW UAs. Ref: T102566 if (!(req.http.Host ~ "(?i)^commons\.wikimedia\.org$" && req.http.User-Agent ~ "^MediaWiki/")) { set req.http.Location = "https://"; + req.http.Host + req.url; @@ -221,7 +227,8 @@ // HSTS to reach a client, the client implicitly has to have already // successfully reached us over HTTPS for the given domainname. if (req.http.X-Forwarded-Proto == "https") { - if (req.http.Host ~ "(?i)(^|\.)(wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org$") { + // This is the same regex as the first one in https_recv_redirect (all unified except wikimedia.org) + if (req.http.Host ~ "(?i)(^|\.)(wikipedia|wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wikidata|wikimediafoundation|wiktionary|mediawiki)\.org$") { set resp.http.Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"; } else { -- To view, visit https://gerrit.wikimedia.org/r/227455 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If57e7110b6ec23abe26b2ecb3027017b073fa8a8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] add scripts/interwikidata.py - change (pywikibot/core)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/227454 Change subject: [WIP] add scripts/interwikidata.py .. [WIP] add scripts/interwikidata.py It's interwiki.py but for wikis which work with Wikibase. Change-Id: Ibbb7047d7e6be7b997577b2ea5d662bd6a361af8 --- A scripts/interwikidata.py 1 file changed, 228 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/54/227454/1 diff --git a/scripts/interwikidata.py b/scripts/interwikidata.py new file mode 100644 index 000..cfcc794 --- /dev/null +++ b/scripts/interwikidata.py @@ -0,0 +1,228 @@ +#!/usr/bin/python +# -*- coding: UTF-8 -*- +""" +Script to handle interwiki based on Wikidata. + +These command line parameters can be used to specify which pages to work on: + +¶ms; + +Furthermore, the following command line parameters are supported: + +-langs: Languages to work on. + +-cleanall: Clean all old interwiki from pages in all languages +-clean: Clean only determined languages (e.g. -clean:fa,en,de) + +-createall: Create item in Wikidata when no interwiki could be found. +In all languages. +-create:Create item only in languages determined +(e.g. -create:en,de) +""" + +# (C) Pywikibot team, 2015 +# +# Distributed under the terms of the MIT license. +# +from __future__ import unicode_literals + +__version__ = '$Id$' +# + +import sys + +import pywikibot +from pywikibot import pagegenerators, CurrentPageBot + +# This is required for the text that is shown when you run this script +# with the parameter -help. +docuReplacements = { +'¶ms;': pagegenerators.parameterHelp, +} + +tems = { +'en': ['Db-meta', 'Article for deletion', 'Proposed deletion'], +'nl': [u'Nuweg', u'Artikelweg'], +'de': [u'Löschen'], +'sv': [u"SFFR"], +'fr': [u"Suppression"], +'it': [u"Cancellazione"], +'ru': [u"Db-meta"], +'fa': [u"Db-meta"], +'es': [u"Cdb", u"Propb"], +'ckb': [u'Db'], +'ja': [u"Sakujo"], +'vi': [u"Db-meta", u"Mời biểu quyết", u"Proposed deletion"], +'pt': [u"Apagar", u"ESR"], +'zh': [u"Afd"], +'ca': [u"Supressió diferida"], +'no': [], +'sh': ['Db-meta'], +'fi': [u"Poistokeskustelu"], +'cs': [u"AfD"]} + +summaries = { +'fa': u'ربات: حذف پیوندهای میانویکی که در ویکیداده موجود است.', +'en': u'Bot: Cleaning up interwiki', +} + +langid = { +'en': 'Q328', +'sv': 'Q169514', +'de': 'Q48183', +'it': 'Q11920', +'no': 'Q191769', +'fa': 'Q48952', +'es': 'Q8449', +'pl': 'Q1551807', +'ca': 'Q199693', +'fr': 'Q8447', +'nl': 'Q1', +'pt': 'Q11921', +'ru': 'Q206855', +'vi': 'Q200180', +'be': 'Q877583', +'uk': 'Q199698', +'tr': 'Q58255', +'cs': 'Q191168', +'sh': 'Q58679', +} + +reg = { +'en': ["\[\[Category\:Living people", "\[\[[Cc]ategory\:\d{1,4} births"], +'de': ["DONTMATCHSDFSG", "\[\[[Kk]ategorie\:Geboren \d{1,4}"], +'nl': ["DONTMATCHSDFSG", "DONTMATCHSDFSG"], +'sv': [u"\[\[[Kk]ategori\:Levande personer", u"\[\[[Kk]ategori\:Födda \d{1,4}"], +'fr': [u"\[\[DONTMATCHSDFSG", u"\[\[[Cc]atégorie\:Naissance en \d{1,4}"], +'it': [u"\[\[[Cc]ategoria\:Persone viventi", u"\[\[[Cc]ategoria\:Nati nel \d{1,4}"], +'ru': [u"\[\[Категория\:Ныне живущие", u"\[\[Категория\:Родившиеся в \d{1,4} году"], +'es': [u"\[\[[Cc]ategoría\:Personas vivas", u"\[\[[Cc]ategoría\:Nacidos en \d{1,4}"], +'pl': [u"\[\[DONTMATCHSDFSG", u"\[\[[Kk]ategoria\:Urodzeni w \d{1,4}"], +'ja': [u"\[\[Category\:存命人物", u"\[\[Category\:\d{1,4}年生"], +'vi': [u"\[\[Thể loại\:Nhân vật còn sống", u"\[\[Thể loại\:Sinh \d{1,4}"], +'pt': [u"\[\[Categoria\:Pessoas vivas", u"\[\[Categoria\:Nascidos em \d{1,4}"], +'zh': [u"\[\[Category\:在世人物", u"\[\[Category\:\d{1,4}年出生"], +'ca': [u"\[\[Categoria\:Persones vives", u"\[\[DONTMATCHSDFSG"], +'no': [u"\[\[Kategori\:Biografier om levende personer", u"\[\[Kategori\:Fødsler i \d{1,4}"], +'fi': [u"\[\[Luokka\:Elävät henkilöt", u"\[\[Luokka\:Vuonna \d{1,4} syntyneet"], +'cs': [u"\[\[Kategorie\:Žijící lidé", u"\[\[Kategorie\:Narození \d{1,4}"], +'sh': [u"\[\[Kategorija\:Rođeni \d{1,4}\.", u"\[\[Kategorija\:Žive ličnosti", u"\[\[Kategorija\:Umrli \d{1,4}\."], +'fa': [u"\[\[رده\:افراد زنده", u"\[\[رده\: زادگان "], +} + + +class IWBot(CurrentPageBot): +"""docstring for IWBot""" +def __init__(self, gen, site, clean=False, create=False): +super(IWBot, self).__init__(generator=gen) +self.clean = clean +self.create = create +self.repo = site.data_repository() + +def treat_page(self): +if not self.current_page.exists(): +pywikibot.output('%s does not exist, skipping...' + % self.current_page.title()) +return +
[MediaWiki-commits] [Gerrit] Enable VisualEditor for 5% of new accounts on enwiki - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable VisualEditor for 5% of new accounts on enwiki .. Enable VisualEditor for 5% of new accounts on enwiki Change-Id: Ibf6b200cf6e9699581284535edbb212d15bf6782 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index b7e7a20..e9ce1f2 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12639,6 +12639,7 @@ // 1 => 100% of new accounts; 2 => 50%; 10 => 10%; 20 => 5%; etc. 'wmgVisualEditorNewAccountEnableProportion' => array( 'default' => false, + 'enwiki' => 20, ), // Whether VisualEditor should be enabled for new auto-created accounts on a -- To view, visit https://gerrit.wikimedia.org/r/226338 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf6b200cf6e9699581284535edbb212d15bf6782 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove multi-level subdomains from wikipedia.org - change (operations/dns)
BBlack has submitted this change and it was merged. Change subject: Remove multi-level subdomains from wikipedia.org .. Remove multi-level subdomains from wikipedia.org Bug: T102814 Change-Id: I539c46cbdd0ade484ec4dd985052c66f0870aca9 --- M templates/wikipedia.org 1 file changed, 0 insertions(+), 8 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/wikipedia.org b/templates/wikipedia.org index 4721bac..aba5f77 100644 --- a/templates/wikipedia.org +++ b/templates/wikipedia.org @@ -56,14 +56,6 @@ www 600 IN DYNA geoip!text-addrs zh-tw 600 IN DYNA geoip!text-addrs -; Old double-subdomain aliases (bug 31335) -arbcom.de 600 IN DYNA geoip!text-addrs -arbcom.en 600 IN DYNA geoip!text-addrs -arbcom.fi 600 IN DYNA geoip!text-addrs -arbcom.nl 600 IN DYNA geoip!text-addrs -wg.en 600 IN DYNA geoip!text-addrs - - ; All languages will automatically be included here {{ geolanglist(zero=True) }} -- To view, visit https://gerrit.wikimedia.org/r/227214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I539c46cbdd0ade484ec4dd985052c66f0870aca9 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: BBlack Gerrit-Reviewer: BBlack Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Gather more information about pre rendering 500s - change (mediawiki/core)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/227453 Change subject: Gather more information about pre rendering 500s .. Gather more information about pre rendering 500s Bug: T106740 Change-Id: I4a1436f1724fcc74d4c1076b21fcdb3b5d58b1de --- M includes/jobqueue/jobs/ThumbnailRenderJob.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/227453/1 diff --git a/includes/jobqueue/jobs/ThumbnailRenderJob.php b/includes/jobqueue/jobs/ThumbnailRenderJob.php index a58fa8b..d1d 100644 --- a/includes/jobqueue/jobs/ThumbnailRenderJob.php +++ b/includes/jobqueue/jobs/ThumbnailRenderJob.php @@ -50,7 +50,8 @@ return false; } } elseif ( $wgUploadThumbnailRenderMethod === 'http' ) { - $status = $this->hitThumbUrl( $file, $transformParams ); + $thumbUrl = ''; + $status = $this->hitThumbUrl( $file, $transformParams, $thumbUrl ); wfDebug( __METHOD__ . ": received status {$status}\n" ); @@ -59,7 +60,7 @@ } elseif ( $status ) { // Note that this currently happens (500) when requesting sizes larger then or // equal to the original, which is harmless. - $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status ); + $this->setLastError( __METHOD__ . ': incorrect HTTP status ' . $status . ' when hitting ' . $thumbUrl ); return false; } else { $this->setLastError( __METHOD__ . ': HTTP request failure' ); @@ -75,7 +76,7 @@ } } - protected function hitThumbUrl( $file, $transformParams ) { + protected function hitThumbUrl( $file, $transformParams, &$thumbUrl ) { global $wgUploadThumbnailRenderHttpCustomHost, $wgUploadThumbnailRenderHttpCustomDomain; $thumbName = $file->thumbName( $transformParams ); -- To view, visit https://gerrit.wikimedia.org/r/227453 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4a1436f1724fcc74d4c1076b21fcdb3b5d58b1de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gilles ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cassandra logstash setup - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: Cassandra logstash setup .. Cassandra logstash setup - Sets up a logstash udp input that uses the json codec on port 11514 - Deploys logstash-logback-encoder artifacts on Cassandra hosts - Configures Cassandra to use UDP appender Bug: T100970 Change-Id: Idc5cfc8c5b53e8dac88dbed9e506eee79568903e --- A files/logstash/filter-logback.conf M hieradata/common/role/deployment.yaml M hieradata/labs/deployment-prep/common.yaml M manifests/role/cassandra.pp M manifests/role/logstash.pp M modules/cassandra/manifests/init.pp A modules/cassandra/manifests/logging.pp M modules/cassandra/templates/logback.xml.erb A modules/logstash/manifests/input/udp.pp A modules/logstash/templates/input/udp.erb 10 files changed, 142 insertions(+), 8 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/files/logstash/filter-logback.conf b/files/logstash/filter-logback.conf new file mode 100644 index 000..8af363b --- /dev/null +++ b/files/logstash/filter-logback.conf @@ -0,0 +1,18 @@ +# vim:set sw=2 ts=2 sts=2 et +# Parse logback input +filter { + if [type] == "logback" { +# General message cleanup +mutate { + replace => [ "host", "%{HOSTNAME}" ] + add_tag => [ "logback", "es" ] +} + +if [program] == "cassandra" { + mutate { +replace => [ "type", "cassandra" ] + } +} # end [program] == "cassandra" + + } # end [type] == "logback" +} diff --git a/hieradata/common/role/deployment.yaml b/hieradata/common/role/deployment.yaml index e1f020b..9c07329 100644 --- a/hieradata/common/role/deployment.yaml +++ b/hieradata/common/role/deployment.yaml @@ -99,3 +99,6 @@ kartotherian/deploy: upstream: https://gerrit.wikimedia.org/r/maps/kartotherian/deploy checkout_submodules: true + cassandra/logstash-logback-encoder: +gitfat_enabled: true +upstream: https://gerrit.wikimedia.org/r/operations/software/logstash-logback-encoder diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index bb44777..7856648 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -60,6 +60,7 @@ "cassandra::seeds": - 10.68.17.227 - 10.68.17.189 +cassandra::logging::logstash_host: deployment-logstash2.deployment-prep.eqiad.wmflabs "restbase::seeds": - 10.68.17.227 - 10.68.17.189 diff --git a/manifests/role/cassandra.pp b/manifests/role/cassandra.pp index b739097..e23266b 100644 --- a/manifests/role/cassandra.pp +++ b/manifests/role/cassandra.pp @@ -4,6 +4,7 @@ # Parameters to be set by Hiera class { '::cassandra': } class { '::cassandra::metrics': } +class { '::cassandra::logging': } # temporary collector, T78514 diamond::collector { 'CassandraCollector': diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp index 00fc2e7..47449c1 100644 --- a/manifests/role/logstash.pp +++ b/manifests/role/logstash.pp @@ -31,6 +31,11 @@ port => 12201, } +logstash::input::udp { 'logback': +port => 11514, +codec => 'json', +} + ## Global pre-processing (10) logstash::conf { 'filter_strip_ansi_color': @@ -55,6 +60,11 @@ priority => 20, } +logstash::conf { 'filter_logback': +source => 'puppet:///files/logstash/filter-logback.conf', +priority => 20, +} + ## Application specific processing (50) logstash::conf { 'filter_mediawiki': diff --git a/modules/cassandra/manifests/init.pp b/modules/cassandra/manifests/init.pp index 27ad74e..84e6d9e 100644 --- a/modules/cassandra/manifests/init.pp +++ b/modules/cassandra/manifests/init.pp @@ -350,14 +350,6 @@ require => Package['cassandra'], } -file { '/etc/cassandra/logback.xml': -content => template("${module_name}/logback.xml.erb"), -owner => 'cassandra', -group => 'cassandra', -mode=> '0444', -require => Package['cassandra'], -} - # cassandra-rackdc.properties is used by the # GossipingPropertyFileSnitch. Only render # it if we are using that endpoint_snitch. diff --git a/modules/cassandra/manifests/logging.pp b/modules/cassandra/manifests/logging.pp new file mode 100644 index 000..1b2f54a --- /dev/null +++ b/modules/cassandra/manifests/logging.pp @@ -0,0 +1,62 @@ +# == Class: cassandra::logging +# +# Configure remote logging for Cassandra +# +# === Usage +# class { '::cassandra::logging': +# logstash_host => 'logstash1001.eqiad.wmnet', +# logstash_port => 11514, +# } +# +# === Parameters +# [*logstash_host*] +# The logstash logging server to send to. +# +# [*logstash_port*] +# The logstash logging server port number. + +class cassandra::logging( +$logstash_host = 'logstash1003.eqiad.wmnet', +$logstash_port =
[MediaWiki-commits] [Gerrit] Fix app picker on older devices - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Fix app picker on older devices .. Fix app picker on older devices - Specify appropriate resource package name. - Set intent package name. - Specify some function invariant annotations. This patch was derived from behavior on actual devices rather than documentation. Bug: T106332 Change-Id: Ibbcc0f669f196e8e27c3e828a8305af969429596 --- M wikipedia/src/main/java/org/wikipedia/Utils.java M wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java 2 files changed, 22 insertions(+), 22 deletions(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index 2fce3d0..22e9ed4 100644 --- a/wikipedia/src/main/java/org/wikipedia/Utils.java +++ b/wikipedia/src/main/java/org/wikipedia/Utils.java @@ -361,11 +361,8 @@ * @param uri URI to open in an external browser */ public static void visitInExternalBrowser(final Context context, Uri uri) { -Intent intent = new Intent(); -intent.setAction(Intent.ACTION_VIEW); -intent.setData(uri); - -Intent chooserIntent = ShareUtils.createChooserIntent(intent, null, context); +Intent chooserIntent = ShareUtils.createChooserIntent(new Intent(Intent.ACTION_VIEW, uri), +null, context); if (chooserIntent == null) { // This means that there was no way to handle this link. // We will just show a toast now. FIXME: Make this more visible? diff --git a/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java b/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java index 3201dac..56a5781 100644 --- a/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java +++ b/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java @@ -8,6 +8,7 @@ import android.net.Uri; import android.os.Environment; import android.os.Parcelable; +import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.Log; import android.widget.Toast; @@ -156,18 +157,18 @@ } @Nullable -public static Intent createChooserIntent(Intent targetIntent, - CharSequence chooserTitle, - Context context) { +public static Intent createChooserIntent(@NonNull Intent targetIntent, + @Nullable CharSequence chooserTitle, + @NonNull Context context) { return createChooserIntent(targetIntent, chooserTitle, context, APP_PACKAGE_REGEX); } @Nullable -public static Intent createChooserIntent(Intent targetIntent, - CharSequence chooserTitle, - Context context, +public static Intent createChooserIntent(@NonNull Intent targetIntent, + @Nullable CharSequence chooserTitle, + @NonNull Context context, String packageNameBlacklistRegex) { -List intents = queryIntents(context, targetIntent, packageNameBlacklistRegex); +List intents = queryIntents(context, targetIntent, packageNameBlacklistRegex); if (intents.isEmpty()) { return null; @@ -175,13 +176,13 @@ Intent bestIntent = intents.remove(0); return Intent.createChooser(bestIntent, chooserTitle) -.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents.toArray(new Parcelable[0])); +.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents.toArray(new Parcelable[intents.size()])); } -public static List queryIntents(Context context, - Intent targetIntent, - String packageNameBlacklistRegex) { -List intents = new ArrayList<>(); +public static List queryIntents(@NonNull Context context, +@NonNull Intent targetIntent, +String packageNameBlacklistRegex) { +List intents = new ArrayList<>(); for (ResolveInfo intentActivity : queryIntentActivities(targetIntent, context)) { if (!isIntentActivityBlacklisted(intentActivity, packageNameBlacklistRegex)) { intents.add(buildLabeledIntent(targetIntent, intentActivity)); @@ -190,24 +191,26 @@ return intents; } -public static List queryIntentActivities(Intent intent, Context context) { +public static List queryIntentActivities(Intent intent, @NonNull Context context) { return context.getPackageManager().queryIntentActivities(
[MediaWiki-commits] [Gerrit] Fix NPE in tabbed browsing - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Fix NPE in tabbed browsing .. Fix NPE in tabbed browsing TabsProvider.enterTabMode(Runnable) was meant to handle a null parameter as evidenced by the no parameter version which invokes it with null. This patch adds null protection and specifies @Nullable on the parameter. No known repro steps at this time. Change-Id: Ibdc58bf49cc5551fb00a9352a11486dd5390054f --- M wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java b/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java index a796992..80adf08 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java +++ b/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java @@ -11,6 +11,7 @@ import com.squareup.picasso.Picasso; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.v7.view.ActionMode; import android.view.LayoutInflater; import android.view.Menu; @@ -100,13 +101,15 @@ providerListener.onEnterTabView(); } -private void enterTabMode(Runnable onTabModeEntered) { +private void enterTabMode(@Nullable Runnable onTabModeEntered) { if (tabActionMode != null) { // already inside action mode... // but make sure to update the list of tabs. tabListAdapter.notifyDataSetInvalidated(); tabListView.smoothScrollToPosition(tabList.size() - 1); -onTabModeEntered.run(); +if (onTabModeEntered != null) { +onTabModeEntered.run(); +} return; } parentActivity.startSupportActionMode(new TabActionModeCallback(onTabModeEntered)); -- To view, visit https://gerrit.wikimedia.org/r/227394 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibdc58bf49cc5551fb00a9352a11486dd5390054f Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski Gerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove LibSerializers in EntityParserOutputGeneFactory - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227452 Change subject: Remove LibSerializers in EntityParserOutputGeneFactory .. Remove LibSerializers in EntityParserOutputGeneFactory Change-Id: I632833a6091ce0608cdb1240831756656400da03 --- M repo/includes/EntityParserOutputGeneratorFactory.php M repo/includes/ParserOutputJsConfigBuilder.php M repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php 3 files changed, 12 insertions(+), 55 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/52/227452/1 diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php b/repo/includes/EntityParserOutputGeneratorFactory.php index ce28add..79c13df 100644 --- a/repo/includes/EntityParserOutputGeneratorFactory.php +++ b/repo/includes/EntityParserOutputGeneratorFactory.php @@ -106,7 +106,7 @@ * @return ParserOutputJsConfigBuilder */ private function newParserOutputJsConfigBuilder() { - return new ParserOutputJsConfigBuilder( new SerializationOptions() ); + return new ParserOutputJsConfigBuilder(); } /** diff --git a/repo/includes/ParserOutputJsConfigBuilder.php b/repo/includes/ParserOutputJsConfigBuilder.php index 3a161b6..92beb9e 100644 --- a/repo/includes/ParserOutputJsConfigBuilder.php +++ b/repo/includes/ParserOutputJsConfigBuilder.php @@ -2,10 +2,10 @@ namespace Wikibase; +use DataValues\Serializers\DataValueSerializer; use FormatJson; use Wikibase\DataModel\Entity\Entity; -use Wikibase\Lib\Serializers\SerializationOptions; -use Wikibase\Lib\Serializers\LibSerializerFactory; +use Wikibase\DataModel\SerializerFactory; /** * @since 0.5 @@ -16,27 +16,17 @@ * @author Daniel Werner * @author Daniel Kinzler * @author Katie Filbert < aude.w...@gmail.com > + * @author Adam Shorland */ class ParserOutputJsConfigBuilder { /** -* @var SerializationOptions -*/ - private $serializationOptions; - - /** -* @var LibSerializerFactory +* @var SerializerFactory */ private $serializerFactory; - /** -* @param SerializationOptions $serializationOptions -*/ - public function __construct( - SerializationOptions $serializationOptions - ) { - $this->serializationOptions = $serializationOptions; - $this->serializerFactory = new LibSerializerFactory(); + public function __construct() { + $this->serializerFactory = new SerializerFactory( new DataValueSerializer() ); } /** @@ -67,12 +57,9 @@ * @return string */ private function getSerializedEntity( Entity $entity ) { - $serializer = $this->serializerFactory->newSerializerForEntity( - $entity->getType(), - $this->serializationOptions - ); + $serializer = $this->serializerFactory->newEntitySerializer(); - return $serializer->getSerialized( $entity ); + return $serializer->serialize( $entity ); } } diff --git a/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php b/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php index 7808f3e..5cb79f2 100644 --- a/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php +++ b/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php @@ -2,7 +2,6 @@ namespace Wikibase\Test; -use Language; use MediaWikiTestCase; use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityIdValue; @@ -10,8 +9,6 @@ use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Snak\PropertyValueSnak; -use Wikibase\LanguageFallbackChain; -use Wikibase\LanguageFallbackChainFactory; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\Serializers\LibSerializerFactory; use Wikibase\ParserOutputJsConfigBuilder; @@ -33,7 +30,7 @@ * @dataProvider buildProvider */ public function testBuild( Entity $entity ) { - $configBuilder = $this->getConfigBuilder( 'en', array( 'de', 'en', 'es', 'fr' ) ); + $configBuilder = $this->getConfigBuilder(); $configVars = $configBuilder->build( $entity ); $this->assertInternalType( 'array', $configVars ); @@ -62,37 +59,10 @@ ); } - private function getConfigBuilder( $languageCode, array $languageCodes ) { - $configBuilder = new ParserOutputJsConfigBuilder( - $this->getSerializationOptions( $languageCode, $languageCodes ) - ); + private function getConfigBuilder() { + $configBuilder = new ParserOutputJsConfigBuilder(); return $configBuilder; -
[MediaWiki-commits] [Gerrit] cassandra: restrict data directory permissions - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: cassandra: restrict data directory permissions .. cassandra: restrict data directory permissions Bug: T106133 Change-Id: I59d8552cf71890154b127b8f847b9e035fb80b69 --- M modules/cassandra/manifests/init.pp 1 file changed, 17 insertions(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved Mobrovac: Looks good to me, but someone else must approve diff --git a/modules/cassandra/manifests/init.pp b/modules/cassandra/manifests/init.pp index f87d7bb..27ad74e 100644 --- a/modules/cassandra/manifests/init.pp +++ b/modules/cassandra/manifests/init.pp @@ -307,6 +307,23 @@ ensure => directory, owner => 'cassandra', group => 'cassandra', +mode=> '0750', +require => Package['cassandra'], +} + +file { $commitlog_directory: +ensure => directory, +owner => 'cassandra', +group => 'cassandra', +mode=> '0750', +require => Package['cassandra'], +} + +file { $saved_caches_directory: +ensure => directory, +owner => 'cassandra', +group => 'cassandra', +mode=> '0750', require => Package['cassandra'], } -- To view, visit https://gerrit.wikimedia.org/r/225300 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59d8552cf71890154b127b8f847b9e035fb80b69 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi Gerrit-Reviewer: Eevans Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: GWicke Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Link Previews: TNG - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/227451 Change subject: [WIP] Link Previews: TNG .. [WIP] Link Previews: TNG For entertainment only! Please hold off on commenting/reviewing for now. Change-Id: I8326dba91d76b821d5c58550e20544c55d432808 --- M wikipedia/build.gradle A wikipedia/res/drawable-xxhdpi/checkerboard.png M wikipedia/res/layout/dialog_link_preview.xml D wikipedia/res/layout/dialog_link_preview_2.xml A wikipedia/res/layout/dialog_link_preview_container.xml A wikipedia/res/layout/item_gallery_thumbnail.xml A wikipedia/res/menu/menu_link_preview.xml M wikipedia/res/values/colors.xml M wikipedia/res/values/strings.xml M wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java M wikipedia/src/main/java/org/wikipedia/page/gallery/GalleryActivity.java A wikipedia/src/main/java/org/wikipedia/page/gallery/GalleryCollectionWithThumbFetchTask.java M wikipedia/src/main/java/org/wikipedia/page/gallery/GalleryItem.java A wikipedia/src/main/java/org/wikipedia/page/gallery/GalleryThumbnailScrollView.java M wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java M wikipedia/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewContents.java M wikipedia/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java M wikipedia/src/main/java/org/wikipedia/page/linkpreview/PreviewFetchTask.java A wikipedia/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java M wikipedia/src/main/java/org/wikipedia/search/SearchResultsFragment.java 21 files changed, 596 insertions(+), 353 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/51/227451/1 diff --git a/wikipedia/build.gradle b/wikipedia/build.gradle index d0dd470..a6bb1cd 100644 --- a/wikipedia/build.gradle +++ b/wikipedia/build.gradle @@ -115,6 +115,7 @@ compile 'com.android.support:appcompat-v7:22.2.1' // includes support-v4 compile 'com.android.support:design:22.2.1' +compile 'com.android.support:recyclerview-v7:22.1.1' compile 'com.android.support:percent:22.2.0' compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0' compile 'com.squareup.okhttp:okhttp:2.4.0' diff --git a/wikipedia/res/drawable-xxhdpi/checkerboard.png b/wikipedia/res/drawable-xxhdpi/checkerboard.png new file mode 100644 index 000..e47fd46 --- /dev/null +++ b/wikipedia/res/drawable-xxhdpi/checkerboard.png Binary files differ diff --git a/wikipedia/res/layout/dialog_link_preview.xml b/wikipedia/res/layout/dialog_link_preview.xml index 37db72c..83c7c4f 100755 --- a/wikipedia/res/layout/dialog_link_preview.xml +++ b/wikipedia/res/layout/dialog_link_preview.xml @@ -3,36 +3,56 @@ http://schemas.android.com/apk/res/android"; xmlns:tools="http://schemas.android.com/tools"; android:layout_width="match_parent" -android:layout_height="256dp" -android:orientation="horizontal" +android:layout_height="wrap_content" android:background="?attr/window_background_color"> + + + + + + - - - - +android:layout_height="wrap_content"> + - - - + - + diff --git a/wikipedia/res/layout/dialog_link_preview_2.xml b/wikipedia/res/layout/dialog_link_preview_2.xml deleted file mode 100755 index 8470700..000 --- a/wikipedia/res/layout/dialog_link_preview_2.xml +++ /dev/null @@ -1,90 +0,0 @@ - - -http://schemas.android.com/apk/res/android"; -xmlns:tools="http://schemas.android.com/tools"; -android:layout_width="match_parent" -android:layout_height="256dp" -android:orientation="vertical"> - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/wikipedia/res/layout/dialog_link_preview_container.xml b/wikipedia/res/layout/dialog_link_preview_container.xml new file mode 100644 index 000..02067ed --- /dev/null +++ b/wikipedia/res/layout/dialog_link_preview_container.xml @@ -0,0 +1,12 @@ + + +http://schemas.android.com/apk/res/android"; +android:id="@+id/link_preview_container_list" +android:layout_width="match_parent" +android:layout_height="match_parent" +android:scrollbars="none" +android:overScrollMode="never" +android:listSelector="@null" +android:divider="@null" +android:dividerHeight="0dp" +/> diff --git a/wikipedia/res/layout/item_gallery_thumbnail.xml b/wikipedia/res/layout/item_gallery_thumbnail.xml new file mode 100644 index 000..d8204f7 --- /dev/null +++ b/wikipedia/res/layout/item_gallery_thumbnail.xml @@ -0,0 +1,15 @@ + + +http://sc
[MediaWiki-commits] [Gerrit] imagescalers: convert one host to mpm worker - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: imagescalers: convert one host to mpm worker .. imagescalers: convert one host to mpm worker Change-Id: I652f237ac3e09508214c70b265a04d45d07e90e5 --- A hieradata/hosts/mw1152.yaml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/hosts/mw1152.yaml b/hieradata/hosts/mw1152.yaml new file mode 100644 index 000..d99de5b --- /dev/null +++ b/hieradata/hosts/mw1152.yaml @@ -0,0 +1,2 @@ +apache::mpm::mpm: worker +mediawiki::web::mpm_config::mpm: worker -- To view, visit https://gerrit.wikimedia.org/r/227450 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I652f237ac3e09508214c70b265a04d45d07e90e5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] imagescalers: convert one host to mpm worker - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/227450 Change subject: imagescalers: convert one host to mpm worker .. imagescalers: convert one host to mpm worker Change-Id: I652f237ac3e09508214c70b265a04d45d07e90e5 --- A hieradata/hosts/mw1152.yaml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/50/227450/1 diff --git a/hieradata/hosts/mw1152.yaml b/hieradata/hosts/mw1152.yaml new file mode 100644 index 000..d99de5b --- /dev/null +++ b/hieradata/hosts/mw1152.yaml @@ -0,0 +1,2 @@ +apache::mpm::mpm: worker +mediawiki::web::mpm_config::mpm: worker -- To view, visit https://gerrit.wikimedia.org/r/227450 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I652f237ac3e09508214c70b265a04d45d07e90e5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed various FileBackendDBRepoWrapper errors found in IDE - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed various FileBackendDBRepoWrapper errors found in IDE .. Fixed various FileBackendDBRepoWrapper errors found in IDE Change-Id: I8bf5a1a01ecaae24ffb53eb05896d3d5fc200abf --- M includes/filerepo/FileBackendDBRepoWrapper.php 1 file changed, 7 insertions(+), 8 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filerepo/FileBackendDBRepoWrapper.php b/includes/filerepo/FileBackendDBRepoWrapper.php index 0401d0c..c83e5b1 100644 --- a/includes/filerepo/FileBackendDBRepoWrapper.php +++ b/includes/filerepo/FileBackendDBRepoWrapper.php @@ -46,7 +46,7 @@ protected $dbHandleFunc; /** @var ProcessCacheLRU */ protected $resolvedPathCache; - /** @var Array Map of (index => DBConnRef) */ + /** @var DBConnRef[] */ protected $dbs; public function __construct( array $config ) { @@ -95,7 +95,6 @@ */ public function getBackendPaths( array $paths, $latest = true ) { $db = $this->getDB( $latest ? DB_MASTER : DB_SLAVE ); - $origBasePath = $this->backend->getContainerStoragePath( "{$this->repoName}-original" ); // @TODO: batching $resolved = array(); @@ -105,7 +104,7 @@ continue; } - list( , $container, $rel ) = FileBackend::splitStoragePath( $path ); + list( , $container ) = FileBackend::splitStoragePath( $path ); if ( $container === "{$this->repoName}-public" ) { $name = basename( $path ); @@ -258,7 +257,7 @@ } public function getScopedLocksForOps( array $ops, Status $status ) { - return $this->backend->getScopedFileLocks( $ops, $status ); + return $this->backend->getScopedLocksForOps( $ops, $status ); } /** @@ -271,7 +270,7 @@ */ public function getPathForSHA1( $sha1 ) { if ( strlen( $sha1 ) < 3 ) { - throw new MWException( "Invalid file SHA-1." ); + throw new InvalidArgumentException( "Invalid file SHA-1." ); } return $this->backend->getContainerStoragePath( "{$this->repoName}-original" ) . "/{$sha1[0]}/{$sha1[1]}/{$sha1[2]}/{$sha1}"; @@ -284,11 +283,11 @@ * @return DBConnRef */ protected function getDB( $index ) { - if ( !isset( $this->db[$index] ) ) { + if ( !isset( $this->dbs[$index] ) ) { $func = $this->dbHandleFunc; - $this->db[$index] = $func( $index ); + $this->dbs[$index] = $func( $index ); } - return $this->db[$index]; + return $this->dbs[$index]; } /** -- To view, visit https://gerrit.wikimedia.org/r/226121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8bf5a1a01ecaae24ffb53eb05896d3d5fc200abf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Joel Krauska to the bastiononly group - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Add Joel Krauska to the bastiononly group .. Add Joel Krauska to the bastiononly group Make jkrauska a member of the bastiononly group to allow him to continue to log into the MXes via the bastions: The oit group (of which he is the sole member) has access to the MX servers to debug connection problems (hieradata/role/common/mail/mx.yaml). Since yesterday we've enabled base::firewall on the MX servers and the SSH ferm rules only now permit logins through the bastion hosts. Change-Id: Ic88dbaa19d3484766baa95288be8c35eb04eacfc --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 83f4c33..d726f2e 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -65,7 +65,7 @@ bastiononly: gid: 707 description: these folks are allowed bastion _only_ access -members: [jforrester, jmorgan, msyed, +members: [jforrester, jmorgan, msyed, jkrauska, haithams, mhurd, dbrant, kleduc, bsitzmann, deskana, jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, jkatz, bmansurov, west1, jhernandez, smalyshev, ananthrk, tbayer, zfilipin, -- To view, visit https://gerrit.wikimedia.org/r/227449 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic88dbaa19d3484766baa95288be8c35eb04eacfc Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clear the stat cache in addMissingMetadata() to avoid more P... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Clear the stat cache in addMissingMetadata() to avoid more POSTs .. Clear the stat cache in addMissingMetadata() to avoid more POSTs Change-Id: Icc075e424bdbed6868692ec734dff1e7d2003dd6 --- M includes/filebackend/SwiftFileBackend.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index 2ccafe4..1aab033 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -693,6 +693,8 @@ 'headers' => $this->authTokenHeaders( $auth ) + $objHdrs ) ); if ( $rcode >= 200 && $rcode <= 299 ) { + $this->deleteFileCache( $path ); + return $objHdrs; // success } } -- To view, visit https://gerrit.wikimedia.org/r/226332 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc075e424bdbed6868692ec734dff1e7d2003dd6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Provide useful error details when publishing fails - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Provide useful error details when publishing fails .. Provide useful error details when publishing fails From our logs, we see 4 main reasons for publishing failures. 1. Timeout. Related to network. 2. spamblacklist catching URLs in translation. 3. User blocked from editing. Now we don't allow these users to see Special:CX at all, see Ib6cdcc2e5f6e7fc631e5ff7d1d3a4f812f5fa6a6 4. Parsoid failed to convert the HTML to wikitext. For all of these, provide a brief hint in the publishing error message. Testplan: Here is a way to trick CX and create a publishing error: Translate any article. Add a section without any reference to translation. Clear the paragraph completely. The publish button will get disabled. Now type a space in the empty paragraph. The publish button will get enabled again. Publish the page and get the error: "An error occurred while publishing the translation. Please try to publish the page again. Error: html cannot be empty". Bug: T100498 Change-Id: Ia96ec15a4d44c7c1403542bdd1e25660984fad8b --- M extension.json M i18n/en.json M i18n/qqq.json M modules/publish/ext.cx.publish.js 4 files changed, 21 insertions(+), 5 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index c20fdb5..ea27279 100644 --- a/extension.json +++ b/extension.json @@ -631,7 +631,8 @@ "cx-publish-page-success", "cx-publish-page-error", "cx-publish-button-publishing", - "cx-publish-captcha-title" + "cx-publish-captcha-title", + "unknown-error" ] }, "ext.cx.wikibase.link": { diff --git a/i18n/en.json b/i18n/en.json index 2d3355b..5a571d8 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -28,7 +28,7 @@ "cx-header-all-translations": "All translations", "cx-source-view-page": "view page", "cx-publish-page-success": "Page published at $1", - "cx-publish-page-error": "An error occurred while saving the page. Please try to publish the page again.", + "cx-publish-page-error": "An error occurred while publishing the translation. Please try to publish the page again. Error: $1", "cx-publish-button": "Publish translation", "cx-publish-button-publishing": "Publishing...", "cx-publish-summary": "Created by translating the page \"$1\"", diff --git a/i18n/qqq.json b/i18n/qqq.json index 39098d5..520a025 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -33,7 +33,7 @@ "cx-header-all-translations": "A link at the top of the translation interface to the main Special:ContentTranslation page that lists all translations by the user.\n{{Identical|All translations}}", "cx-source-view-page": "A link that points to the source page under the heading of the source column.\n{{Identical|View page}}", "cx-publish-page-success": "Message shown when page is published successfully. Parameters:\n* $1 - Link to the published page", - "cx-publish-page-error": "Error message to display when page saving fails.", + "cx-publish-page-error": "Error message to display when page saving fails.\n* $1 - Error details", "cx-publish-button": "Publish button text in [[Special:ContentTranslation]].\n\nAlso used in {{msg-mw|Cx-tools-instructions-text6}}.", "cx-publish-button-publishing": "Publish button text in [[Special:ContentTranslation]], shown while publishing is in progress. Replaces {{msg-mw|cx-publish-button}}.\n{{Identical|Publishing}}", "cx-publish-summary": "This is an automatic edit summary for pages that were created by [[Special:ContentTranslation]].\n\nParameters:\n* $1 - the source page name", diff --git a/modules/publish/ext.cx.publish.js b/modules/publish/ext.cx.publish.js index 2ff31eb..03a17e4 100644 --- a/modules/publish/ext.cx.publish.js +++ b/modules/publish/ext.cx.publish.js @@ -292,7 +292,9 @@ * @param {object} details */ CXPublish.prototype.onFail = function ( code, details ) { - var trace = { + var trace, error; + + trace = { sourceLanguage: mw.cx.sourceLanguage, targetLanguage: mw.cx.targetLanguage, sourceTitle: mw.cx.sourceTitle, @@ -309,7 +311,20 @@ JSON.stringify( details ) ); - mw.hook( 'mw.cx.error' ).fire( mw.msg( 'cx-publish-page-error' ) ); + // Try providing useful error information. "Unknown" by default. + error = mw.msg( 'unknown-error' ); + if ( details.error && details.error.info ) { +
[MediaWiki-commits] [Gerrit] Revert "Make label view multiline by default" - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Make label view multiline by default" .. Revert "Make label view multiline by default" This reverts commit 8508d3bf812577920842cfe682739f9594cda478 Bug: T106327 Change-Id: Ic2008f5f0c68fd685aaacc1012732dfc85e9f786 --- M view/resources/jquery/wikibase/jquery.wikibase.labelview.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js M view/tests/qunit/jquery/wikibase/jquery.wikibase.labelview.tests.js 3 files changed, 13 insertions(+), 23 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/view/resources/jquery/wikibase/jquery.wikibase.labelview.js b/view/resources/jquery/wikibase/jquery.wikibase.labelview.js index 3564a36..0715d96 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.labelview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.labelview.js @@ -38,7 +38,6 @@ $entityId: '.wikibase-labelview-entityid' }, value: null, - inputNodeName: 'TEXTAREA', helpMessage: mw.msg( 'wikibase-label-input-help-message' ), entityId: null, showEntityId: false @@ -55,7 +54,6 @@ !( this.options.value instanceof wb.datamodel.Term ) || !this.options.entityId || !this.options.labelsChanger - || this.options.inputNodeName !== 'INPUT' && this.options.inputNodeName !== 'TEXTAREA' ) { throw new Error( 'Required option not specified properly' ); } @@ -144,7 +142,7 @@ return deferred.resolve().promise(); } - var $input = $( document.createElement( this.options.inputNodeName ) ); + var $input = $( '' ); $input .addClass( this.widgetFullName + '-input' ) @@ -156,11 +154,6 @@ ) .attr( 'lang', languageCode ) .attr( 'dir', $.util.getDirectionality( languageCode ) ) - .on( 'keydown.' + this.widgetName, function( event ) { - if( event.keyCode === $.ui.keyCode.ENTER ) { - event.preventDefault(); - } - } ) .on( 'eachchange.' + this.widgetName, function( event ) { self._trigger( 'change' ); } ); @@ -170,10 +163,7 @@ } if( $.fn.inputautoexpand ) { - $input.inputautoexpand( { - expandHeight: true, - suppressNewLine: true - } ); + $input.inputautoexpand(); } this.$text.empty().append( $input ); @@ -203,7 +193,7 @@ */ _afterStopEditing: function( dropValue ) { if( dropValue && this.options.value.getText() === '' ) { - this.$text.children( '.' + this.widgetFullName + '-input' ).val( '' ); + this.$text.children( 'input' ).val( '' ); } return PARENT.prototype._afterStopEditing.call( this, dropValue ); }, @@ -237,7 +227,7 @@ var response = PARENT.prototype._setOption.call( this, key, value ); if( key === 'disabled' && this.isInEditMode() ) { - this.$text.children( '.' + this.widgetFullName + '-input' ).prop( 'disabled', value ); + this.$text.children( 'input' ).prop( 'disabled', value ); } return response; @@ -261,7 +251,7 @@ return new wb.datamodel.Term( this.options.value.getLanguageCode(), - $.trim( this.$text.children( '.' + this.widgetFullName + '-input' ).val() ) + $.trim( this.$text.children( 'input' ).val() ) ); }, @@ -270,7 +260,7 @@ */ focus: function() { if( this.isInEditMode() ) { - this.$text.children( '.' + this.widgetFullName + '-input' ).focus(); + this.$text.children( 'input' ).focus(); } else { this.element.focus(); } diff --git a/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js b/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js index 860f792..52be41b 100644 --- a/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js +++ b/view/tests/qunit/jquery/wikibase/jquery.wikibase.entitytermsforlanguageview.tests.js @@ -196,7 +196,7 @@ } );
[MediaWiki-commits] [Gerrit] git deploy: don't fetch/checkout/restart on the deployment s... - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: git deploy: don't fetch/checkout/restart on the deployment server .. git deploy: don't fetch/checkout/restart on the deployment server Bug: T67549 Change-Id: Ib206f3820e5aa11ff6d26e777609b5692f74dd4f --- M modules/deployment/files/runners/deploy.py 1 file changed, 17 insertions(+), 7 deletions(-) Approvals: Thcipriani: Looks good to me, but someone else must approve Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/modules/deployment/files/runners/deploy.py b/modules/deployment/files/runners/deploy.py index 5bfde5c..22f579a 100755 --- a/modules/deployment/files/runners/deploy.py +++ b/modules/deployment/files/runners/deploy.py @@ -12,12 +12,15 @@ ''' Fetch from a master, for the specified repo ''' -grain = "deployment_target:" + repo +deployment_target = "deployment_target:" + repo +deployment_server = "deployment_server:*" +targets = "G@{0} and not G@{1}".format(deployment_target, + deployment_server) client = salt.client.LocalClient(__opts__['conf_file']) cmd = 'deploy.fetch' # comma in the tuple is a workaround for a bug in salt arg = (repo,) -client.cmd(grain, cmd, expr_form='grain', arg=arg, timeout=1, +client.cmd(targets, cmd, expr_form='compound', arg=arg, timeout=1, ret='deploy_redis') print "Fetch completed" @@ -26,11 +29,14 @@ ''' Checkout from a master, for the specified repo ''' -grain = "deployment_target:" + repo +deployment_target = "deployment_target:" + repo +deployment_server = "deployment_server:*" +targets = "G@{0} and not G@{1}".format(deployment_target, + deployment_server) client = salt.client.LocalClient(__opts__['conf_file']) cmd = 'deploy.checkout' arg = (repo, reset) -client.cmd(grain, cmd, expr_form='grain', arg=arg, timeout=1, +client.cmd(targets, cmd, expr_form='compound', arg=arg, timeout=1, ret='deploy_redis') print "Checkout completed" @@ -40,14 +46,18 @@ Restart the service associated with this repo. If no service is associated this call will do nothing. ''' -grain = "deployment_target:" + repo +deployment_target = "deployment_target:" + repo +deployment_server = "deployment_server:*" +targets = "G@{0} and not G@{1}".format(deployment_target, + deployment_server) client = salt.client.LocalClient(__opts__['conf_file']) cmd = 'deploy.restart' # comma in the tuple is a workaround for a bug in salt arg = (repo,) ret = [] -for data in client.cmd_batch(grain, cmd, expr_form='grain', arg=arg, - timeout=60, ret='deploy_redis', batch=batch): +for data in client.cmd_batch(targets, cmd, expr_form='compound', + arg=arg, timeout=60, + ret='deploy_redis', batch=batch): ret.append(data) print "Restart completed" return ret -- To view, visit https://gerrit.wikimedia.org/r/212291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib206f3820e5aa11ff6d26e777609b5692f74dd4f Gerrit-PatchSet: 7 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn Gerrit-Reviewer: 20after4 Gerrit-Reviewer: ArielGlenn Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Chad Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Joel Krauska to the bastiononly group - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/227449 Change subject: Add Joel Krauska to the bastiononly group .. Add Joel Krauska to the bastiononly group Make jkrauska a member of the bastiononly group to allow him to continue to log into the MXes via the bastions: The oit group (of which he is the sole member) has access to the MX servers to debug connection problems (hieradata/role/common/mail/mx.yaml). Since yesterday we've enabled base::firewall on the MX servers and the SSH ferm rules only now permit logins through the bastion hosts. Change-Id: Ic88dbaa19d3484766baa95288be8c35eb04eacfc --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/49/227449/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index f0d757c..bff1bb9 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -65,7 +65,7 @@ bastiononly: gid: 707 description: these folks are allowed bastion _only_ access -members: [jforrester, jmorgan, msyed, +members: [jforrester, jmorgan, msyed, jkrauska, haithams, mhurd, dbrant, kleduc, bsitzmann, deskana, jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, jkatz, bmansurov, west1, jhernandez, smalyshev, ananthrk, tbayer, zfilipin, -- To view, visit https://gerrit.wikimedia.org/r/227449 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic88dbaa19d3484766baa95288be8c35eb04eacfc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Upgrade to jscs 2.0 - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Upgrade to jscs 2.0 .. Upgrade to jscs 2.0 Disable some rules that we don't yet follow. Ignore extensions directory that may be there from composer. Bug: T107124 Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be --- M .jscsrc M package.json 2 files changed, 18 insertions(+), 4 deletions(-) Approvals: Aude: Looks good to me, approved Addshore: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc index f66f6bd..312c030 100644 --- a/.jscsrc +++ b/.jscsrc @@ -3,12 +3,26 @@ "preset": "wikimedia", // - // Rules from wikimedia preset we don't follow + // Rules from wikimedia preset we don't yet? follow "validateIndentation": null, "requireMultipleVarDecl": null, "disallowDanglingUnderscores": null, - "requireSpacesInsideArrayBrackets": null, + "requireSpacesInsideBrackets": null, + "requireVarDeclFirst": null, + "jsDoc": { + // what we don't yet follow is commented out + //"checkAnnotations": "jsduck5", + //"checkParamNames": true, + "requireParamTypes": true, + "checkRedundantParams": true, + //"checkReturnTypes": true, + "checkRedundantReturns": true, + //"requireReturnTypes": true, + //"checkTypes": "capitalizedNativeCase", + "checkRedundantAccess": true + //"requireNewlineAfterDescription": true + }, // // Own rules @@ -24,5 +38,5 @@ "else" ], - "excludeFiles": [ "node_modules/**", "vendor/**" ] + "excludeFiles": [ "node_modules/**", "vendor/**", "extensions/**" ] } diff --git a/package.json b/package.json index 2e22208..43022cd 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "author": "The Wikidata team", "license": "GPL-2.0+", "devDependencies": { - "jscs": "", + "jscs": ">=2.0", "jshint": "" } } -- To view, visit https://gerrit.wikimedia.org/r/227447 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.26wmf16 Gerrit-Owner: Aude Gerrit-Reviewer: Addshore Gerrit-Reviewer: Aude Gerrit-Reviewer: JanZerebecki Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adjust build/artifact retention for mw-selenium job - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Adjust build/artifact retention for mw-selenium job .. Adjust build/artifact retention for mw-selenium job In preparation for video recording, the mw-selenium job was modified to only keep builds for 15 days and artifacts (including potentially larger video files) for 3 days. Bug: T104583 Change-Id: Idb9e4e1c14ed6e3e9239ce8f7dd843e267c818d1 --- M jjb/mediawiki-extensions.yaml 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml index 7ea3290..bcfe56b 100644 --- a/jjb/mediawiki-extensions.yaml +++ b/jjb/mediawiki-extensions.yaml @@ -204,6 +204,9 @@ - localhost-cleanup - mw-teardown-mysql - archive-log-dir +logrotate: + daysToKeep: 15 + artifactDaysToKeep: 3 - job-template: name: 'mwext-{name}-whitespaces' -- To view, visit https://gerrit.wikimedia.org/r/226650 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb9e4e1c14ed6e3e9239ce8f7dd843e267c818d1 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Dduvall Gerrit-Reviewer: Hashar Gerrit-Reviewer: Zfilipin Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improved addMissingMetadata() on POST failure - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Improved addMissingMetadata() on POST failure .. Improved addMissingMetadata() on POST failure * If the POST failed but the sha1 was computed, then use and cache that value rather than "false". Change-Id: I42b53c823013ecd9b281406e3d533a21e0de7cfb --- M includes/filebackend/SwiftFileBackend.php 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index 2ccafe4..e9df205 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -670,10 +670,10 @@ $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" ); wfDebugLog( 'SwiftBackend', __METHOD__ . ": $path was not stored with SHA-1 metadata." ); + $objHdrs['x-object-meta-sha1base36'] = false; + $auth = $this->getAuthentication(); if ( !$auth ) { - $objHdrs['x-object-meta-sha1base36'] = false; - return $objHdrs; // failed } @@ -700,7 +700,6 @@ } wfDebugLog( 'SwiftBackend', __METHOD__ . ": unable to set SHA-1 metadata for $path" ); - $objHdrs['x-object-meta-sha1base36'] = false; return $objHdrs; // failed } -- To view, visit https://gerrit.wikimedia.org/r/226405 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I42b53c823013ecd9b281406e3d533a21e0de7cfb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Consistent wording of tog-enotifwatchlistpages - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Consistent wording of tog-enotifwatchlistpages .. Consistent wording of tog-enotifwatchlistpages Improve the grammar of this message itself and refer to it using {{int:}} from apihelp-setnotificationtimestamp-description, instead of duplicating it. Change-Id: Ie29c22607ff0176a602a1d695edda12baee18781 --- M includes/api/i18n/en.json M languages/i18n/en.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index 46440e5..639611a 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -1059,7 +1059,7 @@ "apihelp-rsd-description": "Export an RSD (Really Simple Discovery) schema.", "apihelp-rsd-example-simple": "Export the RSD schema.", - "apihelp-setnotificationtimestamp-description": "Update the notification timestamp for watched pages.\n\nThis affects the highlighting of changed pages in the watchlist and history, and the sending of email when the \"Email me when a page on my watchlist is changed\" preference is enabled.", + "apihelp-setnotificationtimestamp-description": "Update the notification timestamp for watched pages.\n\nThis affects the highlighting of changed pages in the watchlist and history, and the sending of email when the \"{{int:tog-enotifwatchlistpages}}\" preference is enabled.", "apihelp-setnotificationtimestamp-param-entirewatchlist": "Work on all watched pages.", "apihelp-setnotificationtimestamp-param-timestamp": "Timestamp to which to set the notification timestamp.", "apihelp-setnotificationtimestamp-param-torevid": "Revision to set the notification timestamp to (one page only).", diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 97f1310..3a02068 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -21,7 +21,7 @@ "tog-minordefault": "Mark all edits minor by default", "tog-previewontop": "Show preview before edit box", "tog-previewonfirst": "Show preview on first edit", - "tog-enotifwatchlistpages": "Email me when a page or file on my watchlist is changed", + "tog-enotifwatchlistpages": "Email me when a page or a file on my watchlist is changed", "tog-enotifusertalkpages": "Email me when my user talk page is changed", "tog-enotifminoredits": "Email me also for minor edits of pages and files", "tog-enotifrevealaddr": "Reveal my email address in notification emails", -- To view, visit https://gerrit.wikimedia.org/r/227265 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie29c22607ff0176a602a1d695edda12baee18781 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80 Gerrit-Reviewer: Amire80 Gerrit-Reviewer: Anomie Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits