[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Remove WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390178 ) Change subject: Remove WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment .. Remove WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment Empty comments are useful as paragraph breaks in multi-paragraph comments, which improves readability of long comments. OTOH there isn't really any unwanted behavior prevented by this rule that would be likely to occur in the wild - it is easy get the spacing accidentaly, but accidentally leaving empty comments is not likely to happen. I've looked at only exempting empty comments when preceded and followed by a comment, but PHP_CodeSniffer\Files\File is not really amenable to line-based operations and it did not seem worth the effort. Change-Id: I30e99d3e36fe3f18d56bc8fbae1b6e62471d81ea --- M MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php M MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.expect 2 files changed, 1 insertion(+), 8 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified Thiemo Mättig (WMDE): Looks good to me, but someone else must approve diff --git a/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php b/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php index 68b1a49..647d624 100644 --- a/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php +++ b/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php @@ -54,10 +54,7 @@ ( $currToken['content'][0] === '#' && rtrim( $currToken['content'] ) === '#' ) ) { - $phpcsFile->addWarning( 'Unnecessary empty comment found', - $stackPtr, - 'EmptyComment' - ); + return; // Checking whether there is a space between the comment delimiter // and the comment } elseif ( substr( $currToken['content'], 0, 2 ) === '//' ) { diff --git a/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.expect b/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.expect index 53f88e7..b4d2e45 100644 --- a/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.expect +++ b/MediaWiki/Tests/files/WhiteSpace/space_before_singleline_comment.php.expect @@ -1,11 +1,7 @@ 8 | WARNING | [x] Single space expected between "//" and comment | | (MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment) - 9 | WARNING | [ ] Unnecessary empty comment found -| | (MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment) 10 | WARNING | [x] Single space expected between "#" and comment | | (MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment) - 11 | WARNING | [ ] Unnecessary empty comment found -| | (MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment) 12 | WARNING | [x] Single space expected between "//" and comment | | (MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment) 13 | WARNING | [x] Single space expected between "#" and comment -- To view, visit https://gerrit.wikimedia.org/r/390178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30e99d3e36fe3f18d56bc8fbae1b6e62471d81ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Addshore Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Use upstream Generic.Files.OneObjectStructurePerFile sniff
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390373 ) Change subject: Use upstream Generic.Files.OneObjectStructurePerFile sniff .. Use upstream Generic.Files.OneObjectStructurePerFile sniff Our own OneClassPerFileSniff was just a copy of the proposed upstream sniff before it was released. Change-Id: I208bb58b9486f29b71c6c880da14744221541b06 --- D MediaWiki/Sniffs/Files/OneClassPerFileSniff.php M MediaWiki/Tests/files/Commenting/commenting_function.php.expect M MediaWiki/Tests/files/Usage/extend_class_usage.php.expect M MediaWiki/Tests/files/VariableAnalysis/used_global_variables_regression.php.expect M MediaWiki/Tests/files/WhiteSpace/space_before_class_brace.php.expect M MediaWiki/ruleset.xml 6 files changed, 26 insertions(+), 67 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer refs/changes/73/390373/1 diff --git a/MediaWiki/Sniffs/Files/OneClassPerFileSniff.php b/MediaWiki/Sniffs/Files/OneClassPerFileSniff.php deleted file mode 100644 index 9126f99..000 --- a/MediaWiki/Sniffs/Files/OneClassPerFileSniff.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @copyright 2010-2014 Andy Grunwald - * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence - */ - -namespace MediaWiki\Sniffs\Files; - -use PHP_CodeSniffer\Sniffs\Sniff; -use PHP_CodeSniffer\Files\File; - -class OneClassPerFileSniff implements Sniff { - - /** -* Returns an array of tokens this test wants to listen for. -* -* @return array -*/ - public function register() { - return [ T_CLASS, T_INTERFACE, T_TRAIT ]; - } - - /** -* Processes this sniff, when one of its tokens is encountered. -* -* @param File $phpcsFile File being scanned -* @param int $stackPtr Position -* -* @return void -*/ - public function process( File $phpcsFile, $stackPtr ) { - $nextClass = $phpcsFile->findNext( $this->register(), ( $stackPtr + 1 ) ); - if ( $nextClass !== false ) { - $error = 'Only one class is allowed in a file'; - $phpcsFile->addError( $error, $nextClass, 'MultipleFound' ); - } - } - -} diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect index cc41b76..67d5a66 100644 --- a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect +++ b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect @@ -173,8 +173,8 @@ | | (MediaWiki.Commenting.FunctionComment.SpacingDocStar) 168 | ERROR | [x] Expected 1 spaces before @return; 2 found | | (MediaWiki.Commenting.FunctionComment.SpacingDocTag) - 175 | ERROR | [ ] Only one class is allowed in a file - | | (MediaWiki.Files.OneClassPerFile.MultipleFound) - 242 | ERROR | [ ] Only one class is allowed in a file - | | (MediaWiki.Files.OneClassPerFile.MultipleFound) + 175 | ERROR | [ ] Only one object structure is allowed in a file + | | (Generic.Files.OneObjectStructurePerFile.MultipleFound) + 242 | ERROR | [ ] Only one object structure is allowed in a file + | | (Generic.Files.OneObjectStructurePerFile.MultipleFound) PHPCBF CAN FIX THE 72 MARKED SNIFF VIOLATIONS AUTOMATICALLY diff --git a/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect b/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect index d0ca636..7d097fc 100644 --- a/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect +++ b/MediaWiki/Tests/files/Usage/extend_class_usage.php.expect @@ -1,15 +1,15 @@ 16 | WARNING | Should use function $this->msg() rather than function | | wfMessage() . | | (MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage) - 27 | ERROR | Only one class is allowed in a file -| | (MediaWiki.Files.OneClassPerFile.MultipleFound) - 51 | ERROR | Only one class is allowed in a file -| | (MediaWiki.Files.OneClassPerFile.MultipleFound) + 27 | ERROR | Only one object structure is allowed in a file +| | (Generic.Files.OneObjectStructurePerFile.MultipleFound) + 51 | ERROR | Only one object structure is allowed in a file +| | (Generic.Files.OneObjectStructurePerFile.MultipleFound) 64 | WARNING | Should use function $this->getUser() rather than variable | | $wgUser . | | (MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage) - 75 | ERROR | Only one class is allowed in a file -| | (MediaWiki.Files.OneClassPerFile.MultipleFound) + 75 | ERROR | Only one object structure is allowed in a file +| | (Generic.Files.OneObjectStructurePerFile.MultipleFound) 93 | WARNING | Should use function $this->getRequest() rather than
[MediaWiki-commits] [Gerrit] mediawiki...GraphViz[master]: SquidUpdate => CdnCacheUpdate
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390372 ) Change subject: SquidUpdate => CdnCacheUpdate .. SquidUpdate => CdnCacheUpdate Change-Id: I3b5ecce459954ac49145b500aa4080ff23d3c802 --- M UploadLocalFile.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GraphViz refs/changes/72/390372/1 diff --git a/UploadLocalFile.php b/UploadLocalFile.php index 6960e07..2874677 100644 --- a/UploadLocalFile.php +++ b/UploadLocalFile.php @@ -447,7 +447,7 @@ $this->purgeThumbnails(); # Remove the old file from the squid cache - SquidUpdate::purge( [ $this->getURL() ] ); + CdnCacheUpdate::purge( [ $this->getURL() ] ); } # Invalidate cache for all pages using this file -- To view, visit https://gerrit.wikimedia.org/r/390372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b5ecce459954ac49145b500aa4080ff23d3c802 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GraphViz Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...InterwikiIntegration[master]: SquidUpdate => CdnCacheUpdate
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390371 ) Change subject: SquidUpdate => CdnCacheUpdate .. SquidUpdate => CdnCacheUpdate Change-Id: I012434352935b88cd37985e5dc61b4fa1f6f3662 --- M InterwikiIntegration.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InterwikiIntegration refs/changes/71/390371/1 diff --git a/InterwikiIntegration.hooks.php b/InterwikiIntegration.hooks.php index d1cf58c..65abb30 100644 --- a/InterwikiIntegration.hooks.php +++ b/InterwikiIntegration.hooks.php @@ -288,7 +288,7 @@ } if ( $result ) { - SquidUpdate::purge ( $purgeArray ); + CdnCacheUpdate::purge ( $purgeArray ); } return true; } -- To view, visit https://gerrit.wikimedia.org/r/390371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I012434352935b88cd37985e5dc61b4fa1f6f3662 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/InterwikiIntegration Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: SquidUpdate => CdnCacheUpdate
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390370 ) Change subject: SquidUpdate => CdnCacheUpdate .. SquidUpdate => CdnCacheUpdate Change-Id: I67487909070cbdbfaa32fd249d5c4d7db560511d --- M MathTexvc.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/70/390370/1 diff --git a/MathTexvc.php b/MathTexvc.php index cd692de..8cc8e1d 100644 --- a/MathTexvc.php +++ b/MathTexvc.php @@ -363,7 +363,7 @@ // If we're replacing an older version of the image, make sure it's current. if ( $updated && $wgUseSquid ) { $urls = [ $this->getMathImageUrl() ]; - $u = new SquidUpdate( $urls ); + $u = new CdnCacheUpdate( $urls ); $u->doUpdate(); } -- To view, visit https://gerrit.wikimedia.org/r/390370 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67487909070cbdbfaa32fd249d5c4d7db560511d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: SquidUpdate => CdnCacheUpdate
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390369 ) Change subject: SquidUpdate => CdnCacheUpdate .. SquidUpdate => CdnCacheUpdate Change-Id: Ie88eb536d6daaef9c7c04537e4e40211ef40beda --- M backend/FRExtraCacheUpdate.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs refs/changes/69/390369/1 diff --git a/backend/FRExtraCacheUpdate.php b/backend/FRExtraCacheUpdate.php index b95a1b4..28cf2bb 100644 --- a/backend/FRExtraCacheUpdate.php +++ b/backend/FRExtraCacheUpdate.php @@ -124,7 +124,7 @@ $titles = Title::newFromIDs( $ids ); # Update squid cache if ( $wgUseSquid ) { - $u = SquidUpdate::newFromTitles( $titles ); + $u = CdnCacheUpdate::newFromTitles( $titles ); $u->doUpdate(); } # Update file cache -- To view, visit https://gerrit.wikimedia.org/r/390369 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie88eb536d6daaef9c7c04537e4e40211ef40beda Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FlaggedRevs Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: wiki-replicas.sql: Add quarry user with 48 conn
Marostegui has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390368 ) Change subject: wiki-replicas.sql: Add quarry user with 48 conn .. wiki-replicas.sql: Add quarry user with 48 conn Bug: T180141 Change-Id: Ic6815ecb4c50139a38beb9247fab1a1f34595614 --- M modules/role/templates/mariadb/grants/wiki-replicas.sql 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/role/templates/mariadb/grants/wiki-replicas.sql b/modules/role/templates/mariadb/grants/wiki-replicas.sql index 49f81c6..bc90877 100644 --- a/modules/role/templates/mariadb/grants/wiki-replicas.sql +++ b/modules/role/templates/mariadb/grants/wiki-replicas.sql @@ -26,3 +26,6 @@ -- viewmater user GRANT SELECT ON *.* TO 'viewmaster'@'%' + +-- quarry user granted 48 connections #T180141 +GRANT USAGE ON *.* TO 's52788'@'%' WITH MAX_USER_CONNECTIONS 48; -- To view, visit https://gerrit.wikimedia.org/r/390368 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic6815ecb4c50139a38beb9247fab1a1f34595614 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MarosteguiGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: wiki-replicas.sql: Add quarry user with 48 conn
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390368 ) Change subject: wiki-replicas.sql: Add quarry user with 48 conn .. wiki-replicas.sql: Add quarry user with 48 conn Bug: T180141 Change-Id: Ic6815ecb4c50139a38beb9247fab1a1f34595614 --- M modules/role/templates/mariadb/grants/wiki-replicas.sql 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/68/390368/1 diff --git a/modules/role/templates/mariadb/grants/wiki-replicas.sql b/modules/role/templates/mariadb/grants/wiki-replicas.sql index 49f81c6..bc90877 100644 --- a/modules/role/templates/mariadb/grants/wiki-replicas.sql +++ b/modules/role/templates/mariadb/grants/wiki-replicas.sql @@ -26,3 +26,6 @@ -- viewmater user GRANT SELECT ON *.* TO 'viewmaster'@'%' + +-- quarry user granted 48 connections #T180141 +GRANT USAGE ON *.* TO 's52788'@'%' WITH MAX_USER_CONNECTIONS 48; -- To view, visit https://gerrit.wikimedia.org/r/390368 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6815ecb4c50139a38beb9247fab1a1f34595614 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Marostegui___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Convert @var Array => array
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390367 ) Change subject: Convert @var Array => array .. Convert @var Array => array Change-Id: Ie5c2d7b8e73cce74af982a5c54b0d487a7f6981d --- M includes/DefaultSettings.php M includes/libs/HashRing.php 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/67/390367/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index d9f032c..3cd7ef1 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5785,7 +5785,7 @@ ]; /** - * @var Array Map of (grant => right => boolean) + * @var array Map of (grant => right => boolean) * Users authorize consumers (like Apps) to act on their behalf but only with * a subset of the user's normal account rights (signed off on by the user). * The possible rights to grant to a consumer are bundled into groups called @@ -5887,7 +5887,7 @@ $wgGrantPermissions['privateinfo']['viewmyprivateinfo'] = true; /** - * @var Array Map of grants to their UI grouping + * @var array Map of grants to their UI grouping * @since 1.27 */ $wgGrantPermissionGroups = [ diff --git a/includes/libs/HashRing.php b/includes/libs/HashRing.php index f61c139..21558f7 100644 --- a/includes/libs/HashRing.php +++ b/includes/libs/HashRing.php @@ -26,14 +26,14 @@ * @since 1.22 */ class HashRing { - /** @var Array (location => weight) */ + /** @var array (location => weight) */ protected $sourceMap = []; - /** @var Array (location => (start, end)) */ + /** @var array (location => (start, end)) */ protected $ring = []; /** @var HashRing|null */ protected $liveRing; - /** @var Array (location => UNIX timestamp) */ + /** @var array (location => UNIX timestamp) */ protected $ejectionExpiries = []; /** @var int UNIX timestamp */ protected $ejectionNextExpiry = INF; -- To view, visit https://gerrit.wikimedia.org/r/390367 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5c2d7b8e73cce74af982a5c54b0d487a7f6981d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1055
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390366 ) Change subject: db-eqiad.php: Depool db1055 .. db-eqiad.php: Depool db1055 Going to copy db1055 to db1105 Bug: T178359 Change-Id: I7c376039a866e146051cd38036f466e5c4d58e4d --- M wmf-config/db-eqiad.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index bbb35bb..f1f7b9a 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -104,7 +104,7 @@ 'db1052' => 0, # B3 2.8TB 96GB, master 'db1067' => 0, # D1 2.8TB 160GB, old master 'db1051' => 1, # B3 2.8TB 96GB, watchlist, recentchanges, contributions, logpager - 'db1055' => 1, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager + # 'db1055' => 1, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager T178359 'db1065' => 0, # D1 2.8TB 160GB, vslow, dump, master for sanitarium 'db1066' => 50, # D1 2.8TB 160GB, api 'db1073' => 50, # B3 2.8TB 160GB, api @@ -246,23 +246,23 @@ 's1' => [ 'watchlist' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'recentchanges' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'recentchangeslinked' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'contributions' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'logpager' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'dump' => [ 'db1065' => 1, -- To view, visit https://gerrit.wikimedia.org/r/390366 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c376039a866e146051cd38036f466e5c4d58e4d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarosteguiGerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1055
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390366 ) Change subject: db-eqiad.php: Depool db1055 .. db-eqiad.php: Depool db1055 Going to copy db1055 to db1105 Bug: T178359 Change-Id: I7c376039a866e146051cd38036f466e5c4d58e4d --- M wmf-config/db-eqiad.php 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/66/390366/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index bbb35bb..f1f7b9a 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -104,7 +104,7 @@ 'db1052' => 0, # B3 2.8TB 96GB, master 'db1067' => 0, # D1 2.8TB 160GB, old master 'db1051' => 1, # B3 2.8TB 96GB, watchlist, recentchanges, contributions, logpager - 'db1055' => 1, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager + # 'db1055' => 1, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager T178359 'db1065' => 0, # D1 2.8TB 160GB, vslow, dump, master for sanitarium 'db1066' => 50, # D1 2.8TB 160GB, api 'db1073' => 50, # B3 2.8TB 160GB, api @@ -246,23 +246,23 @@ 's1' => [ 'watchlist' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'recentchanges' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'recentchangeslinked' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'contributions' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'logpager' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'dump' => [ 'db1065' => 1, -- To view, visit https://gerrit.wikimedia.org/r/390366 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c376039a866e146051cd38036f466e5c4d58e4d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rewrite userOptions.php
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/388935 ) Change subject: Rewrite userOptions.php .. Rewrite userOptions.php * Convert to use Maintenance * Clean up * I want to use the class name UserOptions for something else so rename it. Change-Id: Ic441087702376b1ca0e70554c71cdf7ecad908af --- M autoload.php D maintenance/userOptions.inc M maintenance/userOptions.php 3 files changed, 177 insertions(+), 299 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index 39ec4b0..bfc8928 100644 --- a/autoload.php +++ b/autoload.php @@ -1568,7 +1568,7 @@ 'UserMailer' => __DIR__ . '/includes/mail/UserMailer.php', 'UserNamePrefixSearch' => __DIR__ . '/includes/user/UserNamePrefixSearch.php', 'UserNotLoggedIn' => __DIR__ . '/includes/exception/UserNotLoggedIn.php', - 'UserOptions' => __DIR__ . '/maintenance/userOptions.inc', + 'UserOptionsMaintenance' => __DIR__ . '/maintenance/userOptions.php', 'UserPasswordPolicy' => __DIR__ . '/includes/password/UserPasswordPolicy.php', 'UserRightsProxy' => __DIR__ . '/includes/user/UserRightsProxy.php', 'UserrightsPage' => __DIR__ . '/includes/specials/SpecialUserrights.php', diff --git a/maintenance/userOptions.inc b/maintenance/userOptions.inc deleted file mode 100644 index 8ac7f91..000 --- a/maintenance/userOptions.inc +++ /dev/null @@ -1,292 +0,0 @@ -http://www.gnu.org/copyleft/gpl.html - * - * @file - * @ingroup Maintenance - */ - -// Options we will use -$options = [ 'list', 'nowarn', 'quiet', 'usage', 'dry' ]; -$optionsWithArgs = [ 'old', 'new' ]; - -require_once __DIR__ . '/commandLine.inc'; - -/** - * @ingroup Maintenance - */ -class UserOptions { - public $mQuick; - public $mQuiet; - public $mDry; - public $mAnOption; - public $mOldValue; - public $mNewValue; - - private $mMode, $mReady; - - /** -* Constructor. Will show usage and exit if script options are not correct -* @param array $opts -* @param array $args -*/ - function __construct( $opts, $args ) { - if ( !$this->checkOpts( $opts, $args ) ) { - self::showUsageAndExit(); - } else { - $this->mReady = $this->initializeOpts( $opts, $args ); - } - } - - /** -* This is used to check options. Only needed on construction -* -* @param array $opts -* @param array $args -* -* @return bool -*/ - private function checkOpts( $opts, $args ) { - // The three possible ways to run the script: - $list = isset( $opts['list'] ); - $usage = isset( $opts['usage'] ) && ( count( $args ) <= 1 ); - $change = isset( $opts['old'] ) && isset( $opts['new'] ) && ( count( $args ) <= 1 ); - - // We want only one of them - $isValid = ( ( $list + $usage + $change ) == 1 ); - - return $isValid; - } - - /** -* load script options in the object -* -* @param array $opts -* @param array $args -* -* @return bool -*/ - private function initializeOpts( $opts, $args ) { - $this->mQuick = isset( $opts['nowarn'] ); - $this->mQuiet = isset( $opts['quiet'] ); - $this->mDry = isset( $opts['dry'] ); - - // Set object properties, specially 'mMode' used by run() - if ( isset( $opts['list'] ) ) { - $this->mMode = 'LISTER'; - } elseif ( isset( $opts['usage'] ) ) { - $this->mMode = 'USAGER'; - $this->mAnOption = isset( $args[0] ) ? $args[0] : false; - } elseif ( isset( $opts['old'] ) && isset( $opts['new'] ) ) { - $this->mMode = 'CHANGER'; - $this->mOldValue = $opts['old']; - $this->mNewValue = $opts['new']; - $this->mAnOption = $args[0]; - } else { - die( "There is a bug in the software, this should never happen\n" ); - } - - return true; - } - - /** -* Dumb stuff to run a mode. -* @return bool -*/ - public function run() { - if ( !$this->mReady ) { - return false; - } - - $this->{$this->mMode}(); - - return true; - } - - /** -* List default options and their value -*/ - private function LISTER() { - $def = User::getDefaultOptions(); - ksort( $def ); - $maxOpt = 0; -
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Update the rest of the baseconfigs to match arwiki
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390360 ) Change subject: Update the rest of the baseconfigs to match arwiki .. Update the rest of the baseconfigs to match arwiki * And fix the default `responsiveReferences` value for parserTests which didn't make too much sense because it's a per wiki config. Keep it disabled by default so we don't need to update all tests. Change-Id: Ia331429c9eb648481696b6414ad759a8d4742bfb --- M bin/parserTests.js M lib/config/baseconfig/arwiki.json M lib/config/baseconfig/be-taraskwiki.json M lib/config/baseconfig/cawiki.json M lib/config/baseconfig/cswiki.json M lib/config/baseconfig/dewiki.json M lib/config/baseconfig/enwiki.json M lib/config/baseconfig/eswiki.json M lib/config/baseconfig/fawiki.json M lib/config/baseconfig/fiwiki.json M lib/config/baseconfig/frwiki.json M lib/config/baseconfig/iswiki.json M lib/config/baseconfig/kaawiki.json M lib/config/baseconfig/lnwiki.json M lib/config/baseconfig/nlwiki.json M lib/config/baseconfig/srwiki.json M lib/config/baseconfig/trwiki.json M lib/config/baseconfig/zhwiki.json 18 files changed, 3,489 insertions(+), 1,506 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/390360 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia331429c9eb648481696b6414ad759a8d4742bfb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: ArlolraGerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Sbailey Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: To identify superseded requests, use the requested search te...
Tim Starling has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390365 ) Change subject: To identify superseded requests, use the requested search term instead of the returned search term .. To identify superseded requests, use the requested search term instead of the returned search term Previously, the search suggestions dropdown would be updated only if the the search term in the response matched the most recently dispatched search term. This was supposed to suppress out-of-order responses. However, it had the undesired effect of suppressing all responses in which the search term is changed by MediaWiki's Unicode normalisation. It's not sufficient to run NFC on the client-side, since MediaWiki's Unicode cleanup routine is not precisely the same as NFC. Also, NFC changes from one Unicode version to the next. And also, it is slow. So, use the term precisely as requested to identify responses. It is already available in the relevant closure. Bug: T170779 Change-Id: Id0d1d081e921a0f24a380260dcb5186d98e443a9 --- M view/resources/jquery/wikibase/jquery.wikibase.entityselector.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/65/390365/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.entityselector.js b/view/resources/jquery/wikibase/jquery.wikibase.entityselector.js index c2126b2..55ffada 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.entityselector.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.entityselector.js @@ -293,7 +293,7 @@ deferred.resolve( response.search, - response.searchinfo.search, + term, response[ 'search-continue' ] ); } ) -- To view, visit https://gerrit.wikimedia.org/r/390365 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0d1d081e921a0f24a380260dcb5186d98e443a9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tim Starling___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Merge ProfilerFunctions into GlobalFunctions
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390350 ) Change subject: Merge ProfilerFunctions into GlobalFunctions .. Merge ProfilerFunctions into GlobalFunctions Even if people use these (deprecated) functions in the earliest hooks or in LocalSettings.php, it will keep working because GlobalFunctions is loaded between DefaultSettings.php and LocalSettings.php. The only places affected would be files in core: AutoLoader.php, Defines.php, and DefaultSettings.php, which don't use these functions. Change-Id: If4c0e8cbe1ea918283df22d72f792a3806569216 --- M includes/GlobalFunctions.php M includes/Setup.php D includes/profiler/ProfilerFunctions.php M tests/phpunit/autoload.ide.php 4 files changed, 34 insertions(+), 61 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 1cff881..404d115 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3487,3 +3487,37 @@ return $baseArray; } + +/** + * Get system resource usage of current request context. + * Invokes the getrusage(2) system call, requesting RUSAGE_SELF if on PHP5 + * or RUSAGE_THREAD if on HHVM. Returns false if getrusage is not available. + * + * @since 1.24 + * @return array|bool Resource usage data or false if no data available. + */ +function wfGetRusage() { + if ( !function_exists( 'getrusage' ) ) { + return false; + } elseif ( defined( 'HHVM_VERSION' ) && PHP_OS === 'Linux' ) { + return getrusage( 2 /* RUSAGE_THREAD */ ); + } else { + return getrusage( 0 /* RUSAGE_SELF */ ); + } +} + +/** + * Begin profiling of a function + * @param string $functionname Name of the function we will profile + * @deprecated since 1.25 + */ +function wfProfileIn( $functionname ) { +} + +/** + * Stop profiling of a function + * @param string $functionname Name of the function we have profiled + * @deprecated since 1.25 + */ +function wfProfileOut( $functionname = 'missing' ) { +} diff --git a/includes/Setup.php b/includes/Setup.php index e4396ba..5d8520b 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -37,9 +37,6 @@ * Pre-config setup: Before loading LocalSettings.php */ -// Grab profiling functions -require_once "$IP/includes/profiler/ProfilerFunctions.php"; - // Start the autoloader, so that extensions can derive classes from core files require_once "$IP/includes/AutoLoader.php"; diff --git a/includes/profiler/ProfilerFunctions.php b/includes/profiler/ProfilerFunctions.php deleted file mode 100644 index cc71630..000 --- a/includes/profiler/ProfilerFunctions.php +++ /dev/null @@ -1,56 +0,0 @@ -http://www.gnu.org/copyleft/gpl.html - * - * @file - * @ingroup Profiler - */ - -/** - * Get system resource usage of current request context. - * Invokes the getrusage(2) system call, requesting RUSAGE_SELF if on PHP5 - * or RUSAGE_THREAD if on HHVM. Returns false if getrusage is not available. - * - * @since 1.24 - * @return array|bool Resource usage data or false if no data available. - */ -function wfGetRusage() { - if ( !function_exists( 'getrusage' ) ) { - return false; - } elseif ( defined( 'HHVM_VERSION' ) && PHP_OS === 'Linux' ) { - return getrusage( 2 /* RUSAGE_THREAD */ ); - } else { - return getrusage( 0 /* RUSAGE_SELF */ ); - } -} - -/** - * Begin profiling of a function - * @param string $functionname Name of the function we will profile - * @deprecated since 1.25 - */ -function wfProfileIn( $functionname ) { -} - -/** - * Stop profiling of a function - * @param string $functionname Name of the function we have profiled - * @deprecated since 1.25 - */ -function wfProfileOut( $functionname = 'missing' ) { -} diff --git a/tests/phpunit/autoload.ide.php b/tests/phpunit/autoload.ide.php index 106ab683..f883cf6 100644 --- a/tests/phpunit/autoload.ide.php +++ b/tests/phpunit/autoload.ide.php @@ -40,8 +40,6 @@ global $IP; # Start the autoloader, so that extensions can derive classes from core files require_once "$IP/includes/AutoLoader.php"; -# Grab profiling functions -require_once "$IP/includes/profiler/ProfilerFunctions.php"; # Start the profiler $wgProfiler = []; -- To view, visit https://gerrit.wikimedia.org/r/390350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4c0e8cbe1ea918283df22d72f792a3806569216 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Legoktm Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Setup: Include StartProfiler before others
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390351 ) Change subject: Setup: Include StartProfiler before others .. Setup: Include StartProfiler before others Bug: T180183 Change-Id: Ibcf78d094cf4dcf09bc919a5f8168f45ae225ebc --- M includes/Setup.php M tests/phpunit/autoload.ide.php 2 files changed, 9 insertions(+), 10 deletions(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Setup.php b/includes/Setup.php index 5d8520b..4c281b1 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -37,17 +37,17 @@ * Pre-config setup: Before loading LocalSettings.php */ +// Get profiler configuraton +$wgProfiler = []; +if ( file_exists( "$IP/StartProfiler.php" ) ) { + require "$IP/StartProfiler.php"; +} + // Start the autoloader, so that extensions can derive classes from core files require_once "$IP/includes/AutoLoader.php"; // Load up some global defines require_once "$IP/includes/Defines.php"; - -// Start the profiler -$wgProfiler = []; -if ( file_exists( "$IP/StartProfiler.php" ) ) { - require "$IP/StartProfiler.php"; -} // Load default settings require_once "$IP/includes/DefaultSettings.php"; diff --git a/tests/phpunit/autoload.ide.php b/tests/phpunit/autoload.ide.php index f883cf6..6f09d4c 100644 --- a/tests/phpunit/autoload.ide.php +++ b/tests/phpunit/autoload.ide.php @@ -38,14 +38,13 @@ // to $maintenance->mSelf. Keep that here for b/c $self = $maintenance->getName(); global $IP; -# Start the autoloader, so that extensions can derive classes from core files -require_once "$IP/includes/AutoLoader.php"; - -# Start the profiler +# Get profiler configuraton $wgProfiler = []; if ( file_exists( "$IP/StartProfiler.php" ) ) { require "$IP/StartProfiler.php"; } +# Start the autoloader, so that extensions can derive classes from core files +require_once "$IP/includes/AutoLoader.php"; $requireOnceGlobalsScope = function ( $file ) use ( $self ) { foreach ( array_keys( $GLOBALS ) as $varName ) { -- To view, visit https://gerrit.wikimedia.org/r/390351 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibcf78d094cf4dcf09bc919a5f8168f45ae225ebc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Legoktm Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: Improving README.md for PageAssessments extension
Kaldari has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390364 ) Change subject: Improving README.md for PageAssessments extension .. Improving README.md for PageAssessments extension Change-Id: Ib8c843cc6c7c66b162cef35cb2036ce1806149fd --- M README.md 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageAssessments refs/changes/64/390364/1 diff --git a/README.md b/README.md index 70acf0f..223f6d2 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,11 @@ See https://www.mediawiki.org/wiki/Extension:PageAssessments for detailed documentation. -This extension is for the purposes of storing article assessments as they happen in a new database table. This extension was designed keeping in mind Wikiprojects use-cases but it can be used for a number of other similar purposes. +This extension is for the purposes of storing article assessments in a database table and providing an API for retrieving them. This extension was primarily designed to support WikiProjects, but it can be used for a number of other similar purposes. -The parser function for invoking a new review is: {{#assessment: | | }}. +The parser function for invoking a new review is: {{#assessment: | | }}. Typically this parser function will be embedded in an assessment template that is then transcluded on an article's talk page. + +If the extension is configured to support subprojects (see Configuration below), the subproject should follow the project name and be separated with a slash. For example, to record an assessment for the Crime task force of WikiProject Novels, you would use an assessment like: {{#assessment:Novels/Crime task force|B|Low}} Configuration - -- To view, visit https://gerrit.wikimedia.org/r/390364 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8c843cc6c7c66b162cef35cb2036ce1806149fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageAssessments Gerrit-Branch: master Gerrit-Owner: Kaldari___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia-ui-base[master]: Remove repititive comment about breakpoint values
Prtksxna has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390363 ) Change subject: Remove repititive comment about breakpoint values .. Remove repititive comment about breakpoint values Change-Id: Id92c426ebd3bb0f4c1a81c7f4be87a51e2ccffee --- M wikimedia-ui-base.css M wikimedia-ui-base.less 2 files changed, 9 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia-ui-base refs/changes/63/390363/1 diff --git a/wikimedia-ui-base.css b/wikimedia-ui-base.css index 10ca2ce..3209a8b 100644 --- a/wikimedia-ui-base.css +++ b/wikimedia-ui-base.css @@ -5,36 +5,28 @@ :root { /* == Breakpoints == */ + /* The following numbers are prone to change with new information. */ + /** * Minimum available screen width at which a device can be considered a mobile device * Many older feature phones have screens smaller than this value. -* Number is prone to change with new information. */ --width-breakpoint-mobile: 320px; /** * Minimum available screen width at which a device can be considered a tablet * The number is currently based on the device width of a Samsung Galaxy S5 mini and is low -* enough to cover iPad (768px). Number is prone to change with new information. +* enough to cover iPad (768px). */ --width-breakpoint-tablet: 720px; - /** -* Minimum available screen width at which a device can be considered a desktop -* Number is prone to change with new information. -*/ + /* Minimum available screen width at which a device can be considered a desktop */ --width-breakpoint-desktop: 1000px; - /** -* Wider desktop breakpoint, currently used in Flow. -* Number is prone to change with new information. -*/ + /* Wider desktop breakpoint, currently used in Flow. */ --width-breakpoint-desktop-wide: 1200px; - /** -* Extra wide desktop breakpoint -* Number is prone to change with new information. -*/ + /* Extra wide desktop breakpoint */ --width-breapoint-desktop-extrawide: 2000px; diff --git a/wikimedia-ui-base.less b/wikimedia-ui-base.less index 7976e62..572013b 100644 --- a/wikimedia-ui-base.less +++ b/wikimedia-ui-base.less @@ -4,35 +4,24 @@ */ // == Breakpoints == +// The following numbers are prone to change with new information. + // Minimum available screen width at which a device can be considered a mobile device // Many older feature phones have screens smaller than this value. -// Number is prone to change with new information. - @width-breakpoint-mobile: 320px; - // Minimum available screen width at which a device can be considered a tablet // The number is currently based on the device width of a Samsung Galaxy S5 mini and is low -// enough to cover iPad (768px). Number is prone to change with new information. - +// enough to cover iPad (768px). @width-breakpoint-tablet: 720px; - // Minimum available screen width at which a device can be considered a desktop -// Number is prone to change with new information. - @width-breakpoint-desktop: 1000px; - // Wider desktop breakpoint, currently used in Flow. -// Number is prone to change with new information. - @width-breakpoint-desktop-wide: 1200px; - // Extra wide desktop breakpoint -// Number is prone to change with new information. - @width-breapoint-desktop-extrawide: 2000px; -- To view, visit https://gerrit.wikimedia.org/r/390363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id92c426ebd3bb0f4c1a81c7f4be87a51e2ccffee Gerrit-PatchSet: 1 Gerrit-Project: wikimedia-ui-base Gerrit-Branch: master Gerrit-Owner: Prtksxna___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: version: Don't rely on git.wikimedia.org
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390362 ) Change subject: version: Don't rely on git.wikimedia.org .. version: Don't rely on git.wikimedia.org It's dead. Use Gerrit's API instead. Bug: T139089 Change-Id: Ic4917c6814406ad1d10397f6d9eef5382b34f8ef --- M pywikibot/version.py 1 file changed, 7 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/62/390362/1 diff --git a/pywikibot/version.py b/pywikibot/version.py index c48db41..5838707 100644 --- a/pywikibot/version.py +++ b/pywikibot/version.py @@ -14,6 +14,7 @@ import codecs import datetime +import json import os import subprocess import sys @@ -364,19 +365,17 @@ return (tag, rev, date, hsh) -def getversion_onlinerepo(repo=None): -"""Retrieve current framework revision number from online repository. - -@param repo: (optional) Online repository location -@type repo: URL or string +def getversion_onlinerepo(): +"""Retrieve current framework git hash from Gerrit """ from pywikibot.comms import http -url = repo or 'https://git.wikimedia.org/feed/pywikibot/core' +url = 'https://gerrit.wikimedia.org/r/projects/pywikibot%2Fcore/branches/master' buf = http.fetch(uri=url, - headers={'user-agent': '{pwb}'}).content.splitlines() + headers={'user-agent': '{pwb}'}).content[4:] + try: -hsh = buf[13].split('/')[5][:-1] +hsh = json.loads(buf)['revision'] return hsh except Exception as e: raise ParseError(repr(e) + ' while parsing ' + repr(buf)) -- To view, visit https://gerrit.wikimedia.org/r/390362 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4917c6814406ad1d10397f6d9eef5382b34f8ef Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: README: Re-arrange intro section
Prtksxna has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390361 ) Change subject: README: Re-arrange intro section .. README: Re-arrange intro section Bug: T179111 Change-Id: I7faae1ca31a5670d2a4582798455cf33a8d65769 --- M README.md 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/61/390361/1 diff --git a/README.md b/README.md index 8248e63..67b002a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,16 @@ OOjs UI = -OOjs UI is a modern JavaScript UI library. It provides common widgets, layouts, dialogs and icons that are ready to use, as well as many useful and convenient classes for constructing custom user interfaces. It is the standard user-interface library in Wikimedia Foundation Web products, having been originally created for use by [VisualEditor](https://www.mediawiki.org/wiki/VisualEditor), which uses it for its entire user interface. +OOjs UI is a modern JavaScript UI library. It provides: + +* Common widgets, layouts, and dialogs +* Classes to create custom interfaces +* Support for RTL +* Theme-ability though LESS variables +* Icons +* Accessibility features + +It is the standard library for Web products at the Wikimedia Foundation, having been originally created for use by [VisualEditor](https://www.mediawiki.org/wiki/VisualEditor). Quick start -- To view, visit https://gerrit.wikimedia.org/r/390361 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7faae1ca31a5670d2a4582798455cf33a8d65769 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Prtksxna___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Update the rest of the baseconfigs to match arwiki
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390360 ) Change subject: Update the rest of the baseconfigs to match arwiki .. Update the rest of the baseconfigs to match arwiki * And fix the default `responsiveReferences` value for parserTests which didn't make too much sense because it's a per wiki config. Keep it disabled by default so we don't need to update all tests. Change-Id: Ia331429c9eb648481696b6414ad759a8d4742bfb --- M bin/parserTests.js M lib/config/baseconfig/arwiki.json M lib/config/baseconfig/be-taraskwiki.json M lib/config/baseconfig/cawiki.json M lib/config/baseconfig/cswiki.json M lib/config/baseconfig/dewiki.json M lib/config/baseconfig/enwiki.json M lib/config/baseconfig/eswiki.json M lib/config/baseconfig/fawiki.json M lib/config/baseconfig/fiwiki.json M lib/config/baseconfig/frwiki.json M lib/config/baseconfig/iswiki.json M lib/config/baseconfig/kaawiki.json M lib/config/baseconfig/lnwiki.json M lib/config/baseconfig/nlwiki.json M lib/config/baseconfig/srwiki.json M lib/config/baseconfig/trwiki.json M lib/config/baseconfig/zhwiki.json 18 files changed, 3,489 insertions(+), 1,506 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/60/390360/1 -- To view, visit https://gerrit.wikimedia.org/r/390360 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia331429c9eb648481696b6414ad759a8d4742bfb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Do not try to add edit links to the HTML in contexts without...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/389790 ) Change subject: Do not try to add edit links to the HTML in contexts without a Title .. Do not try to add edit links to the HTML in contexts without a Title Title may be null when accessed via this->getTitle() If this is the case we should assume the skin is being used by someone who is not a reader and in these circumstances, not try to render any page actions. Bug: T179833 Change-Id: Ia47fd9b059101bf22b5d31be7df3a332b35d6b24 --- M includes/skins/SkinMinerva.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Gergő Tisza: Looks good to me, but someone else must approve jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index d4aef10..344bc06 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -194,6 +194,10 @@ protected function isAllowedPageAction( $action ) { $title = $this->getTitle(); $config = $this->getConfig(); + // Title may be undefined in certain contexts (T179833) + if ( !$title ) { + return false; + } if ( ! in_array( $action, $config->get( 'MinervaPageActions' ) ) -- To view, visit https://gerrit.wikimedia.org/r/389790 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia47fd9b059101bf22b5d31be7df3a332b35d6b24 Gerrit-PatchSet: 8 Gerrit-Project: mediawiki/skins/MinervaNeue Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Pmiazga Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: WIP: search.wikimedia.org: Stop supporting non-Wikipedias
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390358 ) Change subject: WIP: search.wikimedia.org: Stop supporting non-Wikipedias .. WIP: search.wikimedia.org: Stop supporting non-Wikipedias Best we can tell, there's no evidence these other projects actually get any traffic at all via this search gateway. As this is a non-standard gateway that nobody should really use, let's just simplify things further. Change-Id: Ibaee5d2aa7270977e10a4c9bbf2ff30d8836d543 --- M docroot/search.wikimedia.org/index.php 1 file changed, 1 insertion(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/58/390358/1 diff --git a/docroot/search.wikimedia.org/index.php b/docroot/search.wikimedia.org/index.php index 95f76b8..986289b 100644 --- a/docroot/search.wikimedia.org/index.php +++ b/docroot/search.wikimedia.org/index.php @@ -17,23 +17,9 @@ error_reporting( E_ALL ); ini_set( "display_errors", false ); -$site = 'wikipedia'; $lang = 'en'; $search = ''; $limit = 20; - -$allowedSites = [ - 'wikipedia', - 'wiktionary', - 'wikinews', - 'wikisource' -]; - -if ( isset( $_GET['site'] ) ) { - if ( is_string( $_GET['site'] ) && in_array( $_GET['site'], $allowedSites ) ) { - $site = $_GET['site']; - } -} if ( isset( $_GET['lang'] ) ) { if ( preg_match( '/^[a-z]+(-[a-z]+)*$/', $_GET['lang'] ) ) { @@ -61,7 +47,7 @@ $urlSearch = urlencode( $search ); # OpenSearch JSON suggest API -$url = "https://$lang.$site.org/w/api.php?action=opensearch=$urlSearch=$limit;; +$url = "https://$lang.wikipedia.org/w/api.php?action=opensearch=$urlSearch=$limit;; $c = curl_init( $url ); curl_setopt_array( $c, [ CURLOPT_RETURNTRANSFER => true, -- To view, visit https://gerrit.wikimedia.org/r/390358 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibaee5d2aa7270977e10a4c9bbf2ff30d8836d543 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: search.wikimedia.org: Clean up result returning logic
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390357 ) Change subject: search.wikimedia.org: Clean up result returning logic .. search.wikimedia.org: Clean up result returning logic - We don't need to use empty(), a loose boolean check suffices - Swap the order here, what good is outputting the note about no results if we've already tried to output them Change-Id: Ia4e3ee9e79c4e85b9631a82bca77434b1e44e63f --- M docroot/search.wikimedia.org/index.php 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/57/390357/1 diff --git a/docroot/search.wikimedia.org/index.php b/docroot/search.wikimedia.org/index.php index ac20beb..95f76b8 100644 --- a/docroot/search.wikimedia.org/index.php +++ b/docroot/search.wikimedia.org/index.php @@ -94,14 +94,14 @@ "\n" . ""; -foreach ( $results as $result ) { - $htmlResult = htmlspecialchars( str_replace( ' ', '_', $result ) ); - print "$lang:$htmlResult"; -} - -if ( empty( $results ) ) { +if ( !$results ) { $htmlSearch = htmlspecialchars( $search ); print "No entries found for \"$lang:$htmlSearch\""; +} else { + foreach ( $results as $result ) { + $htmlResult = htmlspecialchars( str_replace( ' ', '_', $result ) ); + print "$lang:$htmlResult"; + } } print "\n"; -- To view, visit https://gerrit.wikimedia.org/r/390357 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4e3ee9e79c4e85b9631a82bca77434b1e44e63f Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: Don't break when reference names contain []
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390356 ) Change subject: Don't break when reference names contain [] .. Don't break when reference names contain [] Bug: T29694 Bug: T179544 Change-Id: Iec3439f76ecc2a3543b30b35f8735c92b0cfb711 --- M includes/Cite.php M tests/parser/citeParserTests.txt 2 files changed, 43 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite refs/changes/56/390356/1 diff --git a/includes/Cite.php b/includes/Cite.php index 126380e..9b41d24 100644 --- a/includes/Cite.php +++ b/includes/Cite.php @@ -411,13 +411,13 @@ } if ( isset( $argv['name'] ) ) { // Key given. - $key = Sanitizer::escapeIdForAttribute( $argv['name'] ); + $key = trim( $argv['name'] ); unset( $argv['name'] ); --$cnt; } if ( isset( $argv['follow'] ) ) { // Follow given. - $follow = Sanitizer::escapeIdForAttribute( $argv['follow'] ); + $follow = trim( $argv['follow'] ); unset( $argv['follow'] ); --$cnt; } @@ -814,10 +814,10 @@ if ( !is_array( $val ) ) { return wfMessage( 'cite_references_link_one', - Sanitizer::safeEncodeAttribute( + $this->normalizeKey( self::getReferencesKey( $key ) ), - Sanitizer::safeEncodeAttribute( + $this->normalizeKey( $this->refKey( $key ) ), $this->referenceText( $key, $val ) @@ -827,7 +827,7 @@ if ( isset( $val['follow'] ) ) { return wfMessage( 'cite_references_no_link', - Sanitizer::safeEncodeAttribute( + $this->normalizeKey( self::getReferencesKey( $val['follow'] ) ), $text @@ -836,7 +836,7 @@ if ( !isset( $val['count'] ) ) { // this handles the case of section preview for list-defined references return wfMessage( 'cite_references_link_many', - Sanitizer::safeEncodeAttribute( + $this->normalizeKey( self::getReferencesKey( $key . "-" . ( isset( $val['key'] ) ? $val['key'] : '' ) ) ), '', @@ -846,10 +846,10 @@ if ( $val['count'] < 0 ) { return wfMessage( 'cite_references_link_one', - Sanitizer::safeEncodeAttribute( + $this->normalizeKey( self::getReferencesKey( $val['key'] ) ), - Sanitizer::safeEncodeAttribute( + $this->normalizeKey( # $this->refKey( $val['key'], $val['count'] ) $this->refKey( $val['key'] ) ), @@ -863,10 +863,10 @@ if ( $val['count'] === 0 ) { return wfMessage( 'cite_references_link_one', - Sanitizer::safeEncodeAttribute( + $this->normalizeKey( self::getReferencesKey( $key . "-" . $val['key'] ) ), - Sanitizer::safeEncodeAttribute( + $this->normalizeKey( # $this->refKey( $key, $val['count'] ), $this->refKey( $key, $val['key'] . "-" . $val['count'] ) ), @@ -879,7 +879,7 @@ for ( $i = 0; $i <=
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Update scap to 3.7.2-1
20after4 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390355 ) Change subject: Update scap to 3.7.2-1 .. Update scap to 3.7.2-1 Change-Id: I314f468784ca8a78c26c37883724c90b2c0f3368 --- M modules/scap/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/55/390355/1 diff --git a/modules/scap/manifests/init.pp b/modules/scap/manifests/init.pp index 1683472..6e3f23d 100644 --- a/modules/scap/manifests/init.pp +++ b/modules/scap/manifests/init.pp @@ -12,7 +12,7 @@ class scap ( $deployment_server = 'deployment', $wmflabs_master = 'deployment-tin.deployment-prep.eqiad.wmflabs', -$version = '3.7.1-1', +$version = '3.7.2-1', ) { package { 'scap': ensure => $version, -- To view, visit https://gerrit.wikimedia.org/r/390355 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I314f468784ca8a78c26c37883724c90b2c0f3368 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: 20after4___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] purtle[master]: Tweak JSON-LD support to generate more idiomatic JSON-LD
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379669 ) Change subject: Tweak JSON-LD support to generate more idiomatic JSON-LD .. Tweak JSON-LD support to generate more idiomatic JSON-LD Lean on the @context more to generate shortnames for fields and hoist @type declarations so that the actual node objects are as concise as possible. These structures are semantically equivalent to the previous markup, but should download quicker and be easier for consumers to use. Bug: T44063 Bug: T164655 Change-Id: I45294572607926b68c60c9c2c0f306b8c8d14bc3 --- M src/JsonLdRdfWriter.php M tests/data/AlternatingValues.jsonld M tests/data/DumpHeader.jsonld M tests/data/EricMiller.jsonld M tests/data/LabeledBlankNode.jsonld M tests/data/NumberedBlankNode.jsonld M tests/data/Numbers.jsonld M tests/data/Predicates.jsonld M tests/data/Resources.jsonld M tests/data/TextWithSpecialChars.jsonld M tests/data/Texts.jsonld M tests/data/Triples.jsonld M tests/data/TypeConflict.jsonld M tests/data/Values.jsonld 14 files changed, 316 insertions(+), 137 deletions(-) Approvals: Smalyshev: Looks good to me, approved C. Scott Ananian: Looks good to me, but someone else must approve jenkins-bot: Verified Thiemo Mättig (WMDE): Looks good to me, but someone else must approve diff --git a/src/JsonLdRdfWriter.php b/src/JsonLdRdfWriter.php index e94a68d..21df20b 100644 --- a/src/JsonLdRdfWriter.php +++ b/src/JsonLdRdfWriter.php @@ -23,6 +23,16 @@ protected $context = []; /** +* A set of predicates which rely on the default typing rules for +* JSON-LD; that is, values for the predicate have been emitted which +* would be broken if an explicit "@type" was added to the context +* for the predicate. +* +* @var boolean[] +*/ + protected $defaulted = []; + + /** * The JSON-LD "@graph", which lists all the nodes described by this JSON-LD object. * We apply an optimization eliminating the "@graph" entry if it consists * of a single node; in that case we will set $this->graph to null in @@ -76,6 +86,12 @@ * The IRI for the RDF `type` property. */ const RDF_TYPE_IRI = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'; + + /** +* The type internally used for "default type", which is a string or +* otherwise default-coerced type. +*/ + const DEFAULT_TYPE = "@purtle@default@"; /** * @param string $role @@ -139,7 +155,13 @@ // Empty prefix not supported; use full IRI return $this->prefixes[ $base ] . $local; } - $this->context[ $base ] = $this->prefixes[ $base ]; + if ( !isset( $this->context[ $base ] ) ) { + $this->context[ $base ] = $this->prefixes[ $base ]; + } + if ( $this->context[ $base ] !== $this->prefixes[ $base ] ) { + // Context name conflict; use full IRI + return $this->prefixes[ $base ] . $local; + } } return $base . ':' . $local; } @@ -161,6 +183,32 @@ throw new LogicException( 'Unknown prefix: ' . $base ); } return $base; + } + + /** +* Return a appropriate term for the current predicate value. +*/ + private function getCurrentTerm() { + list( $base, $local ) = $this->currentPredicate; + $predIRI = $this->toIRI( $base, $local ); + if ( $predIRI === self::RDF_TYPE_IRI ) { + return $predIRI; + } + $this->expandShorthand( $base, $local ); + if ( $local === null ) { + return $base; + } elseif ( $base !== '_' && !isset( $this->prefixes[ $local ] ) ) { + // Prefixes get priority over field names in @context + $pred = $this->compactify( $base, $local ); + if ( !isset( $this->context[ $local ] ) ) { + $this->context[ $local ] = [ "@id" => $pred ]; + } + if ( $this->context[ $local ][ "@id" ] === $pred ) { + return $local; + } + return $pred; + } + return $this->compactify( $base, $local ); } /** @@ -255,9 +303,11 @@ * @param string|null $local */ protected function writeResource(
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: search.wikimedia.org: Remove silly configuration switch for ...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390354 ) Change subject: search.wikimedia.org: Remove silly configuration switch for caching .. search.wikimedia.org: Remove silly configuration switch for caching Change-Id: Icc5eeb4a836e5290016b824dde1877e2d4534e04 --- M docroot/search.wikimedia.org/index.php 1 file changed, 1 insertion(+), 5 deletions(-) Approvals: Chad: Looks good to me, approved EBernhardson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/docroot/search.wikimedia.org/index.php b/docroot/search.wikimedia.org/index.php index 6c27ebe..ac20beb 100644 --- a/docroot/search.wikimedia.org/index.php +++ b/docroot/search.wikimedia.org/index.php @@ -17,8 +17,6 @@ error_reporting( E_ALL ); ini_set( "display_errors", false ); -$caching = true; - $site = 'wikipedia'; $lang = 'en'; $search = ''; @@ -91,9 +89,7 @@ dieOut( "Unexpected result format." ); } -if ( $caching ) { - header( "Cache-Control: public, max-age: 1200, s-maxage: 1200" ); -} +header( "Cache-Control: public, max-age: 1200, s-maxage: 1200" ); print "\n" . "\n" . ""; -- To view, visit https://gerrit.wikimedia.org/r/390354 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc5eeb4a836e5290016b824dde1877e2d4534e04 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Chad Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: search.wikimedia.org: Nicer handling of bad search parameter
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390353 ) Change subject: search.wikimedia.org: Nicer handling of bad search parameter .. search.wikimedia.org: Nicer handling of bad search parameter Wrap it in a trim() call so we don't search for empty strings. Also don't return a 500, return a 400 since it's the client's fault not ours Change-Id: I3d5ab0b9597e577b6113e9c1f89753d42e3fce9b --- M docroot/search.wikimedia.org/index.php 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Chad: Looks good to me, approved EBernhardson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/docroot/search.wikimedia.org/index.php b/docroot/search.wikimedia.org/index.php index ef51f19..6c27ebe 100644 --- a/docroot/search.wikimedia.org/index.php +++ b/docroot/search.wikimedia.org/index.php @@ -45,11 +45,13 @@ if ( isset( $_GET['search'] ) ) { if ( is_string( $_GET['search'] ) ) { - $search = $_GET['search']; - } else { - dieOut( "Invalid search parameter." ); + $search = trim( $_GET['search'] ); } } +if ( !$search ) { + header( 'HTTP/1.0 400 Bad Request' ); + die( "Wikimedia search service bad request.\n\nRequest must include a 'search' parameter" ); +} if ( isset( $_GET['limit'] ) ) { $limitParam = intval( $_GET['limit'] ); -- To view, visit https://gerrit.wikimedia.org/r/390353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d5ab0b9597e577b6113e9c1f89753d42e3fce9b Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Chad Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Sync up with Parsoid parserTests.txt
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390349 ) Change subject: Sync up with Parsoid parserTests.txt .. Sync up with Parsoid parserTests.txt This now aligns with Parsoid commit 1d6c39d8f6f5972e72974f8d64e7a0a5c2288bf2 Change-Id: I38d9d47c9cd74257b9bedc892baad90146885ef4 --- M tests/parser/parserTests.txt 1 file changed, 125 insertions(+), 20 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 9c92da0..cef935c 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1913,6 +1913,33 @@ !! end !! test +No p-wrappable content +!! wikitext +x +x +x +!! html+tidy +x +x +x +!! html/parsoid +x +x +x +!! end + +# T177612: Parsoid-only test +!! test +Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code +!! wikitext +{{echo|x}} +x +!! html/parsoid +x +x +!! end + +!! test Block tag on one line () !! wikitext a foo @@ -4806,8 +4833,11 @@ !! end +## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia: !! test External links: with no contents +!! options +parsoid=wt2html,wt2wt !! wikitext [http://en.wikipedia.org/wiki/Foo] @@ -5935,11 +5965,11 @@ !! wikitext [[Foo|Bar]] [[Foo|Bar]] -[[wikipedia:Foo|Bar]] -[[wikipedia:Foo|Bar]] +[[:en:Foo|Bar]] +[[:en:Foo|Bar]] -[[wikipedia:European_Robin|European Robin]] -[[wikipedia:European_Robin|European Robin]] +[[:en:European_Robin|European Robin]] +[[:en:European_Robin|European Robin]] !! end !! test @@ -8518,6 +8548,31 @@ !! end !! test +Parsoid link bracket escaping +!! options +parsoid=html2wt,html2html +!! html/parsoid +Test +[Test] +[[Test]] +[[[Test]]] +Test +[Test] +!! wikitext +[[Test]] + +[[[Test]]] + +Test + +[Test] + +[[Test]] + +[[[Test]]] +!! end + +!! test Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved !! wikitext [[Foo| bar]] @@ -8584,8 +8639,11 @@ http://www.usemod.com/cgi-bin/mb.pl?; title="meatball:">MeatBall: !! end +## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia: !! test Interwiki link encoding conversion (T3636) +!! options +parsoid=wt2html,wt2wt !! wikitext *[[Wikipedia:ro:Oltenia]] *[[Wikipedia:ro:Oltenia]] @@ -8597,6 +8655,11 @@ http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a; class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a; class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa + +!! html/parsoid + +http://en.wikipedia.org/wiki/ro:Olteniţa; title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa +http://en.wikipedia.org/wiki/ro:Olteniţa; title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa !! end @@ -9411,7 +9474,7 @@ !! html/parsoid - + @@ -11322,6 +11385,15 @@ !! html/parsoid foo item 1 +!! end + +## Regression test; the output here isn't really that interesting. +!! test +Templates with templated name and top level template args +!! wikitext +{{1{{2{{{3}}}|4=5 +!! html/parsoid +{{1{{2{{{3}}}|4=5 !! end # Parsoid markup is deliberate "broken". This is an edge case. @@ -14762,6 +14834,28 @@ This is the image caption !! end +!! test +Image with nested tables in caption +!! wikitext +[[File:Foobar.jpg|thumb|Foo +{| +| +{| +|z +|} +|} +]] +!! html/parsoid +Foo + + + +z + + + +!! end + ### # Conflicting image format options. # First option specified should 'win'. @@ -15615,9 +15709,9 @@ !! html/parsoid - + -↑ foo +↑ foo !! end !! test @@ -15627,9 +15721,9 @@ !! html/parsoid - + -↑ foo +↑ foo !! end ### @@ -18272,18 +18366,16 @@ ### Sanitizer ### -# HTML+Tidy effectively strips out the empty tags completely -# But since Parsoid doesn't it wraps the tags in p-tags -# which Tidy would have done for the PHP parser had there been content inside it. +# HTML+Tidy strips out empty tags completely. Parsoid doesn't. +# FIXME: Wikitext for this first test doesn't match its title. !! test Sanitizer: Closing of open tags !! wikitext -!! html - +!! html/php+tidy !! html/parsoid - + !! end !! test @@ -19993,7 +20085,7 @@ ' !! html/php !! html/parsoid - + !! end # same html as previous, but wikitext adjusted to match parsoid html2wt @@ -22298,7 +22390,7 @@ |} !! end -# Tests LanguageVariantText._fromSelser +# Tests LanguageVariantText._fromSelSer !! test LanguageConverter selser (4) !! options @@ -22670,6 +22762,21 @@ abc a:b=c 0;zh-tw:bar +!! end + +!! test +T179579: Nowiki and lc interaction +!! options +parsoid=wt2html +language=sr +!! wikitext +-{123}- + +-{123|456}- +!! html/parsoid + + + !! end !! test @@ -24448,9 +24555,7 @@ !! wikitext
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: search.wikimedia.org: Don't bail on bad $site or $lang params
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390352 ) Change subject: search.wikimedia.org: Don't bail on bad $site or $lang params .. search.wikimedia.org: Don't bail on bad $site or $lang params Who cares? Just use the defaults since that's what we want. Change-Id: I75aeb88d63e36888534f880619ac73ad32ce4513 --- M docroot/search.wikimedia.org/index.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Chad: Looks good to me, approved EBernhardson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/docroot/search.wikimedia.org/index.php b/docroot/search.wikimedia.org/index.php index da82887..ef51f19 100644 --- a/docroot/search.wikimedia.org/index.php +++ b/docroot/search.wikimedia.org/index.php @@ -34,16 +34,12 @@ if ( isset( $_GET['site'] ) ) { if ( is_string( $_GET['site'] ) && in_array( $_GET['site'], $allowedSites ) ) { $site = $_GET['site']; - } else { - dieOut( "Invalid parameter." ); } } if ( isset( $_GET['lang'] ) ) { if ( preg_match( '/^[a-z]+(-[a-z]+)*$/', $_GET['lang'] ) ) { $lang = $_GET['lang']; - } else { - dieOut( "Invalid language parameter." ); } } -- To view, visit https://gerrit.wikimedia.org/r/390352 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I75aeb88d63e36888534f880619ac73ad32ce4513 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Chad Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: search.wikimedia.org: simplify limit handling
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390347 ) Change subject: search.wikimedia.org: simplify limit handling .. search.wikimedia.org: simplify limit handling Just silently fall back to default limits when a bogus limit is given, there's no need to throw a 500 over that. Bug: T179266 Change-Id: I8cbf9deabf654a3fad661673b204a0fedeb7fabe --- M docroot/search.wikimedia.org/index.php 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: Chad: Looks good to me, approved EBernhardson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/docroot/search.wikimedia.org/index.php b/docroot/search.wikimedia.org/index.php index f9e6999..da82887 100644 --- a/docroot/search.wikimedia.org/index.php +++ b/docroot/search.wikimedia.org/index.php @@ -56,11 +56,9 @@ } if ( isset( $_GET['limit'] ) ) { - if ( is_string( $_GET['limit'] ) && preg_match( '/^\d+/', $_GET['limit'] ) - && intval( $_GET['limit'] ) > 0 && intval( $_GET['limit'] ) < 100 ) { - $limit = intval( $_GET['limit'] ); - } else { - dieOut( "Invalid limit parameter." ); + $limitParam = intval( $_GET['limit'] ); + if ( $limitParam >= 0 && $limitParam <= 100 ) { + $limit = $limitParam; } } -- To view, visit https://gerrit.wikimedia.org/r/390347 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8cbf9deabf654a3fad661673b204a0fedeb7fabe Gerrit-PatchSet: 4 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Chad Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Reedy Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: search.wikimedia.org: Remove silly configuration switch for ...
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390354 ) Change subject: search.wikimedia.org: Remove silly configuration switch for caching .. search.wikimedia.org: Remove silly configuration switch for caching Change-Id: Icc5eeb4a836e5290016b824dde1877e2d4534e04 --- M docroot/search.wikimedia.org/index.php 1 file changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/54/390354/1 diff --git a/docroot/search.wikimedia.org/index.php b/docroot/search.wikimedia.org/index.php index 338bb6f..49f8cb8 100644 --- a/docroot/search.wikimedia.org/index.php +++ b/docroot/search.wikimedia.org/index.php @@ -17,8 +17,6 @@ error_reporting( E_ALL ); ini_set( "display_errors", false ); -$caching = true; - $site = 'wikipedia'; $lang = 'en'; $search = ''; @@ -91,9 +89,7 @@ dieOut( "Unexpected result format." ); } -if ( $caching ) { - header( "Cache-Control: public, max-age: 1200, s-maxage: 1200" ); -} +header( "Cache-Control: public, max-age: 1200, s-maxage: 1200" ); print "\n" . "\n" . ""; -- To view, visit https://gerrit.wikimedia.org/r/390354 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc5eeb4a836e5290016b824dde1877e2d4534e04 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: search.wikimedia.org: Nicer handling of bad search parameter
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390353 ) Change subject: search.wikimedia.org: Nicer handling of bad search parameter .. search.wikimedia.org: Nicer handling of bad search parameter Wrap it in a trim() call so we don't search for empty strings. Also don't return a 500, return a 400 since it's the client's fault not ours Change-Id: I3d5ab0b9597e577b6113e9c1f89753d42e3fce9b --- M docroot/search.wikimedia.org/index.php 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/53/390353/1 diff --git a/docroot/search.wikimedia.org/index.php b/docroot/search.wikimedia.org/index.php index 043c906..338bb6f 100644 --- a/docroot/search.wikimedia.org/index.php +++ b/docroot/search.wikimedia.org/index.php @@ -45,11 +45,13 @@ if ( isset( $_GET['search'] ) ) { if ( is_string( $_GET['search'] ) ) { - $search = $_GET['search']; - } else { - dieOut( "Invalid search parameter." ); + $search = trim( $_GET['search'] ); } } +if ( !$search ) { + header( 'HTTP/1.0 400 Bad Request' ); + die( "Wikimedia search service bad request.\n\nRequest must include a 'search' parameter" ); +} if ( isset( $_GET['limit'] ) ) { $limitParam = intval( $_GET['limit'] ); -- To view, visit https://gerrit.wikimedia.org/r/390353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d5ab0b9597e577b6113e9c1f89753d42e3fce9b Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: search.wikimedia.org: Don't bail on bad $site or $lang params
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390352 ) Change subject: search.wikimedia.org: Don't bail on bad $site or $lang params .. search.wikimedia.org: Don't bail on bad $site or $lang params Who cares? Just use the defaults since that's what we want. Change-Id: I75aeb88d63e36888534f880619ac73ad32ce4513 --- M docroot/search.wikimedia.org/index.php 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/52/390352/1 diff --git a/docroot/search.wikimedia.org/index.php b/docroot/search.wikimedia.org/index.php index f6d1cbc..043c906 100644 --- a/docroot/search.wikimedia.org/index.php +++ b/docroot/search.wikimedia.org/index.php @@ -34,16 +34,12 @@ if ( isset( $_GET['site'] ) ) { if ( is_string( $_GET['site'] ) && in_array( $_GET['site'], $allowedSites ) ) { $site = $_GET['site']; - } else { - dieOut( "Invalid parameter." ); } } if ( isset( $_GET['lang'] ) ) { if ( preg_match( '/^[a-z]+(-[a-z]+)*$/', $_GET['lang'] ) ) { $lang = $_GET['lang']; - } else { - dieOut( "Invalid language parameter." ); } } -- To view, visit https://gerrit.wikimedia.org/r/390352 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75aeb88d63e36888534f880619ac73ad32ce4513 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.31.0-wmf.7]: Use the main stash for LBFactory "memStash" parameter
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390346 ) Change subject: Use the main stash for LBFactory "memStash" parameter .. Use the main stash for LBFactory "memStash" parameter This store is used for ChronologyProtector positions. It should be cross-DC since the sticky DC cookie may not work for rapid cross-wiki farm activity, causing some request go to the non-primary DC. NOTE: this change should be deployed on all farm wikis at once Change-Id: Ife126592aacace696e43912b9461164a9ea98bc1 --- M includes/db/MWLBFactory.php 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php index 5196ac2..aa1918d 100644 --- a/includes/db/MWLBFactory.php +++ b/includes/db/MWLBFactory.php @@ -142,16 +142,18 @@ } } + $services = MediaWikiServices::getInstance(); + // Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804) - $sCache = MediaWikiServices::getInstance()->getLocalServerObjectCache(); + $sCache = $services->getLocalServerObjectCache(); if ( $sCache->getQoS( $sCache::ATTR_EMULATION ) > $sCache::QOS_EMULATION_SQL ) { $lbConf['srvCache'] = $sCache; } - $cCache = ObjectCache::getLocalClusterInstance(); - if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) { - $lbConf['memStash'] = $cCache; + $mStash = $services->getMainObjectStash(); + if ( $mStash->getQoS( $mStash::ATTR_EMULATION ) > $mStash::QOS_EMULATION_SQL ) { + $lbConf['memStash'] = $mStash; } - $wCache = MediaWikiServices::getInstance()->getMainWANObjectCache(); + $wCache = $services->getMainWANObjectCache(); if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) { $lbConf['wanCache'] = $wCache; } -- To view, visit https://gerrit.wikimedia.org/r/390346 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife126592aacace696e43912b9461164a9ea98bc1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.31.0-wmf.7 Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use the main stash for LBFactory "memStash" parameter
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/372220 ) Change subject: Use the main stash for LBFactory "memStash" parameter .. Use the main stash for LBFactory "memStash" parameter This store is used for ChronologyProtector positions. It should be cross-DC since the sticky DC cookie may not work for rapid cross-wiki farm activity, causing some request go to the non-primary DC. NOTE: this change should be deployed on all farm wikis at once Change-Id: Ife126592aacace696e43912b9461164a9ea98bc1 --- M includes/db/MWLBFactory.php 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php index 5196ac2..aa1918d 100644 --- a/includes/db/MWLBFactory.php +++ b/includes/db/MWLBFactory.php @@ -142,16 +142,18 @@ } } + $services = MediaWikiServices::getInstance(); + // Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804) - $sCache = MediaWikiServices::getInstance()->getLocalServerObjectCache(); + $sCache = $services->getLocalServerObjectCache(); if ( $sCache->getQoS( $sCache::ATTR_EMULATION ) > $sCache::QOS_EMULATION_SQL ) { $lbConf['srvCache'] = $sCache; } - $cCache = ObjectCache::getLocalClusterInstance(); - if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) { - $lbConf['memStash'] = $cCache; + $mStash = $services->getMainObjectStash(); + if ( $mStash->getQoS( $mStash::ATTR_EMULATION ) > $mStash::QOS_EMULATION_SQL ) { + $lbConf['memStash'] = $mStash; } - $wCache = MediaWikiServices::getInstance()->getMainWANObjectCache(); + $wCache = $services->getMainWANObjectCache(); if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) { $lbConf['wanCache'] = $wCache; } -- To view, visit https://gerrit.wikimedia.org/r/372220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife126592aacace696e43912b9461164a9ea98bc1 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Setup: Include StartProfiler before others
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390351 ) Change subject: Setup: Include StartProfiler before others .. Setup: Include StartProfiler before others Bug: T180183 Change-Id: Ibcf78d094cf4dcf09bc919a5f8168f45ae225ebc --- M includes/Setup.php M tests/phpunit/autoload.ide.php 2 files changed, 9 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/51/390351/1 diff --git a/includes/Setup.php b/includes/Setup.php index 5d8520b..4c281b1 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -37,17 +37,17 @@ * Pre-config setup: Before loading LocalSettings.php */ +// Get profiler configuraton +$wgProfiler = []; +if ( file_exists( "$IP/StartProfiler.php" ) ) { + require "$IP/StartProfiler.php"; +} + // Start the autoloader, so that extensions can derive classes from core files require_once "$IP/includes/AutoLoader.php"; // Load up some global defines require_once "$IP/includes/Defines.php"; - -// Start the profiler -$wgProfiler = []; -if ( file_exists( "$IP/StartProfiler.php" ) ) { - require "$IP/StartProfiler.php"; -} // Load default settings require_once "$IP/includes/DefaultSettings.php"; diff --git a/tests/phpunit/autoload.ide.php b/tests/phpunit/autoload.ide.php index f883cf6..6f09d4c 100644 --- a/tests/phpunit/autoload.ide.php +++ b/tests/phpunit/autoload.ide.php @@ -38,14 +38,13 @@ // to $maintenance->mSelf. Keep that here for b/c $self = $maintenance->getName(); global $IP; -# Start the autoloader, so that extensions can derive classes from core files -require_once "$IP/includes/AutoLoader.php"; - -# Start the profiler +# Get profiler configuraton $wgProfiler = []; if ( file_exists( "$IP/StartProfiler.php" ) ) { require "$IP/StartProfiler.php"; } +# Start the autoloader, so that extensions can derive classes from core files +require_once "$IP/includes/AutoLoader.php"; $requireOnceGlobalsScope = function ( $file ) use ( $self ) { foreach ( array_keys( $GLOBALS ) as $varName ) { -- To view, visit https://gerrit.wikimedia.org/r/390351 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcf78d094cf4dcf09bc919a5f8168f45ae225ebc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Merge ProfilerFunctions into GlobalFunctions
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390350 ) Change subject: Merge ProfilerFunctions into GlobalFunctions .. Merge ProfilerFunctions into GlobalFunctions Even if people use these (deprecated) functions in the earliest hooks or in LocalSettings.php, it will keep working because GlobalFunctions is loaded between DefaultSettings.php and LocalSettings.php. The only places affected would be files in core: AutoLoader.php, Defines.php, and DefaultSettings.php, which don't use these functions. Change-Id: If4c0e8cbe1ea918283df22d72f792a3806569216 --- M includes/GlobalFunctions.php M includes/Setup.php D includes/profiler/ProfilerFunctions.php M tests/phpunit/autoload.ide.php 4 files changed, 34 insertions(+), 61 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/50/390350/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 1cff881..404d115 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3487,3 +3487,37 @@ return $baseArray; } + +/** + * Get system resource usage of current request context. + * Invokes the getrusage(2) system call, requesting RUSAGE_SELF if on PHP5 + * or RUSAGE_THREAD if on HHVM. Returns false if getrusage is not available. + * + * @since 1.24 + * @return array|bool Resource usage data or false if no data available. + */ +function wfGetRusage() { + if ( !function_exists( 'getrusage' ) ) { + return false; + } elseif ( defined( 'HHVM_VERSION' ) && PHP_OS === 'Linux' ) { + return getrusage( 2 /* RUSAGE_THREAD */ ); + } else { + return getrusage( 0 /* RUSAGE_SELF */ ); + } +} + +/** + * Begin profiling of a function + * @param string $functionname Name of the function we will profile + * @deprecated since 1.25 + */ +function wfProfileIn( $functionname ) { +} + +/** + * Stop profiling of a function + * @param string $functionname Name of the function we have profiled + * @deprecated since 1.25 + */ +function wfProfileOut( $functionname = 'missing' ) { +} diff --git a/includes/Setup.php b/includes/Setup.php index e4396ba..5d8520b 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -37,9 +37,6 @@ * Pre-config setup: Before loading LocalSettings.php */ -// Grab profiling functions -require_once "$IP/includes/profiler/ProfilerFunctions.php"; - // Start the autoloader, so that extensions can derive classes from core files require_once "$IP/includes/AutoLoader.php"; diff --git a/includes/profiler/ProfilerFunctions.php b/includes/profiler/ProfilerFunctions.php deleted file mode 100644 index cc71630..000 --- a/includes/profiler/ProfilerFunctions.php +++ /dev/null @@ -1,56 +0,0 @@ -http://www.gnu.org/copyleft/gpl.html - * - * @file - * @ingroup Profiler - */ - -/** - * Get system resource usage of current request context. - * Invokes the getrusage(2) system call, requesting RUSAGE_SELF if on PHP5 - * or RUSAGE_THREAD if on HHVM. Returns false if getrusage is not available. - * - * @since 1.24 - * @return array|bool Resource usage data or false if no data available. - */ -function wfGetRusage() { - if ( !function_exists( 'getrusage' ) ) { - return false; - } elseif ( defined( 'HHVM_VERSION' ) && PHP_OS === 'Linux' ) { - return getrusage( 2 /* RUSAGE_THREAD */ ); - } else { - return getrusage( 0 /* RUSAGE_SELF */ ); - } -} - -/** - * Begin profiling of a function - * @param string $functionname Name of the function we will profile - * @deprecated since 1.25 - */ -function wfProfileIn( $functionname ) { -} - -/** - * Stop profiling of a function - * @param string $functionname Name of the function we have profiled - * @deprecated since 1.25 - */ -function wfProfileOut( $functionname = 'missing' ) { -} diff --git a/tests/phpunit/autoload.ide.php b/tests/phpunit/autoload.ide.php index 106ab683..f883cf6 100644 --- a/tests/phpunit/autoload.ide.php +++ b/tests/phpunit/autoload.ide.php @@ -40,8 +40,6 @@ global $IP; # Start the autoloader, so that extensions can derive classes from core files require_once "$IP/includes/AutoLoader.php"; -# Grab profiling functions -require_once "$IP/includes/profiler/ProfilerFunctions.php"; # Start the profiler $wgProfiler = []; -- To view, visit https://gerrit.wikimedia.org/r/390350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If4c0e8cbe1ea918283df22d72f792a3806569216 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Use constrained quality mode for WebM VP8 and VP9
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/389900 ) Change subject: Use constrained quality mode for WebM VP8 and VP9 .. Use constrained quality mode for WebM VP8 and VP9 Use -crf option for both VP8 and VP9, which uses lower bitrate when possible while maintaining a certain quality level. This tends to use full bitrate for complex videos and lower bitrates for simpler videos with less motion. Replaces the VBR setting last introduced for VP9. * added 'crf' setting * removed the 'vbr' setting previously used for VP9 * tweaked the max size for 2160p VP8 to match VP9. * removed minimum keyframe interval forcing * increased max keyframe interval from 128 to 240 Bug: T70418 Change-Id: Ic48293c9666fc579f9a876a75266acadea326980 --- M WebVideoTranscode/WebVideoTranscode.php M WebVideoTranscode/WebVideoTranscodeJob.php 2 files changed, 38 insertions(+), 30 deletions(-) Approvals: Brion VIBBER: Looks good to me, approved jenkins-bot: Verified diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index 71f6460..8e21edd 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -175,10 +175,10 @@ [ 'maxSize'=> '288x160', 'videoBitrate' => '128', + 'crf'=> '10', 'audioQuality' => '-1', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'keyframeInterval' => '240', 'bufDelay' => '256', 'videoCodec' => 'vp8', 'slices' => '2', @@ -188,10 +188,10 @@ [ 'maxSize'=> '426x240', 'videoBitrate' => '256', + 'crf'=> '10', 'audioQuality' => '1', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'keyframeInterval' => '240', 'bufDelay' => '256', 'videoCodec' => 'vp8', 'slices' => '2', @@ -201,10 +201,10 @@ [ 'maxSize'=> '640x360', 'videoBitrate' => '512', + 'crf'=> '10', 'audioQuality' => '1', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'keyframeInterval' => '240', 'bufDelay' => '256', 'videoCodec' => 'vp8', 'slices' => '2', @@ -214,10 +214,10 @@ [ 'maxSize'=> '854x480', 'videoBitrate' => '1024', + 'crf'=> '10', 'audioQuality' => '2', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'keyframeInterval' => '240', 'bufDelay' => '256', 'videoCodec' => 'vp8', 'slices' => '4', @@ -227,40 +227,52 @@ [ 'maxSize'=> '1280x720', 'videoBitrate' => '2048', + 'crf'=> '10', 'audioQuality' => 3, - 'noUpscaling'
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Sync up with Parsoid parserTests.txt
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390349 ) Change subject: Sync up with Parsoid parserTests.txt .. Sync up with Parsoid parserTests.txt This now aligns with Parsoid commit 1d6c39d8f6f5972e72974f8d64e7a0a5c2288bf2 Change-Id: I38d9d47c9cd74257b9bedc892baad90146885ef4 --- M tests/parser/parserTests.txt 1 file changed, 125 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/390349/1 diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 9c92da0..cef935c 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1913,6 +1913,33 @@ !! end !! test +No p-wrappable content +!! wikitext +x +x +x +!! html+tidy +x +x +x +!! html/parsoid +x +x +x +!! end + +# T177612: Parsoid-only test +!! test +Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code +!! wikitext +{{echo|x}} +x +!! html/parsoid +x +x +!! end + +!! test Block tag on one line () !! wikitext a foo @@ -4806,8 +4833,11 @@ !! end +## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia: !! test External links: with no contents +!! options +parsoid=wt2html,wt2wt !! wikitext [http://en.wikipedia.org/wiki/Foo] @@ -5935,11 +5965,11 @@ !! wikitext [[Foo|Bar]] [[Foo|Bar]] -[[wikipedia:Foo|Bar]] -[[wikipedia:Foo|Bar]] +[[:en:Foo|Bar]] +[[:en:Foo|Bar]] -[[wikipedia:European_Robin|European Robin]] -[[wikipedia:European_Robin|European Robin]] +[[:en:European_Robin|European Robin]] +[[:en:European_Robin|European Robin]] !! end !! test @@ -8518,6 +8548,31 @@ !! end !! test +Parsoid link bracket escaping +!! options +parsoid=html2wt,html2html +!! html/parsoid +Test +[Test] +[[Test]] +[[[Test]]] +Test +[Test] +!! wikitext +[[Test]] + +[[[Test]]] + +Test + +[Test] + +[[Test]] + +[[[Test]]] +!! end + +!! test Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved !! wikitext [[Foo| bar]] @@ -8584,8 +8639,11 @@ http://www.usemod.com/cgi-bin/mb.pl?; title="meatball:">MeatBall: !! end +## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia: !! test Interwiki link encoding conversion (T3636) +!! options +parsoid=wt2html,wt2wt !! wikitext *[[Wikipedia:ro:Oltenia]] *[[Wikipedia:ro:Oltenia]] @@ -8597,6 +8655,11 @@ http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a; class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a; class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa + +!! html/parsoid + +http://en.wikipedia.org/wiki/ro:Olteniţa; title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa +http://en.wikipedia.org/wiki/ro:Olteniţa; title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa !! end @@ -9411,7 +9474,7 @@ !! html/parsoid - + @@ -11322,6 +11385,15 @@ !! html/parsoid foo item 1 +!! end + +## Regression test; the output here isn't really that interesting. +!! test +Templates with templated name and top level template args +!! wikitext +{{1{{2{{{3}}}|4=5 +!! html/parsoid +{{1{{2{{{3}}}|4=5 !! end # Parsoid markup is deliberate "broken". This is an edge case. @@ -14762,6 +14834,28 @@ This is the image caption !! end +!! test +Image with nested tables in caption +!! wikitext +[[File:Foobar.jpg|thumb|Foo +{| +| +{| +|z +|} +|} +]] +!! html/parsoid +Foo + + + +z + + + +!! end + ### # Conflicting image format options. # First option specified should 'win'. @@ -15615,9 +15709,9 @@ !! html/parsoid - + -↑ foo +↑ foo !! end !! test @@ -15627,9 +15721,9 @@ !! html/parsoid - + -↑ foo +↑ foo !! end ### @@ -18272,18 +18366,16 @@ ### Sanitizer ### -# HTML+Tidy effectively strips out the empty tags completely -# But since Parsoid doesn't it wraps the tags in p-tags -# which Tidy would have done for the PHP parser had there been content inside it. +# HTML+Tidy strips out empty tags completely. Parsoid doesn't. +# FIXME: Wikitext for this first test doesn't match its title. !! test Sanitizer: Closing of open tags !! wikitext -!! html - +!! html/php+tidy !! html/parsoid - + !! end !! test @@ -19993,7 +20085,7 @@ ' !! html/php !! html/parsoid - + !! end # same html as previous, but wikitext adjusted to match parsoid html2wt @@ -22298,7 +22390,7 @@ |} !! end -# Tests LanguageVariantText._fromSelser +# Tests LanguageVariantText._fromSelSer !! test LanguageConverter selser (4) !! options @@ -22670,6 +22762,21 @@ abc a:b=c 0;zh-tw:bar +!! end + +!! test +T179579: Nowiki and lc interaction +!! options +parsoid=wt2html +language=sr +!! wikitext +-{123}- + +-{123|456}- +!! html/parsoid + + + !! end !! test @@ -24448,9 +24555,7 @@ !! wikitext
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T178253: Handle pipe ending table attributes in figure captions
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390348 ) Change subject: T178253: Handle pipe ending table attributes in figure captions .. T178253: Handle pipe ending table attributes in figure captions * Fixes http://localhost:8000/nl.wikipedia.org/v3/page/html/Klimaatclassificatie_van_K%C3%B6ppen/50339930 * This isn't entirely correct, but let's see if we can justify it. In the php parser, `doTableStuff` happens before `replaceInternalLinks` so none of the table syntax pipes should ever be breaking for a "linkdesc". However, the only place this is really an issue currently are the two "table_attributes" instances in "table_row_tag" and "table_start_tag" where we don't normally break on pipes, since they're optional because the php parser considers the rest of the line as attributes. That permits nonsense like, {| testing | class="four" | ha |} In the common case, it would be sufficient to just optionally capture pipes there at those places with `(spaces* pipe)?` and be done with it. But this more permissive solution seems slightly more robust. * An interesting (to me) case is what happens when the suppressed "linkdesc" in this patch prevents legitimate breaking, as in, [[File:Foobar.jpg|thumb| {| | hi ho | jo |} ]] This manages to parse identically to the php parser because of support for templates returning options as pipe-separated strings in `renderFile`. But that's pretty broken wikitext. Change-Id: I88f54399094d21a1a9db769cd46a1258691459a9 --- M lib/wt2html/pegTokenizer.pegjs M lib/wt2html/tt/LinkHandler.js M tests/parserTests.txt 3 files changed, 31 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/48/390348/1 diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs index c4029cb..ac78b39 100644 --- a/lib/wt2html/pegTokenizer.pegjs +++ b/lib/wt2html/pegTokenizer.pegjs @@ -1727,7 +1727,11 @@ full_table_in_link_caption = (! inline_breaks / & '{{!}}' ) r:( -& { return stops.push('table', true); } +// Note that "linkdesc" is suppressed here to allow pipes in the +// `table_start_tag` and `table_row_tag` attributes. It's perhaps +// overly permissive but in those cases, the wikitext is likely to +// be pretty broken to begin with. +& { stops.push('linkdesc', false); return stops.push('table', true); } tbl:( table_start_tag optionalNewlines // Accept multiple end tags since a nested table may have been @@ -1735,10 +1739,11 @@ ((sol table_content_line optionalNewlines)* sol table_end_tag)+ ){ +stops.pop('linkdesc'); stops.pop('table'); return tbl; } - / & { return stops.pop('table'); } + / & { stops.pop('linkdesc'); return stops.pop('table'); } ) { return r; } table_lines diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js index 691026e..bef4d56 100644 --- a/lib/wt2html/tt/LinkHandler.js +++ b/lib/wt2html/tt/LinkHandler.js @@ -1674,6 +1674,10 @@ // image options as a pipe-separated string. We aren't // really providing editing support for this yet, or // ever, maybe. + // + // Tables in captions also make use of this as a fallback + // since they suppress breaking on "linkdesc" pipes. But + // that's very broken wikitext that doesn't need support. var pieces = oText.split("|").map(function(s) { return new KV("mw:maybeContent", s); }); diff --git a/tests/parserTests.txt b/tests/parserTests.txt index 178691c..75f161f 100644 --- a/tests/parserTests.txt +++ b/tests/parserTests.txt @@ -14835,6 +14835,26 @@ !! end !! test +Image with table with attributes in caption +!! options +parsoid=wt2html,html2html +!! wikitext +[[File:Foobar.jpg|thumb| +{| class="123" | +|- class="456" | +| ha +|} +]] +!! html/parsoid + + + + ha + + +!! end + +!! test Image with nested tables in caption !! wikitext [[File:Foobar.jpg|thumb|Foo -- To view, visit https://gerrit.wikimedia.org/r/390348 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88f54399094d21a1a9db769cd46a1258691459a9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Disentangle summary construction from lead object c...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390305 ) Change subject: Hygiene: Disentangle summary construction from lead object construction .. Hygiene: Disentangle summary construction from lead object construction Change-Id: I3b07e97c7b0e72684cec59054467de4a3f8abe3c --- M lib/mobile-util.js M routes/mobile-sections.js 2 files changed, 59 insertions(+), 73 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mobile-util.js b/lib/mobile-util.js index 79c99a7..84b4a94 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -1,5 +1,6 @@ 'use strict'; +const domino = require('domino'); const underscore = require('underscore'); const uuid = require('cassandra-uuid').TimeUuid; const HTTPError = require('./util').HTTPError; @@ -206,76 +207,91 @@ /** * Builds a dictionary containing the various forms of a page title that a client may need. * @param {!Object} title a mediawiki-title Title object constructed from a page title string - * @param {!Object} lead a page lead object from buildLeadObject in mobile-sections.js + * @param {!Object} meta page metadata * @return {!Object} a set of useful page title strings */ -mUtil.buildTitleDictionary = function(title, lead) { +mUtil.buildTitleDictionary = function(title, meta) { return { canonical: title.getPrefixedDBKey(), -normalized: lead.normalizedtitle, -display: lead.displaytitle, +normalized: meta.normalizedtitle, +display: meta.displaytitle, }; }; /* - * Build a summary for the page given in req + * Build a page summary + * @param {!String} domain the request domain * @param {!Object} title a mediawiki-title object for the page title - * @param {!Object} lead a page lead object for the page + * @param {!Object} pageData raw page data for the page * @return {!Object} a summary 2.0 spec-compliant page summary object */ -mUtil.buildSummary = function(domain, title, lead) { +mUtil.buildSummary = function(domain, title, pageData) { let summary = {}; -const type = 'standard'; -let code = 200; +const page = pageData.page; +const meta = pageData.meta; +const isContentModelWikitext = meta.contentmodel === 'wikitext'; +const isWhiteListedNamespace = mUtil.SUMMARY_NS_WHITELIST.includes(meta.ns); +const isMainPage = meta.mainpage; -if (!lead) { -return false; -} else if (lead.contentmodel || !mUtil.SUMMARY_NS_WHITELIST.includes(lead.ns)) { -code = 204; -} else if (lead.intro) { -summary = transforms.summarize(lead.intro); +if (!isContentModelWikitext) { +return { code: 204 }; +} + +if (!isWhiteListedNamespace) { +return { code: 204 }; +} + +if (isMainPage) { +return { code: 204 }; +} + +const leadText = domino.createDocument(page.sections[0].text); +const intro = transforms.extractLeadIntroduction(leadText); + +if (intro) { +summary = transforms.summarize(intro); } else { // If the lead introduction is empty we should consider it // a placeholder e.g. redirect page. To avoid sending an empty // summary 204. (T176517) -code = 204; +return { code: 204 }; } return Object.assign({ -code, -type, -title: lead.normalizedtitle, -displaytitle: lead.displaytitle, -namespace_id: lead.ns, -namespace_text: lead.ns_text, -titles: mUtil.buildTitleDictionary(title, lead), -pageid: lead.id, -thumbnail: lead.thumbnail, -originalimage: lead.originalimage, -lang: lead.lang, -dir: lead.dir, -revision: lead.revision, -tid: lead.tid, -timestamp: lead.lastmodified, -description: lead.description, -coordinates: lead.geo && { -lat: lead.geo.latitude, -lon: lead.geo.longitude +code: 200, +type: 'standard', +title: meta.normalizedtitle, +displaytitle: meta.displaytitle, +namespace_id: meta.ns, +namespace_text: meta.ns_text, +titles: mUtil.buildTitleDictionary(title, meta), +pageid: meta.id, +thumbnail: meta.thumbnail, +originalimage: meta.originalimage, +lang: meta.lang, +dir: meta.dir, +revision: page.revision, +tid: page.tid, +timestamp: meta.lastmodified, +description: meta.description, +coordinates: meta.geo && { +lat: meta.geo.lat, +lon: meta.geo.lon }, -content_urls: mUtil.buildContentUrls(domain, title, lead), -api_urls: mUtil.buildApiUrls(domain, title, lead), +content_urls: mUtil.buildContentUrls(domain, title, meta), +api_urls: mUtil.buildApiUrls(domain, title, meta), }, summary); };
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: search.wikimedia.org: simplify limit handling
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390347 ) Change subject: search.wikimedia.org: simplify limit handling .. search.wikimedia.org: simplify limit handling Just silently fall back to default limits when a bogus limit is given, there's no need to throw a 500 over that. Change-Id: I8cbf9deabf654a3fad661673b204a0fedeb7fabe --- M docroot/search.wikimedia.org/index.php 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/47/390347/1 diff --git a/docroot/search.wikimedia.org/index.php b/docroot/search.wikimedia.org/index.php index f9e6999..f6d1cbc 100644 --- a/docroot/search.wikimedia.org/index.php +++ b/docroot/search.wikimedia.org/index.php @@ -56,11 +56,9 @@ } if ( isset( $_GET['limit'] ) ) { - if ( is_string( $_GET['limit'] ) && preg_match( '/^\d+/', $_GET['limit'] ) - && intval( $_GET['limit'] ) > 0 && intval( $_GET['limit'] ) < 100 ) { - $limit = intval( $_GET['limit'] ); - } else { - dieOut( "Invalid limit parameter." ); + $limitParam = intval( $_GET['limit'] ); + if ( $limitParam => 0 && $limitParam <= 100 ) { + $limit = $limitParam; } } -- To view, visit https://gerrit.wikimedia.org/r/390347 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8cbf9deabf654a3fad661673b204a0fedeb7fabe Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.31.0-wmf.7]: [DNM] Use the main stash for LBFactory "memStash" parameter
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390346 ) Change subject: [DNM] Use the main stash for LBFactory "memStash" parameter .. [DNM] Use the main stash for LBFactory "memStash" parameter This store is used for ChronologyProtector positions. It should be cross-DC since the sticky DC cookie may not work for rapid cross-wiki farm activity, causing some request go to the non-primary DC. NOTE: this change should be deployed on all farm wikis at once Change-Id: Ife126592aacace696e43912b9461164a9ea98bc1 --- M includes/db/MWLBFactory.php 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/46/390346/1 diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php index 5196ac2..aa1918d 100644 --- a/includes/db/MWLBFactory.php +++ b/includes/db/MWLBFactory.php @@ -142,16 +142,18 @@ } } + $services = MediaWikiServices::getInstance(); + // Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804) - $sCache = MediaWikiServices::getInstance()->getLocalServerObjectCache(); + $sCache = $services->getLocalServerObjectCache(); if ( $sCache->getQoS( $sCache::ATTR_EMULATION ) > $sCache::QOS_EMULATION_SQL ) { $lbConf['srvCache'] = $sCache; } - $cCache = ObjectCache::getLocalClusterInstance(); - if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) { - $lbConf['memStash'] = $cCache; + $mStash = $services->getMainObjectStash(); + if ( $mStash->getQoS( $mStash::ATTR_EMULATION ) > $mStash::QOS_EMULATION_SQL ) { + $lbConf['memStash'] = $mStash; } - $wCache = MediaWikiServices::getInstance()->getMainWANObjectCache(); + $wCache = $services->getMainWANObjectCache(); if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) { $lbConf['wanCache'] = $wCache; } -- To view, visit https://gerrit.wikimedia.org/r/390346 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife126592aacace696e43912b9461164a9ea98bc1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.31.0-wmf.7 Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: [DO NOT MERGE] ClippableElement: Debugging code
Bartosz Dziewoński has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390345 ) Change subject: [DO NOT MERGE] ClippableElement: Debugging code .. [DO NOT MERGE] ClippableElement: Debugging code This draws some brightly colored rectangles representing things that we measure and is immensely useful when debugging this mind-flaying code. Change-Id: Ibbffb702870b684b530dc5da70508043a908c65d --- M demos/demo.js M src/mixins/ClippableElement.js 2 files changed, 32 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/45/390345/1 diff --git a/demos/demo.js b/demos/demo.js index 01f0a95..88ed946 100644 --- a/demos/demo.js +++ b/demos/demo.js @@ -105,10 +105,10 @@ OO.ui.getViewportSpacing = function () { return { // Contents of dialogs are shown on top of the fixed menu - top: demo.mode.page === 'dialogs' ? 0 : demo.$menu.outerHeight(), - right: 0, - bottom: 0, - left: 0 + top: demo.mode.page === 'dialogs' ? 30 : demo.$menu.outerHeight(), + right: 30, + bottom: 30, + left: 30 }; } }; diff --git a/src/mixins/ClippableElement.js b/src/mixins/ClippableElement.js index 43c2220..84b349a 100644 --- a/src/mixins/ClippableElement.js +++ b/src/mixins/ClippableElement.js @@ -44,6 +44,21 @@ this.setClippableContainer( config.$clippableContainer ); } this.setClippableElement( config.$clippable || this.$element ); + + this.$debug1 = $( '' ).css( { 'pointer-events': 'none', position: 'fixed', 'z-index': 10, outline: '1px solid green' } ); + this.$debug2 = $( '' ).css( { 'pointer-events': 'none', position: 'fixed', 'z-index': 10, outline: '1px solid blue' } ); + this.$debug3 = $( '' ).css( { 'pointer-events': 'none', position: 'fixed', 'z-index': 10, outline: '1px solid red' } ); + this.on( 'toggle', function ( visible ) { + if ( visible ) { + this.$debug1.appendTo( 'body' ); + this.$debug2.appendTo( 'body' ); + this.$debug3.appendTo( 'body' ); + } else { + this.$debug1.detach(); + this.$debug2.detach(); + this.$debug3.detach(); + } + }.bind( this ) ) }; /* Methods */ @@ -333,6 +348,19 @@ availableRect = rectIntersection( viewportRect, itemRect ); + function rectCSS( rect ) { + return { + top: rect.top, + left: rect.left, + width: rect.right - rect.left, + height: rect.bottom - rect.top + }; + } + + this.$debug1.css( rectCSS( viewportRect ) ); + this.$debug2.css( rectCSS( itemRect ) ); + this.$debug3.css( rectCSS( availableRect ) ); + desiredWidth = Math.max( 0, availableRect.right - availableRect.left ); desiredHeight = Math.max( 0, availableRect.bottom - availableRect.top ); // It should never be desirable to exceed the dimensions of the browser viewport... right? -- To view, visit https://gerrit.wikimedia.org/r/390345 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibbffb702870b684b530dc5da70508043a908c65d Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Avoid notices due to undefined indexes
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390344 ) Change subject: Avoid notices due to undefined indexes .. Avoid notices due to undefined indexes * Fix issue due to lack of any kind of checking whatsoever * Add tests Bug: T158928 Change-Id: Id1677240e6925c163464d274e9424b701fc0d0e9 --- M Collection.body.php A tests/phpunit/SpecialCollectionTest.php 2 files changed, 74 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/44/390344/1 diff --git a/Collection.body.php b/Collection.body.php index fc6574a..f6bb1cb 100644 --- a/Collection.body.php +++ b/Collection.body.php @@ -783,11 +783,31 @@ return false; } $collection = CollectionSession::getCollection(); - $saved = $collection['items'][$index + $delta]; - $collection['items'][$index + $delta] = $collection['items'][$index]; - $collection['items'][$index] = $saved; - CollectionSession::setCollection( $collection ); - return true; + $collection = self::moveItemInCollection( $collection, $index, $delta ); + if ( $collection === false ) { + return false; + } else { + CollectionSession::setCollection( $collection ); + return true; + } + } + + /** +* @param array $collection +* @param int $index +* @param int $delta +* @return bool|collection +*/ + public static function moveItemInCollection( $collection, $index, $delta ) { + $swapIndex = $index + $delta; + if ( $collection && isset( $collection['items'][$swapIndex] ) && isset( $collection['items'][$index] ) ) { + $saved = $collection['items'][$swapIndex]; + $collection['items'][$swapIndex] = $collection['items'][$index]; + $collection['items'][$index] = $saved; + return $collection; + } else { + return false; + } } /** diff --git a/tests/phpunit/SpecialCollectionTest.php b/tests/phpunit/SpecialCollectionTest.php new file mode 100644 index 000..696e3cd --- /dev/null +++ b/tests/phpunit/SpecialCollectionTest.php @@ -0,0 +1,49 @@ + [ 'A', 'B', 'C' ] ], + 0, 1, + [ 'items' => [ 'B', 'A', 'C' ] ], + ], + // Although pointless swapping a number with itself is possible + [ + [ 'items' => [ 'A', 'B', 'C' ] ], + 0, 0, + [ 'items' => [ 'A', 'B', 'C' ] ], + ], + // Cannot swap if the number out of range + [ + [ 'items' => [ 'A', 'B', 'C' ] ], + 0, 5, + false, + ], + ]; + } + + /** +* @dataProvider provideMoveItemInCollection +*/ + public function testMoveItemInCollection( $collection, $index, $delta, $expectedResult ) { + + $this->assertSame( + SpecialCollection::moveItemInCollection( $collection, $index, $delta ), + $expectedResult + ); + } +} -- To view, visit https://gerrit.wikimedia.org/r/390344 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1677240e6925c163464d274e9424b701fc0d0e9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection Gerrit-Branch: master Gerrit-Owner: Jdlrobson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: WIP: Added new stats collector implemetation of prometheus t...
Jgleeson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390343 ) Change subject: WIP: Added new stats collector implemetation of prometheus tracking for donation count by gateway and donation message age between enqueued to save time Depends-on: I7a0cca729fc2bfc772c8aba1ccaff4aed8fb6816 .. WIP: Added new stats collector implemetation of prometheus tracking for donation count by gateway and donation message age between enqueued to save time Depends-on: I7a0cca729fc2bfc772c8aba1ccaff4aed8fb6816 Change-Id: I846f54fdf2d580a5754e8f512367da6511cbf42b --- M composer.lock M sites/all/modules/queue2civicrm/DonationQueueConsumer.php M sites/all/modules/queue2civicrm/queue2civicrm.module 3 files changed, 25 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/43/390343/1 diff --git a/composer.lock b/composer.lock index bea53d1..ab5d26d 100644 --- a/composer.lock +++ b/composer.lock @@ -693,12 +693,12 @@ "source": { "type": "git", "url": "https://github.com/jackgleeson/stats-collector.git;, -"reference": "aea67373961256d736bd0bd649d8decb052ca757" +"reference": "517e4cc310a59555d3de41e3fc4a4d2822ab963a" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/jackgleeson/stats-collector/zipball/aea67373961256d736bd0bd649d8decb052ca757;, -"reference": "aea67373961256d736bd0bd649d8decb052ca757", +"url": "https://api.github.com/repos/jackgleeson/stats-collector/zipball/517e4cc310a59555d3de41e3fc4a4d2822ab963a;, +"reference": "517e4cc310a59555d3de41e3fc4a4d2822ab963a", "shasum": "" }, "require": { @@ -710,7 +710,8 @@ "type": "library", "autoload": { "psr-4": { -"Statistics\\": "src/" +"Statistics\\": "src/", +"Samples\\": "samples/" } }, "notification-url": "https://packagist.org/downloads/;, @@ -724,7 +725,7 @@ } ], "description": "Utility to help record, analyse and export statistics across any PHP process e.g. http request, batch jobs or cli-scrpts", -"time": "2017-11-08T15:57:25+00:00" +"time": "2017-11-09T22:07:12+00:00" }, { "name": "league/csv", diff --git a/sites/all/modules/queue2civicrm/DonationQueueConsumer.php b/sites/all/modules/queue2civicrm/DonationQueueConsumer.php index 392da47..25f0136 100644 --- a/sites/all/modules/queue2civicrm/DonationQueueConsumer.php +++ b/sites/all/modules/queue2civicrm/DonationQueueConsumer.php @@ -3,7 +3,7 @@ use Queue2civicrmTrxnCounter; use SmashPig\Core\DataStores\PendingDatabase; use SmashPig\Core\UtcDate; -use Statistics\Collector\CiviCRMCollector as CiviStatsCollector; +use Statistics\Collector\Collector as StatsCollector; use wmf_common\TransactionalWmfQueueConsumer; use WmfException; @@ -76,19 +76,23 @@ $age = UtcDate::getUtcTimestamp() - $message['source_enqueued_time']; } else { - //otherwise we work out the time difference between now and the processor supplied transactin date, recieve_date + //otherwise we work out the time difference between now and the processor supplied transaction date, recieve_date $age = UtcDate::getUtcTimestamp() - UtcDate::getUtcTimestamp($contribution['receive_date']); } -$statsCollector = CiviStatsCollector::getInstance(); -$statsCollector->addStat("donation_message_age.{$message['gateway']}", - $age); -$statsCollector->incrementStat("{$message['gateway']}.donations"); +$statsCollector = StatsCollector::getInstance(); +$statsCollector->setNamespace("donations"); -// keep count of the transactions -$counter = Queue2civicrmTrxnCounter::instance(); -$counter->increment($message['gateway']); -$counter->addAgeMeasurement($message['gateway'], $age); +// add a stat to record the number of gateway donations +$statsCollector->incrementStat("{$message['gateway']}", 1); +// add a stat for the message age between enqueued to to now +$statsCollector->addStat("{$message['gateway']}.message_age", $age); +// workout the average message age between enqueued to to now +$statsCollector->addStat( + "{$message['gateway']}.average_message_age", + $statsCollector->getStatAverage("{$message['gateway']}.message_age"), + ['clobber' => TRUE] +); // Delete any pending db entries with matching gateway and order_id PendingDatabase::get()->deleteMessage($message); diff --git a/sites/all/modules/queue2civicrm/queue2civicrm.module b/sites/all/modules/queue2civicrm/queue2civicrm.module
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: added first implmentation of new stats collector prometheus ...
Jgleeson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390342 ) Change subject: added first implmentation of new stats collector prometheus behaviour alongside existing donation processor and age prometheus metric reporting code .. added first implmentation of new stats collector prometheus behaviour alongside existing donation processor and age prometheus metric reporting code Change-Id: Id5977cb3f2d3e8846d83ddf422c6569be75ea1e9 --- M civicrm M composer.json M composer.lock M sites/all/modules/queue2civicrm/DonationQueueConsumer.php M sites/all/modules/queue2civicrm/queue2civicrm.module 5 files changed, 192 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/42/390342/1 diff --git a/civicrm b/civicrm index f0ea364..22ffe27 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit f0ea3643e3d34f77bbd4f3a11a1134fe1602fa2a +Subproject commit 22ffe27bb9c2fae326fef1873d78bdfd0af96ecb diff --git a/composer.json b/composer.json index 72a398e..81456c6 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,8 @@ "phpseclib/phpseclib": "~2.0", "predis/predis": "1.*", "twig/twig": "1.*", -"wikimedia/composer-merge-plugin": "^1.4" +"wikimedia/composer-merge-plugin": "^1.4", +"jackgleeson/stats-collector": "dev-master" }, "repositories": [ { diff --git a/composer.lock b/composer.lock index 34f7606..bea53d1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, "This file is @generated automatically" ], -"content-hash": "32a4c6d1dba52d233ae8892c1908badf", +"content-hash": "f5b1e547c9865d17802925641c804265", "packages": [ { "name": "addshore/psr-6-mediawiki-bagostuff-adapter", @@ -88,7 +88,7 @@ "payment", "payments" ], -"time": "2016-02-17T00:44:20+00:00" +"time": "2016-02-17T00:53:20+00:00" }, { "name": "clio/clio", @@ -351,6 +351,65 @@ "description": "Powerful command-line option toolkit", "homepage": "http://github.com/c9s/GetOptionKit;, "time": "2017-06-30T14:54:48+00:00" +}, +{ +"name": "dflydev/dot-access-data", +"version": "v1.1.0", +"source": { +"type": "git", +"url": "https://github.com/dflydev/dflydev-dot-access-data.git;, +"reference": "3fbd874921ab2c041e899d044585a2ab9795df8a" +}, +"dist": { +"type": "zip", +"url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/3fbd874921ab2c041e899d044585a2ab9795df8a;, +"reference": "3fbd874921ab2c041e899d044585a2ab9795df8a", +"shasum": "" +}, +"require": { +"php": ">=5.3.2" +}, +"type": "library", +"extra": { +"branch-alias": { +"dev-master": "1.0-dev" +} +}, +"autoload": { +"psr-0": { +"Dflydev\\DotAccessData": "src" +} +}, +"notification-url": "https://packagist.org/downloads/;, +"license": [ +"MIT" +], +"authors": [ +{ +"name": "Dragonfly Development Inc.", +"email": "i...@dflydev.com", +"homepage": "http://dflydev.com; +}, +{ +"name": "Beau Simensen", +"email": "b...@dflydev.com", +"homepage": "http://beausimensen.com; +}, +{ +"name": "Carlos Frutos", +"email": "car...@kiwing.it", +"homepage": "https://github.com/cfrutos; +} +], +"description": "Given a deep data structure, access data by dot notation.", +"homepage": "https://github.com/dflydev/dflydev-dot-access-data;, +"keywords": [ +"access", +"data", +"dot", +"notation" +], +"time": "2017-01-20T21:14:22+00:00" }, { "name": "geoip2/geoip2", @@ -627,6 +686,45 @@ "password" ], "time": "2014-11-20T16:49:30+00:00" +}, +{ +"name": "jackgleeson/stats-collector", +"version": "dev-master", +"source": { +"type": "git", +"url":
[MediaWiki-commits] [Gerrit] integration/config[master]: Forward Jenkins SIGTERM down to actual process
Hashar has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390341 ) Change subject: Forward Jenkins SIGTERM down to actual process .. Forward Jenkins SIGTERM down to actual process When one does: - shell: 'docker run --tty foo' What really happens is: Jenkins runs sh -c 'docker run --tty foo'. Due to --tty the docker CLI does NOT forward signals to the daemon. The end result is that when a build is aborted (typically when Zuul dequeue changes), Jenkins send SIGTERM to all child, that kills the 'docker run' but leave the containerized process behind. At least for npm, the command keeps runninig in the background forever. Possibly in a loop trying to read a file descriptor that is no more around. Replace Jenkins spawned sh -c '' with the actual 'docker run' process. That is done by prefixing all occurences with 'exec'. Add a note after the exec XXX command that no more commands can be executed. Split a shell block in two to honor that. Remove --tty, which causes the Docker client to disable signals proxying regardless of --sig-proxy value. Drawback: Since stdout/stderr are no more considered TTY, python/ruby etc would do block based buffered instead of line based buffering. That means the timestamps would be a bit off but maybe that is not an issue. Food for later: investigate whether we need to --init as well. Bug: T176747 Change-Id: Iae0813407df2cdfbe66f0fa69e58f08884ebb3d4 --- M jjb/castor.yaml M jjb/macro-docker.yaml M jjb/mediawiki-extensions.yaml M jjb/mediawiki.yaml M jjb/service-pipeline.groovy 5 files changed, 30 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/41/390341/1 diff --git a/jjb/castor.yaml b/jjb/castor.yaml index befc0ba..541cc47 100644 --- a/jjb/castor.yaml +++ b/jjb/castor.yaml @@ -63,10 +63,11 @@ builders: - shell: | echo "Clearing $WORKSPACE/cache" - docker run --rm --tty \ + exec docker run --rm \ --env-file .env \ --volume "$(pwd)"/cache:/cache \ 'wmfreleng/castor:v2017.10.30.21.03' clear || : + # nothing else can be executed due to exec # Entry point to load cache from central cache # @@ -89,11 +90,12 @@ - docker-cache-dir - shell: | /usr/bin/env > .env -docker run --rm --tty \ +exec docker run --rm \ --env-file .env \ --volume "${WORKSPACE}/cache":/cache \ wmfreleng/castor:v2017.10.30.21.03 \ load +# nothing else can be executed due to exec # Job triggered on the central repository instance # diff --git a/jjb/macro-docker.yaml b/jjb/macro-docker.yaml index cdb828b..080fdb1 100644 --- a/jjb/macro-docker.yaml +++ b/jjb/macro-docker.yaml @@ -66,11 +66,12 @@ - shell: | #!/bin/bash -eu set -x -docker run \ ---rm --tty \ +exec docker run \ +--rm \ --env-file .env \ --volume "$(pwd)"/log:{logdir} \ {image} +# nothing else can be executed due to exec # Run a docker image with .env and a log and cache directory - builder: @@ -79,12 +80,13 @@ - shell: | #!/bin/bash -eu set -x -docker run \ ---rm --tty \ +exec docker run \ +--rm \ --env-file .env \ --volume "$(pwd)"/log:{logdir} \ --volume "$(pwd)"/cache:/cache \ {image} +# nothing else can be executed due to exec # Run a docker image with cache, log, and src directories - builder: @@ -94,12 +96,13 @@ #!/bin/bash -eu set -x chmod 2777 src -docker run \ ---rm --tty \ +exec docker run \ +--rm \ --volume "$(pwd)"/log:{logdir} \ --volume "$(pwd)"/cache:/cache \ --volume "$(pwd)"/src:/src \ {image} +# nothing else can be executed due to exec # Use a docker image to clone for a MediaWiki extension - builder: @@ -108,8 +111,8 @@ - shell: | #!/bin/bash -eu set -x -docker run \ ---rm --tty \ +exec docker run \ +--rm \ --env-file .env \ --volume "$(pwd)"/src:/src \ --volume "$(pwd)"/cache:/cache \ @@ -117,6 +120,7 @@ --entrypoint "bash" \ wmfreleng/ci-src-setup:v2017.10.17.09.17 \ /srv/setup-mwext.sh +# nothing else can be executed due to exec # Use a docker image to clone the repository into /src - builder: @@ -125,10 +129,11 @@ - shell: | #!/bin/bash -eu set -x -docker run \ ---rm --tty \ +exec docker run \ +
[MediaWiki-commits] [Gerrit] mediawiki/selenium[master]: Remove git.wikimedia.org reference
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390340 ) Change subject: Remove git.wikimedia.org reference .. Remove git.wikimedia.org reference Change-Id: I75fa9195c206a78ef3eda80ffa181564cba7c7a9 --- M RELEASES.md 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/RELEASES.md b/RELEASES.md index 1e271af..2aa4ba3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -98,7 +98,7 @@ scenario outlines ### 1.2.0 2015-05-28 -* Support logging to a [Raita](http://git.wikimedia.org/summary/integration%2Fraita.git) +* Support logging to a Raita Elasticsearch database by setting `RAITA_URL` * Removed deprecated support for `MEDIAWIKI_PASSWORD_VARIABLE` -- To view, visit https://gerrit.wikimedia.org/r/390340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I75fa9195c206a78ef3eda80ffa181564cba7c7a9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/selenium[master]: Remove git.wikimedia.org reference
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390340 ) Change subject: Remove git.wikimedia.org reference .. Remove git.wikimedia.org reference Change-Id: I75fa9195c206a78ef3eda80ffa181564cba7c7a9 --- M RELEASES.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/40/390340/1 diff --git a/RELEASES.md b/RELEASES.md index 1e271af..2aa4ba3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -98,7 +98,7 @@ scenario outlines ### 1.2.0 2015-05-28 -* Support logging to a [Raita](http://git.wikimedia.org/summary/integration%2Fraita.git) +* Support logging to a Raita Elasticsearch database by setting `RAITA_URL` * Removed deprecated support for `MEDIAWIKI_PASSWORD_VARIABLE` -- To view, visit https://gerrit.wikimedia.org/r/390340 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75fa9195c206a78ef3eda80ffa181564cba7c7a9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add cause action/agent tracking to html purge jobs
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390339 ) Change subject: Add cause action/agent tracking to html purge jobs .. Add cause action/agent tracking to html purge jobs Also made scheduleRefreshLinks() use array_merge. Change-Id: I7f4b9a227b04a87f17d37dffc56f7b2eb6a02fcf --- M client/includes/Changes/ChangeHandler.php M client/includes/Changes/PageUpdater.php M client/includes/Changes/WikiPageUpdater.php 3 files changed, 25 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/39/390339/1 diff --git a/client/includes/Changes/ChangeHandler.php b/client/includes/Changes/ChangeHandler.php index 662f575..abbfa27 100644 --- a/client/includes/Changes/ChangeHandler.php +++ b/client/includes/Changes/ChangeHandler.php @@ -135,7 +135,12 @@ $rootJobParams['rootJobTimestamp'] = wfTimestampNow(); } - $this->updater->purgeWebCache( $titlesToUpdate, $rootJobParams ); + $this->updater->purgeWebCache( + $titlesToUpdate, + $rootJobParams, + $change->getAction(), + $change->hasField( 'user_id' ) ? 'uid:' . $change->getUserId() : 'uid:?' + ); $this->updater->scheduleRefreshLinks( $titlesToUpdate, $rootJobParams, diff --git a/client/includes/Changes/PageUpdater.php b/client/includes/Changes/PageUpdater.php index 8d1019d..0fe3063 100644 --- a/client/includes/Changes/PageUpdater.php +++ b/client/includes/Changes/PageUpdater.php @@ -21,8 +21,15 @@ * * @param Title[] $titles The Titles of the pages to update * @param array $rootJobParams any relevant root job parameters to be inherited by new jobs. +* @param string $causeAction Triggering action +* @param string $causeAgent Triggering agent */ - public function purgeWebCache( array $titles, array $rootJobParams = [] ); + public function purgeWebCache( + array $titles, + array $rootJobParams = [], + $causeAction, + $causeAgent + ); /** * Schedules RefreshLinks jobs for the given titles diff --git a/client/includes/Changes/WikiPageUpdater.php b/client/includes/Changes/WikiPageUpdater.php index b4f5f0f..36cb34f 100644 --- a/client/includes/Changes/WikiPageUpdater.php +++ b/client/includes/Changes/WikiPageUpdater.php @@ -142,8 +142,15 @@ * * @param Title[] $titles The Titles of the pages to update * @param array $rootJobParams +* @param string $causeAction Triggering action +* @param string $causeAgent Triggering agent */ - public function purgeWebCache( array $titles, array $rootJobParams = [] ) { + public function purgeWebCache( + array $titles, + array $rootJobParams = [], + $causeAction, + $causeAgent + ) { if ( $titles === [] ) { return; } @@ -152,6 +159,7 @@ $titleBatches = array_chunk( $titles, $this->purgeCacheBatchSize ); $dummyTitle = Title::makeTitle( NS_SPECIAL, 'Badtitle/' . __CLASS__ ); + $cause = [ 'causeAction' => $causeAction, 'causeAgent' => $causeAgent ]; /* @var Title[] $batch */ foreach ( $titleBatches as $batch ) { wfDebugLog( __CLASS__, __FUNCTION__ . ": scheduling HTMLCacheUpdateJob for " @@ -159,7 +167,7 @@ $jobs[] = new HTMLCacheUpdateJob( $dummyTitle, // the title will be ignored because the 'pages' parameter is set. - $this->buildJobParams( $batch, $rootJobParams ) + array_merge( $this->buildJobParams( $batch, $rootJobParams ), $cause ) ); } @@ -194,7 +202,7 @@ $cause = [ 'causeAction' => $causeAction, 'causeAgent' => $causeAgent ]; foreach ( $titles as $title ) { $this->jobQueueGroup->lazyPush( - new RefreshLinksJob( $title, $rootJobParams + $cause ) + new RefreshLinksJob( $title, array_merge( $rootJobParams, $cause ) ) ); } -- To view, visit https://gerrit.wikimedia.org/r/390339 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f4b9a227b04a87f17d37dffc56f7b2eb6a02fcf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aaron Schulz
[MediaWiki-commits] [Gerrit] maps/tilerator[master]: git.wm.o -> phab.wm.o
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390021 ) Change subject: git.wm.o -> phab.wm.o .. git.wm.o -> phab.wm.o Bug: T139089 Change-Id: I3e482c9ea1751a2a4cf8ca698ad70dda97bc3991 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Verified; Looks good to me, approved TerraCodes: Looks good to me, but someone else must approve diff --git a/README.md b/README.md index 579bc0d..201086a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Tilerator** (Russian: Тилератор, tee-LEH-ruh-tor) -This code is cross-hosted at [gerrit](https://git.wikimedia.org/summary/maps%2FTilerator) +This code is cross-hosted at [gerrit](https://phabricator.wikimedia.org/source/maps-tilerator/) Generating tiles from the SQL queries sometimes requires a considerable time, often too long for the web request. Tilerator is a multi-processor, cluster-enabled tile generator, that allows both pre-generation and dirty tile re-generation. -- To view, visit https://gerrit.wikimedia.org/r/390021 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e482c9ea1751a2a4cf8ca698ad70dda97bc3991 Gerrit-PatchSet: 1 Gerrit-Project: maps/tilerator Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Chad Gerrit-Reviewer: TerraCodes Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/geowiki[master]: git.wikimedia.org -> phab
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/389907 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: Ib5af27eafc755f782e535d4e8dafabad212de19e --- M scripts/README.IF.THESE.SCRIPTS.BREAK M setup.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Chad: Verified; Looks good to me, approved TerraCodes: Looks good to me, but someone else must approve diff --git a/scripts/README.IF.THESE.SCRIPTS.BREAK b/scripts/README.IF.THESE.SCRIPTS.BREAK index caa79fe..0d51e39 100644 --- a/scripts/README.IF.THESE.SCRIPTS.BREAK +++ b/scripts/README.IF.THESE.SCRIPTS.BREAK @@ -21,7 +21,7 @@ pip install -e git+git://github.com/embr/gcat.git#egg=gcat-0.1.0 -# any dependencies needed by http://git.wikimedia.org/blob/analytics%2Fgeowiki.git/2050c2c1e9c0850f27bb0d0f266101026f693bfc/setup.py. At the time of writing only this was necessary: +# any dependencies needed by https://phabricator.wikimedia.org/source/analytics-geowiki/browse/master/setup.py. At the time of writing only this was necessary: # for using the MaxMind databases pip install --user geoip diff --git a/setup.py b/setup.py index 4e750da..57b2129 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ version='0.1.0', description='Geo Coding module', long_description=readme, -url='http://git.wikimedia.org/summary/?r=analytics/geowiki.git', +url='https://phabricator.wikimedia.org/source/analytics-geowiki.git', author='Declerambaul', author_email='{otto,dvanliere,fkaelin,dsc,erosen}@wikimedia.org', -- To view, visit https://gerrit.wikimedia.org/r/389907 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib5af27eafc755f782e535d4e8dafabad212de19e Gerrit-PatchSet: 3 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: TerraCodesGerrit-Reviewer: 20after4 Gerrit-Reviewer: Chad Gerrit-Reviewer: TerraCodes Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...logster[master]: git.wikimedia.org -> phab
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390175 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: I37c96b0ef36f1e7f060aadc013dabc79ad83dbe9 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/debian/control b/debian/control index 8972446..620580e 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Build-Depends: python, python-setuptools, debhelper (>= 9), Standards-Version: 3.9.5 Vcs-Git: https://gerrit.wikimedia.org/r/operations/debs/logster -b debian -Vcs-Browser: http://git.wikimedia.org/tree/operations%2Fdebs%logster.git/refs%2Fheads%2Fdebian +Vcs-Browser: https://phabricator.wikimedia.org/source/operations-debs-logster/repository/master/ Package: logster Architecture: all -- To view, visit https://gerrit.wikimedia.org/r/390175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I37c96b0ef36f1e7f060aadc013dabc79ad83dbe9 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/logster Gerrit-Branch: master Gerrit-Owner: TerraCodesGerrit-Reviewer: Chad Gerrit-Reviewer: Elukey Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...nfsd-ldap[master]: git.wikimedia.org -> phab
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390050 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: If0ebf94db3187791dd92c93b42f86f7279c5f30a --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/debian/control b/debian/control index 73a5655..d4e0169 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Build-Depends: debhelper (>= 9) Standards-Version: 3.9.5 Vcs-Git: https://gerrit.wikimedia.org/r/operations/debs/nfsd-ldap -Vcs-Browser: https://git.wikimedia.org/summary/operations%2Fdebs%2Fnfsd-ldap +Vcs-Browser: https://phabricator.wikimedia.org/diffusion/ODNFS/ Package: nfsd-ldap Architecture: any -- To view, visit https://gerrit.wikimedia.org/r/390050 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If0ebf94db3187791dd92c93b42f86f7279c5f30a Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/nfsd-ldap Gerrit-Branch: master Gerrit-Owner: TerraCodesGerrit-Reviewer: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: git.wikimedia.org -> phab
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390336 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: I33a6e16b71c7659a8e25fe4f9d74968f3bb0c879 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/README.md b/README.md index c1bf9cc..0a0cfd5 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Test Data = -Start with a working install of [WMF's CiviCRM setup](http://git.wikimedia.org/summary/?r=wikimedia/fundraising/crm). That should include the contribution_tracking table in the drupal database and tables civicrm_contribution and wmf_contribution_extra in the civicrm database. +Start with a working install of [WMF's CiviCRM setup](https://phabricator.wikimedia.org/diffusion/WFCG/). That should include the contribution_tracking table in the drupal database and tables civicrm_contribution and wmf_contribution_extra in the civicrm database. Then run the scripts in this app's schema/ folder to create a fredge database (skip if you already have a fredge db) and add the tables needed for dash. -- To view, visit https://gerrit.wikimedia.org/r/390336 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I33a6e16b71c7659a8e25fe4f9d74968f3bb0c879 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: master Gerrit-Owner: TerraCodesGerrit-Reviewer: Chad Gerrit-Reviewer: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/kafkatee[master]: git.wikimedia.org -> phab
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390326 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: Iecbdb016181e3b367cb8df2bfc4702ea70c49b9c --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/debian/control b/debian/control index ae18fbe..6f93434 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), librdkafka-dev (>= 0.8.3), libyajl-dev, zlib1g-dev (>= 1:1.2.8) Standards-Version: 3.9.5 Vcs-Git: https://gerrit.wikimedia.org/r/analytics/kafkatee -Vcs-Browser: http://git.wikimedia.org/tree/analytics%2Fkafkatee +Vcs-Browser: https://phabricator.wikimedia.org/diffusion/ANKA/ Package: kafkatee Architecture: any -- To view, visit https://gerrit.wikimedia.org/r/390326 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iecbdb016181e3b367cb8df2bfc4702ea70c49b9c Gerrit-PatchSet: 1 Gerrit-Project: analytics/kafkatee Gerrit-Branch: master Gerrit-Owner: TerraCodesGerrit-Reviewer: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP: Updated behaviour when queue is populated from dump fil...
Jgleeson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390338 ) Change subject: WIP: Updated behaviour when queue is populated from dump file to detect whether additional info source headers are present and if not inject them .. WIP: Updated behaviour when queue is populated from dump file to detect whether additional info source headers are present and if not inject them Change-Id: I7a0cca729fc2bfc772c8aba1ccaff4aed8fb6816 --- M Maintenance/PopulateQueueFromDump.php 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/38/390338/1 diff --git a/Maintenance/PopulateQueueFromDump.php b/Maintenance/PopulateQueueFromDump.php index 73551b0..1f42e96 100644 --- a/Maintenance/PopulateQueueFromDump.php +++ b/Maintenance/PopulateQueueFromDump.php @@ -53,9 +53,16 @@ continue; } - // push message directly to queue, bypassing QueueWrapper's adding - // source fields. - $datastore->push( $message ); + + // if $message SourceFields headers are not set then we send it through QueueWrapper::push() + if (!array_key_exists('source_enqueued_time', $message)) { +// QueueWrapper::push() injects additional useful properties +// useful properties declared here \SmashPig\CrmLink\Messages\SourceFields::addToMessage() +QueueWrapper::push($this->getOption('queue'), $message); + } + else { +$datastore->push($message); + } $messageCount++; if ( $messageCount % 1000 == 0 ) { -- To view, visit https://gerrit.wikimedia.org/r/390338 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a0cca729fc2bfc772c8aba1ccaff4aed8fb6816 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Jgleeson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikidata/build-resources[master]: Explicitly load DataTypes extension
WMDE-leszek has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390337 ) Change subject: Explicitly load DataTypes extension .. Explicitly load DataTypes extension Happened to be loaded, as it is included as a Composer dependency of Wikibase. This makes it explicit. Bug: T180062 Change-Id: I7cad3718e8da45ab2c162082a7a782a8b2327350 --- M Wikidata.localisation.php M Wikidata.php M composer.json 3 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/build-resources refs/changes/37/390337/1 diff --git a/Wikidata.localisation.php b/Wikidata.localisation.php index b005d15..9deb268 100644 --- a/Wikidata.localisation.php +++ b/Wikidata.localisation.php @@ -11,6 +11,7 @@ require_once __DIR__ . '/vendor/autoload.php'; } +wfLoadExtension( 'DataTypes', "$wgWikidataBaseDir/extensions/DataTypes/extension.json" ); require_once "$wgWikidataBaseDir/extensions/Wikibase/repo/Wikibase.php"; require_once "$wgWikidataBaseDir/extensions/Wikidata.org/WikidataOrg.php"; wfLoadExtension( 'WikimediaBadges', "$wgWikidataBaseDir/extensions/WikimediaBadges/extension.json" ); diff --git a/Wikidata.php b/Wikidata.php index 4583d43..20f490d 100755 --- a/Wikidata.php +++ b/Wikidata.php @@ -29,6 +29,8 @@ $wgWikidataBaseDir = __DIR__; } +wfLoadExtension( 'DataTypes', "$wgWikidataBaseDir/extensions/DataTypes/extension.json" ); + if ( !empty( $wmgUseWikibaseRepo ) ) { include_once "$wgWikidataBaseDir/extensions/Wikibase/repo/Wikibase.php"; include_once "$wgWikidataBaseDir/extensions/Wikidata.org/WikidataOrg.php"; diff --git a/composer.json b/composer.json index a1b9549..2d85019 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,10 @@ "repositories": [ { "type": "git", +"url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/DataTypes; +}, + { +"type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase; }, { @@ -31,6 +35,7 @@ "require": { "php": ">=5.5.0", "composer/installers": ">=1.0.1", +"data-values/data-types": "dev-master", "mediawiki/article-placeholder": "dev-master", "propertysuggester/property-suggester": "dev-master", "wikibase/wikibase": "dev-master", -- To view, visit https://gerrit.wikimedia.org/r/390337 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7cad3718e8da45ab2c162082a7a782a8b2327350 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/build-resources Gerrit-Branch: master Gerrit-Owner: WMDE-leszek___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fix activity_type_id
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390024 ) Change subject: Fix activity_type_id .. Fix activity_type_id Change-Id: I960b647844d0369c1ebab26eb426a46fafe60749 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 18 insertions(+), 8 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index 8edcd7f..01e461e 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -3234,12 +3234,22 @@ */ function wmf_civicrm_update_7565() { civicrm_initialize(); - $query = "SELECT ca.id as activity_id, cap.contact_id as new_contact_id FROM civicrm_activity ca LEFT JOIN civicrm_activity_contact cap ON ca.parent_id=cap.activity_id WHERE (SELECT count(*) FROM civicrm_activity_contact WHERE record_type_id=1 AND activity_id=ca.id)=0 AND ca.activity_type_id=%1 AND cap.record_type_id=3 LIMIT 100"; - $params = array(1 => array(52, 'Integer')); - $activities = CRM_Core_DAO::executeQuery($query, $params); - while ($activities->fetch()) { - $result = civicrm_api3('ActivityContact', 'create', array( 'activity_id' => $activities->activity_id, 'contact_id' => $activities->new_contact_id, record_type_id => 1 )); - $activities = CRM_Core_DAO::executeQuery($query, $params); - } - + $batch = 100; + $maxId = CRM_Core_DAO::singleValueQuery("SELECT max(id) FROM civicrm_activity"); + $activity_type_id = civicrm_api3('OptionValue', 'getSingle', array('label' => 'Contact Deleted by Merge', 'return' => 'value')); + $query = "SELECT ca.id as activity_id, cap.contact_id as new_contact_id + FROM civicrm_activity ca + JOIN civicrm_activity_contact cap ON ca.parent_id=cap.activity_id AND cap.record_type_id=3 + WHERE (SELECT count(*) FROM civicrm_activity_contact WHERE record_type_id=1 AND activity_id=ca.id)=0 + AND ca.activity_type_id=%1 AND ca.id BETWEEN %2 AND %3"; + $params = array(1 => array($activity_type_id['value'], 'Integer')); + for($startId = 0; $startId < $maxId; $startId += $batch) { + $endId = $startId + $batch; + $params[2] = array($startId, 'Integer'); + $params[3] = array($endId, 'Integer'); + $activities = CRM_Core_DAO::executeQuery($query, $params); + while ($activities->fetch()) { +civicrm_api3('ActivityContact', 'create', array( 'activity_id' => $activities->activity_id, 'contact_id' => $activities->new_contact_id, 'record_type_id' => 1 )); + } +} } -- To view, visit https://gerrit.wikimedia.org/r/390024 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I960b647844d0369c1ebab26eb426a46fafe60749 Gerrit-PatchSet: 6 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: MeppsGerrit-Reviewer: Ejegg Gerrit-Reviewer: Mepps Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Add base mobile site to siteinfo
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390248 ) Change subject: Add base mobile site to siteinfo .. Add base mobile site to siteinfo Needed to sanely construct mobile URLs for all wikis (which may or may not have a language code subdomain component). Bug: T170692 Change-Id: If3dd4e144ee925db0793ee10ecc675803775727a --- M extension.json M includes/MobileFrontend.hooks.php 2 files changed, 14 insertions(+), 0 deletions(-) Approvals: Gergő Tisza: Looks good to me, but someone else must approve BearND: Looks good to me, but someone else must approve jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/extension.json b/extension.json index 819ebd1..7bf40e1 100644 --- a/extension.json +++ b/extension.json @@ -1109,6 +1109,9 @@ "APIGetDescription": [ "ApiParseExtender::onAPIGetDescription" ], + "APIQuerySiteInfoGeneralInfo": [ + "MobileFrontendHooks::onAPIQuerySiteInfoGeneralInfo" + ], "AuthChangeFormFields": [ "MobileFrontendHooks::onAuthChangeFormFields" ], diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index c2c1b0b..2887bde 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -1243,4 +1243,15 @@ global $wgResourceLoaderLESSImportPaths; $wgResourceLoaderLESSImportPaths[] = dirname( __DIR__ ) . "/mobile.less/"; } + + /** +* Add the base mobile site URL to the siteinfo API output. +* @param ApiQuerySiteinfo $module +* @param array &$result +*/ + public static function onAPIQuerySiteInfoGeneralInfo( ApiQuerySiteinfo $module, array &$result ) { + global $wgCanonicalServer; + $ctx = MobileContext::singleton(); + $result['mobileserver'] = $ctx->getMobileUrl( $wgCanonicalServer ); + } } -- To view, visit https://gerrit.wikimedia.org/r/390248 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3dd4e144ee925db0793ee10ecc675803775727a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Pmiazga Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: git.wikimedia.org -> phab
TerraCodes has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390336 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: I33a6e16b71c7659a8e25fe4f9d74968f3bb0c879 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash refs/changes/36/390336/1 diff --git a/README.md b/README.md index c1bf9cc..0a0cfd5 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Test Data = -Start with a working install of [WMF's CiviCRM setup](http://git.wikimedia.org/summary/?r=wikimedia/fundraising/crm). That should include the contribution_tracking table in the drupal database and tables civicrm_contribution and wmf_contribution_extra in the civicrm database. +Start with a working install of [WMF's CiviCRM setup](https://phabricator.wikimedia.org/diffusion/WFCG/). That should include the contribution_tracking table in the drupal database and tables civicrm_contribution and wmf_contribution_extra in the civicrm database. Then run the scripts in this app's schema/ folder to create a fredge database (skip if you already have a fredge db) and add the tables needed for dash. -- To view, visit https://gerrit.wikimedia.org/r/390336 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33a6e16b71c7659a8e25fe4f9d74968f3bb0c879 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: master Gerrit-Owner: TerraCodes___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Config
Zppix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390333 ) Change subject: Config .. Config Change-Id: Ifafca3fa91f929c9868dcb50f0ae89d368b7073b --- M templates/hosts.conf.erb 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 refs/changes/33/390333/2 diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb index 1a80653..4e5661d 100644 --- a/templates/hosts.conf.erb +++ b/templates/hosts.conf.erb @@ -72,10 +72,10 @@ } } -object Host "puppetdb-phabricator.phabricator.eqiad.wmflabs" { +object Host "puppetdb-phabricator1phabricator.eqiad.wmflabs" { import "generic-host" -address = "puppetdb-phabricator.phabricator.eqiad.wmflabs" -vars.host_name = "puppetdb-phabricator.phabricator.eqiad.wmflabs" +address = "puppetdb-phabricator1.phabricator.eqiad.wmflabs" +vars.host_name = "puppetdb-phabricator1.phabricator.eqiad.wmflabs" vars.os = "Linux OS" vars.sla = "24x7" vars.external_host = true -- To view, visit https://gerrit.wikimedia.org/r/390333 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifafca3fa91f929c9868dcb50f0ae89d368b7073b Gerrit-PatchSet: 2 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: Zppix___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add action/user tracking to html cache purge jobs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/387304 ) Change subject: Add action/user tracking to html cache purge jobs .. Add action/user tracking to html cache purge jobs Change-Id: Ic7155a7303debfaf26b13cb836497ccbc89ea238 --- M includes/Title.php M includes/deferred/HTMLCacheUpdate.php M includes/deferred/LinksUpdate.php M includes/filerepo/file/File.php M includes/filerepo/file/LocalFile.php M includes/jobqueue/jobs/HTMLCacheUpdateJob.php M includes/page/PageArchive.php M includes/page/WikiFilePage.php M includes/page/WikiPage.php 9 files changed, 54 insertions(+), 17 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Title.php b/includes/Title.php index 718239d..90ae57d 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4619,9 +4619,11 @@ * on the number of links. Typically called on create and delete. */ public function touchLinks() { - DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'pagelinks' ) ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'pagelinks', 'page-touch' ) ); if ( $this->getNamespace() == NS_CATEGORY ) { - DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this, 'categorylinks' ) ); + DeferredUpdates::addUpdate( + new HTMLCacheUpdate( $this, 'categorylinks', 'category-touch' ) + ); } } diff --git a/includes/deferred/HTMLCacheUpdate.php b/includes/deferred/HTMLCacheUpdate.php index db3790f..29846bf 100644 --- a/includes/deferred/HTMLCacheUpdate.php +++ b/includes/deferred/HTMLCacheUpdate.php @@ -26,7 +26,7 @@ * * @ingroup Cache */ -class HTMLCacheUpdate implements DeferrableUpdate { +class HTMLCacheUpdate extends DataUpdate { /** @var Title */ public $mTitle; @@ -36,14 +36,24 @@ /** * @param Title $titleTo * @param string $table +* @param string $causeAction Triggering action +* @param string $causeAgent Triggering user */ - function __construct( Title $titleTo, $table ) { + function __construct( + Title $titleTo, $table, $causeAction = 'unknown', $causeAgent = 'unknown' + ) { $this->mTitle = $titleTo; $this->mTable = $table; + $this->causeAction = $causeAction; + $this->causeAgent = $causeAgent; } public function doUpdate() { - $job = HTMLCacheUpdateJob::newForBacklinks( $this->mTitle, $this->mTable ); + $job = HTMLCacheUpdateJob::newForBacklinks( + $this->mTitle, + $this->mTable, + [ 'causeAction' => $this->getCauseAction(), 'causeAgent' => $this->getCauseAgent() ] + ); JobQueueGroup::singleton()->lazyPush( $job ); } diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index c27826d..8913642 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -1055,7 +1055,9 @@ $inv = [ $inv ]; } foreach ( $inv as $table ) { - DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this->mTitle, $table ) ); + DeferredUpdates::addUpdate( + new HTMLCacheUpdate( $this->mTitle, $table, 'page-props' ) + ); } } } diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 32f4504..54bd0a5 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1445,7 +1445,9 @@ // Purge cache of all pages using this file $title = $this->getTitle(); if ( $title ) { - DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'imagelinks' ) ); + DeferredUpdates::addUpdate( + new HTMLCacheUpdate( $title, 'imagelinks', 'file-purge' ) + ); } } diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 3271c96..455d6ae 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1666,7 +1666,9 @@ } # Invalidate cache for all pages using this file - DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this->getTitle(), 'imagelinks' ) ); + DeferredUpdates::addUpdate( +
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: VectorBeta extension has been archived
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390328 ) Change subject: VectorBeta extension has been archived .. VectorBeta extension has been archived Change-Id: I60d4af3cd7526c1ef19ca6e50d04e11ffe536c7d --- D puppet/modules/role/manifests/vectorbeta.pp 1 file changed, 0 insertions(+), 16 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/role/manifests/vectorbeta.pp b/puppet/modules/role/manifests/vectorbeta.pp deleted file mode 100644 index cf584c0..000 --- a/puppet/modules/role/manifests/vectorbeta.pp +++ /dev/null @@ -1,16 +0,0 @@ -# == Class: role::vectorbeta -# -# The VectorBeta extension adds alterations to the Vector skin -# to the list of the beta features. -# -class role::vectorbeta { -include ::role::eventlogging -include ::role::betafeatures - -mediawiki::extension { 'VectorBeta': -settings => { -wgVectorBetaPersonalBar => true, -wgVectorBetaWinter => true, -} -} -} -- To view, visit https://gerrit.wikimedia.org/r/390328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60d4af3cd7526c1ef19ca6e50d04e11ffe536c7d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: ReedyGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...wonderbolt[master]: git.wikimedia.org -> phabricator.wikimedia.org
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390335 ) Change subject: git.wikimedia.org -> phabricator.wikimedia.org .. git.wikimedia.org -> phabricator.wikimedia.org Change-Id: If9ea3c266b516f3b51c1a1b447813ad9bb7909f0 --- M tab_documentation/traffic_summary.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/wonderbolt refs/changes/35/390335/1 diff --git a/tab_documentation/traffic_summary.md b/tab_documentation/traffic_summary.md index 2ef1013..ec023aa 100644 --- a/tab_documentation/traffic_summary.md +++ b/tab_documentation/traffic_summary.md @@ -6,7 +6,7 @@ This dashboard simply looks at, very broadly, where our pageviews (across all Wikimedia projects) are coming from - search engines or something else? It is split up into "all", "desktop" and "mobile web" platforms - but not apps, since the apps do not log referers. -**Internal** is traffic referred by Wikimedia sites, specifically: mediawiki.org, wikibooks.org, wikidata.org, wikinews.org, wikimedia.org, wikimediafoundation.org, wikipedia.org, wikiquote.org, wikisource.org, wikiversity.org, wikivoyage.org, and wiktionary.org (See [Webrequest source](https://git.wikimedia.org/blob/analytics%2Frefinery%2Fsource.git/master/refinery-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fwikimedia%2Fanalytics%2Frefinery%2Fcore%2FWebrequest.java#L203) for more information.) +**Internal** is traffic referred by Wikimedia sites, specifically: mediawiki.org, wikibooks.org, wikidata.org, wikinews.org, wikimedia.org, wikimediafoundation.org, wikipedia.org, wikiquote.org, wikisource.org, wikiversity.org, wikivoyage.org, and wiktionary.org (See [Webrequest source](https://phabricator.wikimedia.org/diffusion/ANRS/browse/master/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/Webrequest.java) for more information.) Outages and notes -- -- To view, visit https://gerrit.wikimedia.org/r/390335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9ea3c266b516f3b51c1a1b447813ad9bb7909f0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/wonderbolt Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...wonderbolt[master]: git.wikimedia.org -> phabricator.wikimedia.org
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390335 ) Change subject: git.wikimedia.org -> phabricator.wikimedia.org .. git.wikimedia.org -> phabricator.wikimedia.org Change-Id: If9ea3c266b516f3b51c1a1b447813ad9bb7909f0 --- M tab_documentation/traffic_summary.md 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/tab_documentation/traffic_summary.md b/tab_documentation/traffic_summary.md index 2ef1013..ec023aa 100644 --- a/tab_documentation/traffic_summary.md +++ b/tab_documentation/traffic_summary.md @@ -6,7 +6,7 @@ This dashboard simply looks at, very broadly, where our pageviews (across all Wikimedia projects) are coming from - search engines or something else? It is split up into "all", "desktop" and "mobile web" platforms - but not apps, since the apps do not log referers. -**Internal** is traffic referred by Wikimedia sites, specifically: mediawiki.org, wikibooks.org, wikidata.org, wikinews.org, wikimedia.org, wikimediafoundation.org, wikipedia.org, wikiquote.org, wikisource.org, wikiversity.org, wikivoyage.org, and wiktionary.org (See [Webrequest source](https://git.wikimedia.org/blob/analytics%2Frefinery%2Fsource.git/master/refinery-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fwikimedia%2Fanalytics%2Frefinery%2Fcore%2FWebrequest.java#L203) for more information.) +**Internal** is traffic referred by Wikimedia sites, specifically: mediawiki.org, wikibooks.org, wikidata.org, wikinews.org, wikimedia.org, wikimediafoundation.org, wikipedia.org, wikiquote.org, wikisource.org, wikiversity.org, wikivoyage.org, and wiktionary.org (See [Webrequest source](https://phabricator.wikimedia.org/diffusion/ANRS/browse/master/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/Webrequest.java) for more information.) Outages and notes -- -- To view, visit https://gerrit.wikimedia.org/r/390335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9ea3c266b516f3b51c1a1b447813ad9bb7909f0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/wonderbolt Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: PopulateRecentChangesSource: remove unused variable
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/389909 ) Change subject: PopulateRecentChangesSource: remove unused variable .. PopulateRecentChangesSource: remove unused variable Change-Id: I0c1fb623ad508d604c0e7760c2133920ec9a81f8 --- M maintenance/populateRecentChangesSource.php 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/populateRecentChangesSource.php b/maintenance/populateRecentChangesSource.php index eb9797f..04ad255 100644 --- a/maintenance/populateRecentChangesSource.php +++ b/maintenance/populateRecentChangesSource.php @@ -60,8 +60,6 @@ $updatedValues = $this->buildUpdateCondition( $dbw ); while ( $blockEnd <= $end ) { - $cond = "rc_id BETWEEN $blockStart AND $blockEnd"; - $dbw->update( 'recentchanges', [ $updatedValues ], -- To view, visit https://gerrit.wikimedia.org/r/389909 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c1fb623ad508d604c0e7760c2133920ec9a81f8 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MaxSemGerrit-Reviewer: Krinkle Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...wonderbolt[develop]: git.wikimedia.org -> phab
TerraCodes has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390334 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: I856cd322adc5bc324619f2dc53c1a555e0041842 --- M tab_documentation/traffic_summary.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/wonderbolt refs/changes/34/390334/1 diff --git a/tab_documentation/traffic_summary.md b/tab_documentation/traffic_summary.md index 2ef1013..77da4f8 100644 --- a/tab_documentation/traffic_summary.md +++ b/tab_documentation/traffic_summary.md @@ -6,7 +6,7 @@ This dashboard simply looks at, very broadly, where our pageviews (across all Wikimedia projects) are coming from - search engines or something else? It is split up into "all", "desktop" and "mobile web" platforms - but not apps, since the apps do not log referers. -**Internal** is traffic referred by Wikimedia sites, specifically: mediawiki.org, wikibooks.org, wikidata.org, wikinews.org, wikimedia.org, wikimediafoundation.org, wikipedia.org, wikiquote.org, wikisource.org, wikiversity.org, wikivoyage.org, and wiktionary.org (See [Webrequest source](https://git.wikimedia.org/blob/analytics%2Frefinery%2Fsource.git/master/refinery-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fwikimedia%2Fanalytics%2Frefinery%2Fcore%2FWebrequest.java#L203) for more information.) +**Internal** is traffic referred by Wikimedia sites, specifically: mediawiki.org, wikibooks.org, wikidata.org, wikinews.org, wikimedia.org, wikimediafoundation.org, wikipedia.org, wikiquote.org, wikisource.org, wikiversity.org, wikivoyage.org, and wiktionary.org (See [Webrequest source](https://phabricator.wikimedia.org/diffusion/ANRS/browse/master/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/Webrequest.java$203) for more information.) Outages and notes -- -- To view, visit https://gerrit.wikimedia.org/r/390334 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I856cd322adc5bc324619f2dc53c1a555e0041842 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/wonderbolt Gerrit-Branch: develop Gerrit-Owner: TerraCodes___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Config
Paladox has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390333 ) Change subject: Config .. Config Change-Id: Ifafca3fa91f929c9868dcb50f0ae89d368b7073b --- M templates/hosts.conf.erb 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Paladox: Verified; Looks good to me, approved diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb index 1a80653..ec3e916 100644 --- a/templates/hosts.conf.erb +++ b/templates/hosts.conf.erb @@ -72,10 +72,10 @@ } } -object Host "puppetdb-phabricator.phabricator.eqiad.wmflabs" { +object Host "puppetdb-phabricator1.phabricator.eqiad.wmflabs" { import "generic-host" -address = "puppetdb-phabricator.phabricator.eqiad.wmflabs" -vars.host_name = "puppetdb-phabricator.phabricator.eqiad.wmflabs" +address = "puppetdb-phabricator1.phabricator.eqiad.wmflabs" +vars.host_name = "puppetdb-phabricator1.phabricator.eqiad.wmflabs" vars.os = "Linux OS" vars.sla = "24x7" vars.external_host = true -- To view, visit https://gerrit.wikimedia.org/r/390333 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifafca3fa91f929c9868dcb50f0ae89d368b7073b Gerrit-PatchSet: 3 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: ZppixGerrit-Reviewer: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetdb: Fix support for postgresql 9.6
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390332 ) Change subject: puppetdb: Fix support for postgresql 9.6 .. puppetdb: Fix support for postgresql 9.6 Change-Id: I2eb748c8cdaa69c8fa11b2239963f697cb44ce74 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/32/390332/1 -- To view, visit https://gerrit.wikimedia.org/r/390332 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2eb748c8cdaa69c8fa11b2239963f697cb44ce74 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: PaladoxGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Get Amazon SDK object from SmashPig config
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390331 ) Change subject: Get Amazon SDK object from SmashPig config .. Get Amazon SDK object from SmashPig config De-duplicating some more config settings and testing code! This will be an easy way to get proxy parameters. Bug: T180168 Change-Id: Ib4d93306293dd0fe32785a27572f49cb84754b5a --- M DonationInterface.class.php M amazon_gateway/amazon.adapter.php M tests/phpunit/Adapter/Amazon/AmazonApiTest.php M tests/phpunit/Adapter/Amazon/AmazonTest.php M tests/phpunit/DonationInterfaceApiTestCase.php M tests/phpunit/DonationInterfaceTestCase.php M tests/phpunit/TestConfiguration.php D tests/phpunit/includes/MockAmazonClient.php D tests/phpunit/includes/MockAmazonResponse.php D tests/phpunit/includes/test_gateway/TestingAmazonAdapter.php 10 files changed, 50 insertions(+), 252 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/31/390331/1 diff --git a/DonationInterface.class.php b/DonationInterface.class.php index 84d72a3..44821e1 100644 --- a/DonationInterface.class.php +++ b/DonationInterface.class.php @@ -70,10 +70,7 @@ $wgAutoloadClasses['DonationInterfaceTestCase'] = $testDir . 'DonationInterfaceTestCase.php'; $wgAutoloadClasses['DonationInterfaceApiTestCase'] = $testDir . 'DonationInterfaceApiTestCase.php'; $wgAutoloadClasses['BaseIngenicoTestCase'] = $testDir . 'BaseIngenicoTestCase.php'; - $wgAutoloadClasses['MockAmazonClient'] = $testDir . 'includes/MockAmazonClient.php'; - $wgAutoloadClasses['MockAmazonResponse'] = $testDir . 'includes/MockAmazonResponse.php'; $wgAutoloadClasses['TestingAdyenAdapter'] = $testDir . 'includes/test_gateway/TestingAdyenAdapter.php'; - $wgAutoloadClasses['TestingAmazonAdapter'] = $testDir . 'includes/test_gateway/TestingAmazonAdapter.php'; $wgAutoloadClasses['TestingAstroPayAdapter'] = $testDir . 'includes/test_gateway/TestingAstroPayAdapter.php'; $wgAutoloadClasses['TestingDonationLogger'] = $testDir . 'includes/TestingDonationLogger.php'; $wgAutoloadClasses['TestingGatewayPage'] = $testDir . 'includes/TestingGatewayPage.php'; diff --git a/amazon_gateway/amazon.adapter.php b/amazon_gateway/amazon.adapter.php index d4001e4..30914d5 100644 --- a/amazon_gateway/amazon.adapter.php +++ b/amazon_gateway/amazon.adapter.php @@ -3,6 +3,7 @@ use PayWithAmazon\PaymentsClient as PwaClient; use PayWithAmazon\PaymentsClientInterface as PwaClientInterface; use Psr\Log\LogLevel; +use SmashPig\Core\Context; /** * Wikimedia Foundation @@ -145,14 +146,7 @@ * @return PwaClientInterface */ protected function getPwaClient() { - return new PwaClient( array( - 'merchant_id' => $this->account_config['SellerID'], - 'access_key' => $this->account_config['MWSAccessKey'], - 'secret_key' => $this->account_config['MWSSecretKey'], - 'client_id' => $this->account_config['ClientID'], - 'region' => $this->account_config['Region'], - 'sandbox' => $this->getGlobal( 'Test' ), - ) ); + return Context::get()->getProviderConfiguration()->object( 'payments-client' ); } /** diff --git a/tests/phpunit/Adapter/Amazon/AmazonApiTest.php b/tests/phpunit/Adapter/Amazon/AmazonApiTest.php index fafc6db..acff8af 100644 --- a/tests/phpunit/Adapter/Amazon/AmazonApiTest.php +++ b/tests/phpunit/Adapter/Amazon/AmazonApiTest.php @@ -11,14 +11,14 @@ * @group medium */ class AmazonApiTest extends DonationInterfaceApiTestCase { + /** +* @var \SmashPig\PaymentProviders\Amazon\Tests\AmazonTestConfiguration +*/ + protected $providerConfig; + public function setUp() { parent::setUp(); - TestingAmazonAdapter::$mockClient = new MockAmazonClient(); - } - - public function tearDown() { - TestingAmazonAdapter::$mockClient = null; - parent::tearDown(); + $this->providerConfig = DonationInterface_Adapter_Amazon_Test::setUpAmazonTestingContext( $this ); } public function testDoPaymentSuccess() { @@ -43,7 +43,7 @@ $apiResult = $this->doApiRequest( $params, $session ); $redirect = $apiResult[0]['redirect']; $this->assertEquals( 'https://wikimediafoundation.org/wiki/Thank_You/en?country=US', $redirect ); - $mockClient = TestingAmazonAdapter::$mockClient; + $mockClient = $this->providerConfig->object( 'payments-client' ); $setOrderReferenceDetailsArgs = $mockClient->calls['setOrderReferenceDetails'][0];
[MediaWiki-commits] [Gerrit] mediawiki...Html2Wiki[master]: build: Adding MinusX
Umherirrender has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/388704 ) Change subject: build: Adding MinusX .. build: Adding MinusX Change-Id: I890b43bb99736bb8147e58f1d991e80c6657af6b --- M composer.json 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Umherirrender: Looks good to me, approved Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 3655ab9..9ef1e79 100644 --- a/composer.json +++ b/composer.json @@ -4,11 +4,16 @@ }, "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", - "jakub-onderka/php-console-highlighter": "0.3.2" + "jakub-onderka/php-console-highlighter": "0.3.2", + "mediawiki/minus-x": "0.2.0" }, "scripts": { "test": [ - "parallel-lint . --exclude vendor" + "parallel-lint . --exclude vendor", + "minus-x check ." + ], + "fix": [ + "minus-x fix ." ] } } -- To view, visit https://gerrit.wikimedia.org/r/388704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I890b43bb99736bb8147e58f1d991e80c6657af6b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Html2Wiki Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: build: Always exclude vendor
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390011 ) Change subject: build: Always exclude vendor .. build: Always exclude vendor Change-Id: I0adad73363f26ab76ef6ec489171af9417c74909 --- A .jscsrc M Gruntfile.js 2 files changed, 5 insertions(+), 1 deletion(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 000..9d22e3f --- /dev/null +++ b/.jscsrc @@ -0,0 +1,3 @@ +{ + "preset": "wikimedia" +} diff --git a/Gruntfile.js b/Gruntfile.js index 69e6d05..36b41e8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -24,7 +24,8 @@ jsonlint: { all: [ '**/*.json', - '!node_modules/**' + '!node_modules/**', + '!vendor/**' ] } } ); -- To view, visit https://gerrit.wikimedia.org/r/390011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0adad73363f26ab76ef6ec489171af9417c74909 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MOOC Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] Bird-lg
Ayounsi has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390330 ) Change subject: [WIP] Bird-lg .. [WIP] Bird-lg Change-Id: I3bbd8851a67fde8d9d778f6d3c263879ccfd659a --- A modules/birdlg/manifests/lg_backend.pp A modules/birdlg/manifests/lg_frontend.pp A modules/birdlg/templates/lg.cfg.erb A modules/birdlg/templates/lgproxy.cfg.erb A modules/profile/manifests/birdlg/lg_backend.pp A modules/profile/manifests/birdlg/lg_frontend.pp A modules/profile/templates/birdlg/lg.wikimedia.org.erb A modules/role/manifests/birdlg/lg_backend.pp A modules/role/manifests/birdlg/lg_frontend.pp 9 files changed, 351 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/30/390330/1 diff --git a/modules/birdlg/manifests/lg_backend.pp b/modules/birdlg/manifests/lg_backend.pp new file mode 100644 index 000..047ea4f --- /dev/null +++ b/modules/birdlg/manifests/lg_backend.pp @@ -0,0 +1,80 @@ +# == Class: librenms +# +# This class installs & manages Bird and lgproxy, the backend part of BirdLG +# +class birdlg::lg_backend( +$install_dir='/srv/deployment/birdlg/', +$access_list=['127.0.0.1'], +$port = 5000, +) { + + package { [ + 'python-flask', + 'python-dnspython', + 'python-memcache', + 'whois', + 'traceroute', + 'bird', + ]: + ensure => present, + } + +file { '/etc/bird/bird.conf': # TODO +ensure => present, +owner => 'bird', +group => 'bird', +mode=> '0440', +content => template('birdlg/bird.conf.erb'), +} +file { '/etc/bird/bird6.conf': # TODO +ensure => present, +owner => 'bird', +group => 'bird', +mode=> '0440', +content => template('birdlg/bird6.conf.erb'), +} + +service { 'bird': +ensure=> running, +subscribe => [ + File['/etc/bird/bird.conf'], + File['/etc/bird/bird6.conf'], + ], +require => Package['bird'], +} + +file { "${install_dir}/lgproxy.cfg": +ensure => present, +owner => 'bird', +group => 'bird', +mode=> '0440', +content => template('birdlg/lgproxy.cfg.erb'), +} + +service::uwsgi { 'lgproxy': +port=> $port, +deployment_user => 'bird', # TODO +config => { +need-plugins => 'python', +chdir=> $install_dir, +wsgi => 'lgproxy.wsgi', +vacuum => true, +http-socket => "0.0.0.0:${port}", +# T170189: make sure Python has a sane default encoding +env => [ +'LANG=C.UTF-8', +'PYTHONENCODING=utf-8', +], +}, +healthcheck_url => '/', +icinga_check=> false, +sudo_rules => [ +'ALL=(root) NOPASSWD: /usr/sbin/service uwsgi-lgproxy restart', +'ALL=(root) NOPASSWD: /usr/sbin/service uwsgi-lgproxy start', +'ALL=(root) NOPASSWD: /usr/sbin/service uwsgi-lgproxy status', +'ALL=(root) NOPASSWD: /usr/sbin/service uwsgi-lgproxy stop', +], +} + + +} diff --git a/modules/birdlg/manifests/lg_frontend.pp b/modules/birdlg/manifests/lg_frontend.pp new file mode 100644 index 000..1eeb1ad --- /dev/null +++ b/modules/birdlg/manifests/lg_frontend.pp @@ -0,0 +1,29 @@ +# == Class: librenms +# +# This class installs & manages bird-lg frontend +# +class birdlg::lg_frontend( +$session_key, #TODO +$install_dir='/srv/deployment/birdlg/', +) { + + + package { [ + 'python-flask', + 'python-dnspython', + 'python-pydot', + 'python-memcache', + 'graphviz', + ]: + ensure => present, + } + + file { "${install_dir}/lg.cfg": + ensure => present, + owner => 'bird', + group => 'bird', + mode=> '0440', + content => template('birdlg/lg.cfg.erb'), + } + +} diff --git a/modules/birdlg/templates/lg.cfg.erb b/modules/birdlg/templates/lg.cfg.erb new file mode 100644 index 000..cddcadd --- /dev/null +++ b/modules/birdlg/templates/lg.cfg.erb @@ -0,0 +1,32 @@ +DEBUG = False +LOG_FILE="<%= @install_dir %>/lg.log" +LOG_LEVEL="WARNING" + +DOMAIN = "lg.wikimedia.org" + +BIND_IP = "127.0.0.1" +BIND_PORT = 5001 + +## TODO: Need to either add a line to /etc/hosts or a A record for PROXY.DOMAIN +PROXY = { + "codfw": 5000, + "eqiad": 5000, + } + +# Used for bgpmap +ROUTER_IP = { +"codfw" : ["208.80.153.192", "2620:0:860:::1", "208.80.153.193", "2620:0:860:::2", "208.80.153.198", "2620:0:860:::5"], +"eqiad" : ["208.80.154.196", "2620:0:861:::1", "208.80.154.197", "2620:0:861:::2"], +} + +AS_NUMBER = { +"codfw" : "14907", +"eqiad" :
[MediaWiki-commits] [Gerrit] labs...lists[master]: git.wikimedia.org -> phab
TerraCodes has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390329 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: I6306c9a18b3581c9cf2b7259474b122e4feada60 --- M docs/contributing.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/lists refs/changes/29/390329/1 diff --git a/docs/contributing.md b/docs/contributing.md index 5b15ebb..02c56bc 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -7,7 +7,7 @@ ## Introduction -Lists is free, open-source software, meaning anyone can contribute to its development and progress. Lists source code is currently hosted on [Wikimedia infrastructure](https://git.wikimedia.org/summary/?r=labs/tools/lists.git). There is also a [github](https://github.com/wikimedia/labs-tools-lists/) copy which provides an easy method for forking the project and merging your contributions. +Lists is free, open-source software, meaning anyone can contribute to its development and progress. Lists source code is currently hosted on [Wikimedia infrastructure](https://phabricator.wikimedia.org/diffusion/TLST/). There is also a [github](https://github.com/wikimedia/labs-tools-lists/) copy which provides an easy method for forking the project and merging your contributions. ## Pull Requests -- To view, visit https://gerrit.wikimedia.org/r/390329 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6306c9a18b3581c9cf2b7259474b122e4feada60 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/lists Gerrit-Branch: master Gerrit-Owner: TerraCodes___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: build: Adding MinusX
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/388731 ) Change subject: build: Adding MinusX .. build: Adding MinusX Change-Id: I6bed4a305fdb51ea2eb39355b9e10c3eb58c3c7d --- M composer.json 1 file changed, 8 insertions(+), 3 deletions(-) Approvals: Umherirrender: Looks good to me, approved Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index afd8d04..e36b050 100644 --- a/composer.json +++ b/composer.json @@ -31,13 +31,18 @@ "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", "mediawiki/mediawiki-codesniffer": "14.1.0", - "jakub-onderka/php-console-highlighter": "0.3.2" + "jakub-onderka/php-console-highlighter": "0.3.2", + "mediawiki/minus-x": "0.2.0" }, "scripts": { - "fix": "phpcbf", + "fix": [ + "phpcbf", + "minus-x fix ." + ], "test": [ "parallel-lint . --exclude vendor --exclude node_modules --exclude extensions", - "phpcs -p -s" + "phpcs -p -s", + "minus-x check ." ] }, "require": { -- To view, visit https://gerrit.wikimedia.org/r/388731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6bed4a305fdb51ea2eb39355b9e10c3eb58c3c7d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MOOC Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Legoktm Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: VectorBeta extension has been archived
Reedy has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390328 ) Change subject: VectorBeta extension has been archived .. VectorBeta extension has been archived Change-Id: I60d4af3cd7526c1ef19ca6e50d04e11ffe536c7d --- M puppet/modules/cdh M puppet/modules/nginx D puppet/modules/role/manifests/vectorbeta.pp M puppet/modules/wikimetrics 4 files changed, 3 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/28/390328/1 diff --git a/puppet/modules/cdh b/puppet/modules/cdh index 248216f..1d5b40f 16 --- a/puppet/modules/cdh +++ b/puppet/modules/cdh @@ -1 +1 @@ -Subproject commit 248216fc71b974e99ffd8d235d8afe289703b976 +Subproject commit 1d5b40f8adf3e9e9698494d32c610bae2952734b diff --git a/puppet/modules/nginx b/puppet/modules/nginx index d41ab2c..71ba07b 16 --- a/puppet/modules/nginx +++ b/puppet/modules/nginx @@ -1 +1 @@ -Subproject commit d41ab2cc4dd560f1483247bf2e1487d77b7e451c +Subproject commit 71ba07b7cfd8f82b80ad998daacfcbdb51922e26 diff --git a/puppet/modules/role/manifests/vectorbeta.pp b/puppet/modules/role/manifests/vectorbeta.pp deleted file mode 100644 index cf584c0..000 --- a/puppet/modules/role/manifests/vectorbeta.pp +++ /dev/null @@ -1,16 +0,0 @@ -# == Class: role::vectorbeta -# -# The VectorBeta extension adds alterations to the Vector skin -# to the list of the beta features. -# -class role::vectorbeta { -include ::role::eventlogging -include ::role::betafeatures - -mediawiki::extension { 'VectorBeta': -settings => { -wgVectorBetaPersonalBar => true, -wgVectorBetaWinter => true, -} -} -} diff --git a/puppet/modules/wikimetrics b/puppet/modules/wikimetrics index 5f416bb..2f2a015 16 --- a/puppet/modules/wikimetrics +++ b/puppet/modules/wikimetrics @@ -1 +1 @@ -Subproject commit 5f416bbce4188914f48a044a8df09f1c34b07183 +Subproject commit 2f2a0154e1f96b775d7aee029c55616ed6ad3caa -- To view, visit https://gerrit.wikimedia.org/r/390328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60d4af3cd7526c1ef19ca6e50d04e11ffe536c7d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Reedy___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ArticlePlaceholder[master]: build: Adding MinusX
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/388246 ) Change subject: build: Adding MinusX .. build: Adding MinusX Change-Id: Iffce0c175d8ab48c678152e5f5af4c0e3a21c7d1 --- M composer.json 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Umherirrender: Looks good to me, approved Hoo man: Looks good to me, approved jenkins-bot: Verified Thiemo Mättig (WMDE): Looks good to me, approved diff --git a/composer.json b/composer.json index 4ee14da..f31b3d2 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,8 @@ "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", "jakub-onderka/php-console-highlighter": "0.3.2", - "wikibase/wikibase-codesniffer": "^0.2.0" + "wikibase/wikibase-codesniffer": "^0.2.0", + "mediawiki/minus-x": "0.2.0" }, "autoload": { "psr-4": { @@ -30,10 +31,12 @@ "scripts": { "test": [ "parallel-lint . --exclude vendor --exclude node_modules", - "phpcs -p -s" + "phpcs -p -s", + "minus-x check ." ], "fix": [ - "phpcbf" + "phpcbf", + "minus-x fix ." ] } } -- To view, visit https://gerrit.wikimedia.org/r/388246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iffce0c175d8ab48c678152e5f5af4c0e3a21c7d1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ArticlePlaceholder Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Hashar Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Expose tid in the summary 2.0 output
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390283 ) Change subject: Expose tid in the summary 2.0 output .. Expose tid in the summary 2.0 output Bug: T177431 Change-Id: Ie4cd843de5d93f954f1275fb303db78a44c4b43c --- M lib/mobile-util.js M spec.yaml 2 files changed, 5 insertions(+), 0 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mobile-util.js b/lib/mobile-util.js index 63b4e24..a97fb46 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -254,6 +254,7 @@ lang: lead.lang, dir: lead.dir, revision: lead.revision, +tid: lead.tid, timestamp: lead.lastmodified, description: lead.description, coordinates: lead.geo && { diff --git a/spec.yaml b/spec.yaml index 3a18aee..f8d084d 100644 --- a/spec.yaml +++ b/spec.yaml @@ -697,6 +697,7 @@ lang: /.+/ dir: /.+/ revision: /.+/ + tid: /.+/ timestamp: /.+/ description: /.+/ content_urls: @@ -878,6 +879,9 @@ revision: type: string description: The revision of the page when the summary was produced + tid: +type: string +description: The timeuuid associated with the underlying HTML content extract: type: string description: First several sentences of an article in plain text -- To view, visit https://gerrit.wikimedia.org/r/390283 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie4cd843de5d93f954f1275fb303db78a44c4b43c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Remove mobile-sections URL from summary API URLs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390295 ) Change subject: Remove mobile-sections URL from summary API URLs .. Remove mobile-sections URL from summary API URLs Bug: T177431 Change-Id: I62dfe3cc8b9b240ec86b22d6dee54fad1e7899fb --- M lib/mobile-util.js M spec.yaml 2 files changed, 1 insertion(+), 6 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mobile-util.js b/lib/mobile-util.js index 63b4e24..315d517 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -277,7 +277,6 @@ mUtil.buildApiUrls = function(domain, title, lead) { return { summary: `https://${domain}/api/rest_v1/page/summary/${title.getPrefixedDBKey()}`, -mobile_sections: `https://${domain}/api/rest_v1/page/mobile-sections/${title.getPrefixedDBKey()}`, // read_html: `https://${domain}/api/rest_v1/page/read-html/${title.getPrefixedDBKey()}`, // content_html: `https://${domain}/api/rest_v1/page/content-html/${title.getPrefixedDBKey()}`, // metadata: `https://${domain}/api/rest_v1/page/metadata/${title.getPrefixedDBKey()}`, diff --git a/spec.yaml b/spec.yaml index 3a18aee..07973ce 100644 --- a/spec.yaml +++ b/spec.yaml @@ -706,7 +706,6 @@ talk: /.+/ api_urls: summary: /.+/ -mobile_sections: /.+/ #read_html: /.+/ #content_html: /.+/ #metadata: /.+/ @@ -1331,9 +1330,6 @@ summary: type: string description: the REST API summary URL for the page - mobile_sections: -type: string -description: the REST API URL for the sectionized mobile HTML for the page # read_html: #type: string #description: the REST API URL for the PCS read HTML for the page (not yet active) @@ -1357,10 +1353,10 @@ description: the REST API URL for the raw Parsoid HTML for the talk page for this page (if applicable) required: - summary - - mobile_sections # - read_html # - content_html # - metadata +# - references # - media - edit_html additionalProperties: false -- To view, visit https://gerrit.wikimedia.org/r/390295 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62dfe3cc8b9b240ec86b22d6dee54fad1e7899fb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Use the underlying page HTML tid in page content endpoint etags
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390282 ) Change subject: Use the underlying page HTML tid in page content endpoint etags .. Use the underlying page HTML tid in page content endpoint etags This will allow a client to associate mobile-sections or formatted endpoint output with the underlying Parsoid HTML. Bug: T177431 Change-Id: I495189d8b861d153ac02e409c059163113f18e91 --- M lib/parsoid-access.js M routes/mobile-sections.js 2 files changed, 19 insertions(+), 7 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/parsoid-access.js b/lib/parsoid-access.js index ce0d1be..c58b520 100644 --- a/lib/parsoid-access.js +++ b/lib/parsoid-access.js @@ -64,6 +64,16 @@ return revision; } +function getRevAndTidFromEtag(headers) { +if (headers && headers.etag) { +const etagComponents = headers.etag.replace(/"/g, '').split('/'); +return { +revision: etagComponents[0], +tid: etagComponents[1] +}; +} +} + /** * * @param {!document} doc @@ -107,7 +117,7 @@ function pageJsonPromise(app, req, legacy) { return getParsoidHtml(app, req) .then((response) => { -const page = { revision: getRevisionFromEtag(response.headers) }; +const page = getRevAndTidFromEtag(response.headers); const doc = domino.createDocument(response.body); // Note: these properties must be obtained before stripping markup @@ -137,7 +147,7 @@ function pageHtmlPromise(app, req, optimized) { return getParsoidHtml(app, req) .then((response) => { -const meta = { revision: getRevisionFromEtag(response.headers) }; +const meta = getRevAndTidFromEtag(response.headers); const doc = domino.createDocument(response.body); if (optimized) { diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js index 1ceb2d9..b2614e5 100644 --- a/routes/mobile-sections.js +++ b/routes/mobile-sections.js @@ -136,6 +136,7 @@ id: input.meta.id, issues, revision: input.page.revision, +tid: input.page.tid, lastmodified: input.meta.lastmodified, lastmodifier: input.meta.lastmodifier, displaytitle: input.meta.displaytitle, @@ -324,6 +325,7 @@ delete lead.lang; delete lead.thumbnail; delete lead.originalimage; +delete lead.tid; } /* @@ -337,10 +339,10 @@ function buildAllResponse(req, res, legacy) { return _collectRawPageData(req, legacy).then((response) => { response = buildAll(response, legacy); -_stripUnwantedLeadProps(response.lead); res.status(200); -mUtil.setETag(res, response.lead.revision); +mUtil.setETag(res, response.lead.revision, response.lead.tid); mUtil.setContentType(res, mUtil.CONTENT_TYPES.mobileSections); +_stripUnwantedLeadProps(response.lead); res.json(response).end(); }); } @@ -371,10 +373,10 @@ */ function buildLeadResponse(req, res, legacy) { return buildLeadObject(req, legacy).then((response) => { -_stripUnwantedLeadProps(response); res.status(200); -mUtil.setETag(res, response.revision); +mUtil.setETag(res, response.revision, response.tid); mUtil.setContentType(res, mUtil.CONTENT_TYPES.mobileSections); +_stripUnwantedLeadProps(response); res.json(response).end(); }); } @@ -404,7 +406,7 @@ page: parsoid.pageJsonPromise(app, req, true) }).then((response) => { res.status(200); -mUtil.setETag(res, response.page.revision); +mUtil.setETag(res, response.page.revision, response.page.tid); mUtil.setContentType(res, mUtil.CONTENT_TYPES.mobileSections); res.json(buildRemaining(response)).end(); }); -- To view, visit https://gerrit.wikimedia.org/r/390282 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I495189d8b861d153ac02e409c059163113f18e91 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Ppchelko 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/icinga2[master]: Fix syntax error
Zppix has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390327 ) Change subject: Fix syntax error .. Fix syntax error Fixes a regression caused by a change Change-Id: I350969dfb672f1886a9862c0eef3f7d9fb53a39a --- M templates/hosts.conf.erb 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Zppix: Verified; Looks good to me, approved diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb index f2e19fb..1a80653 100644 --- a/templates/hosts.conf.erb +++ b/templates/hosts.conf.erb @@ -75,7 +75,6 @@ object Host "puppetdb-phabricator.phabricator.eqiad.wmflabs" { import "generic-host" address = "puppetdb-phabricator.phabricator.eqiad.wmflabs" -name = "puppetdb-phab" vars.host_name = "puppetdb-phabricator.phabricator.eqiad.wmflabs" vars.os = "Linux OS" vars.sla = "24x7" @@ -83,10 +82,13 @@ vars.check_user = true vars.check_puppet = true vars.check_disk = true + vars.notification["mail"] = { + /* The UserGroup `icingaadmins` is defined in `users.conf`. */ groups = [ "icingaadmins" ] - } +} } + object Host "phab-tin.phabricator.eqiad.wmflabs" { import "generic-host" address = "phab-tin.phabricator.eqiad.wmflabs" -- To view, visit https://gerrit.wikimedia.org/r/390327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I350969dfb672f1886a9862c0eef3f7d9fb53a39a Gerrit-PatchSet: 2 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Zppix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Fix syntax error
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390327 ) Change subject: Fix syntax error .. Fix syntax error Fixes a regression caused by a change Change-Id: I350969dfb672f1886a9862c0eef3f7d9fb53a39a --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 refs/changes/27/390327/1 -- To view, visit https://gerrit.wikimedia.org/r/390327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I350969dfb672f1886a9862c0eef3f7d9fb53a39a Gerrit-PatchSet: 1 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Limit download button to Google Chrome
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/389747 ) Change subject: Limit download button to Google Chrome .. Limit download button to Google Chrome As discussed on ticket the download button only appears to work on Google Chrome on mobile browsers. Bug: T179529 Bug: T179914 Change-Id: I8bbda8d5a8aa42dd23773fea424c1a70e31d6f85 --- M resources/skins.minerva.scripts/init.js 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Pmiazga: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/skins.minerva.scripts/init.js b/resources/skins.minerva.scripts/init.js index c6bd0be..72eab1f 100644 --- a/resources/skins.minerva.scripts/init.js +++ b/resources/skins.minerva.scripts/init.js @@ -232,7 +232,10 @@ config.get( 'wgMinervaDownloadIcon' ) && !page.isMainPage() && // The iOS print dialog does not provide pdf functionality (see T177215) - !browser.isIos() + !browser.isIos() && + // Currently restricted to Chrome (T179529) until we have good fallbacks for browsers + // which do not provide print functionality + window.chrome !== undefined ) { // Because the page actions are floated to the right, their order in the // DOM is reversed in the display. The watchstar is last in the DOM and -- To view, visit https://gerrit.wikimedia.org/r/389747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8bbda8d5a8aa42dd23773fea424c1a70e31d6f85 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/skins/MinervaNeue Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Phuedx Gerrit-Reviewer: Pmiazga Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Clean up titles object keys
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390309 ) Change subject: Clean up titles object keys .. Clean up titles object keys Bug: T177431 Change-Id: I22091332656f8b2b73aa1a04c38ae29d7b1a9ba7 --- M lib/mobile-util.js M spec.yaml M test/features/summary/pagecontent.js 3 files changed, 15 insertions(+), 15 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mobile-util.js b/lib/mobile-util.js index 7e4cc1c..8385dd1 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -211,9 +211,9 @@ */ mUtil.buildTitleDictionary = function(title, lead) { return { -title: title.getPrefixedDBKey(), -normalized_title: lead.normalizedtitle, -display_title: lead.displaytitle, +canonical: title.getPrefixedDBKey(), +normalized: lead.normalizedtitle, +display: lead.displaytitle, }; }; diff --git a/spec.yaml b/spec.yaml index f07a2db..c82ef37 100644 --- a/spec.yaml +++ b/spec.yaml @@ -682,9 +682,9 @@ namespace_id: /.+/ namespace_text: /.*/ titles: -title: /.+/ -normalized_title: /.+/ -display_title: /.+/ +canonical: /.+/ +normalized: /.+/ +display: /.+/ pageid: /.+/ thumbnail: source: /.+/ @@ -1287,19 +1287,19 @@ titles_set: type: object properties: - title: + canonical: type: string description: the DB key (non-prefixed) - normalized_title: + normalized: type: string description: the normalized title (https://www.mediawiki.org/wiki/API:Query#Title_normalization) - display_title: + display: type: string description: the title as it should be displayed to the user required: - - title - - normalized_title - - display_title + - canonical + - normalized + - display additionalProperties: false content_urls: diff --git a/test/features/summary/pagecontent.js b/test/features/summary/pagecontent.js index 3e68355..5680597 100644 --- a/test/features/summary/pagecontent.js +++ b/test/features/summary/pagecontent.js @@ -27,9 +27,9 @@ assert.deepEqual(res.status, 200); assert.deepEqual(res.body.type, 'standard'); assert.deepEqual(res.body.revision, 798652007); -assert.deepEqual(res.body.titles.title, "Foobar"); -assert.deepEqual(res.body.titles.normalized_title, "Foobar"); -assert.deepEqual(res.body.titles.display_title, "Foobar"); +assert.deepEqual(res.body.titles.canonical, "Foobar"); +assert.deepEqual(res.body.titles.normalized, "Foobar"); +assert.deepEqual(res.body.titles.display, "Foobar"); assert.ok(res.body.extract.indexOf('foobar') > -1); assert.ok(res.body.extract_html.indexOf('foobar') > -1); }); -- To view, visit https://gerrit.wikimedia.org/r/390309 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I22091332656f8b2b73aa1a04c38ae29d7b1a9ba7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: MhollowayGerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Move namespace_id and namespace_text to top level
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390298 ) Change subject: Move namespace_id and namespace_text to top level .. Move namespace_id and namespace_text to top level Bug: T177431 Change-Id: I31fecfc4d15f18003ea9f0f168ea9a32a2a0d626 --- M lib/mobile-util.js M spec.yaml M test/features/summary/pagecontent.js 3 files changed, 10 insertions(+), 30 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mobile-util.js b/lib/mobile-util.js index b07197c..7e4cc1c 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -214,8 +214,6 @@ title: title.getPrefixedDBKey(), normalized_title: lead.normalizedtitle, display_title: lead.displaytitle, -namespace_id: lead.ns, -namespace_name: lead.ns_text, }; }; @@ -247,6 +245,8 @@ type, title: lead.normalizedtitle, displaytitle: lead.displaytitle, +namespace_id: lead.ns, +namespace_text: lead.ns_text, titles: mUtil.buildTitleDictionary(title, lead), pageid: lead.id, thumbnail: lead.thumbnail, diff --git a/spec.yaml b/spec.yaml index d24f2be..f07a2db 100644 --- a/spec.yaml +++ b/spec.yaml @@ -679,12 +679,12 @@ type: standard title: /.+/ displaytitle: /.+/ + namespace_id: /.+/ + namespace_text: /.*/ titles: title: /.+/ normalized_title: /.+/ display_title: /.+/ -namespace_id: /.+/ -namespace_name: /.*/ pageid: /.+/ thumbnail: source: /.+/ @@ -870,6 +870,12 @@ displaytitle: type: string description: The page title how it should be shown to the user + namespace_id: +type: integer +description: the numeric ID for the page's namespace (https://www.mediawiki.org/wiki/Manual:Namespace) + namespace_text: +type: string +description: text name for the MediaWiki namespace titles: $ref: '#/definitions/titles_set' pageid: @@ -1290,18 +1296,10 @@ display_title: type: string description: the title as it should be displayed to the user - namespace_id: -type: integer -description: the numeric ID for the page's namespace (https://www.mediawiki.org/wiki/Manual:Namespace) - namespace_name: -type: string -description: text name for the MediaWiki namespace required: - title - normalized_title - display_title - - namespace_id - - namespace_name additionalProperties: false content_urls: diff --git a/test/features/summary/pagecontent.js b/test/features/summary/pagecontent.js index 53f96d3..3e68355 100644 --- a/test/features/summary/pagecontent.js +++ b/test/features/summary/pagecontent.js @@ -1,14 +1,9 @@ 'use strict'; const preq = require('preq'); -const Title = require('mediawiki-title').Title; const assert = require('../../utils/assert.js'); const headers = require('../../utils/headers.js'); const server = require('../../utils/server.js'); -const mUtil = require('../../../lib/mobile-util'); - -const blaLead = require('../../fixtures/formatted-lead-Β-lactam_antibiotic.json'); -const siteinfo = require('../../fixtures/siteinfo_enwiki.json'); describe('summary', function() { @@ -26,7 +21,6 @@ }); it('should respond with expected properties in payload', () => { - const uri = localUri('Foobar/798652007'); return preq.get({ uri }) .then((res) => { @@ -36,20 +30,8 @@ assert.deepEqual(res.body.titles.title, "Foobar"); assert.deepEqual(res.body.titles.normalized_title, "Foobar"); assert.deepEqual(res.body.titles.display_title, "Foobar"); -assert.deepEqual(res.body.titles.namespace_id, 0); -assert.deepEqual(res.body.titles.namespace_name, ""); assert.ok(res.body.extract.indexOf('foobar') > -1); assert.ok(res.body.extract_html.indexOf('foobar') > -1); }); -}); - -it('titles dictionary contains all required fields', () => { -const title = Title.newFromText('Β-lactam_antibiotic', siteinfo); -const result = mUtil.buildTitleDictionary(title, blaLead); -assert.deepEqual(result.title, "Β-lactam_antibiotic"); -assert.deepEqual(result.normalized_title, "Β-lactam antibiotic"); -assert.deepEqual(result.display_title, "β-lactam antibiotic"); -assert.deepEqual(result.namespace_id, 0); -assert.deepEqual(result.namespace_name, ""); }); }); -- To view, visit https://gerrit.wikimedia.org/r/390298 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
[MediaWiki-commits] [Gerrit] integration/config[master]: Move ArticlePlaceholder/DataTypes back to nodepool for npm test
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390325 ) Change subject: Move ArticlePlaceholder/DataTypes back to nodepool for npm test .. Move ArticlePlaceholder/DataTypes back to nodepool for npm test Change-Id: I342c967d39c53677a836174f4f19857a41f45fe4 --- M zuul/layout.yaml 1 file changed, 12 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 34f2e5a..00ea5e7 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2737,10 +2737,15 @@ - name: mwgate-npm - name: mediawiki/extensions/ArticlePlaceholder +# FIXME: ArticlePlaceholder runs qunit in "npm test" (T180171), so it +# can't use mwgate-npm docker variant +test: + - mwgate-npm-node-6-jessie +gate-and-submit: + - mwgate-npm-node-6-jessie template: - name: extension-unittests-composer - name: extension-qunit-composer - - name: mwgate-npm experimental: - mwext-mw-selenium-composer-jessie @@ -,9 +4449,14 @@ - name: mwgate-npm - name: mediawiki/extensions/DataTypes +# FIXME: DataTypes runs qunit in "npm test" (T180172), so it +# can't use mwgate-npm docker variant +test: + - mwgate-npm-node-6-jessie +gate-and-submit: + - mwgate-npm-node-6-jessie template: - name: extension-unittests-generic - - name: mwgate-npm - name: extension-qunit-generic - name: mediawiki/extensions/DeleteOwn -- To view, visit https://gerrit.wikimedia.org/r/390325 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I342c967d39c53677a836174f4f19857a41f45fe4 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: setting up a new puppetdb host
Paladox has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390320 ) Change subject: setting up a new puppetdb host .. setting up a new puppetdb host Change-Id: Ie176904c06c4c1efd3c8f5cda052081167d9f235 --- M templates/hosts.conf.erb 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: Paladox: Verified; Looks good to me, approved diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb index e86cb93..f2e19fb 100644 --- a/templates/hosts.conf.erb +++ b/templates/hosts.conf.erb @@ -72,6 +72,21 @@ } } +object Host "puppetdb-phabricator.phabricator.eqiad.wmflabs" { +import "generic-host" +address = "puppetdb-phabricator.phabricator.eqiad.wmflabs" +name = "puppetdb-phab" +vars.host_name = "puppetdb-phabricator.phabricator.eqiad.wmflabs" +vars.os = "Linux OS" +vars.sla = "24x7" +vars.external_host = true +vars.check_user = true +vars.check_puppet = true +vars.check_disk = true +vars.notification["mail"] = { + groups = [ "icingaadmins" ] + } +} object Host "phab-tin.phabricator.eqiad.wmflabs" { import "generic-host" address = "phab-tin.phabricator.eqiad.wmflabs" -- To view, visit https://gerrit.wikimedia.org/r/390320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie176904c06c4c1efd3c8f5cda052081167d9f235 Gerrit-PatchSet: 2 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: ZppixGerrit-Reviewer: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/kafkatee[master]: git.wikimedia.org -> phab
TerraCodes has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390326 ) Change subject: git.wikimedia.org -> phab .. git.wikimedia.org -> phab Bug: T139089 Change-Id: Iecbdb016181e3b367cb8df2bfc4702ea70c49b9c --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/kafkatee refs/changes/26/390326/1 diff --git a/debian/control b/debian/control index ae18fbe..6f93434 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), librdkafka-dev (>= 0.8.3), libyajl-dev, zlib1g-dev (>= 1:1.2.8) Standards-Version: 3.9.5 Vcs-Git: https://gerrit.wikimedia.org/r/analytics/kafkatee -Vcs-Browser: http://git.wikimedia.org/tree/analytics%2Fkafkatee +Vcs-Browser: https://phabricator.wikimedia.org/diffusion/ANKA/ Package: kafkatee Architecture: any -- To view, visit https://gerrit.wikimedia.org/r/390326 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecbdb016181e3b367cb8df2bfc4702ea70c49b9c Gerrit-PatchSet: 1 Gerrit-Project: analytics/kafkatee Gerrit-Branch: master Gerrit-Owner: TerraCodes___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: setting up a new puppetdb host
Zppix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390320 ) Change subject: setting up a new puppetdb host .. setting up a new puppetdb host Change-Id: Ie176904c06c4c1efd3c8f5cda052081167d9f235 --- M templates/hosts.conf.erb 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 refs/changes/20/390320/2 diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb index e86cb93..f2e19fb 100644 --- a/templates/hosts.conf.erb +++ b/templates/hosts.conf.erb @@ -72,6 +72,21 @@ } } +object Host "puppetdb-phabricator.phabricator.eqiad.wmflabs" { +import "generic-host" +address = "puppetdb-phabricator.phabricator.eqiad.wmflabs" +name = "puppetdb-phab" +vars.host_name = "puppetdb-phabricator.phabricator.eqiad.wmflabs" +vars.os = "Linux OS" +vars.sla = "24x7" +vars.external_host = true +vars.check_user = true +vars.check_puppet = true +vars.check_disk = true +vars.notification["mail"] = { + groups = [ "icingaadmins" ] + } +} object Host "phab-tin.phabricator.eqiad.wmflabs" { import "generic-host" address = "phab-tin.phabricator.eqiad.wmflabs" -- To view, visit https://gerrit.wikimedia.org/r/390320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie176904c06c4c1efd3c8f5cda052081167d9f235 Gerrit-PatchSet: 2 Gerrit-Project: labs/icinga2 Gerrit-Branch: master Gerrit-Owner: Zppix___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Move ArticlePlaceholder/DataTypes back to nodepool for npm test
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390325 ) Change subject: Move ArticlePlaceholder/DataTypes back to nodepool for npm test .. Move ArticlePlaceholder/DataTypes back to nodepool for npm test Change-Id: I342c967d39c53677a836174f4f19857a41f45fe4 --- M zuul/layout.yaml 1 file changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/25/390325/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index db35b44..2cf7f54 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2694,10 +2694,15 @@ - name: mwgate-npm - name: mediawiki/extensions/ArticlePlaceholder +# FIXME: ArticlePlaceholder runs qunit in "npm test" (T180171), so it +# can't use mwgate-npm docker variant +test: + - mwgate-npm-node-6-jessie +gate-and-submit: + - mwgate-npm-node-6-jessie template: - name: extension-unittests-composer - name: extension-qunit-composer - - name: mwgate-npm experimental: - mwext-mw-selenium-composer-jessie @@ -4393,9 +4398,14 @@ - name: mwgate-npm - name: mediawiki/extensions/DataTypes +# FIXME: DataTypes runs qunit in "npm test" (T180172), so it +# can't use mwgate-npm docker variant +test: + - mwgate-npm-node-6-jessie +gate-and-submit: + - mwgate-npm-node-6-jessie template: - name: extension-unittests-generic - - name: mwgate-npm - name: extension-qunit-generic - name: mediawiki/extensions/DeleteOwn -- To view, visit https://gerrit.wikimedia.org/r/390325 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I342c967d39c53677a836174f4f19857a41f45fe4 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: widgets.DateInputWidget Align design with WikimediaUI
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/372861 ) Change subject: widgets.DateInputWidget Align design with WikimediaUI .. widgets.DateInputWidget Align design with WikimediaUI Aligning DateInputWidget with WikimediaUI theme widgets by: - using “Red50” color `#d33` from color palette, - using standard dialog `box-shadow` value, - ensure handle appearance is similar to standard TextInputWidget, - align variable name, - introduce similar variables from WikimediaUI theme, and also - removing unnecessary properties. Adding a `max-height` to address vendor specific UI elements for `type=date` in Chrome. Bug: T180094 Change-Id: I4e0ca6c472e2d6ddbe64eb783acf8c38c5beacc4 --- M resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.less M resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less 2 files changed, 75 insertions(+), 24 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.less b/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.less index 47f8045..9750452 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.less +++ b/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.less @@ -13,15 +13,11 @@ user-select: none; } -@indicator-size: unit( 12 / 16 / 0.8, em ); +@size-indicator: unit( 12 / 16 / 0.8, em ); .mw-widget-dateInputWidget { &-handle { .oo-ui-unselectable(); - - > .oo-ui-labelElement-label { - padding: 0; - } > .oo-ui-indicatorElement-indicator { display: none; @@ -33,28 +29,25 @@ position: absolute; top: 0; right: 0; - width: @indicator-size; + width: @size-indicator; height: 100%; margin: 0 0.775em; } > .oo-ui-textInputWidget { z-index: 2; - - & input { - padding-left: 1em; - } } &-calendar { background-color: #fff; position: absolute; margin-top: -2px; - box-shadow: 0 0.15em 0 0 rgba( 0, 0, 0, 0.15 ); + border-radius: 2px; + box-shadow: 0 2px 2px 0 rgba( 0, 0, 0, 0.25 ); z-index: 1; &:focus { - box-shadow: inset 0 0 0 1px #36c, 0 0.15em 0 0 rgba( 0, 0, 0, 0.15 ); + box-shadow: inset 0 0 0 1px #36c, 0 2px 2px 0 rgba( 0, 0, 0, 0.25 ); z-index: 3; } } @@ -68,8 +61,8 @@ &.oo-ui-flaggedElement-invalid { .mw-widget-dateInputWidget-handle { - border-color: #f00; - box-shadow: inset 0 0 0 0 #f00; + border-color: #d33; + box-shadow: none; } } diff --git a/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less b/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less index 18cf723..ea6c981 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less +++ b/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less @@ -5,6 +5,32 @@ * @license The MIT License (MIT); see LICENSE.txt */ +// Variables taken from OOUI's WikimediaUI theme +@oo-ui-font-size-browser: 16; // assumed browser default of `16px` +@oo-ui-font-size-base: 0.8em; // equals `12.8px` at browser default of `16px` + +@background-color-base: #fff; + +@color-base--emphasized: #000; + +@border-base: 1px solid #a2a9b1; +@border-color-base--focus: #36c; +@border-color-input--hover: #72777d; +@border-radius-base: 2px; + +@padding-input-text: @padding-top-base @padding-horizontal-input-text @padding-bottom-base; +@padding-horizontal-input-text: 8 / @oo-ui-font-size-browser / @oo-ui-font-size-base; +@padding-top-base: 8 / @oo-ui-font-size-browser / @oo-ui-font-size-base; // equals `0.625em`≈`8px` +@padding-bottom-base: 7 / @oo-ui-font-size-browser / @oo-ui-font-size-base; // equals `0.547em`≈`7px` + +@box-shadow-widget: inset 0 0 0 1px transparent; +@box-shadow-widget--focus: inset 0 0 0 1px #36c; + +@line-height-widget-singleline: 1.172em; // Firefox needs a value, Chrome the unit; equals `15px` at base `font-size: 12.8px` + +@transition-ease-out-sine-medium: 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 ); + +// Mixins taken from OOUI .oo-ui-box-sizing( @type: border-box ) { -webkit-box-sizing: @type; -moz-box-sizing: @type; @@ -19,13 +45,21 @@ } } +.oo-ui-transition( @value1, @value2: X, ... ) { + @value: ~`"@{arguments}".replace( /[\[\]]|\,\sX/g, '' )`; //
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: widgets.DateInputWidget: Enhance desktop UX cursor handling
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363569 ) Change subject: widgets.DateInputWidget: Enhance desktop UX cursor handling .. widgets.DateInputWidget: Enhance desktop UX cursor handling Enhance desktop experience with better cursor handling. Bug: T169034 Depends-on: I4e0ca6c472e2d6ddbe64eb783acf8c38c5beacc4 Change-Id: Ie4c847caf727051ed5bbcf9937863b007e62d3c7 --- M resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Kaldari: Looks good to me, approved diff --git a/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less b/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less index ea6c981..74b5abc 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less +++ b/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less @@ -106,6 +106,16 @@ border-color: @border-color-base--focus; box-shadow: @box-shadow-widget--focus; } + + & > .oo-ui-labelElement-label { + cursor: pointer; + } + } + } + + &-active { + &.oo-ui-textInputWidget input { + cursor: text; } } } -- To view, visit https://gerrit.wikimedia.org/r/363569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie4c847caf727051ed5bbcf9937863b007e62d3c7 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: VolkerEGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Kaldari Gerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] purtle[master]: Attempt to ensure that IRIs emitted by JSON-LD backend are v...
C. Scott Ananian has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390321 ) Change subject: Attempt to ensure that IRIs emitted by JSON-LD backend are valid .. Attempt to ensure that IRIs emitted by JSON-LD backend are valid Apply percent-encoding to try to ensure that IRIs emitted by the JSON-LD backend are valid, even if the input contains some illegal characters. Change-Id: Id8014224fde6adbb29f7157b5bbf3ec751cfa1e9 --- M src/JsonLdRdfWriter.php 1 file changed, 25 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/purtle refs/changes/21/390321/1 diff --git a/src/JsonLdRdfWriter.php b/src/JsonLdRdfWriter.php index 21df20b..b15ffd3 100644 --- a/src/JsonLdRdfWriter.php +++ b/src/JsonLdRdfWriter.php @@ -148,19 +148,19 @@ $this->expandShorthand( $base, $local ); if ( $local === null ) { - return $base; + return $this->escapeIRI( $base ); } else { if ( $base !== '_' && isset( $this->prefixes[ $base ] ) ) { if ( $base === '' ) { // Empty prefix not supported; use full IRI - return $this->prefixes[ $base ] . $local; + return $this->escapeIRI( $this->prefixes[ $base ] . $local ); } if ( !isset( $this->context[ $base ] ) ) { $this->context[ $base ] = $this->prefixes[ $base ]; } if ( $this->context[ $base ] !== $this->prefixes[ $base ] ) { // Context name conflict; use full IRI - return $this->prefixes[ $base ] . $local; + return $this->escapeIRI( $this->prefixes[ $base ] . $local ); } } return $base . ':' . $local; @@ -454,6 +454,28 @@ } /** +* Try to ensure that our output is a valid IRI, even if the input +* contains characters which are technically illegal in an IRI. +* Any valid IRI should be passed through unchanged. +* +* @param string $iri The putative IRI +* @return string an IRI which is more likely to be valid +*/ + protected function escapeIRI( $iri ) { + // Performance: if the IRI has only valid characters, let it through + if ( !preg_match( '/[\x00-\x20<>"{}|^`]/', $iri ) ) { + return $iri; + } + return preg_replace_callback( + '/[\x00-\x20<>"{}|^`]+/', + function ( $matches ) { + return rawurlencode( $matches[0] ); + }, + $iri + ); + } + + /** * @param string $role * @param BNodeLabeler $labeler * -- To view, visit https://gerrit.wikimedia.org/r/390321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id8014224fde6adbb29f7157b5bbf3ec751cfa1e9 Gerrit-PatchSet: 1 Gerrit-Project: purtle Gerrit-Branch: master Gerrit-Owner: C. Scott Ananian___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...FundraisingEmailUnsubscribe[master]: Add stylelint for css file
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390322 ) Change subject: Add stylelint for css file .. Add stylelint for css file Change-Id: If6157a71a237f0128a02a2cffa65aa7f402685bf --- A .stylelintrc.json M Gruntfile.js M modules/skinOverride.css M package.json 4 files changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FundraisingEmailUnsubscribe refs/changes/22/390322/1 diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 000..2c90730 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "stylelint-config-wikimedia" +} diff --git a/Gruntfile.js b/Gruntfile.js index d14c698..ad688d8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,6 +3,7 @@ grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-stylelint' ); grunt.initConfig( { banana: { @@ -20,9 +21,16 @@ '**/*.json', '!node_modules/**' ] + }, + stylelint: { + all: [ + '**/*.css', + '!node_modules/**', + '!vendor/**' + ] } } ); - grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'jshint' ] ); + grunt.registerTask( 'test', [ 'jsonlint', 'stylelint', 'banana', 'jshint' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/modules/skinOverride.css b/modules/skinOverride.css index a0f569e..a5f8c7e 100644 --- a/modules/skinOverride.css +++ b/modules/skinOverride.css @@ -21,4 +21,4 @@ #mw-head { display: none !important; -} \ No newline at end of file +} diff --git a/package.json b/package.json index 1a74a78..7f949fc 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,9 @@ "grunt": "1.0.1", "grunt-banana-checker": "0.4.0", "grunt-contrib-jshint": "1.1.0", -"grunt-jsonlint": "1.0.7" +"grunt-jsonlint": "1.0.7", +"grunt-stylelint": "0.9.0", +"stylelint": "8.2.0", +"stylelint-config-wikimedia": "0.4.2" } } -- To view, visit https://gerrit.wikimedia.org/r/390322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6157a71a237f0128a02a2cffa65aa7f402685bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FundraisingEmailUnsubscribe 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] mediawiki...FundraisingEmailUnsubscribe[master]: Use PHP-Queue 1.0
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/390317 ) Change subject: Use PHP-Queue 1.0 .. Use PHP-Queue 1.0 Stay in sync with other fundraising projects Change-Id: Iacaf034d06e71257e33dcb673aa695d31c6502b9 --- M composer.json M composer.lock M vendor/coderkungfu/php-queue/.travis.yml M vendor/coderkungfu/php-queue/README.md M vendor/coderkungfu/php-queue/composer.json M vendor/coderkungfu/php-queue/demo/runners/README.md M vendor/composer/autoload_classmap.php M vendor/composer/autoload_namespaces.php M vendor/composer/autoload_static.php M vendor/composer/installed.json 10 files changed, 60 insertions(+), 278 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/composer.json b/composer.json index 46755fa..bb0f03f 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "irc": "irc://irc.freenode.net/wikimedia-fundraising" }, "require": { - "coderkungfu/php-queue": "dev-master", + "coderkungfu/php-queue": "^1.0", "predis/predis": "^1.1", "twig/twig": "^1.24" }, diff --git a/composer.lock b/composer.lock index 306c298..cb6ecbd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, "This file is @generated automatically" ], -"content-hash": "2ea5bccd3146d8780a41d511c0eeda55", +"content-hash": "825f0eb02c06d45d75919cf148da2ee6", "packages": [ { "name": "clio/clio", @@ -49,16 +49,16 @@ }, { "name": "coderkungfu/php-queue", -"version": "dev-master", +"version": "1.0.0", "source": { "type": "git", "url": "https://github.com/CoderKungfu/php-queue.git;, -"reference": "dd8412f105632d31cdd77933ec40a08640752c99" +"reference": "a9baeb0ae3b05bbd0d2f9f56c8365ff63f64524a" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/CoderKungfu/php-queue/zipball/dd8412f105632d31cdd77933ec40a08640752c99;, -"reference": "dd8412f105632d31cdd77933ec40a08640752c99", +"url": "https://api.github.com/repos/CoderKungfu/php-queue/zipball/a9baeb0ae3b05bbd0d2f9f56c8365ff63f64524a;, +"reference": "a9baeb0ae3b05bbd0d2f9f56c8365ff63f64524a", "shasum": "" }, "require": { @@ -68,10 +68,10 @@ }, "require-dev": { "amazonwebservices/aws-sdk-for-php": "dev-master", -"aws/aws-sdk-php": "dev-master", +"aws/aws-sdk-php": ">=2.8", "ext-memcache": "*", "iron-io/iron_mq": "dev-master", -"microsoft/windowsazure": "dev-master", +"microsoft/windowsazure": ">=0.4.0", "mrpoundsign/pheanstalk-5.3": "dev-master", "predis/predis": "1.*" }, @@ -114,7 +114,7 @@ "queue", "transaction" ], -"time": "2017-04-17T14:11:55+00:00" +"time": "2017-09-08T03:14:59+00:00" }, { "name": "monolog/monolog", @@ -482,9 +482,7 @@ ], "aliases": [], "minimum-stability": "stable", -"stability-flags": { -"coderkungfu/php-queue": 20 -}, +"stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": [], diff --git a/vendor/coderkungfu/php-queue/.travis.yml b/vendor/coderkungfu/php-queue/.travis.yml index 7941bc4..8f270d2 100644 --- a/vendor/coderkungfu/php-queue/.travis.yml +++ b/vendor/coderkungfu/php-queue/.travis.yml @@ -4,16 +4,21 @@ # language: php -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - hhvm + +dist: trusty matrix: + include: +- php: 5.3 + dist: precise +- php: 5.4 +- php: 5.5 +- php: 5.6 +- php: 7.0 +- php: hhvm allow_failures: +- php: 5.3 + dist: precise - php: 7.0 - php: hhvm @@ -22,6 +27,8 @@ username: root encoding: utf8 +before_install: echo "extension=memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + before_script: - mysql -e 'create database phpqueuetest;' - composer self-update @@ -29,5 +36,3 @@ script: phpunit --coverage-text -c phpunit.travis.xml -after_script: - - "wget --quiet http://mauris.sg/bin/pdc.phar && php pdc.phar src" diff --git a/vendor/coderkungfu/php-queue/README.md b/vendor/coderkungfu/php-queue/README.md index 74ff0e7..3f3d2f6 100644 --- a/vendor/coderkungfu/php-queue/README.md +++ b/vendor/coderkungfu/php-queue/README.md @@ -1,5 +1,5 @@ # PHP-Queue #
[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppet: add puppet 4 auth.conf template
Herron has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/389720 ) Change subject: puppet: add puppet 4 auth.conf template .. puppet: add puppet 4 auth.conf template When puppet_major_version == 4 deploy a puppet 4 auth.conf template. This is needed because with puppet api v3 endpoints have changed. Bug: T179722 Change-Id: I13e6b59f8e478da99727ecde98c5d030715a59f4 --- M modules/puppetmaster/manifests/init.pp A modules/puppetmaster/templates/auth-master-v4.conf.erb 2 files changed, 134 insertions(+), 1 deletion(-) Approvals: Herron: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/puppetmaster/manifests/init.pp b/modules/puppetmaster/manifests/init.pp index 6733281..c0226de 100644 --- a/modules/puppetmaster/manifests/init.pp +++ b/modules/puppetmaster/manifests/init.pp @@ -160,11 +160,17 @@ include ::puppetmaster::monitoring include ::puppetmaster::generators +# deploy updated auth template to puppet 4 masters +$puppetmaster_auth_template = $puppet_major_version ? { +4 => 'auth-master-v4.conf.erb', +default => 'auth-master.conf.erb', +} + file { '/etc/puppet/auth.conf': owner => 'root', group => 'root', mode=> '0444', -content => template('puppetmaster/auth-master.conf.erb'), +content => template("puppetmaster/${puppetmaster_auth_template}"), } # This is required for the mwyaml hiera backend diff --git a/modules/puppetmaster/templates/auth-master-v4.conf.erb b/modules/puppetmaster/templates/auth-master-v4.conf.erb new file mode 100644 index 000..71a43dd --- /dev/null +++ b/modules/puppetmaster/templates/auth-master-v4.conf.erb @@ -0,0 +1,127 @@ +# This file managed by puppet + +# This is the default auth.conf file, which implements the default rules +# used by the puppet master. (That is, the rules below will still apply +# even if this file is deleted.) +# +# The ACLs are evaluated in top-down order. More specific stanzas should +# be towards the top of the file and more general ones at the bottom; +# otherwise, the general rules may "steal" requests that should be +# governed by the specific rules. +# +# See https://docs.puppetlabs.com/puppet/latest/reference/config_file_auth.html +# for a more complete description of auth.conf's behavior. +# +# Supported syntax: +# Each stanza in auth.conf starts with a path to match, followed +# by optional modifiers, and finally, a series of allow or deny +# directives. +# +# Example Stanza +# - +# path /path/to/resource # simple prefix match +# # path ~ regex # alternately, regex match +# [environment envlist] +# [method methodlist] +# [auth[enthicated] {yes|no|on|off|any}] +# allow [host|backreference|*|regex] +# deny [host|backreference|*|regex] +# allow_ip [ip|cidr|ip_wildcard|*] +# deny_ip [ip|cidr|ip_wildcard|*] +# +# The path match can either be a simple prefix match or a regular +# expression. `path /file` would match both `/file_metadata` and +# `/file_content`. Regex matches allow the use of backreferences +# in the allow/deny directives. +# +# The regex syntax is the same as for Ruby regex, and captures backreferences +# for use in the `allow` and `deny` lines of that stanza +# +# Examples: +# +# path ~ ^/puppet/v3/path/to/resource# Equivalent to `path /puppet/v3/path/to/resource`. +# allow *# Allow all authenticated nodes (since auth +## defaults to `yes`). +# +# path ~ ^/puppet/v3/catalog/([^/]+)$# Permit nodes to access their own catalog (by +# allow $1 # certname), but not any other node's catalog. +# +# path ~ ^/puppet/v3/file_(metadata|content)/extra_files/ # Only allow certain nodes to +# auth yes # access the "extra_files" +# allow /^(.+)\.example\.com$/ # mount point; note this must +# allow_ip 192.168.100.0/24# go ABOVE the "/file" rule, +# # since it is more specific. +# +# environment:: restrict an ACL to a comma-separated list of environments +# method:: restrict an ACL to a comma-separated list of HTTP methods +# auth:: restrict an ACL to an authenticated or unauthenticated request +# the default when unspecified is to restrict the ACL to authenticated requests +# (ie exactly as if auth yes was present). +# + +### Authenticated ACLs - these rules apply only when the client +### has a valid certificate and is thus authenticated + +path /puppet/v3/environments +method find +allow * + +# allow nodes to retrieve their own catalog +# allow puppetcompiler1001 to retrieve all catalogs for diffing +path ~ ^/puppet/v3/catalog/([^/]+)$ +method find +allow $1 + +# allow nodes to