[MediaWiki-commits] [Gerrit] Remove the experimental wysiwyg editor - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Remove the experimental wysiwyg editor .. Remove the experimental wysiwyg editor Change-Id: Ibf0abfebf47717f0e29069f3ca131d1f47359cce --- M Resources.php M modules/editor/ext.cx.editor.js D modules/editor/medium/medium-editor.css D modules/editor/medium/medium-editor.js D modules/editor/medium/theme/agora.css M specials/SpecialContentTranslation.php 6 files changed, 1 insertion(+), 1,716 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index af13c0b..6b3957f 100644 --- a/Resources.php +++ b/Resources.php @@ -122,6 +122,7 @@ 'mediawiki.Uri', 'jquery.throttle-debounce', 'mediawiki.Title', + 'ext.cx.editor', ), 'styles' = array( 'translation/styles/ext.cx.translation.less', @@ -415,17 +416,6 @@ ), 'dependencies' = array( 'jquery.throttle-debounce', - ), -) + $resourcePaths; - -$wgResourceModules['ext.cx.editor.medium'] = array( - 'scripts' = array( - 'editor/ext.cx.editor.js', - 'editor/medium/medium-editor.js', - ), - 'styles' = array( - 'editor/medium/medium-editor.css', - 'editor/medium/theme/agora.css', ), ) + $resourcePaths; diff --git a/modules/editor/ext.cx.editor.js b/modules/editor/ext.cx.editor.js index 455216a..b8e5dd0 100644 --- a/modules/editor/ext.cx.editor.js +++ b/modules/editor/ext.cx.editor.js @@ -8,7 +8,6 @@ * @copyright See AUTHORS.txt * @license GPL-2.0+ */ -/* global MediumEditor: true */ ( function ( $, mw ) { 'use strict'; @@ -34,7 +33,6 @@ } // Make the element editable this.$editableElement.attr( 'contenteditable', true ); - this.wysiwygEditor(); }; /** @@ -69,38 +67,6 @@ return e.which !== 13; // Enter key code } ); } - }; - - /** -* Enhance the basic content editable with a WYSIWYG editor -* MediumEditor is used here. But any such simple editor -* can work here. -*/ - CXSectionEditor.prototype.wysiwygEditor = function () { - var editorOptions; - - if ( !window.MediumEditor ) { - return; - } - editorOptions = { - cleanPastedHTML: true, - buttons: [ 'bold', 'italic', 'header1', 'header2', - 'unorderedlist', 'orderedlist', 'indent', 'outdent' ], - firstHeader: 'h2', - secondHeader: 'h3', - disableDoubleReturn: true - }; - // Avoid previews on mouse over of links - MediumEditor.prototype.editorAnchorObserver = function () {}; - - if ( this.$editableElement.get( 0 ).tagName === 'FIGURECAPTION' ) { - // Prevent pressing return on caption to avoid - // creation of p nodes - editorOptions.disableReturn = true; - } - - /*jshint -W031 */ - new MediumEditor( this.$editableElement, editorOptions ); }; $.fn.cxEditor = function () { diff --git a/modules/editor/medium/medium-editor.css b/modules/editor/medium/medium-editor.css deleted file mode 100644 index 244f74c..000 --- a/modules/editor/medium/medium-editor.css +++ /dev/null @@ -1,168 +0,0 @@ -.clearfix:after { - display: block; - visibility: hidden; - clear: both; - height: 0; - content: ; - font-size: 0; } - -@-webkit-keyframes pop-upwards { - 0% { --webkit-transform: matrix(0.97, 0, 0, 1, 0, 12); -transform: matrix(0.97, 0, 0, 1, 0, 12); -opacity: 0; } - - 20% { --webkit-transform: matrix(0.99, 0, 0, 1, 0, 2); -transform: matrix(0.99, 0, 0, 1, 0, 2); -opacity: 0.7; } - - 40% { --webkit-transform: matrix(1, 0, 0, 1, 0, -1); -transform: matrix(1, 0, 0, 1, 0, -1); -opacity: 1; } - - 70% { --webkit-transform: matrix(1, 0, 0, 1, 0, 0); -transform: matrix(1, 0, 0, 1, 0, 0); -opacity: 1; } - - 100% { --webkit-transform: matrix(1, 0, 0, 1, 0, 0); -transform: matrix(1, 0, 0, 1, 0, 0); -opacity: 1; } } - -@keyframes pop-upwards { - 0% { --webkit-transform: matrix(0.97, 0, 0, 1, 0, 12); -transform: matrix(0.97, 0, 0, 1, 0, 12); -opacity: 0; } - - 20% { --webkit-transform: matrix(0.99, 0, 0, 1, 0, 2); -transform: matrix(0.99, 0, 0, 1, 0, 2); -opacity: 0.7; } - - 40% { --webkit-transform: matrix(1, 0, 0, 1, 0, -1); -transform: matrix(1, 0, 0, 1, 0, -1); -opacity: 1; } - - 70% { -
[MediaWiki-commits] [Gerrit] Hygiene: Move duplicated code to getCleanTextSnippet() - change (mediawiki...Echo)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/159974 Change subject: Hygiene: Move duplicated code to getCleanTextSnippet() .. Hygiene: Move duplicated code to getCleanTextSnippet() Change-Id: Id66b060876c9e863da991655b4c64ee4589b9ec3 --- M formatters/BasicFormatter.php M includes/DiscussionParser.php M includes/WikiTextString.php 3 files changed, 18 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/74/159974/1 diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php index c9668e0..30df474 100644 --- a/formatters/BasicFormatter.php +++ b/formatters/BasicFormatter.php @@ -411,10 +411,8 @@ if ( !isset( $extra['content'] ) ) { return ''; } - $content = EchoWikiTextString::stripHeader( $extra['content'] ); - $content = EchoWikiTextString::stripSignature( $content ); - $content = EchoWikiTextString::stripIndents( $content ); - return EchoWikiTextString::getTextSnippet( $content, 200 ); + + return EchoWikiTextString::getCleanTextSnippet( $content, 200 ); } /** diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php index 9e06b8f..dbe66ad 100644 --- a/includes/DiscussionParser.php +++ b/includes/DiscussionParser.php @@ -82,15 +82,11 @@ switch( $action['type'] ) { case 'add-comment': $header = EchoWikiTextString::extractHeader( $action['full-section'] ); - $snippet = EchoWikiTextString::stripHeader( $action['content'] ); - $snippet = EchoWikiTextString::stripSignature( $snippet ); - $snippet = EchoWikiTextString::getTextSnippet( $snippet, 150 ); + $snippet = EchoWikiTextString::getCleanTextSnippet( $action['content'] ); break; case 'new-section-with-comment': $header = EchoWikiTextString::extractHeader( $action['content'] ); - $snippet = EchoWikiTextString::stripHeader( $action['content'] ); - $snippet = EchoWikiTextString::stripSignature( $snippet ); - $snippet = EchoWikiTextString::getTextSnippet( $snippet, 150 ); + $snippet = EchoWikiTextString::getCleanTextSnippet( $action['content'] ); break; } if ( $header ) { diff --git a/includes/WikiTextString.php b/includes/WikiTextString.php index eb70710..d1ab3a3 100644 --- a/includes/WikiTextString.php +++ b/includes/WikiTextString.php @@ -432,6 +432,7 @@ $text = strip_tags( $text ); $attempt = 0; + // remove any wikitext transclusions. // 10 attempts at most, the logic here is to find the first }} and // find the matching {{ for that }} while ( $attempt 10 ) { @@ -467,4 +468,17 @@ return $text; } + /** +* Strip a wikitext string representing the users complete content addition +* down to a small plaintext snippet +* +* @param string $text +* @return string +*/ + static public function getCleanTextSnippet( $text, $length = 150 ) { + $text = self::stripHeader( $text ); + $text = self::stripSignature( $text ); + $text = self::stripIndents( $text ); + return self::getTextSnippet( $text, $length ); + } } -- To view, visit https://gerrit.wikimedia.org/r/159974 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id66b060876c9e863da991655b4c64ee4589b9ec3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Use correct phpdoc parameter order - change (mediawiki...Echo)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/159975 Change subject: Hygiene: Use correct phpdoc parameter order .. Hygiene: Use correct phpdoc parameter order Change-Id: I60a910fe64e26275dbc077f441c2cf7081b667fd --- M includes/DiscussionParser.php M includes/WikiTextString.php 2 files changed, 49 insertions(+), 47 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/75/159975/1 diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php index dbe66ad..83fe40a 100644 --- a/includes/DiscussionParser.php +++ b/includes/DiscussionParser.php @@ -8,7 +8,7 @@ * Given a Revision object, generates EchoEvent objects for * the discussion-related actions that occurred in that Revision. * -* @param $revision Revision object +* @param Revision $revision object * @return null */ static public function generateEventsForRevision( $revision ) { @@ -71,7 +71,7 @@ /** * Attempts to determine what section title the edit was performed under (if any) * -* @param $interpretation array Results of self::getChangeInterpretationForRevision +* @param array $interpretation Results of self::getChangeInterpretationForRevision * @return array Array containing section title and text */ static public function detectSectionTitleAndText( array $interpretation ) { @@ -107,10 +107,11 @@ /** * For an action taken on a talk page, notify users whose user pages * are linked. -* @param $header string The subject line for the discussion. -* @param $content string The content of the post, as a wikitext string. -* @param $revision Revision object. -* @param $agent User The user who made the comment. +* +* @param string $header The subject line for the discussion. +* @param string $content The content of the post, as a wikitext string. +* @param Revision $revision Revision object. +* @param User $agent User The user who made the comment. */ static public function generateMentionEvents( $header, $content, $revision, $agent ) { $title = $revision-getTitle(); @@ -170,9 +171,8 @@ * but not for editing (old wikitext usually) * Stolen from AbuseFilterVariableHolder * -* @param $wikitext String -* @param $article Article -* +* @param string $wikitext +* @param Article $article * @return object */ static public function parseNonEditWikitext( $wikitext, $article ) { @@ -197,8 +197,8 @@ * Given a Revision object, determines which users are interested * in related EchoEvents. * -* @param $revision Revision object. -* @return Array of User objects +* @param Revision $revision Revision object. +* @return User[] */ static public function getNotifiedUsersForComment( $revision ) { $interpretation = self::getChangeInterpretationForRevision( $revision ); @@ -236,9 +236,9 @@ * Given a Revision object, returns a talk-page-centric interpretation * of the changes made in it. * -* @param $revision Revision object * @see EchoDiscussionParser::interpretDiff -* @return Array, see interpretDiff for details. +* @param Revision $revision Revision object +* @return array see interpretDiff for details. */ static public function getChangeInterpretationForRevision( $revision ) { if ( $revision-getID() isset( self::$revisionInterpretationCache[$revision-getID()] ) ) { @@ -267,9 +267,9 @@ * Given a machine-readable diff, interprets the changes * in terms of discussion page actions * -* @param $changes array Output of EchoEvent::getMachineReadableDiff -* @param $user User name -* @return Array of associative arrays. +* @param array $changes Output of EchoEvent::getMachineReadableDiff +* @param string $user User name +* @return array Array of associative arrays. * Each entry represents an action, which is classified in the 'action' field. * All types contain a 'content' field except 'unknown' * (which instead passes through the machine-readable diff in 'details') @@ -376,8 +376,8 @@ /** * Finds the section that a given line is in. * -* @param $lines Array of lines in the page. -* @param $offset int The line to find the full section for. +* @param array $lines Array of lines in the page. +* @param int $offset The line to find the full section for. * @return string Content of the section. */
[MediaWiki-commits] [Gerrit] Opera ip parser - change (analytics/zero-sms)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/159977 Change subject: Opera ip parser .. Opera ip parser Change-Id: I7bfd401793f32134daa09d2db7535fafe2905a9c --- M scripts/api.py M scripts/logprocessor.py A scripts/opera.py A scripts/operaips.py M scripts/smslogs.py A scripts/utils.py M scripts/weblogs.py 7 files changed, 246 insertions(+), 82 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms refs/changes/77/159977/1 diff --git a/scripts/api.py b/scripts/api.py index 79fbf53..fb44114 100644 --- a/scripts/api.py +++ b/scripts/api.py @@ -61,6 +61,14 @@ super(ApiError, self).__init__('Pages modified during iteration', data) +def parseJson(result): +# Our servers still have requests 0.8.2 ... :( +if hasattr(result.__class__, 'json'): +return result.json(object_hook=AttrDict) +else: +return json.loads(result.content, object_hook=AttrDict) + + class Site(object): Public properties (member variables at the moment): @@ -126,13 +134,7 @@ else: request_kw['params'] = kwargs -result = self.request(method, forceSSL=forceSSL, **request_kw) - -# Our servers still have requests 0.8.2 ... :( -if hasattr(result.__class__, 'json'): -data = result.json(object_hook=AttrDict) -else: -data = json.loads(result.content, object_hook=AttrDict) +data = parseJson(self.request(method, forceSSL=forceSSL, **request_kw)) # Handle success and failure if 'error' in data: @@ -252,7 +254,7 @@ return Site(scheme + '://' + language + '.' + site + '.org/w/api.php', session, log) -if __name__ == __main__: +if __name__ == '__main__': w = wikimedia() # r = w.query(meta='siteinfo') for v in w.queryPages(titles=('Test', 'API'), prop=('links', 'info'), pllimit=20): diff --git a/scripts/logprocessor.py b/scripts/logprocessor.py index bf26f5a..5718e57 100644 --- a/scripts/logprocessor.py +++ b/scripts/logprocessor.py @@ -1,11 +1,15 @@ +import csv from datetime import datetime import io -from itertools import chain, imap import json import os import traceback + from unidecode import unidecode + from api import AttrDict +from utils import CsvUnicodeWriter, CsvUnicodeReader + validSites = { u'wikipedia', @@ -26,27 +30,26 @@ print(unidecode(unicode(text))) -def joinValues(vals, separator=u'\t', colCount=0): -if 0 colCount != len(vals): -raise ValueError(u'Cannot save value that should have %d columns, not %d\n%s' % - (colCount, len(vals), joinValues(vals, u','))) -return unicode(separator).join([unicode(v) for v in vals]) +def joinValues(vals): +return u','.join([unicode(v) for v in vals]) -def writeData(filename, data, columns, separator=u'\t'): -colCount = len(columns) +def writeData(filename, data, header, delimiter='\t'): +colCount = len(header) tmpFile = filename + '.tmp' -with io.open(tmpFile, 'w', encoding='utf8', errors='ignore') as out: -out.writelines( -chain( -[joinValues(columns, separator) + '\n'], # header -imap(lambda vals: joinValues(vals, separator, colCount) + '\n', data))) +with CsvUnicodeWriter(tmpFile, csv.excel, delimiter=delimiter) as out: +out.writerow(header) +for vals in data: +if 0 colCount != len(vals): +raise ValueError(u'Value should have %d columns, not %d for file %s\n%s' % + (colCount, len(vals), filename, joinValues(vals))) +out.writerow([unicode(v) for v in vals]) if os.path.exists(filename): os.remove(filename) os.rename(tmpFile, filename) -def readData(filename, colCount=0, separator=u'\t'): +def readData(filename, colCount=0, delimiter='\t'): :type filename str|unicode :type colCount int|list @@ -58,12 +61,11 @@ skipFirst = colCount 0 if not skipFirst: colCount = -colCount -with io.open(filename, 'r', encoding='utf8', errors='ignore') as inp: -for line in inp: -vals = line.strip(u'\r\n').split(separator) +with CsvUnicodeReader(filename, delimiter=delimiter) as inp: +for vals in inp: if 0 colCount != len(vals): raise ValueError('This value should have %d columns, not %d: %s in file %s' % - (colCount, len(vals), joinValues(vals, u','), filename)) + (colCount, len(vals), joinValues(vals), filename)) if skipFirst: skipFirst = False continue @@ -80,7 +82,7 @@ return a -class LogProcessor(object): +class ScriptProcessor(object): def __init__(self, settingsFile, pathSuffix): self.dateFormat = '%Y-%m-%d' @@ -92,22
[MediaWiki-commits] [Gerrit] download only when needed - change (analytics/zero-sms)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/159976 Change subject: download only when needed .. download only when needed Change-Id: Ie36b9be8881f86d02d7d057ebffc847a48f2ab4c --- M scripts/smslogs.py M scripts/weblogs.py 2 files changed, 36 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms refs/changes/76/159976/1 diff --git a/scripts/smslogs.py b/scripts/smslogs.py index 40cadf9..7f01c2e 100644 --- a/scripts/smslogs.py +++ b/scripts/smslogs.py @@ -112,6 +112,7 @@ bucket = cn.get_bucket(self.settings.awsBucket) files = bucket.list(self.settings.awsPrefix) +newDataFound = False for key in files: filename = key.key[len(self.settings.awsPrefix):] @@ -160,8 +161,15 @@ key.get_contents_to_filename(filePath) if fileDate and (not self.settings.lastDownloadTs or self.settings.lastDownloadTs fileDate): self.settings.lastDownloadTs = fileDate +newDataFound = True -def combineDataFiles(self, sourceFiles): +return newDataFound + +def combineDataFiles(self): + +sourceFiles = os.listdir(self.pathLogs) +# files = itertools.chain([os.path.join('pc', f) for f in os.listdir(os.path.join(self.pathLogs, 'pc'))], +# files) safePrint(u'Combining files into %s' % self.combinedFilePath) if self.processIfAfter: @@ -169,11 +177,11 @@ else: safePrint(u'Processing all files') -appendingDataFile = self.combinedFilePath + '.tmp' +tempFile = self.combinedFilePath + '.tmp' manualLogRe = re.compile(r'^wikipedia_application_\d+\.log\.\d+\.gz:') totalCount = 0 -with io.open(appendingDataFile, 'w', encoding='utf8') as dst: +with io.open(tempFile, 'w', encoding='utf8') as dst: for srcFile in sourceFiles: fileDate = self.getFileDate(srcFile) @@ -216,7 +224,7 @@ if os.path.exists(sortedOutputFile): os.remove(sortedOutputFile) -args = [self.settings.sortCmd, '-u', '-o', sortedOutputFile, appendingDataFile] +args = [self.settings.sortCmd, '-u', '-o', sortedOutputFile, tempFile] originalExists = os.path.exists(self.combinedFilePath) if originalExists: args.append(self.combinedFilePath) @@ -239,7 +247,7 @@ except subprocess.CalledProcessError, ex: raise Exception(u'Error %s running %s\nOutput:\n%s' % (ex.returncode, cmd, ex.output)) -os.remove(appendingDataFile) +os.remove(tempFile) def generateGraphData(self, skipParsing=False): stats = smsgraphs.Stats(self.combinedFilePath, self.pathGraphs, self.statsFilePath, self.settings.partnerMap, @@ -257,13 +265,15 @@ stats.createGraphs() def run(self): +newDataFound = True if self.settings.enableDownload: -self.download() -files = os.listdir(self.pathLogs) -files = itertools.chain([os.path.join('pc', f) for f in os.listdir(os.path.join(self.pathLogs, 'pc'))], -files) -self.combineDataFiles(files) -self.generateGraphData() +newDataFound = self.download() + +if not newDataFound and os.path.isfile(self.combinedFilePath): +safePrint('No new data, we are done') +else: +self.combineDataFiles() +self.generateGraphData() if __name__ == __main__: diff --git a/scripts/weblogs.py b/scripts/weblogs.py index 4abb5b0..7e5453a 100644 --- a/scripts/weblogs.py +++ b/scripts/weblogs.py @@ -36,6 +36,7 @@ self.urlRe = re.compile(r'^https?://([^/]+)', re.IGNORECASE) self.duplUrlRe = re.compile(r'^(https?://.+)\1', re.IGNORECASE) self.zcmdRe = re.compile(r'zcmd=([-a-z0-9]+)', re.IGNORECASE) +self.combinedFile = os.path.join(self.pathGraphs, 'combined-all.tsv') def defaultSettings(self, suffix): s = super(WebLogProcessor, self).defaultSettings(suffix) @@ -68,6 +69,7 @@ def processLogFiles(self): +newDataFound = False safePrint('Processing log files') statFiles = {} for f in os.listdir(self.pathLogs): @@ -82,6 +84,7 @@ fileDt = m.group(1) fileDt = '-'.join([fileDt[0:4], fileDt[4:6], fileDt[6:8]]) self.processLogFile(logFile, statFile, fileDt) +newDataFound = True # Clean up older stat files (if gz file size has changed) removeFiles = [] @@ -96,6 +99,8 @@ removeFiles.append(statFile) for f in removeFiles: os.remove(f) + +return newDataFound def processLogFile(self, logFile, statFile, fileDt): @@ -272,7
[MediaWiki-commits] [Gerrit] Opera ip parser - change (analytics/zero-sms)
Yurik has submitted this change and it was merged. Change subject: Opera ip parser .. Opera ip parser Change-Id: I7bfd401793f32134daa09d2db7535fafe2905a9c --- M scripts/api.py M scripts/logprocessor.py A scripts/opera.py A scripts/operaips.py M scripts/smslogs.py A scripts/utils.py M scripts/weblogs.py 7 files changed, 246 insertions(+), 82 deletions(-) Approvals: Yurik: Verified; Looks good to me, approved diff --git a/scripts/api.py b/scripts/api.py index 79fbf53..fb44114 100644 --- a/scripts/api.py +++ b/scripts/api.py @@ -61,6 +61,14 @@ super(ApiError, self).__init__('Pages modified during iteration', data) +def parseJson(result): +# Our servers still have requests 0.8.2 ... :( +if hasattr(result.__class__, 'json'): +return result.json(object_hook=AttrDict) +else: +return json.loads(result.content, object_hook=AttrDict) + + class Site(object): Public properties (member variables at the moment): @@ -126,13 +134,7 @@ else: request_kw['params'] = kwargs -result = self.request(method, forceSSL=forceSSL, **request_kw) - -# Our servers still have requests 0.8.2 ... :( -if hasattr(result.__class__, 'json'): -data = result.json(object_hook=AttrDict) -else: -data = json.loads(result.content, object_hook=AttrDict) +data = parseJson(self.request(method, forceSSL=forceSSL, **request_kw)) # Handle success and failure if 'error' in data: @@ -252,7 +254,7 @@ return Site(scheme + '://' + language + '.' + site + '.org/w/api.php', session, log) -if __name__ == __main__: +if __name__ == '__main__': w = wikimedia() # r = w.query(meta='siteinfo') for v in w.queryPages(titles=('Test', 'API'), prop=('links', 'info'), pllimit=20): diff --git a/scripts/logprocessor.py b/scripts/logprocessor.py index bf26f5a..5718e57 100644 --- a/scripts/logprocessor.py +++ b/scripts/logprocessor.py @@ -1,11 +1,15 @@ +import csv from datetime import datetime import io -from itertools import chain, imap import json import os import traceback + from unidecode import unidecode + from api import AttrDict +from utils import CsvUnicodeWriter, CsvUnicodeReader + validSites = { u'wikipedia', @@ -26,27 +30,26 @@ print(unidecode(unicode(text))) -def joinValues(vals, separator=u'\t', colCount=0): -if 0 colCount != len(vals): -raise ValueError(u'Cannot save value that should have %d columns, not %d\n%s' % - (colCount, len(vals), joinValues(vals, u','))) -return unicode(separator).join([unicode(v) for v in vals]) +def joinValues(vals): +return u','.join([unicode(v) for v in vals]) -def writeData(filename, data, columns, separator=u'\t'): -colCount = len(columns) +def writeData(filename, data, header, delimiter='\t'): +colCount = len(header) tmpFile = filename + '.tmp' -with io.open(tmpFile, 'w', encoding='utf8', errors='ignore') as out: -out.writelines( -chain( -[joinValues(columns, separator) + '\n'], # header -imap(lambda vals: joinValues(vals, separator, colCount) + '\n', data))) +with CsvUnicodeWriter(tmpFile, csv.excel, delimiter=delimiter) as out: +out.writerow(header) +for vals in data: +if 0 colCount != len(vals): +raise ValueError(u'Value should have %d columns, not %d for file %s\n%s' % + (colCount, len(vals), filename, joinValues(vals))) +out.writerow([unicode(v) for v in vals]) if os.path.exists(filename): os.remove(filename) os.rename(tmpFile, filename) -def readData(filename, colCount=0, separator=u'\t'): +def readData(filename, colCount=0, delimiter='\t'): :type filename str|unicode :type colCount int|list @@ -58,12 +61,11 @@ skipFirst = colCount 0 if not skipFirst: colCount = -colCount -with io.open(filename, 'r', encoding='utf8', errors='ignore') as inp: -for line in inp: -vals = line.strip(u'\r\n').split(separator) +with CsvUnicodeReader(filename, delimiter=delimiter) as inp: +for vals in inp: if 0 colCount != len(vals): raise ValueError('This value should have %d columns, not %d: %s in file %s' % - (colCount, len(vals), joinValues(vals, u','), filename)) + (colCount, len(vals), joinValues(vals), filename)) if skipFirst: skipFirst = False continue @@ -80,7 +82,7 @@ return a -class LogProcessor(object): +class ScriptProcessor(object): def __init__(self, settingsFile, pathSuffix): self.dateFormat = '%Y-%m-%d' @@ -92,22 +94,20 @@ if os.path.isfile(self.settingsFile):
[MediaWiki-commits] [Gerrit] download only when needed - change (analytics/zero-sms)
Yurik has submitted this change and it was merged. Change subject: download only when needed .. download only when needed Change-Id: Ie36b9be8881f86d02d7d057ebffc847a48f2ab4c --- M scripts/smslogs.py M scripts/weblogs.py 2 files changed, 36 insertions(+), 15 deletions(-) Approvals: Yurik: Verified; Looks good to me, approved diff --git a/scripts/smslogs.py b/scripts/smslogs.py index 40cadf9..7f01c2e 100644 --- a/scripts/smslogs.py +++ b/scripts/smslogs.py @@ -112,6 +112,7 @@ bucket = cn.get_bucket(self.settings.awsBucket) files = bucket.list(self.settings.awsPrefix) +newDataFound = False for key in files: filename = key.key[len(self.settings.awsPrefix):] @@ -160,8 +161,15 @@ key.get_contents_to_filename(filePath) if fileDate and (not self.settings.lastDownloadTs or self.settings.lastDownloadTs fileDate): self.settings.lastDownloadTs = fileDate +newDataFound = True -def combineDataFiles(self, sourceFiles): +return newDataFound + +def combineDataFiles(self): + +sourceFiles = os.listdir(self.pathLogs) +# files = itertools.chain([os.path.join('pc', f) for f in os.listdir(os.path.join(self.pathLogs, 'pc'))], +# files) safePrint(u'Combining files into %s' % self.combinedFilePath) if self.processIfAfter: @@ -169,11 +177,11 @@ else: safePrint(u'Processing all files') -appendingDataFile = self.combinedFilePath + '.tmp' +tempFile = self.combinedFilePath + '.tmp' manualLogRe = re.compile(r'^wikipedia_application_\d+\.log\.\d+\.gz:') totalCount = 0 -with io.open(appendingDataFile, 'w', encoding='utf8') as dst: +with io.open(tempFile, 'w', encoding='utf8') as dst: for srcFile in sourceFiles: fileDate = self.getFileDate(srcFile) @@ -216,7 +224,7 @@ if os.path.exists(sortedOutputFile): os.remove(sortedOutputFile) -args = [self.settings.sortCmd, '-u', '-o', sortedOutputFile, appendingDataFile] +args = [self.settings.sortCmd, '-u', '-o', sortedOutputFile, tempFile] originalExists = os.path.exists(self.combinedFilePath) if originalExists: args.append(self.combinedFilePath) @@ -239,7 +247,7 @@ except subprocess.CalledProcessError, ex: raise Exception(u'Error %s running %s\nOutput:\n%s' % (ex.returncode, cmd, ex.output)) -os.remove(appendingDataFile) +os.remove(tempFile) def generateGraphData(self, skipParsing=False): stats = smsgraphs.Stats(self.combinedFilePath, self.pathGraphs, self.statsFilePath, self.settings.partnerMap, @@ -257,13 +265,15 @@ stats.createGraphs() def run(self): +newDataFound = True if self.settings.enableDownload: -self.download() -files = os.listdir(self.pathLogs) -files = itertools.chain([os.path.join('pc', f) for f in os.listdir(os.path.join(self.pathLogs, 'pc'))], -files) -self.combineDataFiles(files) -self.generateGraphData() +newDataFound = self.download() + +if not newDataFound and os.path.isfile(self.combinedFilePath): +safePrint('No new data, we are done') +else: +self.combineDataFiles() +self.generateGraphData() if __name__ == __main__: diff --git a/scripts/weblogs.py b/scripts/weblogs.py index 4abb5b0..7e5453a 100644 --- a/scripts/weblogs.py +++ b/scripts/weblogs.py @@ -36,6 +36,7 @@ self.urlRe = re.compile(r'^https?://([^/]+)', re.IGNORECASE) self.duplUrlRe = re.compile(r'^(https?://.+)\1', re.IGNORECASE) self.zcmdRe = re.compile(r'zcmd=([-a-z0-9]+)', re.IGNORECASE) +self.combinedFile = os.path.join(self.pathGraphs, 'combined-all.tsv') def defaultSettings(self, suffix): s = super(WebLogProcessor, self).defaultSettings(suffix) @@ -68,6 +69,7 @@ def processLogFiles(self): +newDataFound = False safePrint('Processing log files') statFiles = {} for f in os.listdir(self.pathLogs): @@ -82,6 +84,7 @@ fileDt = m.group(1) fileDt = '-'.join([fileDt[0:4], fileDt[4:6], fileDt[6:8]]) self.processLogFile(logFile, statFile, fileDt) +newDataFound = True # Clean up older stat files (if gz file size has changed) removeFiles = [] @@ -96,6 +99,8 @@ removeFiles.append(statFile) for f in removeFiles: os.remove(f) + +return newDataFound def processLogFile(self, logFile, statFile, fileDt): @@ -272,7 +277,10 @@ stats[key] += int(count) #
[MediaWiki-commits] [Gerrit] Removed dup opera script - change (analytics/zero-sms)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/159978 Change subject: Removed dup opera script .. Removed dup opera script Change-Id: I52cd6f42e7910282c7575a3ea0be2ff8ec79857b --- D scripts/opera.py M scripts/operaips.py 2 files changed, 2 insertions(+), 38 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms refs/changes/78/159978/1 diff --git a/scripts/opera.py b/scripts/opera.py deleted file mode 100644 index 75cb56b..000 --- a/scripts/opera.py +++ /dev/null @@ -1,38 +0,0 @@ -import json -import requests as r -import api -from logprocessor import ScriptProcessor - - -class OperaIpUpdater(ScriptProcessor): -def __init__(self, settingsFile='settings/opera.json'): -super(OperaIpUpdater, self).__init__(settingsFile, 'opera') - -def run(self): -res = r.get('https://ipranges.opera.com/mini/operaranges/opera_ip_ranges.json', proxies=self.proxyUrl) -operaNets = sorted(set([v.subnet for v in api.parseJson(res)])) - -zerowiki = api.wikimedia('zero', 'wikimedia', 'https') -if self.proxyUrl: -zerowiki.session.proxies = self.proxyUrl - -zerowiki.login(self.settings.apiUsername, self.settings.apiPassword) - -title = 'Zero:-OPERA' -res = next(zerowiki.queryPages(titles=title, prop='revisions', rvprop='content')) -data = json.loads(res.revisions[0]['*'], object_hook=api.AttrDict) - -if sorted(set(data.ipsets.default)) != operaNets: -data.ipsets.default = operaNets -text = json.dumps(data, indent=True, sort_keys=True) - -zerowiki( -'edit', -title=title, -summary='(bot) refreshing opera IPs', -text=text, -token=zerowiki.token() -) - -if __name__ == '__main__': -OperaIpUpdater().safeRun() diff --git a/scripts/operaips.py b/scripts/operaips.py index 75cb56b..1a03d69 100644 --- a/scripts/operaips.py +++ b/scripts/operaips.py @@ -33,6 +33,8 @@ text=text, token=zerowiki.token() ) +else: +print('Zero has the most recent list of IPs') if __name__ == '__main__': OperaIpUpdater().safeRun() -- To view, visit https://gerrit.wikimedia.org/r/159978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52cd6f42e7910282c7575a3ea0be2ff8ec79857b Gerrit-PatchSet: 1 Gerrit-Project: analytics/zero-sms Gerrit-Branch: master Gerrit-Owner: Yurik yu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed dup opera script - change (analytics/zero-sms)
Yurik has submitted this change and it was merged. Change subject: Removed dup opera script .. Removed dup opera script Change-Id: I52cd6f42e7910282c7575a3ea0be2ff8ec79857b --- D scripts/opera.py M scripts/operaips.py 2 files changed, 2 insertions(+), 38 deletions(-) Approvals: Yurik: Verified; Looks good to me, approved diff --git a/scripts/opera.py b/scripts/opera.py deleted file mode 100644 index 75cb56b..000 --- a/scripts/opera.py +++ /dev/null @@ -1,38 +0,0 @@ -import json -import requests as r -import api -from logprocessor import ScriptProcessor - - -class OperaIpUpdater(ScriptProcessor): -def __init__(self, settingsFile='settings/opera.json'): -super(OperaIpUpdater, self).__init__(settingsFile, 'opera') - -def run(self): -res = r.get('https://ipranges.opera.com/mini/operaranges/opera_ip_ranges.json', proxies=self.proxyUrl) -operaNets = sorted(set([v.subnet for v in api.parseJson(res)])) - -zerowiki = api.wikimedia('zero', 'wikimedia', 'https') -if self.proxyUrl: -zerowiki.session.proxies = self.proxyUrl - -zerowiki.login(self.settings.apiUsername, self.settings.apiPassword) - -title = 'Zero:-OPERA' -res = next(zerowiki.queryPages(titles=title, prop='revisions', rvprop='content')) -data = json.loads(res.revisions[0]['*'], object_hook=api.AttrDict) - -if sorted(set(data.ipsets.default)) != operaNets: -data.ipsets.default = operaNets -text = json.dumps(data, indent=True, sort_keys=True) - -zerowiki( -'edit', -title=title, -summary='(bot) refreshing opera IPs', -text=text, -token=zerowiki.token() -) - -if __name__ == '__main__': -OperaIpUpdater().safeRun() diff --git a/scripts/operaips.py b/scripts/operaips.py index 75cb56b..1a03d69 100644 --- a/scripts/operaips.py +++ b/scripts/operaips.py @@ -33,6 +33,8 @@ text=text, token=zerowiki.token() ) +else: +print('Zero has the most recent list of IPs') if __name__ == '__main__': OperaIpUpdater().safeRun() -- To view, visit https://gerrit.wikimedia.org/r/159978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52cd6f42e7910282c7575a3ea0be2ff8ec79857b Gerrit-PatchSet: 1 Gerrit-Project: analytics/zero-sms Gerrit-Branch: master Gerrit-Owner: Yurik yu...@wikimedia.org Gerrit-Reviewer: Yurik yu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add new schema version to action TSV - change (analytics/multimedia)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/159979 Change subject: Add new schema version to action TSV .. Add new schema version to action TSV Change-Id: Ia0af770ff6d9a116ff9299e3732dba2b28e947cc Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/878 --- M actions/template.sql 1 file changed, 30 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/multimedia refs/changes/79/159979/1 diff --git a/actions/template.sql b/actions/template.sql index b485422..1d27a18 100644 --- a/actions/template.sql +++ b/actions/template.sql @@ -26,7 +26,33 @@ SUM(CASE WHEN event_action = 'pref-optin-loggedin' THEN event_samplingFactor ELSE 0 END) AS 'optin-loggedin', SUM(CASE WHEN event_action = 'optin-anon' THEN event_samplingFactor ELSE 0 END) AS 'optin-anon', SUM(CASE WHEN event_action IN ('pref-optout-loggedin', 'optout-anon') THEN event_samplingFactor ELSE 0 END) AS 'optout-total', - SUM(CASE WHEN event_action IN ('pref-optin-loggedin', 'optin-anon') THEN event_samplingFactor ELSE 0 END) AS 'optin-total' + SUM(CASE WHEN event_action IN ('pref-optin-loggedin', 'optin-anon') THEN event_samplingFactor ELSE 0 END) AS 'optin-total', + SUM(CASE WHEN event_action = 'about-page' THEN event_samplingFactor ELSE 0 END) AS 'about-page', + SUM(CASE WHEN event_action = 'discuss-page' THEN event_samplingFactor ELSE 0 END) AS 'discuss-page', + SUM(CASE WHEN event_action = 'help-page' THEN event_samplingFactor ELSE 0 END) AS 'help-page', + SUM(CASE WHEN event_action = 'location-page' THEN event_samplingFactor ELSE 0 END) AS 'location-page', + SUM(CASE WHEN event_action = 'uploader-page' THEN event_samplingFactor ELSE 0 END) AS 'uploader-page', + SUM(CASE WHEN event_action = 'download-select-menu-original' THEN event_samplingFactor ELSE 0 END) AS 'download-select-menu-original', + SUM(CASE WHEN event_action = 'download-select-menu-small' THEN event_samplingFactor ELSE 0 END) AS 'download-select-menu-small', + SUM(CASE WHEN event_action = 'download-select-menu-medium' THEN event_samplingFactor ELSE 0 END) AS 'download-select-menu-medium', + SUM(CASE WHEN event_action = 'download-select-menu-large' THEN event_samplingFactor ELSE 0 END) AS 'download-select-menu-large', + SUM(CASE WHEN event_action = 'download' THEN event_samplingFactor ELSE 0 END) AS 'download', + SUM(CASE WHEN event_action = 'download-view-in-browser' THEN event_samplingFactor ELSE 0 END) AS 'download-view-in-browser', + SUM(CASE WHEN event_action = 'share-page' THEN event_samplingFactor ELSE 0 END) AS 'share-page', + SUM(CASE WHEN event_action = 'share-link-copied' THEN event_samplingFactor ELSE 0 END) AS 'share-link-copied', + SUM(CASE WHEN event_action = 'embed-html-copied' THEN event_samplingFactor ELSE 0 END) AS 'embed-html-copied', + SUM(CASE WHEN event_action = 'embed-wikitext-copied' THEN event_samplingFactor ELSE 0 END) AS 'embed-wikitext-copied', + SUM(CASE WHEN event_action = 'embed-switched-to-html' THEN event_samplingFactor ELSE 0 END) AS 'embed-switched-to-html', + SUM(CASE WHEN event_action = 'embed-switched-to-wikitext' THEN event_samplingFactor ELSE 0 END) AS 'embed-switched-to-wikitext', + SUM(CASE WHEN event_action = 'embed-select-menu-wikitext-default' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-wikitext-default', + SUM(CASE WHEN event_action = 'embed-select-menu-wikitext-small' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-wikitext-small', + SUM(CASE WHEN event_action = 'embed-select-menu-wikitext-medium' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-wikitext-medium', + SUM(CASE WHEN event_action = 'embed-select-menu-wikitext-large' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-wikitext-large', + SUM(CASE WHEN event_action = 'embed-select-menu-html-original' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-html-original', + SUM(CASE WHEN event_action = 'embed-select-menu-html-small' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-html-small', + SUM(CASE WHEN event_action = 'embed-select-menu-html-medium' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-html-medium', + SUM(CASE WHEN event_action = 'embed-select-menu-html-large' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-html-large', + SUM(CASE WHEN event_action = 'use-this-file-close' THEN event_samplingFactor ELSE 0 END) AS 'use-this-file-close' FROM ( SELECT timestamp, event_action, 1 AS event_samplingFactor FROM MediaViewer_7670440 @@ -40,6 +66,9 @@ UNION ALL SELECT timestamp, event_action, event_samplingFactor FROM MediaViewer_8935662
[MediaWiki-commits] [Gerrit] Add new schema version to action TSV - change (analytics/multimedia)
jenkins-bot has submitted this change and it was merged. Change subject: Add new schema version to action TSV .. Add new schema version to action TSV Change-Id: Ia0af770ff6d9a116ff9299e3732dba2b28e947cc Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/878 --- M actions/template.sql 1 file changed, 30 insertions(+), 1 deletion(-) Approvals: Gilles: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/actions/template.sql b/actions/template.sql index b485422..1d27a18 100644 --- a/actions/template.sql +++ b/actions/template.sql @@ -26,7 +26,33 @@ SUM(CASE WHEN event_action = 'pref-optin-loggedin' THEN event_samplingFactor ELSE 0 END) AS 'optin-loggedin', SUM(CASE WHEN event_action = 'optin-anon' THEN event_samplingFactor ELSE 0 END) AS 'optin-anon', SUM(CASE WHEN event_action IN ('pref-optout-loggedin', 'optout-anon') THEN event_samplingFactor ELSE 0 END) AS 'optout-total', - SUM(CASE WHEN event_action IN ('pref-optin-loggedin', 'optin-anon') THEN event_samplingFactor ELSE 0 END) AS 'optin-total' + SUM(CASE WHEN event_action IN ('pref-optin-loggedin', 'optin-anon') THEN event_samplingFactor ELSE 0 END) AS 'optin-total', + SUM(CASE WHEN event_action = 'about-page' THEN event_samplingFactor ELSE 0 END) AS 'about-page', + SUM(CASE WHEN event_action = 'discuss-page' THEN event_samplingFactor ELSE 0 END) AS 'discuss-page', + SUM(CASE WHEN event_action = 'help-page' THEN event_samplingFactor ELSE 0 END) AS 'help-page', + SUM(CASE WHEN event_action = 'location-page' THEN event_samplingFactor ELSE 0 END) AS 'location-page', + SUM(CASE WHEN event_action = 'uploader-page' THEN event_samplingFactor ELSE 0 END) AS 'uploader-page', + SUM(CASE WHEN event_action = 'download-select-menu-original' THEN event_samplingFactor ELSE 0 END) AS 'download-select-menu-original', + SUM(CASE WHEN event_action = 'download-select-menu-small' THEN event_samplingFactor ELSE 0 END) AS 'download-select-menu-small', + SUM(CASE WHEN event_action = 'download-select-menu-medium' THEN event_samplingFactor ELSE 0 END) AS 'download-select-menu-medium', + SUM(CASE WHEN event_action = 'download-select-menu-large' THEN event_samplingFactor ELSE 0 END) AS 'download-select-menu-large', + SUM(CASE WHEN event_action = 'download' THEN event_samplingFactor ELSE 0 END) AS 'download', + SUM(CASE WHEN event_action = 'download-view-in-browser' THEN event_samplingFactor ELSE 0 END) AS 'download-view-in-browser', + SUM(CASE WHEN event_action = 'share-page' THEN event_samplingFactor ELSE 0 END) AS 'share-page', + SUM(CASE WHEN event_action = 'share-link-copied' THEN event_samplingFactor ELSE 0 END) AS 'share-link-copied', + SUM(CASE WHEN event_action = 'embed-html-copied' THEN event_samplingFactor ELSE 0 END) AS 'embed-html-copied', + SUM(CASE WHEN event_action = 'embed-wikitext-copied' THEN event_samplingFactor ELSE 0 END) AS 'embed-wikitext-copied', + SUM(CASE WHEN event_action = 'embed-switched-to-html' THEN event_samplingFactor ELSE 0 END) AS 'embed-switched-to-html', + SUM(CASE WHEN event_action = 'embed-switched-to-wikitext' THEN event_samplingFactor ELSE 0 END) AS 'embed-switched-to-wikitext', + SUM(CASE WHEN event_action = 'embed-select-menu-wikitext-default' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-wikitext-default', + SUM(CASE WHEN event_action = 'embed-select-menu-wikitext-small' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-wikitext-small', + SUM(CASE WHEN event_action = 'embed-select-menu-wikitext-medium' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-wikitext-medium', + SUM(CASE WHEN event_action = 'embed-select-menu-wikitext-large' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-wikitext-large', + SUM(CASE WHEN event_action = 'embed-select-menu-html-original' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-html-original', + SUM(CASE WHEN event_action = 'embed-select-menu-html-small' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-html-small', + SUM(CASE WHEN event_action = 'embed-select-menu-html-medium' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-html-medium', + SUM(CASE WHEN event_action = 'embed-select-menu-html-large' THEN event_samplingFactor ELSE 0 END) AS 'embed-select-menu-html-large', + SUM(CASE WHEN event_action = 'use-this-file-close' THEN event_samplingFactor ELSE 0 END) AS 'use-this-file-close' FROM ( SELECT timestamp, event_action, 1 AS event_samplingFactor FROM MediaViewer_7670440 @@ -40,6 +66,9 @@ UNION ALL SELECT timestamp, event_action, event_samplingFactor FROM MediaViewer_8935662 WHERE %wiki% timestamp
[MediaWiki-commits] [Gerrit] Impersonation for the api - change (mediawiki...ZeroPortal)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/159980 Change subject: Impersonation for the api .. Impersonation for the api Change-Id: If1b3a07873fb95e40c9b43cd7e56db3ff980d836 --- M ZeroPortal.php M includes/ApiZeroPortal.php M includes/PortalSpecialPage.php 3 files changed, 30 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroPortal refs/changes/80/159980/1 diff --git a/ZeroPortal.php b/ZeroPortal.php index 51cdab2..b9249ad 100644 --- a/ZeroPortal.php +++ b/ZeroPortal.php @@ -64,3 +64,5 @@ $wgSpecialPages['ZeroPortal'] = 'ZeroPortal\PortalSpecialPage'; $wgSpecialPageGroups['ZeroPortal'] = 'other'; $wgExtensionMessagesFiles['ZeroPortalAlias'] = __DIR__ . DIRECTORY_SEPARATOR . 'ZeroPortal.alias.php'; + +$wgZeroPortalImpersonateUser = false; diff --git a/includes/ApiZeroPortal.php b/includes/ApiZeroPortal.php index 402a96a..c8f2a2d 100644 --- a/includes/ApiZeroPortal.php +++ b/includes/ApiZeroPortal.php @@ -5,12 +5,14 @@ use ApiBase; use ApiFormatBase; use ApiMain; +use ApiResult; use FauxRequest; use JsonConfig\JCSingleton; use TitleValue; use ZeroBanner\ApiRawJsonPrinter; use ZeroBanner\ZeroConfig; +/** @noinspection PhpInconsistentReturnPointsInspection */ class ApiZeroPortal extends ApiBase { /** * Override built-in handling of format parameter. @@ -33,7 +35,6 @@ $params = $this-extractRequestParams(); $type = $params['type']; $moduleName = $this-getModuleName(); - $result-disableSizeCheck(); if ( !$this-getUser()-isAllowed( 'zero-script' ) ) { $this-dieUsage( Must be authenticated with zero-script right to use this API, 'login', 401 ); } @@ -46,7 +47,7 @@ $processor = function ( ZeroConfig $content, $title ) use ( $type, $result, $moduleName ) { foreach ( $content-getIpsets() as $name = $ipset ) { $result-addValue( $moduleName, $name === 'default' ? $title : $title . '|' . $name, - $ipset ); + $ipset, ApiResult::NO_SIZE_CHECK ); } }; break; @@ -54,7 +55,7 @@ $processor = function ( ZeroConfig $content, $title ) use ( $type, $result, $moduleName ) { $json = $content-getDataWithDefaults(); unset( $json-ipsets ); - $result-addValue( $moduleName, $title, $json ); + $result-addValue( $moduleName, $title, $json, ApiResult::NO_SIZE_CHECK ); }; break; case 'analyticsconfig': @@ -73,7 +74,7 @@ 'ipsets' = $content-ipsetNames(), ); } - $result-addValue( $moduleName, $title, $val ); + $result-addValue( $moduleName, $title, $val, ApiResult::NO_SIZE_CHECK ); }; break; } @@ -145,11 +146,17 @@ } $reqParams = $reqParamsOriginal; + $ctx = new \DerivativeContext( \RequestContext::getMain() ); + global $wgZeroPortalImpersonateUser; + if ( $wgZeroPortalImpersonateUser ) { + $ctx-setUser( \User::newFromName( $wgZeroPortalImpersonateUser ) ); + } + $hasWarnings = false; while ( true ) { // Get needed data - $req = new FauxRequest( $reqParams ); - $api = new ApiMain( $req ); + $ctx-setRequest( new FauxRequest( $reqParams ) ); + $api = new ApiMain( $ctx ); $api-execute(); $data = $api-getResultData(); // @bug: errors are not returned, they are thrown, when calling api with faux request diff --git a/includes/PortalSpecialPage.php b/includes/PortalSpecialPage.php index ab2002a..596d675 100644 --- a/includes/PortalSpecialPage.php +++ b/includes/PortalSpecialPage.php @@ -34,20 +34,24 @@ $user = $this-getUser(); if ( !$user-isAnon() ) { - $name = $user-getName(); + // Include all zero-config ids if this is an admin +
[MediaWiki-commits] [Gerrit] Impersonation for the api - change (mediawiki...ZeroPortal)
jenkins-bot has submitted this change and it was merged. Change subject: Impersonation for the api .. Impersonation for the api Change-Id: If1b3a07873fb95e40c9b43cd7e56db3ff980d836 --- M ZeroPortal.php M includes/ApiZeroPortal.php M includes/PortalSpecialPage.php 3 files changed, 30 insertions(+), 13 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/ZeroPortal.php b/ZeroPortal.php index 51cdab2..b9249ad 100644 --- a/ZeroPortal.php +++ b/ZeroPortal.php @@ -64,3 +64,5 @@ $wgSpecialPages['ZeroPortal'] = 'ZeroPortal\PortalSpecialPage'; $wgSpecialPageGroups['ZeroPortal'] = 'other'; $wgExtensionMessagesFiles['ZeroPortalAlias'] = __DIR__ . DIRECTORY_SEPARATOR . 'ZeroPortal.alias.php'; + +$wgZeroPortalImpersonateUser = false; diff --git a/includes/ApiZeroPortal.php b/includes/ApiZeroPortal.php index 402a96a..c8f2a2d 100644 --- a/includes/ApiZeroPortal.php +++ b/includes/ApiZeroPortal.php @@ -5,12 +5,14 @@ use ApiBase; use ApiFormatBase; use ApiMain; +use ApiResult; use FauxRequest; use JsonConfig\JCSingleton; use TitleValue; use ZeroBanner\ApiRawJsonPrinter; use ZeroBanner\ZeroConfig; +/** @noinspection PhpInconsistentReturnPointsInspection */ class ApiZeroPortal extends ApiBase { /** * Override built-in handling of format parameter. @@ -33,7 +35,6 @@ $params = $this-extractRequestParams(); $type = $params['type']; $moduleName = $this-getModuleName(); - $result-disableSizeCheck(); if ( !$this-getUser()-isAllowed( 'zero-script' ) ) { $this-dieUsage( Must be authenticated with zero-script right to use this API, 'login', 401 ); } @@ -46,7 +47,7 @@ $processor = function ( ZeroConfig $content, $title ) use ( $type, $result, $moduleName ) { foreach ( $content-getIpsets() as $name = $ipset ) { $result-addValue( $moduleName, $name === 'default' ? $title : $title . '|' . $name, - $ipset ); + $ipset, ApiResult::NO_SIZE_CHECK ); } }; break; @@ -54,7 +55,7 @@ $processor = function ( ZeroConfig $content, $title ) use ( $type, $result, $moduleName ) { $json = $content-getDataWithDefaults(); unset( $json-ipsets ); - $result-addValue( $moduleName, $title, $json ); + $result-addValue( $moduleName, $title, $json, ApiResult::NO_SIZE_CHECK ); }; break; case 'analyticsconfig': @@ -73,7 +74,7 @@ 'ipsets' = $content-ipsetNames(), ); } - $result-addValue( $moduleName, $title, $val ); + $result-addValue( $moduleName, $title, $val, ApiResult::NO_SIZE_CHECK ); }; break; } @@ -145,11 +146,17 @@ } $reqParams = $reqParamsOriginal; + $ctx = new \DerivativeContext( \RequestContext::getMain() ); + global $wgZeroPortalImpersonateUser; + if ( $wgZeroPortalImpersonateUser ) { + $ctx-setUser( \User::newFromName( $wgZeroPortalImpersonateUser ) ); + } + $hasWarnings = false; while ( true ) { // Get needed data - $req = new FauxRequest( $reqParams ); - $api = new ApiMain( $req ); + $ctx-setRequest( new FauxRequest( $reqParams ) ); + $api = new ApiMain( $ctx ); $api-execute(); $data = $api-getResultData(); // @bug: errors are not returned, they are thrown, when calling api with faux request diff --git a/includes/PortalSpecialPage.php b/includes/PortalSpecialPage.php index ab2002a..596d675 100644 --- a/includes/PortalSpecialPage.php +++ b/includes/PortalSpecialPage.php @@ -34,20 +34,24 @@ $user = $this-getUser(); if ( !$user-isAnon() ) { - $name = $user-getName(); + // Include all zero-config ids if this is an admin + $name = !$user-isAllowed( 'zero-edit' ) ?
[MediaWiki-commits] [Gerrit] pybal: change configuration host address - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: pybal: change configuration host address .. pybal: change configuration host address As pmtpa gets dismissed, we move the pybal configs off of fenari and onto a new host. Change-Id: I069373c7e7aa7d6c6dd1bad1963fc80f64ff3494 Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org --- M modules/pybal/templates/pybal.conf.erb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/pybal/templates/pybal.conf.erb b/modules/pybal/templates/pybal.conf.erb index a8b5f04..d0ee898 100644 --- a/modules/pybal/templates/pybal.conf.erb +++ b/modules/pybal/templates/pybal.conf.erb @@ -28,7 +28,7 @@ ip = %= subserviceip % port = %= service.fetch('port', 80) % scheduler = %= service.fetch('scheduler', wrr) % -config = http://noc.wikimedia.org/pybal/%= @site %/%= servicename % +config = http://config-master.%= @site %.wmnet/pybal/%= @site %/%= servicename % bgp = %= service.fetch('bgp', no) % depool-threshold = %= service.fetch('depool-threshold', .5) % monitors = %= service['monitors'].keys.sort.inspect % -- To view, visit https://gerrit.wikimedia.org/r/159739 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I069373c7e7aa7d6c6dd1bad1963fc80f64ff3494 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pybal conf: follow symlinks - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/159981 Change subject: pybal conf: follow symlinks .. pybal conf: follow symlinks Change-Id: I51b445aa3cbc4b0566b0c907196d9055839b90b2 --- M modules/pybal/templates/config-vhost.conf.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/81/159981/1 diff --git a/modules/pybal/templates/config-vhost.conf.erb b/modules/pybal/templates/config-vhost.conf.erb index 78dd26a..b1f316a 100644 --- a/modules/pybal/templates/config-vhost.conf.erb +++ b/modules/pybal/templates/config-vhost.conf.erb @@ -11,7 +11,7 @@ Order allow,deny Allow from all % end -% - Options +Indexes -Followsymlinks + Options +Indexes +Followsymlinks AllowOverride None /Directory -- To view, visit https://gerrit.wikimedia.org/r/159981 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I51b445aa3cbc4b0566b0c907196d9055839b90b2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pybal conf: follow symlinks - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: pybal conf: follow symlinks .. pybal conf: follow symlinks Change-Id: I51b445aa3cbc4b0566b0c907196d9055839b90b2 --- M modules/pybal/templates/config-vhost.conf.erb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/modules/pybal/templates/config-vhost.conf.erb b/modules/pybal/templates/config-vhost.conf.erb index 78dd26a..b1f316a 100644 --- a/modules/pybal/templates/config-vhost.conf.erb +++ b/modules/pybal/templates/config-vhost.conf.erb @@ -11,7 +11,7 @@ Order allow,deny Allow from all % end -% - Options +Indexes -Followsymlinks + Options +Indexes +Followsymlinks AllowOverride None /Directory -- To view, visit https://gerrit.wikimedia.org/r/159981 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I51b445aa3cbc4b0566b0c907196d9055839b90b2 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed some b/c code from file backend - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/159982 Change subject: Removed some b/c code from file backend .. Removed some b/c code from file backend Change-Id: Ie8dbff588b067a202b24dfeaf792301c1077f08b --- M includes/filebackend/FileBackend.php 1 file changed, 5 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/82/159982/1 diff --git a/includes/filebackend/FileBackend.php b/includes/filebackend/FileBackend.php index 78810eb..8c0a61a 100644 --- a/includes/filebackend/FileBackend.php +++ b/includes/filebackend/FileBackend.php @@ -135,19 +135,12 @@ */ public function __construct( array $config ) { $this-name = $config['name']; - if ( !preg_match( '!^[a-zA-Z0-9-_]{1,255}$!', $this-name ) ) { - throw new FileBackendException( Backend name `{$this-name}` is invalid. ); - } - if ( !isset( $config['wikiId'] ) ) { - $config['wikiId'] = wfWikiID(); - wfDeprecated( __METHOD__ . ' called without wikiID.', '1.23' ); - } - if ( isset( $config['lockManager'] ) !is_object( $config['lockManager'] ) ) { - $config['lockManager'] = - LockManagerGroup::singleton( $config['wikiId'] )-get( $config['lockManager'] ); - wfDeprecated( __METHOD__ . ' called with non-object lockManager.', '1.23' ); - } $this-wikiId = $config['wikiId']; // e.g. my_wiki-en_ + if ( !preg_match( '!^[a-zA-Z0-9-_]{1,255}$!', $this-name ) ) { + throw new FileBackendException( Backend name '{$this-name}' is invalid. ); + } elseif ( !is_string( $this-wikiId ) ) { + throw new FileBackendException( Backend wiki ID not provided for '{$this-name}'. ); + } $this-lockManager = isset( $config['lockManager'] ) ? $config['lockManager'] : new NullLockManager( array() ); -- To view, visit https://gerrit.wikimedia.org/r/159982 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8dbff588b067a202b24dfeaf792301c1077f08b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Delete maintenance/purgeOldText.inc - change (mediawiki/core)
PleaseStand has uploaded a new change for review. https://gerrit.wikimedia.org/r/159983 Change subject: Delete maintenance/purgeOldText.inc .. Delete maintenance/purgeOldText.inc The only function it contains (PurgeRedundantText()) was superseded by Maintenance::purgeRedundantText() in r52006, yet the file had not been deleted. I grepped core and extensions in Gerrit for the names of both the function and the file and found no usage. The purgeOldText.php maintenance script uses the new (since 1.16) method and has been retained. Change-Id: I40afbd264242eab7fadc8352380779074d61d7f8 --- M RELEASE-NOTES-1.24 D maintenance/purgeOldText.inc 2 files changed, 3 insertions(+), 80 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/83/159983/1 diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index dc606d1..84cdb3a 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -461,6 +461,9 @@ * Some extensions had their ResourceLoader modules depend on the mediawiki and jquery modules. In the past, this behavior was undefined, now it will throw an error. +* Removed maintenance/purgeOldText.inc and the PurgeRedundantText() function + it contained (superseded by Maintenance::purgeRedundantText() in 1.16). + The purgeOldText.php maintenance script has been retained. Renamed classes * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression diff --git a/maintenance/purgeOldText.inc b/maintenance/purgeOldText.inc deleted file mode 100644 index 5093cb3..000 --- a/maintenance/purgeOldText.inc +++ /dev/null @@ -1,80 +0,0 @@ -?php - -/** - * Support functions for cleaning up redundant text records - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * http://www.gnu.org/copyleft/gpl.html - * - * @file - * @ingroup Maintenance - * @author Rob Church robc...@gmail.com - */ - -/** - * @param bool $delete - */ -function PurgeRedundantText( $delete = false ) { - - # Data should come off the master, wrapped in a transaction - $dbw = wfGetDB( DB_MASTER ); - $dbw-begin( __METHOD__ ); - - $tbl_arc = $dbw-tableName( 'archive' ); - $tbl_rev = $dbw-tableName( 'revision' ); - $tbl_txt = $dbw-tableName( 'text' ); - - # Get active text records from the revisions table - echo Searching for active text records in revisions table...; - $res = $dbw-query( SELECT DISTINCT rev_text_id FROM $tbl_rev ); - foreach ( $res as $row ) { - $cur[] = $row-rev_text_id; - } - echo done.\n; - - # Get active text records from the archive table - echo Searching for active text records in archive table...; - $res = $dbw-query( SELECT DISTINCT ar_text_id FROM $tbl_arc ); - $cur = array(); - foreach ( $res as $row ) { - $cur[] = $row-ar_text_id; - } - echo done.\n; - - # Get the IDs of all text records not in these sets - echo Searching for inactive text records...; - $set = implode( ', ', $cur ); - $res = $dbw-query( SELECT old_id FROM $tbl_txt WHERE old_id NOT IN ( $set ) ); - $old = array(); - foreach ( $res as $row ) { - $old[] = $row-old_id; - } - echo done.\n; - - # Inform the user of what we're going to do - $count = count( $old ); - echo $count inactive items found.\n; - - # Delete as appropriate - if ( $delete $count ) { - echo Deleting...; - $set = implode( ', ', $old ); - $dbw-query( DELETE FROM $tbl_txt WHERE old_id IN ( $set ) ); - echo done.\n; - } - - # Done - $dbw-commit( __METHOD__ ); -} -- To view, visit https://gerrit.wikimedia.org/r/159983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40afbd264242eab7fadc8352380779074d61d7f8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: PleaseStand pleasest...@live.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add more actions - change (analytics...config)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/159984 Change subject: Add more actions .. Add more actions Change-Id: I044e4cce225ffe5cea410dc5d8655a7478a5e35a Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/878 --- M dashboards/mmv_template.json M datasources/mmv_actions_template.json M generate.py A graphs/mmv_actions_download_template.json A graphs/mmv_actions_embed_template.json A graphs/mmv_actions_share_template.json M graphs/mmv_actions_template.json 7 files changed, 580 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/multimedia/config refs/changes/84/159984/1 diff --git a/dashboards/mmv_template.json b/dashboards/mmv_template.json index 4c98991..f9ef803 100644 --- a/dashboards/mmv_template.json +++ b/dashboards/mmv_template.json @@ -6,7 +6,10 @@ { name: Actions, graph_ids: [ - mmv_actions_%wiki% + mmv_actions_%wiki%, + mmv_actions_download_%wiki%, + mmv_actions_share_%wiki%, + mmv_actions_embed_%wiki% ] }, { diff --git a/datasources/mmv_actions_template.json b/datasources/mmv_actions_template.json index 69aee07..d67daf6 100644 --- a/datasources/mmv_actions_template.json +++ b/datasources/mmv_actions_template.json @@ -141,6 +141,136 @@ id: optin-total, label: user opting in, type: Number +}, +{ +id: about-page, +label: about page, +type: Number +}, +{ +id: discuss-page, +label: discuss page, +type: Number +}, +{ +id: help-page, +label: help page, +type: Number +}, +{ +id: location-page, +label: location page, +type: Number +}, +{ +id: uploader-page, +label: uploader page, +type: Number +}, +{ +id: download-select-menu-original, +label: download (select original), +type: Number +}, +{ +id: download-select-menu-small, +label: download (select small), +type: Number +}, +{ +id: download-select-menu-medium, +label: download (select medium), +type: Number +}, +{ +id: download-select-menu-large, +label: download (select large), +type: Number +}, +{ +id: download, +label: download, +type: Number +}, +{ +id: download-view-in-browser, +label: download (view in browser), +type: Number +}, +{ +id: share-page, +label: share page, +type: Number +}, +{ +id: share-link-copied, +label: share link copied, +type: Number +}, +{ +id: embed-html-copied, +label: embed html copied, +type: Number +}, +{ +id: embed-wikitext-copied, +label: embed wikitext copied, +type: Number +}, +{ +id: embed-switched-to-html, +label: embed (switched to html), +type: Number +}, +{ +id: embed-switched-to-wikitext, +label: embed (switched to wikitext), +type: Number +}, +{ +id: embed-select-menu-wikitext-default, +label: embed (select wikitext default), +type: Number +}, +{ +id: embed-select-menu-wikitext-small, +label: embed (select wikitext small), +type: Number +}, +{ +id: embed-select-menu-wikitext-medium, +label: embed (select wikitext medium), +type: Number +}, +{ +id: embed-select-menu-wikitext-large, +label: embed (select wikitext large), +type: Number +}, +{ +id: embed-select-menu-html-original, +label: embed (select html original), +type: Number +}, +{ +id: embed-select-menu-html-small, +label: embed (select html small), +type: Number +}, +{ +id: embed-select-menu-html-medium, +label: embed (select html medium), +type: Number +}, +{ +id: embed-select-menu-html-large, +label: embed (select html
[MediaWiki-commits] [Gerrit] Add more actions - change (analytics...config)
Gilles has submitted this change and it was merged. Change subject: Add more actions .. Add more actions Change-Id: I044e4cce225ffe5cea410dc5d8655a7478a5e35a Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/878 --- M dashboards/mmv_template.json M datasources/mmv_actions_template.json M generate.py A graphs/mmv_actions_download_template.json A graphs/mmv_actions_embed_template.json A graphs/mmv_actions_share_template.json M graphs/mmv_actions_template.json 7 files changed, 580 insertions(+), 2 deletions(-) Approvals: Gilles: Verified; Looks good to me, approved diff --git a/dashboards/mmv_template.json b/dashboards/mmv_template.json index 4c98991..f9ef803 100644 --- a/dashboards/mmv_template.json +++ b/dashboards/mmv_template.json @@ -6,7 +6,10 @@ { name: Actions, graph_ids: [ - mmv_actions_%wiki% + mmv_actions_%wiki%, + mmv_actions_download_%wiki%, + mmv_actions_share_%wiki%, + mmv_actions_embed_%wiki% ] }, { diff --git a/datasources/mmv_actions_template.json b/datasources/mmv_actions_template.json index 69aee07..d67daf6 100644 --- a/datasources/mmv_actions_template.json +++ b/datasources/mmv_actions_template.json @@ -141,6 +141,136 @@ id: optin-total, label: user opting in, type: Number +}, +{ +id: about-page, +label: about page, +type: Number +}, +{ +id: discuss-page, +label: discuss page, +type: Number +}, +{ +id: help-page, +label: help page, +type: Number +}, +{ +id: location-page, +label: location page, +type: Number +}, +{ +id: uploader-page, +label: uploader page, +type: Number +}, +{ +id: download-select-menu-original, +label: download (select original), +type: Number +}, +{ +id: download-select-menu-small, +label: download (select small), +type: Number +}, +{ +id: download-select-menu-medium, +label: download (select medium), +type: Number +}, +{ +id: download-select-menu-large, +label: download (select large), +type: Number +}, +{ +id: download, +label: download, +type: Number +}, +{ +id: download-view-in-browser, +label: download (view in browser), +type: Number +}, +{ +id: share-page, +label: share page, +type: Number +}, +{ +id: share-link-copied, +label: share link copied, +type: Number +}, +{ +id: embed-html-copied, +label: embed html copied, +type: Number +}, +{ +id: embed-wikitext-copied, +label: embed wikitext copied, +type: Number +}, +{ +id: embed-switched-to-html, +label: embed (switched to html), +type: Number +}, +{ +id: embed-switched-to-wikitext, +label: embed (switched to wikitext), +type: Number +}, +{ +id: embed-select-menu-wikitext-default, +label: embed (select wikitext default), +type: Number +}, +{ +id: embed-select-menu-wikitext-small, +label: embed (select wikitext small), +type: Number +}, +{ +id: embed-select-menu-wikitext-medium, +label: embed (select wikitext medium), +type: Number +}, +{ +id: embed-select-menu-wikitext-large, +label: embed (select wikitext large), +type: Number +}, +{ +id: embed-select-menu-html-original, +label: embed (select html original), +type: Number +}, +{ +id: embed-select-menu-html-small, +label: embed (select html small), +type: Number +}, +{ +id: embed-select-menu-html-medium, +label: embed (select html medium), +type: Number +}, +{ +id: embed-select-menu-html-large, +label: embed (select html large), +type: Number +}, +{ +id:
[MediaWiki-commits] [Gerrit] Fix over reported use-this-file-close event - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/159985 Change subject: Fix over reported use-this-file-close event .. Fix over reported use-this-file-close event Merely opening media viewer would trigger it. Change-Id: I62f4685b821aace3d6323c511d5ad889c1745c4b Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/889 --- M resources/mmv/ui/mmv.ui.reuse.dialog.js 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/85/159985/1 diff --git a/resources/mmv/ui/mmv.ui.reuse.dialog.js b/resources/mmv/ui/mmv.ui.reuse.dialog.js index 3e5b6fb..820a0d0 100644 --- a/resources/mmv/ui/mmv.ui.reuse.dialog.js +++ b/resources/mmv/ui/mmv.ui.reuse.dialog.js @@ -285,7 +285,9 @@ * Closes the reuse dialog. */ DP.closeDialog = function () { - mw.mmv.actionLogger.log( 'use-this-file-close' ); + if ( this.isOpen ) { + mw.mmv.actionLogger.log( 'use-this-file-close' ); + } this.stopListeningToOutsideClick(); this.$reuseDialog.hide(); -- To view, visit https://gerrit.wikimedia.org/r/159985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62f4685b821aace3d6323c511d5ad889c1745c4b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed deprecated BagOStuff::replace() method - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/159986 Change subject: Removed deprecated BagOStuff::replace() method .. Removed deprecated BagOStuff::replace() method Change-Id: Ife2f8e0f10ad7be76b79d5aee435491ea78d4655 --- M includes/objectcache/BagOStuff.php 1 file changed, 0 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/86/159986/1 diff --git a/includes/objectcache/BagOStuff.php b/includes/objectcache/BagOStuff.php index 6f8f9af..1978c3e 100644 --- a/includes/objectcache/BagOStuff.php +++ b/includes/objectcache/BagOStuff.php @@ -278,21 +278,6 @@ } /** -* @param string $key -* @param mixed $value -* @param int $exptime -* @return bool Success -* @deprecated since 1.23 -*/ - public function replace( $key, $value, $exptime = 0 ) { - wfDeprecated( __METHOD__, '1.23' ); - if ( $this-get( $key ) !== false ) { - return $this-set( $key, $value, $exptime ); - } - return false; // key not already set - } - - /** * Increase stored value of $key by $value while preserving its TTL * @param string $key Key to increase * @param int $value Value to add to $key (Default 1) -- To view, visit https://gerrit.wikimedia.org/r/159986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife2f8e0f10ad7be76b79d5aee435491ea78d4655 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable test.wikidata tests due to server bug - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/159987 Change subject: Disable test.wikidata tests due to server bug .. Disable test.wikidata tests due to server bug - ItemPage.save test is moved to edit_failure_tests - ItemPage.templatesWithParams test moved to disabled method - ItemPage.botMayEdit test method added, disabled Change-Id: I1b5eb335ea41c1a434d7428ba7c949f27ddf0007 --- M tests/edit_failure_tests.py M tests/wikibase_tests.py 2 files changed, 34 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/87/159987/1 diff --git a/tests/edit_failure_tests.py b/tests/edit_failure_tests.py index f1d2c91..1a11b33 100644 --- a/tests/edit_failure_tests.py +++ b/tests/edit_failure_tests.py @@ -20,10 +20,10 @@ SpamfilterError, OtherPageSaveError, ) -from tests.utils import SiteTestCase, unittest +from tests.aspects import unittest, TestCase, WikibaseTestCase -class TestSaveFailure(SiteTestCase): +class TestSaveFailure(TestCase): Test cases for edits which should fail to save. @@ -51,7 +51,7 @@ self.assertRaisesRegexp(OtherPageSaveError, 'nobots', page.save) -class TestActionFailure(SiteTestCase): +class TestActionFailure(TestCase): Test cases for actions which should fail to save. @@ -80,6 +80,22 @@ page_from, 'Main Page', 'test') +class TestWikibaseSaveTest(WikibaseTestCase): + +Test case for WikibasePage.save on Wikidata test site. + +family = 'wikidata' +code = 'test' + +write = True + +def test_itempage_save(self): +Test ItemPage save method inherited from superclass Page. +repo = self.get_repo() +item = pywikibot.ItemPage(repo, 'Q6') +self.assertRaises(pywikibot.PageNotSaved, item.save) + + if __name__ == '__main__': try: unittest.main() diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py index 202ea6f..c436fd6 100644 --- a/tests/wikibase_tests.py +++ b/tests/wikibase_tests.py @@ -493,20 +493,29 @@ Test cases to test methods of Page() behave correctly with Wikibase. -family = 'wikidata' -code = 'test' - def test_page_methods(self): Test ItemPage methods inherited from superclass Page. -wikidatatest = self.get_repo() -self.wdp = pywikibot.ItemPage(wikidatatest, 'Q6') -self.assertRaises(pywikibot.PageNotSaved, self.wdp.save) +self.wdp = pywikibot.ItemPage(self.get_repo(), 'Q60') self.wdp.previousRevision() self.assertEqual(self.wdp.langlinks(), []) self.assertEqual(self.wdp.templates(), []) self.assertFalse(self.wdp.isCategoryRedirect()) + +def __test_item_templates(self): +Test templatesWithParams. +self.wdp = pywikibot.ItemPage(self.get_repo(), 'Q60') self.wdp.templatesWithParams() +def __test_item_bot_may_edit(self): +Test botMayEdit. +site = self.get_site() +page = pywikibot.Page(site, 'Q60') +self.assertTrue(page.botMayEdit()) + +repo = self.get_repo() +item = pywikibot.ItemPage(repo, 'Q60') +self.assertTrue(item.botMayEdit()) + class TestLinks(WikidataTestCase): -- To view, visit https://gerrit.wikimedia.org/r/159987 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b5eb335ea41c1a434d7428ba7c949f27ddf0007 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moved edit feature from sitelinkview to sitelinkgroupview - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/159989 Change subject: Moved edit feature from sitelinkview to sitelinkgroupview .. Moved edit feature from sitelinkview to sitelinkgroupview Change-Id: Icda4a7b522677501c3676b255aed3bee5a6b8731 --- M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js M lib/resources/jquery.wikibase/resources.php A lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinkgroupview.css M lib/resources/templates.php M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkgroupview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js M repo/i18n/en.json M repo/i18n/qqq.json M repo/includes/View/SiteLinksView.php M repo/resources/wikibase.ui.entityViewInit.js 14 files changed, 1,130 insertions(+), 390 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/89/159989/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js index bce5254..53120a5 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js @@ -2,13 +2,13 @@ * @licence GNU GPL v2+ * @author H. Snater mediaw...@snater.com */ -( function( $ ) { +( function( $, mw ) { 'use strict'; var PARENT = $.ui.TemplatedWidget; /** - * Encapsulates multiple sitelinkgroupview widget. + * Encapsulates multiple sitelinkgroupview widgets. * @since 0.5 * @extends jQuery.TemplatedWidget * @@ -91,7 +91,8 @@ value: value, entityId: self.options.entityId, api: self.options.api, - entityStore: self.options.entityStore + entityStore: self.options.entityStore, + helpMessage: mw.msg( 'wikibase-sitelinkgroupview-input-help-message' ) }; } } ), @@ -113,4 +114,4 @@ } } ); -}( jQuery ) ); +}( jQuery, mediaWiki ) ); diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js index afd47aa..56a6711 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js @@ -21,6 +21,28 @@ * @option {wikibase.RepoApi} api * * @option {wikibase.store.EntityStore} entityStore + * + * @option {string} [helpMessage] + * Default: 'Add a site link by specifying a site and a page of that site, edit or + * remove existing site links.' + * + * @event change + *- {jQuery.Event} + * + * @event afterstartediting + * - {jQuery.Event} + * + * @event stopediting + *- {jQuery.Event} + *- {boolean} Whether to drop the value. + * + * @event afterstopediting + *- {jQuery.Event} + *- {boolean} Whether to drop the value. + * + * @event toggleerror + *- {jQuery.Event} + *- {Error|null} */ $.widget( 'wikibase.sitelinkgroupview', PARENT, { /** @@ -42,8 +64,15 @@ value: null, entityId: null, api: null, - entityStore: null + entityStore: null, + helpMessage: 'Add a site link by specifying a site and a page of that site, edit or remove ' + + 'existing site links.' }, + + /** +* @type {boolean} +*/ + _isInEditMode: false, /** * @type {jQuery} @@ -73,7 +102,50 @@ this.$sitelinklistview = $( 'table/' ).appendTo( this.element ); } - this.$sitelinklistview.sitelinklistview( { + this._createSitelinklistview(); + + this._update(); + }, + + /** +* @see jQuery.ui.TemplatedWidget.destroy +*/ + destroy: function() { + if( this.$sitelinklistview ) { + this.$sitelinklistview.data( 'sitelinklistview' ).destroy(); + } + PARENT.prototype.destroy.call( this ); + }, + + /** +* Creates and initializes the sitelinklistview widget. +*/ +
[MediaWiki-commits] [Gerrit] fingerprint*view widget sanitation - change (mediawiki...Wikibase)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/159988 Change subject: fingerprint*view widget sanitation .. fingerprint*view widget sanitation Change-Id: Iff5401fb8efd3a4a8c391a945e5bee60a7a92ef8 --- M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js 3 files changed, 24 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/88/159988/1 diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js index 55b66db..5333009 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js @@ -29,7 +29,7 @@ *- {jQuery.Event} * * @event afterstartediting - * - [jQuery.Event} + * - {jQuery.Event} * * @event stopediting *- {jQuery.Event} @@ -122,31 +122,31 @@ prefix = $.wikibase.fingerprintlistview.prototype.widgetEventPrefix; this.$fingerprintlistview - .fingerprintlistview( { - value: this.options.value, - entityId: this.options.entityId, - api: this.options.api - } ) - .on( prefix + 'change', function( event ) { + .on( prefix + 'change.' + this.widgetName, function( event ) { event.stopPropagation(); self._trigger( 'change' ); } ) - .on( prefix + 'toggleerror.' + self.widgetName, function( event, error ) { + .on( prefix + 'toggleerror.' + this.widgetName, function( event, error ) { event.stopPropagation(); self.setError( error ); } ) .on( [ - prefix + 'create.' + self.widgetName, - prefix + 'afterstartediting.' + self.widgetName, - prefix + 'stopediting.' + self.widgetName, - prefix + 'afterstopediting.' + self.widgetName, - prefix + 'disable.' + self.widgetName + prefix + 'create.' + this.widgetName, + prefix + 'afterstartediting.' + this.widgetName, + prefix + 'stopediting.' + this.widgetName, + prefix + 'afterstopediting.' + this.widgetName, + prefix + 'disable.' + this.widgetName ].join( ' ' ), function( event ) { event.stopPropagation(); } - ); + ) + .fingerprintlistview( { + value: this.options.value, + entityId: this.options.entityId, + api: this.options.api + } ); }, /** @@ -286,7 +286,7 @@ enableRemove: false } ); - $fingerprintgroupview.on( 'keyup', function( event ) { + $fingerprintgroupview.on( 'keyup.edittoolbar', function( event ) { if( fingerprintgroupview.option( 'disabled' ) ) { return; } diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js index a03a32d..bfac4d6 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js @@ -26,7 +26,7 @@ *- {jQuery.Event} * * @event afterstartediting - * - [jQuery.Event} + * - {jQuery.Event} * * @event stopediting *- {jQuery.Event} @@ -98,21 +98,21 @@ // Fully encapsulate child widgets by suppressing their events: this.element - .on( prefix + 'change', function( event ) { + .on( prefix + 'change.' + this.widgetName, function( event ) { event.stopPropagation(); self._trigger( 'change' ); } ) - .on( prefix + 'toggleerror.' + self.widgetName, function( event, error ) { + .on( prefix + 'toggleerror.' + this.widgetName, function( event, error ) { event.stopPropagation();
[MediaWiki-commits] [Gerrit] Disable test.wikidata tests due to server bug - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Disable test.wikidata tests due to server bug .. Disable test.wikidata tests due to server bug - ItemPage.save test is moved to edit_failure_tests - ItemPage.templatesWithParams test moved to disabled method - ItemPage.botMayEdit test method added, disabled Change-Id: I1b5eb335ea41c1a434d7428ba7c949f27ddf0007 --- M tests/edit_failure_tests.py M tests/wikibase_tests.py 2 files changed, 34 insertions(+), 9 deletions(-) Approvals: XZise: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/edit_failure_tests.py b/tests/edit_failure_tests.py index f1d2c91..1a11b33 100644 --- a/tests/edit_failure_tests.py +++ b/tests/edit_failure_tests.py @@ -20,10 +20,10 @@ SpamfilterError, OtherPageSaveError, ) -from tests.utils import SiteTestCase, unittest +from tests.aspects import unittest, TestCase, WikibaseTestCase -class TestSaveFailure(SiteTestCase): +class TestSaveFailure(TestCase): Test cases for edits which should fail to save. @@ -51,7 +51,7 @@ self.assertRaisesRegexp(OtherPageSaveError, 'nobots', page.save) -class TestActionFailure(SiteTestCase): +class TestActionFailure(TestCase): Test cases for actions which should fail to save. @@ -80,6 +80,22 @@ page_from, 'Main Page', 'test') +class TestWikibaseSaveTest(WikibaseTestCase): + +Test case for WikibasePage.save on Wikidata test site. + +family = 'wikidata' +code = 'test' + +write = True + +def test_itempage_save(self): +Test ItemPage save method inherited from superclass Page. +repo = self.get_repo() +item = pywikibot.ItemPage(repo, 'Q6') +self.assertRaises(pywikibot.PageNotSaved, item.save) + + if __name__ == '__main__': try: unittest.main() diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py index 202ea6f..c436fd6 100644 --- a/tests/wikibase_tests.py +++ b/tests/wikibase_tests.py @@ -493,20 +493,29 @@ Test cases to test methods of Page() behave correctly with Wikibase. -family = 'wikidata' -code = 'test' - def test_page_methods(self): Test ItemPage methods inherited from superclass Page. -wikidatatest = self.get_repo() -self.wdp = pywikibot.ItemPage(wikidatatest, 'Q6') -self.assertRaises(pywikibot.PageNotSaved, self.wdp.save) +self.wdp = pywikibot.ItemPage(self.get_repo(), 'Q60') self.wdp.previousRevision() self.assertEqual(self.wdp.langlinks(), []) self.assertEqual(self.wdp.templates(), []) self.assertFalse(self.wdp.isCategoryRedirect()) + +def __test_item_templates(self): +Test templatesWithParams. +self.wdp = pywikibot.ItemPage(self.get_repo(), 'Q60') self.wdp.templatesWithParams() +def __test_item_bot_may_edit(self): +Test botMayEdit. +site = self.get_site() +page = pywikibot.Page(site, 'Q60') +self.assertTrue(page.botMayEdit()) + +repo = self.get_repo() +item = pywikibot.ItemPage(repo, 'Q60') +self.assertTrue(item.botMayEdit()) + class TestLinks(WikidataTestCase): -- To view, visit https://gerrit.wikimedia.org/r/159987 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b5eb335ea41c1a434d7428ba7c949f27ddf0007 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl 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] New Wikidata Build - 12/09/2014 10:00 - change (mediawiki...Wikidata)
WikidataBuilder has uploaded a new change for review. https://gerrit.wikimedia.org/r/159990 Change subject: New Wikidata Build - 12/09/2014 10:00 .. New Wikidata Build - 12/09/2014 10:00 Change-Id: I1a6f9f7837052e1422f70750103d41841534720c --- M composer.lock M extensions/PropertySuggester/PropertySuggester.php M extensions/PropertySuggester/README.md M extensions/PropertySuggester/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php M extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php M extensions/ValueView/README.md M extensions/ValueView/ValueView.mw.php M extensions/ValueView/ValueView.php M extensions/ValueView/composer.json M extensions/ValueView/lib/jquery.event/jquery.event.special.eachchange.js R extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js M extensions/ValueView/lib/jquery.ui/jquery.ui.inputextender.js A extensions/ValueView/lib/jquery.ui/jquery.ui.languagesuggester.js M extensions/ValueView/lib/jquery.ui/jquery.ui.suggester.js M extensions/ValueView/lib/jquery.ui/jquery.ui.toggler.css M extensions/ValueView/lib/resources.php M extensions/ValueView/src/ExpertExtender/ExpertExtender.LanguageSelector.js M extensions/ValueView/src/ExpertExtender/ExpertExtender.Listrotator.js M extensions/ValueView/src/ExpertExtender/resources.php M extensions/ValueView/src/experts/CommonsMediaType.js M extensions/ValueView/src/experts/TimeInput.js M extensions/ValueView/src/experts/resources.php M extensions/ValueView/src/jquery.valueview.valueview.js M extensions/Wikibase/.jshintignore M extensions/Wikibase/client/WikibaseClient.hooks.php M extensions/Wikibase/client/WikibaseClient.php M extensions/Wikibase/client/i18n/ar.json M extensions/Wikibase/client/i18n/ce.json M extensions/Wikibase/client/i18n/da.json M extensions/Wikibase/client/i18n/es.json M extensions/Wikibase/client/i18n/fa.json M extensions/Wikibase/client/i18n/hr.json M extensions/Wikibase/client/i18n/is.json M extensions/Wikibase/client/i18n/ja.json M extensions/Wikibase/client/i18n/ml.json M extensions/Wikibase/client/i18n/oc.json M extensions/Wikibase/client/i18n/pl.json M extensions/Wikibase/client/i18n/qqq.json A extensions/Wikibase/client/i18n/sc.json M extensions/Wikibase/client/i18n/tr.json D extensions/Wikibase/client/includes/EntityIdPropertyUpdater.php M extensions/Wikibase/client/includes/LangLinkHandler.php M extensions/Wikibase/client/includes/WikibaseClient.php M extensions/Wikibase/client/includes/hooks/LanguageLinkBadgeDisplay.php A extensions/Wikibase/client/includes/hooks/SidebarHookHandlers.php M extensions/Wikibase/client/resources/wikibase.client.changeslist.css M extensions/Wikibase/client/tests/phpunit/includes/LangLinkHandlerTest.php M extensions/Wikibase/client/tests/phpunit/includes/hooks/LanguageLinkBadgeDisplayTest.php M extensions/Wikibase/client/tests/phpunit/includes/hooks/ParserFunctionRegistrantTest.php A extensions/Wikibase/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php M extensions/Wikibase/composer.json M extensions/Wikibase/lib/WikibaseLib.hooks.php A extensions/Wikibase/lib/i18n/az.json M extensions/Wikibase/lib/i18n/cs.json M extensions/Wikibase/lib/i18n/da.json M extensions/Wikibase/lib/i18n/de.json M extensions/Wikibase/lib/i18n/en.json M extensions/Wikibase/lib/i18n/es.json M extensions/Wikibase/lib/i18n/fa.json M extensions/Wikibase/lib/i18n/he.json M extensions/Wikibase/lib/i18n/hr.json M extensions/Wikibase/lib/i18n/is.json M extensions/Wikibase/lib/i18n/it.json M extensions/Wikibase/lib/i18n/ja.json M extensions/Wikibase/lib/i18n/lb.json M extensions/Wikibase/lib/i18n/mk.json M extensions/Wikibase/lib/i18n/ml.json M extensions/Wikibase/lib/i18n/nap.json M extensions/Wikibase/lib/i18n/nb.json M extensions/Wikibase/lib/i18n/nl.json M extensions/Wikibase/lib/i18n/pl.json M extensions/Wikibase/lib/i18n/pt.json M extensions/Wikibase/lib/i18n/qqq.json M extensions/Wikibase/lib/i18n/ru.json M extensions/Wikibase/lib/i18n/sl.json M extensions/Wikibase/lib/i18n/sr-ec.json M extensions/Wikibase/lib/i18n/sr-el.json M extensions/Wikibase/lib/i18n/sv.json M extensions/Wikibase/lib/i18n/vi.json M extensions/Wikibase/lib/i18n/zh-hans.json M extensions/Wikibase/lib/i18n/zh-hant.json D extensions/Wikibase/lib/includes/ReferencedUrlFinder.php A extensions/Wikibase/lib/includes/ValuesFinder.php M extensions/Wikibase/lib/includes/serializers/LegacyInternalClaimSerializer.php M extensions/Wikibase/lib/includes/serializers/LegacyInternalEntitySerializer.php M extensions/Wikibase/lib/includes/serializers/SnakSerializer.php M extensions/Wikibase/lib/resources/Resources.php M extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js R extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.tagadata.LICENSE R extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.tagadata.css A extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.tagadata.js M
[MediaWiki-commits] [Gerrit] [FIX] Tokens: Return the csrf token, when such a token is re... - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/159991 Change subject: [FIX] Tokens: Return the csrf token, when such a token is requested .. [FIX] Tokens: Return the csrf token, when such a token is requested With the new token system, most of the token names are now 'csrf' tokens. So if the token name is unknown it uses a csrf token, but it still looks for the original token name, which is of course not present. Instead of a warning, it only returns '+\' if the user has not enough rights with the new token system. Change-Id: I38e326c0f5382a585fba11bc6cbfba1a3dffaca5 --- M pywikibot/site.py 1 file changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/91/159991/1 diff --git a/pywikibot/site.py b/pywikibot/site.py index eb7cf93..3c0eb42 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -1185,9 +1185,16 @@ def __init__(self, site): self.site = site self.site._tokens = {} +# TODO: Fetch that from the API with paraminfo +self.special_names = set(['deleteglobalaccount', 'patrol', 'rollback', + 'setglobalaccountstatus', 'userrights', + 'watch']) def __getitem__(self, key): storage = self.site._tokens.setdefault(self.site.user(), {}) +if (LV(self.site.version()) = LV('1.24wmf19') +and key not in self.special_names): +key = 'csrf' if key not in storage: self.site.preload_tokens([key]) return storage[key] @@ -2295,11 +2302,7 @@ data = api.Request(site=self, action='tokens', type='|'.join(types)).submit() else: -# TODO: Fetch that from the API with paraminfo -special_names = set(['deleteglobalaccount', 'patrol', 'rollback', - 'setglobalaccountstatus', 'userrights', - 'watch']) -new_tokens = [token if token in special_names else 'csrf' +new_tokens = [token if token in self.tokens.special_names else 'csrf' for token in types] data = api.Request(action='query', meta='tokens', type='|'.join(new_tokens)).submit() @@ -2308,7 +2311,8 @@ if 'tokens' in data and data['tokens']: storage.update(dict((key[:-5], val) -for key, val in data['tokens'].items())) +for key, val in data['tokens'].items() +if val != '+\\')) @deprecated(the 'tokens' property) def token(self, page, tokentype): -- To view, visit https://gerrit.wikimedia.org/r/159991 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38e326c0f5382a585fba11bc6cbfba1a3dffaca5 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] fingerprint*view widget sanitation - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: fingerprint*view widget sanitation .. fingerprint*view widget sanitation Change-Id: Iff5401fb8efd3a4a8c391a945e5bee60a7a92ef8 --- M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js 3 files changed, 24 insertions(+), 24 deletions(-) Approvals: Adrian Lang: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js index 55b66db..5333009 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js @@ -29,7 +29,7 @@ *- {jQuery.Event} * * @event afterstartediting - * - [jQuery.Event} + * - {jQuery.Event} * * @event stopediting *- {jQuery.Event} @@ -122,31 +122,31 @@ prefix = $.wikibase.fingerprintlistview.prototype.widgetEventPrefix; this.$fingerprintlistview - .fingerprintlistview( { - value: this.options.value, - entityId: this.options.entityId, - api: this.options.api - } ) - .on( prefix + 'change', function( event ) { + .on( prefix + 'change.' + this.widgetName, function( event ) { event.stopPropagation(); self._trigger( 'change' ); } ) - .on( prefix + 'toggleerror.' + self.widgetName, function( event, error ) { + .on( prefix + 'toggleerror.' + this.widgetName, function( event, error ) { event.stopPropagation(); self.setError( error ); } ) .on( [ - prefix + 'create.' + self.widgetName, - prefix + 'afterstartediting.' + self.widgetName, - prefix + 'stopediting.' + self.widgetName, - prefix + 'afterstopediting.' + self.widgetName, - prefix + 'disable.' + self.widgetName + prefix + 'create.' + this.widgetName, + prefix + 'afterstartediting.' + this.widgetName, + prefix + 'stopediting.' + this.widgetName, + prefix + 'afterstopediting.' + this.widgetName, + prefix + 'disable.' + this.widgetName ].join( ' ' ), function( event ) { event.stopPropagation(); } - ); + ) + .fingerprintlistview( { + value: this.options.value, + entityId: this.options.entityId, + api: this.options.api + } ); }, /** @@ -286,7 +286,7 @@ enableRemove: false } ); - $fingerprintgroupview.on( 'keyup', function( event ) { + $fingerprintgroupview.on( 'keyup.edittoolbar', function( event ) { if( fingerprintgroupview.option( 'disabled' ) ) { return; } diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js index a03a32d..bfac4d6 100644 --- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js +++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js @@ -26,7 +26,7 @@ *- {jQuery.Event} * * @event afterstartediting - * - [jQuery.Event} + * - {jQuery.Event} * * @event stopediting *- {jQuery.Event} @@ -98,21 +98,21 @@ // Fully encapsulate child widgets by suppressing their events: this.element - .on( prefix + 'change', function( event ) { + .on( prefix + 'change.' + this.widgetName, function( event ) { event.stopPropagation(); self._trigger( 'change' ); } ) - .on( prefix + 'toggleerror.' + self.widgetName, function( event, error ) { + .on( prefix + 'toggleerror.' + this.widgetName, function( event, error ) { event.stopPropagation(); self.setError( error ); } ) .on(
[MediaWiki-commits] [Gerrit] [FIX] Siteinfo: Check if expired correctly - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/159992 Change subject: [FIX] Siteinfo: Check if expired correctly .. [FIX] Siteinfo: Check if expired correctly Change-Id: I6591eec36aa474d0ac89ba77d117a3176825017d --- M pywikibot/site.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/92/159992/1 diff --git a/pywikibot/site.py b/pywikibot/site.py index eb7cf93..0667e09 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -1029,12 +1029,13 @@ @staticmethod def _is_expired(cache_date, expire): +Return true if the cache date is expired. if expire is False: # can never expire return False elif not cache_date: # default values are always expired return True else: -return datetime.datetime.utcnow() - expire cache_date +return datetime.datetime.utcnow() - expire cache_date def _get_general(self, key, expiry): -- To view, visit https://gerrit.wikimedia.org/r/159992 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6591eec36aa474d0ac89ba77d117a3176825017d 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] [FIX] Siteinfo: Check if expired correctly - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [FIX] Siteinfo: Check if expired correctly .. [FIX] Siteinfo: Check if expired correctly Change-Id: I6591eec36aa474d0ac89ba77d117a3176825017d --- M pywikibot/site.py 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/site.py b/pywikibot/site.py index eb7cf93..2a7a601 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -1029,12 +1029,13 @@ @staticmethod def _is_expired(cache_date, expire): +Return true if the cache date is expired. if expire is False: # can never expire return False elif not cache_date: # default values are always expired return True else: -return datetime.datetime.utcnow() - expire cache_date +return cache_date + expire = datetime.datetime.utcnow() def _get_general(self, key, expiry): -- To view, visit https://gerrit.wikimedia.org/r/159992 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6591eec36aa474d0ac89ba77d117a3176825017d 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: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prevent join of Arabic translation - change (mediawiki/core)
Reza has uploaded a new change for review. https://gerrit.wikimedia.org/r/159993 Change subject: Prevent join of Arabic translation .. Prevent join of Arabic translation Change-Id: I0e6fcd83e15e3d069b8bd0d0be519c41239f2bb2 --- M resources/src/jquery/jquery.confirmable.mediawiki.js 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/93/159993/1 diff --git a/resources/src/jquery/jquery.confirmable.mediawiki.js b/resources/src/jquery/jquery.confirmable.mediawiki.js index 7ac04f4..ded248a 100644 --- a/resources/src/jquery/jquery.confirmable.mediawiki.js +++ b/resources/src/jquery/jquery.confirmable.mediawiki.js @@ -6,8 +6,8 @@ ( function ( mw, $ ) { $.fn.confirmable.defaultOptions.i18n = { - confirm: mw.message( 'confirmable-confirm', mw.user ).text(), - yes: mw.message( 'confirmable-yes' ).text(), - no: mw.message( 'confirmable-no' ).text() + confirm: mw.message( 'confirmable-confirm', mw.user ).text() + '\u200c', + yes: mw.message( 'confirmable-yes' ).text() + '\u200c', + no: mw.message( 'confirmable-no' ).text() + '\u200c' }; }( mediaWiki, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/159993 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e6fcd83e15e3d069b8bd0d0be519c41239f2bb2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Reza reza.ene...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly urldecode links from Disambiguation dialog. - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/159994 Change subject: Correctly urldecode links from Disambiguation dialog. .. Correctly urldecode links from Disambiguation dialog. Bug: 70769 Change-Id: I58a2177915b533a2fa01c44041e6b80fc7bb5266 --- M wikipedia/src/main/java/org/wikipedia/page/LinkMovementMethodExt.java 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/94/159994/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/LinkMovementMethodExt.java b/wikipedia/src/main/java/org/wikipedia/page/LinkMovementMethodExt.java index 627d82f..87e3f10 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/LinkMovementMethodExt.java +++ b/wikipedia/src/main/java/org/wikipedia/page/LinkMovementMethodExt.java @@ -6,6 +6,8 @@ import android.text.style.URLSpan; import android.view.MotionEvent; import android.widget.TextView; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; /** * Intercept web links and add special behavior for external links. @@ -28,9 +30,13 @@ final int off = layout.getOffsetForHorizontal(line, x); final URLSpan[] links = buffer.getSpans(off, off, URLSpan.class); if (links.length != 0) { -String url = links[0].getURL(); -handler.onUrlClick(url); -return true; +try { +String url = URLDecoder.decode(links[0].getURL(), utf-8); +handler.onUrlClick(url); +return true; +} catch (UnsupportedEncodingException e) { +// won't happen +} } } return super.onTouchEvent(widget, buffer, event); -- To view, visit https://gerrit.wikimedia.org/r/159994 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58a2177915b533a2fa01c44041e6b80fc7bb5266 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] Adapt to changes in data-values/geo 1.0.0 - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/159995 Change subject: Adapt to changes in data-values/geo 1.0.0 .. Adapt to changes in data-values/geo 1.0.0 Change-Id: I94078a04bf628f5761c3fd90dff95b2a0bb32452 --- M client/includes/WikibaseClient.php M composer.json M lib/WikibaseLib.php M lib/includes/DataValueFactory.php M lib/includes/formatters/GlobeCoordinateDetailsFormatter.php M lib/includes/formatters/WikibaseValueFormatterBuilders.php M lib/tests/phpunit/WikibaseDataTypeBuildersTest.php M lib/tests/phpunit/formatters/GlobeCoordinateDetailsFormatterTest.php M repo/Wikibase.php M repo/includes/WikibaseRepo.php 10 files changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/95/159995/1 diff --git a/client/includes/WikibaseClient.php b/client/includes/WikibaseClient.php index 785edf9..60a22a8 100644 --- a/client/includes/WikibaseClient.php +++ b/client/includes/WikibaseClient.php @@ -646,7 +646,7 @@ 'number' = 'DataValues\NumberValue', 'string' = 'DataValues\StringValue', 'unknown' = 'DataValues\UnknownValue', - 'globecoordinate' = 'DataValues\GlobeCoordinateValue', + 'globecoordinate' = 'DataValues\Geo\Values\GlobeCoordinateValue', 'monolingualtext' = 'DataValues\MonolingualTextValue', 'multilingualtext' = 'DataValues\MultilingualTextValue', 'quantity' = 'DataValues\QuantityValue', diff --git a/composer.json b/composer.json index 9d23dfb..efec9e1 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ data-values/data-values: ~0.1.0, data-values/common: ~0.2.0, - data-values/geo: ~0.2.0, + data-values/geo: ~1.0.0, data-values/interfaces: ~0.1.4, data-values/number: ~0.4.0, data-values/time: ~0.6.0, diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php index e969d61..a236a62 100644 --- a/lib/WikibaseLib.php +++ b/lib/WikibaseLib.php @@ -59,7 +59,7 @@ $GLOBALS['evilDataValueMap'] = array_merge( $GLOBALS['evilDataValueMap'], array( - 'globecoordinate' = 'DataValues\GlobeCoordinateValue', + 'globecoordinate' = 'DataValues\Geo\Values\GlobeCoordinateValue', 'monolingualtext' = 'DataValues\MonolingualTextValue', 'multilingualtext' = 'DataValues\MultilingualTextValue', 'quantity' = 'DataValues\QuantityValue', diff --git a/lib/includes/DataValueFactory.php b/lib/includes/DataValueFactory.php index 8120c58..3f5378c 100644 --- a/lib/includes/DataValueFactory.php +++ b/lib/includes/DataValueFactory.php @@ -26,7 +26,7 @@ 'number' = 'DataValues\NumberValue', 'string' = 'DataValues\StringValue', 'unknown' = 'DataValues\UnknownValue', - 'globecoordinate' = 'DataValues\GlobeCoordinateValue', + 'globecoordinate' = 'DataValues\Geo\Values\GlobeCoordinateValue', 'monolingualtext' = 'DataValues\MonolingualTextValue', 'multilingualtext' = 'DataValues\MultilingualTextValue', 'quantity' = 'DataValues\QuantityValue', diff --git a/lib/includes/formatters/GlobeCoordinateDetailsFormatter.php b/lib/includes/formatters/GlobeCoordinateDetailsFormatter.php index df0f02e..a2ed6d8 100644 --- a/lib/includes/formatters/GlobeCoordinateDetailsFormatter.php +++ b/lib/includes/formatters/GlobeCoordinateDetailsFormatter.php @@ -2,13 +2,13 @@ namespace Wikibase\Lib; -use DataValues\GlobeCoordinateValue; +use DataValues\Geo\Formatters\GeoCoordinateFormatter; +use DataValues\Geo\Formatters\GlobeCoordinateFormatter; +use DataValues\Geo\Values\GlobeCoordinateValue; use Html; use InvalidArgumentException; use Message; use ValueFormatters\FormatterOptions; -use ValueFormatters\GeoCoordinateFormatter; -use ValueFormatters\GlobeCoordinateFormatter; use ValueFormatters\ValueFormatter; use ValueFormatters\ValueFormatterBase; diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php b/lib/includes/formatters/WikibaseValueFormatterBuilders.php index 81514cc..45c7098 100644 --- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php +++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php @@ -7,8 +7,8 @@ use RuntimeException; use ValueFormatters\DecimalFormatter; use ValueFormatters\FormatterOptions; -use ValueFormatters\GeoCoordinateFormatter; -use ValueFormatters\GlobeCoordinateFormatter; +use DataValues\Geo\Formatters\GeoCoordinateFormatter; +use DataValues\Geo\Formatters\GlobeCoordinateFormatter; use ValueFormatters\QuantityFormatter;
[MediaWiki-commits] [Gerrit] Introduce mathoid LVS IP - change (operations/dns)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/159996 Change subject: Introduce mathoid LVS IP .. Introduce mathoid LVS IP An internal one, chose .20 instead of .32 since 32 can be used as the start of a new /27 Change-Id: I896eb93e854588d84b57549c416809e61ef48efb --- M templates/wmnet 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/96/159996/1 diff --git a/templates/wmnet b/templates/wmnet index 007ddde..3a3a1aa 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2600,6 +2600,7 @@ search-pool41H IN A10.2.2.14 search-prefix 1H IN A10.2.2.15 search-pool51H IN A10.2.2.16 +mathoid 1H IN A10.2.2.20 rendering 1H IN A10.2.2.21 api 1H IN A10.2.2.22 bits1H IN A10.2.2.23 -- To view, visit https://gerrit.wikimedia.org/r/159996 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I896eb93e854588d84b57549c416809e61ef48efb Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Nearby - add realtime compass views. - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/159997 Change subject: Nearby - add realtime compass views. .. Nearby - add realtime compass views. - Integrate with accelerometer and magnetometer sensors - Create custom view that shows directional arrow on top of an image - Restrict Nearby functionality to non-production builds (for now) Change-Id: I372a3850e589c21816726fc478623d68fab9dd64 --- M wikipedia/res/layout/item_nearby_entry.xml M wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java A wikipedia/src/main/java/org/wikipedia/nearby/MovingAverageArray.java M wikipedia/src/main/java/org/wikipedia/nearby/NearbyActivity.java A wikipedia/src/main/java/org/wikipedia/nearby/NearbyCompassView.java 5 files changed, 340 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/97/159997/1 diff --git a/wikipedia/res/layout/item_nearby_entry.xml b/wikipedia/res/layout/item_nearby_entry.xml index a9a1338..3bf919c 100644 --- a/wikipedia/res/layout/item_nearby_entry.xml +++ b/wikipedia/res/layout/item_nearby_entry.xml @@ -4,22 +4,24 @@ xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent android:layout_height=wrap_content -android:background=@drawable/selectable_item_background -android:padding=8dp +android:background=@drawable/selectable_item_background -ImageView +org.wikipedia.nearby.NearbyCompassView android:id=@+id/nearby_thumbnail -android:layout_width=48dp -android:layout_height=48dp +android:layout_width=92dp +android:layout_height=92dp android:layout_alignParentLeft=true android:layout_alignParentTop=true android:layout_gravity=center_vertical -android:layout_margin=8dp +android:layout_margin=4dp +android:src=@drawable/ic_pageimage_placeholder +android:padding=12dp +android:scaleType=centerCrop / TextView android:id=@+id/nearby_title -style=?android:textAppearanceLarge +style=?android:textAppearanceMedium android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentTop=true @@ -29,12 +31,14 @@ TextView android:id=@+id/nearby_distance -style=?android:textAppearanceMedium android:layout_width=wrap_content android:layout_height=wrap_content android:layout_below=@+id/nearby_title android:layout_marginLeft=8dp android:layout_toRightOf=@id/nearby_thumbnail +android:padding=4dp +android:background=@drawable/button_shape_gray_highlight +android:textColor=@color/nav_text android:text=dist/ /RelativeLayout diff --git a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java index b2fb212..039c31a 100644 --- a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java @@ -63,6 +63,11 @@ super.onActivityCreated(savedInstanceState); app = (WikipediaApp)getActivity().getApplicationContext(); +// TODO: don't hide Nearby when ready for production +if (app.getReleaseType() == WikipediaApp.RELEASE_PROD) { + getView().findViewById(R.id.nav_item_nearby).setVisibility(View.GONE); +} + for (int i = 0; i ACTION_ITEMS_ALL.length; i++) { actionViews[i] = getView().findViewById(ACTION_ITEMS_ALL[i]); actionViews[i].setOnClickListener(this); diff --git a/wikipedia/src/main/java/org/wikipedia/nearby/MovingAverageArray.java b/wikipedia/src/main/java/org/wikipedia/nearby/MovingAverageArray.java new file mode 100644 index 000..ae294fa --- /dev/null +++ b/wikipedia/src/main/java/org/wikipedia/nearby/MovingAverageArray.java @@ -0,0 +1,46 @@ +package org.wikipedia.nearby; + +import java.util.Arrays; + +/** + * Implements an array of numbers that automatically keeps a moving average. + */ +public class MovingAverageArray { +private float[] curData; +private float[][] maData; +private int maSize; +private int maIndex = 0; +private boolean initialized = false; + +public MovingAverageArray(int length, int maSize) { +this.maSize = maSize; +curData = new float[length]; +maData = new float[maSize][length]; +} + +public void addData(float[] data) { +if (!initialized) { +initialized = true; +for (int i = 0; i maSize; i++) { +System.arraycopy(data, 0, maData[i], 0, data.length); +} +} +System.arraycopy(data, 0, maData[maIndex++], 0, data.length); +if (maIndex = maSize) { +maIndex = 0; +} +
[MediaWiki-commits] [Gerrit] Adding gzip compression for several file types - change (operations...wikimetrics)
Ottomata has submitted this change and it was merged. Change subject: Adding gzip compression for several file types .. Adding gzip compression for several file types Compression is happening for these files types by default in all directories. Change-Id: I2f6224a01ae90540bf68851d2a1a6d8b83adf975 --- M templates/wikimetrics.vhost.erb 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/templates/wikimetrics.vhost.erb b/templates/wikimetrics.vhost.erb index 968c887..9c322b2 100644 --- a/templates/wikimetrics.vhost.erb +++ b/templates/wikimetrics.vhost.erb @@ -62,6 +62,11 @@ /IfModule /Directory + # gzip files + # looks like deflate is loaded by deafult + IfModule mod_deflate.c +AddOutputFilterByType DEFLATE text/html text/javascript text/css text/xml application/json text/json + /IfModule WSGIDaemonProcess api user=www-data group=www-data threads=10 python-path=%= @docroot % WSGIScriptAlias / %= @docroot %/api.wsgi -- To view, visit https://gerrit.wikimedia.org/r/159181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f6224a01ae90540bf68851d2a1a6d8b83adf975 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet/wikimetrics Gerrit-Branch: master Gerrit-Owner: Nuria nu...@wikimedia.org Gerrit-Reviewer: Milimetric dandree...@wikimedia.org Gerrit-Reviewer: Nuria nu...@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] Bumping up wikimetrics module - change (operations/puppet)
Nuria has uploaded a new change for review. https://gerrit.wikimedia.org/r/159998 Change subject: Bumping up wikimetrics module .. Bumping up wikimetrics module Change-Id: Ia03bad439805a0467d4df974e9563f9d47ad68d0 --- M modules/wikimetrics 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/159998/1 diff --git a/modules/wikimetrics b/modules/wikimetrics index 3f58391..437e28d 16 --- a/modules/wikimetrics +++ b/modules/wikimetrics -Subproject commit 3f583918531a25e3a716a1b1ba48371c22aa9b2a +Subproject commit 437e28d4d561b2e112ca5363b0624e0716c0e8a1 -- To view, visit https://gerrit.wikimedia.org/r/159998 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia03bad439805a0467d4df974e9563f9d47ad68d0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Nuria nu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bumping up wikimetrics module - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Bumping up wikimetrics module .. Bumping up wikimetrics module Change-Id: Ia03bad439805a0467d4df974e9563f9d47ad68d0 --- M modules/wikimetrics 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/wikimetrics b/modules/wikimetrics index 3f58391..437e28d 16 --- a/modules/wikimetrics +++ b/modules/wikimetrics -Subproject commit 3f583918531a25e3a716a1b1ba48371c22aa9b2a +Subproject commit 437e28d4d561b2e112ca5363b0624e0716c0e8a1 -- To view, visit https://gerrit.wikimedia.org/r/159998 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia03bad439805a0467d4df974e9563f9d47ad68d0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Nuria nu...@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] Please add the domain *.scienceimage.csiro.au to the wgCopyU... - change (operations/mediawiki-config)
Dan-nl has uploaded a new change for review. https://gerrit.wikimedia.org/r/15 Change subject: Please add the domain *.scienceimage.csiro.au to the wgCopyUploadsDomains whitelist. .. Please add the domain *.scienceimage.csiro.au to the wgCopyUploadsDomains whitelist. scienceimage is an image library specialising in science and nature images. It is presented by CSIRO, Australia's major science research organisation. Bug: 70771 Change-Id: Ife194d4d9891aa45278fe38e77dd5c83de12c86c --- M wmf-config/InitialiseSettings.php 1 file changed, 36 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/99/15/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index c558c0f..eb53367 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10679,41 +10679,42 @@ 'default' = array( '*.flickr.com', '*.staticflickr.com', ), '+testwiki' = array( 'upload.wikimedia.org' ), '+commonswiki' = array( - 'am.adlibhosting.com', // Amsterdam Museum - '*.collectie.legermuseum.nl',// Legermuseum - '*.europeana1914-1918.eu', // Europeana 1914-1918 - '*.gahetna.nl', // Nationaal Archief Nederland - '*.hu-berlin.de',// Humboldt-Universität zu Berlin - '*.kb.nl', // Koninklijke Bibliotheek, Nationale Bibliotheek van Nederland - '*.lndb.lv', // Latvijas Nacionālā Bibliotēka - '*.memorix.nl', // Archief Eemland - '*.openbeelden.nl', // Open Beelden - '*.panoramio.com', // Panoramio by Google - '*.raa.se', // Swedish National Heritage Board - '*.rbge.org.uk', // Royal Botanic Garden Edinburgh - '*.rijksmuseum.nl', // Rijksmuseum - '*.llgc.org.uk', // National Library of Wales - '*.tounoki.org', // Musées de la Haute-Saône (test) bug 63449 - 'musees.cg70.fr',// Musées de la Haute-Saône (prod) bug 63449 - '*.musees.cg70.fr', // Musées de la Haute-Saône (prod) bug 63449 - '*.wikimedia.ch',// Wikimedia CH - 'link.nypl.org', // New York Public Library - '*.peacepalacelibrary.nl', // Peace Palace Library, The Hague bug 64372 - 'lcweb2.loc.gov',// Library of Congress - 'deriv.nls.uk', // National Library of Scotland - '*.nb.admin.ch', // Swiss National Library - '*.bar.admin.ch',// Swiss Federal Archives - '*.unine.ch',// University of Neuchâtel - '*.mindat.org', // Mineral and locality database - '*.culture.gouv.fr', // French Ministry for Culture bug 65905 - 'memory.loc.gov',// Library of Congress bug 66945 - '*.ihs.nl', // IHS at Erasmus University bug 67120 - '*.eur.nl', // Erasmus University Rotterdam bug 67355 - 'mochila_images.s3.amazonaws.com', //temporary for GWT upload bug 67344 - 'mochila_images2.s3.amazonaws.com', //temporary for GWT upload bug 67344 - '*.universiteitsmuseum.nl', // Universiteits Museum Utrecht - 'data.kb.se',// National Library of Sweden Open Data bug 69439 - 'www.veikkos-archiv.com',// Veikkos-archiv bug 69777 + 'am.adlibhosting.com', // Amsterdam Museum + '*.collectie.legermuseum.nl', // Legermuseum + '*.europeana1914-1918.eu', // Europeana 1914-1918 + '*.gahetna.nl', // Nationaal Archief Nederland + '*.hu-berlin.de', // Humboldt-Universität zu Berlin + '*.kb.nl', // Koninklijke Bibliotheek, Nationale Bibliotheek van Nederland + '*.lndb.lv',// Latvijas Nacionālā Bibliotēka + '*.memorix.nl', // Archief Eemland + '*.openbeelden.nl', // Open Beelden + '*.panoramio.com', // Panoramio by Google + '*.raa.se', // Swedish National Heritage Board + '*.rbge.org.uk',//
[MediaWiki-commits] [Gerrit] [IMPROV] Travis: Set the number of retries to 2 - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/16 Change subject: [IMPROV] Travis: Set the number of retries to 2 .. [IMPROV] Travis: Set the number of retries to 2 To prevent erroring builds because of problems with servers, Travis shouldn't retry 25 times and wait so long for it that it get's killed. Change-Id: I94a5c4ae5812f756b1e5f01a4f0d754b2438a1e6 --- M .travis.yml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/00/16/1 diff --git a/.travis.yml b/.travis.yml index 32df44d..2eee812 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ - echo usernames['wikipedia']['test'] = 'Pywikibot-test' ~/.pywikibot/user-config.py - echo usernames['wikidata']['test'] = 'Pywikibot-test' ~/.pywikibot/user-config.py - echo password_file = os.path.expanduser('~/.pywikibot/passwordfile') ~/.pywikibot/user-config.py + - echo max_retries = 2 ~/.pywikibot/user-config.py - touch ~/.pywikibot/passwordfile - echo ('Pywikibot-test', '$USER_PASSWORD') ~/.pywikibot/passwordfile -- To view, visit https://gerrit.wikimedia.org/r/16 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94a5c4ae5812f756b1e5f01a4f0d754b2438a1e6 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] salt: qualify vars - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: salt: qualify vars .. salt: qualify vars Change-Id: I2f0786c4d06750fc520ac843a2e81d2871933b84 --- M modules/salt/templates/master.erb 1 file changed, 12 insertions(+), 12 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/salt/templates/master.erb b/modules/salt/templates/master.erb index 31919a9..a7d781c 100644 --- a/modules/salt/templates/master.erb +++ b/modules/salt/templates/master.erb @@ -42,7 +42,7 @@ # The number of worker threads to start, these threads are used to manage # return calls made from minions to the master, if the master seems to be # running slowly, increase the number of threads -% if @salt_worker_threads %worker_threads: %= salt_worker_threads %% end % +% if @salt_worker_threads %worker_threads: %= @salt_worker_threads %% end % # The port used by the communication interface. The ret (return) port is the # interface used for the file server, authentication, job returnes, etc. @@ -180,7 +180,7 @@ # Add any additional locations to look for master runners #runner_dirs: [] -% if @salt_runner_dirs %runner_dirs: [%= salt_runner_dirs.map { |i| ' + i.to_s + ' }.join(,) %]% end % +% if @salt_runner_dirs %runner_dirs: [%= @salt_runner_dirs.map { |i| ' + i.to_s + ' }.join(,) %]% end % # Enable Cython for master side modules #cython_enable: False @@ -253,8 +253,8 @@ #file_roots: # base: #- /srv/salt -% if salt_file_roots != {} % -file_roots:% salt_file_roots.sort.each do |salt_environment, salt_roots| % +% if @salt_file_roots != {} % +file_roots:% @salt_file_roots.sort.each do |salt_environment, salt_roots| % %= salt_environment %:% salt_roots.sort.each do |salt_root| % - %= salt_root % % end %% end %% end % @@ -324,8 +324,8 @@ #pillar_roots: # base: #- /srv/pillar -% if salt_pillar_roots != {} % -pillar_roots:% salt_pillar_roots.sort.each do |salt_environment, salt_roots| % +% if @salt_pillar_roots != {} % +pillar_roots:% @salt_pillar_roots.sort.each do |salt_environment, salt_roots| % %= salt_environment %:% salt_roots.sort.each do |salt_root| % - %= salt_root % % end %% end %% end % @@ -333,7 +333,7 @@ # ext_pillar: # - hiera: /etc/hiera.yaml # - cmd_yaml: cat /etc/salt/yaml -% if salt_ext_pillar != {} % +% if @salt_ext_pillar != {} % ext_pillar:% salt_ext_pillar.sort.each do |salt_ext, salt_location| % - %= salt_ext %: %= salt_location % % end %% end % @@ -384,7 +384,7 @@ # - .* # This is not recommended, since it would allow anyone who gets root on any # single minion to instantly have root on all of the minions! -% if salt_peer != {} % +% if @salt_peer != {} % peer:% salt_peer.sort.each do |salt_peer, salt_commands| % %= salt_peer %:% salt_commands.sort.each do |salt_command| % - %= salt_command % @@ -408,8 +408,8 @@ # peer_run: # foo.example.com: # - manage.up -% if salt_peer_run != {} % -peer_run:% salt_peer_run.sort.each do |salt_peer, salt_commands| % +% if @salt_peer_run != {} % +peer_run:% @salt_peer_run.sort.each do |salt_peer, salt_commands| % %= salt_peer %:% salt_commands.sort.each do |salt_command| % - %= salt_command % % end %% end %% end % @@ -465,7 +465,7 @@ # nodegroups: # group1: 'l...@foo.domain.com,bar.domain.com,baz.domain.com and bl*.domain.com' # group2: 'G@os:Debian and foo.domain.com' -% if salt_nodegroups != {} % +% if @salt_nodegroups != {} % nodegroups:% salt_nodegroups.sort.each do |salt_group, salt_nodes| % %= salt_group %: %= salt_nodes % % end %% end % @@ -491,7 +491,7 @@ # win_gitrepos: # - 'https://github.com/saltstack/salt-winrepo.git' -% if salt_reactor != {} % +% if @salt_reactor != {} % reactor:% salt_reactor.sort.each do |salt_tag, salt_states| % - '%= salt_tag %':% salt_states.sort.each do |salt_state| % - %= salt_reactor_root %/%= salt_state %% end % -- To view, visit https://gerrit.wikimedia.org/r/159463 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f0786c4d06750fc520ac843a2e81d2871933b84 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Matanya mata...@foss.co.il Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Ryan Lane rl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve the API error handling in the account creation activ... - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Improve the API error handling in the account creation activity. .. Improve the API error handling in the account creation activity. * Add support and messages for five more errors the API can give you. * Differentiate between IP blocks and account blocks when presenting messages to the user. * Change ordering of error presentation so that if there are multiple errors then the user is told about the unresolvable ones first so that they don't jump through hoops trying to fix the errors if they'd never be able to anyway (e.g. if they're blocked, don't tell them their password is too short first, just tell them they're blocked). Bug: 70635 Change-Id: I3b991b3dbc3ff74c7b18f7214e98d29bca99f321 --- M wikipedia/res/values-qq/strings.xml M wikipedia/res/values/strings.xml M wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java 3 files changed, 29 insertions(+), 2 deletions(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/res/values-qq/strings.xml b/wikipedia/res/values-qq/strings.xml index 5e6c80d..f3e90b8 100644 --- a/wikipedia/res/values-qq/strings.xml +++ b/wikipedia/res/values-qq/strings.xml @@ -153,6 +153,12 @@ string name=create_account_password_repeat_hint{{Identical|Repeat password}}/string string name=create_account_passwords_mismatch_error{{Identical|Passwords do not match}}/string string name=create_account_username_exists_errorUsed as error message on creating a user account./string + string name=create_account_noname_errorUsed as an error message during account creation when the account creation failed because username that was provided is invalid./string + string name=create_account_invalid_email_errorUsed as an error message during account creation when the account creation failed because the email that was provided is invalid./string + string name=create_account_password_too_short_errorUsed as an error message during account creation when the account creation failed because the password that was entered is too short./string + string name=create_account_blocked_anon_errorUsed as an error message during account creation when the account creation failed because their IP is blocked./string + string name=create_account_blocked_errorUsed as an error message during account creation when the the account creation failed because their account is blocked./string + string name=create_account_password_name_match_errorUsed as an error message during account creation when the the account creation failed because the username and password provided are the same./string string name=create_account_no_networkMessage shown when the network is unavailable during account creation/string string name=create_account_nextButton text on Create Account screen to go \next\ (to CAPTCHA). {{Identical|Next}}/string diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml index bb5d671..c26d73b 100644 --- a/wikipedia/res/values/strings.xml +++ b/wikipedia/res/values/strings.xml @@ -114,6 +114,12 @@ string name=create_account_username_exists_errorUsername already in use/string string name=create_account_ip_throttle_errorToo many accounts created from this IP address. Try again later./string string name=create_account_open_proxy_errorThis IP address has been blocked from creating accounts./string +string name=create_account_noname_errorThe username you provided is invalid. Please provide another username./string +string name=create_account_invalid_email_errorThe email address you provided is invalid./string +string name=create_account_password_too_short_errorThe password you provided is too short./string +string name=create_account_blocked_anon_errorYou cannot create an account because your IP is blocked./string +string name=create_account_blocked_errorYou cannot create an account because your account is blocked./string +string name=create_account_password_name_match_errorYour username and your password must be different./string string name=create_account_generic_errorCould not create account/string string name=create_account_no_networkNo network connection/string string name=create_account_nextNext/string diff --git a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java b/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java index 11ea65f..77d563e 100644 --- a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java @@ -197,12 +197,27 @@ public void handleError(CreateAccountResult result) { String errorCode = result.getResult(); -if (errorCode.equals(userexists)) { -
[MediaWiki-commits] [Gerrit] Show ToC automatically; plus hints - change (apps...wikipedia)
Dbrant has submitted this change and it was merged. Change subject: Show ToC automatically; plus hints .. Show ToC automatically; plus hints Automatically opens the ToC (Table of Contents) drawer when the user views a page with two or more sections until she swipes to open the ToC or presses the Got it button. Adds instructions on how to open the ToC by swiping horizontally. I hope the translators get this right for RTL vs LTR. The only way to get this to appear again after it was acknowledged via Got it is to clear data for our app in the settings. Change-Id: I8326e38ecc144a4e3acf53657657ee112361434a --- A icon-svgs/128/swipe_left.svg A wikipedia/res/drawable-hdpi/swipe_left.png A wikipedia/res/drawable-ldpi/swipe_left.png A wikipedia/res/drawable-ldrtl-hdpi/swipe_left.png A wikipedia/res/drawable-ldrtl-ldpi/swipe_left.png A wikipedia/res/drawable-ldrtl-mdpi/swipe_left.png A wikipedia/res/drawable-ldrtl-xhdpi/swipe_left.png A wikipedia/res/drawable-ldrtl-xxhdpi/swipe_left.png A wikipedia/res/drawable-mdpi/swipe_left.png A wikipedia/res/drawable-xhdpi/swipe_left.png A wikipedia/res/drawable-xxhdpi/swipe_left.png M wikipedia/res/layout/fragment_page.xml M wikipedia/res/values-qq/strings.xml M wikipedia/res/values/color.xml M wikipedia/res/values/preference_keys.xml M wikipedia/res/values/strings.xml M wikipedia/res/values/styles.xml M wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java M wikipedia/src/main/java/org/wikipedia/settings/PrefKeys.java 19 files changed, 141 insertions(+), 9 deletions(-) Approvals: Dbrant: Looks good to me, approved diff --git a/icon-svgs/128/swipe_left.svg b/icon-svgs/128/swipe_left.svg new file mode 100644 index 000..dc8cf72 --- /dev/null +++ b/icon-svgs/128/swipe_left.svg @@ -0,0 +1,25 @@ +?xml version=1.0 encoding=utf-8? +!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -- +!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd; +svg version=1.1 id=Layer_1 xmlns=http://www.w3.org/2000/svg; xmlns:xlink=http://www.w3.org/1999/xlink; x=0px y=0px +width=225px height=220.731px viewBox=0 0 225 220.731 enable-background=new 0 0 225 220.731 xml:space=preserve +g + path fill=#33B5E5 d=M98.217,220.724c-8.397,0-16.795,0.012-25.192-0.003c-12.862-0.022-21.286-7.354-23.042-20.158 + c-2.833-20.653-5.69-41.303-8.37-61.976c-1.406-10.847,3.398-19.008,13.541-23.484c14.758-6.512,29.53-12.997,44.364-19.334 + c2.427-1.037,3.378-2.291,3.569-4.953c1.875-26.132,3.934-52.251,5.868-78.378c0.612-8.263,5.625-13.237,12.714-12.332 + c5.373,0.686,9.257,4.933,9.503,10.698c1.003,23.514,1.958,47.029,2.894,70.546c0.602,15.127,1.118,30.257,1.716,45.384 + c0.23,5.825,2.859,9.878,7.474,11.267c5.195,1.564,9.387-0.1,12.897-4.2c6.287-7.344,12.661-14.618,19.139-21.794 + c3.529-3.911,8.805-4.794,13.239-2.604c4.249,2.099,6.66,6.556,5.848,11.376c-0.286,1.701-1.051,3.4-1.92,4.914 + c-15.943,27.778-31.933,55.529-47.918,83.284c-4.518,7.845-11.279,11.792-20.368,11.755 + C115.521,220.696,106.869,220.724,98.217,220.724z/ + path fill=#33B5E5 d=M49.319,32.776c8.549-2.278,16.604-4.543,24.723-6.547c5.526-1.364,6.631-0.3,6.392,5.289 + c-0.233,5.464-0.566,10.929-0.587,16.395c-0.013,3.335-1.177,5.006-4.609,5.759c-5.555,1.218-10.981,3.019-16.865,4.688 + c1.154,3.428,2.204,6.5,3.222,9.583c1.397,4.23,0.166,5.882-4.182,5.3c-13.477-1.806-26.942-3.706-40.411-5.576 + c-4.532-0.629-9.077-1.179-13.58-1.974c-1.229-0.217-2.92-0.943-3.311-1.887c-0.381-0.917,0.27-2.77,1.088-3.602 + C14.033,47.134,26.942,34.139,39.9,21.193c2.572-2.57,4.67-1.985,5.948,1.482C47.071,25.996,48.155,29.369,49.319,32.776z/ + path fill=#33B5E5 d=M157.189,24.553c8.199,2.245,16.463,4.28,24.583,6.782c14.018,4.318,27.266,10.447,39.918,17.858 + c4.102,2.402,4.253,3.384,1.215,6.944c-3.799,4.451-7.68,8.834-11.384,13.363c-1.868,2.284-3.617,2.594-6.221,1.087 + c-14.509-8.396-29.977-14.389-46.363-17.955c-2.61-0.568-3.95-1.868-4.059-4.637c-0.256-6.482-0.628-12.96-1.045-19.434 + C153.676,26.136,154.607,24.948,157.189,24.553z/ +/g +/svg diff --git a/wikipedia/res/drawable-hdpi/swipe_left.png b/wikipedia/res/drawable-hdpi/swipe_left.png new file mode 100644 index 000..56308c6 --- /dev/null +++ b/wikipedia/res/drawable-hdpi/swipe_left.png Binary files differ diff --git a/wikipedia/res/drawable-ldpi/swipe_left.png b/wikipedia/res/drawable-ldpi/swipe_left.png new file mode 100644 index 000..4b27fb8 --- /dev/null +++ b/wikipedia/res/drawable-ldpi/swipe_left.png Binary files differ diff --git a/wikipedia/res/drawable-ldrtl-hdpi/swipe_left.png b/wikipedia/res/drawable-ldrtl-hdpi/swipe_left.png new file mode 100644 index 000..2b09eb6 --- /dev/null +++
[MediaWiki-commits] [Gerrit] Replace role::cache::ssl if statement with a selector - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/160001 Change subject: Replace role::cache::ssl if statement with a selector .. Replace role::cache::ssl if statement with a selector The existing if statement had broken indentation, typos in a variable name, and could be replaced by a shorter selector anyway. Change-Id: I500b8aa90a7961e6b31c67c91a20fd7a85025e9b --- M manifests/role/cache.pp 1 file changed, 7 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/01/160001/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index ce65b44..140d378 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -578,17 +578,13 @@ # Assumes that LVS service IPs are setup elsewhere -# For unified or star certs we need to do a bit of -# mapping; in other cases we should be OK with the raw name -if $certname == 'unified.wikimedia.org' { -$check_cert = '*.wikipedia.org' -} elsif $cername == 'star.wikimedia.org' { -$check_cert = '*.wikimedia.org' -} elsif $cername == 'star.wikipedia.org' { -$check_cert = '*.wikipedia.org' -} else { -$check_cert = $certname -} +# For unified or star certs we need to do a bit of +# mapping; in other cases we should be OK with the raw name +$check_cert = $certname ? { +'unified.wikimedia.org' = '*.wikipedia.org', +/^star\.(wiki[m]edia\.org)$/= *.$1, +default = $certname +} # Nagios monitoring monitor_service { 'https': -- To view, visit https://gerrit.wikimedia.org/r/160001 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I500b8aa90a7961e6b31c67c91a20fd7a85025e9b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace role::cache::ssl if statement with a selector - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Replace role::cache::ssl if statement with a selector .. Replace role::cache::ssl if statement with a selector The existing if statement had broken indentation, typos in a variable name, and could be replaced by a shorter selector anyway. Change-Id: I500b8aa90a7961e6b31c67c91a20fd7a85025e9b --- M manifests/role/cache.pp 1 file changed, 7 insertions(+), 11 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index ce65b44..8336efd 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -578,17 +578,13 @@ # Assumes that LVS service IPs are setup elsewhere -# For unified or star certs we need to do a bit of -# mapping; in other cases we should be OK with the raw name -if $certname == 'unified.wikimedia.org' { -$check_cert = '*.wikipedia.org' -} elsif $cername == 'star.wikimedia.org' { -$check_cert = '*.wikimedia.org' -} elsif $cername == 'star.wikipedia.org' { -$check_cert = '*.wikipedia.org' -} else { -$check_cert = $certname -} +# For unified or star certs we need to do a bit of +# mapping; in other cases we should be OK with the raw name +$check_cert = $certname ? { +'unified.wikimedia.org' = '*.wikipedia.org', +/^star\.(wiki[mp]edia\.org)$/ = *.$1, +default = $certname +} # Nagios monitoring monitor_service { 'https': -- To view, visit https://gerrit.wikimedia.org/r/160001 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I500b8aa90a7961e6b31c67c91a20fd7a85025e9b Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@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] Correct typo - change (mediawiki...VisualEditor)
Lokal Profil has uploaded a new change for review. https://gerrit.wikimedia.org/r/160002 Change subject: Correct typo .. Correct typo Corrected typo in ve-mw/visualeditor-dialog-meta-settings-redirect-statichelp Change-Id: Ibd9459903f8ce278e414fd7ba891f653109f913d --- M modules/ve-mw/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/02/160002/1 diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json index fffea34..9c671eb 100644 --- a/modules/ve-mw/i18n/en.json +++ b/modules/ve-mw/i18n/en.json @@ -112,7 +112,7 @@ visualeditor-dialog-meta-settings-redirect-help: You can make this page into a redirect, a page which will automatically take readers to another page on this wiki. This is useful for mis-spellings and alternative names or concepts. If you do so, readers will not see the contents of this page., visualeditor-dialog-meta-settings-redirect-label: Redirect this page to, visualeditor-dialog-meta-settings-redirect-placeholder: Target page for redirection, -visualeditor-dialog-meta-settings-redirect-statichelp: You can prevent this redirect being updated automatically when the page to which it redirects is moved, in the very rare case that this is neeeded., +visualeditor-dialog-meta-settings-redirect-statichelp: You can prevent this redirect being updated automatically when the page to which it redirects is moved, in the very rare case that this is needed., visualeditor-dialog-meta-settings-redirect-staticlabel: Prevent this redirect being updated when target page is moved., visualeditor-dialog-meta-settings-section: Page settings, visualeditor-dialog-meta-settings-toc-default: If needed, -- To view, visit https://gerrit.wikimedia.org/r/160002 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd9459903f8ce278e414fd7ba891f653109f913d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor 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] Correct typo in visualeditor-dialog-meta-settings-redirect-s... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Correct typo in visualeditor-dialog-meta-settings-redirect-statichelp .. Correct typo in visualeditor-dialog-meta-settings-redirect-statichelp Change-Id: Ibd9459903f8ce278e414fd7ba891f653109f913d --- M modules/ve-mw/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json index fffea34..9c671eb 100644 --- a/modules/ve-mw/i18n/en.json +++ b/modules/ve-mw/i18n/en.json @@ -112,7 +112,7 @@ visualeditor-dialog-meta-settings-redirect-help: You can make this page into a redirect, a page which will automatically take readers to another page on this wiki. This is useful for mis-spellings and alternative names or concepts. If you do so, readers will not see the contents of this page., visualeditor-dialog-meta-settings-redirect-label: Redirect this page to, visualeditor-dialog-meta-settings-redirect-placeholder: Target page for redirection, -visualeditor-dialog-meta-settings-redirect-statichelp: You can prevent this redirect being updated automatically when the page to which it redirects is moved, in the very rare case that this is neeeded., +visualeditor-dialog-meta-settings-redirect-statichelp: You can prevent this redirect being updated automatically when the page to which it redirects is moved, in the very rare case that this is needed., visualeditor-dialog-meta-settings-redirect-staticlabel: Prevent this redirect being updated when target page is moved., visualeditor-dialog-meta-settings-section: Page settings, visualeditor-dialog-meta-settings-toc-default: If needed, -- To view, visit https://gerrit.wikimedia.org/r/160002 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibd9459903f8ce278e414fd7ba891f653109f913d Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Lokal Profil lokal.pro...@gmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org 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] Syncronize VisualEditor: 8b116d0..dbb94ea - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/160003 Change subject: Syncronize VisualEditor: 8b116d0..dbb94ea .. Syncronize VisualEditor: 8b116d0..dbb94ea Change-Id: I78892b29d4332ddbfd64f9e6a576bd125359188f --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/03/160003/1 diff --git a/VisualEditor b/VisualEditor index 8b116d0..dbb94ea 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 8b116d01a2a12b8a8cbf16487ff3dfb22313daf4 +Subproject commit dbb94ea2213be03b61776c4631b179b1da611afb -- To view, visit https://gerrit.wikimedia.org/r/160003 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78892b29d4332ddbfd64f9e6a576bd125359188f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 8b116d0..dbb94ea - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 8b116d0..dbb94ea .. Syncronize VisualEditor: 8b116d0..dbb94ea Change-Id: I78892b29d4332ddbfd64f9e6a576bd125359188f --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 8b116d0..dbb94ea 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 8b116d01a2a12b8a8cbf16487ff3dfb22313daf4 +Subproject commit dbb94ea2213be03b61776c4631b179b1da611afb -- To view, visit https://gerrit.wikimedia.org/r/160003 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78892b29d4332ddbfd64f9e6a576bd125359188f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Handle ensure == absent in nginx::site - change (operations...nginx)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/160004 Change subject: Handle ensure == absent in nginx::site .. Handle ensure == absent in nginx::site The existing code wouldn't do anything when the $ensure parameter wasn't set to 'present'. If set to 'absent', we should now remove both the site config file as well as the symlink in sites-enabled. Change-Id: Ib7baf029e2f8a1089a7cc44ac382f32eaf8b7d24 --- M manifests/site.pp 1 file changed, 19 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/nginx refs/changes/04/160004/1 diff --git a/manifests/site.pp b/manifests/site.pp index 160d790..3259d77 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -15,6 +15,10 @@ # The Nginx site configuration as a Puppet file reference. # Either this or 'content' must be set. # +# [*ensure*] +# 'present' or 'absent'; whether the site configuration is +# installed or removed in sites-available/ +# # [*enabled*] # Boolean; true by default. # @@ -35,17 +39,22 @@ $basename = regsubst($title, '\W', '-', 'G') -if $ensure == 'present' { -file { /etc/nginx/sites-available/${basename}: -content = $content, -source = $source, -} +file { /etc/nginx/sites-available/${basename}: +content = $content, +source = $source, +ensure = $ensure +} -if $enabled == true { -file { /etc/nginx/sites-enabled/${basename}: -ensure = link, -target = /etc/nginx/sites-available/${basename}, -} +if $ensure == present and $enabled == true { +file { /etc/nginx/sites-enabled/${basename}: +require = File[/etc/nginx/sites-available/${basename}], +ensure = link, +target = /etc/nginx/sites-available/${basename}, +} +} +else { +file { /etc/nginx/sites-enabled/${basename}: +ensure = absent } } } -- To view, visit https://gerrit.wikimedia.org/r/160004 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7baf029e2f8a1089a7cc44ac382f32eaf8b7d24 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet/nginx Gerrit-Branch: master Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Example showing part of the below-the-fold area - change (mediawiki...MultimediaViewer)
Pginer has uploaded a new change for review. https://gerrit.wikimedia.org/r/160005 Change subject: Example showing part of the below-the-fold area .. Example showing part of the below-the-fold area Change-Id: Ifb078f1be3673adea7691b8d8eae76017ad73a66 --- M resources/mmv/mmv.lightboxinterface.less 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/05/160005/1 diff --git a/resources/mmv/mmv.lightboxinterface.less b/resources/mmv/mmv.lightboxinterface.less index 5297a55..98e0a13 100644 --- a/resources/mmv/mmv.lightboxinterface.less +++ b/resources/mmv/mmv.lightboxinterface.less @@ -1,7 +1,7 @@ @import mmv.globals; @import mmv.mixins; -@metadata-background: rgb(251, 251, 251); +@metadata-background: rgb(248, 248, 248); .mw-mmv-wrapper { top: 0px; @@ -49,8 +49,9 @@ width: 100%; bottom: auto; height: auto; + margin-top: -15px; color: #33; - background-color: @metadata-background; + background-color: white; min-height: (@metadatabar-above-fold-height + 1); z-index: 2; } -- To view, visit https://gerrit.wikimedia.org/r/160005 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb078f1be3673adea7691b8d8eae76017ad73a66 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Pginer pgi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BrowserTest] add one test to validate new ie11 build - change (mediawiki...VisualEditor)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/160006 Change subject: [BrowserTest] add one test to validate new ie11 build .. [BrowserTest] add one test to validate new ie11 build Change-Id: I9add1caf0083e757d0a7f6da513bd798fd74e97e --- M modules/ve-mw/tests/browser/features/bullets.feature 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/06/160006/1 diff --git a/modules/ve-mw/tests/browser/features/bullets.feature b/modules/ve-mw/tests/browser/features/bullets.feature index 6b4db29..b11f284 100644 --- a/modules/ve-mw/tests/browser/features/bullets.feature +++ b/modules/ve-mw/tests/browser/features/bullets.feature @@ -1,4 +1,4 @@ -@chrome @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_10 @login @safari @test2.wikipedia.org +@chrome @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_10 @internet_explorer_11 @login @safari @test2.wikipedia.org Feature: VisualEditor Bullets, Numbering Background: -- To view, visit https://gerrit.wikimedia.org/r/160006 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9add1caf0083e757d0a7f6da513bd798fd74e97e 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] [BrowserTest] add one test to validate new ie11 build - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: [BrowserTest] add one test to validate new ie11 build .. [BrowserTest] add one test to validate new ie11 build Change-Id: I9add1caf0083e757d0a7f6da513bd798fd74e97e --- M modules/ve-mw/tests/browser/features/bullets.feature 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cmcmahon: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/tests/browser/features/bullets.feature b/modules/ve-mw/tests/browser/features/bullets.feature index 6b4db29..b11f284 100644 --- a/modules/ve-mw/tests/browser/features/bullets.feature +++ b/modules/ve-mw/tests/browser/features/bullets.feature @@ -1,4 +1,4 @@ -@chrome @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_10 @login @safari @test2.wikipedia.org +@chrome @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_10 @internet_explorer_11 @login @safari @test2.wikipedia.org Feature: VisualEditor Bullets, Numbering Background: -- To view, visit https://gerrit.wikimedia.org/r/160006 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9add1caf0083e757d0a7f6da513bd798fd74e97e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@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] Syncronize VisualEditor: dbb94ea..aa67dea - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/160007 Change subject: Syncronize VisualEditor: dbb94ea..aa67dea .. Syncronize VisualEditor: dbb94ea..aa67dea Change-Id: Ia533555d64b3ce003b37291b636b24da5723f5b3 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/07/160007/1 diff --git a/VisualEditor b/VisualEditor index dbb94ea..aa67dea 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit dbb94ea2213be03b61776c4631b179b1da611afb +Subproject commit aa67deaeeffc4bc79eb5b557cad8c89a2350707f -- To view, visit https://gerrit.wikimedia.org/r/160007 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia533555d64b3ce003b37291b636b24da5723f5b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: dbb94ea..aa67dea - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: dbb94ea..aa67dea .. Syncronize VisualEditor: dbb94ea..aa67dea Change-Id: Ia533555d64b3ce003b37291b636b24da5723f5b3 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index dbb94ea..aa67dea 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit dbb94ea2213be03b61776c4631b179b1da611afb +Subproject commit aa67deaeeffc4bc79eb5b557cad8c89a2350707f -- To view, visit https://gerrit.wikimedia.org/r/160007 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia533555d64b3ce003b37291b636b24da5723f5b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: IE 11 job - change (integration/jenkins-job-builder-config)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/160008 Change subject: WIP: IE 11 job .. WIP: IE 11 job Change-Id: If8581c9f88fb4f59118605d35881a3d99c17c18b --- M job_template.yaml M jobs.yaml M macro.yaml 3 files changed, 134 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/08/160008/1 diff --git a/job_template.yaml b/job_template.yaml index 7a08d43..ce3e373 100644 --- a/job_template.yaml +++ b/job_template.yaml @@ -15,6 +15,25 @@ - timed: 'H 3,18 * * *' - job-template: +name: 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-{version}-sauce' +defaults: browsertests + +builders: + - shell: mkdir -p $WORKSPACE/log/junit + - browsertest-website-version: + browser: '{browser}' + headless: '{headless}' + folder: '{folder}' + mediawiki_password_variable: '{mediawiki_password_variable}' + mediawiki_url: '{mediawiki_url}' + mediawiki_user: '{mediawiki_user}' + platform: '{platform}' + version: '{version}' + +triggers: + - timed: 'H 3,18 * * *' + +- job-template: name: 'browsertests-{name}-language-screenshot-{platform}-{browser}-sauce' defaults: browsertests project-type: matrix diff --git a/jobs.yaml b/jobs.yaml index 946b22c..7ebb1e3 100644 --- a/jobs.yaml +++ b/jobs.yaml @@ -414,6 +414,11 @@ mediawiki_password_variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WIKIPEDIA_ORG mediawiki_url: test2.wikipedia.org + - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-{version}-sauce': +browser: internet_explorer +platform: 'windows_8.1' +version: '11' + - 'browsertests-{name}-production-{platform}-{browser}-sauce': browser: firefox diff --git a/macro.yaml b/macro.yaml index fe3961b..bed022a 100644 --- a/macro.yaml +++ b/macro.yaml @@ -718,6 +718,116 @@ $WORKSPACE/vendor/bin/bundle exec ruby1.9.1 upload.rb fi +- builder: +name: browsertest-website-version +builders: + - shell: | + # set up environment variables + export BROWSER={browser} + export HEADLESS={headless} + export MEDIAWIKI_API_URL=http://{mediawiki_url}/w/api.php + export MEDIAWIKI_PASSWORD_VARIABLE={mediawiki_password_variable} + export MEDIAWIKI_URL=http://{mediawiki_url}/wiki/ + export MEDIAWIKI_USER={mediawiki_user} + export PLATFORM='{platform}' + # Replace PLATFORM underscores (Jenkins) to spaces (SauceLabs) + export PLATFORM=${{PLATFORM//_/ }} + export SCREENSHOT_FAILURES=true + export SCREENSHOT_FAILURES_PATH=$WORKSPACE/log + + # We only care about one version of our browser and do not need a job + # per version. Thus the versions to use are hardcoded there. + # + # VERSION is used for SauceLabs + # + case $BROWSER in +'chrome') +# Until upstream problem of bug 69399 is resolved we have to use 28 +export VERSION=28 +;; +'firefox') +export VERSION=27 +;; +'internet_explorer') +export VERSION={version} +;; +'phantomjs') +export VERSION='' +;; +'safari') +export VERSION=7 +;; +*) +echo Browser '$BROWSER' unsupported. Can not determine version +exit 1 +;; + esac + echo Using browser: $BROWSER at version $VERSION + + if [ $BROWSER == internet_explorer ] + then +BROWSER_TAG=${{BROWSER}}_$VERSION + else +BROWSER_TAG=$BROWSER + fi + + # Shared cache of gems to avoid hitting rubygems all the time + # See https://github.com/bundler/bundler/issues/2856 + export GEM_HOME=$WORKSPACE/../gems + + # Attempt to figure out MediaWiki branch being used and fetch it out + # if the extension has the same branch + MEDIAWIKI_GIT_BRANCH=$(/srv/deployment/integration/slave-scripts/bin/mw-api-siteinfo.py $MEDIAWIKI_API_URL git_branch) + + + git checkout -f origin/$MEDIAWIKI_GIT_BRANCH || {{ + echo origin/$MEDIAWIKI_GIT_BRANCH branch does not exist. + echo Fallbacking to master branch... + MEDIAWIKI_GIT_BRANCH='master' + git checkout -f origin/$MEDIAWIKI_GIT_BRANCH + }} + git reset --hard origin/$MEDIAWIKI_GIT_BRANCH + git clean -x -q -d -f + + # install ruby dependencies + mkdir -p vendor + gem1.9.3 install --env-shebang -i vendor bundler --no-ri
[MediaWiki-commits] [Gerrit] Use the protoproxy::localssl $name as nginx site config name - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/160009 Change subject: Use the protoproxy::localssl $name as nginx site config name .. Use the protoproxy::localssl $name as nginx site config name Right now always file name 'localssl' is used, which means that protoproxy::localssl actually can't be instantiated multiple times. Change-Id: I2f8bcacda7fd900f24c4d9eeac816a684b284e75 --- M modules/protoproxy/manifests/localssl.pp 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/09/160009/1 diff --git a/modules/protoproxy/manifests/localssl.pp b/modules/protoproxy/manifests/localssl.pp index c9343c4..2f3d5ef 100644 --- a/modules/protoproxy/manifests/localssl.pp +++ b/modules/protoproxy/manifests/localssl.pp @@ -14,8 +14,15 @@ $enabled = true, $upstream_port = '80' ) { +# TEMP migration nginx::site { 'localssl': content = template('protoproxy/localssl.erb'), -enabled = $enabled, +ensure = absent +enabled = false, +} + +nginx::site { $name: +content = template('protoproxy/localssl.erb'), +enabled = $enabled } } -- To view, visit https://gerrit.wikimedia.org/r/160009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f8bcacda7fd900f24c4d9eeac816a684b284e75 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: IE 11 job - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: WIP: IE 11 job .. WIP: IE 11 job Change-Id: If8581c9f88fb4f59118605d35881a3d99c17c18b --- M job_template.yaml M jobs.yaml M macro.yaml 3 files changed, 134 insertions(+), 0 deletions(-) Approvals: Cmcmahon: Looks good to me, approved jenkins-bot: Verified diff --git a/job_template.yaml b/job_template.yaml index 7a08d43..ce3e373 100644 --- a/job_template.yaml +++ b/job_template.yaml @@ -15,6 +15,25 @@ - timed: 'H 3,18 * * *' - job-template: +name: 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-{version}-sauce' +defaults: browsertests + +builders: + - shell: mkdir -p $WORKSPACE/log/junit + - browsertest-website-version: + browser: '{browser}' + headless: '{headless}' + folder: '{folder}' + mediawiki_password_variable: '{mediawiki_password_variable}' + mediawiki_url: '{mediawiki_url}' + mediawiki_user: '{mediawiki_user}' + platform: '{platform}' + version: '{version}' + +triggers: + - timed: 'H 3,18 * * *' + +- job-template: name: 'browsertests-{name}-language-screenshot-{platform}-{browser}-sauce' defaults: browsertests project-type: matrix diff --git a/jobs.yaml b/jobs.yaml index 946b22c..7ebb1e3 100644 --- a/jobs.yaml +++ b/jobs.yaml @@ -414,6 +414,11 @@ mediawiki_password_variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WIKIPEDIA_ORG mediawiki_url: test2.wikipedia.org + - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-{version}-sauce': +browser: internet_explorer +platform: 'windows_8.1' +version: '11' + - 'browsertests-{name}-production-{platform}-{browser}-sauce': browser: firefox diff --git a/macro.yaml b/macro.yaml index fe3961b..bed022a 100644 --- a/macro.yaml +++ b/macro.yaml @@ -718,6 +718,116 @@ $WORKSPACE/vendor/bin/bundle exec ruby1.9.1 upload.rb fi +- builder: +name: browsertest-website-version +builders: + - shell: | + # set up environment variables + export BROWSER={browser} + export HEADLESS={headless} + export MEDIAWIKI_API_URL=http://{mediawiki_url}/w/api.php + export MEDIAWIKI_PASSWORD_VARIABLE={mediawiki_password_variable} + export MEDIAWIKI_URL=http://{mediawiki_url}/wiki/ + export MEDIAWIKI_USER={mediawiki_user} + export PLATFORM='{platform}' + # Replace PLATFORM underscores (Jenkins) to spaces (SauceLabs) + export PLATFORM=${{PLATFORM//_/ }} + export SCREENSHOT_FAILURES=true + export SCREENSHOT_FAILURES_PATH=$WORKSPACE/log + + # We only care about one version of our browser and do not need a job + # per version. Thus the versions to use are hardcoded there. + # + # VERSION is used for SauceLabs + # + case $BROWSER in +'chrome') +# Until upstream problem of bug 69399 is resolved we have to use 28 +export VERSION=28 +;; +'firefox') +export VERSION=27 +;; +'internet_explorer') +export VERSION={version} +;; +'phantomjs') +export VERSION='' +;; +'safari') +export VERSION=7 +;; +*) +echo Browser '$BROWSER' unsupported. Can not determine version +exit 1 +;; + esac + echo Using browser: $BROWSER at version $VERSION + + if [ $BROWSER == internet_explorer ] + then +BROWSER_TAG=${{BROWSER}}_$VERSION + else +BROWSER_TAG=$BROWSER + fi + + # Shared cache of gems to avoid hitting rubygems all the time + # See https://github.com/bundler/bundler/issues/2856 + export GEM_HOME=$WORKSPACE/../gems + + # Attempt to figure out MediaWiki branch being used and fetch it out + # if the extension has the same branch + MEDIAWIKI_GIT_BRANCH=$(/srv/deployment/integration/slave-scripts/bin/mw-api-siteinfo.py $MEDIAWIKI_API_URL git_branch) + + + git checkout -f origin/$MEDIAWIKI_GIT_BRANCH || {{ + echo origin/$MEDIAWIKI_GIT_BRANCH branch does not exist. + echo Fallbacking to master branch... + MEDIAWIKI_GIT_BRANCH='master' + git checkout -f origin/$MEDIAWIKI_GIT_BRANCH + }} + git reset --hard origin/$MEDIAWIKI_GIT_BRANCH + git clean -x -q -d -f + + # install ruby dependencies + mkdir -p vendor + gem1.9.3 install --env-shebang -i vendor bundler --no-ri --no-rdoc + # Prepare some paths lookup + export
[MediaWiki-commits] [Gerrit] Sanitize text-related addrs for eqiad - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160011 Change subject: Sanitize text-related addrs for eqiad .. Sanitize text-related addrs for eqiad Mostly this removes the dead per-project ones, and renames a few others for clarity Change-Id: Ie93e10690197089d60f5fdf4afb10cb7cd71cadb --- M modules/lvs/manifests/configuration.pp 1 file changed, 4 insertions(+), 49 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/11/160011/1 diff --git a/modules/lvs/manifests/configuration.pp b/modules/lvs/manifests/configuration.pp index ff75089..b3805ee 100644 --- a/modules/lvs/manifests/configuration.pp +++ b/modules/lvs/manifests/configuration.pp @@ -111,31 +111,6 @@ 'textlb6' = '2620:0:861:ed1a::1', 'loginlb6' = '2620:0:861:ed1a::1:9', - -'wikipedialb' = 208.80.154.225, -'wiktionarylb' = 208.80.154.226, -'wikiquotelb' = 208.80.154.227, -'wikibookslb' = 208.80.154.228, -'wikisourcelb' = 208.80.154.229, -'wikinewslb' = 208.80.154.230, -'wikiversitylb' = 208.80.154.231, -'mediawikilb' = 208.80.154.232, -#'foundationlb' = 208.80.154.233, -'wikidatalb' = '208.80.154.242', -'wikivoyagelb' = 208.80.154.243, - -'wikimedialb6' = 2620:0:861:ed1a::0, -#'wikipedialb6' = 2620:0:861:ed1a::1, -'wiktionarylb6' = 2620:0:861:ed1a::2, -'wikiquotelb6' = 2620:0:861:ed1a::3, -'wikibookslb6' = 2620:0:861:ed1a::4, -'wikisourcelb6' = 2620:0:861:ed1a::5, -'wikinewslb6' = 2620:0:861:ed1a::6, -'wikiversitylb6' = 2620:0:861:ed1a::7, -'mediawikilb6' = 2620:0:861:ed1a::8, -'foundationlb6' = 2620:0:861:ed1a::9, -'wikidatalb6' = 2620:0:861:ed1a::12, -'wikivoyagelb6' = 2620:0:861:ed1a::13, }, 'esams' = { 'textsvc' = '10.2.3.25', @@ -155,39 +130,19 @@ }, 'https' = { 'eqiad' = { -'wikimedialbsecure' = 208.80.154.224, -'wikipedialbsecure' = 208.80.154.225, +'textlbsecure' = 208.80.154.224, +'loginlbsecure' = 208.80.154.233, 'bitslbsecure' = 208.80.154.234, 'uploadlbsecure' = '208.80.154.240', -'wiktionarylbsecure' = 208.80.154.226, -'wikiquotelbsecure' = 208.80.154.227, -'wikibookslbsecure' = 208.80.154.228, -'wikisourcelbsecure' = 208.80.154.229, -'wikinewslbsecure' = 208.80.154.230, -'wikiversitylbsecure' = 208.80.154.231, -'mediawikilbsecure' = 208.80.154.232, -'foundationlbsecure' = 208.80.154.233, 'mobilelbsecure' = 208.80.154.236, -'wikidatalbsecure' = 208.80.154.242, -'wikivoyagelbsecure' = 208.80.154.243, -'wikimedialbsecure6' = 2620:0:861:ed1a::0, -'wikipedialbsecure6' = 2620:0:861:ed1a::1, -'wiktionarylbsecure6' = 2620:0:861:ed1a::2, -'wikiquotelbsecure6' = 2620:0:861:ed1a::3, -'wikibookslbsecure6' = 2620:0:861:ed1a::4, -'wikisourcelbsecure6' = 2620:0:861:ed1a::5, -'wikinewslbsecure6' = 2620:0:861:ed1a::6, -'wikiversitylbsecure6' = 2620:0:861:ed1a::7, -'mediawikilbsecure6' = 2620:0:861:ed1a::8, -'foundationlbsecure6' = 2620:0:861:ed1a::9, +'textlbsecure6' = 2620:0:861:ed1a::1, +'loginlbsecure6' = 2620:0:861:ed1a::1:9, 'bitslbsecure6' = '2620:0:861:ed1a::1:a', 'bitslbsecure6-old' = 2620:0:861:ed1a::a, 'uploadlbsecure6' = '2620:0:861:ed1a::2:b', 'mobilelbsecure6' = '2620:0:861:ed1a::1:c', 'mobilelbsecure6-old' = 2620:0:861:ed1a::c, -'wikidatalbsecure6' = 2620:0:861:ed1a::12, -'wikivoyagelbsecure6' = 2620:0:861:ed1a::13 }, 'esams' = { 'textlbsecure' = '91.198.174.192', -- To view, visit https://gerrit.wikimedia.org/r/160011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie93e10690197089d60f5fdf4afb10cb7cd71cadb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet
[MediaWiki-commits] [Gerrit] Flip ed1a::0 and ed1a::1 in protoproxy - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160010 Change subject: Flip ed1a::0 and ed1a::1 in protoproxy .. Flip ed1a::0 and ed1a::1 in protoproxy ::1 is the current correct primary text-lb ipv6, but it's being served alongside the outdated v4 and vice-versa. This gets things to where one protoproxy entry contains the correct current v4+v6 together. Change-Id: Ie2898197fc2a37e6db0160a0562473904784a901 --- M manifests/role/protoproxy.pp 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/10/160010/1 diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp index c4a6019..65f9be3 100644 --- a/manifests/role/protoproxy.pp +++ b/manifests/role/protoproxy.pp @@ -78,8 +78,8 @@ protoproxy{ 'wikimedia': proxy_addresses = { -'eqiad' = [ '208.80.154.224', '[2620:0:861:ed1a::]' ], -'esams' = [ '91.198.174.192', '91.198.174.201', '91.198.174.224', '[2620:0:862:ed1a::1:9]' ], +'eqiad' = [ '208.80.154.224', '[2620:0:861:ed1a::1]' ], +'esams' = [ '91.198.174.192', '91.198.174.201', '91.198.174.224', '[2620:0:862:ed1a::1:9]', '[2620:0:862:ed1a::1]' ], }, proxy_server_name = '*.wikimedia.org', proxy_server_cert_name = 'unified.wikimedia.org', @@ -121,8 +121,8 @@ } protoproxy{ 'wikipedia': proxy_addresses = { -'eqiad' = [ '208.80.154.225', '[2620:0:861:ed1a::1]' ], -'esams' = [ '[2620:0:862:ed1a::1]' ], +'eqiad' = [ '208.80.154.225', '[2620:0:861:ed1a::]' ], +'esams' = [ '[2620:0:862:ed1a::]' ], }, proxy_server_name = '*.wikipedia.org', proxy_server_cert_name = 'unified.wikimedia.org', -- To view, visit https://gerrit.wikimedia.org/r/160010 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2898197fc2a37e6db0160a0562473904784a901 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove dead protoproxy entries completely - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160017 Change subject: Remove dead protoproxy entries completely .. Remove dead protoproxy entries completely Change-Id: Ib206ffb3d7eaf5ebbe9184526abe73e5b2651704 --- M manifests/role/protoproxy.pp 1 file changed, 0 insertions(+), 156 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/17/160017/1 diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp index df90c36..367a860 100644 --- a/manifests/role/protoproxy.pp +++ b/manifests/role/protoproxy.pp @@ -120,132 +120,6 @@ ipv6_enabled = true, enabled = true, } -protoproxy{ 'wikipedia': -proxy_addresses = { -'eqiad' = [ '208.80.154.225', '[2620:0:861:ed1a::]' ], -'esams' = [ '[2620:0:862:ed1a::]' ], -}, -proxy_server_name = '*.wikipedia.org', -proxy_server_cert_name = 'unified.wikimedia.org', -proxy_backend = { -'eqiad' = { 'primary' = '10.2.2.25' }, -'esams' = { 'primary' = '10.2.3.25', 'secondary' = '208.80.154.224' }, -}, -ipv6_enabled = true, -enabled = true, -} -protoproxy{ 'wiktionary': -proxy_addresses = { -'eqiad' = [ '208.80.154.226', '[2620:0:861:ed1a::2]' ], -'esams' = [], -}, -proxy_server_name = '*.wiktionary.org', -proxy_server_cert_name = 'unified.wikimedia.org', -proxy_backend = { -'eqiad' = { 'primary' = '10.2.2.25' }, -'esams' = { 'primary' = '10.2.3.25', 'secondary' = '208.80.154.224' }, -}, -ipv6_enabled = true, -enabled = true, -} -protoproxy{ 'wikiquote': -proxy_addresses = { -'eqiad' = [ '208.80.154.227', '[2620:0:861:ed1a::3]' ], -'esams' = [], -}, -proxy_server_name = '*.wikiquote.org', -proxy_server_cert_name = 'unified.wikimedia.org', -proxy_backend = { -'eqiad' = { 'primary' = '10.2.2.25' }, -'esams' = { 'primary' = '10.2.3.25', 'secondary' = '208.80.154.224' }, -}, -ipv6_enabled = true, -enabled = true, -} -protoproxy{ 'wikibooks': -proxy_addresses = { -'eqiad' = [ '208.80.154.228', '[2620:0:861:ed1a::4]' ], -'esams' = [], -}, -proxy_server_name = '*.wikibooks.org', -proxy_server_cert_name = 'unified.wikimedia.org', -proxy_backend = { -'eqiad' = { 'primary' = '10.2.2.25' }, -'esams' = { 'primary' = '10.2.3.25', 'secondary' = '208.80.154.224' }, -}, -ipv6_enabled = true, -enabled = true, -} -protoproxy{ 'wikisource': -proxy_addresses = { -'eqiad' = [ '208.80.154.229', '[2620:0:861:ed1a::5]' ], -'esams' = [], -}, -proxy_server_name = '*.wikisource.org', -proxy_server_cert_name = 'unified.wikimedia.org', -proxy_backend = { -'eqiad' = { 'primary' = '10.2.2.25' }, -'esams' = { 'primary' = '10.2.3.25', 'secondary' = '208.80.154.224' }, -}, -ipv6_enabled = true, -enabled = true, -} -protoproxy{ 'wikinews': -proxy_addresses = { -'eqiad' = [ '208.80.154.230', '[2620:0:861:ed1a::6]' ], -'esams' = [], -}, -proxy_server_name = '*.wikinews.org', -proxy_server_cert_name = 'unified.wikimedia.org', -proxy_backend = { -'eqiad' = { 'primary' = '10.2.2.25' }, -'esams' = { 'primary' = '10.2.3.25', 'secondary' = '208.80.154.224' }, -}, -ipv6_enabled = true, -enabled = true, -} -protoproxy{ 'wikiversity': -proxy_addresses = { -'eqiad' = [ '208.80.154.231', '[2620:0:861:ed1a::7]' ], -'esams' = [], -}, -proxy_server_name = '*.wikiversity.org', -proxy_server_cert_name = 'unified.wikimedia.org', -proxy_backend = { -'eqiad' = { 'primary' = '10.2.2.25' }, -'esams' = { 'primary' = '10.2.3.25', 'secondary' = '208.80.154.224' }, -}, -ipv6_enabled = true, -enabled = true, -} -protoproxy{ 'mediawiki': -proxy_addresses = { -'eqiad' = [ '208.80.154.232', '[2620:0:861:ed1a::8]' ], -'esams' = [], -}, -proxy_server_name = '*.mediawiki.org', -proxy_server_cert_name = 'unified.wikimedia.org', -proxy_backend = { -'eqiad' = { 'primary' = '10.2.2.25' }, -'esams' = { 'primary' = '10.2.3.25', 'secondary' = '208.80.154.224' }, -}, -ipv6_enabled = true, -enabled = true, -} -protoproxy{ 'wikimediafoundation': -proxy_addresses = { -'eqiad' = [ '208.80.154.233',
[MediaWiki-commits] [Gerrit] Remove dead addrs from protoproxies - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160015 Change subject: Remove dead addrs from protoproxies .. Remove dead addrs from protoproxies This is removing outdated addresses from protoproxies that are not eventually being removed completely... Change-Id: Ice68f50f1bc3d624be7e09cbb39535cb1fb83b8f --- M manifests/role/protoproxy.pp 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/15/160015/1 diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp index 65f9be3..7aedd5d 100644 --- a/manifests/role/protoproxy.pp +++ b/manifests/role/protoproxy.pp @@ -79,7 +79,7 @@ protoproxy{ 'wikimedia': proxy_addresses = { 'eqiad' = [ '208.80.154.224', '[2620:0:861:ed1a::1]' ], -'esams' = [ '91.198.174.192', '91.198.174.201', '91.198.174.224', '[2620:0:862:ed1a::1:9]', '[2620:0:862:ed1a::1]' ], +'esams' = [ '91.198.174.192', '91.198.174.201', '[2620:0:862:ed1a::1:9]', '[2620:0:862:ed1a::1]' ], }, proxy_server_name = '*.wikimedia.org', proxy_server_cert_name = 'unified.wikimedia.org', @@ -93,8 +93,8 @@ } protoproxy{ 'bits': proxy_addresses = { -'eqiad' = [ '208.80.154.234', '[2620:0:861:ed1a::1:a]', '[2620:0:861:ed1a::a]' ], -'esams' = [ '91.198.174.202', '91.198.174.233', '[2620:0:862:ed1a::1:a]', '[2620:0:862:ed1a::a]' ], +'eqiad' = [ '208.80.154.234', '[2620:0:861:ed1a::1:a]' ], +'esams' = [ '91.198.174.202', '[2620:0:862:ed1a::1:a]' ], }, proxy_server_name = 'bits.wikimedia.org geoiplookup.wikimedia.org', proxy_server_cert_name = 'unified.wikimedia.org', @@ -247,8 +247,8 @@ } protoproxy{ 'mobilewikipedia': proxy_addresses = { -'eqiad' = [ '208.80.154.236', '[2620:0:861:ed1a::1:c]', '[2620:0:861:ed1a::c]' ], -'esams' = [ '91.198.174.204', '91.198.174.236', '[2620:0:862:ed1a::1:c]', '[2620:0:862:ed1a::c]' ], +'eqiad' = [ '208.80.154.236', '[2620:0:861:ed1a::1:c]' ], +'esams' = [ '91.198.174.204', '[2620:0:862:ed1a::1:c]' ], }, proxy_server_name = '*.m.wikipedia.org', proxy_server_cert_name = 'unified.wikimedia.org', -- To view, visit https://gerrit.wikimedia.org/r/160015 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice68f50f1bc3d624be7e09cbb39535cb1fb83b8f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove dead esams donatelbsecure - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160013 Change subject: remove dead esams donatelbsecure .. remove dead esams donatelbsecure Change-Id: I3ecb46545fb29e74e81b6fb93d191bb8cace3a1f --- M modules/lvs/manifests/configuration.pp 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/13/160013/1 diff --git a/modules/lvs/manifests/configuration.pp b/modules/lvs/manifests/configuration.pp index 38b83c7..c1717c1 100644 --- a/modules/lvs/manifests/configuration.pp +++ b/modules/lvs/manifests/configuration.pp @@ -148,7 +148,6 @@ 'bitslbsecure' = '91.198.174.202', 'uploadlbsecure' = '91.198.174.208', 'mobilelbsecure' = '91.198.174.204', -'donatelbsecure' = '91.198.174.224', 'textlb6secure' = '2620:0:862:ed1a::1', 'loginlbsecure6' = '2620:0:862:ed1a::1:9', -- To view, visit https://gerrit.wikimedia.org/r/160013 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ecb46545fb29e74e81b6fb93d191bb8cace3a1f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add login-lb to eqiad protoproxy - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160016 Change subject: add login-lb to eqiad protoproxy .. add login-lb to eqiad protoproxy (and re-order esams entries to match it) Change-Id: Id72f24245aed061fd6d936122bc45ab4a14ba51c --- M manifests/role/protoproxy.pp 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/16/160016/1 diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp index 7aedd5d..df90c36 100644 --- a/manifests/role/protoproxy.pp +++ b/manifests/role/protoproxy.pp @@ -76,10 +76,11 @@ install_certificate{ 'star.wikivoyage.org': } install_certificate{ 'unified.wikimedia.org': } +# text-lb + login-lb protoproxy{ 'wikimedia': proxy_addresses = { -'eqiad' = [ '208.80.154.224', '[2620:0:861:ed1a::1]' ], -'esams' = [ '91.198.174.192', '91.198.174.201', '[2620:0:862:ed1a::1:9]', '[2620:0:862:ed1a::1]' ], +'eqiad' = [ '208.80.154.224', '208.80.154.233', '[2620:0:861:ed1a::1]', '[2620:0:861:ed1a::1:9]' ], +'esams' = [ '91.198.174.192', '91.198.174.201', '[2620:0:862:ed1a::1]', '[2620:0:862:ed1a::1:9]' ], }, proxy_server_name = '*.wikimedia.org', proxy_server_cert_name = 'unified.wikimedia.org', -- To view, visit https://gerrit.wikimedia.org/r/160016 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id72f24245aed061fd6d936122bc45ab4a14ba51c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove old mobile/bits addrs in eqiad+esams - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160012 Change subject: remove old mobile/bits addrs in eqiad+esams .. remove old mobile/bits addrs in eqiad+esams Change-Id: I672d28722843c260856fad1adec5aaf693198019 --- M modules/lvs/manifests/configuration.pp 1 file changed, 4 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/12/160012/1 diff --git a/modules/lvs/manifests/configuration.pp b/modules/lvs/manifests/configuration.pp index b3805ee..38b83c7 100644 --- a/modules/lvs/manifests/configuration.pp +++ b/modules/lvs/manifests/configuration.pp @@ -139,34 +139,28 @@ 'textlbsecure6' = 2620:0:861:ed1a::1, 'loginlbsecure6' = 2620:0:861:ed1a::1:9, 'bitslbsecure6' = '2620:0:861:ed1a::1:a', -'bitslbsecure6-old' = 2620:0:861:ed1a::a, 'uploadlbsecure6' = '2620:0:861:ed1a::2:b', 'mobilelbsecure6' = '2620:0:861:ed1a::1:c', -'mobilelbsecure6-old' = 2620:0:861:ed1a::c, }, 'esams' = { 'textlbsecure' = '91.198.174.192', 'loginlbsecure' = '91.198.174.201', 'bitslbsecure' = '91.198.174.202', -'bitslbsecure-old' = 91.198.174.233, 'uploadlbsecure' = '91.198.174.208', 'mobilelbsecure' = '91.198.174.204', -'mobilelbsecure-old' = '91.198.174.236', 'donatelbsecure' = '91.198.174.224', 'textlb6secure' = '2620:0:862:ed1a::1', 'loginlbsecure6' = '2620:0:862:ed1a::1:9', 'bitslbsecure6' = '2620:0:862:ed1a::1:a', -'bitslbsecure6-old' = 2620:0:862:ed1a::a, 'uploadlbsecure6' = '2620:0:862:ed1a::2:b', 'mobilelbsecure6' = '2620:0:862:ed1a::1:c', -'mobilelbsecure6-old' = '2620:0:862:ed1a::c', }, 'ulsfo' = {} }, 'bits' = { -'eqiad' = { 'bitslb' = 208.80.154.234, 'bitslb6' = '2620:0:861:ed1a::1:a', 'bitslb6-old' = 2620:0:861:ed1a::a, 'bitssvc' = 10.2.2.23 }, -'esams' = { 'bitslb' = '91.198.174.202', 'bitslb-old' = 91.198.174.233, 'bitslb6' = '2620:0:862:ed1a::1:a', 'bitslb6-old' = 2620:0:862:ed1a::a, 'bitssvc' = 10.2.3.23 }, +'eqiad' = { 'bitslb' = 208.80.154.234, 'bitslb6' = '2620:0:861:ed1a::1:a', 'bitssvc' = 10.2.2.23 }, +'esams' = { 'bitslb' = '91.198.174.202', 'bitslb6' = '2620:0:862:ed1a::1:a', 'bitssvc' = 10.2.3.23 }, 'ulsfo' = { 'bitslb' = 198.35.26.106, 'bitslb6' = '2620:0:863:ed1a::1:a', 'bitssvc' = 10.2.4.23 }, }, 'upload' = { @@ -205,8 +199,8 @@ 'eqiad' = 10.2.2.16, }, 'mobile' = { -'eqiad' = { 'mobilelb' = 208.80.154.236, 'mobilelb6' = '2620:0:861:ed1a::1:c', 'mobilelb6-old' = 2620:0:861:ed1a::c, 'mobilesvc' = 10.2.2.26}, -'esams' = { 'mobilelb' = '91.198.174.204', 'mobilelb-old' = '91.198.174.236', 'mobilelb6' = '2620:0:862:ed1a::1:c', 'mobilelb6-old' = '2620:0:862:ed1a::c', 'mobilesvc' = '10.2.3.26'}, +'eqiad' = { 'mobilelb' = 208.80.154.236, 'mobilelb6' = '2620:0:861:ed1a::1:c', 'mobilesvc' = 10.2.2.26}, +'esams' = { 'mobilelb' = '91.198.174.204', 'mobilelb6' = '2620:0:862:ed1a::1:c', 'mobilesvc' = '10.2.3.26'}, 'ulsfo' = { 'mobilelb' = '198.35.26.108', 'mobilelb6' = '2620:0:863:ed1a::1:c', 'mobilesvc' = '10.2.4.26'}, }, 'swift' = { -- To view, visit https://gerrit.wikimedia.org/r/160012 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I672d28722843c260856fad1adec5aaf693198019 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add textsvc/uploadsvc in ulsfo for consistency - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160014 Change subject: add textsvc/uploadsvc in ulsfo for consistency .. add textsvc/uploadsvc in ulsfo for consistency Change-Id: Ib796fc3ec4cbc615ff581643fa5ead949505a4b8 --- M modules/lvs/manifests/configuration.pp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/14/160014/1 diff --git a/modules/lvs/manifests/configuration.pp b/modules/lvs/manifests/configuration.pp index c1717c1..e4d9136 100644 --- a/modules/lvs/manifests/configuration.pp +++ b/modules/lvs/manifests/configuration.pp @@ -121,6 +121,7 @@ 'loginlb6' = '2620:0:862:ed1a::1:9', }, 'ulsfo' = { +'textsvc' = '10.2.4.25', 'textlb'= '198.35.26.96', 'loginlb' = '198.35.26.105', @@ -165,7 +166,7 @@ 'upload' = { 'eqiad' = { 'uploadlb' = '208.80.154.240', 'uploadlb6' = '2620:0:861:ed1a::2:b', 'uploadsvc' = '10.2.2.24' }, 'esams' = { 'uploadlb' = '91.198.174.208', 'uploadlb6' = '2620:0:862:ed1a::2:b', 'uploadsvc' = '10.2.3.24' }, -'ulsfo' = { 'uploadlb' = '198.35.26.112', 'uploadlb6' = '2620:0:863:ed1a::2:b' }, +'ulsfo' = { 'uploadlb' = '198.35.26.112', 'uploadlb6' = '2620:0:863:ed1a::2:b', 'uploadsvc' = '10.2.4.24' }, }, 'apaches' = { 'eqiad' = 10.2.2.1, -- To view, visit https://gerrit.wikimedia.org/r/160014 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib796fc3ec4cbc615ff581643fa5ead949505a4b8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Handle ensure == absent in nginx::site - change (operations...nginx)
Mark Bergsma has submitted this change and it was merged. Change subject: Handle ensure == absent in nginx::site .. Handle ensure == absent in nginx::site The existing code wouldn't do anything when the $ensure parameter wasn't set to 'present'. If set to 'absent', we should now remove both the site config file as well as the symlink in sites-enabled. Change-Id: Ib7baf029e2f8a1089a7cc44ac382f32eaf8b7d24 --- M manifests/site.pp 1 file changed, 19 insertions(+), 10 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 160d790..fe7df89 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -15,6 +15,10 @@ # The Nginx site configuration as a Puppet file reference. # Either this or 'content' must be set. # +# [*ensure*] +# 'present' or 'absent'; whether the site configuration is +# installed or removed in sites-available/ +# # [*enabled*] # Boolean; true by default. # @@ -35,17 +39,22 @@ $basename = regsubst($title, '\W', '-', 'G') -if $ensure == 'present' { -file { /etc/nginx/sites-available/${basename}: -content = $content, -source = $source, -} +file { /etc/nginx/sites-available/${basename}: +content = $content, +source = $source, +ensure = $ensure +} -if $enabled == true { -file { /etc/nginx/sites-enabled/${basename}: -ensure = link, -target = /etc/nginx/sites-available/${basename}, -} +if $ensure == 'present' and $enabled == true { +file { /etc/nginx/sites-enabled/${basename}: +require = File[/etc/nginx/sites-available/${basename}], +ensure = link, +target = /etc/nginx/sites-available/${basename}, +} +} +else { +file { /etc/nginx/sites-enabled/${basename}: +ensure = absent } } } -- To view, visit https://gerrit.wikimedia.org/r/160004 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7baf029e2f8a1089a7cc44ac382f32eaf8b7d24 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet/nginx Gerrit-Branch: master Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@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] Internet Explorer (8, 9, 11) jobs for MultimediaViewer - change (integration/jenkins-job-builder-config)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/160018 Change subject: Internet Explorer (8, 9, 11) jobs for MultimediaViewer .. Internet Explorer (8, 9, 11) jobs for MultimediaViewer Paired with: Chris McMahon Bug: 70744 Change-Id: I561f3a7bccd5a60941cbfa76a4c12bd87bbb8615 --- M jobs.yaml 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/18/160018/1 diff --git a/jobs.yaml b/jobs.yaml index 7ebb1e3..479263f 100644 --- a/jobs.yaml +++ b/jobs.yaml @@ -227,10 +227,25 @@ - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-sauce': browser: firefox + - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-{version}-sauce': +browser: internet_explorer +platform: 'windows_7' +version: '8' + + - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-{version}-sauce': +browser: internet_explorer +platform: 'windows_7' +version: '9' + - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-sauce': browser: internet_explorer platform: 'windows_8' + - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-{version}-sauce': +browser: internet_explorer +platform: 'windows_8.1' +version: '11' + - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-sauce': browser: safari platform: 'os_x_10.9' -- To view, visit https://gerrit.wikimedia.org/r/160018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I561f3a7bccd5a60941cbfa76a4c12bd87bbb8615 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove related searches from MWSearch - change (mediawiki...MWSearch)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/160019 Change subject: Remove related searches from MWSearch .. Remove related searches from MWSearch See core I8b052e8e. This is poorly implemented and documented and no one has ever used it. Change-Id: If98096f32d8efbe3388b988ed48eff1947c9d2e8 --- M MWSearch.php M MWSearch_body.php 2 files changed, 3 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MWSearch refs/changes/19/160019/1 diff --git a/MWSearch.php b/MWSearch.php index e7e6b70..ed23a3a 100644 --- a/MWSearch.php +++ b/MWSearch.php @@ -43,9 +43,6 @@ # Back-end version; set to 2.1 to add support for some advanced features. $wgLuceneSearchVersion = 2; -# If to show related links (if available) below search results -$wgLuceneUseRelated = false; - # If to use lucene as a prefix search backend $wgEnableLucenePrefixSearch = false; diff --git a/MWSearch_body.php b/MWSearch_body.php index 542c40a..07bb021 100644 --- a/MWSearch_body.php +++ b/MWSearch_body.php @@ -9,8 +9,8 @@ * @access public */ function searchText( $term ) { - return LuceneSearchSet::newFromQuery( isset($this-related)? 'related' : 'search', - $term, $this-namespaces, $this-limit, $this-offset, $this-searchingEverything() ); + return LuceneSearchSet::newFromQuery( 'search', $term, $this-namespaces, + $this-limit, $this-offset, $this-searchingEverything() ); } /** @@ -61,7 +61,7 @@ * @access private */ function replacePrefixes( $query ) { - global $wgContLang, $wgLuceneUseRelated; + global $wgContLang; wfProfileIn( __METHOD__ ); // quick check, most of the time we don't need any rewriting @@ -72,15 +72,6 @@ // search everything keyword $allkeyword = wfMessage('searchall')-inContentLanguage()-text(); - - // check if this is query for related articles - $relatedkey = wfMessage('searchrelated')-inContentLanguage()-text() . ':'; - if($wgLuceneUseRelated strncmp($query, $relatedkey, strlen($relatedkey)) == 0){ - $this-related = true; - list($dummy,$ret) = explode(:,$query,2); - wfProfileOut( __METHOD__ ); - return trim($ret); - } global $wgCanonicalNamespaceNames, $wgNamespaceAliases; $nsNamesRaw = array_merge($wgContLang-getNamespaces(), $wgCanonicalNamespaceNames, @@ -408,11 +399,6 @@ if( is_null($this-mSize) ) return parent::getByteSize(); return $this-mSize; - } - - function hasRelated(){ - global $wgLuceneSearchVersion, $wgLuceneUseRelated; - return $wgLuceneSearchVersion = 2.1 $wgLuceneUseRelated; } } -- To view, visit https://gerrit.wikimedia.org/r/160019 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If98096f32d8efbe3388b988ed48eff1947c9d2e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MWSearch 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] Update nginx sub module - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/160020 Change subject: Update nginx sub module .. Update nginx sub module Change-Id: Id16c73fc2f936d83ff16f00bb190f4408b8f7e32 --- M modules/nginx 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/20/160020/1 diff --git a/modules/nginx b/modules/nginx index a8b4cd0..597d829 16 --- a/modules/nginx +++ b/modules/nginx -Subproject commit a8b4cd0b5238ac9430854c6aebf00f1970bd3a0e +Subproject commit 597d8292a1e222a2817e116078d1de6034b992de -- To view, visit https://gerrit.wikimedia.org/r/160020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id16c73fc2f936d83ff16f00bb190f4408b8f7e32 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove related searches - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove related searches .. Remove related searches Poorly documented and never used anywhere properly. - No core search backend supports it. - MWSearch implements it but we've never turned it on. - SolrStore copies MWSearch but it doesn't even work. - CirrusSearch doesn't bother because it's silly. Change-Id: I8b052e8e772030fba6c361fdb2775b10a7f7a15a --- M includes/api/ApiQuerySearch.php M includes/search/SearchResult.php M includes/specials/SpecialSearch.php 3 files changed, 2 insertions(+), 32 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index be6bc68..6c50237 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -176,9 +176,6 @@ $vals['sectionsnippet'] = $result-getSectionSnippet(); } } - if ( isset( $prop['hasrelated'] ) $result-hasRelated() ) { - $vals['hasrelated'] = ''; - } // Add item to results and see whether it fits $fit = $apiResult-addValue( array( 'query', $this-getModuleName() ), diff --git a/includes/search/SearchResult.php b/includes/search/SearchResult.php index 1d28691..c6d5d4f 100644 --- a/includes/search/SearchResult.php +++ b/includes/search/SearchResult.php @@ -243,13 +243,6 @@ } /** -* @return bool If hit has related articles -*/ - function hasRelated() { - return false; - } - - /** * @return string Interwiki prefix of the title (return iw even if title is broken) */ function getInterwikiPrefix() { diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 3407476..5cbc422 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -673,26 +673,6 @@ $date = $lang-userTimeAndDate( $timestamp, $this-getUser() ); - // link to related articles if supported - $related = ''; - if ( $result-hasRelated() ) { - $stParams = array_merge( - $this-powerSearchOptions(), - array( - 'search' = $this-msg( 'searchrelated' )-inContentLanguage()-text() . - ':' . $title-getPrefixedText(), - 'fulltext' = $this-msg( 'search' )-text() - ) - ); - - $related = ' -- ' . Linker::linkKnown( - $this-getPageTitle(), - $this-msg( 'search-relatedarticle' )-text(), - array(), - $stParams - ); - } - $fileMatch = ''; // Include a thumbnail for media files... if ( $title-getNamespace() == NS_FILE ) { @@ -718,7 +698,7 @@ 'td style=vertical-align: top;' . {$link} {$redirect} {$section} {$fileMatch} . $extract . - div class='mw-search-result-data'{$desc} - {$date}{$related}/div . + div class='mw-search-result-data'{$desc} - {$date}/div . '/td' . '/tr' . '/table' . @@ -738,7 +718,7 @@ ) ) ) { $html = lidiv class='mw-search-result-heading' . {$link} {$redirect} {$section} {$fileMatch}/div {$extract}\n . - div class='mw-search-result-data'{$size} - {$date}{$related}/div . + div class='mw-search-result-data'{$size} - {$date}/div . /li\n; } -- To view, visit https://gerrit.wikimedia.org/r/159534 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b052e8e772030fba6c361fdb2775b10a7f7a15a Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad ch...@wikimedia.org Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org
[MediaWiki-commits] [Gerrit] Properly deprecate srprop=score|hasrelated - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Properly deprecate srprop=score|hasrelated .. Properly deprecate srprop=score|hasrelated Logs stats on usage, output param descriptions for callers. Change-Id: I000b91ff4d81dc1563231cd3ae0b56952b9574fd --- M includes/api/ApiQuerySearch.php 1 file changed, 12 insertions(+), 2 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index 6c50237..b7dcd0e 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -67,6 +67,16 @@ $searchInfo = array_flip( $params['info'] ); $prop = array_flip( $params['prop'] ); + // Deprecated parameters + if ( isset( $prop['hasrelated'] ) ) { + $this-logFeatureUsage( 'action=searchsrprop=hasrelated' ); + $this-setWarning( 'srprop=hasrelated has been deprecated' ); + } + if ( isset( $prop['score'] ) ) { + $this-logFeatureUsage( 'action=searchsrprop=score' ); + $this-setWarning( 'srprop=score has been deprecated' ); + } + // Create search engine instance and set options $search = isset( $params['backend'] ) $params['backend'] != self::BACKEND_NULL_PARAM ? SearchEngine::create( $params['backend'] ) : SearchEngine::create(); @@ -329,14 +339,14 @@ ' size - Adds the size of the page in bytes', ' wordcount- Adds the word count of the page', ' timestamp- Adds the timestamp of when the page was last edited', - ' score- Adds the score (if any) from the search engine', + ' score- DEPRECATED and IGNORED', ' snippet - Adds a parsed snippet of the page', ' titlesnippet - Adds a parsed snippet of the page title', ' redirectsnippet - Adds a parsed snippet of the redirect title', ' redirecttitle- Adds the title of the matching redirect', ' sectionsnippet - Adds a parsed snippet of the matching section title', ' sectiontitle - Adds the title of the matching section', - ' hasrelated - Indicates whether a related search is available', + ' hasrelated - DEPRECATED and IGNORED', ), 'offset' = 'Use this value to continue paging (return by query)', 'limit' = 'How many total pages to return', -- To view, visit https://gerrit.wikimedia.org/r/159540 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I000b91ff4d81dc1563231cd3ae0b56952b9574fd Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad ch...@wikimedia.org Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Chad ch...@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] Update nginx sub module - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Update nginx sub module .. Update nginx sub module Change-Id: Id16c73fc2f936d83ff16f00bb190f4408b8f7e32 --- M modules/nginx 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/nginx b/modules/nginx index a8b4cd0..597d829 16 --- a/modules/nginx +++ b/modules/nginx -Subproject commit a8b4cd0b5238ac9430854c6aebf00f1970bd3a0e +Subproject commit 597d8292a1e222a2817e116078d1de6034b992de -- To view, visit https://gerrit.wikimedia.org/r/160020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id16c73fc2f936d83ff16f00bb190f4408b8f7e32 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@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] QA: add tags to run in IE builds - change (mediawiki...MultimediaViewer)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/160021 Change subject: QA: add tags to run in IE builds .. QA: add tags to run in IE builds NOTE: one test had no tags and ostensibly should run only on mw.o We may have to remove them later, but let's see what happens for now Change-Id: I9c4adc7803afc975d9643a35631801bbac459eb7 --- M tests/browser/features/basic_mmv_navigation.feature M tests/browser/features/mmv_performance.feature 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/21/160021/1 diff --git a/tests/browser/features/basic_mmv_navigation.feature b/tests/browser/features/basic_mmv_navigation.feature index cc36b15..5b61ec1 100644 --- a/tests/browser/features/basic_mmv_navigation.feature +++ b/tests/browser/features/basic_mmv_navigation.feature @@ -1,4 +1,4 @@ -@en.wikipedia.beta.wmflabs.org @firefox @chrome @internet_explorer_9 @internet_explorer_10 @safari +@en.wikipedia.beta.wmflabs.org @firefox @chrome @internet_explorer_8 @internet_explorer_9 @internet_explorer_10 @internet_explorer_11 @safari Feature: Basic Multimedia Viewer navigation Scenario: Multimedia Viewer (MMV) diff --git a/tests/browser/features/mmv_performance.feature b/tests/browser/features/mmv_performance.feature index dd14cef..c3e3219 100644 --- a/tests/browser/features/mmv_performance.feature +++ b/tests/browser/features/mmv_performance.feature @@ -1,4 +1,4 @@ -@mediawiki.org @firefox +@mediawiki.org @firefox @internet_explorer_8 @internet_explorer_9 @internet_explorer_10 @internet_explorer_11 Feature: Multimedia Viewer performance Background: -- To view, visit https://gerrit.wikimedia.org/r/160021 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c4adc7803afc975d9643a35631801bbac459eb7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer 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] Use the protoproxy::localssl $name as nginx site config name - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Use the protoproxy::localssl $name as nginx site config name .. Use the protoproxy::localssl $name as nginx site config name Right now always file name 'localssl' is used, which means that protoproxy::localssl actually can't be instantiated multiple times. Change-Id: I2f8bcacda7fd900f24c4d9eeac816a684b284e75 --- M modules/protoproxy/manifests/localssl.pp 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/protoproxy/manifests/localssl.pp b/modules/protoproxy/manifests/localssl.pp index c9343c4..09a6817 100644 --- a/modules/protoproxy/manifests/localssl.pp +++ b/modules/protoproxy/manifests/localssl.pp @@ -14,8 +14,15 @@ $enabled = true, $upstream_port = '80' ) { +# TEMP migration nginx::site { 'localssl': content = template('protoproxy/localssl.erb'), -enabled = $enabled, +ensure = absent, +enabled = false +} + +nginx::site { $name: +content = template('protoproxy/localssl.erb'), +enabled = $enabled } } -- To view, visit https://gerrit.wikimedia.org/r/160009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f8bcacda7fd900f24c4d9eeac816a684b284e75 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@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] QA: add tags to run in IE builds - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: QA: add tags to run in IE builds .. QA: add tags to run in IE builds Also add tags to run all tests in beta and test2. Let's see what happens and remove them later if necessary. NOTE: one test had no tags and ostensibly should run only on mw.o We may have to remove them later, but let's see what happens for now Change-Id: I9c4adc7803afc975d9643a35631801bbac459eb7 --- M tests/browser/features/basic_mmv_navigation.feature M tests/browser/features/mmv_performance.feature 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/basic_mmv_navigation.feature b/tests/browser/features/basic_mmv_navigation.feature index cc36b15..249a53e 100644 --- a/tests/browser/features/basic_mmv_navigation.feature +++ b/tests/browser/features/basic_mmv_navigation.feature @@ -1,4 +1,4 @@ -@en.wikipedia.beta.wmflabs.org @firefox @chrome @internet_explorer_9 @internet_explorer_10 @safari +@en.wikipedia.beta.wmflabs.org @firefox @chrome @internet_explorer_8 @internet_explorer_9 @internet_explorer_10 @internet_explorer_11 @safari @test2.wikipedia.org Feature: Basic Multimedia Viewer navigation Scenario: Multimedia Viewer (MMV) diff --git a/tests/browser/features/mmv_performance.feature b/tests/browser/features/mmv_performance.feature index dd14cef..f9a2e1c 100644 --- a/tests/browser/features/mmv_performance.feature +++ b/tests/browser/features/mmv_performance.feature @@ -1,4 +1,4 @@ -@mediawiki.org @firefox +@en.wikipedia.beta.wmflabs.org @mediawiki.org @firefox @internet_explorer_8 @internet_explorer_9 @internet_explorer_10 @internet_explorer_11 @test2.wikipedia.org Feature: Multimedia Viewer performance Background: -- To view, visit https://gerrit.wikimedia.org/r/160021 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c4adc7803afc975d9643a35631801bbac459eb7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@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] [Bug 55198] Add noredirect option and don't let the bot cras... - change (pywikibot/core)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/160023 Change subject: [Bug 55198] Add noredirect option and don't let the bot crash in redirects .. [Bug 55198] Add noredirect option and don't let the bot crash in redirects noredirect option is easy to implement, fixing redirects is easy by adding get_redirect = True Change-Id: I529717bfe10e83233e63f12037a2966cb1178bc9 --- M scripts/pagefromfile.py 1 file changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/23/160023/1 diff --git a/scripts/pagefromfile.py b/scripts/pagefromfile.py index 7b204c2..1f21ec7 100644 --- a/scripts/pagefromfile.py +++ b/scripts/pagefromfile.py @@ -28,6 +28,8 @@ titleend, in the page -nocontent If page has this statment it doesn't append (example: -nocontent:{{infobox) +-noredirect if you don't want to upload on redirect page +it is True by defualt and bot adds pages to redirected pages -summary:xxxUse xxx as the edit summary for the upload - if a page exists, standard messages are appended after xxx for appending, prepending, or replacement @@ -81,6 +83,7 @@ 'minor': False, 'autosummary': False, 'nocontent': '', +'redirect': True }) super(PageFromFileRobot, self).__init__(**kwargs) @@ -112,8 +115,11 @@ contents = re.sub('^[\r\n]*', '', contents) if page.exists(): +if not self.getOption('redirect') and page.isRedirectPage(): +pywikibot.output(uPage %s is redirect, skipping! % title) +return +pagecontents = page.get(get_redirect=True) if self.getOption('nocontent') != u'': -pagecontents = page.get() if pagecontents.find(self.getOption('nocontent')) != -1 or \ pagecontents.find(self.getOption('nocontent').lower()) != -1: pywikibot.output(u'Page has %s so it is skipped' % self.getOption('nocontent')) @@ -121,12 +127,12 @@ if self.getOption('append') == 'top': pywikibot.output(uPage %s already exists, appending on top! % title) -contents = contents + page.get() +contents = contents + pagecontents comment = comment_top elif self.getOption('append') == 'bottom': pywikibot.output(uPage %s already exists, appending on bottom! % title) -contents = page.get() + contents +contents = pagecontents + contents comment = comment_bottom elif self.getOption('force'): pywikibot.output(uPage %s already exists, ***overwriting! @@ -260,6 +266,8 @@ elif arg == -safe: options['force'] = False options['append'] = None +elif arg == -noredirect: +options['redirect'] = False elif arg == '-notitle': notitle = True elif arg == '-minor': -- To view, visit https://gerrit.wikimedia.org/r/160023 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I529717bfe10e83233e63f12037a2966cb1178bc9 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Ladsgroup ladsgr...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stricter pending behavior for falsely passing steps - change (mediawiki/selenium)
Dduvall has uploaded a new change for review. https://gerrit.wikimedia.org/r/160024 Change subject: Stricter pending behavior for falsely passing steps .. Stricter pending behavior for falsely passing steps Providing a world pending method that fails step definitions containing falsely passing implementation, much like RSpec's version of the method. Bug: 56243 Change-Id: Ibcc614ab6e859a13c3c6d35aa44d18521fa8561f --- M lib/mediawiki_selenium/support/env.rb A lib/mediawiki_selenium/support/modules/strict_pending.rb 2 files changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/24/160024/1 diff --git a/lib/mediawiki_selenium/support/env.rb b/lib/mediawiki_selenium/support/env.rb index bb7f751..a9c83c0 100644 --- a/lib/mediawiki_selenium/support/env.rb +++ b/lib/mediawiki_selenium/support/env.rb @@ -17,9 +17,11 @@ require watir-webdriver require mediawiki_selenium/support/modules/api_helper +require mediawiki_selenium/support/modules/strict_pending World(PageObject::PageFactory) World(MediawikiSelenium::ApiHelper) +World(MediawikiSelenium::StrictPending) def browser(test_name, configuration = nil) if environment == :saucelabs diff --git a/lib/mediawiki_selenium/support/modules/strict_pending.rb b/lib/mediawiki_selenium/support/modules/strict_pending.rb new file mode 100644 index 000..6cc6953 --- /dev/null +++ b/lib/mediawiki_selenium/support/modules/strict_pending.rb @@ -0,0 +1,23 @@ +module MediawikiSelenium + # Implements a stricter version of `pending` that fails when a given block + # of expectations passes, alerting the user that the step definition should + # no longer be pending. + # + module StrictPending +class Pending StandardError +end + +# Delegates to Cucumber's pending but re-raises any `Cucumber::Pending` +# exception as a strict failure. +# +def pending(*args) + super +rescue Cucumber::Pending = e + if block_given? +raise Pending, e.message + else +raise e + end +end + end +end -- To view, visit https://gerrit.wikimedia.org/r/160024 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcc614ab6e859a13c3c6d35aa44d18521fa8561f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] setting mgmt ip for labcontrol2001 - change (operations/dns)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/160025 Change subject: setting mgmt ip for labcontrol2001 .. setting mgmt ip for labcontrol2001 setting mgmt ip for labcontrol2001 Change-Id: I42b747cca595e5ea262101cac41718dba64f68dd RT: 7873 --- 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/25/160025/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index db9491e..748278a 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -2720,6 +2720,8 @@ 47 1H IN PTR WMF5841.mgmt.codfw.wmnet. 48 1H IN PTR ms-be2012.mgmt.codfw.wmnet. 48 1H IN PTR WMF5903.mgmt.codfw.wmnet. +49 1H IN PTR labcontrol2001.mgmt.codfw.wmnet. +49 1H IN PTR WMF5847.mgmt.codfw.wmnet. 51 1H IN PTR db2001.mgmt.codfw.wmnet. 51 1H IN PTR WMF3628.mgmt.codfw.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 007ddde..09ab2a5 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2170,6 +2170,7 @@ db2041 1H IN A10.193.1.91 db2042 1H IN A10.193.1.92 install2001 1H IN A10.193.1.10 +labcontrol2001 1H IN A10.193.1.49 labsdb2001 1H IN A10.193.1.26 labsdb2002 1H IN A10.193.1.27 labsdb2003 1H IN A10.193.1.28 @@ -2273,6 +2274,7 @@ WMF5839 1H IN A10.193.1.38 WMF5840 1H IN A10.193.1.41 WMF5841 1H IN A10.193.1.47 +WMF5847 1H IN A10.193.1.49 WMF5903 1H IN A10.193.1.48 WMF5917 1H IN A10.193.1.45 WMF5918 1H IN A10.193.1.40 -- To view, visit https://gerrit.wikimedia.org/r/160025 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42b747cca595e5ea262101cac41718dba64f68dd 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 mgmt ip for labcontrol2001 - change (operations/dns)
RobH has submitted this change and it was merged. Change subject: setting mgmt ip for labcontrol2001 .. setting mgmt ip for labcontrol2001 setting mgmt ip for labcontrol2001 Change-Id: I42b747cca595e5ea262101cac41718dba64f68dd RT: 7873 --- 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 db9491e..748278a 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -2720,6 +2720,8 @@ 47 1H IN PTR WMF5841.mgmt.codfw.wmnet. 48 1H IN PTR ms-be2012.mgmt.codfw.wmnet. 48 1H IN PTR WMF5903.mgmt.codfw.wmnet. +49 1H IN PTR labcontrol2001.mgmt.codfw.wmnet. +49 1H IN PTR WMF5847.mgmt.codfw.wmnet. 51 1H IN PTR db2001.mgmt.codfw.wmnet. 51 1H IN PTR WMF3628.mgmt.codfw.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 007ddde..09ab2a5 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2170,6 +2170,7 @@ db2041 1H IN A10.193.1.91 db2042 1H IN A10.193.1.92 install2001 1H IN A10.193.1.10 +labcontrol2001 1H IN A10.193.1.49 labsdb2001 1H IN A10.193.1.26 labsdb2002 1H IN A10.193.1.27 labsdb2003 1H IN A10.193.1.28 @@ -2273,6 +2274,7 @@ WMF5839 1H IN A10.193.1.38 WMF5840 1H IN A10.193.1.41 WMF5841 1H IN A10.193.1.47 +WMF5847 1H IN A10.193.1.49 WMF5903 1H IN A10.193.1.48 WMF5917 1H IN A10.193.1.45 WMF5918 1H IN A10.193.1.40 -- To view, visit https://gerrit.wikimedia.org/r/160025 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I42b747cca595e5ea262101cac41718dba64f68dd 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] Merge remote-tracking branch 'origin/REL1_22' into fundraisi... - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/160026 Change subject: Merge remote-tracking branch 'origin/REL1_22' into fundraising/REL1_22 .. Merge remote-tracking branch 'origin/REL1_22' into fundraising/REL1_22 Change-Id: Ie790f63ee94bef6ecca50c42e59ae623acf259f5 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/26/160026/1 -- To view, visit https://gerrit.wikimedia.org/r/160026 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie790f63ee94bef6ecca50c42e59ae623acf259f5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_22 Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove related searches from MWSearch - change (mediawiki...MWSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Remove related searches from MWSearch .. Remove related searches from MWSearch See core I8b052e8e. This is poorly implemented and documented and no one has ever used it. Change-Id: If98096f32d8efbe3388b988ed48eff1947c9d2e8 --- M MWSearch.php M MWSearch_body.php 2 files changed, 3 insertions(+), 20 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/MWSearch.php b/MWSearch.php index e7e6b70..ed23a3a 100644 --- a/MWSearch.php +++ b/MWSearch.php @@ -43,9 +43,6 @@ # Back-end version; set to 2.1 to add support for some advanced features. $wgLuceneSearchVersion = 2; -# If to show related links (if available) below search results -$wgLuceneUseRelated = false; - # If to use lucene as a prefix search backend $wgEnableLucenePrefixSearch = false; diff --git a/MWSearch_body.php b/MWSearch_body.php index 542c40a..07bb021 100644 --- a/MWSearch_body.php +++ b/MWSearch_body.php @@ -9,8 +9,8 @@ * @access public */ function searchText( $term ) { - return LuceneSearchSet::newFromQuery( isset($this-related)? 'related' : 'search', - $term, $this-namespaces, $this-limit, $this-offset, $this-searchingEverything() ); + return LuceneSearchSet::newFromQuery( 'search', $term, $this-namespaces, + $this-limit, $this-offset, $this-searchingEverything() ); } /** @@ -61,7 +61,7 @@ * @access private */ function replacePrefixes( $query ) { - global $wgContLang, $wgLuceneUseRelated; + global $wgContLang; wfProfileIn( __METHOD__ ); // quick check, most of the time we don't need any rewriting @@ -72,15 +72,6 @@ // search everything keyword $allkeyword = wfMessage('searchall')-inContentLanguage()-text(); - - // check if this is query for related articles - $relatedkey = wfMessage('searchrelated')-inContentLanguage()-text() . ':'; - if($wgLuceneUseRelated strncmp($query, $relatedkey, strlen($relatedkey)) == 0){ - $this-related = true; - list($dummy,$ret) = explode(:,$query,2); - wfProfileOut( __METHOD__ ); - return trim($ret); - } global $wgCanonicalNamespaceNames, $wgNamespaceAliases; $nsNamesRaw = array_merge($wgContLang-getNamespaces(), $wgCanonicalNamespaceNames, @@ -408,11 +399,6 @@ if( is_null($this-mSize) ) return parent::getByteSize(); return $this-mSize; - } - - function hasRelated(){ - global $wgLuceneSearchVersion, $wgLuceneUseRelated; - return $wgLuceneSearchVersion = 2.1 $wgLuceneUseRelated; } } -- To view, visit https://gerrit.wikimedia.org/r/160019 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If98096f32d8efbe3388b988ed48eff1947c9d2e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MWSearch Gerrit-Branch: master Gerrit-Owner: Chad ch...@wikimedia.org Gerrit-Reviewer: Chad ch...@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 sure event handlers are set up even if onready handler ... - change (mediawiki...MultimediaViewer)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/160028 Change subject: Make sure event handlers are set up even if onready handler is lost .. Make sure event handlers are set up even if onready handler is lost Due to a jQuery bug, errors in local code (gadgets, user scripts) can cause onready handlers to not be executed. For MMV this causes catastrophic failure, with a black screen of death on exit. This change makes sure that the setup code necessary for Media Viewer to work is executed at latest when MV is loaded, even if some onready handlers were skipped. Opening MediaViewer via a hash-URL will still not work if the onready handler fails, but that's hard to avoid and it is not a catastrophic failure anymore. This change can be reverted when bug 70772 gets fixed. Bug: 70756 Change-Id: Ida3b780791bc9dfec29303567d33e3aa4f44dd81 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/891 --- M resources/mmv/mmv.bootstrap.js 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/28/160028/1 diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js index 9b9898f..55efd89 100644 --- a/resources/mmv/mmv.bootstrap.js +++ b/resources/mmv/mmv.bootstrap.js @@ -83,6 +83,9 @@ return deferred.reject(); } + // event handlers should have been set up by now, but due to bug 70756 there is no guarantee + this.setupEventHandlers(); + bs.setupOverlay(); mw.loader.using( 'mmv', function() { @@ -395,6 +398,13 @@ MMVB.setupEventHandlers = function () { var self = this; + if ( this.eventHandlersHaveBeenSetUp ) { + // don't set up twice, we need to call the setup multiple times due to bug 70756 + return; + } + /** @property {boolean} eventHandlersHaveBeenSetUp tracks domready event handler state to avoid setting up twice */ + this.eventHandlersHaveBeenSetUp = true; + $( window ).on( this.browserHistory this.browserHistory.pushState ? 'popstate.mmvb' : 'hashchange', function () { self.hash(); } ); @@ -415,6 +425,7 @@ MMVB.cleanupEventHandlers = function () { $( window ).off( 'hashchange popstate.mmvb' ); $( document ).off( 'mmv-hash' ); + this.eventHandlersHaveBeenSetUp = false; }; /** -- To view, visit https://gerrit.wikimedia.org/r/160028 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida3b780791bc9dfec29303567d33e3aa4f44dd81 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename some constants to clarify their meaning and purpose - change (operations/mediawiki-config)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/160029 Change subject: Rename some constants to clarify their meaning and purpose .. Rename some constants to clarify their meaning and purpose * MULTIVER_COMMON_APACHE = MEDIAWIKI_DEPLOYMENT_DIR. * MULTIVER_COMMON_HOME = MEDIAWIKI_STAGING_DIR. * Also delete MULTIVER_404SCRIPT_PATH_HOME MULTIVER_404SCRIPT_PATH_APACHE. Change-Id: I4e41872854e9e8c536b4d353f4e3f4b55313278d --- M multiversion/MWMultiVersion.php M multiversion/MWVersion.php M multiversion/activeMWVersions.php M multiversion/checkoutMediaWiki.php M multiversion/defines.php M multiversion/deleteMediaWiki M multiversion/getMWVersion.php M multiversion/refreshWikiversionsCDB M multiversion/updateBranchPointers M multiversion/updateWikiversions.php 10 files changed, 40 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/29/160029/1 diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php index 0894e09..03c9165 100644 --- a/multiversion/MWMultiVersion.php +++ b/multiversion/MWMultiVersion.php @@ -276,7 +276,7 @@ $this-versionLoaded = true; $cdbFilename = getRealmSpecificFilename( - MULTIVER_COMMON_APACHE . '/wikiversions.cdb' + MEDIAWIKI_DEPLOYMENT_DIR . '/wikiversions.cdb' ); try { @@ -302,7 +302,7 @@ */ private function assertNotMissing() { $cdbFilename = getRealmSpecificFilename( - MULTIVER_COMMON_APACHE . '/wikiversions.cdb' + MEDIAWIKI_DEPLOYMENT_DIR . '/wikiversions.cdb' ); if ( $this-isMissing() ) { self::error( $cdbFilename has no version entry for `{$this-db}`.\n ); diff --git a/multiversion/MWVersion.php b/multiversion/MWVersion.php index 1b23c60..8c5dcae 100644 --- a/multiversion/MWVersion.php +++ b/multiversion/MWVersion.php @@ -37,7 +37,7 @@ # Wiki doesn't exist yet? if ( $multiVersion-isMissing() ) { header( Cache-control: no-cache ); // same hack as CommonSettings.php - include( MULTIVER_404SCRIPT_PATH_APACHE ); + include( MEDIAWIKI_DEPLOYMENT_DIR . '/wmf-config/missing.php' ); exit; } @@ -45,7 +45,7 @@ $version = $multiVersion-getVersion(); # Get the correct MediaWiki path based on this version... - $IP = MULTIVER_COMMON_APACHE . /$version; + $IP = MEDIAWIKI_DEPLOYMENT_DIR . /$version; chdir( $IP ); putenv( MW_INSTALL_PATH=$IP ); diff --git a/multiversion/activeMWVersions.php b/multiversion/activeMWVersions.php index 74547d7..676b165 100644 --- a/multiversion/activeMWVersions.php +++ b/multiversion/activeMWVersions.php @@ -22,9 +22,9 @@ array_shift( $options ); // first item is this file if ( in_array( '--home', $options ) ) { - $jsonPath = getRealmSpecificFilename( MULTIVER_COMMON_HOME . '/wikiversions.json' ); + $jsonPath = getRealmSpecificFilename( MEDIAWIKI_STAGING_DIR . '/wikiversions.json' ); } else { - $jsonPath = getRealmSpecificFilename( MULTIVER_COMMON_APACHE . '/wikiversions.json' ); + $jsonPath = getRealmSpecificFilename( MEDIAWIKI_DEPLOYMENT_DIR . '/wikiversions.json' ); } # Get all the wikiversion rows in wikiversions.json... diff --git a/multiversion/checkoutMediaWiki.php b/multiversion/checkoutMediaWiki.php index 6dd5f38..9da45cc 100644 --- a/multiversion/checkoutMediaWiki.php +++ b/multiversion/checkoutMediaWiki.php @@ -36,7 +36,7 @@ } # MW install path - $destIP = MULTIVER_COMMON_HOME . /$dstVersion; + $destIP = MEDIAWIKI_STAGING_DIR . /$dstVersion; if ( !file_exists( $destIP ) ) { passthru( 'git clone -n ' . @@ -114,37 +114,37 @@ createSymlink( $path, $link, Created StartProfiler.php symlink. ); # Create static- symlinks for bits.wikimedia.org... - $bitsStaticDir = MULTIVER_COMMON_HOME . /docroot/bits/static-$dstVersionNum; + $bitsStaticDir = MEDIAWIKI_STAGING_DIR . /docroot/bits/static-$dstVersionNum; if ( !file_exists( $bitsStaticDir ) ) { mkdir( $bitsStaticDir, 0775 ); } - $path = MULTIVER_COMMON_HOME . /docroot/bits/static-$dstVersionNum/skins; - $link = MULTIVER_COMMON_APACHE . /php-$dstVersionNum/skins/; + $path = MEDIAWIKI_STAGING_DIR . /docroot/bits/static-$dstVersionNum/skins; + $link = MEDIAWIKI_DEPLOYMENT_DIR . /php-$dstVersionNum/skins/; createSymlink( $path, $link, Created bits/static-$dstVersionNum/skins symlink. ); - $path = MULTIVER_COMMON_HOME . /docroot/bits/static-$dstVersionNum/extensions; - $link =
[MediaWiki-commits] [Gerrit] API: Fix list=allusers with multiple values for augroup - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: API: Fix list=allusers with multiple values for augroup .. API: Fix list=allusers with multiple values for augroup The existing query only works with a single value for augroup, or mostly if it's combined with auprop=groups or auprop=rights (since most users don't have every possible group). When used with multiple values for augroup, it will raise an error if it happens to encounter enough users who have more than one of the specified groups. And further, it will lead to repeated groups for these users if combined with auprop=groups or auprop=rights. To avoid both these issues, let's use EXISTS instead of a JOIN to test augroup. While auexcludegroup doesn't have this problem, we may as well make the same change there, too. And doing that, there's no reason to continue with an error when both augroup and auexcludegroup are used. Bug: 70496 Change-Id: Ia7086ce87012c22651ac4c7a3f75558347276226 --- M includes/api/ApiQueryAllUsers.php 1 file changed, 6 insertions(+), 23 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index dfef286..c12f6bd 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -111,35 +111,18 @@ } } - if ( !is_null( $params['group'] ) !is_null( $params['excludegroup'] ) ) { - $this-dieUsage( 'group and excludegroup cannot be used together', 'group-excludegroup' ); - } - if ( !is_null( $params['group'] ) count( $params['group'] ) ) { - $useIndex = false; // Filter only users that belong to a given group - $this-addTables( 'user_groups', 'ug1' ); - $this-addJoinConds( array( 'ug1' = array( 'INNER JOIN', array( 'ug1.ug_user=user_id', - 'ug1.ug_group' = $params['group'] ) ) ) ); + $this-addWhere( 'EXISTS (' . $db-selectSQLText( + 'user_groups', '1', array( 'ug_user=user_id', 'ug_group' = $params['group'] ) + ) . ')' ); } if ( !is_null( $params['excludegroup'] ) count( $params['excludegroup'] ) ) { - $useIndex = false; // Filter only users don't belong to a given group - $this-addTables( 'user_groups', 'ug1' ); - - if ( count( $params['excludegroup'] ) == 1 ) { - $exclude = array( 'ug1.ug_group' = $params['excludegroup'][0] ); - } else { - $exclude = array( $db-makeList( - array( 'ug1.ug_group' = $params['excludegroup'] ), - LIST_OR - ) ); - } - $this-addJoinConds( array( 'ug1' = array( 'LEFT OUTER JOIN', - array_merge( array( 'ug1.ug_user=user_id' ), $exclude ) - ) ) ); - $this-addWhere( 'ug1.ug_user IS NULL' ); + $this-addWhere( 'NOT EXISTS (' . $db-selectSQLText( + 'user_groups', '1', array( 'ug_user=user_id', 'ug_group' = $params['excludegroup'] ) + ) . ')' ); } if ( $params['witheditsonly'] ) { -- To view, visit https://gerrit.wikimedia.org/r/158889 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia7086ce87012c22651ac4c7a3f75558347276226 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Springle sprin...@wikimedia.org Gerrit-Reviewer: Yurik yu...@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 protoproxy::localssl default_server and server_name para... - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/160030 Change subject: Add protoproxy::localssl default_server and server_name parameters .. Add protoproxy::localssl default_server and server_name parameters default_server allows setting this server as the default server, e.g. as fallback for SNI. server_name allows a custom server name to be set, e.g. used for SNI server selection. Change-Id: Ia2115f2540b261d56221c60fd9b245ee732a832b --- M modules/protoproxy/manifests/localssl.pp M modules/protoproxy/templates/localssl.erb 2 files changed, 15 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/30/160030/1 diff --git a/modules/protoproxy/manifests/localssl.pp b/modules/protoproxy/manifests/localssl.pp index 09a6817..6dc8944 100644 --- a/modules/protoproxy/manifests/localssl.pp +++ b/modules/protoproxy/manifests/localssl.pp @@ -3,16 +3,26 @@ # This definition creates a SSL proxy to localhost, using an Nginx site. # # === Parameters: +# [*server_name*] +# Server name, used e.g. for SNI. Defaults to $::fqdn +# # [*proxy_server_cert_name*] # # [*upstream_port*] # TCP port to proxy to. Defaults to '80' # +# [*default_server*] +# Boolean. Adds the 'default_server' option to the listen statement. +# +# [*enabled*] +# Boolean. Whether the site is enabled in the nginx sites-enabled directory. define protoproxy::localssl( +$server_name= $::fqdn, $proxy_server_cert_name, -$enabled = true, -$upstream_port = '80' +$default_server = false, +$enabled= true, +$upstream_port = '80' ) { # TEMP migration nginx::site { 'localssl': diff --git a/modules/protoproxy/templates/localssl.erb b/modules/protoproxy/templates/localssl.erb index eb16b19..3702c24 100644 --- a/modules/protoproxy/templates/localssl.erb +++ b/modules/protoproxy/templates/localssl.erb @@ -3,10 +3,10 @@ # SSL proxying server { - listen [::]:443 ssl ipv6only=on; - listen 443 ssl; + listen [::]:443 %= @default_server ? default_server : %ssl ipv6only=on; + listen 443 %= @default_server ? default_server : %ssl; ssl on; - server_name %= @fqdn %; + server_name %= @server_name %; error_log /var/log/nginx/%= @name %.error.log; access_log off; -- To view, visit https://gerrit.wikimedia.org/r/160030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2115f2540b261d56221c60fd9b245ee732a832b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Speed up admin script by adding an index - change (analytics/wikimetrics)
Milimetric has uploaded a new change for review. https://gerrit.wikimedia.org/r/160031 Change subject: Speed up admin script by adding an index .. Speed up admin script by adding an index Bug: 70775 Change-Id: Id5489291455243f604e316db83f106f0578720d5 --- A database_migrations/versions/1ba1b62367d4_add_index_on_reports_recurrent.py M scripts/admin 2 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/31/160031/1 diff --git a/database_migrations/versions/1ba1b62367d4_add_index_on_reports_recurrent.py b/database_migrations/versions/1ba1b62367d4_add_index_on_reports_recurrent.py new file mode 100644 index 000..a1e96da --- /dev/null +++ b/database_migrations/versions/1ba1b62367d4_add_index_on_reports_recurrent.py @@ -0,0 +1,25 @@ +Add index on reports.recurrent + +Revision ID: 1ba1b62367d4 +Revises: 2f1dcf6b94a9 +Create Date: 2014-09-12 13:16:20.754399 + + + +# revision identifiers, used by Alembic. +revision = '1ba1b62367d4' +down_revision = '2f1dcf6b94a9' + +from alembic import op + + +def upgrade(): +op.create_index( +'ix_report_recurrent', +'report', +['recurrent'] +) + + +def downgrade(): +op.drop_index('ix_report_recurrent', 'report') diff --git a/scripts/admin b/scripts/admin index 03adb20..2d5a244 100755 --- a/scripts/admin +++ b/scripts/admin @@ -384,6 +384,7 @@ ) # Do not create duplicate reports (we can add an option to force later) existing = session.query(ReportStore)\ +.filter(ReportStore.recurrent == 1)\ .filter(ReportStore.name == parameters['name'])\ .filter(ReportStore.user_id == args.user.id)\ .count() -- To view, visit https://gerrit.wikimedia.org/r/160031 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id5489291455243f604e316db83f106f0578720d5 Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikimetrics Gerrit-Branch: master Gerrit-Owner: Milimetric dandree...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove unused dns_auth LVS defs - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160032 Change subject: Remove unused dns_auth LVS defs .. Remove unused dns_auth LVS defs Change-Id: If990c86211612aade234a009262776d66dc4cb8a --- M modules/lvs/manifests/configuration.pp 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/32/160032/1 diff --git a/modules/lvs/manifests/configuration.pp b/modules/lvs/manifests/configuration.pp index ff75089..84a34e9 100644 --- a/modules/lvs/manifests/configuration.pp +++ b/modules/lvs/manifests/configuration.pp @@ -257,10 +257,6 @@ 'swift' = { 'eqiad' = 10.2.2.27, }, -'dns_auth' = { -'pmtpa' = 208.80.152.214, -'eqiad' = 208.80.154.238, -}, 'dns_rec' = { 'eqiad' = { 'dns_rec' = 208.80.154.239, 'dns_rec6' = 2620:0:861:ed1a::f }, }, @@ -312,7 +308,6 @@ 'search_pool1' = {}, 'search_pool2' = {}, 'search_pool3' = {}, -'dns_auth' = {}, 'dns_rec' = {}, 'https' = {}, 'misc_web' = {}, -- To view, visit https://gerrit.wikimedia.org/r/160032 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If990c86211612aade234a009262776d66dc4cb8a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove unused dns_auth LVS defs - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Remove unused dns_auth LVS defs .. Remove unused dns_auth LVS defs Change-Id: If990c86211612aade234a009262776d66dc4cb8a --- M modules/lvs/manifests/configuration.pp 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/lvs/manifests/configuration.pp b/modules/lvs/manifests/configuration.pp index ff75089..84a34e9 100644 --- a/modules/lvs/manifests/configuration.pp +++ b/modules/lvs/manifests/configuration.pp @@ -257,10 +257,6 @@ 'swift' = { 'eqiad' = 10.2.2.27, }, -'dns_auth' = { -'pmtpa' = 208.80.152.214, -'eqiad' = 208.80.154.238, -}, 'dns_rec' = { 'eqiad' = { 'dns_rec' = 208.80.154.239, 'dns_rec6' = 2620:0:861:ed1a::f }, }, @@ -312,7 +308,6 @@ 'search_pool1' = {}, 'search_pool2' = {}, 'search_pool3' = {}, -'dns_auth' = {}, 'dns_rec' = {}, 'https' = {}, 'misc_web' = {}, -- To view, visit https://gerrit.wikimedia.org/r/160032 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If990c86211612aade234a009262776d66dc4cb8a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename some constants to clarify their meaning and purpose - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Rename some constants to clarify their meaning and purpose .. Rename some constants to clarify their meaning and purpose * MULTIVER_COMMON_APACHE = MEDIAWIKI_DEPLOYMENT_DIR. * MULTIVER_COMMON_HOME = MEDIAWIKI_STAGING_DIR. * Also delete MULTIVER_404SCRIPT_PATH_HOME MULTIVER_404SCRIPT_PATH_APACHE. * Renamed activeMWVersions.php's '--home' arg to '--staging', but added code to support the old name. Change-Id: I4e41872854e9e8c536b4d353f4e3f4b55313278d --- M logmsg-git-hook M multiversion/MWMultiVersion.php M multiversion/MWVersion.php M multiversion/activeMWVersions.php M multiversion/checkoutMediaWiki.php M multiversion/defines.php M multiversion/deleteMediaWiki M multiversion/getMWVersion.php M multiversion/refreshWikiversionsCDB M multiversion/updateBranchPointers M multiversion/updateWikiversions.php 11 files changed, 48 insertions(+), 51 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/logmsg-git-hook b/logmsg-git-hook index 42a6721..3bd2de8 100755 --- a/logmsg-git-hook +++ b/logmsg-git-hook @@ -3,8 +3,8 @@ # Script to log repository modification on deployment hosts, so we have some # notion of what each sync and scap in the log pushed out. -# If invoked with --install, configure the hook for /a/common and its php-* -# subdirectories. +# If invoked with --install, configure the hook for MediaWiki's staging dir +# and its php-* subdirectories. [[ $1 == --install ]] { . /usr/local/lib/mw-deployment-vars.sh diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php index 0894e09..f3aec00 100644 --- a/multiversion/MWMultiVersion.php +++ b/multiversion/MWMultiVersion.php @@ -249,7 +249,7 @@ * Handler for the wfShellMaintenanceCmd hook. * This converts shell commands like php $IP/maintenance/foo.php into * commands that use the MWScript.php wrapper, for example: -* php /a/common/multiversion/MWScript.php maintenance/foo.php +* php /srv/mediawiki-staging/multiversion/MWScript.php maintenance/foo.php * * @param $script string * @param $params Array @@ -276,7 +276,7 @@ $this-versionLoaded = true; $cdbFilename = getRealmSpecificFilename( - MULTIVER_COMMON_APACHE . '/wikiversions.cdb' + MEDIAWIKI_DEPLOYMENT_DIR . '/wikiversions.cdb' ); try { @@ -302,7 +302,7 @@ */ private function assertNotMissing() { $cdbFilename = getRealmSpecificFilename( - MULTIVER_COMMON_APACHE . '/wikiversions.cdb' + MEDIAWIKI_DEPLOYMENT_DIR . '/wikiversions.cdb' ); if ( $this-isMissing() ) { self::error( $cdbFilename has no version entry for `{$this-db}`.\n ); diff --git a/multiversion/MWVersion.php b/multiversion/MWVersion.php index 1b23c60..8c5dcae 100644 --- a/multiversion/MWVersion.php +++ b/multiversion/MWVersion.php @@ -37,7 +37,7 @@ # Wiki doesn't exist yet? if ( $multiVersion-isMissing() ) { header( Cache-control: no-cache ); // same hack as CommonSettings.php - include( MULTIVER_404SCRIPT_PATH_APACHE ); + include( MEDIAWIKI_DEPLOYMENT_DIR . '/wmf-config/missing.php' ); exit; } @@ -45,7 +45,7 @@ $version = $multiVersion-getVersion(); # Get the correct MediaWiki path based on this version... - $IP = MULTIVER_COMMON_APACHE . /$version; + $IP = MEDIAWIKI_DEPLOYMENT_DIR . /$version; chdir( $IP ); putenv( MW_INSTALL_PATH=$IP ); diff --git a/multiversion/activeMWVersions.php b/multiversion/activeMWVersions.php index 74547d7..57e25e4 100644 --- a/multiversion/activeMWVersions.php +++ b/multiversion/activeMWVersions.php @@ -9,7 +9,7 @@ * Returns an array of all active MW versions (e.g. x.xx). * Versions are read from /srv/mediawiki/wikiversions.json. * - * Given --home, versions are instead read from /a/common/wikiversions.json. + * Given --staging, versions are instead read from MEDIAWIKI_STAGING_DIR. * Given --withdb, each item in the list will be appended with '=' followed by * the DB name of *some* wiki that uses that version. Used to run maintenance scripts. * Given --report, error messages would be displayed if this dies. @@ -18,13 +18,13 @@ */ function getActiveWikiVersions() { global $argv; - $options = $argv; // copy + $options = str_replace( '--home', '--staging', $argv ); // accept '--home' as an alias for '--staging', for back-compat. array_shift( $options ); // first item is this file - if ( in_array( '--home', $options ) ) { - $jsonPath = getRealmSpecificFilename(
[MediaWiki-commits] [Gerrit] Strip empty tr/li nodes from template/extension content - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Strip empty tr/li nodes from template/extension content .. Strip empty tr/li nodes from template/extension content * Empty nodes from top-level content is left untouched. * If there are additional nodes we want to strip, we can add them later, but list and table rows seem to be the most common ones during RT and rendering tests. * Added parser tests. One of these fails html2wt (and hence html2html) modes because our serializer does't discards new empty tr-rows it appears. * Verified that http://localhost:8000/itwiki/Luna has the empty rows stripped in its infobox. Change-Id: I5c82c879240ef5a52e99c572bdab7fc2298545db --- A lib/dom.stripEmptyElements.js M lib/mediawiki.DOMPostProcessor.js M tests/parserTests-blacklist.js M tests/parserTests.txt 4 files changed, 124 insertions(+), 0 deletions(-) Approvals: Arlolra: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/dom.stripEmptyElements.js b/lib/dom.stripEmptyElements.js new file mode 100644 index 000..4ec6699 --- /dev/null +++ b/lib/dom.stripEmptyElements.js @@ -0,0 +1,45 @@ +use strict; + +var DU = require('./mediawiki.DOMUtils.js').DOMUtils; + +function stripEmptyElements(node, env, options, atTopLevel, tplInfo) { + // Dont bother with this on sub-pipelines + if (!atTopLevel) { + return; + } + + var c = node.firstChild; + while (c) { + var next = c.nextSibling; + + if (DU.isElt(c)) { + // Identify template/extension content + if (DU.isTplOrExtToplevelNode(env, c)) { + var about = c.getAttribute('about'); + tplInfo = { first: c, last: DU.getAboutSiblings(c, about).last() }; + } + + // Process subtree first + stripEmptyElements(c, env, options, atTopLevel, tplInfo); + + // Delete empty tr-rows and li-nodes from template content + // Cannot delete the first node that carries the typeof. + if (tplInfo) { + if (!c.firstChild c.nodeName in {'TR':1, 'LI':1} c !== tplInfo.first) { + DU.deleteNode(c); + } + + // Clear tpl info + if (c === tplInfo.last) { + tplInfo = null; + } + } + } + + c = next; + } +} + +if (typeof module === object) { + module.exports.stripEmptyElements = stripEmptyElements; +} diff --git a/lib/mediawiki.DOMPostProcessor.js b/lib/mediawiki.DOMPostProcessor.js index b20c8bf..636017c 100644 --- a/lib/mediawiki.DOMPostProcessor.js +++ b/lib/mediawiki.DOMPostProcessor.js @@ -26,6 +26,7 @@ stripMarkerMetas = CleanUp.stripMarkerMetas, unpackDOMFragments = require('./dom.t.unpackDOMFragments.js').unpackDOMFragments, wrapTemplates = require('./dom.wrapTemplates.js').wrapTemplates, + stripEmptyElements = require('./dom.stripEmptyElements.js').stripEmptyElements, lintWikitextFixup = require('./dom.linter.js').logWikitextFixups; // map from mediawiki metadata names to RDFa property names @@ -187,6 +188,9 @@ this.processors.push(processRefs.bind(null, env.conf.parsoid.nativeExtensions.cite.references)); + // Strip empty elements from template content + this.processors.push(stripEmptyElements); + if (env.conf.parsoid.linting) { this.processors.push(lintWikitextFixup); } diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js index f4f0eed..0185852 100644 --- a/tests/parserTests-blacklist.js +++ b/tests/parserTests-blacklist.js @@ -937,6 +937,7 @@ add(html2html, Ref: 8. transclusion wikitext has lower precedence, p data-parsoid='{\dsr\:[0,47,0,0]}'A span about=\#mwt2\ class=\reference\ data-mw='{\name\:\ref\,\body\:{\html\:\foo lt;span typeof=\\\mw:Nowiki\\\ data-parsoid=#39;{\\\src\\\:\\\{{\\\,\\\dsr\\\:[11,13,0,0]}#39;{{lt;/spanecho|\},\attrs\:{}}' id=\cite_ref-1-0\ rel=\dc:references\ typeof=\mw:Extension/ref\ data-parsoid='{\src\:\lt;reffoo {{echo|lt;/ref\,\dsr\:[2,24,5,6]}'a href=\#cite_note-1\ data-parsoid=\{}\[1]/a/span B Cspan typeof=\mw:Nowiki\ data-parsoid='{\dsr\:[28,47,8,9]}'}}/span/p\nol class=\references\ typeof=\mw:Extension/references\ about=\#mwt4\ data-parsoid='{\src\:\lt;references /\,\dsr\:[48,62,2,2]}' data-mw='{\name\:\references\,\attrs\:{}}'li about=\#cite_note-1\ id=\cite_note-1\ data-parsoid=\{}\span rel=\mw:referencedBy\ data-parsoid=\{}\a href=\#cite_ref-1-0\ data-parsoid=\{}\↑/a/span foo span
[MediaWiki-commits] [Gerrit] Removed deprecated BagOStuff::replace() method - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Removed deprecated BagOStuff::replace() method .. Removed deprecated BagOStuff::replace() method Change-Id: Ife2f8e0f10ad7be76b79d5aee435491ea78d4655 --- M includes/objectcache/BagOStuff.php 1 file changed, 0 insertions(+), 15 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/objectcache/BagOStuff.php b/includes/objectcache/BagOStuff.php index 6f8f9af..1978c3e 100644 --- a/includes/objectcache/BagOStuff.php +++ b/includes/objectcache/BagOStuff.php @@ -278,21 +278,6 @@ } /** -* @param string $key -* @param mixed $value -* @param int $exptime -* @return bool Success -* @deprecated since 1.23 -*/ - public function replace( $key, $value, $exptime = 0 ) { - wfDeprecated( __METHOD__, '1.23' ); - if ( $this-get( $key ) !== false ) { - return $this-set( $key, $value, $exptime ); - } - return false; // key not already set - } - - /** * Increase stored value of $key by $value while preserving its TTL * @param string $key Key to increase * @param int $value Value to add to $key (Default 1) -- To view, visit https://gerrit.wikimedia.org/r/159986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife2f8e0f10ad7be76b79d5aee435491ea78d4655 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Chad ch...@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] Emit more position events - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/160034 Change subject: Emit more position events .. Emit more position events Emit position events after * Model transaction updates * Slug expansion (as well as collapse) Now Focusable/ResizeableNode can just listen to 'position'. Change-Id: I98e0559a993620f057e6036bfd8f6a21bf59e788 --- M src/ce/ve.ce.FocusableNode.js M src/ce/ve.ce.ResizableNode.js M src/ce/ve.ce.Surface.js M src/ce/ve.ce.SurfaceObserver.js 4 files changed, 19 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/34/160034/1 diff --git a/src/ce/ve.ce.FocusableNode.js b/src/ce/ve.ce.FocusableNode.js index 4d2eb87..6e795f9 100644 --- a/src/ce/ve.ce.FocusableNode.js +++ b/src/ce/ve.ce.FocusableNode.js @@ -361,7 +361,6 @@ 'mouseout.ve-ce-focusableNode': ve.bind( this.onSurfaceMouseOut, this ) } ); } - this.surface.getModel().getDocument().connect( this, { transact: 'positionHighlights' } ); this.surface.connect( this, { position: 'positionHighlights' } ); }; @@ -376,7 +375,6 @@ } this.$highlights.remove().empty(); this.surface.$element.off( '.ve-ce-focusableNode' ); - this.surface.getModel().getDocument().disconnect( this, { transact: 'positionHighlights' } ); this.surface.disconnect( this, { position: 'positionHighlights' } ); this.highlighted = false; this.boundingRect = null; diff --git a/src/ce/ve.ce.ResizableNode.js b/src/ce/ve.ce.ResizableNode.js index fd11d73..dfcdf44 100644 --- a/src/ce/ve.ce.ResizableNode.js +++ b/src/ce/ve.ce.ResizableNode.js @@ -210,14 +210,13 @@ * @method */ ve.ce.ResizableNode.prototype.onResizableFocus = function () { - var surface = this.getRoot().getSurface(), - documentModel = surface.getModel().getDocument(); + var surface = this.getRoot().getSurface(); if ( this.$sizeLabel ) { // Attach the size label first so it doesn't mask the resize handles - this.$sizeLabel.appendTo( this.root.getSurface().getSurface().$controls ); + this.$sizeLabel.appendTo( surface.getSurface().$controls ); } - this.$resizeHandles.appendTo( this.root.getSurface().getSurface().$controls ); + this.$resizeHandles.appendTo( surface.getSurface().$controls ); // Call getScalable to pre-fetch the extended data this.model.getScalable(); @@ -244,7 +243,6 @@ ve.bind( this.onResizeHandlesCornerMouseDown, this ) ); - documentModel.connect( this, { transact: 'setResizableHandlesSizeAndPosition' } ); surface.connect( this, { position: 'setResizableHandlesSizeAndPosition' } ); }; @@ -260,15 +258,13 @@ return; } - var surface = this.getRoot().getSurface(), - documentModel = surface.getModel().getDocument(); + var surface = this.getRoot().getSurface(); this.$resizeHandles.detach(); if ( this.$sizeLabel ) { this.$sizeLabel.detach(); } - documentModel.disconnect( this, { transact: 'setResizableHandlesSizeAndPosition' } ); surface.disconnect( this, { position: 'setResizableHandlesSizeAndPosition' } ); }; diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js index 3e8e2e7..96a444f 100644 --- a/src/ce/ve.ce.Surface.js +++ b/src/ce/ve.ce.Surface.js @@ -1556,6 +1556,7 @@ } // Update the state of the SurfaceObserver this.surfaceObserver.pollOnceNoEmit(); + this.emit( 'position' ); }; /** diff --git a/src/ce/ve.ce.SurfaceObserver.js b/src/ce/ve.ce.SurfaceObserver.js index deee9ed..797e63d 100644 --- a/src/ce/ve.ce.SurfaceObserver.js +++ b/src/ce/ve.ce.SurfaceObserver.js @@ -174,7 +174,9 @@ * @fires selectionChange */ ve.ce.SurfaceObserver.prototype.pollOnceInternal = function ( emitChanges ) { - var $nodeOrSlug, node, text, hash, range, domRange, $slugWrapper, observer = this; + var $nodeOrSlug, node, text, hash, range, domRange, $slugWrapper, + slugChange = false, + observer = this; if ( !this.domDocument ) { return; @@ -207,18 +209,23 @@ .addClass( 've-ce-branchNode-blockSlugWrapper-unfocused' ) .removeClass( 've-ce-branchNode-blockSlugWrapper-focused' ); this.$slugWrapper = null; - // Emit 'position' on the surface view after the animation completes - this.setTimeout( function () { - if ( observer.documentView ) { - observer.documentView.documentNode.surface.emit( 'position' ); - }
[MediaWiki-commits] [Gerrit] Add protoproxy::localssl default_server and server_name para... - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add protoproxy::localssl default_server and server_name parameters .. Add protoproxy::localssl default_server and server_name parameters default_server allows setting this server as the default server, e.g. as fallback for SNI. server_name allows a custom server name to be set, e.g. used for SNI server selection. Also enables default_server in role::cache::ssl Change-Id: Ia2115f2540b261d56221c60fd9b245ee732a832b --- M manifests/role/cache.pp M modules/protoproxy/manifests/localssl.pp M modules/protoproxy/templates/localssl.erb 3 files changed, 16 insertions(+), 5 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 8336efd..9528c75 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -599,6 +599,7 @@ protoproxy::localssl { $sitename: proxy_server_cert_name = $certname, upstream_port = '80', +default_server = true, enabled= true, } } diff --git a/modules/protoproxy/manifests/localssl.pp b/modules/protoproxy/manifests/localssl.pp index 09a6817..6dc8944 100644 --- a/modules/protoproxy/manifests/localssl.pp +++ b/modules/protoproxy/manifests/localssl.pp @@ -3,16 +3,26 @@ # This definition creates a SSL proxy to localhost, using an Nginx site. # # === Parameters: +# [*server_name*] +# Server name, used e.g. for SNI. Defaults to $::fqdn +# # [*proxy_server_cert_name*] # # [*upstream_port*] # TCP port to proxy to. Defaults to '80' # +# [*default_server*] +# Boolean. Adds the 'default_server' option to the listen statement. +# +# [*enabled*] +# Boolean. Whether the site is enabled in the nginx sites-enabled directory. define protoproxy::localssl( +$server_name= $::fqdn, $proxy_server_cert_name, -$enabled = true, -$upstream_port = '80' +$default_server = false, +$enabled= true, +$upstream_port = '80' ) { # TEMP migration nginx::site { 'localssl': diff --git a/modules/protoproxy/templates/localssl.erb b/modules/protoproxy/templates/localssl.erb index eb16b19..3702c24 100644 --- a/modules/protoproxy/templates/localssl.erb +++ b/modules/protoproxy/templates/localssl.erb @@ -3,10 +3,10 @@ # SSL proxying server { - listen [::]:443 ssl ipv6only=on; - listen 443 ssl; + listen [::]:443 %= @default_server ? default_server : %ssl ipv6only=on; + listen 443 %= @default_server ? default_server : %ssl; ssl on; - server_name %= @fqdn %; + server_name %= @server_name %; error_log /var/log/nginx/%= @name %.error.log; access_log off; -- To view, visit https://gerrit.wikimedia.org/r/160030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2115f2540b261d56221c60fd9b245ee732a832b Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org Gerrit-Reviewer: Rush r...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Insert section name in edit summary - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Insert section name in edit summary .. Insert section name in edit summary To be consistent with desktop and app edits, add the section name to the summary automatically when the user saves an edit. Bug: 60134 Change-Id: Iebecb63f9c8766eaa06ea5b7c8d98c26931c4a57 --- M javascripts/modules/editor/EditorApi.js M javascripts/modules/editor/EditorOverlay.js 2 files changed, 17 insertions(+), 4 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/modules/editor/EditorApi.js b/javascripts/modules/editor/EditorApi.js index aa7cb4c..e1eb1b4 100644 --- a/javascripts/modules/editor/EditorApi.js +++ b/javascripts/modules/editor/EditorApi.js @@ -173,7 +173,7 @@ }, getPreview: function( options ) { - var result = $.Deferred(); + var result = $.Deferred(), sectionLine = '', self = this; $.extend( options, { action: 'parse', @@ -184,12 +184,19 @@ // Output mobile HTML (bug 54243) mobileformat: true, title: this.title, - prop: 'text' + prop: ['text', 'sections'] } ); this.post( options ).done( function( resp ) { if ( resp resp.parse resp.parse.text ) { - result.resolve( resp.parse.text['*'] ); + // section 0 haven't a section name so skip + if ( self.sectionId !== 0 + resp.parse.sections + resp.parse.sections[0].line !== undefined + ) { + sectionLine = resp.parse.sections[0].line; + } + result.resolve( resp.parse.text['*'], sectionLine ); } else { result.reject(); } diff --git a/javascripts/modules/editor/EditorOverlay.js b/javascripts/modules/editor/EditorOverlay.js index ff123bd..b303c3f 100644 --- a/javascripts/modules/editor/EditorOverlay.js +++ b/javascripts/modules/editor/EditorOverlay.js @@ -20,6 +20,7 @@ content: M.template.get( 'modules/editor/EditorOverlay.hogan' ) }, editor: 'SourceEditor', + sectionLine: '', initialize: function( options ) { this.api = new EditorApi( { @@ -134,7 +135,9 @@ if ( mw.config.get( 'wgIsMainPage' ) ) { params.mainpage = 1; // Setting it to 0 will have the same effect } - this.api.getPreview( params ).done( function( parsedText ) { + this.api.getPreview( params ).done( function( parsedText, parsedSectionLine ) { + // On desktop edit summaries strip tags. Mimic this behavior on mobile devices + self.sectionLine = $( 'div/' ).html( parsedSectionLine ).text(); new Section( { el: self.$preview, content: parsedText @@ -225,6 +228,9 @@ var self = this, options = { summary: this.$( '.summary' ).val() }; + if ( self.sectionLine !== '' ) { + options.summary = '/* ' + self.sectionLine + ' */' + options.summary; + } this._super(); if ( this.confirmAborted ) { return; -- To view, visit https://gerrit.wikimedia.org/r/135311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iebecb63f9c8766eaa06ea5b7c8d98c26931c4a57 Gerrit-PatchSet: 18 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.wel...@t-online.de Gerrit-Reviewer: JGonera jgon...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Kaldari rkald...@wikimedia.org Gerrit-Reviewer: Liangent liang...@gmail.com Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: jenkins-bot
[MediaWiki-commits] [Gerrit] Removed some b/c code from file backend - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Removed some b/c code from file backend .. Removed some b/c code from file backend Change-Id: Ie8dbff588b067a202b24dfeaf792301c1077f08b --- M includes/filebackend/FileBackend.php 1 file changed, 5 insertions(+), 12 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filebackend/FileBackend.php b/includes/filebackend/FileBackend.php index 78810eb..8c0a61a 100644 --- a/includes/filebackend/FileBackend.php +++ b/includes/filebackend/FileBackend.php @@ -135,19 +135,12 @@ */ public function __construct( array $config ) { $this-name = $config['name']; - if ( !preg_match( '!^[a-zA-Z0-9-_]{1,255}$!', $this-name ) ) { - throw new FileBackendException( Backend name `{$this-name}` is invalid. ); - } - if ( !isset( $config['wikiId'] ) ) { - $config['wikiId'] = wfWikiID(); - wfDeprecated( __METHOD__ . ' called without wikiID.', '1.23' ); - } - if ( isset( $config['lockManager'] ) !is_object( $config['lockManager'] ) ) { - $config['lockManager'] = - LockManagerGroup::singleton( $config['wikiId'] )-get( $config['lockManager'] ); - wfDeprecated( __METHOD__ . ' called with non-object lockManager.', '1.23' ); - } $this-wikiId = $config['wikiId']; // e.g. my_wiki-en_ + if ( !preg_match( '!^[a-zA-Z0-9-_]{1,255}$!', $this-name ) ) { + throw new FileBackendException( Backend name '{$this-name}' is invalid. ); + } elseif ( !is_string( $this-wikiId ) ) { + throw new FileBackendException( Backend wiki ID not provided for '{$this-name}'. ); + } $this-lockManager = isset( $config['lockManager'] ) ? $config['lockManager'] : new NullLockManager( array() ); -- To view, visit https://gerrit.wikimedia.org/r/159982 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8dbff588b067a202b24dfeaf792301c1077f08b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Chad ch...@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] [BrowserTest] UI text changed s/Cancel/Resume editing/. - change (mediawiki...VisualEditor)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/160035 Change subject: [BrowserTest] UI text changed s/Cancel/Resume editing/. .. [BrowserTest] UI text changed s/Cancel/Resume editing/. Change-Id: I774b6a3cf02627ea0399377b9f6d57ca474ead07 --- M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/35/160035/1 diff --git a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb index 93dc01d..076f6dd 100644 --- a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb +++ b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb @@ -128,7 +128,7 @@ span(:add_template, text: Add template, frame: frame) span(:insert_template, text: Insert, frame: frame) span(:confirm_switch, text: Keep changes, frame: frame) -span(:confirm_switch_cancel, text: Cancel, frame: frame) +span(:confirm_switch_cancel, text: Resume editing, frame: frame) span(:confirm_switch_discard, text: Discard changes, frame: frame) div(:content_box, class: ve-ce-documentNode ve-ce-branchNode, frame: frame) text_area(:describe_change, index: 0, frame: frame) -- To view, visit https://gerrit.wikimedia.org/r/160035 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I774b6a3cf02627ea0399377b9f6d57ca474ead07 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] add DNS for codfw dns-rec-lb - change (operations/dns)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160036 Change subject: add DNS for codfw dns-rec-lb .. add DNS for codfw dns-rec-lb Change-Id: Icff09c9de50c191660ccb432a15b2883a421bc96 --- M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa M templates/153.80.208.in-addr.arpa M templates/wikimedia.org 3 files changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/36/160036/1 diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa index a2de2cb..76fc0c9 100644 --- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa +++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa @@ -102,6 +102,8 @@ $ORIGIN 3.0.0.0.0.0.0.0.0.0.0.0.a.1.d.e.{{ zonename }}. +e.f.0.0 1H IN PTR dns-rec-lb.codfw.wikimedia.org. + ; Neighbor blocks diff --git a/templates/153.80.208.in-addr.arpa b/templates/153.80.208.in-addr.arpa index 0edb0d9..8beaf3e 100644 --- a/templates/153.80.208.in-addr.arpa +++ b/templates/153.80.208.in-addr.arpa @@ -91,3 +91,4 @@ ; Multimedia 208.80.153.240 - .247 (208.80.153.240/29) ; Misc 208.80.153.248 - .255 (208.80.153.248/29) +254 1H IN PTR dns-rec-lb.codfw.wikimedia.org. diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 9209a12..fa83c53 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -271,6 +271,10 @@ 1H IN MX 10polonium.wikimedia.org. 1H IN MX 50lead.wikimedia.org. +;;; codfw +dns-rec-lb.codfw1H IN A208.80.153.254 +1H IN 2620:0:860:ed1a::3:fe + ; Mobile ca.m600 IN DYNA geoip!mobile-addrs -- To view, visit https://gerrit.wikimedia.org/r/160036 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icff09c9de50c191660ccb432a15b2883a421bc96 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] define codfw recursive DNS - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/160037 Change subject: define codfw recursive DNS .. define codfw recursive DNS Change-Id: I32e904446717e803d0cc15d35fe7aeda30b04cad --- M manifests/role/lvs.pp M manifests/site.pp M modules/lvs/manifests/configuration.pp 3 files changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/37/160037/1 diff --git a/manifests/role/lvs.pp b/manifests/role/lvs.pp index 0209790..d8bf906 100644 --- a/manifests/role/lvs.pp +++ b/manifests/role/lvs.pp @@ -51,6 +51,15 @@ $sip['search'][$::site], ], +# codfw (should mirror eqiad above, eventually, and become merged with it via regex +/^(lvs200[14])$/ = [ +], +/^(lvs200[25])$/ = [ +$sip['dns_rec'][$::site], +], +/^(lvs200[36])$/ = [ +], + # esams + ulsfo /^(lvs[34]00[13])$/ = [ $sip['text'][$::site], diff --git a/manifests/site.pp b/manifests/site.pp index c49f606..c246645 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -57,6 +57,17 @@ # Node definitions (alphabetic order) +node /^(acamar|achernar)\.wikimedia\.org$/ { +include admin +include base::firewall +include standard +include role::dns::recursor + +interface::add_ip6_mapped { 'main': +interface = 'eth0', +} +} + # To be decommissioned/reused, not presently serving traffic node /^amslvs[1-4]\.esams\.wikimedia\.org$/ { include admin diff --git a/modules/lvs/manifests/configuration.pp b/modules/lvs/manifests/configuration.pp index 84a34e9..0519032 100644 --- a/modules/lvs/manifests/configuration.pp +++ b/modules/lvs/manifests/configuration.pp @@ -259,6 +259,7 @@ }, 'dns_rec' = { 'eqiad' = { 'dns_rec' = 208.80.154.239, 'dns_rec6' = 2620:0:861:ed1a::f }, +'codfw' = { 'dns_rec' = 208.80.153.254, 'dns_rec6' = 2620:0:861:ed1a::3:fe }, }, 'osm' = { 'eqiad' = 208.80.154.244, -- To view, visit https://gerrit.wikimedia.org/r/160037 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32e904446717e803d0cc15d35fe7aeda30b04cad Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits