[MediaWiki-commits] [Gerrit] make-release: Fix --no-previous - change (mediawiki...release)
Yuvipanda has submitted this change and it was merged. Change subject: make-release: Fix --no-previous .. make-release: Fix --no-previous It didn't actually work since nothing was checking it. Change-Id: I3be73ec6f68b96ff8b3d40316c3b779e203792f3 --- M make-release/make-release.py 1 file changed, 4 insertions(+), 5 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/make-release/make-release.py b/make-release/make-release.py index 5c58893..d79d7d1 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -368,8 +368,7 @@ return 1 else: noPrevious = True - -if noPrevious: +if noPrevious or options.no_previous: self.makeRelease( extensions=extensions, version=options.version, @@ -418,7 +417,7 @@ ['sh', '-c', 'cd ' + dir + '; git fetch -q --all']) else: print Cloning + label + into + dir + ... -proc = subprocess.Popen(['git', 'clone', '-q', repo, dir]) +proc = subprocess.Popen(['git', 'clone', repo, dir]) if proc.wait() != 0: print git clone failed, exiting @@ -589,7 +588,8 @@ ) # Patch -if prevVersion is not None: +haveI18n = False +if not self.options.no_previous and prevVersion is not None: prevDir = 'mediawiki-' + prevVersion self.export(versionToTag(prevVersion), prevDir, buildDir) @@ -601,7 +601,6 @@ buildDir, package + '.patch.gz', prevDir, package, 'normal') outFiles.append(package + '.patch.gz') print package + '.patch.gz written' -haveI18n = False if os.path.exists(package + '/languages/messages'): i18nPatch = 'mediawiki-i18n-' + version + '.patch.gz' if (self.makePatch( -- To view, visit https://gerrit.wikimedia.org/r/181035 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3be73ec6f68b96ff8b3d40316c3b779e203792f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@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] make-release: Rename and document some functions and add a test - change (mediawiki...release)
Yuvipanda has submitted this change and it was merged. Change subject: make-release: Rename and document some functions and add a test .. make-release: Rename and document some functions and add a test Use lowercase and underscores in the function names per python conventions, and do the same for variables. Write a test too! Change-Id: Id0e89ef6a2e152b451c1be947fc3dba1f76d33be --- M make-release/make-release.py A make-release/tests/test_make-release.py 2 files changed, 44 insertions(+), 12 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/make-release/make-release.py b/make-release/make-release.py index d79d7d1..c9317b2 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -20,8 +20,20 @@ import yaml -def getVersionExtensions(version, extensions=[]): -coreExtensions = [ +def get_extensions_for_version(version, extensions=None): + +Get the list of extensions to bundle for the given +MediaWiki core version + +:param version: A string like 1.21 +:param extensions: Extensions that are already being included +:type extensions: list +:return: List of extensions to include + +if extensions is None: +extensions = [] + +core_extensions = [ 'ConfirmEdit', 'Gadgets', 'Nuke', @@ -32,7 +44,7 @@ 'Vector', 'WikiEditor', ] -newExtensions = [ +new_extensions = [ 'Cite', 'ImageMap', 'Interwiki', @@ -44,7 +56,7 @@ 'SyntaxHighlight_GeSHi', 'SimpleAntiSpam', ] -oldCoreExtensions = [ +old_core_extensions = [ 'ConfirmEdit', 'Gadgets', 'Nuke', @@ -56,21 +68,27 @@ # Export extensions for inclusion if version '1.21': -extensions += coreExtensions + newExtensions +extensions += core_extensions + new_extensions elif version '1.20': -extensions += coreExtensions +extensions += core_extensions elif version '1.17': -extensions += oldCoreExtensions +extensions += old_core_extensions if version '1.22': extensions.remove('Vector') extensions.remove('SimpleAntiSpam') -# Return uniq elements (order not preserved) +# Return unique elements (order not preserved) return list(set(extensions)) -def versionToTag(version): +def get_tag_from_version(version): + +Get the tag to checkout from git + +:param version: A string like 1.21.0 +:return: string + return 'tags/' + version @@ -566,7 +584,7 @@ self.patchExport(patch, package) extExclude = [] -for ext in getVersionExtensions(version, extensions): +for ext in get_extensions_for_version(version, extensions): self.exportExtension(branch, ext, package) extExclude.append(--exclude) extExclude.append(extensions/ + ext) @@ -591,10 +609,10 @@ haveI18n = False if not self.options.no_previous and prevVersion is not None: prevDir = 'mediawiki-' + prevVersion -self.export(versionToTag(prevVersion), +self.export(get_tag_from_version(prevVersion), prevDir, buildDir) -for ext in getVersionExtensions(prevVersion, extensions): +for ext in get_extensions_for_version(prevVersion, extensions): self.exportExtension(branch, ext, prevDir) self.makePatch( diff --git a/make-release/tests/test_make-release.py b/make-release/tests/test_make-release.py new file mode 100644 index 000..77cf86b --- /dev/null +++ b/make-release/tests/test_make-release.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +import unittest +makerelease = __import__('make-release') + + +class MakeReleaseTest(unittest.TestCase): +def test_get_tag_from_version(self): +data = { +'1.21.3': 'tags/1.21.3', +'1.24.0': 'tags/1.24.0' +} +for version, tag in data.items(): +self.assertEqual(tag, makerelease.get_tag_from_version(version)) -- To view, visit https://gerrit.wikimedia.org/r/181036 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id0e89ef6a2e152b451c1be947fc3dba1f76d33be Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@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] make-release: Use three double quotes for docstrings - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: make-release: Use three double quotes for docstrings .. make-release: Use three double quotes for docstrings Change-Id: Id253c3a98d3bb5ee0b26b9f8f55a0a43948ae761 --- M make-release/make-release.py 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/make-release/make-release.py b/make-release/make-release.py index c9317b2..d9ec895 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -185,7 +185,7 @@ class MwVersion(object): -Abstract out a MediaWiki version +Abstract out a MediaWiki version def __init__(self, version): decomposed = self.decomposeVersion(version) @@ -215,7 +215,7 @@ ) def decomposeVersion(self, version): -'''Split a version number to branch / major +Split a version number to branch / major Whenever a version is recognized, a dict is returned with keys: - major (ie 1.22) @@ -232,7 +232,7 @@ - cycle Default: {} -''' + ret = {} if version is None: @@ -323,7 +323,7 @@ class MakeRelease(object): -Surprisingly: do a MediaWiki release +Surprisingly: do a MediaWiki release options = None version = None # MwVersion object -- To view, visit https://gerrit.wikimedia.org/r/181037 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id253c3a98d3bb5ee0b26b9f8f55a0a43948ae761 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@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] make-release: Explicitly close the opened config file, valid... - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: make-release: Explicitly close the opened config file, validate yaml .. make-release: Explicitly close the opened config file, validate yaml Adds a test to validate that make-release.yaml is valid according to PyYAML. Change-Id: I3356ab025928c21314bf4c6c2bdab9cb9801fc7b --- M make-release/make-release.py A make-release/tests/test_make-release-yaml.py 2 files changed, 18 insertions(+), 2 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/make-release/make-release.py b/make-release/make-release.py index d9ec895..a6e0f26 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -337,8 +337,8 @@ print Configuration file not found: %s % self.options.conffile sys.exit(1) -# TODO we should validate the YAML configuration file -self.config = yaml.load(open(self.options.conffile)) +with open(self.options.conffile) as f: +self.config = yaml.load(f) def main(self): return value should be usable as an exit code diff --git a/make-release/tests/test_make-release-yaml.py b/make-release/tests/test_make-release-yaml.py new file mode 100644 index 000..c21252f --- /dev/null +++ b/make-release/tests/test_make-release-yaml.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +import os +import unittest +import yaml + + +class MakeReleaseYamlTest(unittest.TestCase): +fname = os.path.dirname(os.path.dirname(__file__)) + '/make-release.yaml' + +def test_valid_syntax(self): +with open(self.fname) as f: +yaml.load(f) + +# No exception raised +self.assertTrue(True) -- To view, visit https://gerrit.wikimedia.org/r/181038 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3356ab025928c21314bf4c6c2bdab9cb9801fc7b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@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] make-release: Actually use the logging module - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: make-release: Actually use the logging module .. make-release: Actually use the logging module The script had arguments like --debug and --quiet, but nothing actually used them. Information about what the script was going to do were converted to debug statements (not displayed by default). Things the script had completed are at info level (displayed by default, quietable). All errors are at error level. I left the ask function and the email template as print statements since those should always go to stdout. Finally, this should make the transition to python3 easier. Change-Id: I5e9d4b4ecc17595846d9764def733deec8f992b7 --- M make-release/make-release.py M tox.ini 2 files changed, 40 insertions(+), 39 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/make-release/make-release.py b/make-release/make-release.py index a6e0f26..aaf68d3 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -334,7 +334,7 @@ self.options = options if not os.path.isfile(self.options.conffile): -print Configuration file not found: %s % self.options.conffile +logging.error(Configuration file not found: %s, self.options.conffile) sys.exit(1) with open(self.options.conffile) as f: @@ -346,11 +346,10 @@ extensions = [] bundles = self.config.get('bundles', {}) -print Doing release for %s % self.version +logging.info(Doing release for %s, self.version) if self.version.branch is None: -print No branch, assuming '%s'. Override with --branch. % ( - options.branch) +logging.debug(No branch, assuming '%s'. Override with --branch., options.branch) self.version.branch = options.branch # No version specified, assuming a snapshot release @@ -381,8 +380,7 @@ if self.version.prev_version is None: if not self.ask(No previous release found. Do you want to make a release with no patch?): -print('Please specify the correct previous release ' - 'on the command line') +logging.error('Please specify the correct previous release on the command line') return 1 else: noPrevious = True @@ -394,8 +392,7 @@ else: if not self.ask(Was %s the previous release? % self.version.prev_version): -print('Please specify the correct previous release ' - 'on the command line') +logging.error('Please specify the correct previous release on the command line') return 1 self.makeRelease( @@ -421,34 +418,34 @@ def getGit(self, repo, dir, label, branch): oldDir = os.getcwd() if os.path.exists(repo): -print Updating local %s % repo +logging.debug(Updating local %s, repo) proc = subprocess.Popen(['git', 'remote', 'update'], cwd=repo) if proc.wait() != 0: -print Could not update local repository %s % repo +logging.error(Could not update local repository %s, repo) sys.exit(1) if not self.options.offline: if os.path.exists(dir): -print Updating + label + in + dir + ... +logging.debug(Updating %s in %s..., label, dir) proc = subprocess.Popen( ['sh', '-c', 'cd ' + dir + '; git fetch -q --all']) else: -print Cloning + label + into + dir + ... +logging.info(Cloning %s into %s..., label, dir) proc = subprocess.Popen(['git', 'clone', repo, dir]) if proc.wait() != 0: -print git clone failed, exiting +logging.error(git clone failed, exiting) sys.exit(1) os.chdir(dir) if branch != 'master' and branch is not None: -print Checking out %s in %s... % (branch, dir) +logging.debug(Checking out %s in %s..., branch, dir) proc = subprocess.Popen(['git', 'checkout', branch]) if proc.wait() != 0: -print git checkout failed, exiting +logging.error(git checkout failed, exiting) sys.exit(1) os.chdir(oldDir) @@ -458,18 +455,18 @@ gitRoot = self.options.gitroot os.chdir(dir) -print Applying patch %s % patch +logging.debug(Applying patch %s, patch) # git fetch the reference from Gerrit and cherry-pick it proc = subprocess.Popen(['git', 'fetch', gitRoot +
[MediaWiki-commits] [Gerrit] make-release: Use print_function from the __future__ - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: make-release: Use print_function from the __future__ .. make-release: Use print_function from the __future__ Necessary for python3 compatability Change-Id: Ie1559118e589f9f49938496295ab4b3a828c0019 --- M make-release/make-release.py 1 file changed, 32 insertions(+), 32 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/make-release/make-release.py b/make-release/make-release.py index aaf68d3..906a081 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # vim:sw=4:ts=4:et: - +from __future__ import print_function Helper to generate a MediaWiki tarball. @@ -406,14 +406,14 @@ return True while True: -print question + ' [y/n] ', +print(question + ' [y/n] ') response = sys.stdin.readline() if len(response) 0: if response[0].lower() == 'y': return True elif response[0].lower() == 'n': return False -print 'Please type y for yes or n for no' +print('Please type y for yes or n for no') def getGit(self, repo, dir, label, branch): oldDir = os.getcwd() @@ -652,48 +652,48 @@ return 1 # Write email template -print -print Full release notes: +print() +print(Full release notes:) url = ('https://git.wikimedia.org/blob/mediawiki%2Fcore.git/' + branch + '/RELEASE-NOTES') if dir '1.17': url += '-' + dir -print url -print 'https://www.mediawiki.org/wiki/Release_notes/' + dir -print -print -print '*' * 70 +print(url) +print('https://www.mediawiki.org/wiki/Release_notes/' + dir) +print() +print() +print('*' * 70) -print 'Download:' -print ('http://download.wikimedia.org/mediawiki/' - + dir + '/' + package + '.tar.gz') -print +print('Download:') +print('http://download.wikimedia.org/mediawiki/' + + dir + '/' + package + '.tar.gz') +print() if prevVersion is not None: if haveI18n: -print (Patch to previous version ( + prevVersion - + ), without interface text:) -print ('http://download.wikimedia.org/mediawiki/' - + dir + '/' + package + '.patch.gz') -print Interface text changes: -print ('http://download.wikimedia.org/mediawiki/' - + dir + '/' + i18nPatch) +print(Patch to previous version ( + prevVersion + + ), without interface text:) +print('http://download.wikimedia.org/mediawiki/' + + dir + '/' + package + '.patch.gz') +print(Interface text changes:) +print('http://download.wikimedia.org/mediawiki/' + + dir + '/' + i18nPatch) else: -print Patch to previous version ( + prevVersion + ): -print ('http://download.wikimedia.org/mediawiki/' - + dir + '/' + package + '.patch.gz') -print +print(Patch to previous version ( + prevVersion + ):) +print('http://download.wikimedia.org/mediawiki/' + + dir + '/' + package + '.patch.gz') +print() -print 'GPG signatures:' +print('GPG signatures:') for fileName in outFiles: -print ('http://download.wikimedia.org/mediawiki/' - + dir + '/' + fileName + '.sig') -print +print('http://download.wikimedia.org/mediawiki/' + + dir + '/' + fileName + '.sig') +print() -print 'Public keys:' -print 'https://www.mediawiki.org/keys/keys.html' -print +print('Public keys:') +print('https://www.mediawiki.org/keys/keys.html') +print() os.chdir('..') return 0 -- To view, visit https://gerrit.wikimedia.org/r/181040 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1559118e589f9f49938496295ab4b3a828c0019 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@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] make-release: Use as when catching exceptions - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: make-release: Use as when catching exceptions .. make-release: Use as when catching exceptions as is valid python2.7, but necessary in python3 Change-Id: Ida914e11d906d6c87e0b00726f824c97d04351a0 --- M make-release/make-release.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/make-release/make-release.py b/make-release/make-release.py index 906a081..ca3bddd 100755 --- a/make-release/make-release.py +++ b/make-release/make-release.py @@ -631,7 +631,7 @@ try: proc = subprocess.Popen([ 'gpg', '--detach-sign', buildDir + '/' + fileName]) -except OSError, e: +except OSError as e: logging.error(gpg failed, does it exist? Skip with --dont-sign.) logging.error(Error %s: %s, e.errno, e.strerror) sys.exit(1) -- To view, visit https://gerrit.wikimedia.org/r/181041 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida914e11d906d6c87e0b00726f824c97d04351a0 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@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] Cleanup SiteListFileCache test files in tearDown - change (mediawiki/core)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/181047 Change subject: Cleanup SiteListFileCache test files in tearDown .. Cleanup SiteListFileCache test files in tearDown Change-Id: I5eb4379671cde45f70bb03d4634f9f34495a6b29 --- M tests/phpunit/includes/site/SiteListFileCacheBuilderTest.php M tests/phpunit/includes/site/SiteListFileCacheTest.php 2 files changed, 30 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/181047/1 diff --git a/tests/phpunit/includes/site/SiteListFileCacheBuilderTest.php b/tests/phpunit/includes/site/SiteListFileCacheBuilderTest.php index af02429..c7d157f 100644 --- a/tests/phpunit/includes/site/SiteListFileCacheBuilderTest.php +++ b/tests/phpunit/includes/site/SiteListFileCacheBuilderTest.php @@ -30,13 +30,21 @@ */ class SiteListFileCacheBuilderTest extends PHPUnit_Framework_TestCase { - public function testBuild() { - $cacheFile = $this-getCacheFile(); + private static $cacheFile; - $cacheBuilder = $this-newSiteListFileCacheBuilder( $this-getSites(), $cacheFile ); + protected function setUp() { + self::$cacheFile = $this-getCacheFile(); + } + + protected function tearDown() { + unlink( self::$cacheFile ); + } + + public function testBuild() { + $cacheBuilder = $this-newSiteListFileCacheBuilder( $this-getSites() ); $cacheBuilder-build(); - $contents = file_get_contents( $cacheFile ); + $contents = file_get_contents( self::$cacheFile ); $this-assertEquals( json_encode( $this-getExpectedData() ), $contents ); } @@ -85,10 +93,10 @@ ); } - private function newSiteListFileCacheBuilder( SiteList $sites, $cacheFile ) { + private function newSiteListFileCacheBuilder( SiteList $sites ) { return new SiteListFileCacheBuilder( $this-getSiteSQLStore( $sites ), - $cacheFile + self::$cacheFile ); } diff --git a/tests/phpunit/includes/site/SiteListFileCacheTest.php b/tests/phpunit/includes/site/SiteListFileCacheTest.php index b598eed..d5fb827 100644 --- a/tests/phpunit/includes/site/SiteListFileCacheTest.php +++ b/tests/phpunit/includes/site/SiteListFileCacheTest.php @@ -30,33 +30,39 @@ */ class SiteListFileCacheTest extends PHPUnit_Framework_TestCase { - public function testGetSites() { - $cacheFile = $this-getCacheFile(); + private static $cacheFile; + protected function setUp() { + self::$cacheFile = $this-getCacheFile(); + } + + protected function tearDown() { + unlink( self::$cacheFile ); + } + + public function testGetSites() { $sites = $this-getSites(); - $cacheBuilder = $this-newSiteListFileCacheBuilder( $sites, $cacheFile ); + $cacheBuilder = $this-newSiteListFileCacheBuilder( $sites ); $cacheBuilder-build(); - $cache = new SiteListFileCache( $cacheFile ); + $cache = new SiteListFileCache( self::$cacheFile ); $this-assertEquals( $sites, $cache-getSites() ); } public function testGetSite() { - $cacheFile = $this-getCacheFile(); - $sites = $this-getSites(); - $cacheBuilder = $this-newSiteListFileCacheBuilder( $sites, $cacheFile ); + $cacheBuilder = $this-newSiteListFileCacheBuilder( $sites ); $cacheBuilder-build(); - $cache = new SiteListFileCache( $cacheFile ); + $cache = new SiteListFileCache( self::$cacheFile ); $this-assertEquals( $sites-getSite( 'enwiktionary' ), $cache-getSite( 'enwiktionary' ) ); } - private function newSiteListFileCacheBuilder( SiteList $sites, $cacheFile ) { + private function newSiteListFileCacheBuilder( SiteList $sites ) { return new SiteListFileCacheBuilder( $this-getSiteSQLStore( $sites ), - $cacheFile + self::$cacheFile ); } -- To view, visit https://gerrit.wikimedia.org/r/181047 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5eb4379671cde45f70bb03d4634f9f34495a6b29 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Sentry] [PageNotice] Register extension - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [Sentry] [PageNotice] Register extension .. [Sentry] [PageNotice] Register extension Change-Id: I02f3279753952ceb3c395ac0f88a26a5598bfb12 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index caa24c8..af1e236 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -1486,6 +1486,8 @@ Page Language +Page Notice + Page Schemas aliasfile = PageSchemas/PageSchemas.i18n.alias.php descmsg = ps-desc @@ -1890,6 +1892,8 @@ aliasfile = SemanticWebBrowser/SemanticWebBrowser.alias.php optional = swb_browse_more +Sentry + Shared Css Js Short Url -- To view, visit https://gerrit.wikimedia.org/r/181048 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02f3279753952ceb3c395ac0f88a26a5598bfb12 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Sentry] [PageNotice] Register extension - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/181048 Change subject: [Sentry] [PageNotice] Register extension .. [Sentry] [PageNotice] Register extension Change-Id: I02f3279753952ceb3c395ac0f88a26a5598bfb12 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/48/181048/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index caa24c8..af1e236 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -1486,6 +1486,8 @@ Page Language +Page Notice + Page Schemas aliasfile = PageSchemas/PageSchemas.i18n.alias.php descmsg = ps-desc @@ -1890,6 +1892,8 @@ aliasfile = SemanticWebBrowser/SemanticWebBrowser.alias.php optional = swb_browse_more +Sentry + Shared Css Js Short Url -- To view, visit https://gerrit.wikimedia.org/r/181048 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02f3279753952ceb3c395ac0f88a26a5598bfb12 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (TR #2121) fr and he TY updates - change (wikimedia...crm)
Pcoombe has submitted this change and it was merged. Change subject: (TR #2121) fr and he TY updates .. (TR #2121) fr and he TY updates Change-Id: Ibe6ce2241ccd90862a48f4702b7d10fb9b165968 --- M sites/all/modules/thank_you/templates/html/thank_you.fr.html M sites/all/modules/thank_you/templates/html/thank_you.he.html 2 files changed, 21 insertions(+), 19 deletions(-) Approvals: Pcoombe: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/thank_you/templates/html/thank_you.fr.html b/sites/all/modules/thank_you/templates/html/thank_you.fr.html index e55f6ed..13888b8 100644 --- a/sites/all/modules/thank_you/templates/html/thank_you.fr.html +++ b/sites/all/modules/thank_you/templates/html/thank_you.fr.html @@ -5,17 +5,17 @@ pCher donateur, chère donatrice,/p {%endif%} -pMerci pour votre don inestimable d'apporter la connaissance à chaque être humain, partout dans le monde./p +pMerci pour l’inestimable don que vous faites en apportant la connaissance à chaque être humain, partout dans le monde./p -p{% if RecurringRestarted in contribution_tags %} Nous avons récemment résolu un petit problème technique qui interrompait certains dons mensuels. Nous avons rétabli votre don mensuel, et il continuera désormais normalement. Nous ne vous facturerons pas les mois qui ont été sautés. Nous vous remercions de votre patience et de votre soutien, et nous vous prions de ne pas hésiter à contacter don...@wikimedia.org si vous avez les moindres questions. {%endif%}/p +p{% if RecurringRestarted in contribution_tags %} Nous avons récemment résolu un petit problème technique qui interrompait certains dons mensuels. Nous avons rétabli votre don mensuel, et il continuera désormais normalement. Nous ne vous facturerons pas les mois qui ont été omis. Nous vous remercions de votre patience et de votre soutien, et nous vous prions de ne pas hésiter à contacter don...@wikimedia.org si vous avez une quelconque question. {%endif%}/p -p{% if UnrecordedCharge in contribution_tags %} Nous avons récemment résolu un problème technique ayant eu pour effet qu’un petit nombre de donateurs n’ont pas reçu de confirmation de leur don. Veuillez accepter ce courriel en remerciement pour votre don du {{ receive_date }}. Nous apprécions votre patience et votre soutien et n’hésitez pas à nous écrire à don...@wikimedia.org si vous avez des questions. {%endif%}/p +p{% if UnrecordedCharge in contribution_tags %} Nous avons récemment résolu un problème technique ayant entraîné l’absence de confirmation de don pour un nombre restreint de donateurs. Veuillez accepter ce courriel en remerciement pour votre don du {{ receive_date }}. Nous apprécions votre patience et votre soutien et n’hésitez pas à nous écrire à don...@wikimedia.org si vous avez des questions. {%endif%}/p -pJe m’appelle Lila Tretikov et je suis la directrice générale de la Fondation Wikimédia. Durant l'année dernière, les dons comme le vôtre ont soutenu nos efforts pour développer l’encyclopédie en 287 langues et pour la rendre plus accessible à travers le monde entier. Nous nous efforçons d'avoir de l'incidence sur ceux qui n’auraient autrement pas accès à l’éducation. Nous apportons la connaissance à des personnes comme Akshaya Iyengar, de Solapur en Inde. Ayant grandi dans cette petite ville manufacturière de textile, elle a utilisé Wikipédia comme principale source d’apprentissage. Pour les étudiants dans ces régions, où les livres sont rares mais où il existe un accès à l’Internet mobile, Wikipédia est essentiel. Akshaya est allée faire des études universitaires en Inde et travaille maintenant comme développeuse de logiciels aux États-Unis. Elle attribue à Wikipédia la moitié de ses connaissances actuelles./p +pJe m’appelle Lila Tretikov et je suis la directrice générale de la Fondation Wikimédia. Au cours de l'année passée, les dons comme le vôtre ont soutenu nos efforts pour développer l’encyclopédie en 287 langues et pour la rendre plus accessible à travers le monde entier. Nous nous efforçons d'avoir de l'incidence sur ceux qui n’auraient autrement pas accès à l’éducation. Nous apportons la connaissance à des personnes comme Akshaya Iyengar, de Solapur en Inde. Ayant grandi dans cette petite ville manufacturière de textile, elle a utilisé Wikipédia comme principale source d’apprentissage. Pour les étudiants dans ces régions, où les livres sont rares mais où il existe un accès à l’Internet mobile, Wikipédia est essentiel. Akshaya est allée faire des études universitaires en Inde et travaille maintenant comme développeuse de logiciels aux États-Unis. Elle attribue à Wikipédia la moitié de ses connaissances actuelles./p -pCette histoire n’est pas unique. Notre mission est importante et présente de grands défis. La plupart des personnes qui utilisent Wikipédia sont surprises d’apprendre que Wikipedia est dirigé par une
[MediaWiki-commits] [Gerrit] [WIP] UDF for identifying if a request meets the legacy page... - change (analytics...source)
OliverKeyes has uploaded a new change for review. https://gerrit.wikimedia.org/r/181049 Change subject: [WIP] UDF for identifying if a request meets the legacy pageview definition. .. [WIP] UDF for identifying if a request meets the legacy pageview definition. This is very much a work in practise, by which I mean the most you can say about it is that it compiles. It still needs proper test integration and an actual UDF. It would be enhanced by someone working out how we go about integrating the test datasets in a non-painful way (that may be dependent on Otto's branch getting merged). Change-Id: Iaf376e702806d664332d87a69cc34cb7e4c9f095 --- M refinery-core/pom.xml A refinery-core/src/main/java/org/wikimedia/analytics/refinery/LegacyPageview.java A refinery-core/src/test/java/org/wikimedia/mediawiki/TestLegacyPageview.java A refinery-core/src/test/resources/legacy_pageview_test_data.csv 4 files changed, 188 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery/source refs/changes/49/181049/1 diff --git a/refinery-core/pom.xml b/refinery-core/pom.xml index e69de29..d81f982 100644 --- a/refinery-core/pom.xml +++ b/refinery-core/pom.xml @@ -0,0 +1,67 @@ +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; + modelVersion4.0.0/modelVersion + + parent + groupIdorg.wikimedia.analytics.refinery/groupId + artifactIdrefinery/artifactId + version0.0.3-SNAPSHOT/version + /parent + + groupIdorg.wikimedia.analytics.refinery.core/groupId + artifactIdrefinery-core/artifactId + nameWikimedia Analytics Refinery Core/name + packagingjar/packaging + + dependencies + dependency + groupIdorg.apache.hadoop/groupId + artifactIdhadoop-common/artifactId + /dependency + + dependency + groupIdorg.apache.hadoop/groupId + artifactIdhadoop-client/artifactId + version2.3.0-cdh5.0.2/version + /dependency + + dependency + groupIdjunit/groupId + artifactIdjunit/artifactId + version4.11/version + scopetest/scope + /dependency + + dependency + groupIdpl.pragmatists/groupId + artifactIdJUnitParams/artifactId + version1.0.3/version + scopetest/scope + /dependency + + /dependencies + + build + plugins + plugin + groupIdorg.apache.maven.plugins/groupId + artifactIdmaven-shade-plugin/artifactId + version2.0/version + configuration + shadedArtifactAttachedfalse/shadedArtifactAttached + /configuration + executions + execution + phasepackage/phase + goals + goalshade/goal + /goals + configuration + createDependencyReducedPomfalse/createDependencyReducedPom + /configuration + /execution + /executions + /plugin + /plugins + /build +/project diff --git a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/LegacyPageview.java b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/LegacyPageview.java new file mode 100644 index 000..ad93a2e --- /dev/null +++ b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/LegacyPageview.java @@ -0,0 +1,81 @@ +// Copyright 2014 Wikimedia Foundation +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.wikimedia.analytics.refinery.core; + +import java.util.regex.Pattern; +import java.util.HashSet; +import java.util.Arrays; + +/** + * Static functions to work wtih Wikimedia webrequest data. + * This class was orignally created while reading https://gist.github.com/Ironholds/96558613fe38dd4d1961 + */ +public class LegacyPageview { + +private static final Pattern acceptedUriHostsPattern = Pattern.compile( + \\.(wik(ipedia|ibooks|tionary|imediafoundation|inews|iquote|isource|iversity|ivoyage|idata)|mediawiki)\\.org$ +); + +private static final Pattern acceptedMetaUriHostsPattern = Pattern.compile( +
[MediaWiki-commits] [Gerrit] Add tests for the Category class - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add tests for the Category class .. Add tests for the Category class Move category-related tests from page_tests to the new category_tests.py, implement tests for sortKey, categoryinfo, members, subcategories and articles. A very odd issue was found with subcategories() not returning certain subcategories: T84860 Many of the tests introduced reference specific en.wikipedia categories. They have been chosen for being the most likely to remain stable - many of them date from 2004-2005 so the risk should be low. Bug: T78231 Change-Id: I6e42a3a0ccb9efc85abdd411ee8c35a44603dba0 --- M tests/__init__.py A tests/category_tests.py M tests/page_tests.py 3 files changed, 204 insertions(+), 25 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/__init__.py b/tests/__init__.py index cd5ef45..bd6e9c5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -73,6 +73,7 @@ 'link', 'interwiki_link', 'page', +'category', 'file', 'edit_failure', 'timestripper', diff --git a/tests/category_tests.py b/tests/category_tests.py new file mode 100644 index 000..6ba5abb --- /dev/null +++ b/tests/category_tests.py @@ -0,0 +1,203 @@ +# -*- coding: utf-8 -*- +Tests for the Category class. +# +# (C) Pywikibot team, 2008-2014 +# +# Distributed under the terms of the MIT license. +# +__version__ = '$Id$' + +import pywikibot +import pywikibot.page + +from tests.aspects import unittest, TestCase +from tests.utils import allowed_failure + + +class TestCategoryObject(TestCase): + +Test Category object. + +family = 'wikipedia' +code = 'en' + +cached = True + +def test_init(self): +Test the category's __init__ for one condition that can't be dry. +site = self.get_site() +self.assertRaises(ValueError, pywikibot.Category, site, 'Wikipedia:Test') + +def test_is_empty(self): +Test if category is empty or not. +site = self.get_site() +cat_empty = pywikibot.Category(site, 'Category:foo') +cat_not_empty = pywikibot.Category(site, 'Category:Wikipedia categories') +self.assertTrue(cat_empty.isEmptyCategory()) +self.assertFalse(cat_not_empty.isEmptyCategory()) + +def test_is_hidden(self): +Test isHiddenCategory. +site = self.get_site() +cat_hidden = pywikibot.Category(site, 'Category:Hidden categories') +cat_not_hidden = pywikibot.Category(site, 'Category:Wikipedia categories') +self.assertTrue(cat_hidden.isHiddenCategory()) +self.assertFalse(cat_not_hidden.isHiddenCategory()) + +def test_categoryinfo(self): +Test the categoryinfo property. +site = self.get_site() +cat = pywikibot.Category(site, 'Category:Female Wikipedians') +categoryinfo = cat.categoryinfo +self.assertTrue(categoryinfo['files'] = 0) +self.assertTrue(categoryinfo['pages'] = 0) +self.assertTrue(categoryinfo['size'] 0) +self.assertTrue(categoryinfo['subcats'] 0) +members_sum = categoryinfo['files'] + categoryinfo['pages'] + categoryinfo['subcats'] +self.assertEqual(members_sum, categoryinfo['size']) + +cat_files = pywikibot.Category(site, 'Category:Files lacking an author') +categoryinfo2 = cat_files.categoryinfo +self.assertTrue(categoryinfo2['files'] 0) + +def test_members(self): +Test the members method. +site = self.get_site() +cat = pywikibot.Category(site, 'Category:Wikipedia legal policies') +p1 = pywikibot.Page(site, 'Category:Wikipedia disclaimers') +p2 = pywikibot.Page(site, 'Wikipedia:Terms of use') +p3 = pywikibot.Page(site, 'Wikipedia:Risk disclaimer') + +members = list(cat.members()) +self.assertIn(p1, members) +self.assertIn(p2, members) +self.assertNotIn(p3, members) + +members_recurse = list(cat.members(recurse=True)) +self.assertIn(p1, members_recurse) +self.assertIn(p2, members_recurse) +self.assertIn(p3, members_recurse) + +members_namespace = list(cat.members(namespaces=14)) +self.assertIn(p1, members_namespace) +self.assertNotIn(p2, members_namespace) +self.assertNotIn(p3, members_namespace) + +members_total = list(cat.members(total=2)) +self.assertEqual(len(members_total), 2) + +def test_subcategories(self): +Test the subcategories method. +site = self.get_site() +cat = pywikibot.Category(site, 'Category:Wikipedians by gender') +c1 = pywikibot.Category(site, 'Category:Female Wikipedians') +c2 = pywikibot.Category(site, 'Category:Lesbian Wikipedians') + +subcategories = list(cat.subcategories()) +self.assertIn(c1, subcategories) +
[MediaWiki-commits] [Gerrit] Temporarily re-add JsonSchemaContent::getJsonData - change (mediawiki...EventLogging)
jenkins-bot has submitted this change and it was merged. Change subject: Temporarily re-add JsonSchemaContent::getJsonData .. Temporarily re-add JsonSchemaContent::getJsonData To avoid tests failing due to deprecation notices. Change-Id: I4bc22edf255b75849c940e70066c30107575477f --- M includes/JsonSchemaContent.php 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: QChris: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/JsonSchemaContent.php b/includes/JsonSchemaContent.php index 96e5709..22b53f8 100644 --- a/includes/JsonSchemaContent.php +++ b/includes/JsonSchemaContent.php @@ -52,6 +52,14 @@ } /** +* Decodes the JSON schema into a PHP associative array. +* @return array: Schema array. +*/ + function getJsonData() { + return FormatJson::decode( $this-getNativeData(), true ); + } + + /** * @throws JsonSchemaException: If invalid. * @return bool: True if valid. */ -- To view, visit https://gerrit.wikimedia.org/r/181019 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bc22edf255b75849c940e70066c30107575477f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EventLogging Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: QChris christ...@quelltextlich.at 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 broken/missing @covers tags in Lib\Store - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/181050 Change subject: Fix broken/missing @covers tags in Lib\Store .. Fix broken/missing @covers tags in Lib\Store Change-Id: I11d5aef852ba960c53bdb7a35922627af492e874 --- M lib/tests/phpunit/store/EntityInfoTermLookupTest.php M lib/tests/phpunit/store/EntityRedirectResolvingDecoratorTest.php M lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php M lib/tests/phpunit/store/EntityTermLookupTest.php M lib/tests/phpunit/store/LanguageFallbackLabelLookupTest.php M lib/tests/phpunit/store/LanguageLabelLookupTest.php M lib/tests/phpunit/store/SiteLinkTableTest.php M lib/tests/phpunit/store/SqlEntityInfoBuilderTest.php 8 files changed, 22 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/50/181050/1 diff --git a/lib/tests/phpunit/store/EntityInfoTermLookupTest.php b/lib/tests/phpunit/store/EntityInfoTermLookupTest.php index 8d21862..c6046e5 100644 --- a/lib/tests/phpunit/store/EntityInfoTermLookupTest.php +++ b/lib/tests/phpunit/store/EntityInfoTermLookupTest.php @@ -11,7 +11,7 @@ * @covers Wikibase\Lib\Store\EntityInfoTermLookup * * @licence GNU GPL v2+ - * @author Katie Filbert + * @author Katie Filbert aude.w...@gmail.com * @author Daniel Kinzler */ class EntityInfoTermLookupTest extends \MediaWikiTestCase { diff --git a/lib/tests/phpunit/store/EntityRedirectResolvingDecoratorTest.php b/lib/tests/phpunit/store/EntityRedirectResolvingDecoratorTest.php index 45730ef..fc4c9ea 100644 --- a/lib/tests/phpunit/store/EntityRedirectResolvingDecoratorTest.php +++ b/lib/tests/phpunit/store/EntityRedirectResolvingDecoratorTest.php @@ -13,7 +13,7 @@ use Wikibase\PropertyLabelResolver; /** - * @covers Wikibase\Lib\Store\EntityRedirectResolver + * @covers Wikibase\Lib\Store\EntityRedirectResolvingDecorator * * @group WikibaseLib * @group Wikibase diff --git a/lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php b/lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php index cc22e93..7bc50bd 100644 --- a/lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php +++ b/lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php @@ -6,6 +6,13 @@ use Wikibase\DataModel\Entity\ItemId; use Wikibase\Lib\Store\EntityRetrievingTermLookup; +/** + * @covers Wikibase\Lib\Store\EntityRetrievingTermLookup + * + * @licence GNU GPL v2+ + * @author Katie Filbert aude.w...@gmail.com + * @author Daniel Kinzler + */ class EntityRetrievingTermLookupTest extends \PHPUnit_Framework_TestCase { public function testGetLabel() { diff --git a/lib/tests/phpunit/store/EntityTermLookupTest.php b/lib/tests/phpunit/store/EntityTermLookupTest.php index 5fc8769..a6909b0 100644 --- a/lib/tests/phpunit/store/EntityTermLookupTest.php +++ b/lib/tests/phpunit/store/EntityTermLookupTest.php @@ -9,7 +9,7 @@ * @covers Wikibase\Lib\Store\EntityTermLookup * * @licence GNU GPL v2+ - * @author Katie Filbert + * @author Katie Filbert aude.w...@gmail.com */ class EntityTermLookupTest extends \MediaWikiTestCase { diff --git a/lib/tests/phpunit/store/LanguageFallbackLabelLookupTest.php b/lib/tests/phpunit/store/LanguageFallbackLabelLookupTest.php index 386266e..68ffebb 100644 --- a/lib/tests/phpunit/store/LanguageFallbackLabelLookupTest.php +++ b/lib/tests/phpunit/store/LanguageFallbackLabelLookupTest.php @@ -7,9 +7,14 @@ use Wikibase\Lib\Store\LanguageFallbackLabelLookup; /** + * @covers Wikibase\Lib\Store\LanguageFallbackLabelLookup + * * @group Wikibase * @group WikibaseLib * @group WikibaseStore + * + * @licence GNU GPL v2+ + * @author Katie Filbert aude.w...@gmail.com */ class LanguageFallbackLabelLookupTest extends \MediaWikiTestCase { diff --git a/lib/tests/phpunit/store/LanguageLabelLookupTest.php b/lib/tests/phpunit/store/LanguageLabelLookupTest.php index 93a0c2b..f0f9a6c 100644 --- a/lib/tests/phpunit/store/LanguageLabelLookupTest.php +++ b/lib/tests/phpunit/store/LanguageLabelLookupTest.php @@ -7,9 +7,14 @@ use Wikibase\Lib\Store\LanguageLabelLookup; /** + * @covers Wikibase\Lib\Store\LanguageLabelLookup + * * @group Wikibase * @group WikibaseLib * @group WikibaseStore + * + * @licence GNU GPL v2+ + * @author Katie Filbert aude.w...@gmail.com */ class LanguageLabelLookupTest extends \MediaWikiTestCase { diff --git a/lib/tests/phpunit/store/SiteLinkTableTest.php b/lib/tests/phpunit/store/SiteLinkTableTest.php index a3f6b3e..d435e37 100644 --- a/lib/tests/phpunit/store/SiteLinkTableTest.php +++ b/lib/tests/phpunit/store/SiteLinkTableTest.php @@ -18,7 +18,7 @@ * * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com - * @author aude + * @author Katie Filbert aude.w...@gmail.com */ class SiteLinkTableTest extends \MediaWikiTestCase { diff --git a/lib/tests/phpunit/store/SqlEntityInfoBuilderTest.php
[MediaWiki-commits] [Gerrit] Fix broken emails in @author tags - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/181051 Change subject: Fix broken emails in @author tags .. Fix broken emails in @author tags ... and use the same @author tag for Aude everywhere. Change-Id: I7b1d4c57457d76aa5e7f45765d59e76bdbfeb230 --- M client/includes/LangLinkHandler.php M lib/includes/ReferencedEntitiesFinder.php M repo/includes/ItemDisambiguation.php M repo/includes/View/SnakHtmlGenerator.php M repo/tests/phpunit/includes/DefaultRepoSettingsTest.php M repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php M repo/tests/phpunit/includes/content/ItemContentTest.php 7 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/51/181051/1 diff --git a/client/includes/LangLinkHandler.php b/client/includes/LangLinkHandler.php index 176aaa2..eb2af02 100644 --- a/client/includes/LangLinkHandler.php +++ b/client/includes/LangLinkHandler.php @@ -23,7 +23,7 @@ * @licence GNU GPL v2+ * @author Nikola Smolenski smole...@eunet.rs * @author Daniel Kinzler - * @author Katie Filbert + * @author Katie Filbert aude.w...@gmail.com */ class LangLinkHandler { diff --git a/lib/includes/ReferencedEntitiesFinder.php b/lib/includes/ReferencedEntitiesFinder.php index 1fcd4be..b748abd 100644 --- a/lib/includes/ReferencedEntitiesFinder.php +++ b/lib/includes/ReferencedEntitiesFinder.php @@ -15,7 +15,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com * @author Daniel Werner daniel.a.r.wer...@gmail.com - * @author Katie Filbert + * @author Katie Filbert aude.w...@gmail.com * @author Daniel Kinzler * @author Bene* benestar.wikime...@gmail.com */ diff --git a/repo/includes/ItemDisambiguation.php b/repo/includes/ItemDisambiguation.php index 20f4ce6..ed3bd92 100644 --- a/repo/includes/ItemDisambiguation.php +++ b/repo/includes/ItemDisambiguation.php @@ -12,7 +12,7 @@ * @since 0.5 * * @licence GNU GPL v2+ - * @author aude + * @author Katie Filbert aude.w...@gmail.com * @author jeblad * @author Jeroen De Dauw jeroended...@gmail.com * @author Daniel Kinzler diff --git a/repo/includes/View/SnakHtmlGenerator.php b/repo/includes/View/SnakHtmlGenerator.php index 94bad93..b1f06df 100644 --- a/repo/includes/View/SnakHtmlGenerator.php +++ b/repo/includes/View/SnakHtmlGenerator.php @@ -17,7 +17,7 @@ * * @author H. Snater mediaw...@snater.com * @author Pragunbhutani - * @author Katie Filbert aude.w...@gmail.com + * @author Katie Filbert aude.w...@gmail.com * @author Daniel Kinzler */ class SnakHtmlGenerator { diff --git a/repo/tests/phpunit/includes/DefaultRepoSettingsTest.php b/repo/tests/phpunit/includes/DefaultRepoSettingsTest.php index bb8662d..e6a4074 100644 --- a/repo/tests/phpunit/includes/DefaultRepoSettingsTest.php +++ b/repo/tests/phpunit/includes/DefaultRepoSettingsTest.php @@ -9,7 +9,7 @@ * @group WikibaseRepo * * @licence GNU GPL v2+ - * @author Katie Filbert aude.w...@gamil.com + * @author Katie Filbert aude.w...@gmail.com */ class DefaultRepoSettingsTest extends \PHPUnit_Framework_TestCase { diff --git a/repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php b/repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php index cb70ca6..cfedcc5 100644 --- a/repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php +++ b/repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php @@ -12,7 +12,7 @@ * @group EntityView * * @licence GNU GPL v2+ - * @author Katie Filbert + * @author Katie Filbert aude.w...@gmail.com * @author Daniel Kinzler * @author Adrian Lang */ diff --git a/repo/tests/phpunit/includes/content/ItemContentTest.php b/repo/tests/phpunit/includes/content/ItemContentTest.php index 508c96c..f4c893f 100644 --- a/repo/tests/phpunit/includes/content/ItemContentTest.php +++ b/repo/tests/phpunit/includes/content/ItemContentTest.php @@ -35,7 +35,7 @@ * * @licence GNU GPL v2+ * @author Jeroen De Dauw jeroended...@gmail.com - * @author aude + * @author Katie Filbert aude.w...@gmail.com * @author Daniel Kinzler */ class ItemContentTest extends EntityContentTest { -- To view, visit https://gerrit.wikimedia.org/r/181051 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b1d4c57457d76aa5e7f45765d59e76bdbfeb230 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove caching of JsonContent's getData object - change (mediawiki/core)
QChris has uploaded a new change for review. https://gerrit.wikimedia.org/r/181052 Change subject: Remove caching of JsonContent's getData object .. Remove caching of JsonContent's getData object Caching gets in the way if we allow getData to return either an object or an associative array, as we then would have to cache the associative array representation too. Also, others felt that getData is efficient enough that caching is not needed and should not have been added in e4f84af980. Hence, we remove the caching again. Change-Id: Ib70ff12e8178f519c158a61fb57ffb037623f0c5 --- M includes/content/JsonContent.php 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/52/181052/1 diff --git a/includes/content/JsonContent.php b/includes/content/JsonContent.php index ff3b25b..3677115 100644 --- a/includes/content/JsonContent.php +++ b/includes/content/JsonContent.php @@ -17,12 +17,6 @@ class JsonContent extends TextContent { /** -* @since 1.25 -* @var Status -*/ - protected $jsonParse; - - /** * @param string $text JSON */ public function __construct( $text ) { @@ -46,10 +40,7 @@ * @return Status */ public function getData() { - if ( $this-jsonParse === null ) { - $this-jsonParse = FormatJson::parse( $this-getNativeData() ); - } - return $this-jsonParse; + return $this-jsonParse = FormatJson::parse( $this-getNativeData() ); } /** -- To view, visit https://gerrit.wikimedia.org/r/181052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib70ff12e8178f519c158a61fb57ffb037623f0c5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: QChris christ...@quelltextlich.at ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] toollabs: Add class and role for static file server - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/181053 Change subject: toollabs: Add class and role for static file server .. toollabs: Add class and role for static file server Bug: T84982 Change-Id: I189e488eb98987f4394884dd01ab57709b032345 --- M manifests/role/labstools.pp A modules/toollabs/files/static-proxy.conf A modules/toollabs/manifests/static.pp 3 files changed, 81 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/53/181053/1 diff --git a/manifests/role/labstools.pp b/manifests/role/labstools.pp index 471902f..e602f0e 100644 --- a/manifests/role/labstools.pp +++ b/manifests/role/labstools.pp @@ -45,6 +45,14 @@ system::role { 'role::labs::tools::proxy': description = 'Tool labs generic web proxy' } } +class static inherits role::labs::tools::common { +include toollabs::static + +system::role { 'role::labs::tools::static': +description = 'Tool Labs static http server', +} +} + class mailrelay inherits role::labs::tools::common { system::role { 'role::labs::tools::mailrelay': description = 'Tool Labs mail relay' } diff --git a/modules/toollabs/files/static-proxy.conf b/modules/toollabs/files/static-proxy.conf new file mode 100644 index 000..ea059f8 --- /dev/null +++ b/modules/toollabs/files/static-proxy.conf @@ -0,0 +1,53 @@ +#Copyright 2013 Yuvi Panda yuvipa...@gmail.com +# +#Licensed under the Apache License, Version 2.0 (the License); +#you may not use this file except in compliance with the License. +#You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, software +#distributed under the License is distributed on an AS IS BASIS, +#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +#See the License for the specific language governing permissions and +#limitations under the License. + +server { +resolver %= resolver %; + +listen 80; + +%- if @ssl_certificate_name != false -% +# Serve both HTTP and HTTPS +listen 443 default_server ssl spdy; + +ssl_certificate /etc/ssl/certs/%= @ssl_certificate_name %.chained.pem; +ssl_certificate_key /etc/ssl/private/%= @ssl_certificate_name %.key; + +# Copied from templates/nginx/nginx.conf.erb. Eugh +# Enable a shared cache, since it is defined at this level +# it will be used for all virtual hosts. 1m = 4000 active sessions, +# so we are allowing 200,000 active sessions. +ssl_session_cache shared:SSL:50m; +ssl_session_timeout 5m; + +%= @ssl_settings.join(\n) % + +%- end -% + +# Block requests with no UA string +if ($http_user_agent = ) { +return 403 Requests must have a user agent; +} + +# GZIP ALL THE THINGS! +gzip on; +gzip_proxied any; +gzip_types text/plain text/css text/xml application/json application/javascript application/x-javascript text/javascript; + +location ~ ^/([^/]+)(/.*)?$ { +autoindex on; +root /data/project/$1/public_html/static; +try_files $2 $2.html $2/index.html $2/; +} +} diff --git a/modules/toollabs/manifests/static.pp b/modules/toollabs/manifests/static.pp new file mode 100644 index 000..1933dd3 --- /dev/null +++ b/modules/toollabs/manifests/static.pp @@ -0,0 +1,20 @@ +# = Class: toollabs::proxy +# +# A static http server, serving static files from NFS +class toollabs::static( +$resolver = '10.68.16.1', +$ssl_certificate_name = 'star.wmflabs.org', +$ssl_settings = ssl_ciphersuite('nginx', 'compat'), +) inherits toollabs { +include toollabs::infrastructure + +if $ssl_certificate_name != false { +install_certificate { $ssl_certificate_name: +privatekey = false, +} +} + +nginx::site { 'static-proxy': +source = 'puppet:///modules/toollabs/staticproxy.conf', +} +} -- To view, visit https://gerrit.wikimedia.org/r/181053 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I189e488eb98987f4394884dd01ab57709b032345 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Flake8-ify everything - change (operations...adminbot)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/181054 Change subject: Flake8-ify everything .. Flake8-ify everything Also re-enable W191 (tab indentation) and E128 (continuaton line under-indented) and fix violations of the latter. Set max line length to 160 chars, which is more reasonable for modern editors. Change-Id: I737912c0a3f862454fe71537f4df976d61438b72 --- M .pep8 M adminlog.py M adminlogbot.py A tox.ini 4 files changed, 86 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/adminbot refs/changes/54/181054/1 diff --git a/.pep8 b/.pep8 index 45e02b5..376619a 100644 --- a/.pep8 +++ b/.pep8 @@ -1,3 +1,2 @@ [pep8] -# W191: indentation contains tabs -ignore=W191,E128 +max-line-length=160 diff --git a/adminlog.py b/adminlog.py index 3c2503d..0a0ac7c 100644 --- a/adminlog.py +++ b/adminlog.py @@ -22,7 +22,7 @@ page = site.Pages[pagename] if page.redirect: -page = next(p.links()) +page = next(page.links()) text = page.edit() lines = text.split('\n') @@ -43,21 +43,24 @@ lines.insert(0, ) lines.insert(0, logline) lines.insert(0, %s %s %d %s % (header, months[now.month - 1], -now.day, header)) + now.day, header)) else: lines.insert(position, logline) if config.wiki_category: if not re.search('\[\[Category:' + config.wiki_category + '\]\]', text): lines.append('noinclude[[Category:' + -config.wiki_category + ']]/noinclude') -saveresult = page.save('\n'.join(lines), %s (%s) % (message, author), bot=False) + config.wiki_category + + ']]/noinclude') +page.save('\n'.join(lines), %s (%s) % (message, author), bot=False) micro_update = (%s: %s % (author, message))[:140] if config.enable_identica: -snapi = statusnet.StatusNet({'user': config.identica_username, +snapi = statusnet.StatusNet({ +'user': config.identica_username, 'passwd': config.identica_password, -'api': 'https://identi.ca/api'}) +'api': 'https://identi.ca/api' +}) snapi.update(micro_update) if config.enable_twitter: diff --git a/adminlogbot.py b/adminlogbot.py index e144095..c1ca065 100755 --- a/adminlogbot.py +++ b/adminlogbot.py @@ -13,8 +13,6 @@ import time import urllib -import traceback - LOG_FORMAT = %(asctime)-15s %(levelname)s: %(message)s @@ -25,8 +23,10 @@ self.name = name sasl_password = config.nick + ':' + config.nick_password server = [config.network, config.port, sasl_password] -ircbot.SingleServerIRCBot.__init__(self, [server], config.nick, -config.nick) +ircbot.SingleServerIRCBot.__init__( +self, [server], +config.nick, config.nick +) def connect(self, *args, **kwargs): kwargs.update(ssl=True) @@ -112,32 +112,35 @@ ldap.SCOPE_SUBTREE, (objectclass=groupofnames)) if not projectdata: -self.connection.privmsg(event.target(), -Can't contact LDAP - for project list.) +self.connection.privmsg( +event.target(), +Can't contact LDAP for project list. +) for obj in projectdata: projects.append(obj[1][cn][0]) - if self.config.service_group_rdn: -sgdata = ds.search_s(self.config.service_group_rdn + - , + base, - ldap.SCOPE_SUBTREE, - (objectclass=groupofnames)) +sgdata = ds.search_s( +self.config.service_group_rdn + , + base, +ldap.SCOPE_SUBTREE, +(objectclass=groupofnames) +) if not sgdata: -self.connection.privmsg(event.target(), -Can't contact LDAP - for service group list.) +self.connection.privmsg( +event.target(), +Can't contact LDAP for service group list. +) for obj in sgdata: projects.append(obj[1][cn][0]) project_cache_file.write(','.join(projects)) except Exception: try: -
[MediaWiki-commits] [Gerrit] toollabs: Add class and role for static file server - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: toollabs: Add class and role for static file server .. toollabs: Add class and role for static file server Bug: T84982 Change-Id: I189e488eb98987f4394884dd01ab57709b032345 --- M manifests/role/labstools.pp A modules/toollabs/manifests/static.pp A modules/toollabs/templates/static-server.conf.erb 3 files changed, 81 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/labstools.pp b/manifests/role/labstools.pp index 471902f..e602f0e 100644 --- a/manifests/role/labstools.pp +++ b/manifests/role/labstools.pp @@ -45,6 +45,14 @@ system::role { 'role::labs::tools::proxy': description = 'Tool labs generic web proxy' } } +class static inherits role::labs::tools::common { +include toollabs::static + +system::role { 'role::labs::tools::static': +description = 'Tool Labs static http server', +} +} + class mailrelay inherits role::labs::tools::common { system::role { 'role::labs::tools::mailrelay': description = 'Tool Labs mail relay' } diff --git a/modules/toollabs/manifests/static.pp b/modules/toollabs/manifests/static.pp new file mode 100644 index 000..96a199f --- /dev/null +++ b/modules/toollabs/manifests/static.pp @@ -0,0 +1,20 @@ +# = Class: toollabs::proxy +# +# A static http server, serving static files from NFS +class toollabs::static( +$resolver = '10.68.16.1', +$ssl_certificate_name = 'star.wmflabs.org', +$ssl_settings = ssl_ciphersuite('nginx', 'compat'), +) inherits toollabs { +include toollabs::infrastructure + +if $ssl_certificate_name != false { +install_certificate { $ssl_certificate_name: +privatekey = false, +} +} + +nginx::site { 'static-server': +content = template('toollabs/static-server.conf.erb'), +} +} diff --git a/modules/toollabs/templates/static-server.conf.erb b/modules/toollabs/templates/static-server.conf.erb new file mode 100644 index 000..9d1a924 --- /dev/null +++ b/modules/toollabs/templates/static-server.conf.erb @@ -0,0 +1,53 @@ +#Copyright 2013 Yuvi Panda yuvipa...@gmail.com +# +#Licensed under the Apache License, Version 2.0 (the License); +#you may not use this file except in compliance with the License. +#You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, software +#distributed under the License is distributed on an AS IS BASIS, +#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +#See the License for the specific language governing permissions and +#limitations under the License. + +server { +resolver %= @resolver %; + +listen 80; + +%- if @ssl_certificate_name != false -% +# Serve both HTTP and HTTPS +listen 443 default_server ssl spdy; + +ssl_certificate /etc/ssl/certs/%= @ssl_certificate_name %.chained.pem; +ssl_certificate_key /etc/ssl/private/%= @ssl_certificate_name %.key; + +# Copied from templates/nginx/nginx.conf.erb. Eugh +# Enable a shared cache, since it is defined at this level +# it will be used for all virtual hosts. 1m = 4000 active sessions, +# so we are allowing 200,000 active sessions. +ssl_session_cache shared:SSL:50m; +ssl_session_timeout 5m; + +%= @ssl_settings.join(\n) % + +%- end -% + +# Block requests with no UA string +if ($http_user_agent = ) { +return 403 Requests must have a user agent; +} + +# GZIP ALL THE THINGS! +gzip on; +gzip_proxied any; +gzip_types text/plain text/css text/xml application/json application/javascript application/x-javascript text/javascript; + +location ~ ^/([^/]+)(/.*)?$ { +autoindex on; +root /data/project/$1/public_html/static; +try_files $2 $2.html $2/index.html $2/; +} +} -- To view, visit https://gerrit.wikimedia.org/r/181053 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I189e488eb98987f4394884dd01ab57709b032345 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: coren mpellet...@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] Suggester visibility depend on spinner visibility - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/181056 Change subject: Suggester visibility depend on spinner visibility .. Suggester visibility depend on spinner visibility This fixes the issue of the spinner not becoming visible. There is an other problem: this._term is empty _after_ I typed the first character. But I think this patch can be merged independent from this issue. Change-Id: I0295ec9d15608089f3686ae9f3c63cea76a1aba9 --- M repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/56/181056/1 diff --git a/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js b/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js index c18c727..5e55c00 100644 --- a/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js +++ b/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js @@ -103,11 +103,13 @@ * @see jQuery.ui.suggester._updateMenuVisibility */ _updateMenuVisibility: function() { - if( !this._term.length ) { - this._close(); - } else { + if( this._term || ( this.options.suggestionsPlaceholder +this.options.suggestionsPlaceholder.getVisibility() ) + ) { this._open(); this.repositionMenu(); + } else { + this._close(); } }, -- To view, visit https://gerrit.wikimedia.org/r/181056 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0295ec9d15608089f3686ae9f3c63cea76a1aba9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Minor bugfix - change (mediawiki...MsCatSelect)
Luis Felipe Schenone has uploaded a new change for review. https://gerrit.wikimedia.org/r/181057 Change subject: Minor bugfix .. Minor bugfix Change-Id: I195eb01c1a6d27d8fca78d61ee0c58cc354ccb38 --- M MsCatSelect.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MsCatSelect refs/changes/57/181057/1 diff --git a/MsCatSelect.js b/MsCatSelect.js index 5530b67..277e68b 100755 --- a/MsCatSelect.js +++ b/MsCatSelect.js @@ -95,7 +95,7 @@ } function mscsAddCat( newCat, newSortkey ) { - if ( newCat !== '' jQuery( '#mscs-added .mscs_entry[category=' + newCat + ']' ).length === 0 ) { + if ( newCat !== '---' jQuery( '#mscs-added .mscs_entry[category=' + newCat + ']' ).length === 0 ) { if ( newSortkey === '' ) { newSortkey = wgTitle; // Standard sortkey is the page title -- To view, visit https://gerrit.wikimedia.org/r/181057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I195eb01c1a6d27d8fca78d61ee0c58cc354ccb38 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MsCatSelect Gerrit-Branch: master Gerrit-Owner: Luis Felipe Schenone scheno...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Minor bugfix - change (mediawiki...MsCatSelect)
Luis Felipe Schenone has submitted this change and it was merged. Change subject: Minor bugfix .. Minor bugfix Change-Id: I195eb01c1a6d27d8fca78d61ee0c58cc354ccb38 --- M MsCatSelect.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Luis Felipe Schenone: Verified; Looks good to me, approved diff --git a/MsCatSelect.js b/MsCatSelect.js index 5530b67..277e68b 100755 --- a/MsCatSelect.js +++ b/MsCatSelect.js @@ -95,7 +95,7 @@ } function mscsAddCat( newCat, newSortkey ) { - if ( newCat !== '' jQuery( '#mscs-added .mscs_entry[category=' + newCat + ']' ).length === 0 ) { + if ( newCat !== '---' jQuery( '#mscs-added .mscs_entry[category=' + newCat + ']' ).length === 0 ) { if ( newSortkey === '' ) { newSortkey = wgTitle; // Standard sortkey is the page title -- To view, visit https://gerrit.wikimedia.org/r/181057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I195eb01c1a6d27d8fca78d61ee0c58cc354ccb38 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MsCatSelect Gerrit-Branch: master Gerrit-Owner: Luis Felipe Schenone scheno...@gmail.com Gerrit-Reviewer: Luis Felipe Schenone scheno...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FIX] QueryGenerator: Allow missing 'query' entry - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [FIX] QueryGenerator: Allow missing 'query' entry .. [FIX] QueryGenerator: Allow missing 'query' entry The QueryGenerator stopped when the result didn't contain a 'query' entry. If the result doesn't contain anything yet (but needs to be continued) it's not returning a 'query' entry when used with the 'generator' API feature. Instead of stopping the iteration when there is not 'query' entry it's just stopping the iteration if there is no continuation provided. Because the exact nature why the condition was there in the first place (it was added in 54bc6aafa591e31274dc3630e9c6c1039f80839b) is not known the output was raised from 'debug' to 'log'. Prior to that revision no condition was found in the repository which looks like that. Bug: T84860 Change-Id: I1f8c4986d69be18134987c951fd65237300e277e --- M pywikibot/data/api.py M tests/category_tests.py 2 files changed, 5 insertions(+), 12 deletions(-) Approvals: John Vandenberg: Looks good to me, approved Unicodesnowman: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 04420c2..5b70fe1 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -1483,14 +1483,7 @@ % self.__class__.__name__, _logger) return -if query not in self.data: -pywikibot.debug( -u%s: stopped iteration because 'query' not found in api -uresponse. % self.__class__.__name__, -_logger) -pywikibot.debug(unicode(self.data), _logger) -return -if self.resultkey in self.data[query]: +if 'query' in self.data and self.resultkey in self.data[query]: resultdata = self.data[query][self.resultkey] if isinstance(resultdata, dict): pywikibot.debug(u%s received %s; limit=%s @@ -1538,6 +1531,10 @@ # self.resultkey in data in last request.submit() previous_result_had_data = True else: +if 'query' not in self.data: +pywikibot.log(%s: 'query' not found in api response. % + self.__class__.__name__) +pywikibot.log(unicode(self.data)) # if (query-)continue is present, self.resultkey might not have # been fetched yet if self.continue_name not in self.data: diff --git a/tests/category_tests.py b/tests/category_tests.py index 6ba5abb..9e57069 100644 --- a/tests/category_tests.py +++ b/tests/category_tests.py @@ -11,7 +11,6 @@ import pywikibot.page from tests.aspects import unittest, TestCase -from tests.utils import allowed_failure class TestCategoryObject(TestCase): @@ -100,11 +99,8 @@ subcategories_total = list(cat.subcategories(total=2)) self.assertEqual(len(subcategories_total), 2) -@allowed_failure def test_subcategories_recurse(self): Test the subcategories method with recurse=True. -# FIXME: Broken, some subcategories are missing. -# See: T84860 site = self.get_site() cat = pywikibot.Category(site, 'Category:Wikipedians by gender') c1 = pywikibot.Category(site, 'Category:Female Wikipedians') -- To view, visit https://gerrit.wikimedia.org/r/180779 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f8c4986d69be18134987c951fd65237300e277e Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Unicodesnowman ad...@glados.cc Gerrit-Reviewer: XZise commodorefabia...@gmx.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] [IMPROV] Added some docstrings - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [IMPROV] Added some docstrings .. [IMPROV] Added some docstrings Change-Id: Ie5633447090ddfcf201ed38d7fea111a450c7177 --- M pywikibot/bot.py M pywikibot/comms/http.py M pywikibot/compat/catlib.py M pywikibot/compat/query.py M pywikibot/diff.py M pywikibot/families/test_family.py M pywikibot/page.py M pywikibot/throttle.py M pywikibot/tools.py 9 files changed, 32 insertions(+), 0 deletions(-) Approvals: John Vandenberg: Looks good to me, approved Unicodesnowman: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/pywikibot/bot.py b/pywikibot/bot.py index ddfbbc9..21eb4a4 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -1133,6 +1133,7 @@ def __init__(self, **kwargs): +Constructor. super(WikidataBot, self).__init__(**kwargs) self.site = pywikibot.Site() self.repo = self.site.data_repository() diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index ad2e2e8..444f3c7 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -166,6 +166,17 @@ def user_agent(site=None, format_string=None): + +Generate the user agent string for a given site and format. + +@param site: The site for which this user agent is intended. May be None. +@type site: BaseSite +@param format_string: The string to which the values will be added using +str.format. Is using config.user_agent_format when it is None. +@type format_string: basestring +@return: The formatted user agent +@rtype: unicode + values = USER_AGENT_PRODUCTS.copy() # This is the Pywikibot revision; also map it to {version} at present. diff --git a/pywikibot/compat/catlib.py b/pywikibot/compat/catlib.py index d4f7b48..f329b21 100644 --- a/pywikibot/compat/catlib.py +++ b/pywikibot/compat/catlib.py @@ -20,6 +20,7 @@ def change_category(article, oldCat, newCat, comment=None, sortKey=None, inPlace=True): +Change the category of the article. return article.change_category(oldCat, newCat, comment, sortKey, inPlace) __all__ = ('Category', 'change_category',) diff --git a/pywikibot/compat/query.py b/pywikibot/compat/query.py index fe02c99..46e9976 100644 --- a/pywikibot/compat/query.py +++ b/pywikibot/compat/query.py @@ -23,6 +23,11 @@ @deprecate_arg(retryCount, None) @deprecate_arg(encodeTitle, None) def GetData(request, site=None, back_response=False): + +Query the server with the given request dict. + +DEPRECATED: Use pywikibot.data.api.Request instead. + if site: request['site'] = site diff --git a/pywikibot/diff.py b/pywikibot/diff.py index a93a90b..09fdfdf 100644 --- a/pywikibot/diff.py +++ b/pywikibot/diff.py @@ -158,6 +158,7 @@ return self.b[self.b_rng[0]:self.b_rng[1]] def __str__(self): +Return the diff as plain text. return u''.join(self.diff_plain_text) def __repr__(self): @@ -238,6 +239,7 @@ return blocks def print_hunks(self): +Print the headers and diff texts of all hunks to the output. for hunk in self.hunks: pywikibot.output(hunk.header + hunk.diff_text) diff --git a/pywikibot/families/test_family.py b/pywikibot/families/test_family.py index 1517af2..2a587c0 100644 --- a/pywikibot/families/test_family.py +++ b/pywikibot/families/test_family.py @@ -14,4 +14,5 @@ langs = {'test': 'test.wikipedia.org'} def from_url(self, url): +Return None to indicate no code of this family is accepted. return None # Don't accept this, but 'test' of 'wikipedia' diff --git a/pywikibot/page.py b/pywikibot/page.py index eba81a3..d96b8cb 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -576,6 +576,13 @@ return min(x.revid for x in history) def previousRevision(self): + +Return the revision id for the previous revision. + +DEPRECATED: Use previous_revision_id instead. + +@return: long + return self.previous_revision_id def exists(self): @@ -3276,6 +3283,7 @@ } def getRedirectTarget(self): +Return the redirect target for this page. target = super(ItemPage, self).getRedirectTarget() cmodel = target.content_model if cmodel != 'wikibase-item': diff --git a/pywikibot/throttle.py b/pywikibot/throttle.py index 5cdc30d..a311a20 100644 --- a/pywikibot/throttle.py +++ b/pywikibot/throttle.py @@ -39,6 +39,7 @@ def __init__(self, site, mindelay=None, maxdelay=None, writedelay=None, multiplydelay=True): +Constructor. self.lock = threading.RLock() self.mysite = str(site) self.ctrlfilename = config.datafilepath('throttle.ctrl') diff --git a/pywikibot/tools.py b/pywikibot/tools.py index
[MediaWiki-commits] [Gerrit] tools: Use autoindex instead of root for static-file server - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/181058 Change subject: tools: Use autoindex instead of root for static-file server .. tools: Use autoindex instead of root for static-file server Also turn off sendfile, which makes things better for NFS serving Change-Id: I91863353e518ec6c1daec19efc0a7e4b2fc53a40 Bug: T84982 --- M modules/toollabs/templates/static-server.conf.erb 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/58/181058/1 diff --git a/modules/toollabs/templates/static-server.conf.erb b/modules/toollabs/templates/static-server.conf.erb index 9d1a924..c9c0f08 100644 --- a/modules/toollabs/templates/static-server.conf.erb +++ b/modules/toollabs/templates/static-server.conf.erb @@ -40,6 +40,9 @@ return 403 Requests must have a user agent; } +# We primarily serve from NFS, so let's turn off sendfile +senfile off; + # GZIP ALL THE THINGS! gzip on; gzip_proxied any; @@ -47,7 +50,7 @@ location ~ ^/([^/]+)(/.*)?$ { autoindex on; -root /data/project/$1/public_html/static; -try_files $2 $2.html $2/index.html $2/; +autoindex on; +alias /data/project/$1/public_html/static$2; } } -- To view, visit https://gerrit.wikimedia.org/r/181058 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91863353e518ec6c1daec19efc0a7e4b2fc53a40 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add i18n messages for the new 'wikibase-property' datatype - change (mediawiki...Wikibase)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/181059 Change subject: Add i18n messages for the new 'wikibase-property' datatype .. Add i18n messages for the new 'wikibase-property' datatype * wikibase-listdatatypes-wikibase-property-head * wikibase-listdatatypes-wikibase-property-body mostly copied from the respective 'wikibase-item' equivalents Also added as comments on SpecialListDatatypes::execute(). Reported by GZWDer on Wikidata: https://www.wikidata.org/wiki/?oldid=182136236#MediaWiki_message_requests Change-Id: I83a8fed4f3e7395caa2b83201682bc911c99c6ef --- M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/specials/SpecialListDatatypes.php 3 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/59/181059/1 diff --git a/repo/i18n/en.json b/repo/i18n/en.json index 6dedf61..626c5f0 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -390,6 +390,8 @@ wikibase-property-summary-special-create-property: Created a [$2] property with {{PLURAL:$1|value|values}}, wikibase-listdatatypes-wikibase-item-head: Item, wikibase-listdatatypes-wikibase-item-body: Link to other items at the project. When a value is entered, the project's \Item\ namespace will be searched for matching items., + wikibase-listdatatypes-wikibase-property-head: Property, + wikibase-listdatatypes-wikibase-property-body: Link to properties at the project. When a value is entered, the project's \Property\ namespace will be searched for matching properties., wikibase-listdatatypes-commonsmedia-head: Commons media, wikibase-listdatatypes-commonsmedia-body: Link to files stored at Wikimedia Commons. When a value is entered, the \File\ namespace on Commons will be searched for matching files., wikibase-listdatatypes-globe-coordinate-head: Globe coordinate, diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json index 89542b3..99efa7a 100644 --- a/repo/i18n/qqq.json +++ b/repo/i18n/qqq.json @@ -415,6 +415,8 @@ wikibase-property-summary-special-create-property: Automatic edit summary when creating a property, and supplying one or more values. Parameters:\n* $1 - the number of values set (that is 0 - zero)\n* $2 - the language code of the entity page during creation, wikibase-listdatatypes-wikibase-item-head: {{Wikibase-datatype-head|Item|wikibase-item}}\n{{Identical|Item}}, wikibase-listdatatypes-wikibase-item-body: {{Wikibase-datatype-body|Item}}\n\nFor information about \Iri\ and related terms, see [[:w:Internationalized resource identifier|Internationalized resource identifier]] and [[:w:URI scheme|URI scheme]]., + wikibase-listdatatypes-wikibase-property-head: {{Wikibase-datatype-head|Property|wikibase-property}}\n{{Identical|Property}}, + wikibase-listdatatypes-wikibase-property-body: {{Wikibase-datatype-body|Property}}\n\nFor information about \Iri\ and related terms, see [[:w:Internationalized resource identifier|Internationalized resource identifier]] and [[:w:URI scheme|URI scheme]]., wikibase-listdatatypes-commonsmedia-head: {{Wikibase-datatype-head|Commons media|commonsMedia}}, wikibase-listdatatypes-commonsmedia-body: {{Wikibase-datatype-body|Commons media}}\n\nFor information about \Iri\ and related terms, see [[:w:Internationalized resource identifier|Internationalized resource identifier]] and [[:w:URI scheme|URI scheme]]., wikibase-listdatatypes-globe-coordinate-head: {{Wikibase-datatype-head|Globe coordinate|globe-coordinate}}, diff --git a/repo/includes/specials/SpecialListDatatypes.php b/repo/includes/specials/SpecialListDatatypes.php index 087256e..6e66641 100644 --- a/repo/includes/specials/SpecialListDatatypes.php +++ b/repo/includes/specials/SpecialListDatatypes.php @@ -30,6 +30,8 @@ // some of the datatype descriptions // 'wikibase-listdatatypes-wikibase-item-head' // 'wikibase-listdatatypes-wikibase-item-body' + // 'wikibase-listdatatypes-wikibase-property-head' + // 'wikibase-listdatatypes-wikibase-property-body' // 'wikibase-listdatatypes-commonsmedia-head' // 'wikibase-listdatatypes-commonsmedia-body' // 'wikibase-listdatatypes-geo-coordinate-head' -- To view, visit https://gerrit.wikimedia.org/r/181059 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83a8fed4f3e7395caa2b83201682bc911c99c6ef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Ricordisamoa ricordisa...@openmailbox.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Remove jscsdoc objective - change (mediawiki...MobileFrontend)
Jhernandez has uploaded a new change for review. https://gerrit.wikimedia.org/r/181060 Change subject: Remove jscsdoc objective .. Remove jscsdoc objective grunt jscs:doc and grunt jscs:main are now merged in jscs:main. jscsdoc configuration file has been merged into .jscsrc Change-Id: I870f8cdea4e9fe7c3bc455534342e2d210c58a77 --- M Makefile 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/60/181060/1 diff --git a/Makefile b/Makefile index 07b76de..023b3b6 100644 --- a/Makefile +++ b/Makefile @@ -56,9 +56,6 @@ jscs: nodecheck## Check the JavaScript coding style @grunt jscs:main -jscsdoc: nodecheck ## Check the JavaScript coding style documentation - @grunt jscs:doc - jshinttests: nodecheck ## Lint the QUnit tests @grunt jshint:tests -- To view, visit https://gerrit.wikimedia.org/r/181060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I870f8cdea4e9fe7c3bc455534342e2d210c58a77 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove jscsdoc objective - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Remove jscsdoc objective .. Remove jscsdoc objective grunt jscs:doc and grunt jscs:main are now merged in jscs:main. jscsdoc configuration file has been merged into .jscsrc Change-Id: I870f8cdea4e9fe7c3bc455534342e2d210c58a77 --- M Makefile 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/Makefile b/Makefile index 07b76de..023b3b6 100644 --- a/Makefile +++ b/Makefile @@ -56,9 +56,6 @@ jscs: nodecheck## Check the JavaScript coding style @grunt jscs:main -jscsdoc: nodecheck ## Check the JavaScript coding style documentation - @grunt jscs:doc - jshinttests: nodecheck ## Lint the QUnit tests @grunt jshint:tests -- To view, visit https://gerrit.wikimedia.org/r/181060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I870f8cdea4e9fe7c3bc455534342e2d210c58a77 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tools: Use alias instead of root for static-file server - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: tools: Use alias instead of root for static-file server .. tools: Use alias instead of root for static-file server Also turn off sendfile, which makes things better for NFS serving Change-Id: I91863353e518ec6c1daec19efc0a7e4b2fc53a40 Bug: T84982 --- M modules/toollabs/templates/static-server.conf.erb 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/templates/static-server.conf.erb b/modules/toollabs/templates/static-server.conf.erb index 9d1a924..c9c0f08 100644 --- a/modules/toollabs/templates/static-server.conf.erb +++ b/modules/toollabs/templates/static-server.conf.erb @@ -40,6 +40,9 @@ return 403 Requests must have a user agent; } +# We primarily serve from NFS, so let's turn off sendfile +senfile off; + # GZIP ALL THE THINGS! gzip on; gzip_proxied any; @@ -47,7 +50,7 @@ location ~ ^/([^/]+)(/.*)?$ { autoindex on; -root /data/project/$1/public_html/static; -try_files $2 $2.html $2/index.html $2/; +autoindex on; +alias /data/project/$1/public_html/static$2; } } -- To view, visit https://gerrit.wikimedia.org/r/181058 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I91863353e518ec6c1daec19efc0a7e4b2fc53a40 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: coren mpellet...@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/correct comments in SpecialListDatatypes.php - change (mediawiki...Wikibase)
Unicodesnowman has uploaded a new change for review. https://gerrit.wikimedia.org/r/181061 Change subject: Add/correct comments in SpecialListDatatypes.php .. Add/correct comments in SpecialListDatatypes.php Adds comments for missing messages or ones that has been renamed. Change-Id: I6e43504e203686c53a4958d1e2bcc2a88abfe071 --- M repo/includes/specials/SpecialListDatatypes.php 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/61/181061/1 diff --git a/repo/includes/specials/SpecialListDatatypes.php b/repo/includes/specials/SpecialListDatatypes.php index 087256e..d1b8674 100644 --- a/repo/includes/specials/SpecialListDatatypes.php +++ b/repo/includes/specials/SpecialListDatatypes.php @@ -30,10 +30,12 @@ // some of the datatype descriptions // 'wikibase-listdatatypes-wikibase-item-head' // 'wikibase-listdatatypes-wikibase-item-body' + // 'wikibase-listdatatypes-wikibase-property-head' + // 'wikibase-listdatatypes-wikibase-property-body' // 'wikibase-listdatatypes-commonsmedia-head' // 'wikibase-listdatatypes-commonsmedia-body' - // 'wikibase-listdatatypes-geo-coordinate-head' - // 'wikibase-listdatatypes-geo-coordinate-body' + // 'wikibase-listdatatypes-globe-coordinate-head' + // 'wikibase-listdatatypes-globe-coordinate-body' // 'wikibase-listdatatypes-quantity-head' // 'wikibase-listdatatypes-quantity-body' // 'wikibase-listdatatypes-monolingualtext-head' @@ -41,7 +43,11 @@ // 'wikibase-listdatatypes-multilingualtext-head' // 'wikibase-listdatatypes-multilingualtext-body' // 'wikibase-listdatatypes-time-head' - // 'wikibase-listdatatypes-text-body' + // 'wikibase-listdatatypes-time-body' + // 'wikibase-listdatatypes-string-head' + // 'wikibase-listdatatypes-string-body' + // 'wikibase-listdatatypes-url-head' + // 'wikibase-listdatatypes-url-body' foreach ( $this-getDataTypeIds() as $dataTypeId ) { $this-getOutput()-addHTML( $this-getHtmlForDataTypeId( $dataTypeId ) ); -- To view, visit https://gerrit.wikimedia.org/r/181061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e43504e203686c53a4958d1e2bcc2a88abfe071 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Unicodesnowman ad...@glados.cc ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add/correct comments in SpecialListDatatypes.php - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has submitted this change and it was merged. Change subject: Add/correct comments in SpecialListDatatypes.php .. Add/correct comments in SpecialListDatatypes.php Adds comments for missing messages or ones that has been renamed. Change-Id: I6e43504e203686c53a4958d1e2bcc2a88abfe071 --- M repo/includes/specials/SpecialListDatatypes.php 1 file changed, 9 insertions(+), 3 deletions(-) Approvals: Thiemo Mättig (WMDE): Verified; Looks good to me, approved diff --git a/repo/includes/specials/SpecialListDatatypes.php b/repo/includes/specials/SpecialListDatatypes.php index 087256e..d1b8674 100644 --- a/repo/includes/specials/SpecialListDatatypes.php +++ b/repo/includes/specials/SpecialListDatatypes.php @@ -30,10 +30,12 @@ // some of the datatype descriptions // 'wikibase-listdatatypes-wikibase-item-head' // 'wikibase-listdatatypes-wikibase-item-body' + // 'wikibase-listdatatypes-wikibase-property-head' + // 'wikibase-listdatatypes-wikibase-property-body' // 'wikibase-listdatatypes-commonsmedia-head' // 'wikibase-listdatatypes-commonsmedia-body' - // 'wikibase-listdatatypes-geo-coordinate-head' - // 'wikibase-listdatatypes-geo-coordinate-body' + // 'wikibase-listdatatypes-globe-coordinate-head' + // 'wikibase-listdatatypes-globe-coordinate-body' // 'wikibase-listdatatypes-quantity-head' // 'wikibase-listdatatypes-quantity-body' // 'wikibase-listdatatypes-monolingualtext-head' @@ -41,7 +43,11 @@ // 'wikibase-listdatatypes-multilingualtext-head' // 'wikibase-listdatatypes-multilingualtext-body' // 'wikibase-listdatatypes-time-head' - // 'wikibase-listdatatypes-text-body' + // 'wikibase-listdatatypes-time-body' + // 'wikibase-listdatatypes-string-head' + // 'wikibase-listdatatypes-string-body' + // 'wikibase-listdatatypes-url-head' + // 'wikibase-listdatatypes-url-body' foreach ( $this-getDataTypeIds() as $dataTypeId ) { $this-getOutput()-addHTML( $this-getHtmlForDataTypeId( $dataTypeId ) ); -- To view, visit https://gerrit.wikimedia.org/r/181061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6e43504e203686c53a4958d1e2bcc2a88abfe071 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Unicodesnowman ad...@glados.cc Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Fix MobileWebClickTracking documentation errors - change (mediawiki...MobileFrontend)
Jhernandez has uploaded a new change for review. https://gerrit.wikimedia.org/r/181062 Change subject: Fix MobileWebClickTracking documentation errors .. Fix MobileWebClickTracking documentation errors With this it should be all done! Change-Id: If331aebdc1e0db6fd592ad75b36648a009287e17 --- M javascripts/loggingSchemas/MobileWebClickTracking.js 1 file changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/62/181062/1 diff --git a/javascripts/loggingSchemas/MobileWebClickTracking.js b/javascripts/loggingSchemas/MobileWebClickTracking.js index 90ceb9c..08e509f 100644 --- a/javascripts/loggingSchemas/MobileWebClickTracking.js +++ b/javascripts/loggingSchemas/MobileWebClickTracking.js @@ -1,8 +1,8 @@ -/** - * Utility library for tracking clicks on certain elements - */ +// Utility library for tracking clicks on certain elements ( function ( M, $ ) { - var s = M.require( 'settings' ); + + var s = M.require( 'settings' ), + MobileWebClickTracking; /** * Check whether 'schema' is one of the predefined schemas. @@ -123,9 +123,13 @@ } } - M.define( 'loggingSchemas/MobileWebClickTracking', { + /** +* @class MobileWebClickTracking +*/ + MobileWebClickTracking = { log: log, logPastEvent: logPastEvent, hijackLink: hijackLink - } ); + }; + M.define( 'loggingSchemas/MobileWebClickTracking', MobileWebClickTracking ); } )( mw.mobileFrontend, jQuery ); -- To view, visit https://gerrit.wikimedia.org/r/181062 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If331aebdc1e0db6fd592ad75b36648a009287e17 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix MW_INSTALL_PATH to default to local installation - change (mediawiki...MobileFrontend)
Jhernandez has uploaded a new change for review. https://gerrit.wikimedia.org/r/181063 Change subject: Fix MW_INSTALL_PATH to default to local installation .. Fix MW_INSTALL_PATH to default to local installation Which is usually ../../ if executed in the local file system. This was causing problems when running make jsduck in the pre-review script. Locally grunt docs and MW_INSTALL_PATH=../../ make jsduck work fine. This is the reason why 26 errors show on the docs warnings with make jsduck but only a couple (or none with the previous patch) are shown if executed with grunt docs. This may be annoying if somebody works from inside vagrant? Change-Id: I4fe8f9fb36dcf8e3bb3d1530cf6aa1eef8ddbd4b --- M Makefile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/63/181063/1 diff --git a/Makefile b/Makefile index 07b76de..85a9097 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -MW_INSTALL_PATH ?= /vagrant/mediawiki/ +MW_INSTALL_PATH ?= ../../ MEDIAWIKI_LOAD_URL ?= http://localhost:8080/w/load.php # From https://gist.github.com/prwhite/8168133 -- To view, visit https://gerrit.wikimedia.org/r/181063 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4fe8f9fb36dcf8e3bb3d1530cf6aa1eef8ddbd4b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make property datatype link - change (mediawiki...Wikibase)
Unicodesnowman has uploaded a new change for review. https://gerrit.wikimedia.org/r/181064 Change subject: Make property datatype link .. Make property datatype link Thanks Daniel! Change-Id: I44f5dd1479c2429a6c2ea5f1c5278c4bf69eb5c4 Fix: T84992 --- M lib/includes/formatters/WikibaseValueFormatterBuilders.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/64/181064/1 diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php b/lib/includes/formatters/WikibaseValueFormatterBuilders.php index a21bf50..996e9ff 100644 --- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php +++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php @@ -90,6 +90,7 @@ 'PT:url' = 'Wikibase\Lib\HtmlUrlFormatter', 'PT:commonsMedia' = 'Wikibase\Lib\CommonsLinkFormatter', 'PT:wikibase-item' = array( 'this', 'newEntityIdHtmlFormatter' ), + 'PT:wikibase-property' = array( 'this', 'newEntityIdHtmlFormatter' ), 'VT:time' = array( 'this', 'newHtmlTimeFormatter' ), 'VT:monolingualtext' = 'Wikibase\Formatters\MonolingualHtmlFormatter', ), -- To view, visit https://gerrit.wikimedia.org/r/181064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44f5dd1479c2429a6c2ea5f1c5278c4bf69eb5c4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Unicodesnowman ad...@glados.cc ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix lead image click area in 2.3 - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/181065 Change subject: Fix lead image click area in 2.3 .. Fix lead image click area in 2.3 The problem was that, even though the ViewHelper library (nineoldandroids) correctly slides the lead image component, it does not successfully slide the logical click area that corresponds to the visual position of the component! So, the lead image remains clickable even after sliding away. The solution is to stop using the ViewHelper library, and shift the position of the lead image component using standard margins. There was another slight issue, however: in Android 2.3, using negative margins is only possible for a component that has a LinearLayout as a parent. So, I had to put the lead image container into a dummy LinearLayout, just to achieve negative margins. Thanks again, 2.3! NOTE: The same issue is currently present in the Search bar at the top, which slides away in a similar fashion. This will be the subject of a subsequent patch. Bug: T84998 Change-Id: I79120601b156e151a8b9ddabcfef2952c1555de5 --- M wikipedia/res/layout/fragment_page.xml M wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java 2 files changed, 72 insertions(+), 50 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/65/181065/1 diff --git a/wikipedia/res/layout/fragment_page.xml b/wikipedia/res/layout/fragment_page.xml index 997e356..aa472a1 100644 --- a/wikipedia/res/layout/fragment_page.xml +++ b/wikipedia/res/layout/fragment_page.xml @@ -29,52 +29,63 @@ android:layout_height=match_parent / -FrameLayout -android:id=@+id/page_images_container +!-- dummy LinearLayout container for 2.3 support. +Remove when we drop support for 2.3. -- +LinearLayout android:layout_width=match_parent -android:layout_height=wrap_content -android:orientation=vertical -android:paddingTop=?attr/actionBarSize -org.wikipedia.page.leadimages.ImageViewWithFace -android:id=@+id/page_image_1 -android:layout_width=match_parent -android:layout_height=match_parent -android:scaleType=centerCrop -android:visibility=invisible/ -ImageView -android:id=@+id/page_image_placeholder -android:layout_width=match_parent -android:layout_height=match_parent -android:scaleType=centerCrop -android:contentDescription=@null/ +android:layout_height=wrap_content FrameLayout -android:id=@+id/page_title_container +android:id=@+id/page_images_container android:layout_width=match_parent android:layout_height=wrap_content -android:orientation=vertical -android:layout_gravity=bottom -TextView -android:id=@+id/page_title_text +android:paddingTop=?attr/actionBarSize +!-- dummy LinearLayout container for 2.3 support. +Remove when we drop support for 2.3. -- +LinearLayout +android:layout_width=match_parent +android:layout_height=match_parent +org.wikipedia.page.leadimages.ImageViewWithFace +android:id=@+id/page_image_1 +android:layout_width=match_parent +android:layout_height=match_parent +android:scaleType=centerCrop +android:visibility=invisible/ +/LinearLayout +ImageView +android:id=@+id/page_image_placeholder +android:layout_width=match_parent +android:layout_height=match_parent +android:scaleType=centerCrop +android:contentDescription=@null/ +FrameLayout +android:id=@+id/page_title_container android:layout_width=match_parent android:layout_height=wrap_content -android:fontFamily=serif -android:paddingTop=16dp -android:paddingBottom=16dp - android:paddingRight=@dimen/activity_horizontal_margin - android:paddingLeft=@dimen/activity_horizontal_margin/ -TextView -
[MediaWiki-commits] [Gerrit] toollabs: Remove stray duplicate line in static-server - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/181066 Change subject: toollabs: Remove stray duplicate line in static-server .. toollabs: Remove stray duplicate line in static-server Change-Id: I1590142a774997869a2a8a87e84944870f036897 --- M modules/toollabs/templates/static-server.conf.erb 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/66/181066/1 diff --git a/modules/toollabs/templates/static-server.conf.erb b/modules/toollabs/templates/static-server.conf.erb index c9c0f08..de4d7b9 100644 --- a/modules/toollabs/templates/static-server.conf.erb +++ b/modules/toollabs/templates/static-server.conf.erb @@ -50,7 +50,6 @@ location ~ ^/([^/]+)(/.*)?$ { autoindex on; -autoindex on; alias /data/project/$1/public_html/static$2; } } -- To view, visit https://gerrit.wikimedia.org/r/181066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1590142a774997869a2a8a87e84944870f036897 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make property datatype link - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Make property datatype link .. Make property datatype link Thanks Daniel! Change-Id: I44f5dd1479c2429a6c2ea5f1c5278c4bf69eb5c4 Bug: T84992 --- M lib/includes/formatters/WikibaseValueFormatterBuilders.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php b/lib/includes/formatters/WikibaseValueFormatterBuilders.php index a21bf50..996e9ff 100644 --- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php +++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php @@ -90,6 +90,7 @@ 'PT:url' = 'Wikibase\Lib\HtmlUrlFormatter', 'PT:commonsMedia' = 'Wikibase\Lib\CommonsLinkFormatter', 'PT:wikibase-item' = array( 'this', 'newEntityIdHtmlFormatter' ), + 'PT:wikibase-property' = array( 'this', 'newEntityIdHtmlFormatter' ), 'VT:time' = array( 'this', 'newHtmlTimeFormatter' ), 'VT:monolingualtext' = 'Wikibase\Formatters\MonolingualHtmlFormatter', ), -- To view, visit https://gerrit.wikimedia.org/r/181064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I44f5dd1479c2429a6c2ea5f1c5278c4bf69eb5c4 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Unicodesnowman ad...@glados.cc Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Add Kartik Mistry to Beta Cluster alert - change (operations/puppet)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/181067 Change subject: Add Kartik Mistry to Beta Cluster alert .. Add Kartik Mistry to Beta Cluster alert Change-Id: I137d05d3b4f9185bff2456d8854c700fb49869f8 --- M modules/shinken/files/contactgroups.cfg M modules/shinken/files/contacts.cfg 2 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/67/181067/1 diff --git a/modules/shinken/files/contactgroups.cfg b/modules/shinken/files/contactgroups.cfg index bf75771..3e3ee91 100644 --- a/modules/shinken/files/contactgroups.cfg +++ b/modules/shinken/files/contactgroups.cfg @@ -16,7 +16,7 @@ define contactgroup { contactgroup_name deployment-prep alias Beta Cluster Administrators -members guest,yuvipanda,greg_g,cmcmahon,amusso,twentyafterfour,betacluster-alerts-list,irc-qa +members guest,yuvipanda,greg_g,cmcmahon,amusso,twentyafterfour,betacluster-alerts-list,irc-qa,kart_ } define contactgroup { diff --git a/modules/shinken/files/contacts.cfg b/modules/shinken/files/contacts.cfg index e3e6c3d..0fa0aa6 100644 --- a/modules/shinken/files/contacts.cfg +++ b/modules/shinken/files/contacts.cfg @@ -125,6 +125,13 @@ } define contact { +contact_namekart_ +alias Kartik Mistry +email kmis...@wikimedia.org +use generic-contact +} + +define contact { contact_namebetacluster-alerts-list alias BetaCluster Alerts List email betacluster-ale...@lists.wikimedia.org -- To view, visit https://gerrit.wikimedia.org/r/181067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I137d05d3b4f9185bff2456d8854c700fb49869f8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix possible NPE(s) when accessing parent fragment. - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/181068 Change subject: Fix possible NPE(s) when accessing parent fragment. .. Fix possible NPE(s) when accessing parent fragment. In our LeadImagesHandler and BottomContentHandler, we use the getFragment() function which returns the internal fragment object that is currently hosted by the PageViewFragment. The problem is that, when a PageViewFragment is detached, it sets its instance of the internal object to null. So, if the Lead or Bottom components try to access the internal fragment using getFragment() from the result of an AsyncTask after the parent fragment is detached, they will get a null pointer. This patch refactors things so that the internal object itself is passed to the Lead and Bottom components, so that they will never receive a null reference to it. Change-Id: Ie78c76e12128a89218bcea8d65fbfeed01278a63 --- M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java M wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java M wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java 3 files changed, 39 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/68/181068/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java index eb3efc8..9f7fd44 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java @@ -416,9 +416,9 @@ new SearchBarHideHandler(webView, getActivity().getToolbarView()); imagesContainer = (ViewGroup) parentFragment.getView().findViewById(R.id.page_images_container); -leadImagesHandler = new LeadImagesHandler(parentFragment, bridge, webView, imagesContainer); +leadImagesHandler = new LeadImagesHandler(getActivity(), this, bridge, webView, imagesContainer); -bottomContentHandler = new BottomContentHandler(parentFragment, bridge, +bottomContentHandler = new BottomContentHandler(this, bridge, webView, linkHandler, (ViewGroup) parentFragment.getView().findViewById(R.id.bottom_content_container), title); diff --git a/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java b/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java index 97076b5..4d9f00f 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java @@ -31,7 +31,7 @@ import org.wikipedia.page.LinkMovementMethodExt; import org.wikipedia.page.Page; import org.wikipedia.page.PageActivity; -import org.wikipedia.page.PageViewFragment; +import org.wikipedia.page.PageViewFragmentInternal; import org.wikipedia.page.SuggestionsTask; import org.wikipedia.search.FullSearchArticlesTask; import org.wikipedia.views.ObservableWebView; @@ -44,7 +44,7 @@ public class BottomContentHandler implements ObservableWebView.OnScrollChangeListener, ObservableWebView.OnContentHeightChangedListener { private static final String TAG = BottomContentHandler; -private final PageViewFragment parentFragment; +private final PageViewFragmentInternal parentFragment; private final CommunicationBridge bridge; private final WebView webView; private final LinkHandler linkHandler; @@ -63,7 +63,7 @@ private SuggestedPagesFunnel funnel; private FullSearchArticlesTask.FullSearchResults readMoreItems; -public BottomContentHandler(PageViewFragment parentFragment, CommunicationBridge bridge, +public BottomContentHandler(PageViewFragmentInternal parentFragment, CommunicationBridge bridge, ObservableWebView webview, LinkHandler linkHandler, ViewGroup hidingView, PageTitle pageTitle) { this.parentFragment = parentFragment; @@ -71,9 +71,9 @@ this.webView = webview; this.linkHandler = linkHandler; this.pageTitle = pageTitle; -activity = parentFragment.getFragment().getActivity(); +activity = parentFragment.getActivity(); app = (WikipediaApp) activity.getApplicationContext(); -displayDensity = parentFragment.getResources().getDisplayMetrics().density; +displayDensity = activity.getResources().getDisplayMetrics().density; bottomContentContainer = hidingView; webview.addOnScrollChangeListener(this); @@ -139,7 +139,7 @@ funnel = new SuggestedPagesFunnel(app, pageTitle.getSite()); // preload the display density, since it will be used in a lot of places -
[MediaWiki-commits] [Gerrit] Standardise API messages - change (mediawiki...Wikibase)
Lokal Profil has uploaded a new change for review. https://gerrit.wikimedia.org/r/181069 Change subject: Standardise API messages .. Standardise API messages An attempt to standardise API messages. Largely focused on: * Enclosing values passed in examples in quotes (as these should not be translated) * Enclosing references to other parameters in quotes (as these should not be translated) * Linebreak at the end of a sentance should be preceded by a full stop (since APISandbox replaces these by spaces) * Params and descriptions end with full stop, examples do not * ...and a few other fixes Change-Id: I4f6ae219100a8e258b69463f0c856cb9ed25b0d6 --- M repo/i18n/en.json 1 file changed, 110 insertions(+), 110 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/69/181069/1 diff --git a/repo/i18n/en.json b/repo/i18n/en.json index 6dedf61..926a926 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -423,61 +423,61 @@ apihelp-wbavailablebadges-description: Queries available badge items., apihelp-wbavailablebadges-example-1: Queries all available badge items, apihelp-wbcreateclaim-description: Creates Wikibase claims., - apihelp-wbcreateclaim-param-entity: ID of the entity you are adding the claim to, - apihelp-wbcreateclaim-param-property: ID of the snaks property, - apihelp-wbcreateclaim-param-value: Value of the snak when creating a claim with a snak that has a value, - apihelp-wbcreateclaim-param-snaktype: The type of the snak, - apihelp-wbcreateclaim-example-1: Creates a claim for item Q42 of property P9001 with a novalue snak., - apihelp-wbcreateclaim-example-2: Creates a claim for item Q42 of property P9002 with string value \itsastring\, - apihelp-wbcreateclaim-example-3: Creates a claim for item Q42 of property P9003 with a value of item Q1, - apihelp-wbcreateclaim-example-4: Creates a claim for item Q42 of property P9004 with a coordinate snak value, + apihelp-wbcreateclaim-param-entity: ID of the entity you are adding the claim to., + apihelp-wbcreateclaim-param-property: ID of the snaks property., + apihelp-wbcreateclaim-param-value: Value of the snak when creating a claim with a snak that has a value., + apihelp-wbcreateclaim-param-snaktype: The type of the snak., + apihelp-wbcreateclaim-example-1: Creates a claim for item \Q42\ of property \P9001\ with a \novalue\ snak, + apihelp-wbcreateclaim-example-2: Creates a claim for item \Q42\ of property \P9002\ with string value \itsastring\, + apihelp-wbcreateclaim-example-3: Creates a claim for item \Q42\ of property \P9003\ with a value of item \Q1\, + apihelp-wbcreateclaim-example-4: Creates a claim for item \Q42\ of property \P9004\ with a coordinate snak value, apihelp-wbcreateredirect-description: Creates Entity redirects., - apihelp-wbcreateredirect-param-from: Entity ID to make a redirect, - apihelp-wbcreateredirect-param-to: Entity ID to point the redirect to, - apihelp-wbcreateredirect-param-bot: Mark this edit as bot\nThis URL flag will only be respected if the user belongs to the group \bot\., - apihelp-wbcreateredirect-example-1: Turn Q11 into a redirect to Q12, + apihelp-wbcreateredirect-param-from: Entity ID to make a redirect., + apihelp-wbcreateredirect-param-to: Entity ID to point the redirect to., + apihelp-wbcreateredirect-param-bot: Mark this edit as bot.\nThis URL flag will only be respected if the user belongs to the group \bot\., + apihelp-wbcreateredirect-example-1: Turn \Q11\ into a redirect to \Q12\, apihelp-wbeditentity-description: Creates a single new Wikibase entity and modifies it with serialised information., apihelp-wbeditentity-param-id: The identifier for the entity, including the prefix.\nUse either 'id' or 'site' and 'title' together., apihelp-wbeditentity-param-site: An identifier for the site on which the page resides.\nUse together with 'title' to make a complete sitelink., apihelp-wbeditentity-param-title: Title of the page to associate.\nUse together with 'site' to make a complete sitelink., apihelp-wbeditentity-param-baserevid: The numeric identifier for the revision to base the modification on.\nThis is used for detecting conflicts during save., apihelp-wbeditentity-param-summary: Summary for the edit.\nWill be prepended by an automatically generated comment. The length limit of the autocomment together with the summary is 260 characters. Be aware that everything above that limit will be cut off., - apihelp-wbeditentity-param-bot: Mark this edit as bot\nThis URL flag will only be respected if the user belongs to the group \bot\., + apihelp-wbeditentity-param-bot: Mark this edit as bot.\nThis URL flag will only be
[MediaWiki-commits] [Gerrit] Fix indentation in various files - change (operations/puppet)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/181071 Change subject: Fix indentation in various files .. Fix indentation in various files Change-Id: Ib442c919c46f5ec0176de46e10f0d51a2aa94afe --- M manifests/role/cache.pp M modules/bacula/manifests/client/job.pp M modules/icinga/manifests/ircbot.pp M modules/mw-rc-irc/manifests/ircserver.pp M modules/osm/manifests/ganglia.pp M modules/squid3/manifests/init.pp M modules/tor/manifests/init.pp 7 files changed, 13 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/71/181071/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 1351708..297b9c2 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -467,7 +467,7 @@ require = Class['::varnishkafka'], } - # Generate an alert if too many delivery report errors +# Generate an alert if too many delivery report errors monitoring::ganglia { 'varnishkafka-drerr': description = 'Varnishkafka Delivery Errors', metric = 'kafka.varnishkafka.kafka_drerr.per_second', diff --git a/modules/bacula/manifests/client/job.pp b/modules/bacula/manifests/client/job.pp index 8543f2e..698ad35 100644 --- a/modules/bacula/manifests/client/job.pp +++ b/modules/bacula/manifests/client/job.pp @@ -25,10 +25,9 @@ # } # define bacula::client::job( - $fileset, - $jobdefaults, - $extras=undef) { - + $fileset, + $jobdefaults, + $extras=undef) { $director = $::bacula::client::director diff --git a/modules/icinga/manifests/ircbot.pp b/modules/icinga/manifests/ircbot.pp index 322372e..9da428b 100644 --- a/modules/icinga/manifests/ircbot.pp +++ b/modules/icinga/manifests/ircbot.pp @@ -16,7 +16,7 @@ ircecho_logs= $ircecho_logs, ircecho_nick= $ircecho_nick, ircecho_server = $ircecho_server, - } +} # bug 26784 - IRC bots process need nagios monitoring nrpe::monitor_service { 'ircecho': diff --git a/modules/mw-rc-irc/manifests/ircserver.pp b/modules/mw-rc-irc/manifests/ircserver.pp index 39746d1..1f073c0 100644 --- a/modules/mw-rc-irc/manifests/ircserver.pp +++ b/modules/mw-rc-irc/manifests/ircserver.pp @@ -28,7 +28,7 @@ source = 'puppet:///modules/mw-rc-irc/monitor/ircd_stats.py', settings = { method = 'Threaded', - }, +}, } monitoring::service { 'ircd': diff --git a/modules/osm/manifests/ganglia.pp b/modules/osm/manifests/ganglia.pp index 56c1aa8..c299367 100644 --- a/modules/osm/manifests/ganglia.pp +++ b/modules/osm/manifests/ganglia.pp @@ -2,9 +2,9 @@ # This installs a Ganglia plugin for osm # class osm::ganglia( - $state_path, - $refresh_rate = 15, - $ensure = 'present' + $state_path, + $refresh_rate = 15, + $ensure = 'present' ) { file { '/usr/lib/ganglia/python_modules/osm.py': ensure = $ensure, diff --git a/modules/squid3/manifests/init.pp b/modules/squid3/manifests/init.pp index bfa9633..32b70d7 100644 --- a/modules/squid3/manifests/init.pp +++ b/modules/squid3/manifests/init.pp @@ -15,9 +15,9 @@ class squid3( - $ensure = present, - $config_content = undef, - $config_source = undef, +$ensure = present, +$config_content = undef, +$config_source = undef, ) { validate_re($ensure, '^(present|absent)$') diff --git a/modules/tor/manifests/init.pp b/modules/tor/manifests/init.pp index 8eee6f1..e8d26a9 100644 --- a/modules/tor/manifests/init.pp +++ b/modules/tor/manifests/init.pp @@ -50,7 +50,7 @@ port = $tor_dirport, } - motd::script { 'tor_arm': +motd::script { 'tor_arm': ensure = present, content = #!/bin/sh\necho '\nThis is a Tor relay. arm is a monitoring tool for it.\nusage: sudo -u debian-tor arm\nalso see: tail -f /var/log/tor/tor.log\n', } -- To view, visit https://gerrit.wikimedia.org/r/181071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib442c919c46f5ec0176de46e10f0d51a2aa94afe Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added type checks to wikibase.api.RepoApi functions - change (mediawiki...WikibaseJavaScriptApi)
Thiemo Mättig (WMDE) has submitted this change and it was merged. Change subject: Added type checks to wikibase.api.RepoApi functions .. Added type checks to wikibase.api.RepoApi functions Actually reflecting parameter documentation in the code instead of relying on the back-end handling. This resolves some wrong documentation as well. Added tests testing the minimum of parameters required by each function. Change-Id: I4d043f5cc43852970a489014bc5c106592ccfdc3 --- M .jshintrc M README.md M src/RepoApi.js A tests/.jshintrc M tests/RepoApi.tests.js 5 files changed, 557 insertions(+), 149 deletions(-) Approvals: Thiemo Mättig (WMDE): Verified; Looks good to me, approved diff --git a/.jshintrc b/.jshintrc index 09f9407..239b121 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,52 +1,52 @@ { - bitwise : true, // Prohibit bitwise operators (, |, ^, etc.). + bitwise: true, // Prohibit bitwise operators (, |, ^, etc.). camelcase: true, // Force variable names to be camelcase - curly : true, // Require {} for every new block or scope. - eqeqeq : true, // Require triple equals i.e. `===`. + curly: true, // Require {} for every new block or scope. + eqeqeq: true, // Require triple equals i.e. `===`. es3: true, // Prohibit trailing comma in object literals (breaks older versions of IE) - forin : false, // Don't expect `for in` loops to call `hasOwnPrototype`. + forin: false, // Don't expect `for in` loops to call `hasOwnPrototype`. freeze: true, // Prohibit overwriting prototypes of native objects such as Array, Date and so on. - immed : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - latedef : true, // Prohibit variable use before definition. - newcap : true, // Require capitalization of all constructor functions e.g. `new F()`. - noarg : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - noempty : true, // Prohibit use of empty blocks. + immed: true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` + latedef: true, // Prohibit variable use before definition. + newcap: true, // Require capitalization of all constructor functions e.g. `new F()`. + noarg: true, // Prohibit use of `arguments.caller` and `arguments.callee`. + noempty: true, // Prohibit use of empty blocks. nonbsp: true, // Prohibit nbsp - nonew : true, // Prohibit use of constructors for side-effects. - plusplus : false, // Allow use of `++` `--`. - regexp : true, // Prohibit `.` and `[^...]` in regular expressions. - undef : true, // Require all non-global variables be declared before they are used. - unused : false, // Don't warn about unused variables - strict : true, // Require `use strict` pragma in every file. - trailing : true, // Prohibit trailing whitespaces. + nonew: true, // Prohibit use of constructors for side-effects. + plusplus: false, // Allow use of `++` `--`. + regexp: true, // Prohibit `.` and `[^...]` in regular expressions. + undef: true, // Require all non-global variables be declared before they are used. + unused: false, // Don't warn about unused variables + strict: true, // Require `use strict` pragma in every file. + trailing: true, // Prohibit trailing whitespaces. - asi : false, // Don't tolerate Automatic Semicolon Insertion (no semicolons). - boss : false, // Don't tolerate assignments inside if, for while. Usually conditions loops are for comparison, not assignments. - debug : false, // Don't allow debugger statements e.g. browser breakpoints. - eqnull : false, // Don't tolerate use of `== null`. - es5 : false, // Don't allow EcmaScript 5 syntax. - esnext : false, // Don't allow ES.next specific features such as `const` and `let`. - evil : false, // Don't tolerate use of `eval`. - expr : false, // Don't tolerate `ExpressionStatement` as Programs. - funcscope : false, // Don't tolerate declarations of variables inside of control structures while accessing them later from the outside. - globalstrict : false, // Don't allow global use strict (also enables 'strict'). - iterator : false, // Don't allow usage of __iterator__ property. - lastsemic : false, // Don't tolerat missing semicolons when the it is omitted for the last statement in a one-line block. - laxbreak : true, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - laxcomma : false, // Don't suppress warnings about comma-first coding style. - loopfunc : false, // Don't allow functions to be defined within loops. - multistr : false, // Don't tolerate multi-line strings. - onecase : false, // Don't tolerate switches with just one
[MediaWiki-commits] [Gerrit] Added RepoApi tests for functions not yet tested - change (mediawiki...WikibaseJavaScriptApi)
Thiemo Mättig (WMDE) has submitted this change and it was merged. Change subject: Added RepoApi tests for functions not yet tested .. Added RepoApi tests for functions not yet tested Change-Id: I2e45bbfdcae0cb378a376dd9ff635e1fe080378f --- M README.md M tests/RepoApi.tests.js 2 files changed, 326 insertions(+), 40 deletions(-) Approvals: Thiemo Mättig (WMDE): Verified; Looks good to me, approved diff --git a/README.md b/README.md index fcbef2c..f2f54c4 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Enhancements * Updated code documentation to be able to generate documentation using JSDuck. * `wikibase.api.RepoApi` QUnit tests have been rewritten to not execute actual API requests anymore. +* Added `wikibase.api.RepoApi` QUnit tests for functions not yet tested. ### Bugfixes * An empty `Entity` may be created by omitting the `data` parameter on `wikibase.api.RepoApi.createEntity()` again. diff --git a/tests/RepoApi.tests.js b/tests/RepoApi.tests.js index df88a68..bea05e1 100644 --- a/tests/RepoApi.tests.js +++ b/tests/RepoApi.tests.js @@ -112,6 +112,143 @@ assert.equal( getParam( mock.spy, 'data' ), JSON.stringify( data ) ); } ); +QUnit.test( 'formatValue()', function( assert ) { + var mock = mockApi( 'get' ); + + mock.api.formatValue( + { datavalue: 'serialization' }, + { option: 'option value'}, + 'data type id', + 'output format' + ); + + assert.ok( mock.spy.calledOnce, 'Triggered API call.' ); + + assert.equal( + getParam( mock.spy, 'action' ), + 'wbformatvalue', + 'Verified API module being called.' + ); + + assert.equal( + getParam( mock.spy, 'datavalue' ), + JSON.stringify( { datavalue: 'serialization' } ) + ); + assert.equal( getParam( mock.spy, 'options' ), JSON.stringify( { option: 'option value'} ) ); + assert.equal( getParam( mock.spy, 'datatype' ), 'data type id' ); + assert.equal( getParam( mock.spy, 'generate' ), 'output format' ); +} ); + +QUnit.test( 'getEntities()', function( assert ) { + var mock = mockApi( 'get' ); + + mock.api.getEntities( + ['entity id 1', 'entity id 2'], + ['property1', 'property2'], + ['language code 1', 'language code 2'], + ['sort property 1', 'sort property 2'], + 'sort direction' + ); + + mock.api.getEntities( + 'entity id', + 'property', + 'language code', + 'sort property', + 'sort direction' + ); + + assert.ok( mock.spy.calledTwice, 'Triggered API calls.' ); + + assert.equal( + getParam( mock.spy, 'action' ), + 'wbgetentities', + 'Verified API module being called.' + ); + + assert.equal( getParam( mock.spy, 'ids' ), 'entity id 1|entity id 2' ); + assert.equal( getParam( mock.spy, 'props' ), 'property1|property2' ); + assert.equal( getParam( mock.spy, 'languages' ), 'language code 1|language code 2' ); + assert.equal( getParam( mock.spy, 'sort' ), 'sort property 1|sort property 2' ); + assert.equal( getParam( mock.spy, 'dir' ), 'sort direction' ); + + assert.equal( getParam( mock.spy, 'ids', 1 ), 'entity id' ); + assert.equal( getParam( mock.spy, 'props', 1 ), 'property' ); + assert.equal( getParam( mock.spy, 'languages', 1 ), 'language code' ); + assert.equal( getParam( mock.spy, 'sort', 1 ), 'sort property' ); + assert.equal( getParam( mock.spy, 'dir', 1 ), 'sort direction' ); +} ); + +QUnit.test( 'getEntitiesByPage()', function( assert ) { + var mock = mockApi( 'get' ); + + mock.api.getEntitiesByPage( + ['site id 1', 'site id 2'], + ['title1', 'title2'], + ['property1', 'property2'], + ['language code 1', 'language code 2'], + ['sort property 1', 'sort property 2'], + 'sort direction', + true + ); + + mock.api.getEntitiesByPage( + 'site id', + 'title', + 'property', + 'language code', + 'sort property', + 'sort direction', + false + ); + + assert.ok( mock.spy.calledTwice, 'Triggered API calls.' ); + + assert.equal( + getParam( mock.spy, 'action' ), + 'wbgetentities', + 'Verified API module being called.' + ); + + assert.equal( getParam( mock.spy, 'sites' ), 'site id 1|site id 2' ); + assert.equal( getParam( mock.spy, 'titles' ), 'title1|title2' ); + assert.equal( getParam( mock.spy, 'props' ), 'property1|property2' ); + assert.equal( getParam( mock.spy, 'languages' ),
[MediaWiki-commits] [Gerrit] getEntitiesByPage: Always submit normalize parameter if sp... - change (mediawiki...WikibaseJavaScriptApi)
Thiemo Mättig (WMDE) has submitted this change and it was merged. Change subject: getEntitiesByPage: Always submit normalize parameter if specified .. getEntitiesByPage: Always submit normalize parameter if specified Change-Id: I316f1b6f2aa30510c0ac84e85c25ba28144ed49f --- M README.md M src/RepoApi.js 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: Thiemo Mättig (WMDE): Verified; Looks good to me, approved diff --git a/README.md b/README.md index c1e6fac..fcbef2c 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ ### Bugfixes * An empty `Entity` may be created by omitting the `data` parameter on `wikibase.api.RepoApi.createEntity()` again. +* `wikibase.api.RepoApi` always submits `normalize` parameter if it is specified explicitly (before, `false` resolved to `undefined`). ### 1.0.1 (2014-11-28) diff --git a/src/RepoApi.js b/src/RepoApi.js index d688ca8..6306dce 100644 --- a/src/RepoApi.js +++ b/src/RepoApi.js @@ -196,7 +196,7 @@ languages: this._normalizeParam( languages ), sort: this._normalizeParam( sort ), dir: dir || undefined, - normalize: normalize || undefined + normalize: typeof normalize === 'boolean' ? normalize : undefined }; return this._api.get( params ); -- To view, visit https://gerrit.wikimedia.org/r/177508 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I316f1b6f2aa30510c0ac84e85c25ba28144ed49f Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi Gerrit-Branch: master Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rewrote RepoApi tests - change (mediawiki...WikibaseJavaScriptApi)
Thiemo Mättig (WMDE) has submitted this change and it was merged. Change subject: Rewrote RepoApi tests .. Rewrote RepoApi tests Implemented mocking/spying using SinonJS. No actual API request are triggered anymore. Change-Id: I3d1d3af84cf8924115ef38ef319ae09b51bd0ddf --- M .jshintrc M README.md M tests/RepoApi.tests.js 3 files changed, 219 insertions(+), 495 deletions(-) Approvals: Thiemo Mättig (WMDE): Verified; Looks good to me, approved diff --git a/.jshintrc b/.jshintrc index 832d316..09f9407 100644 --- a/.jshintrc +++ b/.jshintrc @@ -57,6 +57,7 @@ jQuery, mediaWiki, QUnit, + sinon, util, wikibase ] diff --git a/README.md b/README.md index 57088c8..c1e6fac 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Enhancements * Updated code documentation to be able to generate documentation using JSDuck. +* `wikibase.api.RepoApi` QUnit tests have been rewritten to not execute actual API requests anymore. ### Bugfixes * An empty `Entity` may be created by omitting the `data` parameter on `wikibase.api.RepoApi.createEntity()` again. diff --git a/tests/RepoApi.tests.js b/tests/RepoApi.tests.js index e59aa83..df88a68 100644 --- a/tests/RepoApi.tests.js +++ b/tests/RepoApi.tests.js @@ -1,520 +1,242 @@ /** - * QUnit tests for wikibase.api.RepoApi - * @see https://www.mediawiki.org/wiki/Extension:Wikibase - * * @licence GNU GPL v2+ * @author H. Snater mediaw...@snater.com */ - -( function( mw, wb, $, QUnit, undefined ) { +( function( mw, wb, QUnit, sinon ) { 'use strict'; - var mwApi = new mw.Api(); +QUnit.module( 'wikibase.api.RepoApi' ); - /** -* wikibase.api.RepoApi object -* @var {Object} -*/ - var api = new wb.api.RepoApi( mwApi ); +/** + * Instantiates a `wikibase.api.RepoApi` object with the relevant method being overwritten and + * having applied a SinonJS spy. + * + * @param {string} [getOrPost='post'] Whether to mock/spy the `get` or `post` request. + * @return {Object} + */ +function mockApi( getOrPost ) { + var api = new mw.Api(), + spyMethod = getOrPost !== 'get' ? 'postWithToken' : 'get'; - /** -* Queue used run asynchronous tests synchronously. -* @var {jQuery} -*/ - var testrun = $( {} ); + api.postWithToken = function() {}; + api.get = function() {}; - /** -* Queue key naming the queue that all tests are appended to. -* @var {String} -*/ - var qkey = 'asyncTests'; - - /** -* Since jQuery.queue does not allow passing parameters, this variable will cache the data -* structures of entities. -* @var {Object} -*/ - var entityStack = []; - - /** -* Triggers running the tests attached to the test queue. -*/ - var runTest = function() { - QUnit.stop(); - testrun.queue( qkey, function() { - QUnit.start(); // finish test run - } ); - testrun.dequeue( qkey ); // start tests + return { + spy: sinon.spy( api, spyMethod ), + api: new wb.api.RepoApi( api ) }; +} - /** -* Handles a failing API request. (The details get logged in the console by mw.Api.) -* -* @param {String} code -* @param {Object} details -*/ - var onFail = function( code, details ) { - QUnit.assert.ok( - false, - 'API request failed returning code: ' + code + '. See console for details.' +/** + * Returns all request parameters submitted to the function performing the `get` or `post` request. + * + * @param {Object} spy The SinonJS spy to extract the parameters from. + * @param [callIndex=0] The call index if multiple API calls have been performed on the same spy. + * @return {Object} + */ +function getParams( spy, callIndex ) { + callIndex = callIndex || 0; + return spy.displayName === 'postWithToken' ? spy.args[callIndex][1] : spy.args[callIndex][0]; +} + +/** + * Returns a specific parameter submitted to the function performing the `get` or `post` request. + * + * @param {Object} spy The SinonJS spy to extract the parameters from. + * @param {string} paramName + * @param [callIndex=0] The call index if multiple API calls have been performed on the same spy. + * @return {string} + */ +function getParam( spy, paramName, callIndex ) { + return getParams( spy, callIndex || 0 )[paramName]; +} + +QUnit.test( 'createEntity()', function( assert ) { + var mock = mockApi(); + + mock.api.createEntity( 'item' ); + mock.api.createEntity( 'property', { + datatype: 'string' + } ); + + assert.ok( mock.spy.calledTwice,
[MediaWiki-commits] [Gerrit] Fix indentation in various files - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Fix indentation in various files .. Fix indentation in various files Change-Id: Ib442c919c46f5ec0176de46e10f0d51a2aa94afe --- M manifests/role/cache.pp M modules/bacula/manifests/client/job.pp M modules/icinga/manifests/ircbot.pp M modules/mw-rc-irc/manifests/ircserver.pp M modules/osm/manifests/ganglia.pp M modules/squid3/manifests/init.pp M modules/tor/manifests/init.pp 7 files changed, 13 insertions(+), 14 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 1351708..297b9c2 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -467,7 +467,7 @@ require = Class['::varnishkafka'], } - # Generate an alert if too many delivery report errors +# Generate an alert if too many delivery report errors monitoring::ganglia { 'varnishkafka-drerr': description = 'Varnishkafka Delivery Errors', metric = 'kafka.varnishkafka.kafka_drerr.per_second', diff --git a/modules/bacula/manifests/client/job.pp b/modules/bacula/manifests/client/job.pp index 8543f2e..698ad35 100644 --- a/modules/bacula/manifests/client/job.pp +++ b/modules/bacula/manifests/client/job.pp @@ -25,10 +25,9 @@ # } # define bacula::client::job( - $fileset, - $jobdefaults, - $extras=undef) { - + $fileset, + $jobdefaults, + $extras=undef) { $director = $::bacula::client::director diff --git a/modules/icinga/manifests/ircbot.pp b/modules/icinga/manifests/ircbot.pp index 322372e..9da428b 100644 --- a/modules/icinga/manifests/ircbot.pp +++ b/modules/icinga/manifests/ircbot.pp @@ -16,7 +16,7 @@ ircecho_logs= $ircecho_logs, ircecho_nick= $ircecho_nick, ircecho_server = $ircecho_server, - } +} # bug 26784 - IRC bots process need nagios monitoring nrpe::monitor_service { 'ircecho': diff --git a/modules/mw-rc-irc/manifests/ircserver.pp b/modules/mw-rc-irc/manifests/ircserver.pp index 39746d1..1f073c0 100644 --- a/modules/mw-rc-irc/manifests/ircserver.pp +++ b/modules/mw-rc-irc/manifests/ircserver.pp @@ -28,7 +28,7 @@ source = 'puppet:///modules/mw-rc-irc/monitor/ircd_stats.py', settings = { method = 'Threaded', - }, +}, } monitoring::service { 'ircd': diff --git a/modules/osm/manifests/ganglia.pp b/modules/osm/manifests/ganglia.pp index 56c1aa8..c299367 100644 --- a/modules/osm/manifests/ganglia.pp +++ b/modules/osm/manifests/ganglia.pp @@ -2,9 +2,9 @@ # This installs a Ganglia plugin for osm # class osm::ganglia( - $state_path, - $refresh_rate = 15, - $ensure = 'present' + $state_path, + $refresh_rate = 15, + $ensure = 'present' ) { file { '/usr/lib/ganglia/python_modules/osm.py': ensure = $ensure, diff --git a/modules/squid3/manifests/init.pp b/modules/squid3/manifests/init.pp index bfa9633..32b70d7 100644 --- a/modules/squid3/manifests/init.pp +++ b/modules/squid3/manifests/init.pp @@ -15,9 +15,9 @@ class squid3( - $ensure = present, - $config_content = undef, - $config_source = undef, +$ensure = present, +$config_content = undef, +$config_source = undef, ) { validate_re($ensure, '^(present|absent)$') diff --git a/modules/tor/manifests/init.pp b/modules/tor/manifests/init.pp index 8eee6f1..e8d26a9 100644 --- a/modules/tor/manifests/init.pp +++ b/modules/tor/manifests/init.pp @@ -50,7 +50,7 @@ port = $tor_dirport, } - motd::script { 'tor_arm': +motd::script { 'tor_arm': ensure = present, content = #!/bin/sh\necho '\nThis is a Tor relay. arm is a monitoring tool for it.\nusage: sudo -u debian-tor arm\nalso see: tail -f /var/log/tor/tor.log\n', } -- To view, visit https://gerrit.wikimedia.org/r/181071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib442c919c46f5ec0176de46e10f0d51a2aa94afe Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@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 missing word to parameter description - change (mediawiki...MobileFrontend)
Lokal Profil has uploaded a new change for review. https://gerrit.wikimedia.org/r/181072 Change subject: Add missing word to parameter description .. Add missing word to parameter description Adds a 'the' to 'apihelp-mobileview-param-prop' Change-Id: I15907c90118d5e6da079b10abbc8a426cf38a3b3 --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/72/181072/1 diff --git a/i18n/en.json b/i18n/en.json index 66fd281..8f713cf 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -342,7 +342,7 @@ apihelp-mobileview-param-page: Title of page to process., apihelp-mobileview-param-redirect: Whether redirects should be followed., apihelp-mobileview-param-sections: Pipe-separated list of section numbers for which to return text. \all\ can be used to return for all. Ranges in format \1-4\ mean get sections 1,2,3,4. Ranges without second number, e.g. \1-\ means get all until the end. \references\ can be used to specify that all sections containing references should be returned., - apihelp-mobileview-param-prop: Which information to get:\n;text:HTML of selected sections.\n;sections:Information about all sections on page.\n;normalizedtitle:Normalized page title.\n;lastmodified:ISO 8601 timestamp for when the page was last modified, e.g. \2014-04-13T22:42:14Z\.\n;lastmodifiedby:Information about the user who modified the page last.\n;revision:Return the current revision ID of the page.\n;protection:Information about protection level.\n;editable:Whether the current user can edit this page. This includes all factors for logged-in users but not blocked status for anons.\n;languagecount:Number of languages that the page is available in.\n;hasvariants:Whether or not the page is available in other language variants.\n;displaytitle:The rendered title of the page, with #123;#123;DISPLAYTITLE#125;#125; and such applied.\n;pageprops:Page properties., + apihelp-mobileview-param-prop: Which information to get:\n;text:HTML of selected sections.\n;sections:Information about all sections on the page.\n;normalizedtitle:Normalized page title.\n;lastmodified:ISO 8601 timestamp for when the page was last modified, e.g. \2014-04-13T22:42:14Z\.\n;lastmodifiedby:Information about the user who modified the page last.\n;revision:Return the current revision ID of the page.\n;protection:Information about protection level.\n;editable:Whether the current user can edit this page. This includes all factors for logged-in users but not blocked status for anons.\n;languagecount:Number of languages that the page is available in.\n;hasvariants:Whether or not the page is available in other language variants.\n;displaytitle:The rendered title of the page, with #123;#123;DISPLAYTITLE#125;#125; and such applied.\n;pageprops:Page properties., apihelp-mobileview-param-prop-withimages: Which information to get:\n;text:HTML of selected sections.\n;sections:Information about all sections on page.\n;normalizedtitle:Normalized page title.\n;lastmodified:ISO 8601 timestamp for when the page was last modified, e.g. \2014-04-13T22:42:14Z\.\n;lastmodifiedby:Information about the user who modified the page last.\n;revision:Return the current revision ID of the page.\n;protection:Information about protection level.\n;editable:Whether the current user can edit this page. This includes all factors for logged-in users but not blocked status for anons.\n;languagecount:Number of languages that the page is available in.\n;hasvariants:Whether or not the page is available in other language variants.\n;displaytitle:The rendered title of the page, with #123;#123;DISPLAYTITLE#125;#125; and such applied.\n;pageprops:Page properties.\n;image:Information about an image associated with this page.\n;thumb:Thumbnail of an image associated with this page., apihelp-mobileview-param-sectionprop: What information about sections to get., apihelp-mobileview-param-pageprops: What page properties to return, a pipe (\|\) separated list or \*\ for all properties., -- To view, visit https://gerrit.wikimedia.org/r/181072 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15907c90118d5e6da079b10abbc8a426cf38a3b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Lokal Profil lokal.pro...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tools: Allos origin protocols other than http - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/181073 Change subject: tools: Allos origin protocols other than http .. tools: Allos origin protocols other than http Contains a backwards compatibility hack that adds http:// protocol if no protocol is found Bug: T84983 Change-Id: If096d46e8d2db891e878cd0ebea2555d5a36605b --- M modules/dynamicproxy/files/urlproxy.lua M modules/toollabs/files/portgrabber 2 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/73/181073/1 diff --git a/modules/dynamicproxy/files/urlproxy.lua b/modules/dynamicproxy/files/urlproxy.lua index 0cb877a..78029af 100644 --- a/modules/dynamicproxy/files/urlproxy.lua +++ b/modules/dynamicproxy/files/urlproxy.lua @@ -33,7 +33,12 @@ local routes = red:array_to_hash(routes_arr) for pattern, backend in pairs(routes) do if ngx.re.match(rest, pattern) ~= nil then -route = 'http://' .. backend +if string.match(backend, '://') then +route = backend +else +-- Temp hack since portgrabber did not +-- specify the http:// protocol by default +route = 'http://' . backend break end end @@ -47,7 +52,7 @@ local routes = red:array_to_hash(routes_arr) for pattern, backend in pairs(routes) do if ngx.re.match(rest, pattern) then -route = 'http://' .. backend +route = backend break end end diff --git a/modules/toollabs/files/portgrabber b/modules/toollabs/files/portgrabber index 537472c..c2bf24b 100755 --- a/modules/toollabs/files/portgrabber +++ b/modules/toollabs/files/portgrabber @@ -31,7 +31,7 @@ socket(PROXY, PF_INET, SOCK_STREAM, getprotobyname('tcp')) and connect(PROXY, sockaddr_in(8282, inet_aton('tools-webproxy'))) and -syswrite PROXY, .*\n$host:$port\n; +syswrite PROXY, .*\nhttp://$host:$port\n;; exec @ARGV, $port; -- To view, visit https://gerrit.wikimedia.org/r/181073 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If096d46e8d2db891e878cd0ebea2555d5a36605b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add documentation for SiteListFileCache - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add documentation for SiteListFileCache .. Add documentation for SiteListFileCache Change-Id: I6c5b7fdfbbd6a4e6d67bd0f4aff539ce4d97cfda --- M includes/site/SiteListFileCache.php 1 file changed, 13 insertions(+), 3 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/site/SiteListFileCache.php b/includes/site/SiteListFileCache.php index f2a95a8..e48a187 100644 --- a/includes/site/SiteListFileCache.php +++ b/includes/site/SiteListFileCache.php @@ -1,5 +1,4 @@ ?php - /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,11 +15,18 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * - * @since 1.25 - * * @file * * @license GNU GPL v2+ + */ + +/** + * Provides a file-based cache of a SiteStore, stored as a json file. + * The cache can be built with the rebuildSitesCache.php maintenance script, + * and a MediaWiki instance can be setup to use this by setting the + * 'wgSitesCacheFile' configuration to the cache file location. + * + * @since 1.25 */ class SiteListFileCache { @@ -55,7 +61,11 @@ } /** +* @param string $globalId +* * @since 1.25 +* +* @return Site|null */ public function getSite( $globalId ) { $sites = $this-getSites(); -- To view, visit https://gerrit.wikimedia.org/r/177098 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c5b7fdfbbd6a4e6d67bd0f4aff539ce4d97cfda Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de 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] Fix jenkins setup - change (mediawiki...CirrusSearch)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/181074 Change subject: Fix jenkins setup .. Fix jenkins setup Its crashing now. Crash bad! Change-Id: I6465cee5ac7940c520fba17ba61c7e48fc30a176 --- M CirrusSearch.php M tests/jenkins/Jenkins.php 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/74/181074/1 diff --git a/CirrusSearch.php b/CirrusSearch.php index 0d3be9a..d7c7ce6 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -593,6 +593,7 @@ $wgAutoloadClasses['CirrusSearch\Maintenance\Validators\IndexAliasValidator'] = $maintenanceDir . '/Validators/IndexAliasValidator.php'; $wgAutoloadClasses['CirrusSearch\Maintenance\Validators\IndexAllAliasValidator'] = $maintenanceDir . '/Validators/IndexAllAliasValidator.php'; $wgAutoloadClasses['CirrusSearch\Maintenance\UpdateVersionIndex'] = __DIR__ . '/maintenance/updateVersionIndex.php'; +$wgAutoloadClasses['CirrusSearch\Maintenance\UpdateSearchIndexConfig'] = __DIR__ . '/maintenance/updateSearchIndexConfig.php'; $wgAutoloadClasses['CirrusSearch\NearMatchPicker'] = $includes . 'NearMatchPicker.php'; $wgAutoloadClasses['CirrusSearch\OtherIndexes'] = $includes . 'OtherIndexes.php'; $wgAutoloadClasses['CirrusSearch\Sanity\Checker'] = $sanity . 'Checker.php'; diff --git a/tests/jenkins/Jenkins.php b/tests/jenkins/Jenkins.php index 9c94ba2..6933da6 100644 --- a/tests/jenkins/Jenkins.php +++ b/tests/jenkins/Jenkins.php @@ -94,8 +94,8 @@ * @return bool true so we let other extensions install more maintenance actions */ public static function installDatabaseUpdatePostActions( $updater ) { - $updater-addPostDatabaseUpdateMaintenance( 'CirrusSearch\Jenkins\NukeAllIndexes'); - $updater-addPostDatabaseUpdateMaintenance( 'CirrusSearch\Jenkins\CleanSetup'); + $updater-addPostDatabaseUpdateMaintenance( 'CirrusSearch\Jenkins\NukeAllIndexes' ); + $updater-addPostDatabaseUpdateMaintenance( 'CirrusSearch\Jenkins\CleanSetup' ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/181074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6465cee5ac7940c520fba17ba61c7e48fc30a176 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing word to parameter description - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Add missing word to parameter description .. Add missing word to parameter description Adds a 'the' to 'apihelp-mobileview-param-prop' Change-Id: I15907c90118d5e6da079b10abbc8a426cf38a3b3 --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 66fd281..8f713cf 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -342,7 +342,7 @@ apihelp-mobileview-param-page: Title of page to process., apihelp-mobileview-param-redirect: Whether redirects should be followed., apihelp-mobileview-param-sections: Pipe-separated list of section numbers for which to return text. \all\ can be used to return for all. Ranges in format \1-4\ mean get sections 1,2,3,4. Ranges without second number, e.g. \1-\ means get all until the end. \references\ can be used to specify that all sections containing references should be returned., - apihelp-mobileview-param-prop: Which information to get:\n;text:HTML of selected sections.\n;sections:Information about all sections on page.\n;normalizedtitle:Normalized page title.\n;lastmodified:ISO 8601 timestamp for when the page was last modified, e.g. \2014-04-13T22:42:14Z\.\n;lastmodifiedby:Information about the user who modified the page last.\n;revision:Return the current revision ID of the page.\n;protection:Information about protection level.\n;editable:Whether the current user can edit this page. This includes all factors for logged-in users but not blocked status for anons.\n;languagecount:Number of languages that the page is available in.\n;hasvariants:Whether or not the page is available in other language variants.\n;displaytitle:The rendered title of the page, with #123;#123;DISPLAYTITLE#125;#125; and such applied.\n;pageprops:Page properties., + apihelp-mobileview-param-prop: Which information to get:\n;text:HTML of selected sections.\n;sections:Information about all sections on the page.\n;normalizedtitle:Normalized page title.\n;lastmodified:ISO 8601 timestamp for when the page was last modified, e.g. \2014-04-13T22:42:14Z\.\n;lastmodifiedby:Information about the user who modified the page last.\n;revision:Return the current revision ID of the page.\n;protection:Information about protection level.\n;editable:Whether the current user can edit this page. This includes all factors for logged-in users but not blocked status for anons.\n;languagecount:Number of languages that the page is available in.\n;hasvariants:Whether or not the page is available in other language variants.\n;displaytitle:The rendered title of the page, with #123;#123;DISPLAYTITLE#125;#125; and such applied.\n;pageprops:Page properties., apihelp-mobileview-param-prop-withimages: Which information to get:\n;text:HTML of selected sections.\n;sections:Information about all sections on page.\n;normalizedtitle:Normalized page title.\n;lastmodified:ISO 8601 timestamp for when the page was last modified, e.g. \2014-04-13T22:42:14Z\.\n;lastmodifiedby:Information about the user who modified the page last.\n;revision:Return the current revision ID of the page.\n;protection:Information about protection level.\n;editable:Whether the current user can edit this page. This includes all factors for logged-in users but not blocked status for anons.\n;languagecount:Number of languages that the page is available in.\n;hasvariants:Whether or not the page is available in other language variants.\n;displaytitle:The rendered title of the page, with #123;#123;DISPLAYTITLE#125;#125; and such applied.\n;pageprops:Page properties.\n;image:Information about an image associated with this page.\n;thumb:Thumbnail of an image associated with this page., apihelp-mobileview-param-sectionprop: What information about sections to get., apihelp-mobileview-param-pageprops: What page properties to return, a pipe (\|\) separated list or \*\ for all properties., -- To view, visit https://gerrit.wikimedia.org/r/181072 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I15907c90118d5e6da079b10abbc8a426cf38a3b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Lokal Profil lokal.pro...@gmail.com Gerrit-Reviewer: Phuedx g...@samsmith.io 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] Fix jenkins setup - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix jenkins setup .. Fix jenkins setup Its crashing now. Crash bad! Change-Id: I6465cee5ac7940c520fba17ba61c7e48fc30a176 --- M CirrusSearch.php M tests/jenkins/Jenkins.php 2 files changed, 3 insertions(+), 2 deletions(-) Approvals: Chad: Looks good to me, approved Zfilipin: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/CirrusSearch.php b/CirrusSearch.php index 0d3be9a..d7c7ce6 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -593,6 +593,7 @@ $wgAutoloadClasses['CirrusSearch\Maintenance\Validators\IndexAliasValidator'] = $maintenanceDir . '/Validators/IndexAliasValidator.php'; $wgAutoloadClasses['CirrusSearch\Maintenance\Validators\IndexAllAliasValidator'] = $maintenanceDir . '/Validators/IndexAllAliasValidator.php'; $wgAutoloadClasses['CirrusSearch\Maintenance\UpdateVersionIndex'] = __DIR__ . '/maintenance/updateVersionIndex.php'; +$wgAutoloadClasses['CirrusSearch\Maintenance\UpdateSearchIndexConfig'] = __DIR__ . '/maintenance/updateSearchIndexConfig.php'; $wgAutoloadClasses['CirrusSearch\NearMatchPicker'] = $includes . 'NearMatchPicker.php'; $wgAutoloadClasses['CirrusSearch\OtherIndexes'] = $includes . 'OtherIndexes.php'; $wgAutoloadClasses['CirrusSearch\Sanity\Checker'] = $sanity . 'Checker.php'; diff --git a/tests/jenkins/Jenkins.php b/tests/jenkins/Jenkins.php index 9c94ba2..6933da6 100644 --- a/tests/jenkins/Jenkins.php +++ b/tests/jenkins/Jenkins.php @@ -94,8 +94,8 @@ * @return bool true so we let other extensions install more maintenance actions */ public static function installDatabaseUpdatePostActions( $updater ) { - $updater-addPostDatabaseUpdateMaintenance( 'CirrusSearch\Jenkins\NukeAllIndexes'); - $updater-addPostDatabaseUpdateMaintenance( 'CirrusSearch\Jenkins\CleanSetup'); + $updater-addPostDatabaseUpdateMaintenance( 'CirrusSearch\Jenkins\NukeAllIndexes' ); + $updater-addPostDatabaseUpdateMaintenance( 'CirrusSearch\Jenkins\CleanSetup' ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/181074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6465cee5ac7940c520fba17ba61c7e48fc30a176 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Chad ch...@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] [IMPROV] Site: Document getFilesFromAnHash properly - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/181076 Change subject: [IMPROV] Site: Document getFilesFromAnHash properly .. [IMPROV] Site: Document getFilesFromAnHash properly This adds a proper documentation to this method (and getImagesFromAnHash) and includes a warning if the hash is set to None (in the future this parameter shouldn't be optional). Change-Id: Ia37b18dc0c587071ea3b0bf5a3ebee7ae2d01504 --- M pywikibot/site.py 1 file changed, 18 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/76/181076/1 diff --git a/pywikibot/site.py b/pywikibot/site.py index 8f82568..5241536 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -4405,23 +4405,33 @@ return self.exturlusage(siteurl, total=limit) def getFilesFromAnHash(self, hash_found=None): -Return all images that have the same hash. + +Return all files with the given hash. -Useful to find duplicates or nowcommons. - -NOTE: it returns also the image itself, if you don't want it, just -filter the list returned. - -NOTE 2: it returns the image title WITHOUT the image namespace. - +@param hash_found: The has of the file. Although it's marked as +optional this method always returns None if the has is None and +it makes no sense to use the default value. +@type hash_found: basestring representing the SHA1 hash +@return: All file titles which belong to the same hash, without a +namespace. +@rtype: list of basestring if hash_found is None: +# This makes absolutely NO sense. +pywikibot.warning( +'The hash_found parameter in getFilesFromAnHash and ' +'getImagesFromAnHash are not optional.') return return [image.title(withNamespace=False) for image in self.allimages(sha1=hash_found)] @deprecated('Site().getFilesFromAnHash') def getImagesFromAnHash(self, hash_found=None): + +Return all images that have the same hash. + +DEPRECATED: Use getFilesFromAnHash instead. + return self.getFilesFromAnHash(hash_found) @must_be(group='user') -- To view, visit https://gerrit.wikimedia.org/r/181076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia37b18dc0c587071ea3b0bf5a3ebee7ae2d01504 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add unit tests for details step controller - change (mediawiki...UploadWizard)
MarkTraceur has uploaded a new change for review. https://gerrit.wikimedia.org/r/181075 Change subject: Add unit tests for details step controller .. Add unit tests for details step controller Bug: T78792 Change-Id: Idb06ab3904c5a55f7e25ea8f82f4977d065638a3 --- M UploadWizardHooks.php A tests/qunit/controller/uw.controller.Details.test.js 2 files changed, 96 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/75/181075/1 diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php index 3d7154d..7885c37 100644 --- a/UploadWizardHooks.php +++ b/UploadWizardHooks.php @@ -899,6 +899,7 @@ ) { $testModules['qunit']['ext.uploadWizard.unit.tests'] = array( 'scripts' = array( + 'tests/qunit/controller/uw.controller.Details.test.js', 'tests/qunit/uw.EventFlowLogger.test.js', 'tests/qunit/mw.UploadWizard.test.js', 'tests/qunit/mw.UploadWizardUpload.test.js', diff --git a/tests/qunit/controller/uw.controller.Details.test.js b/tests/qunit/controller/uw.controller.Details.test.js new file mode 100644 index 000..32d2b01 --- /dev/null +++ b/tests/qunit/controller/uw.controller.Details.test.js @@ -0,0 +1,95 @@ +/* + * This file is part of the MediaWiki extension DetailsWizard. + * + * DetailsWizard is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * DetailsWizard is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with DetailsWizard. If not, see http://www.gnu.org/licenses/. + */ + +( function ( uw ) { + QUnit.module( 'mw.uw.controller.Details', QUnit.newMwEnvironment() ); + + function createTestUpload( sandbox, customDeedChooser, aborted ) { + var stubs = { + bascm: sandbox.stub(), + cd: sandbox.stub(), + ct: sandbox.stub(), + ucdc: sandbox.stub() + }; + + return { + chosenDeed: { + name: customDeedChooser ? 'custom' : 'cc-by-sa-4.0' + }, + + createDetails: stubs.cd, + + details: { + buildAndShowCopyMetadata: stubs.bascm, + + titleInput: { + checkTitle: stubs.ct + }, + + useCustomDeedChooser: stubs.ucdc + }, + + state: aborted ? 'aborted' : 'stashed', + + stubs: stubs + }; + } + + QUnit.test( 'Constructor sanity test', 3, function ( assert ) { + var step = new uw.controller.Details(); + assert.ok( step ); + assert.ok( step instanceof uw.controller.Step ); + assert.ok( step.ui ); + } ); + + QUnit.test( 'moveTo', 16, function ( assert ) { + var step = new uw.controller.Details(), + testUpload = createTestUpload( this.sandbox ) + stepUiStub = this.sandbox.stub( step.ui, 'moveTo' ); + + step.moveTo( [ testUpload ] ); + + assert.strictEqual( testUpload.stubs.bascm.called, false ); + assert.strictEqual( testUpload.stubs.ucdc.called, false ); + assert.ok( testUpload.stubs.cd.called ); + assert.ok( stepUiStub.called ); + + testUpload = createTestUpload( this.sandbox, true ); + step.moveTo( [ testUpload ] ); + + assert.strictEqual( testUpload.stubs.bascm.called, false ); + assert.ok( testUpload.stubs.ucdc.called ); + assert.ok( testUpload.stubs.cd.called ); + assert.ok( stepUiStub.called ); + + testUpload = createTestUpload( this.sandbox ); + step.moveTo( [ testUpload, createTestUpload( this.sandbox ) ] ); + + assert.ok( testUpload.stubs.bascm.called ); + assert.strictEqual( testUpload.stubs.ucdc.called, false ); + assert.ok( testUpload.stubs.cd.called ); + assert.ok( stepUiStub.called ); + + testUpload = createTestUpload( this.sandbox ); + step.moveTo( [ testUpload,
[MediaWiki-commits] [Gerrit] tables.sql: Improve description of old_flags - change (mediawiki/core)
Umherirrender has submitted this change and it was merged. Change subject: tables.sql: Improve description of old_flags .. tables.sql: Improve description of old_flags * Changed the name of the 'utf8' flag to 'utf-8', as that is what Revision stores. (This was already corrected in the mediawiki.org manual page by RichF.) Noted that 'utf8' was, however, mistakenly used in an old version of recompressTracked.php. * Added 'external' to the list of flags. This was already added to the manual page (by GreenReaper) yet not here. Copied the description from there and added a couple of clarifications. Change-Id: If15b49a28d7d4b0397481d21e30d877298fc7955 --- M maintenance/tables.sql 1 file changed, 10 insertions(+), 3 deletions(-) Approvals: Jjanes: Looks good to me, but someone else must approve Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/tables.sql b/maintenance/tables.sql index 0228684..caf8ecc 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -374,13 +374,20 @@ -- Comma-separated list of flags: -- gzip: text is compressed with PHP's gzdeflate() function. - -- utf8: text was stored as UTF-8. - -- If $wgLegacyEncoding option is on, rows *without* this flag - -- will be converted to UTF-8 transparently at load time. + -- utf-8: text was stored as UTF-8. + --If $wgLegacyEncoding option is on, rows *without* this flag + --will be converted to UTF-8 transparently at load time. Note + --that due to a bug in a maintenance script, this flag may + --have been stored as 'utf8' in some cases (T18841). -- object: text field contained a serialized PHP object. -- The object either contains multiple versions compressed -- together to achieve a better compression ratio, or it refers -- to another row where the text can be found. + -- external: text was stored in an external location specified by old_text. + -- Any additional flags apply to the data stored at that URL, not + -- the URL itself. The 'object' flag is *not* set for URLs of the + -- form 'DB://cluster/id/itemid', because the external storage + -- system itself decompresses these. old_flags tinyblob NOT NULL ) /*$wgDBTableOptions*/ MAX_ROWS=1000 AVG_ROW_LENGTH=10240; -- In case tables are created as MyISAM, use row hints for MySQL 5.0 to avoid 4GB limit -- To view, visit https://gerrit.wikimedia.org/r/179873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If15b49a28d7d4b0397481d21e30d877298fc7955 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: PleaseStand pleasest...@live.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Jjanes jeff.ja...@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: Springle sprin...@wikimedia.org 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] Add Kartik Mistry to Beta Cluster alert - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: Add Kartik Mistry to Beta Cluster alert .. Add Kartik Mistry to Beta Cluster alert Change-Id: I137d05d3b4f9185bff2456d8854c700fb49869f8 --- M modules/shinken/files/contactgroups.cfg M modules/shinken/files/contacts.cfg 2 files changed, 8 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/shinken/files/contactgroups.cfg b/modules/shinken/files/contactgroups.cfg index bf75771..3e3ee91 100644 --- a/modules/shinken/files/contactgroups.cfg +++ b/modules/shinken/files/contactgroups.cfg @@ -16,7 +16,7 @@ define contactgroup { contactgroup_name deployment-prep alias Beta Cluster Administrators -members guest,yuvipanda,greg_g,cmcmahon,amusso,twentyafterfour,betacluster-alerts-list,irc-qa +members guest,yuvipanda,greg_g,cmcmahon,amusso,twentyafterfour,betacluster-alerts-list,irc-qa,kart_ } define contactgroup { diff --git a/modules/shinken/files/contacts.cfg b/modules/shinken/files/contacts.cfg index e3e6c3d..0fa0aa6 100644 --- a/modules/shinken/files/contacts.cfg +++ b/modules/shinken/files/contacts.cfg @@ -125,6 +125,13 @@ } define contact { +contact_namekart_ +alias Kartik Mistry +email kmis...@wikimedia.org +use generic-contact +} + +define contact { contact_namebetacluster-alerts-list alias BetaCluster Alerts List email betacluster-ale...@lists.wikimedia.org -- To view, visit https://gerrit.wikimedia.org/r/181067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I137d05d3b4f9185bff2456d8854c700fb49869f8 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@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] toollabs: Remove stray duplicate line in static-server - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: toollabs: Remove stray duplicate line in static-server .. toollabs: Remove stray duplicate line in static-server Change-Id: I1590142a774997869a2a8a87e84944870f036897 --- M modules/toollabs/templates/static-server.conf.erb 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/templates/static-server.conf.erb b/modules/toollabs/templates/static-server.conf.erb index c9c0f08..de4d7b9 100644 --- a/modules/toollabs/templates/static-server.conf.erb +++ b/modules/toollabs/templates/static-server.conf.erb @@ -50,7 +50,6 @@ location ~ ^/([^/]+)(/.*)?$ { autoindex on; -autoindex on; alias /data/project/$1/public_html/static$2; } } -- To view, visit https://gerrit.wikimedia.org/r/181066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1590142a774997869a2a8a87e84944870f036897 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: coren mpellet...@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] tools: Allow origin protocols other than http - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: tools: Allow origin protocols other than http .. tools: Allow origin protocols other than http Contains a backwards compatibility hack that adds http:// protocol if no protocol is found Bug: T84983 Change-Id: If096d46e8d2db891e878cd0ebea2555d5a36605b --- M modules/dynamicproxy/files/urlproxy.lua M modules/toollabs/files/portgrabber 2 files changed, 8 insertions(+), 3 deletions(-) Approvals: Yuvipanda: Looks good to me, approved coren: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/dynamicproxy/files/urlproxy.lua b/modules/dynamicproxy/files/urlproxy.lua index 0cb877a..78029af 100644 --- a/modules/dynamicproxy/files/urlproxy.lua +++ b/modules/dynamicproxy/files/urlproxy.lua @@ -33,7 +33,12 @@ local routes = red:array_to_hash(routes_arr) for pattern, backend in pairs(routes) do if ngx.re.match(rest, pattern) ~= nil then -route = 'http://' .. backend +if string.match(backend, '://') then +route = backend +else +-- Temp hack since portgrabber did not +-- specify the http:// protocol by default +route = 'http://' . backend break end end @@ -47,7 +52,7 @@ local routes = red:array_to_hash(routes_arr) for pattern, backend in pairs(routes) do if ngx.re.match(rest, pattern) then -route = 'http://' .. backend +route = backend break end end diff --git a/modules/toollabs/files/portgrabber b/modules/toollabs/files/portgrabber index 537472c..c2bf24b 100755 --- a/modules/toollabs/files/portgrabber +++ b/modules/toollabs/files/portgrabber @@ -31,7 +31,7 @@ socket(PROXY, PF_INET, SOCK_STREAM, getprotobyname('tcp')) and connect(PROXY, sockaddr_in(8282, inet_aton('tools-webproxy'))) and -syswrite PROXY, .*\n$host:$port\n; +syswrite PROXY, .*\nhttp://$host:$port\n;; exec @ARGV, $port; -- To view, visit https://gerrit.wikimedia.org/r/181073 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If096d46e8d2db891e878cd0ebea2555d5a36605b Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: coren mpellet...@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 qemu-kvm in favor of qemu-system. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/181077 Change subject: Remove qemu-kvm in favor of qemu-system. .. Remove qemu-kvm in favor of qemu-system. The former is the default on new servers but causes some weird issues that prevent live migration. qemu-kvm seems to assume that spice is installed and running even if it's not installed. Change-Id: I104f239f1d8dce5c14a91a7a83b215e331270019 --- M modules/openstack/manifests/nova/compute.pp 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/77/181077/1 diff --git a/modules/openstack/manifests/nova/compute.pp b/modules/openstack/manifests/nova/compute.pp index ddeb1ab..0e27278 100644 --- a/modules/openstack/manifests/nova/compute.pp +++ b/modules/openstack/manifests/nova/compute.pp @@ -67,11 +67,20 @@ require = Package[nova-common]; } -package { [ 'nova-compute', nova-compute-kvm ]: +package { [ 'nova-compute', 'nova-compute-kvm', 'qemu-system' ]: ensure = present, require = Class[openstack::repo]; } +# qemu-kvm and qemu-system are alternative packages to meet the needs of libvirt. +# Lately, Precise has been installing qemu-kvm by default. That's different +# from our old, existing servers, and it also defaults to use spice for vms +# even though spice is not installed. Messy. +package { [ 'qemu-kvm' ]: +ensure = absent, +require = Package['qemu-system']; +} + # nova-compute adds the user with /bin/false, but resize, live migration, etc. # need the nova use to have a real shell, as it uses ssh. user { 'nova': -- To view, visit https://gerrit.wikimedia.org/r/181077 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I104f239f1d8dce5c14a91a7a83b215e331270019 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] Add test for property formatter linking - change (mediawiki...Wikibase)
Unicodesnowman has uploaded a new change for review. https://gerrit.wikimedia.org/r/181078 Change subject: Add test for property formatter linking .. Add test for property formatter linking Test for T181064. Uses the same regex to match links as the one used for items. I haven't defined P5 anywhere - I'm not sure if I need to, test seems to run fine. Change-Id: I4261b3d9e9a7bcca416600c7dee336aaad2aee38 --- M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/78/181078/1 diff --git a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php index bebc3ea..964d01b 100644 --- a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php +++ b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php @@ -15,6 +15,7 @@ use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\EntityIdValue; use Wikibase\DataModel\Entity\ItemId; +use Wikibase\DataModel\Entity\PropertyId; use Wikibase\LanguageFallbackChainFactory; use Wikibase\Lib\EntityIdFormatter; use Wikibase\Lib\FormatterLabelLookupFactory; @@ -162,6 +163,13 @@ '@^a class=extiw href=//commons\\.wikimedia\\.org/wiki/File:Example\\.jpgExample\\.jpg/a$@', 'commonsMedia' ), + 'property link' = array( + SnakFormatter::FORMAT_HTML, + $this-newFormatterOptions(), + new EntityIdValue( new PropertyId( 'P5' ) ), + '/^a\b[^]* href=[^]*\bP5Label for P5\/a.*$/', + 'wikibase-property' + ), 'a month in 1920' = array( SnakFormatter::FORMAT_HTML, $this-newFormatterOptions(), -- To view, visit https://gerrit.wikimedia.org/r/181078 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4261b3d9e9a7bcca416600c7dee336aaad2aee38 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Unicodesnowman ad...@glados.cc ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change case of class names to match declarations - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Change case of class names to match declarations .. Change case of class names to match declarations Found by running tests under a version of PHP patched to report case mismatches as E_STRICT errors. User classes: * MIMEsearchPage * MostlinkedTemplatesPage * SpecialBookSources * UnwatchedpagesPage Internal classes: * DOMXPath * stdClass * XMLReader Did not change: * testautoLoadedcamlCLASS * testautoloadedserializedclass Change-Id: Idc8caa82cd6adb7bab44b142af2b02e15f0a89ee --- M includes/HtmlFormatter.php M includes/Import.php M includes/media/SVGMetadataExtractor.php M includes/page/WikiPage.php M includes/specialpage/QueryPage.php M tests/phpunit/includes/exception/MWExceptionHandlerTest.php M tests/phpunit/includes/specials/SpecialBooksourcesTest.php M tests/phpunit/includes/specials/SpecialMIMESearchTest.php M tests/phpunit/maintenance/DumpTestCase.php 9 files changed, 31 insertions(+), 31 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/HtmlFormatter.php b/includes/HtmlFormatter.php index ccbfba8..e5efb5b 100644 --- a/includes/HtmlFormatter.php +++ b/includes/HtmlFormatter.php @@ -178,7 +178,7 @@ // CSS Classes $domElemsToRemove = array(); - $xpath = new DOMXpath( $doc ); + $xpath = new DOMXPath( $doc ); foreach ( $removals['CLASS'] as $classToRemove ) { $elements = $xpath-query( '//*[contains(@class, ' . $classToRemove . ')]' ); diff --git a/includes/Import.php b/includes/Import.php index 6f93351..5b86fec 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -424,11 +424,11 @@ $buffer = ; while ( $this-reader-read() ) { switch ( $this-reader-nodeType ) { - case XmlReader::TEXT: - case XmlReader::SIGNIFICANT_WHITESPACE: + case XMLReader::TEXT: + case XMLReader::SIGNIFICANT_WHITESPACE: $buffer .= $this-reader-value; break; - case XmlReader::END_ELEMENT: + case XMLReader::END_ELEMENT: return $buffer; } } @@ -466,7 +466,7 @@ if ( !Hooks::run( 'ImportHandleToplevelXMLTag', array( $this ) ) ) { // Do nothing - } elseif ( $tag == 'mediawiki' $type == XmlReader::END_ELEMENT ) { + } elseif ( $tag == 'mediawiki' $type == XMLReader::END_ELEMENT ) { break; } elseif ( $tag == 'siteinfo' ) { $this-handleSiteInfo(); @@ -516,7 +516,7 @@ 'logtitle', 'params' ); while ( $this-reader-read() ) { - if ( $this-reader-nodeType == XmlReader::END_ELEMENT + if ( $this-reader-nodeType == XMLReader::END_ELEMENT $this-reader-name == 'logitem' ) { break; } @@ -580,7 +580,7 @@ $badTitle = false; while ( $skip ? $this-reader-next() : $this-reader-read() ) { - if ( $this-reader-nodeType == XmlReader::END_ELEMENT + if ( $this-reader-nodeType == XMLReader::END_ELEMENT $this-reader-name == 'page' ) { break; } @@ -645,7 +645,7 @@ $skip = false; while ( $skip ? $this-reader-next() : $this-reader-read() ) { - if ( $this-reader-nodeType == XmlReader::END_ELEMENT + if ( $this-reader-nodeType == XMLReader::END_ELEMENT $this-reader-name == 'revision' ) { break; } @@ -737,7 +737,7 @@ $skip = false; while ( $skip ? $this-reader-next() : $this-reader-read() ) { - if ( $this-reader-nodeType == XmlReader::END_ELEMENT + if ( $this-reader-nodeType == XMLReader::END_ELEMENT $this-reader-name == 'upload' ) { break; } @@ -835,7 +835,7 @@ $info = array(); while ( $this-reader-read() ) { - if ( $this-reader-nodeType == XmlReader::END_ELEMENT + if ( $this-reader-nodeType == XMLReader::END_ELEMENT
[MediaWiki-commits] [Gerrit] Removed jQuery.wikibase.claimview - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Removed jQuery.wikibase.claimview .. Removed jQuery.wikibase.claimview As the concept of Claim is to be removed (see https://github.com/wmde/WikibaseDataModel/pull/317), this change removes the corresponding UI concept of claimview and decreases complexity resulting from statementview having to encapsulate claimview while claimview should need to remain an independent widget (as long as there is Claim in the data model). There is no reason to have the concept of claimview, nor the term claim at all remain in the front-end. The change anticipates the data model change by merging main snak and qualifiers related functionality from claimview into statementview. Requires adjusting the browser tests: https://github.com/wmde/WikidataBrowserTests/pull/35 Change-Id: I4060c1f9ff56970e69a59b85ca716848f3dcef53 --- M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js D lib/resources/jquery.wikibase/jquery.wikibase.claimview.js M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js M lib/resources/jquery.wikibase/resources.php M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js M lib/resources/wikibase.css D lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.statementview.tests.js M lib/tests/qunit/jquery.wikibase/resources.php M repo/includes/View/ClaimHtmlGenerator.php M repo/resources/templates.php 14 files changed, 1,005 insertions(+), 1,619 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js index ae19b6d..4430f6e 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js @@ -114,8 +114,9 @@ expensiveChecks = 0; - var $visibleClaims = - findFirstVisibleMainSnakElementsWithinClaimList( this.element ).closest( '.wb-claim' ); + var $visibleClaims + = findFirstVisibleMainSnakElementsWithinClaimList( this.element ) + .closest( '.wikibase-statementview' ); for( var i = 0; i $visibleClaims.length; i++ ) { var $visibleClaim = $visibleClaims.eq( i ), @@ -206,7 +207,8 @@ // Caring about the visibility of .wb-snak-value-container is better than about .wb-statement // or .wb-claim-mainsnak since the label will align with the .wb-snak-value-container. - var $mainSnaks = $searchRange.find( '.wb-claim-mainsnak .wb-snak-value-container' ); + var $mainSnaks + = $searchRange.find( '.wikibase-statementview-mainsnak .wb-snak-value-container' ); $mainSnaks.each( function( i, mainSnakNode ) { // Take first Main Snak value in viewport. If value is not fully visible in viewport, @@ -229,7 +231,7 @@ if( result ) { // Don't forget to get the actual Snak node rather than the value container. - result = $( result ).closest( '.wb-claim-mainsnak'); + result = $( result ).closest( '.wikibase-statementview-mainsnak'); } return result; } diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js index 8f4e372..7a63d38 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js @@ -96,9 +96,9 @@ .on( startEditingEvent, function( event ) { self._addGroupTitleClass( $( event.target ), 'wb-edit' ); } ) - .on( afterRemoveEvent, function( event, value, $claimview ) { + .on( afterRemoveEvent, function( event ) { // Check whether the whole claimlistview may be removed from the claimgrouplistview if - // the last claimview has been removed from the claimlistview. + // the last statementview has been removed from the claimlistview. var $claimlistview = $( event.target ), claimlistview = lia.liInstance(
[MediaWiki-commits] [Gerrit] Remove qemu-kvm in favor of qemu-system. - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Remove qemu-kvm in favor of qemu-system. .. Remove qemu-kvm in favor of qemu-system. The former is the default on new servers but causes some weird issues that prevent live migration. qemu-kvm seems to assume that spice is installed and running even if it's not installed. Change-Id: I104f239f1d8dce5c14a91a7a83b215e331270019 --- M modules/openstack/manifests/nova/compute.pp 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack/manifests/nova/compute.pp b/modules/openstack/manifests/nova/compute.pp index ddeb1ab..0e27278 100644 --- a/modules/openstack/manifests/nova/compute.pp +++ b/modules/openstack/manifests/nova/compute.pp @@ -67,11 +67,20 @@ require = Package[nova-common]; } -package { [ 'nova-compute', nova-compute-kvm ]: +package { [ 'nova-compute', 'nova-compute-kvm', 'qemu-system' ]: ensure = present, require = Class[openstack::repo]; } +# qemu-kvm and qemu-system are alternative packages to meet the needs of libvirt. +# Lately, Precise has been installing qemu-kvm by default. That's different +# from our old, existing servers, and it also defaults to use spice for vms +# even though spice is not installed. Messy. +package { [ 'qemu-kvm' ]: +ensure = absent, +require = Package['qemu-system']; +} + # nova-compute adds the user with /bin/false, but resize, live migration, etc. # need the nova use to have a real shell, as it uses ssh. user { 'nova': -- To view, visit https://gerrit.wikimedia.org/r/181077 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I104f239f1d8dce5c14a91a7a83b215e331270019 Gerrit-PatchSet: 1 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] [IMPROV] Add additional documentation - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/181079 Change subject: [IMPROV] Add additional documentation .. [IMPROV] Add additional documentation This adds a few missing docstrings, so that some files are now not failing the non-voting jenkins test. Change-Id: I213f1d05235a7f242a0776e44d37f8f89a8437c9 --- M pywikibot/site.py M pywikibot/textlib.py M pywikibot/tools.py M pywikibot/userinterfaces/terminal_interface_base.py M pywikibot/userinterfaces/terminal_interface_unix.py M pywikibot/xmlreader.py 6 files changed, 79 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/79/181079/1 diff --git a/pywikibot/site.py b/pywikibot/site.py index 8f82568..57f59fc 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -100,6 +100,7 @@ @classmethod def name(cls, search_value): +Return the name of a LoginStatus by it's value. for key, value in cls.__dict__.items(): if key == key.upper() and value == search_value: return key @@ -107,9 +108,11 @@ % search_value) def __init__(self, state): +Constructor. self.state = state def __repr__(self): +Return internal representation. return 'LoginStatus(%s)' % (LoginStatus.name(self.state)) @@ -301,12 +304,15 @@ return Namespace._colons(self.id, self.custom_name) def __int__(self): +Return the namespace id. return self.id def __index__(self): +Return the namespace id. return self.id def __hash__(self): +Return the namespace id. return self.id def __eq__(self, other): @@ -325,12 +331,15 @@ return not self.__eq__(other) def __mod__(self, other): +Apply modulo on the namespace id. return self.id.__mod__(other) def __sub__(self, other): +Apply subtraction on the namespace id. return -(other) + self.id def __add__(self, other): +Apply addition on the namespace id. return other + self.id def _cmpkey(self): @@ -560,6 +569,7 @@ return self._username[False] def username(self, sysop=False): +Return the username/sysopname used for the site. return self._username[sysop] def __getattr__(self, attr): @@ -853,21 +863,27 @@ # namespace shortcuts for backwards-compatibility def special_namespace(self): +Return local name for the Special: namespace. return self.namespace(-1) def image_namespace(self): +Return local name for the File namespace. return self.namespace(6) def mediawiki_namespace(self): +Return local name for the MediaWiki namespace. return self.namespace(8) def template_namespace(self): +Return local name for the Template namespace. return self.namespace(10) def category_namespace(self): +Return local name for the Category namespace. return self.namespace(14) def category_namespaces(self): +Return names for the Category namespace. return self.namespace(14, all=True) # site-specific formatting preferences @@ -1300,6 +1316,7 @@ Container for tokens. def __init__(self, site): +Constructor. self.site = site self._tokens = {} self.failed_cache = set() # cache unavailable tokens. @@ -1329,6 +1346,7 @@ self.failed_cache.add((self.site.user(), key)) def __getitem__(self, key): +Get token value for the given key. assert(self.site.user()) user_tokens = self._tokens.setdefault(self.site.user(), {}) @@ -1357,12 +1375,15 @@ .format(key, self.site.user(), self.site)) def __contains__(self, key): +Return if the given token name is cached. return key in self._tokens.setdefault(self.site.user(), {}) def __str__(self): +Return a str representation of the internal tokens dictionary. return self._tokens.__str__() def __repr__(self): +Return a representation of the internal tokens dictionary. return self._tokens.__repr__() @@ -2272,6 +2293,7 @@ self._update_page(page, query, 'loadcoordinfo') def loadpageprops(self, page): +Load page props for the given page. title = page.title(withSection=False) query = self._generator(api.PropertyGenerator, type_arg=pageprops, @@ -3744,6 +3766,11 @@ @deprecated(Site.randompages()) def randomredirectpage(self): + +DEPRECATED: Use Site.randompages() instead. + +@return: Return a random redirect page + return self.randompages(total=1, redirects=True) def randompages(self, step=None,
[MediaWiki-commits] [Gerrit] Add custom menu item to WebView context mode. - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/181081 Change subject: Add custom menu item to WebView context mode. .. Add custom menu item to WebView context mode. Precursor to sharing images with a quote. Change-Id: I8e5ace83216c390bbab903ac12cb5f67a2fe38fc --- A icon-svgs/24/ic_share.svg A wikipedia/res/drawable-hdpi/ic_share.png A wikipedia/res/drawable-ldpi/ic_share.png A wikipedia/res/drawable-ldrtl-hdpi/ic_share.png A wikipedia/res/drawable-ldrtl-ldpi/ic_share.png A wikipedia/res/drawable-ldrtl-mdpi/ic_share.png A wikipedia/res/drawable-ldrtl-xhdpi/ic_share.png A wikipedia/res/drawable-ldrtl-xxhdpi/ic_share.png A wikipedia/res/drawable-mdpi/ic_share.png A wikipedia/res/drawable-xhdpi/ic_share.png A wikipedia/res/drawable-xxhdpi/ic_share.png M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java 12 files changed, 92 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/81/181081/1 diff --git a/icon-svgs/24/ic_share.svg b/icon-svgs/24/ic_share.svg new file mode 100644 index 000..9559d17 --- /dev/null +++ b/icon-svgs/24/ic_share.svg @@ -0,0 +1,55 @@ +?xml version=1.0 encoding=UTF-8 standalone=no? +svg + xmlns:dc=http://purl.org/dc/elements/1.1/; + xmlns:cc=http://creativecommons.org/ns#; + xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; + xmlns:svg=http://www.w3.org/2000/svg; + xmlns=http://www.w3.org/2000/svg; + xmlns:sodipodi=http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd; + xmlns:inkscape=http://www.inkscape.org/namespaces/inkscape; + width=24 + height=24 + viewBox=0 0 24 24 + id=svg3059 + version=1.1 + inkscape:version=0.48.5 r10040 + sodipodi:docname=ic_share.svg + metadata + id=metadata3067 +rdf:RDF + cc:Work + rdf:about= +dc:formatimage/svg+xml/dc:format +dc:type + rdf:resource=http://purl.org/dc/dcmitype/StillImage; / + /cc:Work +/rdf:RDF + /metadata + defs + id=defs3065 / + sodipodi:namedview + pagecolor=#ff + bordercolor=#66 + borderopacity=1 + objecttolerance=10 + gridtolerance=10 + guidetolerance=10 + inkscape:pageopacity=0 + inkscape:pageshadow=2 + inkscape:window-width=937 + inkscape:window-height=736 + id=namedview3063 + showgrid=false + inkscape:zoom=9.833 + inkscape:cx=-3.8644068 + inkscape:cy=12 + inkscape:window-x=284 + inkscape:window-y=164 + inkscape:window-maximized=0 + inkscape:current-layer=svg3059 / + path + d=m 18,16.08 c -0.76,0 -1.44,0.3 -1.96,0.77 L 8.91,12.7 C 8.96,12.47 9,12.24 9,12 9,11.76 8.96,11.53 8.91,11.3 L 15.96,7.19 C 16.5,7.69 17.21,8 18,8 19.66,8 21,6.66 21,5 21,3.34 19.66,2 18,2 c -1.66,0 -3,1.34 -3,3 0,0.24 0.04,0.47 0.09,0.7 L 8.04,9.81 C 7.5,9.31 6.79,9 6,9 4.34,9 3,10.34 3,12 c 0,1.66 1.34,3 3,3 0.79,0 1.5,-0.31 2.04,-0.81 l 7.12,4.16 c -0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92 0,-1.61 -1.31,-2.92 -2.92,-2.92 z + id=path3061 + style=fill:#33;fill-opacity:0.6002 + inkscape:connector-curvature=0 / +/svg diff --git a/wikipedia/res/drawable-hdpi/ic_share.png b/wikipedia/res/drawable-hdpi/ic_share.png new file mode 100644 index 000..8f5755e --- /dev/null +++ b/wikipedia/res/drawable-hdpi/ic_share.png Binary files differ diff --git a/wikipedia/res/drawable-ldpi/ic_share.png b/wikipedia/res/drawable-ldpi/ic_share.png new file mode 100644 index 000..47a6bbd --- /dev/null +++ b/wikipedia/res/drawable-ldpi/ic_share.png Binary files differ diff --git a/wikipedia/res/drawable-ldrtl-hdpi/ic_share.png b/wikipedia/res/drawable-ldrtl-hdpi/ic_share.png new file mode 100644 index 000..01607c1 --- /dev/null +++ b/wikipedia/res/drawable-ldrtl-hdpi/ic_share.png Binary files differ diff --git a/wikipedia/res/drawable-ldrtl-ldpi/ic_share.png b/wikipedia/res/drawable-ldrtl-ldpi/ic_share.png new file mode 100644 index 000..89406a7 --- /dev/null +++ b/wikipedia/res/drawable-ldrtl-ldpi/ic_share.png Binary files differ diff --git a/wikipedia/res/drawable-ldrtl-mdpi/ic_share.png b/wikipedia/res/drawable-ldrtl-mdpi/ic_share.png new file mode 100644 index 000..6370ab7 --- /dev/null +++ b/wikipedia/res/drawable-ldrtl-mdpi/ic_share.png Binary files differ diff --git a/wikipedia/res/drawable-ldrtl-xhdpi/ic_share.png b/wikipedia/res/drawable-ldrtl-xhdpi/ic_share.png new file mode 100644 index 000..fb8302f --- /dev/null +++ b/wikipedia/res/drawable-ldrtl-xhdpi/ic_share.png Binary files differ diff --git a/wikipedia/res/drawable-ldrtl-xxhdpi/ic_share.png b/wikipedia/res/drawable-ldrtl-xxhdpi/ic_share.png new file mode 100644 index 000..3e76371 --- /dev/null +++ b/wikipedia/res/drawable-ldrtl-xxhdpi/ic_share.png Binary files differ diff --git a/wikipedia/res/drawable-mdpi/ic_share.png
[MediaWiki-commits] [Gerrit] graphite: introduce local c-relay - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/181080 Change subject: graphite: introduce local c-relay .. graphite: introduce local c-relay The idea behind this change is to have a local carbon-c-relay instance (on port 1903) whose sole task is to forward incoming metrics to the local carbon-cache, in practice replacing carbon-relay's role. In turn, this local carbon-c-relay will receive metrics from a top level carbon-c-relay listening on standard port 2003 for line/plaintext protocol metrics. Change-Id: I61f687237baed6674fcc9813acc9df0ce40d4fbb --- M manifests/role/graphite.pp M modules/graphite/files/carbonctl M modules/graphite/manifests/init.pp A modules/graphite/templates/local-relay.conf.erb A modules/graphite/templates/local-relay.upstart.conf.erb 5 files changed, 58 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/80/181080/1 diff --git a/manifests/role/graphite.pp b/manifests/role/graphite.pp index 706a567..f89d058 100644 --- a/manifests/role/graphite.pp +++ b/manifests/role/graphite.pp @@ -149,6 +149,18 @@ }, storage_dir = $carbon_storage_dir, +c_relay_settings = { +'backends' = [ +'127.0.0.1:2103', +'127.0.0.1:2203', +'127.0.0.1:2303', +'127.0.0.1:2403', +'127.0.0.1:2503', +'127.0.0.1:2603', +'127.0.0.1:2703', +'127.0.0.1:2803', +], +}, } class { '::graphite::web': diff --git a/modules/graphite/files/carbonctl b/modules/graphite/files/carbonctl index e6d9437..1fd4fac 100755 --- a/modules/graphite/files/carbonctl +++ b/modules/graphite/files/carbonctl @@ -12,6 +12,7 @@ /sbin/status carbon/cache NAME=$name | sed 's/ //' done grep -Fqx '[relay]' /etc/carbon/carbon.conf /sbin/status carbon/relay +[ -e /etc/carbon/local-relay.conf ] /sbin/status carbon/local-relay } | { sed 's/, process//' | column -t | tee /dev/stderr | grep -qv running ; } 21 ;; check) diff --git a/modules/graphite/manifests/init.pp b/modules/graphite/manifests/init.pp index 41a27ed..29b5108 100644 --- a/modules/graphite/manifests/init.pp +++ b/modules/graphite/manifests/init.pp @@ -1,20 +1,22 @@ # == Class: graphite # # Graphite is a monitoring tool that stores numeric time-series data and -# renders graphs of this data on demand. It consists of three software +# renders graphs of this data on demand. It consists of the following software # components: # # - Carbon, a daemon that listens for time-series data +# - Carbon-c-relay, an high-performance metric router # - Whisper, a database library for storing time-series data # - Graphite webapp, a webapp which renders graphs on demand # class graphite( $carbon_settings, +$c_relay_settings, $storage_schemas, $storage_aggregation = {}, $storage_dir = '/var/lib/carbon', ) { -require_package('graphite-carbon', 'python-whisper') +require_package('graphite-carbon', 'python-whisper', 'carbon-c-relay') $carbon_service_defaults = { log_updates = false, @@ -62,6 +64,22 @@ notify = Service['carbon'], } +file { '/etc/carbon/local-relay.conf': +content = template('graphite/local-relay.conf.erb'), +require = Class['packages::carbon_c_relay'], +notify = Service['carbon'], +} + +# NOTE: the service is named local-relay as opposed to c-relay otherwise +# we'd have these very similar but different names: +# service carbon-c-relay # from debian package, the standard relay +# service carbon/c-relay # from this module, forwarding to local carbon-cache +file { '/etc/init/carbon/local-relay.conf': +content = template('graphite/local-relay.upstart.conf.erb'), +require = Class['packages::carbon_c_relay'], +notify = Service['carbon'], +} + file { '/etc/init/carbon': source = 'puppet:///modules/graphite/carbon-upstart', recurse = true, diff --git a/modules/graphite/templates/local-relay.conf.erb b/modules/graphite/templates/local-relay.conf.erb new file mode 100644 index 000..40d1773 --- /dev/null +++ b/modules/graphite/templates/local-relay.conf.erb @@ -0,0 +1,13 @@ +# simple carbon-c-relay configuration to replace carbon-relay, will +# load-balance metrics sending among all members of the local cluster. + +cluster carbon-cache + any_of + % @c_relay_settings['backends'].each do |b| -% + %= b % + % end -% + ; + +match * + send to carbon-cache + ; diff --git a/modules/graphite/templates/local-relay.upstart.conf.erb b/modules/graphite/templates/local-relay.upstart.conf.erb new file mode 100644 index 000..c871672 --- /dev/null
[MediaWiki-commits] [Gerrit] [FEAT] Site: blockuser's expiry supports datetime and False - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/181082 Change subject: [FEAT] Site: blockuser's expiry supports datetime and False .. [FEAT] Site: blockuser's expiry supports datetime and False As it already support timestamps the addition of normal datetimes is not that far fetched. It also supports 'False' as an alias for 'never' so scripts are independent of the API and only pywikibot needs to use the actual API value. This also adds the documentation for this function. Change-Id: I352d155cea0d251f35d27e887bbc84e6ee83d549 --- M pywikibot/site.py 1 file changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/82/181082/1 diff --git a/pywikibot/site.py b/pywikibot/site.py index 8f82568..8fb41d1 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -4323,10 +4323,39 @@ @must_be(group='sysop') def blockuser(self, user, expiry, reason, anononly=True, nocreate=True, autoblock=True, noemail=False, reblock=False): + +Block a user for certain amount of time and for a certain reason. +@param user: The username/IP to be blocked without a namespace. +@type user: User +@param expiry: The length or date/time when the block expires. If +'never', 'infinite', 'indefinite' it never does. +@type expiry: Timestamp/datetime (absolute), +basestring (relative/absolute) or False ('never') +@param reason: The reason for the block. +@type reason: basestring +@param anononly: Disable anonymous edits for this IP. +@type anononly: boolean +@param nocreate: Prevent account creation. +@type nocreate: boolean +@param autoblock: Automatically block the last used IP address and all +subsequent IP addresses from which this account logs in. +@type autoblock: boolean +@param noemail: Prevent user from sending email through the wiki. +@type noemail: boolean +@param reblock: If the user is already blocked, overwrite the existing +block. +@type reblock: boolean +@return: The data retrieved from the API request. +@rtype: dict + token = self.tokens['block'] if isinstance(expiry, pywikibot.Timestamp): expiry = expiry.toISOformat() +elif isinstance(expiry, datetime.datetime): +expiry = expiry.strftime(pywikibot.Timestamp.ISO8601Format) +elif expiry is False: +expiry = 'never' req = api.Request(site=self, action='block', user=user.username, expiry=expiry, reason=reason, token=token) if anononly: -- To view, visit https://gerrit.wikimedia.org/r/181082 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I352d155cea0d251f35d27e887bbc84e6ee83d549 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move stat role servers into the 'analytics' $cluster - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/181083 Change subject: Move stat role servers into the 'analytics' $cluster .. Move stat role servers into the 'analytics' $cluster Change-Id: I3e1dfc8c053b1fdc477302009872f89142ce7f36 --- A hieradata/mainrole/statistics.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/83/181083/1 diff --git a/hieradata/mainrole/statistics.yaml b/hieradata/mainrole/statistics.yaml new file mode 100644 index 000..bfd40f0 --- /dev/null +++ b/hieradata/mainrole/statistics.yaml @@ -0,0 +1 @@ +cluster: analytics -- To view, visit https://gerrit.wikimedia.org/r/181083 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e1dfc8c053b1fdc477302009872f89142ce7f36 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 checkstyle. - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/181084 Change subject: Fix checkstyle. .. Fix checkstyle. Change-Id: Ia537b42c9f6fc1556b8e1e08d599989b83e1067a --- M wikipedia/src/main/java/org/wikipedia/onboarding/OnboardingActivity.java 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/84/181084/1 diff --git a/wikipedia/src/main/java/org/wikipedia/onboarding/OnboardingActivity.java b/wikipedia/src/main/java/org/wikipedia/onboarding/OnboardingActivity.java index 44fd93b..278187e 100644 --- a/wikipedia/src/main/java/org/wikipedia/onboarding/OnboardingActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/onboarding/OnboardingActivity.java @@ -53,8 +53,9 @@ wikipediaWordMarkText.setText(Html.fromHtml(getString(R.string.wp_stylized))); if (iw.equals(Locale.getDefault().getLanguage())) { final float dp = WikipediaApp.getInstance().getScreenDensity(); +final int padAdjust = 10; // move wordmark a bit to the right so it lines up better with the slogan -wikipediaWordMarkText.setPadding((int) (10 * dp), 0, 0, 0); +wikipediaWordMarkText.setPadding((int) (padAdjust * dp), 0, 0, 0); } } -- To view, visit https://gerrit.wikimedia.org/r/181084 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia537b42c9f6fc1556b8e1e08d599989b83e1067a Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dbrant dbr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix checkstyle. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Fix checkstyle. .. Fix checkstyle. Change-Id: Ia537b42c9f6fc1556b8e1e08d599989b83e1067a --- M wikipedia/src/main/java/org/wikipedia/onboarding/OnboardingActivity.java 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/onboarding/OnboardingActivity.java b/wikipedia/src/main/java/org/wikipedia/onboarding/OnboardingActivity.java index 44fd93b..278187e 100644 --- a/wikipedia/src/main/java/org/wikipedia/onboarding/OnboardingActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/onboarding/OnboardingActivity.java @@ -53,8 +53,9 @@ wikipediaWordMarkText.setText(Html.fromHtml(getString(R.string.wp_stylized))); if (iw.equals(Locale.getDefault().getLanguage())) { final float dp = WikipediaApp.getInstance().getScreenDensity(); +final int padAdjust = 10; // move wordmark a bit to the right so it lines up better with the slogan -wikipediaWordMarkText.setPadding((int) (10 * dp), 0, 0, 0); +wikipediaWordMarkText.setPadding((int) (padAdjust * dp), 0, 0, 0); } } -- To view, visit https://gerrit.wikimedia.org/r/181084 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia537b42c9f6fc1556b8e1e08d599989b83e1067a Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: BearND bsitzm...@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 the autoload generator use forward slashes on all OSs - change (mediawiki/core)
Umherirrender has submitted this change and it was merged. Change subject: Make the autoload generator use forward slashes on all OSs .. Make the autoload generator use forward slashes on all OSs It was previously using the platform-specific directory separator, meaning that we got backslashes on Windows and forward slashes on other OSs. Bug: T77004 Change-Id: I5d502b54fddd55272e63d4a2a14b6d5de541263a --- M includes/utils/AutoloadGenerator.php 1 file changed, 17 insertions(+), 4 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/utils/AutoloadGenerator.php b/includes/utils/AutoloadGenerator.php index 4e65e11..6149a23 100644 --- a/includes/utils/AutoloadGenerator.php +++ b/includes/utils/AutoloadGenerator.php @@ -50,11 +50,22 @@ if ( !is_array( $flags ) ) { $flags = array( $flags ); } - $this-basepath = realpath( $basepath ); + $this-basepath = self::platformAgnosticRealpath( $basepath ); $this-collector = new ClassCollector; if ( in_array( 'local', $flags ) ) { $this-variableName = 'wgAutoloadLocalClasses'; } + } + + /** +* Wrapper for realpath() that returns the same results (using forward +* slashes) on both Windows and *nix. +* +* @param string $path Parameter to realpath() +* @return string +*/ + protected static function platformAgnosticRealpath( $path ) { + return str_replace( '\\', '/', realpath( $path ) ); } /** @@ -65,7 +76,7 @@ * @param string $inputPath Full path to the file containing the class */ public function forceClassPath( $fqcn, $inputPath ) { - $path = realpath( $inputPath ); + $path = self::platformAgnosticRealpath( $inputPath ); if ( !$path ) { throw new \Exception( Invalid path: $inputPath ); } @@ -78,9 +89,10 @@ } /** -* @var string $inputPath Path to a php file to find classes within +* @param string $inputPath Path to a php file to find classes within */ public function readFile( $inputPath ) { + $inputPath = self::platformAgnosticRealpath( $inputPath ); $len = strlen( $this-basepath ); if ( substr( $inputPath, 0, $len ) !== $this-basepath ) { throw new \Exception( Path is not within basepath: $inputPath ); @@ -99,7 +111,8 @@ * for php files with either .php or .inc extensions */ public function readDir( $dir ) { - $it = new RecursiveDirectoryIterator( realpath( $dir ) ); + $it = new RecursiveDirectoryIterator( + self::platformAgnosticRealpath( $dir ) ); $it = new RecursiveIteratorIterator( $it ); foreach ( $it as $path = $file ) { -- To view, visit https://gerrit.wikimedia.org/r/178376 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d502b54fddd55272e63d4a2a14b6d5de541263a Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: TTO at.li...@live.com.au Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.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] Add i18n messages for the new 'wikibase-property' datatype - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has submitted this change and it was merged. Change subject: Add i18n messages for the new 'wikibase-property' datatype .. Add i18n messages for the new 'wikibase-property' datatype * wikibase-listdatatypes-wikibase-property-head * wikibase-listdatatypes-wikibase-property-body mostly copied from the respective 'wikibase-item' equivalents Also added as comments on SpecialListDatatypes::execute(). Reported by GZWDer on Wikidata: https://www.wikidata.org/wiki/?oldid=182136236#MediaWiki_message_requests Change-Id: I83a8fed4f3e7395caa2b83201682bc911c99c6ef --- M repo/i18n/en.json M repo/i18n/qqq.json 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: Thiemo Mättig (WMDE): Verified; Looks good to me, approved diff --git a/repo/i18n/en.json b/repo/i18n/en.json index 6dedf61..626c5f0 100644 --- a/repo/i18n/en.json +++ b/repo/i18n/en.json @@ -390,6 +390,8 @@ wikibase-property-summary-special-create-property: Created a [$2] property with {{PLURAL:$1|value|values}}, wikibase-listdatatypes-wikibase-item-head: Item, wikibase-listdatatypes-wikibase-item-body: Link to other items at the project. When a value is entered, the project's \Item\ namespace will be searched for matching items., + wikibase-listdatatypes-wikibase-property-head: Property, + wikibase-listdatatypes-wikibase-property-body: Link to properties at the project. When a value is entered, the project's \Property\ namespace will be searched for matching properties., wikibase-listdatatypes-commonsmedia-head: Commons media, wikibase-listdatatypes-commonsmedia-body: Link to files stored at Wikimedia Commons. When a value is entered, the \File\ namespace on Commons will be searched for matching files., wikibase-listdatatypes-globe-coordinate-head: Globe coordinate, diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json index 89542b3..99efa7a 100644 --- a/repo/i18n/qqq.json +++ b/repo/i18n/qqq.json @@ -415,6 +415,8 @@ wikibase-property-summary-special-create-property: Automatic edit summary when creating a property, and supplying one or more values. Parameters:\n* $1 - the number of values set (that is 0 - zero)\n* $2 - the language code of the entity page during creation, wikibase-listdatatypes-wikibase-item-head: {{Wikibase-datatype-head|Item|wikibase-item}}\n{{Identical|Item}}, wikibase-listdatatypes-wikibase-item-body: {{Wikibase-datatype-body|Item}}\n\nFor information about \Iri\ and related terms, see [[:w:Internationalized resource identifier|Internationalized resource identifier]] and [[:w:URI scheme|URI scheme]]., + wikibase-listdatatypes-wikibase-property-head: {{Wikibase-datatype-head|Property|wikibase-property}}\n{{Identical|Property}}, + wikibase-listdatatypes-wikibase-property-body: {{Wikibase-datatype-body|Property}}\n\nFor information about \Iri\ and related terms, see [[:w:Internationalized resource identifier|Internationalized resource identifier]] and [[:w:URI scheme|URI scheme]]., wikibase-listdatatypes-commonsmedia-head: {{Wikibase-datatype-head|Commons media|commonsMedia}}, wikibase-listdatatypes-commonsmedia-body: {{Wikibase-datatype-body|Commons media}}\n\nFor information about \Iri\ and related terms, see [[:w:Internationalized resource identifier|Internationalized resource identifier]] and [[:w:URI scheme|URI scheme]]., wikibase-listdatatypes-globe-coordinate-head: {{Wikibase-datatype-head|Globe coordinate|globe-coordinate}}, -- To view, visit https://gerrit.wikimedia.org/r/181059 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I83a8fed4f3e7395caa2b83201682bc911c99c6ef Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Ricordisamoa ricordisa...@openmailbox.org Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] tools: Fix stupid typos - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/181085 Change subject: tools: Fix stupid typos .. tools: Fix stupid typos AARGHH I suck. Also lua changes are picked up by nginx immediately, without waiting for an nginx restart. tread carefully. Change-Id: Ic348a7cfe92087f5c8c9f1cae001fc4960139cf5 --- M modules/dynamicproxy/files/urlproxy.lua 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/181085/1 diff --git a/modules/dynamicproxy/files/urlproxy.lua b/modules/dynamicproxy/files/urlproxy.lua index 78029af..7c1da27 100644 --- a/modules/dynamicproxy/files/urlproxy.lua +++ b/modules/dynamicproxy/files/urlproxy.lua @@ -38,7 +38,8 @@ else -- Temp hack since portgrabber did not -- specify the http:// protocol by default -route = 'http://' . backend +route = 'http://' .. backend +end break end end -- To view, visit https://gerrit.wikimedia.org/r/181085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic348a7cfe92087f5c8c9f1cae001fc4960139cf5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use also $wgAutoloadClasses in tests for module names - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/181086 Change subject: Use also $wgAutoloadClasses in tests for module names .. Use also $wgAutoloadClasses in tests for module names Extensions using $wgAutoloadClasses where this test will fail Follow-Up: If1125cd5fa4ed836fe15fc79480d78ebd899be4e Change-Id: Ic2024605d7d59890c527cc0580a49da73f8516c8 --- M tests/phpunit/includes/api/ApiMainTest.php M tests/phpunit/includes/api/query/ApiQueryTest.php 2 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/86/181086/1 diff --git a/tests/phpunit/includes/api/ApiMainTest.php b/tests/phpunit/includes/api/ApiMainTest.php index 51d03ed..e91edcb 100644 --- a/tests/phpunit/includes/api/ApiMainTest.php +++ b/tests/phpunit/includes/api/ApiMainTest.php @@ -65,7 +65,10 @@ * Test if all classes in the main module manager exists */ public function testClassNamesInModuleManager() { - global $wgAutoloadLocalClasses; + global $wgAutoloadLocalClasses, $wgAutoloadClasses; + + // wgAutoloadLocalClasses has precedence, just like in includes/AutoLoader.php + $classes = $wgAutoloadLocalClasses + $wgAutoloadClasses; $api = new ApiMain( new FauxRequest( array( 'action' = 'query', 'meta' = 'siteinfo' ) ) @@ -74,7 +77,7 @@ foreach( $modules as $name = $class ) { $this-assertArrayHasKey( $class, - $wgAutoloadLocalClasses, + $classes, 'Class ' . $class . ' for api module ' . $name . ' not in autoloader (with exact case)' ); } diff --git a/tests/phpunit/includes/api/query/ApiQueryTest.php b/tests/phpunit/includes/api/query/ApiQueryTest.php index 3ab1334..5f061b5 100644 --- a/tests/phpunit/includes/api/query/ApiQueryTest.php +++ b/tests/phpunit/includes/api/query/ApiQueryTest.php @@ -121,7 +121,10 @@ * Test if all classes in the query module manager exists */ public function testClassNamesInModuleManager() { - global $wgAutoloadLocalClasses; + global $wgAutoloadLocalClasses, $wgAutoloadClasses; + + // wgAutoloadLocalClasses has precedence, just like in includes/AutoLoader.php + $classes = $wgAutoloadLocalClasses + $wgAutoloadClasses; $api = new ApiMain( new FauxRequest( array( 'action' = 'query', 'meta' = 'siteinfo' ) ) @@ -131,7 +134,7 @@ foreach( $modules as $name = $class ) { $this-assertArrayHasKey( $class, - $wgAutoloadLocalClasses, + $classes, 'Class ' . $class . ' for api module ' . $name . ' not in autoloader (with exact case)' ); } -- To view, visit https://gerrit.wikimedia.org/r/181086 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2024605d7d59890c527cc0580a49da73f8516c8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BrowserTest] This test is unreliable in any version of Chrome - change (mediawiki...VisualEditor)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/181087 Change subject: [BrowserTest] This test is unreliable in any version of Chrome .. [BrowserTest] This test is unreliable in any version of Chrome The issue is that when running automatically, upon loading the page to be edited a second and third time, the cursor ends up in a random place within the existing text of the article. The test expect the cursor to always be at the start of the article text, and this happens in Firefox. I did a cursory check and I could reproduce the issue of random cursor placement upon multiple edits to the same article. There may be a bug here, but it is not trivial to reproduce. So let's take this test out of the Jenkins builds in the service of more reliable green tests. Change-Id: Ie3dd76c5b40f3035d43e6f0a06327adb70900f60 --- M modules/ve-mw/tests/browser/features/multiedit_workflow.feature 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/87/181087/1 diff --git a/modules/ve-mw/tests/browser/features/multiedit_workflow.feature b/modules/ve-mw/tests/browser/features/multiedit_workflow.feature index 72fc812..b85d09c 100644 --- a/modules/ve-mw/tests/browser/features/multiedit_workflow.feature +++ b/modules/ve-mw/tests/browser/features/multiedit_workflow.feature @@ -1,5 +1,5 @@ # encoding: UTF-8 -@chrome @edit_user_page_login @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_10 @login @safari @test2.wikipedia.org +@edit_user_page_login @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_10 @login @safari @test2.wikipedia.org Feature: VisualEditor multi-edit workflow Goal of the test is to make sure the Save and Review Changes -- To view, visit https://gerrit.wikimedia.org/r/181087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3dd76c5b40f3035d43e6f0a06327adb70900f60 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move stat role servers into the 'analytics' $cluster - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Move stat role servers into the 'analytics' $cluster .. Move stat role servers into the 'analytics' $cluster Change-Id: I3e1dfc8c053b1fdc477302009872f89142ce7f36 --- A hieradata/mainrole/statistics.yaml M hieradata/regex.yaml 2 files changed, 8 insertions(+), 3 deletions(-) Approvals: Ottomata: Looks good to me, approved Giuseppe Lavagetto: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/hieradata/mainrole/statistics.yaml b/hieradata/mainrole/statistics.yaml new file mode 100644 index 000..bfd40f0 --- /dev/null +++ b/hieradata/mainrole/statistics.yaml @@ -0,0 +1 @@ +cluster: analytics diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml index 4b54c6a..8c545c7 100644 --- a/hieradata/regex.yaml +++ b/hieradata/regex.yaml @@ -45,8 +45,8 @@ mainrole: appserver admin::groups: - deployment - -#mw1221-mw1235 are api apaches (trusty) + +#mw1221-mw1235 are api apaches (trusty) api_3: __regex: !ruby/regexp /^mw12(2[1-9]|3[0-5])\.eqiad\.wmnet$/ mainrole: api_appserver @@ -59,7 +59,7 @@ admin::groups: - deployment - + swift_fe_eqiad: __regex: !ruby/regexp /^ms-fe100[1-4]\.eqiad\.wmnet$/ cluster: swift @@ -100,6 +100,10 @@ __regex: !ruby/regexp /analytics102[345].eqiad.wmnet/ mainrole: analytics_zookeeper +statistics: + __regex: !ruby/regexp /stat100[123].eqiad.wmnet/ + mainrole: statistics + lsearchd: __regex: !ruby/regexp /^search10[0-2][0-9]\.eqiad\.wmnet$/ cluster: search -- To view, visit https://gerrit.wikimedia.org/r/181083 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e1dfc8c053b1fdc477302009872f89142ce7f36 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@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] Fix lead image click area in 2.3 - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Fix lead image click area in 2.3 .. Fix lead image click area in 2.3 The problem was that, even though the ViewHelper library (nineoldandroids) correctly slides the lead image component, it does not successfully slide the logical click area that corresponds to the visual position of the component! So, the lead image remains clickable even after sliding away. The solution is to stop using the ViewHelper library, and shift the position of the lead image component using standard margins. There was another slight issue, however: in Android 2.3, using negative margins is only possible for a component that has a LinearLayout as a parent. So, I had to put the lead image container into a dummy LinearLayout, just to achieve negative margins. Thanks again, 2.3! NOTE: The same issue is currently present in the Search bar at the top, which slides away in a similar fashion. This will be the subject of a subsequent patch. Bug: T84998 Change-Id: I79120601b156e151a8b9ddabcfef2952c1555de5 --- M wikipedia/res/layout/fragment_page.xml M wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java 2 files changed, 72 insertions(+), 50 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/res/layout/fragment_page.xml b/wikipedia/res/layout/fragment_page.xml index 997e356..aa472a1 100644 --- a/wikipedia/res/layout/fragment_page.xml +++ b/wikipedia/res/layout/fragment_page.xml @@ -29,52 +29,63 @@ android:layout_height=match_parent / -FrameLayout -android:id=@+id/page_images_container +!-- dummy LinearLayout container for 2.3 support. +Remove when we drop support for 2.3. -- +LinearLayout android:layout_width=match_parent -android:layout_height=wrap_content -android:orientation=vertical -android:paddingTop=?attr/actionBarSize -org.wikipedia.page.leadimages.ImageViewWithFace -android:id=@+id/page_image_1 -android:layout_width=match_parent -android:layout_height=match_parent -android:scaleType=centerCrop -android:visibility=invisible/ -ImageView -android:id=@+id/page_image_placeholder -android:layout_width=match_parent -android:layout_height=match_parent -android:scaleType=centerCrop -android:contentDescription=@null/ +android:layout_height=wrap_content FrameLayout -android:id=@+id/page_title_container +android:id=@+id/page_images_container android:layout_width=match_parent android:layout_height=wrap_content -android:orientation=vertical -android:layout_gravity=bottom -TextView -android:id=@+id/page_title_text +android:paddingTop=?attr/actionBarSize +!-- dummy LinearLayout container for 2.3 support. +Remove when we drop support for 2.3. -- +LinearLayout +android:layout_width=match_parent +android:layout_height=match_parent +org.wikipedia.page.leadimages.ImageViewWithFace +android:id=@+id/page_image_1 +android:layout_width=match_parent +android:layout_height=match_parent +android:scaleType=centerCrop +android:visibility=invisible/ +/LinearLayout +ImageView +android:id=@+id/page_image_placeholder +android:layout_width=match_parent +android:layout_height=match_parent +android:scaleType=centerCrop +android:contentDescription=@null/ +FrameLayout +android:id=@+id/page_title_container android:layout_width=match_parent android:layout_height=wrap_content -android:fontFamily=serif -android:paddingTop=16dp -android:paddingBottom=16dp - android:paddingRight=@dimen/activity_horizontal_margin - android:paddingLeft=@dimen/activity_horizontal_margin/ -TextView -android:id=@+id/page_description_text -
[MediaWiki-commits] [Gerrit] Fix possible NPE(s) when accessing parent fragment. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Fix possible NPE(s) when accessing parent fragment. .. Fix possible NPE(s) when accessing parent fragment. In our LeadImagesHandler and BottomContentHandler, we use the getFragment() function which returns the internal fragment object that is currently hosted by the PageViewFragment. The problem is that, when a PageViewFragment is detached, it sets its instance of the internal object to null. So, if the Lead or Bottom components try to access the internal fragment using getFragment() from the result of an AsyncTask after the parent fragment is detached, they will get a null pointer. This patch refactors things so that the internal object itself is passed to the Lead and Bottom components, so that they will never receive a null reference to it. Change-Id: Ie78c76e12128a89218bcea8d65fbfeed01278a63 --- M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java M wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java M wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java 3 files changed, 39 insertions(+), 58 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java index eb3efc8..9f7fd44 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java @@ -416,9 +416,9 @@ new SearchBarHideHandler(webView, getActivity().getToolbarView()); imagesContainer = (ViewGroup) parentFragment.getView().findViewById(R.id.page_images_container); -leadImagesHandler = new LeadImagesHandler(parentFragment, bridge, webView, imagesContainer); +leadImagesHandler = new LeadImagesHandler(getActivity(), this, bridge, webView, imagesContainer); -bottomContentHandler = new BottomContentHandler(parentFragment, bridge, +bottomContentHandler = new BottomContentHandler(this, bridge, webView, linkHandler, (ViewGroup) parentFragment.getView().findViewById(R.id.bottom_content_container), title); diff --git a/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java b/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java index 97076b5..4d9f00f 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java @@ -31,7 +31,7 @@ import org.wikipedia.page.LinkMovementMethodExt; import org.wikipedia.page.Page; import org.wikipedia.page.PageActivity; -import org.wikipedia.page.PageViewFragment; +import org.wikipedia.page.PageViewFragmentInternal; import org.wikipedia.page.SuggestionsTask; import org.wikipedia.search.FullSearchArticlesTask; import org.wikipedia.views.ObservableWebView; @@ -44,7 +44,7 @@ public class BottomContentHandler implements ObservableWebView.OnScrollChangeListener, ObservableWebView.OnContentHeightChangedListener { private static final String TAG = BottomContentHandler; -private final PageViewFragment parentFragment; +private final PageViewFragmentInternal parentFragment; private final CommunicationBridge bridge; private final WebView webView; private final LinkHandler linkHandler; @@ -63,7 +63,7 @@ private SuggestedPagesFunnel funnel; private FullSearchArticlesTask.FullSearchResults readMoreItems; -public BottomContentHandler(PageViewFragment parentFragment, CommunicationBridge bridge, +public BottomContentHandler(PageViewFragmentInternal parentFragment, CommunicationBridge bridge, ObservableWebView webview, LinkHandler linkHandler, ViewGroup hidingView, PageTitle pageTitle) { this.parentFragment = parentFragment; @@ -71,9 +71,9 @@ this.webView = webview; this.linkHandler = linkHandler; this.pageTitle = pageTitle; -activity = parentFragment.getFragment().getActivity(); +activity = parentFragment.getActivity(); app = (WikipediaApp) activity.getApplicationContext(); -displayDensity = parentFragment.getResources().getDisplayMetrics().density; +displayDensity = activity.getResources().getDisplayMetrics().density; bottomContentContainer = hidingView; webview.addOnScrollChangeListener(this); @@ -139,7 +139,7 @@ funnel = new SuggestedPagesFunnel(app, pageTitle.getSite()); // preload the display density, since it will be used in a lot of places -displayDensity =
[MediaWiki-commits] [Gerrit] Add test for property formatter linking - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Add test for property formatter linking .. Add test for property formatter linking Test for T84992. Uses the same regex to match links as the one used for items. I haven't defined P5 anywhere - I'm not sure if I need to, test seems to run fine. Change-Id: I4261b3d9e9a7bcca416600c7dee336aaad2aee38 --- M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php index bebc3ea..964d01b 100644 --- a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php +++ b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php @@ -15,6 +15,7 @@ use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\EntityIdValue; use Wikibase\DataModel\Entity\ItemId; +use Wikibase\DataModel\Entity\PropertyId; use Wikibase\LanguageFallbackChainFactory; use Wikibase\Lib\EntityIdFormatter; use Wikibase\Lib\FormatterLabelLookupFactory; @@ -162,6 +163,13 @@ '@^a class=extiw href=//commons\\.wikimedia\\.org/wiki/File:Example\\.jpgExample\\.jpg/a$@', 'commonsMedia' ), + 'property link' = array( + SnakFormatter::FORMAT_HTML, + $this-newFormatterOptions(), + new EntityIdValue( new PropertyId( 'P5' ) ), + '/^a\b[^]* href=[^]*\bP5Label for P5\/a.*$/', + 'wikibase-property' + ), 'a month in 1920' = array( SnakFormatter::FORMAT_HTML, $this-newFormatterOptions(), -- To view, visit https://gerrit.wikimedia.org/r/181078 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4261b3d9e9a7bcca416600c7dee336aaad2aee38 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Unicodesnowman ad...@glados.cc Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Turn validation fixture into valid Json - change (mediawiki...EventLogging)
QChris has uploaded a new change for review. https://gerrit.wikimedia.org/r/181088 Change subject: Turn validation fixture into valid Json .. Turn validation fixture into valid Json Since the fixture for valid Json had a trailing comma, the fixture got json_decoded to null for Zend (not HHVM), which trivially passed validation. We turn the fixture into valid Json, so the test is actually testing schema validation with non-trivial array on Zend. Change-Id: Icc9325c62569df4d1c5e827efd75f20af0c19e07 --- M tests/ValidateSchemaTest.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging refs/changes/88/181088/1 diff --git a/tests/ValidateSchemaTest.php b/tests/ValidateSchemaTest.php index 6bbacf5..69a1e44 100644 --- a/tests/ValidateSchemaTest.php +++ b/tests/ValidateSchemaTest.php @@ -52,7 +52,7 @@ event: { action: view, connectEnd: 393, -connectStart: 393, +connectStart: 393 }, userAgent: some, other: some -- To view, visit https://gerrit.wikimedia.org/r/181088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc9325c62569df4d1c5e827efd75f20af0c19e07 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EventLogging Gerrit-Branch: master Gerrit-Owner: QChris christ...@quelltextlich.at ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix MW_INSTALL_PATH to default to local installation - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fix MW_INSTALL_PATH to default to local installation .. Fix MW_INSTALL_PATH to default to local installation Which is usually ../../ if executed in the local file system. This was causing problems when running make jsduck in the pre-review script. Locally grunt docs and MW_INSTALL_PATH=../../ make jsduck work fine. This is the reason why 26 errors show on the docs warnings with make jsduck but only a couple (or none with the previous patch) are shown if executed with grunt docs. This may be annoying if somebody works from inside vagrant? Change-Id: I4fe8f9fb36dcf8e3bb3d1530cf6aa1eef8ddbd4b --- M Makefile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bmansurov: Looks good to me, approved jenkins-bot: Verified diff --git a/Makefile b/Makefile index 07b76de..85a9097 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -MW_INSTALL_PATH ?= /vagrant/mediawiki/ +MW_INSTALL_PATH ?= ../../ MEDIAWIKI_LOAD_URL ?= http://localhost:8080/w/load.php # From https://gist.github.com/prwhite/8168133 -- To view, visit https://gerrit.wikimedia.org/r/181063 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4fe8f9fb36dcf8e3bb3d1530cf6aa1eef8ddbd4b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: Bmansurov bmansu...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io 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 MobileWebClickTracking documentation errors - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fix MobileWebClickTracking documentation errors .. Fix MobileWebClickTracking documentation errors With this it should be all done! Change-Id: If331aebdc1e0db6fd592ad75b36648a009287e17 --- M javascripts/loggingSchemas/MobileWebClickTracking.js 1 file changed, 11 insertions(+), 6 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/loggingSchemas/MobileWebClickTracking.js b/javascripts/loggingSchemas/MobileWebClickTracking.js index 90ceb9c..32be1ba 100644 --- a/javascripts/loggingSchemas/MobileWebClickTracking.js +++ b/javascripts/loggingSchemas/MobileWebClickTracking.js @@ -1,8 +1,8 @@ -/** - * Utility library for tracking clicks on certain elements - */ +// Utility library for tracking clicks on certain elements ( function ( M, $ ) { - var s = M.require( 'settings' ); + + var s = M.require( 'settings' ), + MobileWebClickTracking; /** * Check whether 'schema' is one of the predefined schemas. @@ -123,9 +123,14 @@ } } - M.define( 'loggingSchemas/MobileWebClickTracking', { + /** +* @class MobileWebClickTracking +* @singleton +*/ + MobileWebClickTracking = { log: log, logPastEvent: logPastEvent, hijackLink: hijackLink - } ); + }; + M.define( 'loggingSchemas/MobileWebClickTracking', MobileWebClickTracking ); } )( mw.mobileFrontend, jQuery ); -- To view, visit https://gerrit.wikimedia.org/r/181062 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If331aebdc1e0db6fd592ad75b36648a009287e17 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki::hhvm: re-enable xenon - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: mediawiki::hhvm: re-enable xenon .. mediawiki::hhvm: re-enable xenon It was suspected to be the culprit behind the crashes yesterday, but this turned out to be false. Change-Id: I26af1480e64de2597f8332dc9951470d5d6c9eff --- M modules/mediawiki/manifests/hhvm.pp 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/modules/mediawiki/manifests/hhvm.pp b/modules/mediawiki/manifests/hhvm.pp index a64d948..c2fd930 100644 --- a/modules/mediawiki/manifests/hhvm.pp +++ b/modules/mediawiki/manifests/hhvm.pp @@ -24,9 +24,9 @@ group = 'apache', fcgi_settings = { hhvm = { -#xenon = { -#period = to_seconds('10 minutes'), -#}, +xenon = { +period = to_seconds('10 minutes'), +}, error_handling = { call_user_handler_on_fatals = true, }, -- To view, visit https://gerrit.wikimedia.org/r/181026 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I26af1480e64de2597f8332dc9951470d5d6c9eff Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org 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] Add X-WMF-UUID to Wikipedia for Android requests - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Add X-WMF-UUID to Wikipedia for Android requests .. Add X-WMF-UUID to Wikipedia for Android requests See also: Ia0ab1691a31b9555721291803481104cb808689c For now, the inclusion of the UUID in other places not to be removed. On the Android it platform it seems that per-funnel identifiers are part of the event data itself, and as with iOS, the UUID is constructed in a reliable manner. For now the goal is to ensure the goal is to ensure the presence of the accurately set X-WMF-UUID header without causing other unintended side effects in the app. It should be possible to query request logs once this code and its counterpart, in the following change Ieeb3cc38e8d2f3244ec63d5345d4556e2f4a5df9 , are both deployed. If the values match when expected to match, then it should be possible to remove the request path UUID in other non-event payload contexts (e.g., PageViewFragmentInternal.java's builder object with parameter appInstallID). Change-Id: I1f1cb4629cf7fe247f399a6d06feb7602ad0b455 --- M wikipedia/src/main/java/org/wikipedia/WikipediaApp.java 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java index 114dd70..5733bd7 100644 --- a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java +++ b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java @@ -277,6 +277,7 @@ // https://lists.wikimedia.org/pipermail/wikimedia-l/2014-April/071131.html HashMapString, String customHeaders = new HashMapString, String(); customHeaders.put(User-Agent, getUserAgent()); +customHeaders.put(X-WMF-UUID, getAppInstallID()); String acceptLanguage = getAcceptLanguage(); // TODO: once we're not constraining this to just Chinese, add the header unconditionally. -- To view, visit https://gerrit.wikimedia.org/r/180868 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f1cb4629cf7fe247f399a6d06feb7602ad0b455 Gerrit-PatchSet: 3 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: Deskana dga...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Nuria nu...@wikimedia.org Gerrit-Reviewer: OliverKeyes oke...@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 HTMLForm::formatErrors non-static to can parse message ... - change (mediawiki/core)
Legoktm has submitted this change and it was merged. Change subject: Make HTMLForm::formatErrors non-static to can parse message in context .. Make HTMLForm::formatErrors non-static to can parse message in context One call in core already called it non-static Avoid: [GlobalTitleFail] MessageCache::parse called by Message::toString/Message::parseText/MessageCache::parse with no title set Change-Id: Ic91e715177c0a4578825640a31ec68ecba3176e0 --- M includes/htmlform/HTMLForm.php M includes/specials/SpecialBlock.php 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index df805aa..dc73522 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -1015,7 +1015,7 @@ * * @return string HTML, a ul list of errors */ - public static function formatErrors( $errors ) { + public function formatErrors( $errors ) { $errorstr = ''; foreach ( $errors as $error ) { @@ -1029,7 +1029,7 @@ $errorstr .= Html::rawElement( 'li', array(), - wfMessage( $msg, $error )-parse() + $this-msg( $msg, $error )-parse() ); } diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 14d97eb..deb8b0d 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -105,7 +105,7 @@ # Don't need to do anything if the form has been posted if ( !$this-getRequest()-wasPosted() $this-preErrors ) { - $s = HTMLForm::formatErrors( $this-preErrors ); + $s = $form-formatErrors( $this-preErrors ); if ( $s ) { $form-addHeaderText( Html::rawElement( 'div', -- To view, visit https://gerrit.wikimedia.org/r/179597 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic91e715177c0a4578825640a31ec68ecba3176e0 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.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] Use more pretty output in ResourceLoader debug mode for arrays - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/181089 Change subject: Use more pretty output in ResourceLoader debug mode for arrays .. Use more pretty output in ResourceLoader debug mode for arrays Effected: - mw.language.data - mw.language.names - mw.config.set - mw.user.options.set for defaults - mw.toolbar Change-Id: I8a9e718ab15f0b3f80e12b817295c6843a570d46 --- M includes/EditPage.php M includes/resourceloader/ResourceLoaderLanguageDataModule.php M includes/resourceloader/ResourceLoaderLanguageNamesModule.php M includes/resourceloader/ResourceLoaderStartUpModule.php M includes/resourceloader/ResourceLoaderUserDefaultsModule.php 5 files changed, 30 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/89/181089/1 diff --git a/includes/EditPage.php b/includes/EditPage.php index d05b996..c737920 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3747,7 +3747,11 @@ $tool['id'], ); - $script .= Xml::encodeJsCall( 'mw.toolbar.addButton', $params ); + $script .= Xml::encodeJsCall( + 'mw.toolbar.addButton', + $params, + ResourceLoader::inDebugMode() + ); } $script .= '});'; diff --git a/includes/resourceloader/ResourceLoaderLanguageDataModule.php b/includes/resourceloader/ResourceLoaderLanguageDataModule.php index 09d90d6..1239453 100644 --- a/includes/resourceloader/ResourceLoaderLanguageDataModule.php +++ b/includes/resourceloader/ResourceLoaderLanguageDataModule.php @@ -52,10 +52,14 @@ * @return string JavaScript code */ public function getScript( ResourceLoaderContext $context ) { - return Xml::encodeJsCall( 'mw.language.setData', array( - $context-getLanguage(), - $this-getData( $context ) - ) ); + return Xml::encodeJsCall( + 'mw.language.setData', + array( + $context-getLanguage(), + $this-getData( $context ) + ), + ResourceLoader::inDebugMode() + ); } /** diff --git a/includes/resourceloader/ResourceLoaderLanguageNamesModule.php b/includes/resourceloader/ResourceLoaderLanguageNamesModule.php index fe0c845..55b1f4b 100644 --- a/includes/resourceloader/ResourceLoaderLanguageNamesModule.php +++ b/includes/resourceloader/ResourceLoaderLanguageNamesModule.php @@ -49,11 +49,15 @@ * @return string JavaScript code */ public function getScript( ResourceLoaderContext $context ) { - return Xml::encodeJsCall( 'mw.language.setData', array( - $context-getLanguage(), - 'languageNames', - $this-getData( $context ) - ) ); + return Xml::encodeJsCall( + 'mw.language.setData', + array( + $context-getLanguage(), + 'languageNames', + $this-getData( $context ) + ), + ResourceLoader::inDebugMode() + ); } public function getDependencies() { diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index c79554a..3818305 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -356,7 +356,8 @@ ); $mwConfigSetJsCall = Xml::encodeJsCall( 'mw.config.set', - array( $configuration ) + array( $configuration ), + ResourceLoader::inDebugMode() ); $out .= var startUp = function () {\n . @@ -370,7 +371,7 @@ $scriptTag = Html::linkedScript( self::getStartupModulesUrl( $context ) ); $out .= if ( isCompatible() ) {\n . \t . Xml::encodeJsCall( 'document.write', array( $scriptTag ) ) . - }; + \n}; } return $out; diff --git a/includes/resourceloader/ResourceLoaderUserDefaultsModule.php b/includes/resourceloader/ResourceLoaderUserDefaultsModule.php index d78fa9d..5f4bc16 100644 --- a/includes/resourceloader/ResourceLoaderUserDefaultsModule.php +++
[MediaWiki-commits] [Gerrit] Set mw.config wgFileExtensions only on Upload instead of sit... - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/181090 Change subject: Set mw.config wgFileExtensions only on Upload instead of site-wide .. Set mw.config wgFileExtensions only on Upload instead of site-wide It is just used by mediawiki.special.upload Change-Id: I433e29866fe184ba80c5dda35722e228e79f9307 --- M RELEASE-NOTES-1.25 M includes/resourceloader/ResourceLoaderStartUpModule.php M includes/specials/SpecialUpload.php 3 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/181090/1 diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index e8b1162..08a9c59 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -222,7 +222,8 @@ * The skin autodiscovery mechanism, deprecated in MediaWiki 1.23, has been removed. See https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery for migration guide for creators and users of custom skins that relied on it. -* Javascript variable 'wgFileCanRotate' now only available on Special:Upload. +* Javascript variable 'wgFileCanRotate' and 'wgFileExtensions' now only + available on Special:Upload. * (T58257) Set site logo from mediawiki.skinning.interface module instead of inline styles in the HTML. * Removed ApiQueryUsers::getAutoGroups(). (deprecated since 1.20) diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index c79554a..246d4b9 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -90,7 +90,6 @@ 'wgNamespaceIds' = $namespaceIds, 'wgContentNamespaces' = MWNamespace::getContentNamespaces(), 'wgSiteName' = $conf-get( 'Sitename' ), - 'wgFileExtensions' = array_values( array_unique( $conf-get( 'FileExtensions' ) ) ), 'wgDBname' = $conf-get( 'DBname' ), 'wgAvailableSkins' = Skin::getSkinNames(), 'wgExtensionAssetsPath' = $conf-get( 'ExtensionAssetsPath' ), diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index ee89b0a..83336d2 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -1140,6 +1140,7 @@ $this-mDestFile === '', 'wgUploadSourceIds' = $this-mSourceIds, 'wgStrictFileExtensions' = $config-get( 'StrictFileExtensions' ), + 'wgFileExtensions' = array_values( array_unique( $config-get( 'FileExtensions' ) ) ), 'wgCapitalizeUploads' = MWNamespace::isCapitalized( NS_FILE ), 'wgMaxUploadSize' = $this-mMaxUploadSize, 'wgFileCanRotate' = SpecialUpload::rotationEnabled(), -- To view, visit https://gerrit.wikimedia.org/r/181090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I433e29866fe184ba80c5dda35722e228e79f9307 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use more pretty output in ResourceLoader debug mode for arrays - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Use more pretty output in ResourceLoader debug mode for arrays .. Use more pretty output in ResourceLoader debug mode for arrays Effected: - mw.language.data - mw.language.names - mw.config.set - mw.user.options.set for defaults - mw.toolbar Change-Id: I8a9e718ab15f0b3f80e12b817295c6843a570d46 --- M includes/EditPage.php M includes/resourceloader/ResourceLoaderLanguageDataModule.php M includes/resourceloader/ResourceLoaderLanguageNamesModule.php M includes/resourceloader/ResourceLoaderStartUpModule.php M includes/resourceloader/ResourceLoaderUserDefaultsModule.php 5 files changed, 30 insertions(+), 13 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/EditPage.php b/includes/EditPage.php index d05b996..c737920 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3747,7 +3747,11 @@ $tool['id'], ); - $script .= Xml::encodeJsCall( 'mw.toolbar.addButton', $params ); + $script .= Xml::encodeJsCall( + 'mw.toolbar.addButton', + $params, + ResourceLoader::inDebugMode() + ); } $script .= '});'; diff --git a/includes/resourceloader/ResourceLoaderLanguageDataModule.php b/includes/resourceloader/ResourceLoaderLanguageDataModule.php index 09d90d6..1239453 100644 --- a/includes/resourceloader/ResourceLoaderLanguageDataModule.php +++ b/includes/resourceloader/ResourceLoaderLanguageDataModule.php @@ -52,10 +52,14 @@ * @return string JavaScript code */ public function getScript( ResourceLoaderContext $context ) { - return Xml::encodeJsCall( 'mw.language.setData', array( - $context-getLanguage(), - $this-getData( $context ) - ) ); + return Xml::encodeJsCall( + 'mw.language.setData', + array( + $context-getLanguage(), + $this-getData( $context ) + ), + ResourceLoader::inDebugMode() + ); } /** diff --git a/includes/resourceloader/ResourceLoaderLanguageNamesModule.php b/includes/resourceloader/ResourceLoaderLanguageNamesModule.php index fe0c845..55b1f4b 100644 --- a/includes/resourceloader/ResourceLoaderLanguageNamesModule.php +++ b/includes/resourceloader/ResourceLoaderLanguageNamesModule.php @@ -49,11 +49,15 @@ * @return string JavaScript code */ public function getScript( ResourceLoaderContext $context ) { - return Xml::encodeJsCall( 'mw.language.setData', array( - $context-getLanguage(), - 'languageNames', - $this-getData( $context ) - ) ); + return Xml::encodeJsCall( + 'mw.language.setData', + array( + $context-getLanguage(), + 'languageNames', + $this-getData( $context ) + ), + ResourceLoader::inDebugMode() + ); } public function getDependencies() { diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index c79554a..3818305 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -356,7 +356,8 @@ ); $mwConfigSetJsCall = Xml::encodeJsCall( 'mw.config.set', - array( $configuration ) + array( $configuration ), + ResourceLoader::inDebugMode() ); $out .= var startUp = function () {\n . @@ -370,7 +371,7 @@ $scriptTag = Html::linkedScript( self::getStartupModulesUrl( $context ) ); $out .= if ( isCompatible() ) {\n . \t . Xml::encodeJsCall( 'document.write', array( $scriptTag ) ) . - }; + \n}; } return $out; diff --git a/includes/resourceloader/ResourceLoaderUserDefaultsModule.php b/includes/resourceloader/ResourceLoaderUserDefaultsModule.php index d78fa9d..5f4bc16 100644 --- a/includes/resourceloader/ResourceLoaderUserDefaultsModule.php +++ b/includes/resourceloader/ResourceLoaderUserDefaultsModule.php
[MediaWiki-commits] [Gerrit] Kill search pools 2, 4, 5 from LVS - change (operations/puppet)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/181091 Change subject: Kill search pools 2,4,5 from LVS .. Kill search pools 2,4,5 from LVS Change-Id: I52a1864da8e429fc67560ea23f0367f54ba54191 --- M manifests/role/lvs.pp M modules/lvs/manifests/configuration.pp M modules/lvs/manifests/monitor.pp 3 files changed, 0 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/91/181091/1 diff --git a/manifests/role/lvs.pp b/manifests/role/lvs.pp index 0c6192a..8f8cc3f 100644 --- a/manifests/role/lvs.pp +++ b/manifests/role/lvs.pp @@ -39,10 +39,7 @@ $sip['api'][$::site], $sip['rendering'][$::site], $sip['search_pool1'][$::site], -$sip['search_pool2'][$::site], $sip['search_pool3'][$::site], -$sip['search_pool4'][$::site], -$sip['search_pool5'][$::site], $sip['search_prefix'][$::site], $sip['swift'][$::site], $sip['parsoid'][$::site], diff --git a/modules/lvs/manifests/configuration.pp b/modules/lvs/manifests/configuration.pp index 7f4840b..42a467b 100644 --- a/modules/lvs/manifests/configuration.pp +++ b/modules/lvs/manifests/configuration.pp @@ -133,20 +133,11 @@ 'search_pool1' = { 'eqiad' = 10.2.2.11, }, -'search_pool2' = { -'eqiad' = 10.2.2.12, -}, 'search_pool3' = { 'eqiad' = 10.2.2.13, }, -'search_pool4' = { -'eqiad' = 10.2.2.14, -}, 'search_prefix' = { 'eqiad' = 10.2.2.15, -}, -'search_pool5' = { -'eqiad' = 10.2.2.16, }, 'mobile' = { 'eqiad' = { 'mobilelb' = 208.80.154.236, 'mobilelb6' = '2620:0:861:ed1a::1:c', 'mobilesvc' = 10.2.2.26}, @@ -201,7 +192,6 @@ 'bits' = { }, 'search_pool1' = {}, -'search_pool2' = {}, 'search_pool3' = {}, 'dns_rec' = {}, 'mathoid' = {}, @@ -211,10 +201,7 @@ 'ocg' = {}, 'osm' = {}, 'search_pool1' = {}, -'search_pool2' = {}, 'search_pool3' = {}, -'search_pool4' = {}, -'search_pool5' = {}, 'search_poolbeta' = {}, 'search_prefix' = {}, 'swift' = { @@ -582,23 +569,6 @@ 'IdleConnection' = $idleconnection_monitor_options, }, }, -search_pool2 = { -'description' = Lucene search pool 2, -'class' = low-traffic, -'protocol' = tcp, -'sites' = [ eqiad ], -'ip' = $service_ips['search_pool2'][$::site], -'port' = 8123, -'scheduler' = wrr, -'bgp' = yes, -'depool-threshold' = .1, -'monitors' = { -'ProxyFetch' = { -'url' = [ 'http://localhost/stats' ], -}, -'IdleConnection' = $idleconnection_monitor_options, -}, -}, search_pool3 = { 'description' = Lucene search pool 3, 'class' = low-traffic, @@ -612,40 +582,6 @@ 'monitors' = { 'ProxyFetch' = { 'url' = [ 'http://localhost/stats' ], -}, -'IdleConnection' = $idleconnection_monitor_options, -}, -}, -search_pool4 = { -'description' = Lucene search pool 4, -'class' = low-traffic, -'protocol' = tcp, -'sites' = [ eqiad ], -'ip' = $service_ips['search_pool4'][$::site], -'port' = 8123, -'scheduler' = wrr, -'bgp' = yes, -'depool-threshold' = .1, -'monitors' = { -'ProxyFetch' = { -'url' = [ 'http://localhost/search/enwikinews/us?limit=1' ], -}, -'IdleConnection' = $idleconnection_monitor_options, -}, -}, -search_pool5 = { -'description' = Lucene search pool 5, -'class' = low-traffic, -'protocol' = tcp, -'sites' = [ eqiad ], -'ip' = $service_ips['search_pool5'][$::site], -'port' = 8123, -'scheduler' = wrr, -'bgp' = yes, -'depool-threshold' = .1, -'monitors' = { -'ProxyFetch' = { -'url' = [ 'http://localhost/search/commonswiki/cat?limit=1' ], }, 'IdleConnection' = $idleconnection_monitor_options, }, diff --git a/modules/lvs/manifests/monitor.pp
[MediaWiki-commits] [Gerrit] Remove lsearchd pools 2, 4, 5 from DNS - change (operations/dns)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/181092 Change subject: Remove lsearchd pools 2,4,5 from DNS .. Remove lsearchd pools 2,4,5 from DNS Change-Id: I1fa06322cad03f34dbbc6ee41df6746f22e26977 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/92/181092/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index de3c001..e9e2e23 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -28,11 +28,8 @@ 3 1H IN PTR hhvm-api.svc.eqiad.wmnet. 11 1H IN PTR search-pool1.svc.eqiad.wmnet. -12 1H IN PTR search-pool2.svc.eqiad.wmnet. 13 1H IN PTR search-pool3.svc.eqiad.wmnet. -14 1H IN PTR search-pool4.svc.eqiad.wmnet. 15 1H IN PTR search-prefix.svc.eqiad.wmnet. -16 1H IN PTR search-pool5.svc.eqiad.wmnet. 19 1H IN PTR citoid.svc.eqiad.wmnet. 20 1H IN PTR mathoid.svc.eqiad.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 708f587..91edc81 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2884,11 +2884,8 @@ appservers 1H IN A10.2.2.1 hhvm-api1H IN A10.2.2.3 search-pool11H IN A10.2.2.11 -search-pool21H IN A10.2.2.12 search-pool31H IN A10.2.2.13 -search-pool41H IN A10.2.2.14 search-prefix 1H IN A10.2.2.15 -search-pool51H IN A10.2.2.16 citoid 1H IN A10.2.2.19 mathoid 1H IN A10.2.2.20 rendering 1H IN A10.2.2.21 -- To view, visit https://gerrit.wikimedia.org/r/181092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1fa06322cad03f34dbbc6ee41df6746f22e26977 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master 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] tools: Fix stupid typos - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: tools: Fix stupid typos .. tools: Fix stupid typos AARGHH I suck. Also lua changes are picked up by nginx immediately, without waiting for an nginx restart. tread carefully. Change-Id: Ic348a7cfe92087f5c8c9f1cae001fc4960139cf5 --- M modules/dynamicproxy/files/urlproxy.lua 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/dynamicproxy/files/urlproxy.lua b/modules/dynamicproxy/files/urlproxy.lua index 78029af..7c1da27 100644 --- a/modules/dynamicproxy/files/urlproxy.lua +++ b/modules/dynamicproxy/files/urlproxy.lua @@ -38,7 +38,8 @@ else -- Temp hack since portgrabber did not -- specify the http:// protocol by default -route = 'http://' . backend +route = 'http://' .. backend +end break end end -- To view, visit https://gerrit.wikimedia.org/r/181085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic348a7cfe92087f5c8c9f1cae001fc4960139cf5 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@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] Improved algorithm for stripping spurious nowiki/ around q... - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Improved algorithm for stripping spurious nowiki/ around quotes .. Improved algorithm for stripping spurious nowiki/ around quotes * Handles 'ifoo/i as well as ifoo'/i wrt to stripping spurious nowiki/s * Removed some nowiki/ specific tests since those are no longer needed. * Added new test. * Split an existing test into php / parsoid sections to eliminate spurious failures (TODO: There are more probably, but left for future patches). Co-authors: C.Scott Ananian and S.Subramanya Sastry Change-Id: I8f5adf2bc7a5947f9e735536376e37e1b18df287 --- M lib/mediawiki.WikitextSerializer.js M tests/parserTests-blacklist.js M tests/parserTests.txt 3 files changed, 148 insertions(+), 130 deletions(-) Approvals: Cscott: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mediawiki.WikitextSerializer.js b/lib/mediawiki.WikitextSerializer.js index f13cd9a..ea0400b 100644 --- a/lib/mediawiki.WikitextSerializer.js +++ b/lib/mediawiki.WikitextSerializer.js @@ -1212,49 +1212,111 @@ return out; } -// This implements a heuristic to strip a common source of nowiki/s. -// - When i and b tags are matched up properly, any single ' char -// before i or b does not need nowiki/ protection. +// This implements a heuristic to strip two common sources of nowiki/s. +// When i and b tags are matched up properly, +// - any single ' char before i or b does not need nowiki/ protection. +// - any single ' char before /i or /b does not need nowiki/ protection. function stripUnnecessaryQuoteNowikis(wt) { - // no-quotes OR matched quote segments with 5/3/2 quotes OR single-quote char - // - // Within the matched quote-segments, - // - be conservative and don't match higher-priority parser characters - // like [{ -- used for links and templates. This should prevent - // inadvertent matching up across links/templates/tags. - // - allow [[..]] - var testRE = /^[^']+$|^[^']*(('(\[\[(\w|\s|\|)+\]\]|[^\[\{'])+'|'''(\[\[(\w|\s|\|)+\]\]|[^\[\{'])+'''|''(\[\[(\w|\s|\|)+\]\]|[^\[\{'])+''|')([^']+|$))+('|$)$/; - return wt.split(/\n|$/).map(function(line) { - // Optimization: skip test if there are no nowiki/s here to remove. - if (!/nowiki\//.test(line)) { + // Optimization: We are interested in nowiki/s before quote chars. + // So, skip this if we don't have both. + if (!(/nowiki\//.test(line) /'/.test(line))) { return line; } // * Strip out nowiki-protected strings since we are only interested in // quote sequences that correspond to i/b tags. - // * Find segments separated by nowiki/s. - // * If all the segments contain balanced i/b tags, and the nowiki/ - // separated a quote and an i/b tag, we can remove all the nowiki/s - var pieces = line.replace(/nowiki.*?\/nowiki/g, '').split(/nowiki\//); - var n = pieces.length; - for (var i = 0; i n; i++) { - // Since we are okay with single quotes in the middle, strip those - // out so as not to have to deal with them in the testRE regexp above. - // We need to leave a trailing ' behind since we test for it below. - var p = pieces[i].replace(/(^|[^'])'(?=[^'])/g, $1); - if (!testRE.test(p) || - // All but the first piece should start with '' - (i 0 !/^''/.test(p)) || - // All but the last piece should end in a single ' char - // since that is the only scenario we are optimizing for here - (i n-1 !/(^|[^'])'$/.test(p))) - { - return line; + var simplifiedLine = line.replace(/nowiki.*?\/nowiki/g, ''); + + // * Split out all the [[ ]] {{ }} '' ''' ' + // parens in the regexp mean that the split segments will + // be spliced into the result array as the odd elements. + // * If we match up the tags properly and we see opening + // i / b / ib tags preceded by a 'nowiki/, we + // can remove all those nowikis. + // Ex: 'nowiki/''foo'' bar 'nowiki/'''baz''' + // * If we match up the tags properly and we see closing + // i / b / ib tags preceded by a 'nowiki/, we + // can remove all those nowikis. + // Ex: ''foo'nowiki/'' bar '''baz'nowiki/''' + var p = simplifiedLine.split(/('|'''|''|\[\[|\]\]|\{\{|\}\})/);
[MediaWiki-commits] [Gerrit] setting production dns for haedus and capella servers - change (operations/dns)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/181093 Change subject: setting production dns for haedus and capella servers .. setting production dns for haedus and capella servers these will be orientdb testing hosts, setting to private1-b-codfw subnet range T84902 Change-Id: I7ad72a62cbeb36bd0220f7d2a9dd60cb73c3ce66 --- 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/93/181093/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index de3c001..213a65d 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -2469,6 +2469,8 @@ 31 1H IN PTR es2010.codfw.wmnet. 32 1H IN PTR ms-be2014.codfw.wmnet. 33 1H IN PTR graphite2001.codfw.wmnet. +34 1H IN PTR haedus.codfw.wmnet. +35 1H IN PTR capella.codfw.wmnet. $ORIGIN 17.192.{{ zonename }}. 1 1H IN PTR vl2018-eth1.lvs2001.codfw.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 708f587..0413268 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2022,6 +2022,7 @@ ; Servers - listed alphabetically +capella 1H IN A10.192.16.35 db2001 1H IN A10.192.0.4 db2002 1H IN A10.192.0.5 db2003 1H IN A10.192.0.6 @@ -2075,6 +2076,7 @@ es2009 1H IN A10.192.16.30 es2010 1H IN A10.192.16.31 graphite20011H IN A10.192.16.33 +haedus 1H IN A10.192.16.34 heze1H IN A10.192.0.31 labstore20011H IN A10.192.21.4 labstore20021H IN A10.192.21.5 -- To view, visit https://gerrit.wikimedia.org/r/181093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ad72a62cbeb36bd0220f7d2a9dd60cb73c3ce66 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] setting production dns for haedus and capella servers - change (operations/dns)
RobH has submitted this change and it was merged. Change subject: setting production dns for haedus and capella servers .. setting production dns for haedus and capella servers these will be orientdb testing hosts, setting to private1-b-codfw subnet range T84902 Change-Id: I7ad72a62cbeb36bd0220f7d2a9dd60cb73c3ce66 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: RobH: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index de3c001..213a65d 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -2469,6 +2469,8 @@ 31 1H IN PTR es2010.codfw.wmnet. 32 1H IN PTR ms-be2014.codfw.wmnet. 33 1H IN PTR graphite2001.codfw.wmnet. +34 1H IN PTR haedus.codfw.wmnet. +35 1H IN PTR capella.codfw.wmnet. $ORIGIN 17.192.{{ zonename }}. 1 1H IN PTR vl2018-eth1.lvs2001.codfw.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 708f587..0413268 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2022,6 +2022,7 @@ ; Servers - listed alphabetically +capella 1H IN A10.192.16.35 db2001 1H IN A10.192.0.4 db2002 1H IN A10.192.0.5 db2003 1H IN A10.192.0.6 @@ -2075,6 +2076,7 @@ es2009 1H IN A10.192.16.30 es2010 1H IN A10.192.16.31 graphite20011H IN A10.192.16.33 +haedus 1H IN A10.192.16.34 heze1H IN A10.192.0.31 labstore20011H IN A10.192.21.4 labstore20021H IN A10.192.21.5 -- To view, visit https://gerrit.wikimedia.org/r/181093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ad72a62cbeb36bd0220f7d2a9dd60cb73c3ce66 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: RobH r...@wikimedia.org Gerrit-Reviewer: RobH 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] This is a direct follow up to I4261b3d. - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/181094 Change subject: This is a direct follow up to I4261b3d. .. This is a direct follow up to I4261b3d. * Type hinted against TypedValueFormatter interface instead of implementation in PropertyValueSnakFormatter. * Specific type hints in WikibaseValueFormatterBuilders for private methods, generic ValueFormatter type hints for interface methods. * Moved the new test in WikibaseValueFormatterBuildersTest up. * Added type hints. * Cleaned some @throws and @see tags. Change-Id: I77186efbf4aa2e3fe12c0d9c75bac17dc6006ed7 --- M lib/includes/formatters/DispatchingValueFormatter.php M lib/includes/formatters/PropertyValueSnakFormatter.php M lib/includes/formatters/WikibaseSnakFormatterBuilders.php M lib/includes/formatters/WikibaseValueFormatterBuilders.php M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php 5 files changed, 50 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/94/181094/1 diff --git a/lib/includes/formatters/DispatchingValueFormatter.php b/lib/includes/formatters/DispatchingValueFormatter.php index b93f31b..10aae2a 100644 --- a/lib/includes/formatters/DispatchingValueFormatter.php +++ b/lib/includes/formatters/DispatchingValueFormatter.php @@ -27,10 +27,9 @@ *Each type ID must be prefixed with either PT: for property data types *or VT: for data value types. * -* @throws \InvalidArgumentException +* @throws InvalidArgumentException */ public function __construct( array $formatters ) { - foreach ( $formatters as $type = $formatter ) { if ( !is_string( $type ) ) { throw new InvalidArgumentException( '$formatters must map type IDs to formatters.' ); @@ -50,7 +49,7 @@ } /** -* @see ValueFormatter::format(). +* @see ValueFormatter::format * * Formats the given value by finding an appropriate formatter among the ones supplied * to the constructor, and applying it. @@ -59,7 +58,7 @@ * the data type. If none is found, this falls back to finding a formatter based on the * value's type. * -* @see TypedValueFormatter::formatValue. +* @see TypedValueFormatter::formatValue * * @param DataValue $value * @param string$dataTypeId @@ -75,13 +74,13 @@ } /** -* @see ValueFormatter::format(). +* @see ValueFormatter::format * * @since 0.5 * * @param DataValue $value The value to format * -* @throws \DataValues\IllegalValueException +* @throws IllegalValueException * @return string */ public function format( $value ) { diff --git a/lib/includes/formatters/PropertyValueSnakFormatter.php b/lib/includes/formatters/PropertyValueSnakFormatter.php index 83d9b35..77f8e3e 100644 --- a/lib/includes/formatters/PropertyValueSnakFormatter.php +++ b/lib/includes/formatters/PropertyValueSnakFormatter.php @@ -59,7 +59,7 @@ private $options; /** -* @var DispatchingValueFormatter +* @var TypedValueFormatter */ private $valueFormatter; @@ -77,7 +77,7 @@ * @param string $format The name of this formatter's output format. *Use the FORMAT_XXX constants defined in SnakFormatter. * @param FormatterOptions $options -* @param DispatchingValueFormatter $valueFormatter +* @param TypedValueFormatter $valueFormatter * @param PropertyDataTypeLookup $typeLookup * @param DataTypeFactory $dataTypeFactory * @@ -86,7 +86,7 @@ public function __construct( $format, FormatterOptions $options, - DispatchingValueFormatter $valueFormatter, + TypedValueFormatter $valueFormatter, PropertyDataTypeLookup $typeLookup, DataTypeFactory $dataTypeFactory ) { @@ -276,11 +276,11 @@ } /** -* @see ValueFormatter::format(). +* @see ValueFormatter::format * -* Implemented by delegating to the DispatchingValueFormatter passed to the constructor. +* Implemented by delegating to the TypedValueFormatter passed to the constructor. * -* @see TypedValueFormatter::formatValue. +* @see TypedValueFormatter::formatValue * * @param DataValue $value * @param string $dataTypeId @@ -310,7 +310,7 @@ /** * Checks whether the given snak's type is 'value'. * -* @see SnakFormatter::canFormatSnak() +* @see SnakFormatter::canFormatSnak *
[MediaWiki-commits] [Gerrit] setting mac address info for haedus and capella servers - change (operations/puppet)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/181095 Change subject: setting mac address info for haedus and capella servers .. setting mac address info for haedus and capella servers just mac info, no partman yet, not sure how its preferred T84902 Change-Id: I106940d8786b9a1473b6d7e97950c95c934560ee --- M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/95/181095/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 e44752a..8ccc49e 100644 --- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -423,6 +423,11 @@ fixed-address californium.eqiad.wmnet; } +host capella { + hardware ethernet 90:B1:1C:23:20:4D; + fixed-address capella.codfw.wmnet; +} + host carbon { hardware ethernet 78:2b:cb:09:0e:a0; fixed-address carbon.wikimedia.org; @@ -1651,6 +1656,11 @@ fixed-address graphite2001.codfw.wmnet; } +host haedus { + hardware ethernet 90:B1:1C:23:31:85; + fixed-address haedus.codfw.wmnet; +} + host hafnium { hardware ethernet 78:2b:cb:1f:17:48; fixed-address hafnium.wikimedia.org; -- To view, visit https://gerrit.wikimedia.org/r/181095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I106940d8786b9a1473b6d7e97950c95c934560ee Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production 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] SpecialImport: Don't access $this-getConfig() in the constr... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: SpecialImport: Don't access $this-getConfig() in the constructor .. SpecialImport: Don't access $this-getConfig() in the constructor The context is only set later on, so call it in the main execute() function. Bug: T73376 Change-Id: I34229877df6a8960756565f7df1d680aa8951cba --- M includes/specials/SpecialImport.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index da2df2d..c6ebaed 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -47,7 +47,6 @@ */ public function __construct() { parent::__construct( 'Import', 'import' ); - $this-namespace = $this-getConfig()-get( 'ImportTargetNamespace' ); } /** @@ -58,6 +57,8 @@ $this-setHeaders(); $this-outputHeader(); + $this-namespace = $this-getConfig()-get( 'ImportTargetNamespace' ); + $this-getOutput()-addModules( 'mediawiki.special.import' ); $user = $this-getUser(); -- To view, visit https://gerrit.wikimedia.org/r/179959 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34229877df6a8960756565f7df1d680aa8951cba Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: TTO at.li...@live.com.au 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] setting mac address info for haedus and capella servers - change (operations/puppet)
RobH has submitted this change and it was merged. Change subject: setting mac address info for haedus and capella servers .. setting mac address info for haedus and capella servers just mac info, no partman yet, not sure how its preferred T84902 Change-Id: I106940d8786b9a1473b6d7e97950c95c934560ee --- M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: RobH: 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 e44752a..8ccc49e 100644 --- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -423,6 +423,11 @@ fixed-address californium.eqiad.wmnet; } +host capella { + hardware ethernet 90:B1:1C:23:20:4D; + fixed-address capella.codfw.wmnet; +} + host carbon { hardware ethernet 78:2b:cb:09:0e:a0; fixed-address carbon.wikimedia.org; @@ -1651,6 +1656,11 @@ fixed-address graphite2001.codfw.wmnet; } +host haedus { + hardware ethernet 90:B1:1C:23:31:85; + fixed-address haedus.codfw.wmnet; +} + host hafnium { hardware ethernet 78:2b:cb:1f:17:48; fixed-address hafnium.wikimedia.org; -- To view, visit https://gerrit.wikimedia.org/r/181095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I106940d8786b9a1473b6d7e97950c95c934560ee Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH r...@wikimedia.org Gerrit-Reviewer: RobH 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] Remove unnecessary rule to fix issues overlay rendering - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unnecessary rule to fix issues overlay rendering .. Remove unnecessary rule to fix issues overlay rendering This doesn't seem to be needed any more and interferes with the issues overlay. Bug: T78708 Change-Id: I1cdde48b462d5450027f29def08c597aa4267ed6 --- M less/iconsNew.less 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Jdlrobson: Looks good to me, approved Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/less/iconsNew.less b/less/iconsNew.less index 3190029..9af938d 100644 --- a/less/iconsNew.less +++ b/less/iconsNew.less @@ -189,10 +189,6 @@ // FIXME: Upstream to mediawiki ui .mw-ui-icon { // FIXME: Needed for page actions, ensures a tags can give icon height - * { - display: block; - } - :before { background-position: 50% 50%; height: 100%; -- To view, visit https://gerrit.wikimedia.org/r/180312 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1cdde48b462d5450027f29def08c597aa4267ed6 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Bmansurov bmansu...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits