[MediaWiki-commits] [Gerrit] Allow setting maxChunks (examined) in ChangeDispatcher - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Allow setting maxChunks (examined) in ChangeDispatcher .. Allow setting maxChunks (examined) in ChangeDispatcher maxChunks is the number of chunks of changes examined when selecting pending changes for a wiki. for small wikis, after filtering for relevance to that wiki, it might be 0 changes from a chunk that is added to the batch. then the dispatcher gets stuck in a loop, not reaching the maxBatchSize. This adds an option to the dispatcher script to adjust this number and to set it in the ChangeDispatcher, for improved testability. (tests coming in follow up) Change-Id: I0de975ac7e65d41ff8bdbc3682be9b40bb1c9ef8 --- M repo/includes/ChangeDispatcher.php M repo/maintenance/dispatchChanges.php 2 files changed, 24 insertions(+), 1 deletion(-) Approvals: Jonas Kress (WMDE): Looks good to me, but someone else must approve Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/ChangeDispatcher.php b/repo/includes/ChangeDispatcher.php index 83d5393..29bb0d6 100644 --- a/repo/includes/ChangeDispatcher.php +++ b/repo/includes/ChangeDispatcher.php @@ -37,6 +37,11 @@ private $batchChunkFactor = 3; /** +* @var int: max chunks / passes per wiki when selecting pending changes. +*/ + private $maxChunks = 15; + + /** * @var bool: whether output should be verbose. */ private $verbose = false; @@ -155,6 +160,20 @@ */ public function getBatchChunkFactor() { return $this-batchChunkFactor; + } + + /** +* @param int $maxChunks Max number of chunks / passes per wiki when selecting pending changes. +*/ + public function setMaxChunks( $maxChunks ) { + $this-maxChunks = $maxChunks; + } + + /** +* @return int +*/ + public function getMaxChunks() { + return $this-maxChunks; } /** @@ -282,7 +301,7 @@ // Note that this is non-trivial due to programmatic filtering. $lastIdSeen = $after; - while ( $batchSize $this-batchSize $chunksExamined 15 ) { + while ( $batchSize $this-batchSize $chunksExamined $this-maxChunks ) { // get a chunk of changes $chunk = $this-chunkedChangesAccess-loadChunk( $after+1, $chunkSize ); diff --git a/repo/maintenance/dispatchChanges.php b/repo/maintenance/dispatchChanges.php index a98a48e..65484ba 100644 --- a/repo/maintenance/dispatchChanges.php +++ b/repo/maintenance/dispatchChanges.php @@ -56,6 +56,8 @@ . Default: 1 if --max-time is not set, infinite if it is., false, true ); $this-addOption( 'max-time', The number of seconds to run before exiting, . if --max-passes is not reached. Default: infinite., false, true ); + $this-addOption( 'max-chunks', Max number of chunks / passes per wiki + . when selecting pending changes. Default: 15, false, true ); $this-addOption( 'batch-size', Max number of changes to pass to a client at a time. . Default: 1000, false, true ); } @@ -78,6 +80,7 @@ $subscriptionLookupMode = $settings-getSetting( 'subscriptionLookupMode' ); $batchSize = (int)$this-getOption( 'batch-size', 1000 ); + $maxChunks = (int)$this-getOption( 'max-chunks', 15 ); $dispatchInterval = (int)$this-getOption( 'dispatch-interval', 60 ); $lockGraceInterval = (int)$this-getOption( 'lock-grace-interval', 60 ); $randomness = (int)$this-getOption( 'randomness', 10 ); @@ -129,6 +132,7 @@ $dispatcher-setMessageReporter( $reporter ); $dispatcher-setExceptionHandler( new ReportingExceptionHandler( $reporter ) ); $dispatcher-setBatchSize( $batchSize ); + $dispatcher-setMaxChunks( $maxChunks ); $dispatcher-setBatchChunkFactor( $batchChunkFactor ); $dispatcher-setVerbose( $this-verbose ); -- To view, visit https://gerrit.wikimedia.org/r/233421 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0de975ac7e65d41ff8bdbc3682be9b40bb1c9ef8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Jonas Kress (WMDE) jonas.kr...@wikimedia.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits
[MediaWiki-commits] [Gerrit] Don't look at more than (15 * chunk size * batch size) chang... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Don't look at more than (15 * chunk size * batch size) changes in ChangeDispatcher .. Don't look at more than (15 * chunk size * batch size) changes in ChangeDispatcher That keeps the dispatcher from taking ages to dispatch to a certain wiki, yet it can still look through a considerable amount of changes. Bug: T105592 Change-Id: I220be482032de8b148e669c4bc6aeaafdcffe5c6 --- M repo/includes/ChangeDispatcher.php 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified Objections: Daniel Kinzler: There's a problem with this change, please improve diff --git a/repo/includes/ChangeDispatcher.php b/repo/includes/ChangeDispatcher.php index 9bd7563..83d5393 100644 --- a/repo/includes/ChangeDispatcher.php +++ b/repo/includes/ChangeDispatcher.php @@ -276,12 +276,13 @@ $batch = array(); $batchSize = 0; $chunkSize = $this-batchSize * $this-batchChunkFactor; + $chunksExamined = 0; // Track the change ID from which the next pass should start. // Note that this is non-trivial due to programmatic filtering. $lastIdSeen = $after; - while ( $batchSize $this-batchSize ) { + while ( $batchSize $this-batchSize $chunksExamined 15 ) { // get a chunk of changes $chunk = $this-chunkedChangesAccess-loadChunk( $after+1, $chunkSize ); @@ -300,6 +301,7 @@ $batch = array_merge( $batch, $filtered ); $batchSize = count( $batch ); + $chunksExamined++; //XXX: We could try to adapt $chunkSize based on ratio of changes that get filtered out: // $chunkSize = ( $this-batchSize - count( $batch ) ) * ( count_before / count_after ); -- To view, visit https://gerrit.wikimedia.org/r/230514 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I220be482032de8b148e669c4bc6aeaafdcffe5c6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Decom analytics1021 as a Kafka broker - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/234265 Change subject: Decom analytics1021 as a Kafka broker .. Decom analytics1021 as a Kafka broker It will be repurposed later. Bug: T106581 Change-Id: I753b0d85c10535cb5c75b469f8d90bf4c0b02dc8 --- M manifests/role/analytics/kafka.pp M manifests/site.pp 2 files changed, 2 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/65/234265/1 diff --git a/manifests/role/analytics/kafka.pp b/manifests/role/analytics/kafka.pp index 564d9ec..570d46d 100644 --- a/manifests/role/analytics/kafka.pp +++ b/manifests/role/analytics/kafka.pp @@ -57,8 +57,6 @@ 'kafka1014.eqiad.wmnet' = { 'id' = 14 }, # Row C 'kafka1018.eqiad.wmnet' = { 'id' = 18 }, # Row D 'kafka1020.eqiad.wmnet' = { 'id' = 20 }, # Row D -# analytics1021 is to be decomissioned as a kafka broker. -'analytics1021.eqiad.wmnet' = { 'id' = 21 }, # Row A 'kafka1022.eqiad.wmnet' = { 'id' = 22 }, # Row C }, 'ulsfo' = { }, diff --git a/manifests/site.pp b/manifests/site.pp index 60fc440..ecd8f52 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -126,18 +126,10 @@ include standard } -# This node will be decommissioned as a broker soon. +# This node was previously a kafka broker, but is now waiting +# to be repurposed (likely as a stat* type box). node 'analytics1021.eqiad.wmnet' { - -# Kafka brokers are routed via IPv6 so that -# other DCs can address without public IPv4 -# addresses. -interface::add_ip6_mapped { 'main': } - -role analytics::kafka::server -include role::analytics include standard - } # analytics1026 is the Impala master -- To view, visit https://gerrit.wikimedia.org/r/234265 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I753b0d85c10535cb5c75b469f8d90bf4c0b02dc8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Fix typo .. Fix typo Change-Id: I324c055493c6a0d8d49c842cf3fc5bbe4de0a826 --- M includes/ReferenceClarifier.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Sbisson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ReferenceClarifier.php b/includes/ReferenceClarifier.php index 669e201..89eb12a 100644 --- a/includes/ReferenceClarifier.php +++ b/includes/ReferenceClarifier.php @@ -126,7 +126,7 @@ * We used to have a unique index (on all columns), but the size * of the index was too small (urls can be pretty long...) * We have no data integrity reasons to want to ensure unique -* entries, and the code actually does a good jon of only +* entries, and the code actually does a good job of only * inserting uniques. Still, I'll do a sanity check and get rid * of duplicates, should there be any... */ -- To view, visit https://gerrit.wikimedia.org/r/234272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I324c055493c6a0d8d49c842cf3fc5bbe4de0a826 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: Sbisson sbis...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable base::firewall on eqiad proxy servers - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/234276 Change subject: Enable base::firewall on eqiad proxy servers .. Enable base::firewall on eqiad proxy servers Change-Id: I3f172eea78c1f583ab89aaf339e253bcf0d6ef5c --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/76/234276/1 diff --git a/manifests/site.pp b/manifests/site.pp index e1250d1..0d22b36 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1759,6 +1759,7 @@ # rate limiting purposes (T66622) node /^ms-fe100[1-4]\.eqiad\.wmnet$/ { role swift::proxy +include base::firewall if $::hostname == 'ms-fe1001' { include role::swift::stats_reporter -- To view, visit https://gerrit.wikimedia.org/r/234276 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f172eea78c1f583ab89aaf339e253bcf0d6ef5c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove method that seems to be doing nothing - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Remove method that seems to be doing nothing .. Remove method that seems to be doing nothing Change-Id: I8ba49b1ad7dc16a7a82f8f3a346b08fa75f5ae94 --- M includes/NewsletterTablePager.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/NewsletterTablePager.php b/includes/NewsletterTablePager.php index 6dd10ed..f6cefa3 100644 --- a/includes/NewsletterTablePager.php +++ b/includes/NewsletterTablePager.php @@ -93,10 +93,6 @@ } } - public function endQuery( $value ) { - $this-getOutput()-addWikiMsg( 'newsletter-create-confirmation' ); - } - public function getDefaultSort() { return 'nl_name'; } -- To view, visit https://gerrit.wikimedia.org/r/234134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8ba49b1ad7dc16a7a82f8f3a346b08fa75f5ae94 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly retrieve field names in TablePager classes - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Correctly retrieve field names in TablePager classes .. Correctly retrieve field names in TablePager classes Previously every time this method was called it would itterate over SpecialNewsletterManage::fields I think it was trying to do something with static but that is not needed / ugly and instead we can just used a private field.. Change-Id: Iacedb588fa27de08784c7c0459ba77edb298ccd1 --- M includes/NewsletterManageTable.php M includes/NewsletterTablePager.php 2 files changed, 20 insertions(+), 13 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/NewsletterManageTable.php b/includes/NewsletterManageTable.php index 3726721..68ae61e 100644 --- a/includes/NewsletterManageTable.php +++ b/includes/NewsletterManageTable.php @@ -4,17 +4,20 @@ private $newsletterOwners = array(); + /** +* @see TablePager::getFieldnames +* @var array|null +*/ + private $fieldNames = null; + public function getFieldNames() { - $header = null; - if ( is_null( $header ) ) { - $header = array(); + if ( $this-fieldNames === null ) { + $this-fieldNames = array(); foreach ( SpecialNewsletterManage::$fields as $key = $value ) { - $header[$key] = $this-msg( newsletter-manage-header-$value )-text(); + $this-fieldNames[$key] = $this-msg( newsletter-manage-header-$value )-text(); } } - - return $header; - + return $this-fieldNames; } public function getQueryInfo() { diff --git a/includes/NewsletterTablePager.php b/includes/NewsletterTablePager.php index f6cefa3..d4d2fad 100644 --- a/includes/NewsletterTablePager.php +++ b/includes/NewsletterTablePager.php @@ -2,16 +2,20 @@ class NewsletterTablePager extends TablePager { + /** +* @see TablePager::getFieldnames +* @var array|null +*/ + private $fieldNames = null; + public function getFieldNames() { - static $headers = null; - if ( is_null( $headers ) ) { - $headers = array(); + if ( $this-fieldNames === null ) { + $this-fieldNames = array(); foreach ( SpecialNewsletters::$fields as $field = $property ) { - $headers[$field] = $this-msg( newsletter-header-$property )-text(); + $this-fieldNames[$field] = $this-msg( newsletter-header-$property )-text(); } } - - return $headers; + return $this-fieldNames; } public function getQueryInfo() { -- To view, visit https://gerrit.wikimedia.org/r/234143 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iacedb588fa27de08784c7c0459ba77edb298ccd1 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] codfw LVS installer - jessie - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: codfw LVS installer - jessie .. codfw LVS installer - jessie Bug: T96375 Change-Id: I938371b43c8530f8a5b5a95ee0c6a23d95f9fb50 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index f7593fa..728a421 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2656,31 +2656,43 @@ host lvs2001 { hardware ethernet fc:15:b4:1f:ab:08; fixed-address lvs2001.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs2002 { hardware ethernet fc:15:b4:21:3e:38; fixed-address lvs2002.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs2003 { hardware ethernet fc:15:b4:1f:99:58; fixed-address lvs2003.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs2004 { hardware ethernet fc:15:b4:1f:3b:00; fixed-address lvs2004.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs2005 { hardware ethernet fc:15:b4:1f:5b:e8; fixed-address lvs2005.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs2006 { hardware ethernet fc:15:b4:1f:19:18; fixed-address lvs2006.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs3001 { -- To view, visit https://gerrit.wikimedia.org/r/234260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I938371b43c8530f8a5b5a95ee0c6a23d95f9fb50 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add unit tests for FileConfigurationObserver - change (operations...pybal)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: Add unit tests for FileConfigurationObserver .. Add unit tests for FileConfigurationObserver Change-Id: I526d573716ba668c9b8b7eb585daab6d9402c64e --- M pybal/config.py M pybal/pybal.py M pybal/test/fixtures.py M pybal/test/test_config.py M tox.ini 5 files changed, 91 insertions(+), 3 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved diff --git a/pybal/config.py b/pybal/config.py index 7e3a43b..3172cf6 100644 --- a/pybal/config.py +++ b/pybal/config.py @@ -69,7 +69,6 @@ self.lastFileStat = None self.lastConfig = None self.reloadTask = task.LoopingCall(self.reloadConfig) -self.startObserving() def startObserving(self): Start (or re-start) watching the configuration file for changes. @@ -95,7 +94,8 @@ continue server = ast.literal_eval(line) host = server.pop('host') -config[host] = server +config[host] = {'enabled': server['enabled'], +'weight': server['weight']} except (KeyError, SyntaxError, TypeError, ValueError) as ex: # We catch exceptions here (rather than simply allow them to # bubble up to FileConfigurationObserver.logError) because we diff --git a/pybal/pybal.py b/pybal/pybal.py old mode 100644 new mode 100755 index 0ae9df6..f39816c --- a/pybal/pybal.py +++ b/pybal/pybal.py @@ -278,6 +278,7 @@ self.serverConfigUrl = configUrl self.serverInitDeferredList = defer.Deferred() self.configObserver = config.ConfigurationObserver.fromUrl(self, configUrl) +self.configObserver.startObserving() def __str__(self): return [%s] % self.lvsservice.name diff --git a/pybal/test/fixtures.py b/pybal/test/fixtures.py index 1fe18e2..ab480f8 100644 --- a/pybal/test/fixtures.py +++ b/pybal/test/fixtures.py @@ -47,6 +47,9 @@ self.up = False self.reason = reason +def onConfigUpdate(self, config): +self.config = config + class StubLVSService(object): Test stub for `pybal.ipvs.LVSService`. diff --git a/pybal/test/test_config.py b/pybal/test/test_config.py index 5fd9db1..2e77801 100644 --- a/pybal/test/test_config.py +++ b/pybal/test/test_config.py @@ -6,12 +6,13 @@ This module contains tests for `pybal.config`. -import unittest +import mock import tempfile import os import pybal import pybal.config + from .fixtures import PyBalTestCase @@ -32,3 +33,85 @@ pybal.config.ConfigurationObserver.fromUrl(None, 'dummy://'), DummyConfigurationObserver ) + + +class FileConfigurationObserverTestCase(PyBalTestCase): +Test case for `pybal.config.FileConfigurationObserver`. + +def setUp(self): +super(FileConfigurationObserverTestCase, self).setUp() +self.observer = self.getObserver() + +def getObserver(self, filename='file:///something/here'): +return pybal.config.FileConfigurationObserver( +self.coordinator, filename) + +def testInit(self): +Test `FileConfigurationObserver.__init__` +self.assertEquals(self.observer.filePath, '/something/here') +self.assertEquals(self.observer.reloadIntervalSeconds, 1) + +@mock.patch('os.stat') +def testReloadConfig(self, mock_stat): +Test `FileConfigurationObserver.reloadConfig` +self.observer.lastFileStat = 'WMF' +mock_stat.return_value = 'WMF' +self.observer.parseConfig = mock.MagicMock(return_value=some_config) +# No stat changes mean no config parsing +self.observer.reloadConfig() +mock_stat.assert_called_with('/something/here') +self.observer.parseConfig.assert_not_called() +# Stat change means we open the file and parse the configuration +mock_stat.reset_mock() +mock_stat.return_value = 'WMF!' +m = mock.mock_open(read_data=123) +with mock.patch('__builtin__.open', m, True) as mock_open: +self.observer.reloadConfig() +mock_stat.assert_called_with('/something/here') +mock_open.assert_called_with('/something/here', 'rt') +self.observer.parseConfig.assert_called_with('123') +self.assertEquals(self.observer.lastConfig, 'some_config') +self.assertEquals(self.observer.coordinator.config, 'some_config') + +def testParseConfig(self): +Test `FileConfigurationObserver.parseConfig` +self.observer.parseLegacyConfig = mock.MagicMock(return_value='legacy_config') +self.observer.parseJsonConfig = mock.MagicMock(return_value='json_config') +self.assertEquals(self.observer.parseConfig(I am legacy), 'legacy_config') +self.observer.parseLegacyConfig.assert_called_with(I am legacy) +
[MediaWiki-commits] [Gerrit] Add unit tests for HttpConfigurationObserver - change (operations...pybal)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: Add unit tests for HttpConfigurationObserver .. Add unit tests for HttpConfigurationObserver Change-Id: I695ce5352de1b35ac47848a075d7d09d0ba67833 --- M pybal/test/fixtures.py M pybal/test/test_config.py 2 files changed, 68 insertions(+), 3 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved diff --git a/pybal/test/fixtures.py b/pybal/test/fixtures.py index ab480f8..76b4bbc 100644 --- a/pybal/test/fixtures.py +++ b/pybal/test/fixtures.py @@ -11,7 +11,7 @@ import pybal.util import twisted.test.proto_helpers import twisted.trial.unittest - +from twisted.internet import defer class ServerStub(object): Test stub for `pybal.Server`. @@ -64,6 +64,24 @@ self.configuration = configuration +class MockClientGetPage(object): +def __init__(self, data): +self.return_value = data + +def getPage(self, url): +d = defer.Deferred() +d.callback(self.return_value) +return d + +def addErr(self, msg): +self.errMsg = ValueError(msg) + +def getPageError(self, url): +d = defer.Deferred() +d.errback(self.errMsg) +return d + + class PyBalTestCase(twisted.trial.unittest.TestCase): Base class for PyBal test cases. diff --git a/pybal/test/test_config.py b/pybal/test/test_config.py index 2e77801..29dfa68 100644 --- a/pybal/test/test_config.py +++ b/pybal/test/test_config.py @@ -12,10 +12,11 @@ import pybal import pybal.config +import json -from .fixtures import PyBalTestCase - +from .fixtures import PyBalTestCase, MockClientGetPage +from twisted.python.failure import Failure class DummyConfigurationObserver(pybal.config.ConfigurationObserver): urlScheme = 'dummy://' @@ -115,3 +116,49 @@ # Needed for nose to pass... it doesn't really get raised self.assertEquals(self.observer.parseLegacyConfig(invalid_config), {}) self.flushLoggedErrors(KeyError) + + +class HttpConfigurationObserverTestCase(PyBalTestCase): +data = +{ +mw1200: { enabled: true, weight: 10 }, +mw1201: {enabled: false, weight: 1 } +} + + +def setUp(self): +super(HttpConfigurationObserverTestCase, self).setUp() +self.observer = self.getObserver() + +def getObserver(self, url='http://example.com/pybal-config/example.json'): +return pybal.config.HttpConfigurationObserver( +self.coordinator, url) + +def testReloadConfig(self): +Test `HttpConfigurationObserver.reloadConfig` +m = MockClientGetPage(self.data) +with mock.patch('twisted.web.client.getPage', m.getPage): +self.observer.reloadConfig() +self.assertEquals(self.coordinator.config, json.loads(self.data)) + +errMsg = 'Hamsters!' +m.addErr(errMsg) +self.observer.logError = mock.MagicMock() +with mock.patch('twisted.web.client.getPage', m.getPageError): +self.observer.reloadConfig() +# Configuration hasn't changed +self.assertEquals(self.coordinator.config, json.loads(self.data)) +# Error was logged +self.assertTrue(self.observer.logError.called) + +def testOnConfigReceived(self): +Test `HttpConfigurationObserver.OnConfigReceived` +self.observer.lastConfig = json.loads(self.data) +self.coordinator.config = None +# No change in config means no onConfigUpdate +self.observer.onConfigReceived(self.data) +self.assertEquals(self.coordinator.config, None) +# Config gets updated +self.observer.lastConfig['mw1201'][enabled] = True +self.observer.onConfigReceived(self.data) +self.assertEquals(self.coordinator.config, json.loads(self.data)) -- To view, visit https://gerrit.wikimedia.org/r/234253 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I695ce5352de1b35ac47848a075d7d09d0ba67833 Gerrit-PatchSet: 2 Gerrit-Project: operations/debs/pybal Gerrit-Branch: master Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use wgNamespaceContentModels instead of wgFlowOccupyNamespaces - change (mediawiki/vagrant)
Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/234271 Change subject: Use wgNamespaceContentModels instead of wgFlowOccupyNamespaces .. Use wgNamespaceContentModels instead of wgFlowOccupyNamespaces * Enable Flow on NS_FLOW_TEST_TALK * Enable Flow on talk page beta feature by default instead of enabling on NS_USER_TALK, because dogfooding :) Bug: T109553 Change-Id: I42e2343c5f248371787589c7c62ee117681a8257 --- M puppet/modules/role/templates/flow/conf.php.erb 1 file changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/71/234271/1 diff --git a/puppet/modules/role/templates/flow/conf.php.erb b/puppet/modules/role/templates/flow/conf.php.erb index a9f9bc0..a72e9eb 100644 --- a/puppet/modules/role/templates/flow/conf.php.erb +++ b/puppet/modules/role/templates/flow/conf.php.erb @@ -5,16 +5,17 @@ $wgFlowServerCompileTemplates = true; // always recompile in dev mode $wgFlowContentFormat = 'html'; // Parsoid dependency -$wgExtraNamespaces[190] = 'Flow_test'; -$wgExtraNamespaces[191] = 'Flow_test_talk'; -$wgNamespacesWithSubpages[190] = true; -$wgNamespacesWithSubpages[191] = true; +define( 'NS_FLOW_TEST', 190 ); +define( 'NS_FLOW_TEST_TALK', 191 ); -$wgFlowOccupyPages = array ( - 'Talk:Flow QA', // used by Flow extension's browser tests - 'Talk:Sandbox', -); -$wgFlowOccupyNamespaces = array( NS_USER_TALK, 191 ); +$wgExtraNamespaces[ NS_FLOW_TEST ] = 'Flow_test'; +$wgExtraNamespaces[ NS_FLOW_TEST_TALK ] = 'Flow_test_talk'; +$wgNamespacesWithSubpages[ NS_FLOW_TEST ] = true; +$wgNamespacesWithSubpages[ NS_FLOW_TEST_TALK ] = true; + +$wgNamespaceContentModels[ NS_FLOW_TEST_TALK ] = CONTENT_MODEL_FLOW_BOARD; + +$wgFlowEnableOptInBetaFeature = true; $wgFlowParsoidURL = 'http://localhost:%= scope['mediawiki::parsoid::port'] %'; $wgFlowParsoidPrefix = 'localhost'; @@ -25,4 +26,3 @@ $wgGroupPermissions['sysop']['flow-suppress'] = true; $wgDebugLogGroups['Flow'] = '/vagrant/logs/mediawiki-Flow.log'; - -- To view, visit https://gerrit.wikimedia.org/r/234271 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42e2343c5f248371787589c7c62ee117681a8257 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Sbisson sbis...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] API BREAKING CHANGE - Remove rawMode use - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: API BREAKING CHANGE - Remove rawMode use .. API BREAKING CHANGE - Remove rawMode use This is a breaking api change! :D This also removes ALL BUT ONE usages of the deprecated rawMode stuff from the mediawiki API The final use will be removed in a follouwp Breaks can be seen below: - XML output aliases are now grouped by language - XML output may no longer give elements when they are empty - XML any claim, qualifer, reference or snak elements that had an '_idx' element will no longer have it - ALL output may now give empty elements, ie. labels when an entity has none Once merged this will be announced. DEPLOY: This is an API breaking change... This will likely also cause a slight increase in the size of the JSON log files due to the fact that empty elements in the serliazation will no longer be removed. After compression the difference should be negligible Bug: T95168 Change-Id: I6b8a041917304bb9c78153da5bd71327b83699c6 --- M lib/includes/serialization/CallbackFactory.php M repo/includes/LinkedData/EntityDataSerializationService.php M repo/includes/api/ApiHelperFactory.php M repo/includes/api/GetEntities.php M repo/includes/api/ResultBuilder.php M repo/tests/phpunit/data/api/editentity.xml M repo/tests/phpunit/data/api/getclaims.xml M repo/tests/phpunit/data/api/getentities.xml M repo/tests/phpunit/data/api/setaliases-removed.xml M repo/tests/phpunit/data/api/setaliases.xml M repo/tests/phpunit/data/api/setclaim.xml M repo/tests/phpunit/data/api/setqualifier.xml M repo/tests/phpunit/data/api/setreference.xml M repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php M repo/tests/phpunit/includes/api/ApiXmlFormatTest.php M repo/tests/phpunit/includes/api/ModifyTermTestCase.php M repo/tests/phpunit/includes/api/ResultBuilderTest.php M repo/tests/phpunit/includes/api/SetAliasesTest.php M repo/tests/phpunit/includes/api/SetSiteLinkTest.php 19 files changed, 617 insertions(+), 870 deletions(-) Approvals: Aude: Looks good to me, approved Daniel Kinzler: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/lib/includes/serialization/CallbackFactory.php b/lib/includes/serialization/CallbackFactory.php index 10c591a..4dc81f2 100644 --- a/lib/includes/serialization/CallbackFactory.php +++ b/lib/includes/serialization/CallbackFactory.php @@ -30,6 +30,23 @@ } /** +* Get callable to index array with the given tag name +* +* @param string $type +* @param string $kvpKeyName +* +* @return callable +*/ + public function getCallbackToSetArrayType( $type, $kvpKeyName = null ) { + return function( $array ) use ( $type, $kvpKeyName ) { + if ( is_array( $array ) ) { + ApiResult::setArrayType( $array, $type, $kvpKeyName ); + } + return $array; + }; + } + + /** * Get callable to remove array keys and optionally set the key as an array value * * @param string|null $addAsArrayElement @@ -68,11 +85,13 @@ public function getCallbackToAddDataTypeToSnak( PropertyDataTypeLookup $dataTypeLookup ) { return function ( $array ) use ( $dataTypeLookup ) { - try { - $dataType = $dataTypeLookup-getDataTypeIdForProperty( new PropertyId( $array['property'] ) ); - $array['datatype'] = $dataType; - } catch ( PropertyNotFoundException $e ) { - //XXX: shall we set $serialization['datatype'] = 'bad' ?? + if ( is_array( $array ) ) { + try { + $dataType = $dataTypeLookup-getDataTypeIdForProperty( new PropertyId( $array['property'] ) ); + $array['datatype'] = $dataType; + } catch ( PropertyNotFoundException $e ) { + //XXX: shall we set $serialization['datatype'] = 'bad' ?? + } } return $array; }; diff --git a/repo/includes/LinkedData/EntityDataSerializationService.php b/repo/includes/LinkedData/EntityDataSerializationService.php index 86db204..01b11d3 100644 --- a/repo/includes/LinkedData/EntityDataSerializationService.php +++ b/repo/includes/LinkedData/EntityDataSerializationService.php @@ -459,7 +459,7 @@ $this-serializerFactory, $this-siteStore, $this-propertyLookup, - false // Never index tags for this service as we dont output XML + false //
[MediaWiki-commits] [Gerrit] Increasing num.replica.fetchers all around the cluster - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/234278 Change subject: Increasing num.replica.fetchers all around the cluster .. Increasing num.replica.fetchers all around the cluster Change-Id: I01b607d45383aa649764533630c30df2ff713a9c --- M manifests/role/analytics/kafka.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/78/234278/1 diff --git a/manifests/role/analytics/kafka.pp b/manifests/role/analytics/kafka.pp index e50c154..c1fc6d9 100644 --- a/manifests/role/analytics/kafka.pp +++ b/manifests/role/analytics/kafka.pp @@ -160,9 +160,9 @@ # topics if necessary. num_partitions = 1, -# Bump this up to 4 to get a little more +# Bump this up to get a little more # parallelism between replicas. -num_replica_fetchers= 4, +num_replica_fetchers= 8, # Setting this larger so that it is sure to be bigger # than batch size from varnishkafka. # See: https://issues.apache.org/jira/browse/KAFKA-766 -- To view, visit https://gerrit.wikimedia.org/r/234278 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01b607d45383aa649764533630c30df2ff713a9c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add langguage detector plugin - change (mediawiki/vagrant)
DCausse has uploaded a new change for review. https://gerrit.wikimedia.org/r/234280 Change subject: Add langguage detector plugin .. Add langguage detector plugin Set default profile to small-text Bug: T110077 Change-Id: I37f7bbeb251aa2fb84c0398be47b2c5040c70ae6 --- M puppet/modules/elasticsearch/files/elasticsearch.yml M puppet/modules/role/manifests/cirrussearch.pp 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/80/234280/1 diff --git a/puppet/modules/elasticsearch/files/elasticsearch.yml b/puppet/modules/elasticsearch/files/elasticsearch.yml index 23665bb..73e06d0 100644 --- a/puppet/modules/elasticsearch/files/elasticsearch.yml +++ b/puppet/modules/elasticsearch/files/elasticsearch.yml @@ -1,2 +1,5 @@ ## Turn off global accessibility. network.host: 127.0.0.1 + +## Use short-text langdetect profile +profile: /langdetect/short-text/ diff --git a/puppet/modules/role/manifests/cirrussearch.pp b/puppet/modules/role/manifests/cirrussearch.pp index 4e0860d..fbcb8af 100644 --- a/puppet/modules/role/manifests/cirrussearch.pp +++ b/puppet/modules/role/manifests/cirrussearch.pp @@ -50,6 +50,13 @@ name= 'extra', version = '1.7.0', } +## Language detection plugin ( built from https://github.com/jprante/elasticsearch-langdetect ) +elasticsearch::plugin { 'langdetect': +group = 'org.xbib.elasticsearch.plugin', + name= 'elasticsearch-langdetect', + version = '1.7.0.0', + url = 'https://archiva.wikimedia.org/repository/releases/org/xbib/elasticsearch/plugin/elasticsearch-langdetect/1.7.0.0/elasticsearch-langdetect-1.7.0.0.zip' +} mediawiki::wiki { 'cirrustest': } -- To view, visit https://gerrit.wikimedia.org/r/234280 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I37f7bbeb251aa2fb84c0398be47b2c5040c70ae6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: DCausse dcau...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Increasing num.replica.fetchers all around the cluster - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Increasing num.replica.fetchers all around the cluster .. Increasing num.replica.fetchers all around the cluster Change-Id: I01b607d45383aa649764533630c30df2ff713a9c --- M manifests/role/analytics/kafka.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/analytics/kafka.pp b/manifests/role/analytics/kafka.pp index e50c154..c1fc6d9 100644 --- a/manifests/role/analytics/kafka.pp +++ b/manifests/role/analytics/kafka.pp @@ -160,9 +160,9 @@ # topics if necessary. num_partitions = 1, -# Bump this up to 4 to get a little more +# Bump this up to get a little more # parallelism between replicas. -num_replica_fetchers= 4, +num_replica_fetchers= 8, # Setting this larger so that it is sure to be bigger # than batch size from varnishkafka. # See: https://issues.apache.org/jira/browse/KAFKA-766 -- To view, visit https://gerrit.wikimedia.org/r/234278 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I01b607d45383aa649764533630c30df2ff713a9c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch the nic for labnet1001 install. - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Switch the nic for labnet1001 install. .. Switch the nic for labnet1001 install. Labnet1001's internal 1G nic is disabled. The new nic here is the active eth0 10g interface on labnet1001. Change-Id: I2a0e60ef0ee4eb7821484010fd256f770949744f --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 728a421..96ed318 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2450,7 +2450,7 @@ } host labnet1001 { - hardware ethernet d4:be:d9:af:66:ba; + hardware ethernet 00:0A:F7:50:42:28; fixed-address labnet1001.eqiad.wmnet; } -- To view, visit https://gerrit.wikimedia.org/r/234261 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a0e60ef0ee4eb7821484010fd256f770949744f Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/234272 Change subject: Fix typo .. Fix typo Change-Id: I324c055493c6a0d8d49c842cf3fc5bbe4de0a826 --- M includes/ReferenceClarifier.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/72/234272/1 diff --git a/includes/ReferenceClarifier.php b/includes/ReferenceClarifier.php index 669e201..89eb12a 100644 --- a/includes/ReferenceClarifier.php +++ b/includes/ReferenceClarifier.php @@ -126,7 +126,7 @@ * We used to have a unique index (on all columns), but the size * of the index was too small (urls can be pretty long...) * We have no data integrity reasons to want to ensure unique -* entries, and the code actually does a good jon of only +* entries, and the code actually does a good job of only * inserting uniques. Still, I'll do a sanity check and get rid * of duplicates, should there be any... */ -- To view, visit https://gerrit.wikimedia.org/r/234272 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I324c055493c6a0d8d49c842cf3fc5bbe4de0a826 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] PHPCS everywhere - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: PHPCS everywhere .. PHPCS everywhere Change-Id: I12a30bca43fcfdcf334f896630f2c7c66655b568 --- M Newsletter.alias.php M Newsletter.hooks.php M includes/ApiNewsletter.php M includes/ApiNewsletterManage.php M includes/EchoNewsletterFormatter.php M includes/SpecialNewsletterCreate.php M includes/SpecialNewsletterManage.php M includes/SpecialNewsletters.php M tests/ApiNewsletterTest.php 9 files changed, 247 insertions(+), 184 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/Newsletter.alias.php b/Newsletter.alias.php index b594417..a0e52c9 100644 --- a/Newsletter.alias.php +++ b/Newsletter.alias.php @@ -10,7 +10,7 @@ /** English */ $specialPageAliases['en'] = array( - 'NewsletterCreate' = array( 'CreateNewsletter'), - 'NewsletterManage' = array( 'ManageNewsletter'), - 'Newsletters' = array( 'Newsletters'), -); \ No newline at end of file + 'NewsletterCreate' = array( 'CreateNewsletter' ), + 'NewsletterManage' = array( 'ManageNewsletter' ), + 'Newsletters' = array( 'Newsletters' ), +); diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php index 5834ebc..3d12f57 100755 --- a/Newsletter.hooks.php +++ b/Newsletter.hooks.php @@ -1,8 +1,10 @@ ?php + /** * Class to add Hooks used by Newsletter. */ class NewsletterHooks { + /** * Function to be called before EchoEvent * @@ -10,7 +12,7 @@ * @param array $notificationCategories Echo notification categories * @return bool */ - public static function onBeforeCreateEchoEvent( $notifications, $notificationCategories ) { + public static function onBeforeCreateEchoEvent( $notifications, $notificationCategories ) { $notificationCategories['newsletter'] = array( 'priority' = 3, 'tooltip' = 'echo-pref-tooltip-newsletter', @@ -79,4 +81,5 @@ return true; } + } diff --git a/includes/ApiNewsletter.php b/includes/ApiNewsletter.php index f93d8de..4befbf8 100644 --- a/includes/ApiNewsletter.php +++ b/includes/ApiNewsletter.php @@ -1,12 +1,13 @@ ?php class ApiNewsletter extends ApiBase { + public function execute() { $dbw = wfGetDB( DB_MASTER ); if ( $this-getMain()-getVal( 'todo' ) === 'subscribe' ) { $rowData = array( 'newsletter_id' = $this-getMain()-getVal( 'newsletterId' ), - 'subscriber_id' = $this-getUser()-getId() + 'subscriber_id' = $this-getUser()-getId(), ); $dbw-insert( 'nl_subscriptions', $rowData, __METHOD__ ); } @@ -21,15 +22,19 @@ } public function getAllowedParams() { - return array_merge( parent::getAllowedParams(), array( - 'newsletterId' = array ( - ApiBase::PARAM_TYPE = 'string', - ApiBase::PARAM_REQUIRED = true - ), - 'todo' = array ( - ApiBase::PARAM_TYPE = 'string', - ApiBase::PARAM_REQUIRED = true + return array_merge( + parent::getAllowedParams(), + array( + 'newsletterId' = array( + ApiBase::PARAM_TYPE = 'string', + ApiBase::PARAM_REQUIRED = true, + ), + 'todo' = array( + ApiBase::PARAM_TYPE = 'string', + ApiBase::PARAM_REQUIRED = true, + ), ) - ) ); + ); } -} \ No newline at end of file + +} diff --git a/includes/ApiNewsletterManage.php b/includes/ApiNewsletterManage.php index 56a4355..aa23f69 100644 --- a/includes/ApiNewsletterManage.php +++ b/includes/ApiNewsletterManage.php @@ -1,35 +1,39 @@ ?php + /** * API to manage newsletters - * */ class ApiNewsletterManage extends ApiBase { + public function execute() { $dbw = wfGetDB( DB_MASTER ); if ( $this-getMain()-getVal( 'todo' ) === 'removepublisher' ) { $rowData = array( 'newsletter_id' = $this-getMain()-getVal( 'newsletterId' ), - 'publisher_id' = $this-getMain()-getVal( 'publisher' ) + 'publisher_id' = $this-getMain()-getVal( 'publisher' ), ); $dbw-delete( 'nl_publishers',
[MediaWiki-commits] [Gerrit] maps: ensure PostgreSQL's logs as maps-admin - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/234273 Change subject: maps: ensure PostgreSQL's logs as maps-admin .. maps: ensure PostgreSQL's logs as maps-admin Ensure postgresql logs as maps-admin to allow maps-admin to read them Rely on logrotate's copytruncate policy for postgres for the rest of the log files in /var/log/postgresql We should find a better way of doing this. Abandoned efforts include: * sudo = wait to complex to right a good rule that does not make people's lives miserable but still works * adding adm group to maps-admins groups = not really possible with our current admin module or the puppet group resource. The puppet group resource provider on linux (groupadd) does not support the manages_members feature: https://docs.puppetlabs.com/references/latest/type.html#group-provider-features The admin module does not allow us to add people in groups on a per host basis. This means groups are global and that was a design goal back then. Change-Id: Ic27e3248c1357fe9797716a16301f3693c530e22 --- M manifests/role/maps.pp 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/73/234273/1 diff --git a/manifests/role/maps.pp b/manifests/role/maps.pp index 518d6e1..cc7e3ec 100644 --- a/manifests/role/maps.pp +++ b/manifests/role/maps.pp @@ -69,6 +69,13 @@ mode= '0400', content = template('maps/grants.cql.erb'), } +# TODO: Figure out a better way to do this +# Ensure postgresql logs as maps-admin to allow maps-admin to read them +# Rely on logrotate's copytruncate policy for postgres for the rest of the +# log file +file { '/var/log/postgresql/postgresql-9.4-main.log': +group = 'maps-admin', +} } class role::maps::slave { @@ -98,4 +105,11 @@ mode = '0444', source = 'puppet:///files/postgres/tuning.conf', } +# TODO: Figure out a better way to do this +# Ensure postgresql logs as maps-admin to allow maps-admin to read them +# Rely on logrotate's copytruncate policy for postgres for the rest of the +# log file +file { '/var/log/postgresql/postgresql-9.4-main.log': +group = 'maps-admin', +} } -- To view, visit https://gerrit.wikimedia.org/r/234273 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic27e3248c1357fe9797716a16301f3693c530e22 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Require API modules to POST and have tokens - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Require API modules to POST and have tokens .. Require API modules to POST and have tokens This also alteres the JS to post tokens Bug: T110181 Change-Id: Ie7663519245f6f93490ec6fbc6617d2c03b6747f --- M includes/ApiNewsletter.php M includes/ApiNewsletterManage.php M modules/ext.newsletter.js M modules/ext.newslettermanage.js M tests/ApiNewsletterTest.php 5 files changed, 23 insertions(+), 7 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ApiNewsletter.php b/includes/ApiNewsletter.php index 4befbf8..e903f46 100644 --- a/includes/ApiNewsletter.php +++ b/includes/ApiNewsletter.php @@ -37,4 +37,12 @@ ); } + public function needsToken() { + return 'csrf'; + } + + public function mustBePosted() { + return true; + } + } diff --git a/includes/ApiNewsletterManage.php b/includes/ApiNewsletterManage.php index aa23f69..882ef78 100644 --- a/includes/ApiNewsletterManage.php +++ b/includes/ApiNewsletterManage.php @@ -36,4 +36,12 @@ ); } + public function needsToken() { + return 'csrf'; + } + + public function mustBePosted() { + return true; + } + } diff --git a/modules/ext.newsletter.js b/modules/ext.newsletter.js index d402070..263a375 100644 --- a/modules/ext.newsletter.js +++ b/modules/ext.newsletter.js @@ -7,7 +7,7 @@ var api = new mw.Api(); $( 'input[type=radio][value=subscribe]' ).change( function() { var newsletterId = ( this.name ).substr( ( this.name ).indexOf( - ) + 1 ); - api.post( { + api.postWithToken( 'edit', { action: 'newsletterapi', newsletterId: newsletterId, todo: 'subscribe' @@ -19,7 +19,7 @@ $( 'input[type=radio][value=unsubscribe]' ).change( function() { var newsletterId = ( this.name ).substr( ( this.name ).indexOf( - ) + 1 ); - api.post( { + api.postWithToken( 'edit', { action: 'newsletterapi', newsletterId: newsletterId, todo: 'unsubscribe' diff --git a/modules/ext.newslettermanage.js b/modules/ext.newslettermanage.js index b835785..dcc0332 100644 --- a/modules/ext.newslettermanage.js +++ b/modules/ext.newslettermanage.js @@ -8,7 +8,7 @@ $( 'input[type=button]').click( function() { var remNewsletterId = this.name; var publisherId = this.id; - api.post( { + api.postWithToken( 'edit', { action: 'newslettermanageapi', publisher: publisherId, newsletterId: remNewsletterId, diff --git a/tests/ApiNewsletterTest.php b/tests/ApiNewsletterTest.php index 19e1be6..15b848a 100644 --- a/tests/ApiNewsletterTest.php +++ b/tests/ApiNewsletterTest.php @@ -15,8 +15,8 @@ parent::setUp(); $dbw = wfGetDB( DB_MASTER ); - $user = User::newFromName( Owner ); - $user-addToDatabase(); + $user = self::$users['sysop']-getUser(); + $this-doLogin( 'sysop' ); $rowData = array( 'nl_name' = 'MyNewsletter', @@ -48,7 +48,7 @@ } public function testApiNewsletterForSubscribingNewsletter() { - $this-doApiRequest( + $this-doApiRequestWithToken( array( 'action' = 'newsletterapi', 'newsletterId' = $this-getNewsletterId(), @@ -70,7 +70,7 @@ } public function testApiNewsletterForUnsubscribingNewsletter() { - $this-doApiRequest( + $this-doApiRequestWithToken( array( 'action' = 'newsletterapi', 'newsletterId' = $this-getNewsletterId(), -- To view, visit https://gerrit.wikimedia.org/r/234127 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7663519245f6f93490ec6fbc6617d2c03b6747f Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Load User via READ_LATEST in ApiOptions to avoid CAS errors - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Load User via READ_LATEST in ApiOptions to avoid CAS errors .. Load User via READ_LATEST in ApiOptions to avoid CAS errors Bug: T95839 Change-Id: I3c4cf4347af24f3313e709a996618b755da22dd2 --- M includes/api/ApiOptions.php 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiOptions.php b/includes/api/ApiOptions.php index 436f22a..a62bcb6 100644 --- a/includes/api/ApiOptions.php +++ b/includes/api/ApiOptions.php @@ -52,6 +52,14 @@ $this-dieUsageMsg( array( 'missingparam', 'optionname' ) ); } + // Load the user from the master to reduce CAS errors on double post (T95839) + if ( wfGetLB()-getServerCount() 1 ) { + $user = User::newFromId( $user-getId() ); + if ( !$user-loadFromId( User::READ_LATEST ) ) { + $this-dieUsage( 'Anonymous users cannot change preferences', 'notloggedin' ); + } + } + if ( $params['reset'] ) { $user-resetOptions( $params['resetkinds'], $this-getContext() ); $changed = true; -- To view, visit https://gerrit.wikimedia.org/r/233890 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c4cf4347af24f3313e709a996618b755da22dd2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch the nic for labnet1001 install. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/234261 Change subject: Switch the nic for labnet1001 install. .. Switch the nic for labnet1001 install. Labnet1001's internal 1G nic is disabled. The new nic here is the active eth0 10g interface on labnet1001. Change-Id: I2a0e60ef0ee4eb7821484010fd256f770949744f --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/61/234261/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 728a421..96ed318 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2450,7 +2450,7 @@ } host labnet1001 { - hardware ethernet d4:be:d9:af:66:ba; + hardware ethernet 00:0A:F7:50:42:28; fixed-address labnet1001.eqiad.wmnet; } -- To view, visit https://gerrit.wikimedia.org/r/234261 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a0e60ef0ee4eb7821484010fd256f770949744f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] swift: lower conntrack TIME_WAIT timeout - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: swift: lower conntrack TIME_WAIT timeout .. swift: lower conntrack TIME_WAIT timeout Change-Id: Ife278f0aa0283c9001a7fb7ae81f1246fbe3d2e8 --- M modules/swift/manifests/init.pp 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved Muehlenhoff: Looks good to me, but someone else must approve diff --git a/modules/swift/manifests/init.pp b/modules/swift/manifests/init.pp index d34ace2..cd49cbb 100644 --- a/modules/swift/manifests/init.pp +++ b/modules/swift/manifests/init.pp @@ -30,6 +30,10 @@ 'net.ipv4.tcp_max_orphans' = 262144, 'net.ipv4.tcp_synack_retries' = 2, 'net.ipv4.tcp_syn_retries' = 2, + +# even with NOTRACK enabled, conntrack will still keep track +# connections in TIME_WAIT, thus lower the respective timeout +'net.netfilter.nf_conntrack_tcp_timeout_time_wait' = 3, }, } -- To view, visit https://gerrit.wikimedia.org/r/234240 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife278f0aa0283c9001a7fb7ae81f1246fbe3d2e8 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Muehlenhoff mmuhlenh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename OccupationListener to TopicPageCreationListener - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Rename OccupationListener to TopicPageCreationListener .. Rename OccupationListener to TopicPageCreationListener This used to be used to create `page` `revision` etc records for new boards. Nowadays, however, that functionality is done elsewhere, before we store the rest of the content (so we can store the workflow with the associated page_id). Nowadays, this listener is only used to create the Topic:Xyz page for posts. We still need to do that to make sure that core functionality like Title::exists works for Topic:Xyz pages. I've also removed the DeletedContributions hook's isEnabled stuff. Now that we no longer occupy on load and occupy what we used to, this no longer makes sense. Bug: T105574 Change-Id: I460b3a835eaa74df76340d36fe350d272b92b4e3 --- M Hooks.php M autoload.php M container.php M includes/Api/ApiFlow.php M includes/Block/TopicList.php R includes/Data/Listener/TopicPageCreationListener.php M includes/TalkpageManager.php 7 files changed, 11 insertions(+), 39 deletions(-) Approvals: Sbisson: Looks good to me, approved Mattflaschen: Looks good to me, but someone else must approve Catrope: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/Hooks.php b/Hooks.php index 2ac1c93..f387602 100644 --- a/Hooks.php +++ b/Hooks.php @@ -798,15 +798,9 @@ public static function onDeletedContributionsQuery( $data, $pager, $offset, $limit, $descending ) { set_error_handler( new Flow\RecoverableErrorHandler, -1 ); try { - // Contributions may be on pages outside the set of currently - // enabled pages so we must disable to occupation listener - /** @var Flow\Data\Listener\OccupationListener $listener */ - $listener = Container::get( 'listener.occupation' ); - $listener-setEnabled( false ); /** @var Flow\Formatter\ContributionsQuery $query */ $query = Container::get( 'query.contributions' ); $results = $query-getResults( $pager, $offset, $limit, $descending ); - $listener-setEnabled( true ); } catch ( Exception $e ) { wfDebugLog( 'Flow', __METHOD__ . ': Failed contributions query' ); MWExceptionHandler::logException( $e ); diff --git a/autoload.php b/autoload.php index 7ca7d4d..3bbd18d 100644 --- a/autoload.php +++ b/autoload.php @@ -75,9 +75,9 @@ 'Flow\\Data\\Listener\\ImmediateWatchTopicListener' = __DIR__ . '/includes/Data/Listener/WatchTopicListener.php', 'Flow\\Data\\Listener\\ModerationLoggingListener' = __DIR__ . '/includes/Data/Listener/ModerationLoggingListener.php', 'Flow\\Data\\Listener\\NotificationListener' = __DIR__ . '/includes/Data/Listener/NotificationListener.php', - 'Flow\\Data\\Listener\\OccupationListener' = __DIR__ . '/includes/Data/Listener/OccupationListener.php', 'Flow\\Data\\Listener\\RecentChangesListener' = __DIR__ . '/includes/Data/Listener/RecentChangesListener.php', 'Flow\\Data\\Listener\\ReferenceRecorder' = __DIR__ . '/includes/Data/Listener/ReferenceRecorder.php', + 'Flow\\Data\\Listener\\TopicPageCreationListener' = __DIR__ . '/includes/Data/Listener/TopicPageCreationListener.php', 'Flow\\Data\\Listener\\UserNameListener' = __DIR__ . '/includes/Data/Listener/UserNameListener.php', 'Flow\\Data\\Listener\\WorkflowTopicListListener' = __DIR__ . '/includes/Data/Listener/WorkflowTopicListListener.php', 'Flow\\Data\\ManagerGroup' = __DIR__ . '/includes/Data/ManagerGroup.php', diff --git a/container.php b/container.php index 7401cd4..d2534c2 100644 --- a/container.php +++ b/container.php @@ -220,7 +220,7 @@ }; $c['storage.workflow.listeners'] = function( $c ) { return array( - 'listener.occupation' = $c['listener.occupation'], + 'listener.topicpagecreation' = $c['listener.topicpagecreation'], // The storage.topic_list.indexes are primarily for TopicListEntry insertions, but they // also listen for discussion workflow insertions so they can initialize for new boards. @@ -251,10 +251,10 @@ ) ); }; -$c['listener.occupation'] = function( $c ) { +$c['listener.topicpagecreation'] = function( $c ) { global $wgFlowDefaultWorkflow; - return new Flow\Data\Listener\OccupationListener( + return new Flow\Data\Listener\TopicPageCreationListener( $c['occupation_controller'], $c['deferred_queue'], $wgFlowDefaultWorkflow diff --git a/includes/Api/ApiFlow.php b/includes/Api/ApiFlow.php index ffaf30c..b8b6afb 100644 --- a/includes/Api/ApiFlow.php +++
[MediaWiki-commits] [Gerrit] Re-enable auto create topics for Kafka - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Re-enable auto create topics for Kafka .. Re-enable auto create topics for Kafka Change-Id: I43fc769551db5ade0355105099bdb9caeef2c3eb --- M manifests/role/analytics/kafka.pp 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/analytics/kafka.pp b/manifests/role/analytics/kafka.pp index 570d46d..e50c154 100644 --- a/manifests/role/analytics/kafka.pp +++ b/manifests/role/analytics/kafka.pp @@ -146,9 +146,7 @@ nofiles_ulimit = $nofiles_ulimit, # Enable auto creation of topics. -# This will be used for eventlogging-kafka -# (Disable this until we are ready for eventlogging-kafka). -auto_create_topics_enable = false, +auto_create_topics_enable = true, # (Temporarily?) disable auto leader rebalance. # I am having issues with analytics1012, and I can't -- To view, visit https://gerrit.wikimedia.org/r/234266 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43fc769551db5ade0355105099bdb9caeef2c3eb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Decom analytics1021 as a Kafka broker - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Decom analytics1021 as a Kafka broker .. Decom analytics1021 as a Kafka broker It will be repurposed later. Bug: T106581 Change-Id: I753b0d85c10535cb5c75b469f8d90bf4c0b02dc8 --- M manifests/role/analytics/kafka.pp M manifests/site.pp 2 files changed, 2 insertions(+), 12 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/analytics/kafka.pp b/manifests/role/analytics/kafka.pp index 564d9ec..570d46d 100644 --- a/manifests/role/analytics/kafka.pp +++ b/manifests/role/analytics/kafka.pp @@ -57,8 +57,6 @@ 'kafka1014.eqiad.wmnet' = { 'id' = 14 }, # Row C 'kafka1018.eqiad.wmnet' = { 'id' = 18 }, # Row D 'kafka1020.eqiad.wmnet' = { 'id' = 20 }, # Row D -# analytics1021 is to be decomissioned as a kafka broker. -'analytics1021.eqiad.wmnet' = { 'id' = 21 }, # Row A 'kafka1022.eqiad.wmnet' = { 'id' = 22 }, # Row C }, 'ulsfo' = { }, diff --git a/manifests/site.pp b/manifests/site.pp index 60fc440..ecd8f52 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -126,18 +126,10 @@ include standard } -# This node will be decommissioned as a broker soon. +# This node was previously a kafka broker, but is now waiting +# to be repurposed (likely as a stat* type box). node 'analytics1021.eqiad.wmnet' { - -# Kafka brokers are routed via IPv6 so that -# other DCs can address without public IPv4 -# addresses. -interface::add_ip6_mapped { 'main': } - -role analytics::kafka::server -include role::analytics include standard - } # analytics1026 is the Impala master -- To view, visit https://gerrit.wikimedia.org/r/234265 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I753b0d85c10535cb5c75b469f8d90bf4c0b02dc8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Model internal and external surveys - change (mediawiki...QuickSurveys)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/234267 Change subject: Model internal and external surveys .. Model internal and external surveys * Add the Survey abstract base class, and the InternalSurvey and ExternalSurvey classes, which model internal and external surveys respectively. * Add the SurveyFactory class that creates an instance of a model based on some specification or throws an exception - with an informative message - if it is invalid * Replace most of the logic in the ResourceLoaderGetConfigVars and ResourceLoaderRegisterModules handlers with simple manipulations of models Bug: T110196 Change-Id: I90b3ce5c7fb0ef06802cd9e0abe429e67bc742cc --- M extension.json A includes/ExternalSurvey.php A includes/InternalSurvey.php M includes/QuickSurveys.hooks.php A includes/Survey.php A includes/SurveyFactory.php A tests/phpunit/SurveyFactoryTest.php 7 files changed, 499 insertions(+), 49 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys refs/changes/67/234267/1 diff --git a/extension.json b/extension.json index 072d0aa..306de24 100644 --- a/extension.json +++ b/extension.json @@ -74,7 +74,11 @@ } }, AutoloadClasses: { - QuickSurveys\\Hooks: includes/QuickSurveys.hooks.php + QuickSurveys\\Hooks: includes/QuickSurveys.hooks.php, + QuickSurveys\\SurveyFactory: includes/SurveyFactory.php, + QuickSurveys\\Survey: includes/Survey.php, + QuickSurveys\\InternalSurvey: includes/InternalSurvey.php, + QuickSurveys\\ExternalSurvey: includes/ExternalSurvey.php }, manifest_version: 1, Hooks: { @@ -101,7 +105,7 @@ @question: survey question message key, question: ext-quicksurveys-example-internal-survey-question, @description: The message key of the description of the survey. Displayed immediately below the survey question., - description: , + description: ext-quicksurveys-example-internal-survey-description, @answers: possible answer message keys for positive, neutral, and negative, answers: { positive: ext-quicksurveys-example-internal-survey-answer-positive, @@ -113,7 +117,7 @@ @enabled: whether the survey is enabled, enabled: false, @coverage: percentage of users that will see the survey, - coverage: 50, + coverage: 0.5, @platform: for each platform (desktop, mobile), which version of it is targeted (stable, beta, alpha), platform: { desktop: [stable], @@ -135,7 +139,7 @@ @enabled: whether the survey is enabled, enabled: false, @coverage: percentage of users that will see the survey, - coverage: 50, + coverage: 0.5, @platform: for each platform (desktop, mobile), which version of it is targeted (stable, beta, alpha), platform: { desktop: [stable], diff --git a/includes/ExternalSurvey.php b/includes/ExternalSurvey.php new file mode 100644 index 000..568de8f --- /dev/null +++ b/includes/ExternalSurvey.php @@ -0,0 +1,43 @@ +?php + +namespace QuickSurveys; + +class ExternalSurvey extends Survey +{ + /** +* @var string The URL of the external survey. +*/ + private $link; + + /** +* @var string The description of the privacy policy of the website that hosts the external survey. +*/ + private $privacyPolicy; + + public function __construct( + $name, + $question, + $description, + $isEnabled, + $coverage, + $link, + $privacyPolicy + ) { + parent::__construct( $name, $question, $description, $isEnabled, $coverage ); + + $this-link = $link; + $this-privacyPolicy = $privacyPolicy; + } + + public function getMessages() { + return array_merge( parent::getMessages(), array( $this-privacyPolicy ) ); + } + + public function toArray() { + return parent::toArray() + array( + 'type' = 'external', + 'link' = $this-link, +
[MediaWiki-commits] [Gerrit] Require ethtool package for ethtool execs - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Require ethtool package for ethtool execs .. Require ethtool package for ethtool execs This caused some exec failures during initial puppetization of lvs2006 as jessie. Change-Id: Ic04e42c20fc44ddd5322c0d7ba8c77b71dc1e69e --- M modules/interface/manifests/offload.pp M modules/interface/manifests/ring.pp 2 files changed, 3 insertions(+), 1 deletion(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/interface/manifests/offload.pp b/modules/interface/manifests/offload.pp index fb93cc3..67320eb 100644 --- a/modules/interface/manifests/offload.pp +++ b/modules/interface/manifests/offload.pp @@ -28,6 +28,7 @@ exec { ethtool ${interface} -K ${setting} ${value}: path= '/usr/bin:/usr/sbin:/bin:/sbin', command = ethtool -K ${interface} ${setting} ${value}, -unless = test $(ethtool -k ${interface} | awk '/${long_param}:/ { print \$2 }') = '${value}' +unless = test $(ethtool -k ${interface} | awk '/${long_param}:/ { print \$2 }') = '${value}', +require = Package['ethtool'], } } diff --git a/modules/interface/manifests/ring.pp b/modules/interface/manifests/ring.pp index 469c731..f2d597f 100644 --- a/modules/interface/manifests/ring.pp +++ b/modules/interface/manifests/ring.pp @@ -22,5 +22,6 @@ command = ethtool -G ${interface} ${setting} ${value}, subscribe = Augeas[${interface}_${title}], refreshonly = true, +require = Package['ethtool'], } } -- To view, visit https://gerrit.wikimedia.org/r/234269 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic04e42c20fc44ddd5322c0d7ba8c77b71dc1e69e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] swift: enable base::firewall on ms-fe2* - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/234268 Change subject: swift: enable base::firewall on ms-fe2* .. swift: enable base::firewall on ms-fe2* Change-Id: I30c38c2e50bcea53f05ed4c9f7ba1404adafe578 --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/68/234268/1 diff --git a/manifests/site.pp b/manifests/site.pp index ecd8f52..96923fb 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1787,6 +1787,7 @@ node /^ms-fe200[1-4]\.codfw\.wmnet$/ { role swift::proxy +include base::firewall if $::hostname =~ /^ms-fe200[12]$/ { $ganglia_aggregator = true -- To view, visit https://gerrit.wikimedia.org/r/234268 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30c38c2e50bcea53f05ed4c9f7ba1404adafe578 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable base::firewall on eqiad storage servers - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/234274 Change subject: Enable base::firewall on eqiad storage servers .. Enable base::firewall on eqiad storage servers Change-Id: I6c2b0b43cf2aafbf38b4c903e847bbface87e96e --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/74/234274/1 diff --git a/manifests/site.pp b/manifests/site.pp index 96923fb..6424019 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1775,6 +1775,7 @@ # HP machines have different disk ordering T90922 node /^ms-be101[678]\.eqiad\.wmnet$/ { role swift::storage +include base::firewall } node /^ms-fe300[1-2]\.esams\.wmnet$/ { -- To view, visit https://gerrit.wikimedia.org/r/234274 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c2b0b43cf2aafbf38b4c903e847bbface87e96e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix use of $updater-addExtensionTable - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Fix use of $updater-addExtensionTable .. Fix use of $updater-addExtensionTable This thing only expects 2 params.. So only give it 2 params Change-Id: I5e7fa787e31da166fa6557536517ab6cc8932ca6 --- M Newsletter.hooks.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php index 3d12f57..b14ae42 100755 --- a/Newsletter.hooks.php +++ b/Newsletter.hooks.php @@ -68,10 +68,10 @@ * @return bool */ public static function onLoadExtensionSchemaUpdates( DatabaseUpdater $updater ) { - $updater-addExtensionTable( 'nl_newsletters', __DIR__ . '/sql/nl_newsletters.sql', true ); - $updater-addExtensionTable( 'nl_issues', __DIR__ . '/sql/nl_issues.sql', true ); - $updater-addExtensionTable( 'nl_subscriptions', __DIR__ . '/sql/nl_subscriptions.sql', true ); - $updater-addExtensionTable( 'nl_publishers', __DIR__ . '/sql/nl_publishers.sql', true ); + $updater-addExtensionTable( 'nl_newsletters', __DIR__ . '/sql/nl_newsletters.sql' ); + $updater-addExtensionTable( 'nl_issues', __DIR__ . '/sql/nl_issues.sql' ); + $updater-addExtensionTable( 'nl_subscriptions', __DIR__ . '/sql/nl_subscriptions.sql' ); + $updater-addExtensionTable( 'nl_publishers', __DIR__ . '/sql/nl_publishers.sql' ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/234130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e7fa787e31da166fa6557536517ab6cc8932ca6 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] codfw LVS installer - jessie - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/234260 Change subject: codfw LVS installer - jessie .. codfw LVS installer - jessie Bug: T96375 Change-Id: I938371b43c8530f8a5b5a95ee0c6a23d95f9fb50 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/60/234260/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index f7593fa..728a421 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2656,31 +2656,43 @@ host lvs2001 { hardware ethernet fc:15:b4:1f:ab:08; fixed-address lvs2001.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs2002 { hardware ethernet fc:15:b4:21:3e:38; fixed-address lvs2002.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs2003 { hardware ethernet fc:15:b4:1f:99:58; fixed-address lvs2003.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs2004 { hardware ethernet fc:15:b4:1f:3b:00; fixed-address lvs2004.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs2005 { hardware ethernet fc:15:b4:1f:5b:e8; fixed-address lvs2005.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs2006 { hardware ethernet fc:15:b4:1f:19:18; fixed-address lvs2006.codfw.wmnet; + option pxelinux.pathprefix jessie-installer/; + filename jessie-installer/debian-installer/amd64/pxelinux.0; } host lvs3001 { -- To view, visit https://gerrit.wikimedia.org/r/234260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I938371b43c8530f8a5b5a95ee0c6a23d95f9fb50 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Switch the nic for labnet1001 install. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/234263 Change subject: Revert Switch the nic for labnet1001 install. .. Revert Switch the nic for labnet1001 install. Turns out the 10g doesn't support PXE, so this will have to be done another way. This reverts commit 478d98c48abd454f231ff9a5c1760c4dc74713df. Change-Id: I33b101d086ce34a95865d5402ea92364bdcb05b5 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/63/234263/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 96ed318..728a421 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2450,7 +2450,7 @@ } host labnet1001 { - hardware ethernet 00:0A:F7:50:42:28; + hardware ethernet d4:be:d9:af:66:ba; fixed-address labnet1001.eqiad.wmnet; } -- To view, visit https://gerrit.wikimedia.org/r/234263 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33b101d086ce34a95865d5402ea92364bdcb05b5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] swift: enable base::firewall on ms-fe2* - change (operations/puppet)
Muehlenhoff has submitted this change and it was merged. Change subject: swift: enable base::firewall on ms-fe2* .. swift: enable base::firewall on ms-fe2* Change-Id: I30c38c2e50bcea53f05ed4c9f7ba1404adafe578 --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Muehlenhoff: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index ecd8f52..96923fb 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1787,6 +1787,7 @@ node /^ms-fe200[1-4]\.codfw\.wmnet$/ { role swift::proxy +include base::firewall if $::hostname =~ /^ms-fe200[12]$/ { $ganglia_aggregator = true -- To view, visit https://gerrit.wikimedia.org/r/234268 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30c38c2e50bcea53f05ed4c9f7ba1404adafe578 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Muehlenhoff mmuhlenh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Split NewsletterManageTable class into own file - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Split NewsletterManageTable class into own file .. Split NewsletterManageTable class into own file Change-Id: Iece70b5e25f59067b5f6a102e83a7f285e77cf4d --- M extension.json A includes/NewsletterManageTable.php M includes/SpecialNewsletterManage.php 3 files changed, 132 insertions(+), 131 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index ccc4698..96fb84f 100644 --- a/extension.json +++ b/extension.json @@ -35,7 +35,7 @@ NewsletterTablePager: includes/SpecialNewsletters.php, ApiNewsletter: includes/ApiNewsletter.php, ApiNewsletterManage: includes/ApiNewsletterManage.php, - NewsletterManageTable: includes/SpecialNewsletterManage.php + NewsletterManageTable: includes/NewsletterManageTable.php }, ResourceModules: { ext.newsletter: { diff --git a/includes/NewsletterManageTable.php b/includes/NewsletterManageTable.php new file mode 100644 index 000..05b1607 --- /dev/null +++ b/includes/NewsletterManageTable.php @@ -0,0 +1,131 @@ +?php + +class NewsletterManageTable extends TablePager { + + public static $newsletterOwners = array(); + + public function getFieldNames() { + $header = null; + if ( is_null( $header ) ) { + $header = array(); + foreach ( SpecialNewsletterManage::$fields as $key = $value ) { + $header[$key] = $this-msg( newsletter-manage-header-$value )-text(); + } + } + + return $header; + + } + + public function getQueryInfo() { + $info = array( + 'tables' = array( 'nl_publishers' ), + 'fields' = array( + 'newsletter_id', + 'publisher_id', + ), + ); + + // get user ids of all newsletter owners + $dbr = wfGetDB( DB_SLAVE ); + $res = $dbr-select( + 'nl_newsletters', + array( 'nl_owner_id', 'nl_id' ), + array(), + __METHOD__, + array( 'DISTINCT' ) + ); + foreach ( $res as $row ) { + self::$newsletterOwners[$row-nl_id] = $row-nl_owner_id; + } + + return $info; + } + + public function formatValue( $field, $value ) { + static $previous; + + switch ( $field ) { + case 'newsletter_id': + if ( $previous === $value ) { + + return null; + } else { + $dbr = wfGetDB( DB_SLAVE ); + $res = $dbr-select( + 'nl_newsletters', + array( 'nl_name' ), + array( 'nl_id' = $value ), + __METHOD__, + array() + ); + $newsletterName = null; + foreach ( $res as $row ) { + $newsletterName = $row-nl_name; + } + $previous = $value; + + return $newsletterName; + } + case 'publisher_id' : + $user = User::newFromId( $value ); + + return $user-getName(); + case 'permissions' : + $radioOwner = HTML::element( + 'input', + array( + 'type' = 'checkbox', + 'disabled' = 'true', + 'id' = 'newslettermanage', + 'checked' = self::$newsletterOwners[$this-mCurrentRow-newsletter_id] + === $this-mCurrentRow-publisher_id ? true : false, + ) + ) . $this-msg( 'newsletter-owner-radiobutton-label' ); + +
[MediaWiki-commits] [Gerrit] Move NewsletterTablePager class to own file - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Move NewsletterTablePager class to own file .. Move NewsletterTablePager class to own file Change-Id: I57bad95009583bd910a740827883ad678f6bc3c5 --- M extension.json A includes/NewsletterTablePager.php M includes/SpecialNewsletters.php 3 files changed, 109 insertions(+), 108 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 96fb84f..0bc8d59 100644 --- a/extension.json +++ b/extension.json @@ -32,7 +32,7 @@ SpecialNewsletterManage: includes/SpecialNewsletterManage.php, SpecialNewsletters: includes/SpecialNewsletters.php, EchoNewsletterFormatter: includes/EchoNewsletterFormatter.php, - NewsletterTablePager: includes/SpecialNewsletters.php, + NewsletterTablePager: includes/NewsletterTablePager.php, ApiNewsletter: includes/ApiNewsletter.php, ApiNewsletterManage: includes/ApiNewsletterManage.php, NewsletterManageTable: includes/NewsletterManageTable.php diff --git a/includes/NewsletterTablePager.php b/includes/NewsletterTablePager.php new file mode 100644 index 000..6dd10ed --- /dev/null +++ b/includes/NewsletterTablePager.php @@ -0,0 +1,108 @@ +?php + +class NewsletterTablePager extends TablePager { + + public function getFieldNames() { + static $headers = null; + if ( is_null( $headers ) ) { + $headers = array(); + foreach ( SpecialNewsletters::$fields as $field = $property ) { + $headers[$field] = $this-msg( newsletter-header-$property )-text(); + } + } + + return $headers; + } + + public function getQueryInfo() { + $info = array( + 'tables' = array( 'nl_newsletters' ), + 'fields' = array( + 'nl_name', + 'nl_desc', + 'nl_id', + ), + ); + + return $info; + } + + public function formatValue( $field, $value ) { + switch ( $field ) { + case 'nl_name': + $dbr = wfGetDB( DB_SLAVE ); + $res = $dbr-select( + 'nl_newsletters', + array( 'nl_main_page_id' ), + array( 'nl_name' = $value ), + __METHOD__ + ); + + $mainPageId = ''; + foreach ( $res as $row ) { + $mainPageId = $row-nl_main_page_id; + } + + $url = $mainPageId ? Title::newFromID( $mainPageId )-getFullURL() : #; + + return 'a href=' . $url . '' . $value . '/a'; + case 'nl_desc': + return $value; + case 'subscriber_count': + return HTML::element( + 'input', + array( + 'type' = 'textbox', + 'readonly' = 'true', + 'id' = 'newsletter-' . $this-mCurrentRow-nl_id, + 'value' = in_array( + $this-mCurrentRow-nl_id, + SpecialNewsletters::$allSubscribedNewsletterId + ) ? + SpecialNewsletters::$subscriberCount[$this-mCurrentRow-nl_id] : 0, + + ) + ); + case 'action' : + $radioSubscribe = Html::element( + 'input', + array( + 'type' = 'radio', + 'name' = 'nl_id-' . $this-mCurrentRow-nl_id, + 'value' = 'subscribe', + 'checked' = in_array( + $this-mCurrentRow-nl_id, +
[MediaWiki-commits] [Gerrit] Install wmf salt version rather than setting up the upstream... - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Install wmf salt version rather than setting up the upstream repo. .. Install wmf salt version rather than setting up the upstream repo. The current state of this messes with any kind of WMF upgrade or installing the salt master. Bug: T110032 Change-Id: I1e659e5595e6e1854c76d9ad454c4fc54bdddb7b --- M modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved Filippo Giunchedi: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml b/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml index dc60b6a..68f85e9 100644 --- a/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml +++ b/modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml @@ -34,6 +34,7 @@ - jfsutils - xfsprogs - screen +- salt-minion - gdb - iperf - htop @@ -100,8 +101,6 @@ metadata_sources: ConfigDrive puppet: assets: /etc/bootstrap-vz/puppet - salt: -install_source: stable file_copy: files: - -- To view, visit https://gerrit.wikimedia.org/r/233403 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e659e5595e6e1854c76d9ad454c4fc54bdddb7b Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove colons from @var tags and improve wording in ChangeDi... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove colons from @var tags and improve wording in ChangeDispatcher .. Remove colons from @var tags and improve wording in ChangeDispatcher This is a direct follow up to I0de975a. Change-Id: Idfd24f779a556e7e84dc3c73fe2ff0a6e76a2450 --- M repo/includes/ChangeDispatcher.php M repo/includes/Notifications/JobQueueChangeNotificationSender.php M repo/includes/store/sql/SqlChangeDispatchCoordinator.php M repo/maintenance/dispatchChanges.php 4 files changed, 24 insertions(+), 23 deletions(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/ChangeDispatcher.php b/repo/includes/ChangeDispatcher.php index 29bb0d6..ea03628 100644 --- a/repo/includes/ChangeDispatcher.php +++ b/repo/includes/ChangeDispatcher.php @@ -26,23 +26,23 @@ class ChangeDispatcher { /** -* @var int: the number of changes to pass to a client wiki at once. +* @var int The number of changes to pass to a client wiki at once. */ private $batchSize = 1000; /** -* @var int: factor used to compute the number of changes to load from the changes table at once +* @var int Factor used to compute the number of changes to load from the changes table at once * based on $this-batchSize. */ private $batchChunkFactor = 3; /** -* @var int: max chunks / passes per wiki when selecting pending changes. +* @var int Maximum number of chunks or passes per wiki when selecting pending changes. */ private $maxChunks = 15; /** -* @var bool: whether output should be verbose. +* @var bool Whether output should be verbose. */ private $verbose = false; @@ -100,14 +100,14 @@ } /** -* @return boolean +* @return bool */ public function isVerbose() { return $this-verbose; } /** -* @param boolean $verbose +* @param bool $verbose */ public function setVerbose( $verbose ) { $this-verbose = $verbose; @@ -163,14 +163,15 @@ } /** -* @param int $maxChunks Max number of chunks / passes per wiki when selecting pending changes. +* @param int $maxChunks Maximum number of chunks or passes per wiki when selecting pending +* changes. */ public function setMaxChunks( $maxChunks ) { $this-maxChunks = $maxChunks; } /** -* @return int +* @return int Maximum number of chunks or passes per wiki when selecting pending changes. */ public function getMaxChunks() { return $this-maxChunks; diff --git a/repo/includes/Notifications/JobQueueChangeNotificationSender.php b/repo/includes/Notifications/JobQueueChangeNotificationSender.php index 3b6c34a..0cf55db 100644 --- a/repo/includes/Notifications/JobQueueChangeNotificationSender.php +++ b/repo/includes/Notifications/JobQueueChangeNotificationSender.php @@ -22,13 +22,13 @@ private $repoDB; /** -* @var array +* @var string[] Mapping of site IDs to database names. */ private $wikiDBNames; /** * @param string $repoDB -* @param array $wikiDBNames An associative array mapping site IDs to logical DB names. +* @param string[] $wikiDBNames An associative array mapping site IDs to logical database names. */ public function __construct( $repoDB, array $wikiDBNames = array() ) { $this-repoDB = $repoDB; diff --git a/repo/includes/store/sql/SqlChangeDispatchCoordinator.php b/repo/includes/store/sql/SqlChangeDispatchCoordinator.php index dc2c09f..52af1ba 100644 --- a/repo/includes/store/sql/SqlChangeDispatchCoordinator.php +++ b/repo/includes/store/sql/SqlChangeDispatchCoordinator.php @@ -46,25 +46,25 @@ private $isClientLockUsedOverride = null; /** -* @var int: the number of changes to pass to a client wiki at once. +* @var int The number of changes to pass to a client wiki at once. */ private $batchSize = 1000; /** -* @var int: Number of seconds to wait before dispatching to the same wiki again. +* @var int Number of seconds to wait before dispatching to the same wiki again. * This affects the effective batch size, and this influences how changes * can be coalesced. */ private $dispatchInterval = 60; /** -* @var int: Number of seconds to wait before testing a lock. Any target with a lock +* @var int Number of seconds to wait before testing a lock. Any target with a lock * timestamp newer than this
[MediaWiki-commits] [Gerrit] Enable base::firewall for swift storage in codfw - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/234264 Change subject: Enable base::firewall for swift storage in codfw .. Enable base::firewall for swift storage in codfw Change-Id: I709bd3f58d58f8634d5cec09bd69d218d3b132fd --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/64/234264/1 diff --git a/manifests/site.pp b/manifests/site.pp index 8d3fb69..60fc440 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1809,6 +1809,7 @@ node /^ms-be20[0-9][0-9]\.codfw\.wmnet$/ { role swift::storage +include base::firewall } # mw1001-1016 are jobrunners -- To view, visit https://gerrit.wikimedia.org/r/234264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I709bd3f58d58f8634d5cec09bd69d218d3b132fd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add space between classes in HTMLButtonField - change (mediawiki/core)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/234277 Change subject: Add space between classes in HTMLButtonField .. Add space between classes in HTMLButtonField Classes such as 'wb-input-buttonmw-ui-button' were being generated when $wgUseMediaWikiUIEverywhere = true, see: https://integration.wikimedia.org/ci/job/mwext-Wikibase-repo-tests-mysql-hhvm/4217/console Change-Id: If40b712ffb8e31d27380bf481333eecb7b95f9de --- M includes/htmlform/HTMLButtonField.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/77/234277/1 diff --git a/includes/htmlform/HTMLButtonField.php b/includes/htmlform/HTMLButtonField.php index b0b08a6..56a23ad 100644 --- a/includes/htmlform/HTMLButtonField.php +++ b/includes/htmlform/HTMLButtonField.php @@ -28,7 +28,7 @@ ) { $prefix = 'mw-ui-'; // add mw-ui-button separately, so the descriptor doesn't need to set it - $flags .= $prefix.'button'; + $flags .= ' ' . $prefix.'button'; } foreach ( $this-mFlags as $flag ) { $flags .= ' ' . $prefix . $flag; -- To view, visit https://gerrit.wikimedia.org/r/234277 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If40b712ffb8e31d27380bf481333eecb7b95f9de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ricordisamoa ricordisa...@openmailbox.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly set tablesUsed in test - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Correctly set tablesUsed in test .. Correctly set tablesUsed in test Change-Id: If9eaba92fe412469fc76afab3a2e72d9d4d7a270 --- M tests/ApiNewsletterTest.php 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/ApiNewsletterTest.php b/tests/ApiNewsletterTest.php index 15b848a..e394628 100644 --- a/tests/ApiNewsletterTest.php +++ b/tests/ApiNewsletterTest.php @@ -11,6 +11,13 @@ */ class ApiNewsletterTest extends ApiTestCase { + public function __construct( $name = null, array $data = array(), $dataName = '' ) { + parent::__construct( $name, $data, $dataName ); + + $this-tablesUsed[] = 'nl_newsletters'; + $this-tablesUsed[] = 'nl_subscriptions'; + } + protected function setUp() { parent::setUp(); $dbw = wfGetDB( DB_MASTER ); @@ -26,7 +33,6 @@ 'nl_owner_id' = $user-getId(), ); $dbw-insert( 'nl_newsletters', $rowData, __METHOD__ ); - $this-tablesUsed = array( 'nl_newsletters' ); } protected function getNewsletterId() { -- To view, visit https://gerrit.wikimedia.org/r/234128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9eaba92fe412469fc76afab3a2e72d9d4d7a270 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add secondary indexes and some minor issues with database - change (mediawiki...Newsletter)
Tinaj1234 has uploaded a new change for review. https://gerrit.wikimedia.org/r/234281 Change subject: Add secondary indexes and some minor issues with database .. Add secondary indexes and some minor issues with database Change-Id: I8c58d99ed1ec1f8be47b6d0acf22562652181e5f --- M sql/nl_newsletters.sql M sql/nl_publishers.sql 2 files changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/81/234281/1 diff --git a/sql/nl_newsletters.sql b/sql/nl_newsletters.sql index 257b0c4..8441921 100644 --- a/sql/nl_newsletters.sql +++ b/sql/nl_newsletters.sql @@ -3,9 +3,12 @@ CREATE TABLE /*_*/nl_newsletters( --Primary key nl_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, - nl_name VARCHAR (50) NOT NULL UNIQUE, - nl_desc VARCHAR (256), + nl_name varchar(50) NOT NULL UNIQUE, + nl_desc varbinary(767), nl_main_page_id int NOT NULL, - nl_frequency VARCHAR (50) NOT NULL, + nl_frequency varchar(50) NOT NULL, nl_owner_id int NOT NULL -)/*$wgDBTableOptions*/; \ No newline at end of file +)/*$wgDBTableOptions*/; + +CREATE INDEX /*i*/nl_id ON /*_*/nl_newsletters(nl_name); +CREATE INDEX /*i*/nl_owner_id ON /*_*/nl_newsletters(nl_owner_id); \ No newline at end of file diff --git a/sql/nl_publishers.sql b/sql/nl_publishers.sql index 2c5cef0..d6cef4b 100644 --- a/sql/nl_publishers.sql +++ b/sql/nl_publishers.sql @@ -4,5 +4,5 @@ --Primary key newsletter_id int REFERENCES nl_newsletter(nl_id), publisher_id int NOT NULL, - PRIMARY KEY (newsletter_id, publisher_id) + PRIMARY KEY (publisher_id, newsletter_id) )/*$wgDBTableOptions*/; -- To view, visit https://gerrit.wikimedia.org/r/234281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c58d99ed1ec1f8be47b6d0acf22562652181e5f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Tinaj1234 tinajohnson.1...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add concepturi field to wbsearchentities API results - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add concepturi field to wbsearchentities API results .. Add concepturi field to wbsearchentities API results Currently needed for the unit suggester, but probably useful in many other use cases. Bug: T110348 Change-Id: I6b305800b74e7fda6c687196abb7c4ce7f12e2f9 --- M repo/includes/api/SearchEntities.php M repo/tests/phpunit/includes/api/SearchEntitiesTest.php 2 files changed, 18 insertions(+), 3 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, but someone else must approve Daniel Kinzler: Looks good to me, approved Addshore: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/repo/includes/api/SearchEntities.php b/repo/includes/api/SearchEntities.php index 9f5236c..9bc83ea 100644 --- a/repo/includes/api/SearchEntities.php +++ b/repo/includes/api/SearchEntities.php @@ -69,6 +69,11 @@ private $entityTypes; /** +* @var string +*/ + private $conceptBaseUri; + + /** * @param ApiMain $mainModule * @param string $moduleName * @param string $modulePrefix @@ -90,7 +95,8 @@ $repo-getTermLookup(), $repo-getLanguageFallbackChainFactory() -newFromLanguageCode( $this-getLanguage()-getCode() ) - ) + ), + $repo-getSettings()-getSetting( 'conceptBaseUri' ) ); } @@ -104,6 +110,7 @@ * @param TermIndexSearchInteractor $termIndexSearchInteractor * @param TermIndex $termIndex * @param LabelDescriptionLookup $labelDescriptionLookup +* @param string $conceptBaseUri */ public function setServices( EntityTitleLookup $titleLookup, @@ -112,7 +119,8 @@ ContentLanguages $termLanguages, TermIndexSearchInteractor $termIndexSearchInteractor, TermIndex $termIndex, - LabelDescriptionLookup $labelDescriptionLookup + LabelDescriptionLookup $labelDescriptionLookup, + $conceptBaseUri ) { $this-titleLookup = $titleLookup; $this-idParser = $idParser; @@ -121,6 +129,7 @@ $this-termIndexSearchInteractor = $termIndexSearchInteractor; $this-termIndex = $termIndex; $this-labelDescriptionLookup = $labelDescriptionLookup; + $this-conceptBaseUri = $conceptBaseUri; } /** @@ -175,6 +184,7 @@ $title = $this-titleLookup-getTitleForId( $match-getEntityId() ); $entry = array(); $entry['id'] = $match-getEntityId()-getSerialization(); + $entry['concepturi'] = $this-conceptBaseUri . $match-getEntityId()-getSerialization(); $entry['url'] = $title-getFullUrl(); $entry['title'] = $title-getPrefixedText(); $entry['pageid'] = $title-getArticleID(); diff --git a/repo/tests/phpunit/includes/api/SearchEntitiesTest.php b/repo/tests/phpunit/includes/api/SearchEntitiesTest.php index 27e8230..5a72504 100644 --- a/repo/tests/phpunit/includes/api/SearchEntitiesTest.php +++ b/repo/tests/phpunit/includes/api/SearchEntitiesTest.php @@ -170,7 +170,8 @@ $this-getMockContentLanguages(), $searchInteractor, $this-getMockTermIndex(), - $this-getMockLabelDescriptionLookup() + $this-getMockLabelDescriptionLookup(), + 'concept:' ); $module-execute(); @@ -230,6 +231,7 @@ ); $q222Result = array( 'id' = 'Q222', + 'concepturi' = 'concept:Q222', 'url' = 'http://fullTitleUrl', 'title' = 'Prefixed:Title', 'pageid' = 42, @@ -244,6 +246,7 @@ ); $q333Result = array( 'id' = 'Q333', + 'concepturi' = 'concept:Q333', 'url' = 'http://fullTitleUrl', 'title' = 'Prefixed:Title', 'pageid' = 42, @@ -267,6 +270,7 @@ array( array( 'id' = 'Q111', + 'concepturi' = 'concept:Q111', 'url' = 'http://fullTitleUrl', 'title' = 'Prefixed:Title', 'pageid' =
[MediaWiki-commits] [Gerrit] Remove TalkpageManager::isTalkpageOccupied - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Remove TalkpageManager::isTalkpageOccupied .. Remove TalkpageManager::isTalkpageOccupied Also removed ContentHandlerDefaultModelFor hook. isTalkpageOccupied was mostly duplicating the existing functionality already now that we're no longer using $wgFlowOccupy* globals but $wgNamespaceContentModels. The additional check against redirects in there didn't matter because redirects are wikitext content model anyway. Meanwhile also removed msg flow-talk-taken-over, which is no longer used (it was the content of the new revision before we started properly doing it the content-model way) Bug: T105574 Change-Id: I344769c1fe7616218a518ded02e8aa9537a0ebce --- M Flow.php M Hooks.php M autoload.php M i18n/en.json M i18n/qqq.json M includes/Actions/Action.php M includes/Api/ApiFlow.php M includes/Api/ApiFlowBase.php M includes/Api/ApiFlowSearch.php M includes/Api/ApiQueryPropFlowInfo.php M includes/Content/BoardContentHandler.php M includes/Specials/SpecialEnableFlow.php M includes/TalkpageManager.php M tests/phpunit/Formatter/FormatterTest.php D tests/phpunit/TalkpageManagerTest.php 15 files changed, 36 insertions(+), 216 deletions(-) Approvals: Sbisson: Looks good to me, approved jenkins-bot: Verified diff --git a/Flow.php b/Flow.php index efe41b3..115bb13 100644 --- a/Flow.php +++ b/Flow.php @@ -130,7 +130,6 @@ $wgHooks['IRCLineURL'][] = 'FlowHooks::onIRCLineURL'; $wgHooks['WhatLinksHereProps'][] = 'FlowHooks::onWhatLinksHereProps'; $wgHooks['ResourceLoaderTestModules'][] = 'FlowHooks::onResourceLoaderTestModules'; -$wgHooks['ContentHandlerDefaultModelFor'][] = 'FlowHooks::onContentHandlerDefaultModelFor'; $wgHooks['ShowMissingArticle'][] = 'FlowHooks::onShowMissingArticle'; $wgHooks['MessageCache::get'][] = 'FlowHooks::onMessageCacheGet'; $wgHooks['WatchArticle'][] = 'FlowHooks::onWatchArticle'; diff --git a/Hooks.php b/Hooks.php index f831f77..93dec08 100644 --- a/Hooks.php +++ b/Hooks.php @@ -539,7 +539,7 @@ $title = $template-getTitle(); // if Flow is enabled on this talk page, overrule talk page red link - if ( self::$occupationController-isTalkpageOccupied( $title ) ) { + if ( $title-getContentModel() === CONTENT_MODEL_FLOW_BOARD ) { // Turn off page actions in MobileFrontend. // FIXME: Find more elegant standard way of doing this. $wgMFPageActions = array(); @@ -588,13 +588,13 @@ public static function onSkinMinervaDefaultModules( Skin $skin, array $modules ) { // Disable toggling on occupied talk pages in mobile $title = $skin-getTitle(); - if ( self::$occupationController-isTalkpageOccupied( $title ) ) { + if ( $title-getContentModel() === CONTENT_MODEL_FLOW_BOARD ) { $modules['toggling'] = array(); } // Turn off default mobile talk overlay for these pages if ( $title-canTalk() ) { $talkPage = $title-getTalkPage(); - if ( self::$occupationController-isTalkpageOccupied( $talkPage ) ) { + if ( $talkPage-getContentModel() === CONTENT_MODEL_FLOW_BOARD ) { // TODO: Insert lightweight JavaScript that opens flow via ajax $modules['talk'] = array(); } @@ -875,7 +875,7 @@ * @return bool false to abort email notification */ public static function onAbortEmailNotification( $editor, $title ) { - if ( self::$occupationController-isTalkpageOccupied( $title ) ) { + if ( $title-getContentModel() === CONTENT_MODEL_FLOW_BOARD ) { // Since we are aborting the notification we need to manually update the watchlist EmailNotification::updateWatchlistTimestamp( $editor, $title, wfTimestampNow() ); @@ -946,7 +946,7 @@ public static function onInfoAction( IContextSource $ctx, $pageinfo ) { - if ( !self::$occupationController-isTalkpageOccupied( $ctx-getTitle() ) ) { + if ( $ctx-getTitle()-getContentModel() !== CONTENT_MODEL_FLOW_BOARD ) { return true; } @@ -1194,14 +1194,15 @@ return false; } + // valid if the destination is already a valid flow location (=default flow-board model) + if ( ContentHandler::getDefaultModelFor( $newTitle ) === CONTENT_MODEL_FLOW_BOARD ) { + return true; + } + + // valid if the user has permissions to create a new board wherever $occupationController = self::getOccupationController(); -
[MediaWiki-commits] [Gerrit] Revert Switch the nic for labnet1001 install. - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Revert Switch the nic for labnet1001 install. .. Revert Switch the nic for labnet1001 install. Turns out the 10g doesn't support PXE, so this will have to be done another way. This reverts commit 478d98c48abd454f231ff9a5c1760c4dc74713df. Change-Id: I33b101d086ce34a95865d5402ea92364bdcb05b5 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 96ed318..728a421 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2450,7 +2450,7 @@ } host labnet1001 { - hardware ethernet 00:0A:F7:50:42:28; + hardware ethernet d4:be:d9:af:66:ba; fixed-address labnet1001.eqiad.wmnet; } -- To view, visit https://gerrit.wikimedia.org/r/234263 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I33b101d086ce34a95865d5402ea92364bdcb05b5 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable base::firewall for swift storage in codfw - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: Enable base::firewall for swift storage in codfw .. Enable base::firewall for swift storage in codfw Change-Id: I709bd3f58d58f8634d5cec09bd69d218d3b132fd --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 8d3fb69..60fc440 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1809,6 +1809,7 @@ node /^ms-be20[0-9][0-9]\.codfw\.wmnet$/ { role swift::storage +include base::firewall } # mw1001-1016 are jobrunners -- To view, visit https://gerrit.wikimedia.org/r/234264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I709bd3f58d58f8634d5cec09bd69d218d3b132fd Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] gdash: fix parser cache metrics - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: gdash: fix parser cache metrics .. gdash: fix parser cache metrics The MediaWiki parser cache related metrics have been moved up: - MediaWiki.stats.pcache_* + MediaWiki.pcache_* Fix https://gdash.wikimedia.org/dashboards/pcache/ Change-Id: Ieecc644e0d27b8ff762343131452db232ad1ff45 --- M files/gdash/dashboards/pcache/p1.graph M files/gdash/dashboards/pcache/p2.0.graph M files/gdash/dashboards/pcache/p2.1.graph 3 files changed, 12 insertions(+), 12 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/files/gdash/dashboards/pcache/p1.graph b/files/gdash/dashboards/pcache/p1.graph index ac728de..fe4355b 100644 --- a/files/gdash/dashboards/pcache/p1.graph +++ b/files/gdash/dashboards/pcache/p1.graph @@ -8,16 +8,16 @@ field :hit, :color = green, :alias = none, - :data = 'cactiStyle(alias(asPercent(MediaWiki.stats.pcache_hit.count,sumSeries(MediaWiki.stats.pcache_[hm]*.count)),Hit))' + :data = 'cactiStyle(alias(asPercent(MediaWiki.pcache_hit.count,sumSeries(MediaWiki.pcache_[hm]*.count)),Hit))' field :absent, :color = blue, :alias = none, - :data = 'cactiStyle(alias(asPercent(MediaWiki.stats.pcache_miss_absent.count,sumSeries(MediaWiki.stats.pcache_[hm]*.count)),Miss (absent)))' + :data = 'cactiStyle(alias(asPercent(MediaWiki.pcache_miss_absent.count,sumSeries(MediaWiki.pcache_[hm]*.count)),Miss (absent)))' field :expired, :color = red, :alias = none, - :data = 'cactiStyle(alias(asPercent(MediaWiki.stats.pcache_miss_expired.count,sumSeries(MediaWiki.stats.pcache_[hm]*.count)),Miss (expire)))' + :data = 'cactiStyle(alias(asPercent(MediaWiki.pcache_miss_expired.count,sumSeries(MediaWiki.pcache_[hm]*.count)),Miss (expire)))' field :stub, :color = orange, :alias = none, - :data = 'cactiStyle(alias(asPercent(MediaWiki.stats.pcache_miss_stub.count,sumSeries(MediaWiki.stats.pcache_[hm]*.count)),Miss (stub)))' + :data = 'cactiStyle(alias(asPercent(MediaWiki.pcache_miss_stub.count,sumSeries(MediaWiki.pcache_[hm]*.count)),Miss (stub)))' diff --git a/files/gdash/dashboards/pcache/p2.0.graph b/files/gdash/dashboards/pcache/p2.0.graph index 8889fc3..a15a8f5 100644 --- a/files/gdash/dashboards/pcache/p2.0.graph +++ b/files/gdash/dashboards/pcache/p2.0.graph @@ -8,16 +8,16 @@ field :hit, :color = green, :alias = none, - :data = 'cactiStyle(alias(asPercent(MediaWiki.stats.pcache_hit.count,sumSeries(MediaWiki.stats.pcache_[hm]*.count)),Hit))' + :data = 'cactiStyle(alias(asPercent(MediaWiki.pcache_hit.count,sumSeries(MediaWiki.pcache_[hm]*.count)),Hit))' field :absent, :color = blue, :alias = none, - :data = 'cactiStyle(alias(asPercent(MediaWiki.stats.pcache_miss_absent.count,sumSeries(MediaWiki.stats.pcache_[hm]*.count)),Miss (absent)))' + :data = 'cactiStyle(alias(asPercent(MediaWiki.pcache_miss_absent.count,sumSeries(MediaWiki.pcache_[hm]*.count)),Miss (absent)))' field :expired, :color = red, :alias = none, - :data = 'cactiStyle(alias(asPercent(MediaWiki.stats.pcache_miss_expired.count,sumSeries(MediaWiki.stats.pcache_[hm]*.count)),Miss (expire)))' + :data = 'cactiStyle(alias(asPercent(MediaWiki.pcache_miss_expired.count,sumSeries(MediaWiki.pcache_[hm]*.count)),Miss (expire)))' field :stub, :color = orange, :alias = none, - :data = 'cactiStyle(alias(asPercent(MediaWiki.stats.pcache_miss_stub.count,sumSeries(MediaWiki.stats.pcache_[hm]*.count)),Miss (stub)))' + :data = 'cactiStyle(alias(asPercent(MediaWiki.pcache_miss_stub.count,sumSeries(MediaWiki.pcache_[hm]*.count)),Miss (stub)))' diff --git a/files/gdash/dashboards/pcache/p2.1.graph b/files/gdash/dashboards/pcache/p2.1.graph index 90afeb8..c7f7cba 100644 --- a/files/gdash/dashboards/pcache/p2.1.graph +++ b/files/gdash/dashboards/pcache/p2.1.graph @@ -8,16 +8,16 @@ field :hit, :color = green, :alias = none, - :data = 'cactiStyle(alias(asPercent(MediaWiki.stats.pcache_hit.count,sumSeries(MediaWiki.stats.pcache_[hm]*.count)),Hit))' + :data = 'cactiStyle(alias(asPercent(MediaWiki.pcache_hit.count,sumSeries(MediaWiki.pcache_[hm]*.count)),Hit))' field :absent, :color = blue, :alias = none, - :data = 'cactiStyle(alias(asPercent(MediaWiki.stats.pcache_miss_absent.count,sumSeries(MediaWiki.stats.pcache_[hm]*.count)),Miss (absent)))' + :data = 'cactiStyle(alias(asPercent(MediaWiki.pcache_miss_absent.count,sumSeries(MediaWiki.pcache_[hm]*.count)),Miss (absent)))'
[MediaWiki-commits] [Gerrit] Test - change (mediawiki...MobileFrontend)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/234275 Change subject: Test .. Test Change-Id: I390627cbbef0134a97f50bc7c8721b378024fae7 --- M Gruntfile.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/75/234275/1 diff --git a/Gruntfile.js b/Gruntfile.js index 8b0cbb6..9aa7416 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -5,6 +5,7 @@ */ /*jshint node:true, strict:false*/ + module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-mkdir' ); grunt.loadNpmTasks( 'grunt-contrib-jshint' ); -- To view, visit https://gerrit.wikimedia.org/r/234275 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I390627cbbef0134a97f50bc7c8721b378024fae7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Phuedx g...@samsmith.io ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only show 'insert' button in annotation inspector when conte... - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/234279 Change subject: Only show 'insert' button in annotation inspector when content is to be inserted .. Only show 'insert' button in annotation inspector when content is to be inserted Currently 'insert' means that a new annotation will be applied, which is a little confusing. Everywhere else 'insert' means insert new contenst. Just use 'done' unless new text is actually going to be inserted (i.e. the inspector was opened on a collapsed selection). Change-Id: I0ad81f565b585def4687437b317a15a75371b257 --- M src/ui/inspectors/ve.ui.AnnotationInspector.js 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/79/234279/1 diff --git a/src/ui/inspectors/ve.ui.AnnotationInspector.js b/src/ui/inspectors/ve.ui.AnnotationInspector.js index 9104254..5a7ba20 100644 --- a/src/ui/inspectors/ve.ui.AnnotationInspector.js +++ b/src/ui/inspectors/ve.ui.AnnotationInspector.js @@ -145,10 +145,8 @@ * @inheritdoc */ ve.ui.AnnotationInspector.prototype.getMode = function () { - if ( this.fragment ) { - // Trim the fragment before getting selected models to match the behavior of - // #getSetupProcess - return this.fragment.trimLinearSelection().getSelectedModels().length ? 'edit' : 'insert'; + if ( this.initialSelection ) { + return this.initialSelection.isCollapsed() ? 'insert' : 'edit'; } return ''; }; -- To view, visit https://gerrit.wikimedia.org/r/234279 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ad81f565b585def4687437b317a15a75371b257 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Users must be logged in to use the API - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Users must be logged in to use the API .. Users must be logged in to use the API This is already the case for special pages although we may want Special:Newsletters to be visible to some degree by anon users Change-Id: I31f30a41f8a3cd929d163299cd42845fccfeb1ae --- M includes/ApiNewsletter.php M includes/ApiNewsletterManage.php 2 files changed, 14 insertions(+), 2 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ApiNewsletter.php b/includes/ApiNewsletter.php index e903f46..81d4233 100644 --- a/includes/ApiNewsletter.php +++ b/includes/ApiNewsletter.php @@ -3,11 +3,17 @@ class ApiNewsletter extends ApiBase { public function execute() { + + $user = $this-getUser(); + if ( !$user-isLoggedIn() ) { + $this-dieUsage( 'You must be logged-in to interact with newsletters', 'notloggedin' ); + } + $dbw = wfGetDB( DB_MASTER ); if ( $this-getMain()-getVal( 'todo' ) === 'subscribe' ) { $rowData = array( 'newsletter_id' = $this-getMain()-getVal( 'newsletterId' ), - 'subscriber_id' = $this-getUser()-getId(), + 'subscriber_id' = $user-getId(), ); $dbw-insert( 'nl_subscriptions', $rowData, __METHOD__ ); } @@ -15,7 +21,7 @@ if ( $this-getMain()-getVal( 'todo' ) === 'unsubscribe' ) { $rowData = array( 'newsletter_id' = $this-getMain()-getVal( 'newsletterId' ), - 'subscriber_id' = $this-getUser()-getId(), + 'subscriber_id' = $user-getId(), ); $dbw-delete( 'nl_subscriptions', $rowData, __METHOD__ ); } diff --git a/includes/ApiNewsletterManage.php b/includes/ApiNewsletterManage.php index 882ef78..d92239c 100644 --- a/includes/ApiNewsletterManage.php +++ b/includes/ApiNewsletterManage.php @@ -6,6 +6,12 @@ class ApiNewsletterManage extends ApiBase { public function execute() { + + $user = $this-getUser(); + if ( !$user-isLoggedIn() ) { + $this-dieUsage( 'You must be logged-in to interact with newsletters', 'notloggedin' ); + } + $dbw = wfGetDB( DB_MASTER ); if ( $this-getMain()-getVal( 'todo' ) === 'removepublisher' ) { $rowData = array( -- To view, visit https://gerrit.wikimedia.org/r/234131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31f30a41f8a3cd929d163299cd42845fccfeb1ae Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid calling $this-getOutput() on Specials when not needed - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Avoid calling $this-getOutput() on Specials when not needed .. Avoid calling $this-getOutput() on Specials when not needed Change-Id: Ib11566d2f02ffd9d7da481e8c6d9afbd10229a28 --- M includes/SpecialNewsletterManage.php M includes/SpecialNewsletters.php 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SpecialNewsletterManage.php b/includes/SpecialNewsletterManage.php index 4d2ed26..21368e5 100644 --- a/includes/SpecialNewsletterManage.php +++ b/includes/SpecialNewsletterManage.php @@ -19,8 +19,8 @@ public function execute( $par ) { $this-setHeaders(); $output = $this-getOutput(); - $this-getOutput()-addModules( 'ext.newsletter' ); - $this-getOutput()-addModules( 'ext.newslettermanage' ); + $output-addModules( 'ext.newsletter' ); + $output-addModules( 'ext.newslettermanage' ); $this-requireLogin(); $announceIssueArray = $this-getAnnounceFormFields(); diff --git a/includes/SpecialNewsletters.php b/includes/SpecialNewsletters.php index 36fbdcd..365ba65 100644 --- a/includes/SpecialNewsletters.php +++ b/includes/SpecialNewsletters.php @@ -29,12 +29,12 @@ public function execute( $par ) { $this-setHeaders(); $this-requireLogin(); - $out = $this-getOutput(); - $this-getOutput()-addModules( 'ext.newsletter' ); + $output = $this-getOutput(); + $output-addModules( 'ext.newsletter' ); $pager = new NewsletterTablePager(); if ( $pager-getNumRows() 0 ) { - $out-addHTML( + $output-addHTML( $pager-getNavigationBar() . $pager-getBody() . $pager-getNavigationBar() -- To view, visit https://gerrit.wikimedia.org/r/234133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib11566d2f02ffd9d7da481e8c6d9afbd10229a28 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace nbsp in author strings with spaces - change (mediawiki...citoid)
Mvolz has uploaded a new change for review. https://gerrit.wikimedia.org/r/234262 Change subject: Replace nbsp in author strings with spaces .. Replace nbsp in author strings with spaces Some author strings contained nbsp instead of spaces, which caused duplicate authors to be added in some cases. T109431 Change-Id: I3f87b52f021359f6c0a8941a964eca848046bd65 --- M lib/translators/coins.js M test/features/scraping/index.js M test/features/unit/coins.js 3 files changed, 24 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid refs/changes/62/234262/1 diff --git a/lib/translators/coins.js b/lib/translators/coins.js index d0167be..ba6b2e8 100644 --- a/lib/translators/coins.js +++ b/lib/translators/coins.js @@ -69,13 +69,14 @@ firstAuthor = {creatorType: 'author'}; firstAuthor.lastName = metadata.aulast || ''; + firstAuthor.lastName = firstAuthor.lastName.replace(String.fromCharCode(160), ' '); // Replace any nbsp with space if (metadata.ausuffix){ firstAuthor.lastName += ', ' + metadata.ausuffix; } if (metadata.aufirst !== undefined){ - firstAuthor.firstName = metadata.aufirst; + firstAuthor.firstName = metadata.aufirst.replace(String.fromCharCode(160), ' '); // Replace any nbsp with space } else if (metadata.auinit !== undefined) { firstAuthor.firstName = metadata.auinit; } else if (metadata.auinit1 !== undefined) { @@ -94,13 +95,14 @@ creators.push(firstAuthor); } + // Add remaining authors in au field function addAu(){ if (!metadata.au || !Array.isArray(metadata.au)){ return; } for (i = 0; i metadata.au.length; i++) { creatorObj = {creatorType: 'author'}; - authorText = metadata.au[i]; + authorText = metadata.au[i].replace(String.fromCharCode(160), ' '); // Replace any nbsp with space if (!authorText){ return; } diff --git a/test/features/scraping/index.js b/test/features/scraping/index.js index 0c8aab6..288b8e5 100644 --- a/test/features/scraping/index.js +++ b/test/features/scraping/index.js @@ -308,6 +308,7 @@ assert.status(res, 200); assert.checkCitation(res, 'Salaries, Turnover, and Performance in the Federal Criminal Justice System*'); assert.deepEqual(res.body[0].DOI, '10.1086/378695'); + assert.deepEqual(res.body[0].author.length, 1); }); }); diff --git a/test/features/unit/coins.js b/test/features/unit/coins.js index 2b08ee9..8f1376c 100644 --- a/test/features/unit/coins.js +++ b/test/features/unit/coins.js @@ -76,6 +76,25 @@ assert.deepEqual(result, expected); }); + it('Doesn\'t add duplicate author names with nbsp present', function() { + expected = { + creators: [{ + creatorType: 'author', + firstName: 'Firstname', + lastName: 'Lastname, Jr.' + }] + }; + input = { + aulast: 'Lastname', + aufirst: 'Firstname', + ausuffix: 'Jr.', + au: ['Firstname Lastname, Jr.'] // String containing nbsp instead of traditional space + }; + input.au[0] = input.au[0].replace(' ', String.fromCharCode(160)); // Make au string containing nbsp instead of traditional space + result = coins.general.addAuthors({}, input); + assert.deepEqual(result, expected); + }); + it('Correctly adds name with missing firstname', function() { expected = { creators: [{ -- To view, visit https://gerrit.wikimedia.org/r/234262 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f87b52f021359f6c0a8941a964eca848046bd65 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/citoid Gerrit-Branch: master Gerrit-Owner: Mvolz mv...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-enable auto create topics for Kafka - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/234266 Change subject: Re-enable auto create topics for Kafka .. Re-enable auto create topics for Kafka Change-Id: I43fc769551db5ade0355105099bdb9caeef2c3eb --- M manifests/role/analytics/kafka.pp 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/66/234266/1 diff --git a/manifests/role/analytics/kafka.pp b/manifests/role/analytics/kafka.pp index 570d46d..e50c154 100644 --- a/manifests/role/analytics/kafka.pp +++ b/manifests/role/analytics/kafka.pp @@ -146,9 +146,7 @@ nofiles_ulimit = $nofiles_ulimit, # Enable auto creation of topics. -# This will be used for eventlogging-kafka -# (Disable this until we are ready for eventlogging-kafka). -auto_create_topics_enable = false, +auto_create_topics_enable = true, # (Temporarily?) disable auto leader rebalance. # I am having issues with analytics1012, and I can't -- To view, visit https://gerrit.wikimedia.org/r/234266 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43fc769551db5ade0355105099bdb9caeef2c3eb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Require ethtool package for ethtool execs - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/234269 Change subject: Require ethtool package for ethtool execs .. Require ethtool package for ethtool execs This caused some exec failures during initial puppetization of lvs2006 as jessie. Change-Id: Ic04e42c20fc44ddd5322c0d7ba8c77b71dc1e69e --- M modules/interface/manifests/offload.pp M modules/interface/manifests/ring.pp 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/69/234269/1 diff --git a/modules/interface/manifests/offload.pp b/modules/interface/manifests/offload.pp index fb93cc3..67320eb 100644 --- a/modules/interface/manifests/offload.pp +++ b/modules/interface/manifests/offload.pp @@ -28,6 +28,7 @@ exec { ethtool ${interface} -K ${setting} ${value}: path= '/usr/bin:/usr/sbin:/bin:/sbin', command = ethtool -K ${interface} ${setting} ${value}, -unless = test $(ethtool -k ${interface} | awk '/${long_param}:/ { print \$2 }') = '${value}' +unless = test $(ethtool -k ${interface} | awk '/${long_param}:/ { print \$2 }') = '${value}', +require = Package['ethtool'], } } diff --git a/modules/interface/manifests/ring.pp b/modules/interface/manifests/ring.pp index 469c731..f2d597f 100644 --- a/modules/interface/manifests/ring.pp +++ b/modules/interface/manifests/ring.pp @@ -22,5 +22,6 @@ command = ethtool -G ${interface} ${setting} ${value}, subscribe = Augeas[${interface}_${title}], refreshonly = true, +require = Package['ethtool'], } } -- To view, visit https://gerrit.wikimedia.org/r/234269 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic04e42c20fc44ddd5322c0d7ba8c77b71dc1e69e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make ParserOptions fields private - change (mediawiki/core)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/234270 Change subject: Make ParserOptions fields private .. Make ParserOptions fields private Now that Ib58e8020 and Ie644854 are merged, there are no direct accesses to these fields left in core or extensions in Gerrit. So let's make them private to make sure no more get added before we decide whether we're going to eliminate them entirely. Bug: T110269 Change-Id: I82041b88dd0f194716f54d3207649388328805ca --- M RELEASE-NOTES-1.26 M includes/parser/ParserOptions.php 2 files changed, 36 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/70/234270/1 diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26 index fd21c4c..14d6c58 100644 --- a/RELEASE-NOTES-1.26 +++ b/RELEASE-NOTES-1.26 @@ -26,6 +26,7 @@ This experimental feature was never enabled by default and is obsolete as of MediaWiki 1.26, in where ResourceLoader became fully asynchronous. * $wgMasterWaitTimeout was removed (deprecated in 1.24). +* Fields in ParserOptions are now private. Use the accessors instead. === New features in 1.26 === * (T51506) Now action=info gives estimates of actual watchers for a page. diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index ed0d74a..e4c867a 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -34,145 +34,145 @@ /** * Interlanguage links are removed and returned in an array */ - public $mInterwikiMagic; + private $mInterwikiMagic; /** * Allow external images inline? */ - public $mAllowExternalImages; + private $mAllowExternalImages; /** * If not, any exception? */ - public $mAllowExternalImagesFrom; + private $mAllowExternalImagesFrom; /** * If not or it doesn't match, should we check an on-wiki whitelist? */ - public $mEnableImageWhitelist; + private $mEnableImageWhitelist; /** * Date format index */ - public $mDateFormat = null; + private $mDateFormat = null; /** * Create edit section links? */ - public $mEditSection = true; + private $mEditSection = true; /** * Allow inclusion of special pages? */ - public $mAllowSpecialInclusion; + private $mAllowSpecialInclusion; /** * Use tidy to cleanup output HTML? */ - public $mTidy = false; + private $mTidy = false; /** * Which lang to call for PLURAL and GRAMMAR */ - public $mInterfaceMessage = false; + private $mInterfaceMessage = false; /** * Overrides $mInterfaceMessage with arbitrary language */ - public $mTargetLanguage = null; + private $mTargetLanguage = null; /** * Maximum size of template expansions, in bytes */ - public $mMaxIncludeSize; + private $mMaxIncludeSize; /** * Maximum number of nodes touched by PPFrame::expand() */ - public $mMaxPPNodeCount; + private $mMaxPPNodeCount; /** * Maximum number of nodes generated by Preprocessor::preprocessToObj() */ - public $mMaxGeneratedPPNodeCount; + private $mMaxGeneratedPPNodeCount; /** * Maximum recursion depth in PPFrame::expand() */ - public $mMaxPPExpandDepth; + private $mMaxPPExpandDepth; /** * Maximum recursion depth for templates within templates */ - public $mMaxTemplateDepth; + private $mMaxTemplateDepth; /** * Maximum number of calls per parse to expensive parser functions */ - public $mExpensiveParserFunctionLimit; + private $mExpensiveParserFunctionLimit; /** * Remove HTML comments. ONLY APPLIES TO PREPROCESS OPERATIONS */ - public $mRemoveComments = true; + private $mRemoveComments = true; /** * Callback for current revision fetching. Used as first argument to call_user_func(). */ - public $mCurrentRevisionCallback = + private $mCurrentRevisionCallback = array( 'Parser', 'statelessFetchRevision' ); /** * Callback for template fetching. Used as first argument to call_user_func(). */ - public $mTemplateCallback = + private $mTemplateCallback = array( 'Parser', 'statelessFetchTemplate' ); /** * Enable limit report in an HTML comment on output */ - public $mEnableLimitReport = false; + private $mEnableLimitReport = false; /** * Timestamp used for {{CURRENTDAY}} etc. */ -
[MediaWiki-commits] [Gerrit] Enable base::firewall on eqiad storage servers - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: Enable base::firewall on eqiad storage servers .. Enable base::firewall on eqiad storage servers Change-Id: I6c2b0b43cf2aafbf38b4c903e847bbface87e96e --- M manifests/site.pp 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 96923fb..e1250d1 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1770,11 +1770,13 @@ node /^ms-be10(0[0-9]|1[0-5])\.eqiad\.wmnet$/ { role swift::storage +include base::firewall } # HP machines have different disk ordering T90922 node /^ms-be101[678]\.eqiad\.wmnet$/ { role swift::storage +include base::firewall } node /^ms-fe300[1-2]\.esams\.wmnet$/ { -- To view, visit https://gerrit.wikimedia.org/r/234274 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c2b0b43cf2aafbf38b4c903e847bbface87e96e Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make $newsletterOwners non static in MangeTable - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Make $newsletterOwners non static in MangeTable .. Make $newsletterOwners non static in MangeTable This also makes it private, this is only used in this class.. Change-Id: I78de1aafe5f5bf76fa0e7e26b118d4f06a40508e --- M includes/NewsletterManageTable.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/NewsletterManageTable.php b/includes/NewsletterManageTable.php index 05b1607..3726721 100644 --- a/includes/NewsletterManageTable.php +++ b/includes/NewsletterManageTable.php @@ -2,7 +2,7 @@ class NewsletterManageTable extends TablePager { - public static $newsletterOwners = array(); + private $newsletterOwners = array(); public function getFieldNames() { $header = null; @@ -36,7 +36,7 @@ array( 'DISTINCT' ) ); foreach ( $res as $row ) { - self::$newsletterOwners[$row-nl_id] = $row-nl_owner_id; + $this-newsletterOwners[$row-nl_id] = $row-nl_owner_id; } return $info; @@ -78,7 +78,7 @@ 'type' = 'checkbox', 'disabled' = 'true', 'id' = 'newslettermanage', - 'checked' = self::$newsletterOwners[$this-mCurrentRow-newsletter_id] + 'checked' = $this-newsletterOwners[$this-mCurrentRow-newsletter_id] === $this-mCurrentRow-publisher_id ? true : false, ) ) . $this-msg( 'newsletter-owner-radiobutton-label' ); @@ -89,7 +89,7 @@ 'type' = 'checkbox', 'disabled' = 'true', 'id' = 'newslettermanage', - 'checked' = self::$newsletterOwners[$this-mCurrentRow-newsletter_id] + 'checked' = $this-newsletterOwners[$this-mCurrentRow-newsletter_id] === $this-mCurrentRow-publisher_id ? false : true, ) ) . $this-msg( 'newsletter-publisher-radiobutton-label' ); @@ -106,9 +106,9 @@ ) ); - return ( self::$newsletterOwners[$this-mCurrentRow-newsletter_id] !== + return ( $this-newsletterOwners[$this-mCurrentRow-newsletter_id] !== $this-mCurrentRow-publisher_id - self::$newsletterOwners[$this-mCurrentRow-newsletter_id] == + $this-newsletterOwners[$this-mCurrentRow-newsletter_id] == $this-getUser()-getId() ) ? $remButton : ''; } -- To view, visit https://gerrit.wikimedia.org/r/234140 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78de1aafe5f5bf76fa0e7e26b118d4f06a40508e Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] SpecialUserRights: Set the relevant user for the skin if pos... - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/234310 Change subject: SpecialUserRights: Set the relevant user for the skin if possible .. SpecialUserRights: Set the relevant user for the skin if possible Makes the toolbox more useful on Special:UserRights. Change-Id: I5b0275ac26404b82bfe3fded729994530d6131cf --- M includes/specials/SpecialUserrights.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/234310/1 diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 0158fdb..dc2ede1 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -389,6 +389,10 @@ return Status::newFatal( 'nosuchusershort', $username ); } + if ( $user instanceof User ) { + $this-getSkin()-setRelevantUser( $user ); + } + return Status::newGood( $user ); } -- To view, visit https://gerrit.wikimedia.org/r/234310 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b0275ac26404b82bfe3fded729994530d6131cf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed Style/BlockDelimiters RuboCop offense - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed Style/BlockDelimiters RuboCop offense .. Fixed Style/BlockDelimiters RuboCop offense Bug: T106220 Change-Id: If6d61fe57e905fd5678961d782dbdba9bd643fe4 --- M .rubocop_todo.yml M Vagrantfile M lib/labs-vagrant.rb M lib/mediawiki-vagrant/roles/list.rb 4 files changed, 15 insertions(+), 19 deletions(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 0762a50..aea4b4f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -23,12 +23,6 @@ Metrics/LineLength: Max: 129 -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods. -Style/BlockDelimiters: - Enabled: false - # Offense count: 1 Style/CaseEquality: Enabled: false diff --git a/Vagrantfile b/Vagrantfile index 938f49e..5032800 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -118,11 +118,13 @@ config.vm.network :forwarded_port, guest: 80, host: settings[:http_port], id: 'http' -settings[:forward_ports].each { |guest_port,host_port| -config.vm.network :forwarded_port, -:host = host_port, :guest = guest_port, -auto_correct: true -} unless settings[:forward_ports].nil? +unless settings[:forward_ports].nil? +settings[:forward_ports].each do |guest_port,host_port| +config.vm.network :forwarded_port, +:host = host_port, :guest = guest_port, +auto_correct: true +end +end root_share_options = {:id = 'vagrant-root'} diff --git a/lib/labs-vagrant.rb b/lib/labs-vagrant.rb index 03ca12b..893d683 100755 --- a/lib/labs-vagrant.rb +++ b/lib/labs-vagrant.rb @@ -13,14 +13,14 @@ when 'list-roles' puts Available roles:\n\n enabled = @mwv.roles_enabled - roles = @mwv.roles_available.sort.map { |role| + roles = @mwv.roles_available.sort.map do |role| prefix = enabled.include?(role) ? '*' : ' ' #{prefix} #{role} - } + end col, *cols = roles.each_slice((roles.size/3.0).ceil).to_a - col.zip(*cols) { |a,b,c| + col.zip(*cols) do |a,b,c| puts sprintf(%-26s %-26s %-26s, a, b, c) - } + end puts \nRoles marked with '*' are enabled. puts Note that roles enabled by dependency are not marked. puts 'Use labs-vagrant enable-role labs-vagrant disable-role to customize.' diff --git a/lib/mediawiki-vagrant/roles/list.rb b/lib/mediawiki-vagrant/roles/list.rb index e951105..4e34b93 100644 --- a/lib/mediawiki-vagrant/roles/list.rb +++ b/lib/mediawiki-vagrant/roles/list.rb @@ -66,10 +66,10 @@ @env.ui.info Available roles:\n if opts[:verbose] enabled = @mwv.roles_enabled -roles = @mwv.roles_available.sort.map { |role| +roles = @mwv.roles_available.sort.map do |role| prefix = enabled.include?(role) ? '*' : ' ' #{prefix} #{role} -} +end if opts[:single_col] roles.each { |x| @env.ui.info x } @@ -89,9 +89,9 @@ def print_cols(roles) if roles.any? col, *cols = roles.each_slice((roles.size/3.0).ceil).to_a - col.zip(*cols) { |a,b,c| + col.zip(*cols) do |a,b,c| @env.ui.info sprintf(%-26s %-26s %-26s, a, b, c) - } + end end end end -- To view, visit https://gerrit.wikimedia.org/r/233373 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6d61fe57e905fd5678961d782dbdba9bd643fe4 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed RuboCop Style/AndOr offense - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed RuboCop Style/AndOr offense .. Fixed RuboCop Style/AndOr offense Additionally changed expression `not ARGV.empty?` to `ARGV.any?` which is slightly more readable and less prone to confusion over operator precedence. Bug: T106220 Change-Id: I276d60eb1e6155f71d523f22da22329b1678ec3e --- M .rubocop_todo.yml M lib/labs-vagrant.rb M lib/mediawiki-vagrant/paste-puppet.rb 3 files changed, 4 insertions(+), 10 deletions(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 758cf33..0762a50 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -25,12 +25,6 @@ # Offense count: 5 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/AndOr: - Enabled: false - -# Offense count: 5 -# Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods. Style/BlockDelimiters: Enabled: false diff --git a/lib/labs-vagrant.rb b/lib/labs-vagrant.rb index ba0bac2..03ca12b 100755 --- a/lib/labs-vagrant.rb +++ b/lib/labs-vagrant.rb @@ -26,7 +26,7 @@ puts 'Use labs-vagrant enable-role labs-vagrant disable-role to customize.' when 'reset-roles' - if not ARGV.empty? or ['-h', '--help'].include? ARGV.first + if ARGV.any? || ['-h', '--help'].include?(ARGV.first) puts 'Disable all optional roles.' puts 'USAGE: labs-vagrant reset-roles' end @@ -36,7 +36,7 @@ puts COMMIT_CHANGES when 'enable-role' - if ARGV.empty? or ['-h', '--help'].include? ARGV.first + if ARGV.empty? || ['-h', '--help'].include?(ARGV.first) puts 'Enable an optional role (run labs-vagrant list-roles for a list).' puts 'USAGE: labs-vagrant enable-role ROLE' return 0 @@ -52,7 +52,7 @@ puts COMMIT_CHANGES when 'disable-role' - if ARGV.empty? or ['-h', '--help'].include? ARGV.first + if ARGV.empty? || ['-h', '--help'].include?(ARGV.first) puts 'Disable one or more optional roles.' puts 'USAGE: labs-vagrant disable-role ROLE' return 0 diff --git a/lib/mediawiki-vagrant/paste-puppet.rb b/lib/mediawiki-vagrant/paste-puppet.rb index 2b13c3c..cee1b74 100644 --- a/lib/mediawiki-vagrant/paste-puppet.rb +++ b/lib/mediawiki-vagrant/paste-puppet.rb @@ -16,7 +16,7 @@ def execute begin res = Net::HTTP.post_form URL, content: latest_logfile.read -raise unless res.value.nil? and res.body =~ /^[^]+$/ +raise unless res.value.nil? res.body =~ /^[^]+$/ rescue RuntimeError @env.ui.error Unexpected response from #{URL}. 1 -- To view, visit https://gerrit.wikimedia.org/r/233372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I276d60eb1e6155f71d523f22da22329b1678ec3e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show an error message if no newsletters were found - change (mediawiki...Newsletter)
Glaisher has uploaded a new change for review. https://gerrit.wikimedia.org/r/234316 Change subject: Show an error message if no newsletters were found .. Show an error message if no newsletters were found Currently, Special:Newsletters is blank and Special:ManageNewsletter shows a useless form. Instead of that, we'll show a standard error page if no newsletters were found. Change-Id: I5a68c25d0ddb8d6722c5d3bcb345ee98a26bdba5 --- M i18n/en.json M i18n/qqq.json M includes/specials/SpecialNewsletterManage.php M includes/specials/SpecialNewsletters.php 4 files changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/16/234316/1 diff --git a/i18n/en.json b/i18n/en.json index 0f7b24a..9689ff9 100755 --- a/i18n/en.json +++ b/i18n/en.json @@ -38,6 +38,7 @@ newsletter-unsubscribe-button-label: No, newsletter-available-newsletters-field-label: Available newsletters, newsletter-subscribed-newsletters-field-label: Subscribed newsletters, + newsletter-none-found: No newsletters exist. You can create a new newsletter through [[Special:CreateNewsletter]]., echo-category-title-newsletter: Newsletters, echo-pref-tooltip-newsletter: Notify me when any of the newsletters to which I have subscribed to announces a new issue., newsletter-notification-title: $1 has announced an issue, diff --git a/i18n/qqq.json b/i18n/qqq.json index 56fb512..8c0f84a 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -39,6 +39,7 @@ newsletter-unsubscribe-button-label: Label of submit button of HTML form which allows users to un-subscribe.\n{{Identical|No}}, newsletter-available-newsletters-field-label: Label of HTML form field which lists all available newsletters in wiki, newsletter-subscribed-newsletters-field-label: Label of HTML form field which lists all newsletters to which user is subscribed to., + newsletter-none-found: Error message shown on [[Special:Newsletters]] and [[Special:ManageNewsletter]] if no newsletters were found on the wiki., echo-category-title-newsletter: Title of the notification category used by Newsletter extension.\n{{Related|Echo-category-title}}\n{{Identical|Newsletter}}, echo-pref-tooltip-newsletter: Short description of the newsletter notification category.\n{{Related|Echo-pref-tooltip}}, newsletter-notification-link-text-new-issue: Label of the primary link of the notification-newsletter-flyout, which on clicking navigates the user to the newly announced issue of a newsletter., diff --git a/includes/specials/SpecialNewsletterManage.php b/includes/specials/SpecialNewsletterManage.php index dfeba7e..bcbbc41 100644 --- a/includes/specials/SpecialNewsletterManage.php +++ b/includes/specials/SpecialNewsletterManage.php @@ -32,10 +32,12 @@ $table-getBody() . $table-getNavigationBar() ); + // Show HTML forms + $announceIssueForm-show(); + } else { + $output-showErrorPage( 'newslettermanage', 'newsletter-none-found' ); } - # Show HTML forms - $announceIssueForm-show(); - $output-returnToMain(); + } /** diff --git a/includes/specials/SpecialNewsletters.php b/includes/specials/SpecialNewsletters.php index 533f4cc..e11d765 100644 --- a/includes/specials/SpecialNewsletters.php +++ b/includes/specials/SpecialNewsletters.php @@ -32,6 +32,8 @@ $pager-getBody() . $pager-getNavigationBar() ); + } else { + $output-showErrorPage( 'newsletters', 'newsletter-none-found' ); } } -- To view, visit https://gerrit.wikimedia.org/r/234316 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a68c25d0ddb8d6722c5d3bcb345ee98a26bdba5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Glaisher glaisher.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix missing message on SpecialNewsletterCreate - change (mediawiki...Newsletter)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/234321 Change subject: Fix missing message on SpecialNewsletterCreate .. Fix missing message on SpecialNewsletterCreate This was removed as a duplicate key before: This is readding it under a new name! Change-Id: I2ea55848bdf359426eb0b971c098ffd1c850e43a --- M extension.json M i18n/en.json M i18n/qqq.json M includes/specials/SpecialNewsletterCreate.php 4 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/21/234321/1 diff --git a/extension.json b/extension.json index cee98f2..a552ca2 100644 --- a/extension.json +++ b/extension.json @@ -6,7 +6,7 @@ Tina Johnson ], url: https://www.mediawiki.org/wiki/Extension:Newsletter;, - descriptionmsg: newsletter-desc, + descriptionmsg: newsletter-extension-desc, license-name: GPL-2.0+, type: other, SpecialPages: { diff --git a/i18n/en.json b/i18n/en.json index d32cf93..c7e1f0f 100755 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,10 +4,11 @@ Tina Johnson ] }, - newsletter-desc: Adds a preference for users to subscribe to a newsletter, + newsletter-extension-desc: Enables users to publish and subscribe to newsletters, newslettercreate: Create newsletters, newslettermanage: Manage newsletters, newsletter-name: Name of newsletter, + newsletter-desc: Description, newsletter-title: Title of Main Page, newsletter-frequency: Frequency, newsletter-option-weekly: weekly, diff --git a/i18n/qqq.json b/i18n/qqq.json index 56fb512..fe7c296 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -6,10 +6,11 @@ Robby ] }, - newsletter-desc: Label of the field which takes a short description of newsletter as input in [[Special:NewsletterCreate]]\n{{Identical|Description}}, + newsletter-extension-desc: Description of the extension, newslettercreate: Name of special page which creates newsletters as seen in URLs and links, newslettermanage: Name of special page which announces issues as seen in URLs and links, newsletter-name: Label of the field which takes the name of newsletter as input in [[Special:NewsletterManage]] and [[Special:NewsletterCreate]], + newsletter-desc: Label of the field which takes a short description of newsletter as input in [[Special:NewsletterCreate]]\n{{Identical|Description}}, newsletter-title: Label of the field which takes the title of Main Page of newsletter as input in [[Special:NewsletterCreate]], newsletter-frequency: Label of the field which takes the frequency of newsletter as input in [[Special:NewsletterCreate]]\n{{Identical|Frequency}}, newsletter-option-weekly: Option message of the 'weekly' option of the frequency field in [[Special:NewsletterCreate]]\n{{Identical|Weekly}}, diff --git a/includes/specials/SpecialNewsletterCreate.php b/includes/specials/SpecialNewsletterCreate.php index 9476080..34cb662 100644 --- a/includes/specials/SpecialNewsletterCreate.php +++ b/includes/specials/SpecialNewsletterCreate.php @@ -41,7 +41,7 @@ 'description' = array( 'type' = 'textarea', 'required' = true, - 'label-message' = 'newsletter-desc', + 'label-message' = 'newsletter-description', 'rows' = 15, 'cols' = 50, ), -- To view, visit https://gerrit.wikimedia.org/r/234321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ea55848bdf359426eb0b971c098ffd1c850e43a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move chapcom.wikimedia.org to affcom.wikimedia.org - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Move chapcom.wikimedia.org to affcom.wikimedia.org .. Move chapcom.wikimedia.org to affcom.wikimedia.org Bug: T41482 Change-Id: I05f944d469f555841699a7251597d54506663512 --- M multiversion/MWMultiVersion.php M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 3 files changed, 5 insertions(+), 4 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php index 8d9845f..985912d 100644 --- a/multiversion/MWMultiVersion.php +++ b/multiversion/MWMultiVersion.php @@ -142,6 +142,7 @@ 'www.wikidata.org' = 'wikidata', 'wikisource.org' = 'sources', 'wikitech.wikimedia.org' = 'labs', + 'affcom.wikimedia.org' = 'chapcom', // Labs 'beta.wmflabs.org' = 'deployment', diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 6029d5b..dc4c41b 100755 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -467,11 +467,11 @@ 'm.mediawiki.org', 'wikimediafoundation.org', 'advisory.wikimedia.org', + 'affcom.wikimedia.org', 'auditcom.wikimedia.org', 'boardgovcom.wikimedia.org', 'board.wikimedia.org', 'chair.wikimedia.org', - 'chapcom.wikimedia.org', 'checkuser.wikimedia.org', 'collab.wikimedia.org', 'commons.wikimedia.org', diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 8f4897f..4002163 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -1320,7 +1320,7 @@ 'boardwiki' = '//board.wikimedia.org', 'brwikimedia' = '//br.wikimedia.org', 'chairwiki' = '//chair.wikimedia.org', - 'chapcomwiki' = '//chapcom.wikimedia.org', + 'chapcomwiki' = '//affcom.wikimedia.org', 'checkuserwiki' = '//checkuser.wikimedia.org', 'cnwikimedia' = '//cn.wikimedia.org', 'collabwiki' = '//collab.wikimedia.org', @@ -1399,7 +1399,7 @@ 'boardwiki' = 'https://board.wikimedia.org', 'brwikimedia' = 'https://br.wikimedia.org', 'chairwiki' = 'https://chair.wikimedia.org', - 'chapcomwiki' = 'https://chapcom.wikimedia.org', + 'chapcomwiki' = 'https://affcom.wikimedia.org', 'checkuserwiki' = 'https://checkuser.wikimedia.org', 'cnwikimedia' = 'https://cn.wikimedia.org', // T98676 'collabwiki' = 'https://collab.wikimedia.org', @@ -1546,7 +1546,7 @@ 'ckbwiki' = 'ویکیپیدیا', 'cewiki' = 'Википеди', // T49574 'chairwiki' = 'Wikimedia Board Chair', - 'chapcomwiki' = 'Chapcom', + 'chapcomwiki' = 'Affcom', 'checkuserwiki' = 'CheckUser Wiki', 'chywiki' = 'Tsétsêhéstâhese Wikipedia', 'cnwikimedia' = '中国维基媒体用户组', // T98676 -- To view, visit https://gerrit.wikimedia.org/r/234320 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05f944d469f555841699a7251597d54506663512 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Alex Monk kren...@gmail.com Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move ApiNewsletterTest to api directory - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Move ApiNewsletterTest to api directory .. Move ApiNewsletterTest to api directory This reflects the directory structure in the includes foled and will help people locate things... Change-Id: I8694a151a2fb25ceeb7dbfccdb4f5baef6998c41 --- R tests/api/ApiNewsletterTest.php 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/ApiNewsletterTest.php b/tests/api/ApiNewsletterTest.php similarity index 100% rename from tests/ApiNewsletterTest.php rename to tests/api/ApiNewsletterTest.php -- To view, visit https://gerrit.wikimedia.org/r/234312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8694a151a2fb25ceeb7dbfccdb4f5baef6998c41 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test - change (mediawiki...QuickSurveys)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/234322 Change subject: Test .. Test Change-Id: I2485b5d192b58e7a5745d9797087bb750f70837c --- M extension.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys refs/changes/22/234322/1 diff --git a/extension.json b/extension.json index 072d0aa..1a55f71 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { name: QuickSurveys, - version: 0.0.1, + version: 0.0.2, author: [ Bahodir Mansurov, Joaquin Hernandez, -- To view, visit https://gerrit.wikimedia.org/r/234322 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2485b5d192b58e7a5745d9797087bb750f70837c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/QuickSurveys Gerrit-Branch: dev Gerrit-Owner: Phuedx g...@samsmith.io ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add tests to make sure special pages dont fatal - change (mediawiki...Newsletter)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/234324 Change subject: Add tests to make sure special pages dont fatal .. Add tests to make sure special pages dont fatal Change-Id: I9a1bc8548540b026068601700d8c28268abc2d6b --- A tests/specials/SpecialNewsletterCreateTest.php A tests/specials/SpecialNewsletterManageTest.php A tests/specials/SpecialNewslettersTest.php 3 files changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/24/234324/1 diff --git a/tests/specials/SpecialNewsletterCreateTest.php b/tests/specials/SpecialNewsletterCreateTest.php new file mode 100644 index 000..71aa2d3 --- /dev/null +++ b/tests/specials/SpecialNewsletterCreateTest.php @@ -0,0 +1,13 @@ +?php + +class SpecialNewsletterCreateTest extends SpecialPageTestBase{ + + protected function newSpecialPage() { + return new SpecialNewsletterCreate(); + } + + public function testSpecialPageDoesNotFatal() { + $this-executeSpecialPage(); + $this-assertTrue( true ); + } +} diff --git a/tests/specials/SpecialNewsletterManageTest.php b/tests/specials/SpecialNewsletterManageTest.php new file mode 100644 index 000..a64fdea --- /dev/null +++ b/tests/specials/SpecialNewsletterManageTest.php @@ -0,0 +1,13 @@ +?php + +class SpecialNewsletterManageTest extends SpecialPageTestBase{ + + protected function newSpecialPage() { + return new SpecialNewsletterManage(); + } + + public function testSpecialPageDoesNotFatal() { + $this-executeSpecialPage(); + $this-assertTrue( true ); + } +} diff --git a/tests/specials/SpecialNewslettersTest.php b/tests/specials/SpecialNewslettersTest.php new file mode 100644 index 000..3824e12 --- /dev/null +++ b/tests/specials/SpecialNewslettersTest.php @@ -0,0 +1,13 @@ +?php + +class SpecialNewslettersTest extends SpecialPageTestBase{ + + protected function newSpecialPage() { + return new SpecialNewsletters(); + } + + public function testSpecialPageDoesNotFatal() { + $this-executeSpecialPage(); + $this-assertTrue( true ); + } +} -- To view, visit https://gerrit.wikimedia.org/r/234324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a1bc8548540b026068601700d8c28268abc2d6b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implement wfArrayPlus2d which combines 2d arrays - change (mediawiki/core)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/234325 Change subject: Implement wfArrayPlus2d which combines 2d arrays .. Implement wfArrayPlus2d which combines 2d arrays Moved the logic of ExtensionRegistrations array_plus_2d merge method out to it's own global function wfArrayPlus2d, so any other function in mediawiki core and it's extensions can use this method when they need to union a 2d array. Change-Id: I56afdf306e399a4a1505828ed76c60c1bfd033b6 --- M includes/GlobalFunctions.php M includes/registration/ExtensionRegistry.php A tests/phpunit/includes/GlobalFunctions/wfArrayPlus2dTest.php 3 files changed, 132 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/25/234325/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 9d89633..b853d07 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -4273,3 +4273,28 @@ return true; } + +/** + * Merges two (possibly) 2 dimensional arrays into the target array ($baseArray). + * + * Values that exist in both values will be combined with += (all values of the array + * of $newValues will be added to the values of the array of $baseArray, while values, + * that exists in both, the value of $baseArray will be used). + * + * @param array $baseArray The array where you want to add the values of $newValues to + * @param array $newValues An array with new values + * @return array The combined array + * @since 1.26 + */ +function wfArrayPlus2d( array $baseArray, array $newValues ) { + // First merge items that are in both arrays + foreach ( $baseArray as $name = $groupVal ) { + if ( isset( $newValues[$name] ) ) { + $groupVal += $newValues[$name]; + } + } + // Now add items that didn't exist yet + $baseArray += $newValues; + + return $baseArray; +} diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index b89518a..f838103 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -222,14 +222,7 @@ $GLOBALS[$key] = array_merge_recursive( $GLOBALS[$key], $val ); break; case 'array_plus_2d': - // First merge items that are in both arrays - foreach ( $GLOBALS[$key] as $name = $groupVal ) { - if ( isset( $val[$name] ) ) { - $groupVal += $val[$name]; - } - } - // Now add items that didn't exist yet - $GLOBALS[$key] += $val; + $GLOBALS[$key] = wfArrayPlus2d( $GLOBALS[$key], $val ); break; case 'array_plus': $GLOBALS[$key] = $val + $GLOBALS[$key]; diff --git a/tests/phpunit/includes/GlobalFunctions/wfArrayPlus2dTest.php b/tests/phpunit/includes/GlobalFunctions/wfArrayPlus2dTest.php new file mode 100644 index 000..309fc3f --- /dev/null +++ b/tests/phpunit/includes/GlobalFunctions/wfArrayPlus2dTest.php @@ -0,0 +1,106 @@ +?php +/** + * @group GlobalFunctions + * @covers ::wfArrayPlus2d + */ +class WfArrayPlus2dTest extends MediaWikiTestCase { + /** +* @dataProvider provideURLParts +*/ + public function testWfArrayPlus2d( $baseArray, $newValues, $expected, $testName ) { + $this-assertEquals( + $expected, + wfArrayPlus2d( $baseArray, $newValues ), + $testName + ); + } + + /** +* Provider of URL parts for testing wfAssembleUrl() +* +* @return array +*/ + public static function provideURLParts() { + return array( + // target array, new values array, expected result + array( + array( 0 = '1dArray' ), + array( 1 = '1dArray' ), + array( 0 = '1dArray', 1 = '1dArray' ), + Test simple union of two arrays with different keys, + ), + array( + array( + 0 = array( 0 = '2dArray' ), + ), + array( + 0 = array( 1 = '2dArray' ), +
[MediaWiki-commits] [Gerrit] Update for breaking change to MWReferenceModel constructor - change (mediawiki...Citoid)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/234334 Change subject: Update for breaking change to MWReferenceModel constructor .. Update for breaking change to MWReferenceModel constructor Was changed in I5d9d34d4 in VE-MW. Bug: T110569 Change-Id: I9d301c9b0b0c93e2794a77afdc07de4b7d510121 --- M modules/ve.ui.CiteFromIdInspector.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Citoid refs/changes/34/234334/1 diff --git a/modules/ve.ui.CiteFromIdInspector.js b/modules/ve.ui.CiteFromIdInspector.js index 24ebe28..375b3c8 100644 --- a/modules/ve.ui.CiteFromIdInspector.js +++ b/modules/ve.ui.CiteFromIdInspector.js @@ -403,7 +403,7 @@ this.fragment = this.getFragment().collapseToEnd(); // Create model - this.referenceModel = new ve.dm.MWReferenceModel(); + this.referenceModel = new ve.dm.MWReferenceModel( this.fragment.getDocument() ); this.search.setInternalList( this.getFragment().getDocument().getInternalList() ); this.modeSelect.getItemFromData( 'reuse' ).setDisabled( this.search.isIndexEmpty() ); -- To view, visit https://gerrit.wikimedia.org/r/234334 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d301c9b0b0c93e2794a77afdc07de4b7d510121 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Citoid Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make SpecialNewsletterCreate extend FormSpecialPage - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Make SpecialNewsletterCreate extend FormSpecialPage .. Make SpecialNewsletterCreate extend FormSpecialPage Also: * Prevent blocked users from creating newsletters (part of T110327) * Add some whitespaces * Remove the return to Main Page link. This seems out of place here. * Declare explicit visibility Change-Id: I6fd1d78cda9996a35efe65bfafe67ca5e3d9b9c3 --- M includes/SpecialNewsletterCreate.php 1 file changed, 15 insertions(+), 19 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SpecialNewsletterCreate.php b/includes/SpecialNewsletterCreate.php index b21c3fd..b123a6f 100644 --- a/includes/SpecialNewsletterCreate.php +++ b/includes/SpecialNewsletterCreate.php @@ -3,32 +3,25 @@ /** * Special page for creating newsletters * - * @todo Make this extend FormSpecialPage */ -class SpecialNewsletterCreate extends SpecialPage { +class SpecialNewsletterCreate extends FormSpecialPage { + public function __construct() { parent::__construct( 'NewsletterCreate' ); } public function execute( $par ) { - $this-setHeaders(); - $output = $this-getOutput(); $this-requireLogin(); - $createNewsletterArray = $this-getCreateFormFields(); + parent::execute( $par ); + } - # Create HTML forms - $createNewsletterForm = new HTMLForm( - $createNewsletterArray, - $this-getContext(), - 'createnewsletterform' - ); - $createNewsletterForm-setSubmitTextMsg( 'newsletter-create-submit' ); - $createNewsletterForm-setSubmitCallback( array( $this, 'onSubmitNewsletter' ) ); - $createNewsletterForm-setWrapperLegendMsg( 'newsletter-create-section' ); - # Show HTML forms - $createNewsletterForm-show(); - $output-returnToMain(); + /** +* @param HTMLForm $form +*/ + protected function alterForm( HTMLForm $form ) { + $form-setSubmitTextMsg( 'newsletter-create-submit' ); + $form-setWrapperLegendMsg( 'newsletter-create-section' ); } /** @@ -36,7 +29,7 @@ * * @return array */ - protected function getCreateFormFields() { + protected function getFormFields() { return array( 'name' = array( 'type' = 'text', @@ -67,6 +60,7 @@ 'size' = 18, # size of 'other' field 'maxlength' = 50, ), + // @todo FIXME: this shouldn't be a form field 'publisher' = array( 'type' = 'hidden', 'default' = $this-getUser()-getId(), @@ -82,7 +76,7 @@ * * @return bool|array true on success, array on error */ - public function onSubmitNewsletter( array $formData ) { + public function onSubmit( array $formData ) { if ( isset( $formData['mainpage'] ) ) { $page = Title::newFromText( $formData['mainpage'] ); $pageId = $page-getArticleId(); @@ -146,12 +140,14 @@ */ private function autoSubscribe( $newsletterId, $ownerId ) { $dbw = wfGetDB( DB_MASTER ); + // add owner as a publisher $pubRowData = array( 'newsletter_id' = $newsletterId, 'publisher_id' = $ownerId, ); $dbw-insert( 'nl_publishers', $pubRowData, __METHOD__ ); + // add owner as a subscriber $subRowData = array( 'newsletter_id' = $newsletterId, -- To view, visit https://gerrit.wikimedia.org/r/234259 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6fd1d78cda9996a35efe65bfafe67ca5e3d9b9c3 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Glaisher glaisher.w...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: Tinaj1234 tinajohnson.1...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix some PHPDoc - change (mediawiki...Flow)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/234285 Change subject: Fix some PHPDoc .. Fix some PHPDoc Code still worked fine, but editors couldn't figure out what classes there were, since they're in another namespace than the file is in (and they're not use'd). Change-Id: Iececa94a8fbe5165b74aa2756297c3f62f2cba53 --- M includes/Parsoid/Fixer/BaseHrefFixer.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/85/234285/1 diff --git a/includes/Parsoid/Fixer/BaseHrefFixer.php b/includes/Parsoid/Fixer/BaseHrefFixer.php index 86b8e27..28cb3ff 100644 --- a/includes/Parsoid/Fixer/BaseHrefFixer.php +++ b/includes/Parsoid/Fixer/BaseHrefFixer.php @@ -20,7 +20,7 @@ protected $baseHref; /** -* @param $articlePath Article path setting for wiki +* @param $articlePath \Article path setting for wiki */ public function __construct( $articlePath ) { $replacedArticlePath = str_replace( '$1', '', $articlePath ); @@ -40,8 +40,8 @@ /** * Prefixes the href with base href. * -* @param DOMNode $node Link -* @param Title $title +* @param \DOMNode $node Link +* @param \Title $title */ public function apply( \DOMNode $node, \Title $title ) { if ( !$node instanceof \DOMElement ) { -- To view, visit https://gerrit.wikimedia.org/r/234285 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iececa94a8fbe5165b74aa2756297c3f62f2cba53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: xenon additional instances - change (operations/dns)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/234286 Change subject: WIP: xenon additional instances .. WIP: xenon additional instances trial multiple cassandra instances on a single machine Bug: T95253 Change-Id: I2fa4f1ab3dae5a2390c27750a3a44f3c014429d6 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/86/234286/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 6bcc123..43ee1c4 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -371,6 +371,8 @@ 221 1H IN PTR restbase1002.eqiad.wmnet. 222 1H IN PTR oxygen.eqiad.wmnet. 223 1H IN PTR restbase1007.eqiad.wmnet. +224 1H IN PTR xenon-a.eqiad.wmnet. +225 1H IN PTR xenon-b.eqiad.wmnet. $ORIGIN 1.64.{{ zonename }}. diff --git a/templates/wmnet b/templates/wmnet index 9da7def..9858b6b 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -790,6 +790,8 @@ wtp1023 1H IN A10.64.0.218 wtp1024 1H IN A10.64.0.219 xenon 1H IN A10.64.0.200 +xenon-a 1H IN A10.64.0.224 +xenon-b 1H IN A10.64.0.225 ; Management -- To view, visit https://gerrit.wikimedia.org/r/234286 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fa4f1ab3dae5a2390c27750a3a44f3c014429d6 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] policy.wikimedia.org dns record change - change (operations/dns)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/234296 Change subject: policy.wikimedia.org dns record change .. policy.wikimedia.org dns record change DO NOT MERGE THIS UNLESS YOU ARE ROB (or taking over coordination with wordpress directly for this migration, as it must be done at a specific time.) the policy site will be moving from behind our misc-web cluster and onto wordpress servers. I've kept the TTL at 5M during the relocation, once its complete and stable, another patch to change this from 5M to 1H will follow. T110203 Change-Id: I414cae0f8c835d5265bf9056a2b1a83e9771ecd7 --- M templates/wikimedia.org 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/96/234296/1 diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 03b4f93..279158e 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -480,7 +480,8 @@ payments-listener.frdev 1H IN CNAMEfrdev-eqiad people 1H IN CNAMEmisc-web-lb.eqiad -policy 5M IN CNAMEmisc-web-lb.eqiad +# policy.wikimedia.org goes to wordpress cluster +policy 5M IN A192.0.66.2 releases1H IN CNAMEmisc-web-lb.eqiad reports.frdev 1H IN CNAMEfrdev-eqiad -- To view, visit https://gerrit.wikimedia.org/r/234296 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I414cae0f8c835d5265bf9056a2b1a83e9771ecd7 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: RobH r...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typos in @param PHPDoc tags - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix typos in @param PHPDoc tags .. Fix typos in @param PHPDoc tags Change-Id: I3a7b25d10709e2c4a0007ed9460488b96ac4cf28 --- M lib/tests/phpunit/MockRepository.php M repo/includes/store/sql/WikiPageEntityRedirectLookup.php 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Ricordisamoa: Looks good to me, but someone else must approve Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/phpunit/MockRepository.php b/lib/tests/phpunit/MockRepository.php index 5199f3d..115d27a 100644 --- a/lib/tests/phpunit/MockRepository.php +++ b/lib/tests/phpunit/MockRepository.php @@ -780,7 +780,7 @@ * @since 0.5 * * @param EntityId $entityId -* @parma string $forUpdate +* @param string $forUpdate * * @return EntityId|null|false The ID of the redirect target, or null if $entityId * does not refer to a redirect, or false if $entityId is not known. diff --git a/repo/includes/store/sql/WikiPageEntityRedirectLookup.php b/repo/includes/store/sql/WikiPageEntityRedirectLookup.php index 240ae6c..db4d5a6 100644 --- a/repo/includes/store/sql/WikiPageEntityRedirectLookup.php +++ b/repo/includes/store/sql/WikiPageEntityRedirectLookup.php @@ -83,7 +83,7 @@ * @since 0.5 * * @param EntityId $entityId -* @paran string $forUpdate +* @param string $forUpdate * * @return EntityId|null|false The ID of the redirect target, or null if $entityId * does not refer to a redirect, or false if $entityId is not known. -- To view, visit https://gerrit.wikimedia.org/r/234230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a7b25d10709e2c4a0007ed9460488b96ac4cf28 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Jonas Kress (WMDE) jonas.kr...@wikimedia.de Gerrit-Reviewer: Ricordisamoa ricordisa...@openmailbox.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert plain text QuantityFormatter to output unit by default - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Revert plain text QuantityFormatter to output unit by default .. Revert plain text QuantityFormatter to output unit by default This reverts parts of Id741223. Instead the QuantityInput will use the relevant applyUnit option to ask the plain text formatter to *not* output the unit. This will be done in an other patch. Bug: T110183 Change-Id: Ib5ae9a6bcb49909790de38a85f32624098329f0a --- M lib/includes/formatters/WikibaseValueFormatterBuilders.php 1 file changed, 3 insertions(+), 16 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php b/lib/includes/formatters/WikibaseValueFormatterBuilders.php index 36dfa2a..60c5f84 100644 --- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php +++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php @@ -94,7 +94,7 @@ SnakFormatter::FORMAT_PLAIN = array( 'VT:string' = 'ValueFormatters\StringFormatter', 'VT:globecoordinate' = array( 'this', 'newGlobeCoordinateFormatter' ), - 'VT:quantity' = array( 'this', 'newPlainQuantityFormatter' ), + 'VT:quantity' = array( 'this', 'newQuantityFormatter' ), 'VT:time' = 'Wikibase\Lib\MwTimeIsoFormatter', 'VT:wikibase-entityid' = array( 'this', 'newEntityIdFormatter' ), 'VT:bad' = 'Wikibase\Lib\UnDeserializableValueFormatter', @@ -116,7 +116,6 @@ 'PT:commonsMedia' = 'Wikibase\Lib\CommonsLinkFormatter', 'PT:wikibase-item' = array( 'this', 'newEntityIdHtmlFormatter' ), 'PT:wikibase-property' = array( 'this', 'newEntityIdHtmlFormatter' ), - 'VT:quantity' = array( 'this', 'newHtmlQuantityFormatter' ), 'VT:time' = array( 'this', 'newHtmlTimeFormatter' ), 'VT:monolingualtext' = array( 'this', 'newMonolingualHtmlFormatter' ), ), @@ -614,23 +613,11 @@ * * @return QuantityFormatter */ - private function newPlainQuantityFormatter( FormatterOptions $options ) { - $options-setOption( QuantityFormatter::OPT_APPLY_UNIT, false ); - $decimalFormatter = new DecimalFormatter( $options, $this-getNumberLocalizer( $options ) ); - return new QuantityFormatter( $decimalFormatter, null, $options ); - } - - /** -* @param FormatterOptions $options -* -* @return QuantityFormatter -*/ - private function newHtmlQuantityFormatter( FormatterOptions $options ) { + private function newQuantityFormatter( FormatterOptions $options ) { $decimalFormatter = new DecimalFormatter( $options, $this-getNumberLocalizer( $options ) ); $labelDescriptionLookup = $this-labelDescriptionLookupFactory-getLabelDescriptionLookup( $options ); $unitFormatter = new EntityLabelUnitFormatter( $this-repoUriParser, $labelDescriptionLookup ); - $quantityFormatter = new QuantityFormatter( $decimalFormatter, $unitFormatter, $options ); - return new EscapingValueFormatter( $quantityFormatter, 'htmlspecialchars' ); + return new QuantityFormatter( $decimalFormatter, $unitFormatter, $options ); } /** -- To view, visit https://gerrit.wikimedia.org/r/233984 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib5ae9a6bcb49909790de38a85f32624098329f0a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Jonas Kress (WMDE) jonas.kr...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move ApiNewsletterTest to api directory - change (mediawiki...Newsletter)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/234312 Change subject: Move ApiNewsletterTest to api directory .. Move ApiNewsletterTest to api directory This reflects the directory structure in the includes foled and will help people locate things... Change-Id: I8694a151a2fb25ceeb7dbfccdb4f5baef6998c41 --- R tests/api/ApiNewsletterTest.php 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/12/234312/1 diff --git a/tests/ApiNewsletterTest.php b/tests/api/ApiNewsletterTest.php similarity index 100% rename from tests/ApiNewsletterTest.php rename to tests/api/ApiNewsletterTest.php -- To view, visit https://gerrit.wikimedia.org/r/234312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8694a151a2fb25ceeb7dbfccdb4f5baef6998c41 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Be more restrictive when selecting the tag for the first hea... - change (mediawiki...MobileFrontend)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/234314 Change subject: Be more restrictive when selecting the tag for the first heading .. Be more restrictive when selecting the tag for the first heading The selection of the so called first heading is a very important, considering, that it controls, which (or which not) section heading is the top of all headings and the text under it will be collapsible. Therefore, make the selection of the first heading more restrictive and allow only h-tags, that doesn't have a class, style or id attribute. Headings generated from mediawiki-core generally doesn't have any of these attributes and can safely be considered as a possible first heading. This removes an experimental configuration variable without any replacement. This was mentioned in the explanation of the config var. Bug: T110436 Change-Id: I31efaad6378c45b84a40800750cb74c6c278db9d --- M includes/MobileFormatter.php M includes/config/Experimental.php 2 files changed, 5 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/14/234314/1 diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php index b9d94c1..c224bc2 100644 --- a/includes/MobileFormatter.php +++ b/includes/MobileFormatter.php @@ -19,9 +19,6 @@ /** @var string $headingTransformEnd String prefixes to be applied before and after section content. */ protected $headingTransformEnd = 'div'; - /** @var array $topHeadingTags Array of strings with possible tags, - can be recognized as top headings. */ - public $topHeadingTags = array(); /** * Saves a Title Object @@ -72,7 +69,6 @@ $html = self::wrapHTML( $html ); $formatter = new MobileFormatter( $html, $title ); $formatter-enableExpandableSections( !$isMainPage !$isSpecialPage ); - $formatter-topHeadingTags = $config-get( 'MFTopHeadingPossibleTags' ); $formatter-setIsMainPage( $isMainPage ); if ( $context-getContentTransformations() !$isFilePage ) { @@ -292,17 +288,11 @@ * @return string the tag name for the top level headings */ protected function findTopHeading( $html ) { - $tags = $this-topHeadingTags; - if ( !is_array( $tags ) ) { - throw new UnexpectedValueException( 'Possible top headings needs to be an array of strings, ' . - gettype( $tags ) . ' given.' ); - } - foreach ( $tags as $tag ) { - if ( strpos( $html, '' . $tag ) !== false ) { - return $tag; - } - } - return 'h6'; + // FIXME: first heading should never be in $html? + $headingRegEx = '/(h[1-6])(?! (class|style|id=(?!firstHeading).*))/si'; + preg_match( $headingRegEx, $html, $matches ); + + return isset( $matches[1] ) ? $matches[1] : 'h6'; } /** diff --git a/includes/config/Experimental.php b/includes/config/Experimental.php index d172c4f..1f0358a 100644 --- a/includes/config/Experimental.php +++ b/includes/config/Experimental.php @@ -40,10 +40,3 @@ * FIXME: This config is highly experimental and temporary only. Use it on your own risk! */ $wgMFNoLoginOverride = false; - -/** - * This is a list of html tags, that could be recognized as the first heading of a page. - * This is an interim solution to fix Bug T110436 and shouldn't be used, if you don't know, - * what you do. Moreover, this configuration variable will be removed in the near future (hopefully). - */ -$wgMFTopHeadingPossibleTags = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ); \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/234314 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31efaad6378c45b84a40800750cb74c6c278db9d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed Style/IndentationWidth RuboCop offense - change (mediawiki/vagrant)
Dduvall has uploaded a new change for review. https://gerrit.wikimedia.org/r/234323 Change subject: Fixed Style/IndentationWidth RuboCop offense .. Fixed Style/IndentationWidth RuboCop offense RuboCop actually missed many of these offenses which required manual review and cleanup. Bug: T106220 Change-Id: I0390db5f2c6259329cb3aae520162bee0fc9f209 --- M .rubocop.yml M .rubocop_todo.yml M Gemfile M Gemfile.lock M Rakefile M Vagrantfile M mediawiki-vagrant.gemspec M support/packager/package.rb M support/setup.rb 9 files changed, 217 insertions(+), 223 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/23/234323/1 diff --git a/.rubocop.yml b/.rubocop.yml index b8f7361..c8f54ea 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,6 +6,7 @@ Exclude: - 'mediawiki/**/*' - 'mediawiki-*/**/*' +- 'puppet/modules/activemq/**/*' - 'puppet/modules/cdh/**/*' - 'puppet/modules/mariadb/**/*' - 'puppet/modules/nginx/**/*' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index bf68d1f..58da8c5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -75,12 +75,6 @@ Style/IfUnlessModifier: Enabled: false -# Offense count: 45 -# Cop supports --auto-correct. -# Configuration parameters: Width. -Style/IndentationWidth: - Enabled: false - # Offense count: 1 # Cop supports --auto-correct. Style/LeadingCommentSpace: diff --git a/Gemfile b/Gemfile index 7ebd66f..fb190d4 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ # https://github.com/mitchellh/vagrant/issues/5546 gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git', tag: 'v1.7.2' - gem 'rubocop', '~ 0.32.1', require: false + gem 'rubocop', '~ 0.33.0', require: false end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index 5fc27be..01f2b48 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -23,7 +23,7 @@ PATH remote: . specs: -mediawiki-vagrant (0.7.1) +mediawiki-vagrant (0.10.0) GEM remote: https://rubygems.org/ @@ -31,7 +31,7 @@ akami (1.2.2) gyoku (= 0.4.0) nokogiri -ast (2.0.0) +ast (2.1.0) astrolabe (1.3.1) parser (~ 2.2) builder (3.2.2) @@ -127,7 +127,7 @@ diff-lcs (= 1.2.0, 2.0) rspec-support (~ 3.2.0) rspec-support (3.2.0) -rubocop (0.32.1) +rubocop (0.33.0) astrolabe (~ 1.3) parser (= 2.2.2.5, 3.0) powerpack (~ 0.1) @@ -169,6 +169,6 @@ mediawiki-vagrant! pry-byebug rspec (~ 3.1, = 3.1.0) - rubocop (~ 0.32.1) + rubocop (~ 0.33.0) vagrant! yard (~ 0.8, = 0.8.7.6) diff --git a/Rakefile b/Rakefile index 9da5752..1813787 100644 --- a/Rakefile +++ b/Rakefile @@ -10,7 +10,7 @@ PuppetLint::RakeTask.new(:lint) do |config| gitmodules = File.expand_path('../.gitmodules', __FILE__) config.ignore_paths = IO.readlines(gitmodules).grep(/\s*path\s*=\s*(\S+)/) { - #{$1}/**/*.pp +#{$1}/**/*.pp } config.log_format = '%{path}:%{linenumber} %{KIND}: %{message}' end diff --git a/Vagrantfile b/Vagrantfile index 5032800..2d58012 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -37,9 +37,9 @@ setup = Vagrant::Util::Platform.windows? ? 'setup.bat' : 'setup.sh' if gemspec.nil? -raise The mediawiki-vagrant plugin hasn't been installed yet. Please run `#{setup}`. + raise The mediawiki-vagrant plugin hasn't been installed yet. Please run `#{setup}`. else -installed = gemspec.version + installed = gemspec.version latest = Gem::Version.new(MediaWikiVagrant::VERSION) requirement = Gem::Requirement.new(~ #{latest.segments.first(2).join('.')}) @@ -52,213 +52,212 @@ settings = mwv.load_settings Vagrant.configure('2') do |config| -config.vm.hostname = 'mediawiki-vagrant.dev' -config.package.name = 'mediawiki.box' + config.vm.hostname = 'mediawiki-vagrant.dev' + config.package.name = 'mediawiki.box' -config.ssh.forward_agent = settings[:forward_agent] -config.ssh.forward_x11 = settings[:forward_x11] + config.ssh.forward_agent = settings[:forward_agent] + config.ssh.forward_x11 = settings[:forward_x11] -# Default VirtualBox provider -config.vm.provider :virtualbox do |_vb, override| -override.vm.box = 'trusty-cloud' -override.vm.box_url = 'https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box' -override.vm.box_download_insecure = true + # Default VirtualBox provider + config.vm.provider :virtualbox do |_vb, override| +override.vm.box = 'trusty-cloud' +override.vm.box_url = 'https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box' +override.vm.box_download_insecure = true -override.vm.network :private_network, ip: settings[:static_ip] +override.vm.network :private_network, ip: settings[:static_ip] + end + + # VMWare Fusion provider. Enable with
[MediaWiki-commits] [Gerrit] Fix missing message on SpecialNewsletterCreate - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Fix missing message on SpecialNewsletterCreate .. Fix missing message on SpecialNewsletterCreate This was removed as a duplicate key before: This is readding it under a new name Change-Id: I2ea55848bdf359426eb0b971c098ffd1c850e43a --- M extension.json M i18n/en.json M i18n/qqq.json 3 files changed, 5 insertions(+), 3 deletions(-) Approvals: 01tonythomas: Looks good to me, approved Addshore: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/extension.json b/extension.json index cee98f2..a552ca2 100644 --- a/extension.json +++ b/extension.json @@ -6,7 +6,7 @@ Tina Johnson ], url: https://www.mediawiki.org/wiki/Extension:Newsletter;, - descriptionmsg: newsletter-desc, + descriptionmsg: newsletter-extension-desc, license-name: GPL-2.0+, type: other, SpecialPages: { diff --git a/i18n/en.json b/i18n/en.json index ddf1daa..cbdfce2 100755 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,10 +4,11 @@ Tina Johnson ] }, - newsletter-desc: Adds a preference for users to subscribe to a newsletter, + newsletter-extension-desc: Enables users to publish and subscribe to newsletters, newslettercreate: Create newsletters, newslettermanage: Manage newsletters, newsletter-name: Name of newsletter, + newsletter-desc: Description, newsletter-title: Title of Main Page, newsletter-frequency: Frequency, newsletter-option-weekly: weekly, diff --git a/i18n/qqq.json b/i18n/qqq.json index 8c0f84a..e0c30c3 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -6,10 +6,11 @@ Robby ] }, - newsletter-desc: Label of the field which takes a short description of newsletter as input in [[Special:NewsletterCreate]]\n{{Identical|Description}}, + newsletter-extension-desc: Description of the extension, newslettercreate: Name of special page which creates newsletters as seen in URLs and links, newslettermanage: Name of special page which announces issues as seen in URLs and links, newsletter-name: Label of the field which takes the name of newsletter as input in [[Special:NewsletterManage]] and [[Special:NewsletterCreate]], + newsletter-desc: Label of the field which takes a short description of newsletter as input in [[Special:NewsletterCreate]]\n{{Identical|Description}}, newsletter-title: Label of the field which takes the title of Main Page of newsletter as input in [[Special:NewsletterCreate]], newsletter-frequency: Label of the field which takes the frequency of newsletter as input in [[Special:NewsletterCreate]]\n{{Identical|Frequency}}, newsletter-option-weekly: Option message of the 'weekly' option of the frequency field in [[Special:NewsletterCreate]]\n{{Identical|Weekly}}, -- To view, visit https://gerrit.wikimedia.org/r/234321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2ea55848bdf359426eb0b971c098ffd1c850e43a Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fermium: add mapped IPv6 address - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: fermium: add mapped IPv6 address .. fermium: add mapped IPv6 address Give fermium a mapped IPv6 address, just like sodium has. Change-Id: Ia2c9c48dc0bf878fcf8b6a42e064805d1bee62c2 --- M manifests/site.pp 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index ef60ad0..18742d0 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -975,6 +975,10 @@ include admin include base::firewall include role::lists::migration + +interface::add_ip6_mapped { 'main': +interface = 'eth0', +} } node 'fluorine.eqiad.wmnet' { -- To view, visit https://gerrit.wikimedia.org/r/234319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2c9c48dc0bf878fcf8b6a42e064805d1bee62c2 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove Main Page duplicate link on Special:NewsletterManage - change (mediawiki...Newsletter)
Glaisher has uploaded a new change for review. https://gerrit.wikimedia.org/r/234326 Change subject: Remove Main Page duplicate link on Special:NewsletterManage .. Remove Main Page duplicate link on Special:NewsletterManage Change-Id: I8596661fbcf48d23c3661fa5f0b1b36e56cdfab6 --- M includes/specials/SpecialNewsletterManage.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/26/234326/1 diff --git a/includes/specials/SpecialNewsletterManage.php b/includes/specials/SpecialNewsletterManage.php index 479d097..307b15a 100644 --- a/includes/specials/SpecialNewsletterManage.php +++ b/includes/specials/SpecialNewsletterManage.php @@ -41,7 +41,7 @@ } else { $output-showErrorPage( 'newslettermanage', 'newsletter-none-found' ); } - $output-returnToMain(); + } /** -- To view, visit https://gerrit.wikimedia.org/r/234326 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8596661fbcf48d23c3661fa5f0b1b36e56cdfab6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Glaisher glaisher.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] elasticseach: ferm for 27-31 - change (operations/puppet)
Rush has submitted this change and it was merged. Change subject: elasticseach: ferm for 27-31 .. elasticseach: ferm for 27-31 Change-Id: Ia6f06903d048a4ffd0f56f7317433e217920176c --- M manifests/site.pp 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Rush: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 18742d0..652ec60 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -847,7 +847,11 @@ role elasticsearch::server -if $::hostname =~ /^elastic102[3-6]$/ { +if $::hostname =~ /^elastic102[3-9]$/ { +include base::firewall +} + +if $::hostname =~ /^elastic103[0-1]$/ { include base::firewall } } -- To view, visit https://gerrit.wikimedia.org/r/234327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia6f06903d048a4ffd0f56f7317433e217920176c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Rush r...@wikimedia.org Gerrit-Reviewer: Rush r...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignoring Style/AlignParameters RuboCop offenses - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Ignoring Style/AlignParameters RuboCop offenses .. Ignoring Style/AlignParameters RuboCop offenses Bug: T106220 Change-Id: Ia729f16012d5b7898d68ecede88af69e6b4ae268 --- M .rubocop.yml M .rubocop_todo.yml 2 files changed, 5 insertions(+), 6 deletions(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/.rubocop.yml b/.rubocop.yml index 374c24b..b8f7361 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -26,6 +26,11 @@ Style/Alias: Enabled: false +# Ignoring for now as many instances of strictly aligned parameters look +# strange +Style/AlignParameters: + Enabled: false + Style/SignalException: Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6e20716..758cf33 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -23,12 +23,6 @@ Metrics/LineLength: Max: 129 -# Offense count: 15 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/AlignParameters: - Enabled: false - # Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. -- To view, visit https://gerrit.wikimedia.org/r/233370 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia729f16012d5b7898d68ecede88af69e6b4ae268 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Load all CSS in the top queue - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/234315 Change subject: Revert Load all CSS in the top queue .. Revert Load all CSS in the top queue I don't want to roll this out until our WebPageTest infrastructure is ready and can show whether or not this is beneficial. I should have indicated this clearly on the change rather than leave it open, sorry. This reverts commit b7c0e537ebb7216cd12a6c48fbaee7c2c7757c55. Change-Id: I43e3295873a94da1c2febe2c1a19ad20ca914254 --- M includes/OutputPage.php 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/15/234315/1 diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 80fd9ab..8d4720b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3073,6 +3073,10 @@ ResourceLoaderModule::TYPE_SCRIPTS ); + $links[] = $this-makeResourceLoaderLink( $this-getModuleStyles( true, 'bottom' ), + ResourceLoaderModule::TYPE_STYLES + ); + // Modules requests - let the client calculate dependencies and batch requests as it likes // Only load modules that have marked themselves for loading at the bottom $modules = $this-getModules( true, 'bottom' ); @@ -3664,7 +3668,7 @@ $otherTags = array(); // Tags to append after the normal link tags $resourceLoader = $this-getResourceLoader(); - $moduleStyles = $this-getModuleStyles( true ); + $moduleStyles = $this-getModuleStyles( true, 'top' ); // Per-site custom styles $moduleStyles[] = 'site'; -- To view, visit https://gerrit.wikimedia.org/r/234315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I43e3295873a94da1c2febe2c1a19ad20ca914254 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed Lint/AssignmentInCondition RuboCop offense - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed Lint/AssignmentInCondition RuboCop offense .. Fixed Lint/AssignmentInCondition RuboCop offense Bug: T106220 Change-Id: Icbc7acf88f8e60ab3343ba05f50f17f9bc21c2a7 --- M .rubocop_todo.yml M lib/mediawiki-vagrant/config.rb M lib/mediawiki-vagrant/roles/info.rb 3 files changed, 4 insertions(+), 11 deletions(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index aea4b4f..bf68d1f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,11 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 2 -# Configuration parameters: AllowSafeAssignment. -Lint/AssignmentInCondition: - Enabled: false - # Offense count: 1 Lint/HandleExceptions: Enabled: false diff --git a/lib/mediawiki-vagrant/config.rb b/lib/mediawiki-vagrant/config.rb index d4d33bb..db42097 100644 --- a/lib/mediawiki-vagrant/config.rb +++ b/lib/mediawiki-vagrant/config.rb @@ -88,9 +88,8 @@ def get_settings(names) configure do |settings| names.each do |name| - if setting = settings.setting(name) -@env.ui.info setting.value, :bold = setting.set? - end + setting = settings.setting(name) + @env.ui.info setting.value, :bold = setting.set? if setting end end end diff --git a/lib/mediawiki-vagrant/roles/info.rb b/lib/mediawiki-vagrant/roles/info.rb index f214111..7e81df0 100644 --- a/lib/mediawiki-vagrant/roles/info.rb +++ b/lib/mediawiki-vagrant/roles/info.rb @@ -41,9 +41,8 @@ settings = @mwv.load_settings roles.each do |role| - if doc = @mwv.role_docstring(role) -@env.ui.info rd.convert(doc) - end + doc = @mwv.role_docstring(role) + @env.ui.info rd.convert(doc) if doc changes = @mwv.load_settings(@mwv.roles_enabled + [role]) - settings -- To view, visit https://gerrit.wikimedia.org/r/233367 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icbc7acf88f8e60ab3343ba05f50f17f9bc21c2a7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Dont try to add bad users as publishers - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Dont try to add bad users as publishers .. Dont try to add bad users as publishers Previosuly this would give: Fatal error: Call to a member function isEmailConfirmed() SpecialNewsletterManage.php on line 201 Now instead we give a nice error message Change-Id: I6b787c43507721acb1ebd1834341d7570ee9a19e --- M includes/specials/SpecialNewsletterManage.php 1 file changed, 30 insertions(+), 24 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialNewsletterManage.php b/includes/specials/SpecialNewsletterManage.php index dfeba7e..001f721 100644 --- a/includes/specials/SpecialNewsletterManage.php +++ b/includes/specials/SpecialNewsletterManage.php @@ -198,34 +198,40 @@ if ( !empty( $formData['newsletter-name'] ) !empty( $formData['publisher-name'] ) ) { $pubNewsletterId = $formData['newsletter-name']; $user = User::newFromName( $formData['publisher-name'] ); - if ( $user-isEmailConfirmed() ) { - $dbww = wfGetDB( DB_MASTER ); - $rowData = array( - 'newsletter_id' = $pubNewsletterId, - 'publisher_id' = $user-getId(), - ); - //Automatically subscribe publishers to the newsletter - $subscribeRowData = array( - 'newsletter_id' = $pubNewsletterId, - 'subscriber_id' = $user-getId() - ); - try { - $dbww-insert( 'nl_publishers', $rowData, __METHOD__ ); - $this-getOutput()-addWikiMsg( 'newsletter-new-publisher-confirmation' ); - } - catch ( DBQueryError $e ) { - return array( 'newsletter-invalid-username-error' ); - } - try{ - $dbww-insert( 'nl_subscriptions', $subscribeRowData, __METHOD__ ); - } catch ( DBQueryError $ed ) { - } - return true; - } else { + if ( !$user || $user-isAnon() ) { + return array( 'newsletter-invalid-username-error' ); + } + + if ( !$user-isEmailConfirmed() ) { return array( 'newsletter-unconfirmed-email-error' ); } + $dbww = wfGetDB( DB_MASTER ); + $rowData = array( + 'newsletter_id' = $pubNewsletterId, + 'publisher_id' = $user-getId(), + ); + //Automatically subscribe publishers to the newsletter + $subscribeRowData = array( + 'newsletter_id' = $pubNewsletterId, + 'subscriber_id' = $user-getId(), + ); + try { + $dbww-insert( 'nl_publishers', $rowData, __METHOD__ ); + $this-getOutput()-addWikiMsg( 'newsletter-new-publisher-confirmation' ); + } + catch ( DBQueryError $e ) { + return array( 'newsletter-invalid-username-error' ); + } + try { + $dbww-insert( 'nl_subscriptions', $subscribeRowData, __METHOD__ ); + } + catch ( DBQueryError $ed ) { + } + + return true; + } return array( 'newsletter-required-fields-error' ); -- To view, visit https://gerrit.wikimedia.org/r/234303 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b787c43507721acb1ebd1834341d7570ee9a19e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove duplicate i18n en.json keys for desc - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Remove duplicate i18n en.json keys for desc .. Remove duplicate i18n en.json keys for desc Change-Id: Ie289e3b3eda19332e8ee75cfcb287e587ce30ab5 --- M i18n/en.json 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 0f7b24a..d32cf93 100755 --- a/i18n/en.json +++ b/i18n/en.json @@ -8,7 +8,6 @@ newslettercreate: Create newsletters, newslettermanage: Manage newsletters, newsletter-name: Name of newsletter, - newsletter-desc: Description, newsletter-title: Title of Main Page, newsletter-frequency: Frequency, newsletter-option-weekly: weekly, -- To view, visit https://gerrit.wikimedia.org/r/234304 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie289e3b3eda19332e8ee75cfcb287e587ce30ab5 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] small docs fixes - change (wikidata...rdf)
jenkins-bot has submitted this change and it was merged. Change subject: small docs fixes .. small docs fixes Change-Id: I063f6ee7d46146cc3845e873838d973c23a3adb0 --- M README.md M docs/getting-started.md 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Smalyshev: Looks good to me, approved Addshore: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/README.md b/README.md index 6eae4ac..fa486f1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Wikibase RDF Query == -Tools for Querying Wikibase instances with RDF. Two modules: +Tools for Querying Wikibase instances with RDF. The modules: * tools - Tools for syncing a Wikibase instance with an SPARQL 1.1 compliant triple store * Apache Licensed * blazegraph - Blazegraph extension to make querying Wikibase instances more efficient diff --git a/docs/getting-started.md b/docs/getting-started.md index 1460a61..a69084f 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -25,7 +25,7 @@ ``` . -├── blazegraph-service-0.0.2-dist.war +├── blazegraph-service-0.1.0-dist.war ├── docs ├── gui ├── jetty-runner-9.2.9.v20150224.jar -- To view, visit https://gerrit.wikimedia.org/r/234196 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I063f6ee7d46146cc3845e873838d973c23a3adb0 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: Smalyshev smalys...@wikimedia.org Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Smalyshev smalys...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve navigation on Newsletter special pages - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Improve navigation on Newsletter special pages .. Improve navigation on Newsletter special pages * Add navigation links to the special pages * Reworded success message on Special:CreateNewsletter to link to Special:ManageNewsletter. Also removed Good job! as this doesn't feel like a MediaWiki message. * Return to Main Page link on Special:ManageNewsletter has been removed as it does not belong here. Bug: T110515 Change-Id: Ib6e4dea683fce5ab7c4a7d2f7a080ccb3beb3fb3 --- M i18n/en.json M i18n/qqq.json M includes/specials/SpecialNewsletterCreate.php M includes/specials/SpecialNewsletterManage.php M includes/specials/SpecialNewsletters.php 5 files changed, 44 insertions(+), 6 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index cbdfce2..68d316a 100755 --- a/i18n/en.json +++ b/i18n/en.json @@ -26,9 +26,12 @@ newsletter-announceissueform-addpublisher-section: Add publishers, newsletter-create-section: Create newsletter, newsletter-create-submit: Create newsletter, - newsletter-create-confirmation: Good job! You just created a new newsletter., + newsletter-create-confirmation: A new newsletter has been successfully created. You can manage newsletters through [[Special:ManageNewsletter]]., newsletter-create-mainpage-error: Unknown Newsletter main page entered. Please try again, newsletter-issue-announce-confirmation: Good job! You just announced a new issue of your newsletter., + newsletter-subtitlelinks-list: List of newsletters, + newsletter-subtitlelinks-create: Create a new newsletter, + newsletter-subtitlelinks-manage: Manage newsletter, newsletters: Newsletters, newsletter-subscribe-section: Subscribe newsletters, newsletter-unsubscribe-section: Unsubscribe newsletters, diff --git a/i18n/qqq.json b/i18n/qqq.json index e0c30c3..a65d318 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -31,6 +31,9 @@ newsletter-create-confirmation: Confirmation message displayed after creation of a newsletter, newsletter-create-mainpage-error: Error message shown on [[Special:NewsletterCreate]] if the page entered on main page field does not exist., newsletter-issue-announce-confirmation: Confirmation message displayed after announcing a new issue, + newsletter-subtitlelinks-list: Label for link to [[Special:Newsletters]] shown under the header on Newsletter special pages.\n\nSee also:\n* {{msg-mw|newsletter-subtitlelinks-create}}\n*{{msg-mw|newsletter-subtitlelinks-manage}}, + newsletter-subtitlelinks-create: Label for link to [[Special:CreateNewsletter]] shown under the header on Newsletter special pages.\n\nSee also:\n* {{msg-mw|newsletter-subtitlelinks-list}}\n*{{msg-mw|newsletter-subtitlelinks-manage}}, + newsletter-subtitlelinks-manage: Label for link to [[Special:ManageNewsletter]] shown under the header on Newsletter special pages.\n\nSee also:\n* {{msg-mw|newsletter-subtitlelinks-create}}\n*{{msg-mw|newsletter-subtitlelinks-list}}, newsletters: Name of special page for user to subscribe to or unsubscribe from newsletters\n{{Identical|Newsletter}}, newsletter-subscribe-section: Section header of HTML form in [[Special:Newsletters]] which allows users to subscribe., newsletter-unsubscribe-section: Section header of HTML form in [[Special:Newsletters]] which allows users to un-subscribe., diff --git a/includes/specials/SpecialNewsletterCreate.php b/includes/specials/SpecialNewsletterCreate.php index c7ab161..9f4ff79 100644 --- a/includes/specials/SpecialNewsletterCreate.php +++ b/includes/specials/SpecialNewsletterCreate.php @@ -16,6 +16,7 @@ public function execute( $par ) { $this-requireLogin(); parent::execute( $par ); + $this-getOutput()-setSubtitle( SpecialNewsletters::getSubtitleLinks() ); } /** diff --git a/includes/specials/SpecialNewsletterManage.php b/includes/specials/SpecialNewsletterManage.php index 5ab1169..479d097 100644 --- a/includes/specials/SpecialNewsletterManage.php +++ b/includes/specials/SpecialNewsletterManage.php @@ -17,6 +17,7 @@ $output = $this-getOutput(); $output-addModules( 'ext.newsletter' ); $output-addModules( 'ext.newslettermanage' ); + $output-setSubtitle( SpecialNewsletters::getSubtitleLinks() ); $this-requireLogin(); $announceIssueArray = $this-getAnnounceFormFields(); @@ -40,7 +41,7 @@ } else { $output-showErrorPage( 'newslettermanage', 'newsletter-none-found' ); } - + $output-returnToMain(); } /** diff --git
[MediaWiki-commits] [Gerrit] Revert Load all CSS in the top queue - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Revert Load all CSS in the top queue .. Revert Load all CSS in the top queue I don't want to roll this out until our WebPageTest infrastructure is ready and can show whether or not this is beneficial. I should have indicated this clearly on the change rather than leave it open, sorry. This reverts commit b7c0e537ebb7216cd12a6c48fbaee7c2c7757c55. Change-Id: I43e3295873a94da1c2febe2c1a19ad20ca914254 --- M includes/OutputPage.php 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 80fd9ab..8d4720b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3073,6 +3073,10 @@ ResourceLoaderModule::TYPE_SCRIPTS ); + $links[] = $this-makeResourceLoaderLink( $this-getModuleStyles( true, 'bottom' ), + ResourceLoaderModule::TYPE_STYLES + ); + // Modules requests - let the client calculate dependencies and batch requests as it likes // Only load modules that have marked themselves for loading at the bottom $modules = $this-getModules( true, 'bottom' ); @@ -3664,7 +3668,7 @@ $otherTags = array(); // Tags to append after the normal link tags $resourceLoader = $this-getResourceLoader(); - $moduleStyles = $this-getModuleStyles( true ); + $moduleStyles = $this-getModuleStyles( true, 'top' ); // Per-site custom styles $moduleStyles[] = 'site'; -- To view, visit https://gerrit.wikimedia.org/r/234315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43e3295873a94da1c2febe2c1a19ad20ca914254 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove Main Page duplicate link on Special:NewsletterManage - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Remove Main Page duplicate link on Special:NewsletterManage .. Remove Main Page duplicate link on Special:NewsletterManage Change-Id: I8596661fbcf48d23c3661fa5f0b1b36e56cdfab6 --- M includes/specials/SpecialNewsletterManage.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialNewsletterManage.php b/includes/specials/SpecialNewsletterManage.php index 479d097..307b15a 100644 --- a/includes/specials/SpecialNewsletterManage.php +++ b/includes/specials/SpecialNewsletterManage.php @@ -41,7 +41,7 @@ } else { $output-showErrorPage( 'newslettermanage', 'newsletter-none-found' ); } - $output-returnToMain(); + } /** -- To view, visit https://gerrit.wikimedia.org/r/234326 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8596661fbcf48d23c3661fa5f0b1b36e56cdfab6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Glaisher glaisher.w...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] elasticseach: ferm for 27-31 - change (operations/puppet)
Rush has uploaded a new change for review. https://gerrit.wikimedia.org/r/234327 Change subject: elasticseach: ferm for 27-31 .. elasticseach: ferm for 27-31 Change-Id: Ia6f06903d048a4ffd0f56f7317433e217920176c --- M manifests/site.pp 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/27/234327/1 diff --git a/manifests/site.pp b/manifests/site.pp index f8a8cff..07ad3c5 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -855,7 +855,11 @@ role elasticsearch::server -if $::hostname =~ /^elastic102[3-6]$/ { +if $::hostname =~ /^elastic102[3-9]$/ { +include base::firewall +} + +if $::hostname =~ /^elastic103[0-1]$/ { include base::firewall } } -- To view, visit https://gerrit.wikimedia.org/r/234327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6f06903d048a4ffd0f56f7317433e217920176c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Rush r...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add tests to make sure special pages don't fatal - change (mediawiki...Newsletter)
jenkins-bot has submitted this change and it was merged. Change subject: Add tests to make sure special pages don't fatal .. Add tests to make sure special pages don't fatal Change-Id: I9a1bc8548540b026068601700d8c28268abc2d6b --- A tests/specials/SpecialNewsletterCreateTest.php A tests/specials/SpecialNewsletterManageTest.php A tests/specials/SpecialNewslettersTest.php 3 files changed, 42 insertions(+), 0 deletions(-) Approvals: 01tonythomas: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/specials/SpecialNewsletterCreateTest.php b/tests/specials/SpecialNewsletterCreateTest.php new file mode 100644 index 000..d26418d --- /dev/null +++ b/tests/specials/SpecialNewsletterCreateTest.php @@ -0,0 +1,14 @@ +?php + +class SpecialNewsletterCreateTest extends SpecialPageTestBase{ + + protected function newSpecialPage() { + return new SpecialNewsletterCreate(); + } + + public function testSpecialPageDoesNotFatal() { + $user = new TestUser( 'BlooBlaa' ); + $this-executeSpecialPage( '', null, null, $user-getUser() ); + $this-assertTrue( true ); + } +} diff --git a/tests/specials/SpecialNewsletterManageTest.php b/tests/specials/SpecialNewsletterManageTest.php new file mode 100644 index 000..c464bca --- /dev/null +++ b/tests/specials/SpecialNewsletterManageTest.php @@ -0,0 +1,14 @@ +?php + +class SpecialNewsletterManageTest extends SpecialPageTestBase{ + + protected function newSpecialPage() { + return new SpecialNewsletterManage(); + } + + public function testSpecialPageDoesNotFatal() { + $user = new TestUser( 'BlooBlaa' ); + $this-executeSpecialPage( '', null, null, $user-getUser() ); + $this-assertTrue( true ); + } +} diff --git a/tests/specials/SpecialNewslettersTest.php b/tests/specials/SpecialNewslettersTest.php new file mode 100644 index 000..e140bae --- /dev/null +++ b/tests/specials/SpecialNewslettersTest.php @@ -0,0 +1,14 @@ +?php + +class SpecialNewslettersTest extends SpecialPageTestBase{ + + protected function newSpecialPage() { + return new SpecialNewsletters(); + } + + public function testSpecialPageDoesNotFatal() { + $user = new TestUser( 'BlooBlaa' ); + $this-executeSpecialPage( '', null, null, $user-getUser() ); + $this-assertTrue( true ); + } +} -- To view, visit https://gerrit.wikimedia.org/r/234324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9a1bc8548540b026068601700d8c28268abc2d6b Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Extract some methods in SearchApi - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Extract some methods in SearchApi .. Extract some methods in SearchApi This improves the readability of this module. Bug: T110069 Change-Id: Id39125366afbf06c8cc0d798ec4171435c341005 --- M resources/mobile.search/SearchApi.js M tests/qunit/mobile.search/test_SearchApi.js 2 files changed, 102 insertions(+), 95 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, but someone else must approve Florianschmidtwelzow: Looks good to me, but someone else must approve Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mobile.search/SearchApi.js b/resources/mobile.search/SearchApi.js index 86b553e..f3fa82b 100644 --- a/resources/mobile.search/SearchApi.js +++ b/resources/mobile.search/SearchApi.js @@ -10,34 +10,6 @@ Api = M.require( 'api' ).Api; /** -* Escapes regular expression wildcards (metacharacters) by adding a \\ prefix -* @method -* @ignore -* @param {String} str a string -* @return {Object} a regular expression that can be used to search for that str -*/ - function createSearchRegEx( str ) { - str = str.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$' ); - return new RegExp( '^(' + str + ')', 'ig' ); - } - - /** -* Takes a label potentially beginning with term -* and highlights term if it is present with strong -* @method -* @private -* @param {String} label a piece of text -* @param {String} term a string to search for from the start -* @return {String} safe html string with matched terms encapsulated in strong tags -*/ - function highlightSearchTerm( label, term ) { - label = $( 'span' ).text( label ).html(); - term = $( 'span' ).text( term ).html(); - - return label.replace( createSearchRegEx( term ), 'strong$1/strong' ); - } - - /** * @class SearchApi * @extends Api */ @@ -79,16 +51,42 @@ }, /** +* Escapes regular expression wildcards (metacharacters) by adding a \\ prefix +* @param {String} str a string +* @return {Object} a regular expression that can be used to search for that str +* @private +*/ + _createSearchRegEx: function ( str ) { + str = str.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$' ); + return new RegExp( '^(' + str + ')', 'ig' ); + }, + + /** +* Takes a label potentially beginning with term +* and highlights term if it is present with strong +* @param {String} label a piece of text +* @param {String} term a string to search for from the start +* @return {String} safe html string with matched terms encapsulated in strong tags +* @private +*/ + _highlightSearchTerm: function ( label, term ) { + label = $( 'span' ).text( label ).html(); + term = $( 'span' ).text( term ).html(); + + return label.replace( this._createSearchRegEx( term ), 'strong$1/strong' ); + }, + + /** * Return data used for creating {Page} objects * @param {String} query to search for * @param {Object} info page info from the API -* @returns {Object} data needed to create a {Page} +* @return {Object} data needed to create a {Page} * @private */ _getPageData: function ( query, info ) { return { id: info.pageid, - displayTitle: highlightSearchTerm( info.title, query ), + displayTitle: this._highlightSearchTerm( info.title, query ), title: info.title, url: mw.util.getUrl( info.title ), thumbnail: info.thumbnail @@ -96,9 +94,79 @@ }, /** -* Perform a search for the given query. +* Process the data returned by the api call. * FIXME: remove filtering of redirects once the upstream bug has been fixed: * https://bugzilla.wikimedia.org/show_bug.cgi?id=73673 +* @param {String} query to search for +* @param {Object} data from api +* @return {Array} +* @private +*/ + _processData: function ( query, data ) { +
[MediaWiki-commits] [Gerrit] registration: Fix namespaces added through the ExtensionProc... - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/234328 Change subject: registration: Fix namespaces added through the ExtensionProcessor .. registration: Fix namespaces added through the ExtensionProcessor Using $wgExtraNamespaces overrides any localized namespaces with the canonical form, which is not ideal. Namespaces added through extension.json will now store the canonical form and numerical id in a 'ExtensionNamespaces' attribute that is read by MWNamespace::getCanonicalNamespaces(). Also fix the documentation on $wgExtraNamespaces, as using $wgCanonicalNamespaceNames has not been possible since r85327. Bug: T110389 Change-Id: I5bd9a7258f59d8c4a7ad0543d2115960fbea9b3a (cherry picked from commit 9df0672255afd255ce0af34f18b8ad596f3c3e35) --- M includes/DefaultSettings.php M includes/MWNamespace.php M includes/registration/ExtensionProcessor.php 3 files changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/28/234328/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 8d7dbc8..64e075d 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3726,8 +3726,8 @@ * Additional namespaces. If the namespaces defined in Language.php and * Namespace.php are insufficient, you can create new ones here, for example, * to import Help files in other languages. You can also override the namespace - * names of existing namespaces. Extensions developers should use - * $wgCanonicalNamespaceNames. + * names of existing namespaces. Extensions should use the CanonicalNamespaces + * hook or extension.json. * * @warning Once you delete a namespace, the pages in that namespace will * no longer be accessible. If you rename it, then you can access them through diff --git a/includes/MWNamespace.php b/includes/MWNamespace.php index 731b62e..8ca205a 100644 --- a/includes/MWNamespace.php +++ b/includes/MWNamespace.php @@ -210,6 +210,8 @@ if ( $namespaces === null || $rebuild ) { global $wgExtraNamespaces, $wgCanonicalNamespaceNames; $namespaces = array( NS_MAIN = '' ) + $wgCanonicalNamespaceNames; + // Add extension namespaces + $namespaces += ExtensionRegistry::getInstance()-getAttribute( 'ExtensionNamespaces' ); if ( is_array( $wgExtraNamespaces ) ) { $namespaces += $wgExtraNamespaces; } diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index 68e5a17..2c792da 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -213,7 +213,7 @@ foreach ( $info['namespaces'] as $ns ) { $id = $ns['id']; $this-defines[$ns['constant']] = $id; - $this-globals['wgExtraNamespaces'][$id] = $ns['name']; + $this-attributes['ExtensionNamespaces'][$id] = $ns['name']; if ( isset( $ns['gender'] ) ) { $this-globals['wgExtraGenderNamespaces'][$id] = $ns['gender']; } -- To view, visit https://gerrit.wikimedia.org/r/234328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bd9a7258f59d8c4a7ad0543d2115960fbea9b3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf20 Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Banner history logger: again, update EventLogging schema ver... - change (mediawiki...CentralNotice)
AndyRussG has uploaded a new change for review. https://gerrit.wikimedia.org/r/234329 Change subject: Banner history logger: again, update EventLogging schema version .. Banner history logger: again, update EventLogging schema version Change-Id: I2cdcb76d3c1c2bc8fd898d8dfe2b745836b8c370 --- M CentralNotice.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/29/234329/1 diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php index 008c497..dad09a1 100644 --- a/CentralNotice.hooks.php +++ b/CentralNotice.hooks.php @@ -474,6 +474,6 @@ * @return bool Always true */ function efCentralNoticeEventLoggingRegisterSchemas( $schemas ) { - $schemas['CentralNoticeBannerHistory'] = 13332718; + $schemas['CentralNoticeBannerHistory'] = 13344761; return true; } -- To view, visit https://gerrit.wikimedia.org/r/234329 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2cdcb76d3c1c2bc8fd898d8dfe2b745836b8c370 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: AndyRussG andrew.green...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable autocompletion for Special:ComparePages - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Enable autocompletion for Special:ComparePages .. Enable autocompletion for Special:ComparePages Bug: T26235 Change-Id: Ia55ff14ceeef4eb49facd42a71c6330dd3384eb8 --- M CREDITS M includes/specials/SpecialComparePages.php 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/CREDITS b/CREDITS index 5362286..44adc4f 100644 --- a/CREDITS +++ b/CREDITS @@ -230,6 +230,7 @@ * Simon Walker * Solitarius * Søren Løvborg +* Southparkfan * Srikanth Lakshmanan * Stefano Codari * Str4nd diff --git a/includes/specials/SpecialComparePages.php b/includes/specials/SpecialComparePages.php index da1a54c..0f8b729 100644 --- a/includes/specials/SpecialComparePages.php +++ b/includes/specials/SpecialComparePages.php @@ -50,10 +50,12 @@ $this-setHeaders(); $this-outputHeader(); + # Form (.mw-searchInput enables suggestions) $form = new HTMLForm( array( 'Page1' = array( 'type' = 'text', 'name' = 'page1', + 'cssclass' = 'mw-searchInput', 'label-message' = 'compare-page1', 'size' = '40', 'section' = 'page1', @@ -70,6 +72,7 @@ 'Page2' = array( 'type' = 'text', 'name' = 'page2', + 'cssclass' = 'mw-searchInput', 'label-message' = 'compare-page2', 'size' = '40', 'section' = 'page2', -- To view, visit https://gerrit.wikimedia.org/r/234306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia55ff14ceeef4eb49facd42a71c6330dd3384eb8 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Southparkfan southparkfan...@hotmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Southparkfan southparkfan...@hotmail.com Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make the list of possible top headings configurable - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/234331 Change subject: Make the list of possible top headings configurable .. Make the list of possible top headings configurable This is a very temporary implementation of a configurable list of possible html tags, that could be recognized as a so called top heading. Bug: T110436 Change-Id: Ifdeb51f47cc4e41692a95d38e4b0a64c1da6a472 --- M includes/MobileFormatter.php M includes/config/Experimental.php 2 files changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/31/234331/1 diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php index dff8d0e..3a9f0d8 100644 --- a/includes/MobileFormatter.php +++ b/includes/MobileFormatter.php @@ -19,6 +19,9 @@ /** @var string $headingTransformEnd String prefixes to be applied before and after section content. */ protected $headingTransformEnd = 'div'; + /** @var array $topHeadingTags Array of strings with possible tags, + can be recognized as top headings. */ + public $topHeadingTags = array(); /** * Saves a Title Object @@ -47,6 +50,8 @@ parent::__construct( $html ); $this-title = $title; + $this-topHeadingTags = MobileContext::singleton() + -getMFConfig()-get( 'MFMobileFormatterHeadings' ); } /** @@ -287,7 +292,11 @@ * @return string the tag name for the top level headings */ protected function findTopHeading( $html ) { - $tags = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ); + $tags = $this-topHeadingTags; + if ( !is_array( $tags ) ) { + throw new UnexpectedValueException( 'Possible top headings needs to be an array of strings, ' . + gettype( $tags ) . ' given.' ); + } foreach ( $tags as $tag ) { if ( strpos( $html, '' . $tag ) !== false ) { return $tag; diff --git a/includes/config/Experimental.php b/includes/config/Experimental.php index 1f0358a..a340132 100644 --- a/includes/config/Experimental.php +++ b/includes/config/Experimental.php @@ -40,3 +40,11 @@ * FIXME: This config is highly experimental and temporary only. Use it on your own risk! */ $wgMFNoLoginOverride = false; + +/** + * This is a list of html tags, that could be recognized as the first heading of a page. + * This is an interim solution to fix Bug T110436 and shouldn't be used, if you don't know, + * what you do. Moreover, this configuration variable will be removed in the near future + * (hopefully). + */ +$wgMFMobileFormatterHeadings = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ); -- To view, visit https://gerrit.wikimedia.org/r/234331 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifdeb51f47cc4e41692a95d38e4b0a64c1da6a472 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: wmf/1.26wmf20 Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Setup Gerrit role account for Phabricator actions - change (operations/puppet)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/234332 Change subject: Setup Gerrit role account for Phabricator actions .. Setup Gerrit role account for Phabricator actions Includes convenience class for writing standardized arcrc files for scripts to use. Change-Id: I7221c126a8a34fe9ddde495d84c52db0a8cde341 --- M manifests/role/phabricator.pp A modules/phabricator/manifests/arcrc.pp M modules/phabricator/manifests/tools.pp A modules/phabricator/templates/ackrc.erb 4 files changed, 50 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/32/234332/1 diff --git a/manifests/role/phabricator.pp b/manifests/role/phabricator.pp index 6d44c04..1e5331c 100644 --- a/manifests/role/phabricator.pp +++ b/manifests/role/phabricator.pp @@ -16,6 +16,8 @@ include passwords::phabricator $phabtools_cert= $passwords::phabricator::phabtools_cert $phabtools_user= $passwords::phabricator::phabtools_user +$gerritbot_cert= $passwords::phabricator::gerritbot_cert +$gerritbot_user= $passwords::phabricator::gerritbot_user } # production phabricator instance @@ -85,6 +87,8 @@ rt_pass= $role::phabricator::config::rt_pass, phabtools_cert = $role::phabricator::config::phabtools_cert, phabtools_user = $role::phabricator::config::phabtools_user, +gerritbot_cert = $role::phabricator::config::gerritbot_cert, +gerritbot_user = $role::phabricator::config::gerritbot_user, dump = true, } diff --git a/modules/phabricator/manifests/arcrc.pp b/modules/phabricator/manifests/arcrc.pp new file mode 100644 index 000..96e5b8b --- /dev/null +++ b/modules/phabricator/manifests/arcrc.pp @@ -0,0 +1,27 @@ +# == Class: phabricator::arcrc +# +# === Parameters +# +# [*rootdir*] +#Phabricator base directory +# [*user*] +#User who's arcrc file we're writing +# [*cert*] +#Their secret cert + +define phabricator::arcrc( + $rootdir = '/', + $user= '', + $cert= '', +) { + file { ${rootdir}/arcrc: + ensure = directory, + require = File[${rootdir}], + } + +file { ${rootdir}/arcrc/${user}.arcrc: +ensure = 'file', +content = template('phabricator/arcrc.erb'), +require = File[${rootdir}/arcrc], +} +} diff --git a/modules/phabricator/manifests/tools.pp b/modules/phabricator/manifests/tools.pp index 16c24bf..799321d 100644 --- a/modules/phabricator/manifests/tools.pp +++ b/modules/phabricator/manifests/tools.pp @@ -16,6 +16,8 @@ $rt_pass = '', $phabtools_cert= '', $phabtools_user= '', +$gerritbot_cert= '', +$gerritbot_user= '', $dump = false, ) { @@ -66,4 +68,10 @@ hour= '1', require = Git::Install['phabricator/tools'], } + +phabricator::arcrc { gerritbot: +rootdir = $::phabricator::phabdir, +user= $gerrit_bot_user, +cert= $gerrit_bot_cert, +} } diff --git a/modules/phabricator/templates/ackrc.erb b/modules/phabricator/templates/ackrc.erb new file mode 100644 index 000..b9fa23b --- /dev/null +++ b/modules/phabricator/templates/ackrc.erb @@ -0,0 +1,11 @@ +{ + hosts : { +https:\/\/phabricator.wikimedia.org\/api\/ : { + user : %= @user %, + cert : %= @cert % +} + }, + config : { +default : https:\/\/phabricator.wikimedia.org\/api\/ + } +} -- To view, visit https://gerrit.wikimedia.org/r/234332 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7221c126a8a34fe9ddde495d84c52db0a8cde341 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Chad ch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Drop bad ext. HTML and continue html2wt instead of returning... - change (mediawiki...parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/234333 Change subject: Drop bad ext. HTML and continue html2wt instead of returning HTTP 500 .. Drop bad ext. HTML and continue html2wt instead of returning HTTP 500 * On occasion, because of client bugs, we get ref tags that cannot be serialized properly (see T110479). * Instead of refusing to serialize the rest of the page, just drop such extensions on the floor and continue with the rest of the page. This at least prevents users from losing rest of their work because of failures to save the page. Change-Id: I3dd4b25c6ddbd77246871aa773f299e3a894d7ae --- M lib/mediawiki.WikitextSerializer.js 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/33/234333/1 diff --git a/lib/mediawiki.WikitextSerializer.js b/lib/mediawiki.WikitextSerializer.js index 37b6ab6..53ea27d 100644 --- a/lib/mediawiki.WikitextSerializer.js +++ b/lib/mediawiki.WikitextSerializer.js @@ -623,11 +623,12 @@ extraDebug = ' [reference ' + href + ' not found]'; } } - // Bail out of here since we cannot meaningfully recover - // from this without losing content and corrupting the page. - state.env.log(fatal/request, - extension src id + dataMW.body.id + points to non-existent element for: , - node.outerHTML + extraDebug); + + // Log an error and drop the extension call + state.env.log(error/ + extName, + extension src id + dataMW.body.id + points to non-existent element for:, + node.outerHTML, . Dropping the extension. More debug info: , extraDebug); + return ''; } } if (htmlText) { -- To view, visit https://gerrit.wikimedia.org/r/234333 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3dd4b25c6ddbd77246871aa773f299e3a894d7ae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] exim: temp hack to stop exim when on fermium - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/234318 Change subject: exim: temp hack to stop exim when on fermium .. exim: temp hack to stop exim when on fermium Add an ugly but temp. hack to ensure exim is NOT running when on fermium but leave it unchanged on all other hosts (sodium). This is to be able to apply the puppet role and test it for the migration without having exim send out any emails. Bug:T109925 Change-Id: I1e336990d6e836c8b3a4c5da3530eabfebbf57f5 --- M modules/exim4/manifests/init.pp 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/234318/1 diff --git a/modules/exim4/manifests/init.pp b/modules/exim4/manifests/init.pp index f1f043f..8849f99 100644 --- a/modules/exim4/manifests/init.pp +++ b/modules/exim4/manifests/init.pp @@ -37,8 +37,14 @@ default = true, } +if $::hostname == 'fermium' { +$eximrunning = 'stopped' +} else { +$eximrunning = 'running' +} + service { 'exim4': -ensure= running, +ensure= $eximrunning, hasstatus = $servicestatus, require = Package[exim4-daemon-${variant}], } -- To view, visit https://gerrit.wikimedia.org/r/234318 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e336990d6e836c8b3a4c5da3530eabfebbf57f5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits