[MediaWiki-commits] [Gerrit] add highlighting character entity references (v 1.2.0) - change (mediawiki...CodeMirror)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/155694 Change subject: add highlighting character entity references (v 1.2.0) .. add highlighting character entity references (v 1.2.0) Change-Id: I1e2a41a5dd2d417ea62c5b78778c7c50bafcbb40 --- M CodeMirror.php M resources/mode/mediawiki/mediawiki.js 2 files changed, 21 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror refs/changes/94/155694/1 diff --git a/CodeMirror.php b/CodeMirror.php index 4116969..3898666 100644 --- a/CodeMirror.php +++ b/CodeMirror.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -const CODEMIRROR_VERSION = '1.1.1'; +const CODEMIRROR_VERSION = '1.2.0'; // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/resources/mode/mediawiki/mediawiki.js b/resources/mode/mediawiki/mediawiki.js index 33536a3..48dccff 100644 --- a/resources/mode/mediawiki/mediawiki.js +++ b/resources/mode/mediawiki/mediawiki.js @@ -104,12 +104,29 @@ break; case '\'': if ( stream.match( '\'\'' ) ) { - state.isBold = ( state.isBold ? false : true ); + state.isBold = state.isBold ? false : true; } else if ( stream.match( '\'' ) ) { - state.isItalic = ( state.isItalic ? false : true ); + state.isItalic = state.isItalic ? false : true; + } + break; + case '': + // this code was copied from mode/xml/xml.js + var ok; + if ( stream.eat( '#' ) ) { + if (stream.eat( 'x' ) ) { + ok = stream.eatWhile( /[a-fA-F\d]/ ) stream.eat( ';'); + } else { + ok = stream.eatWhile( /[\d]/ ) stream.eat( ';' ); + } + } else { + ok = stream.eatWhile( /[\w\.\-:]/ ) stream.eat( ';' ); + } + if ( ok ) { + style.push( 'atom' ); } break; } + if ( state.isBold ) { style.push( 'strong' ); } @@ -124,7 +141,7 @@ return { startState: function() { - return { tokenize: inWikitext, style: null }; + return { tokenize: inWikitext, isBold: false, isItalic: false }; }, token: function( stream, state ) { return state.tokenize( stream, state ); -- To view, visit https://gerrit.wikimedia.org/r/155694 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e2a41a5dd2d417ea62c5b78778c7c50bafcbb40 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeMirror Gerrit-Branch: master Gerrit-Owner: Pastakhov pastak...@yandex.ru ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove manual resets of mContentModel - change (mediawiki...MassMessage)
Wctaiwan has uploaded a new change for review. https://gerrit.wikimedia.org/r/155695 Change subject: Remove manual resets of mContentModel .. Remove manual resets of mContentModel Made unnecessary with I94f06baf406afa538cd2b10139598442f9fc6759 Change-Id: If3798c484fb0e908de8106a50a9606943e1ab547 --- M tests/ApiEditMassMessageListTest.php M tests/MassMessageTargetsTest.php 2 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage refs/changes/95/155695/1 diff --git a/tests/ApiEditMassMessageListTest.php b/tests/ApiEditMassMessageListTest.php index 104f51e..e67e84d 100644 --- a/tests/ApiEditMassMessageListTest.php +++ b/tests/ApiEditMassMessageListTest.php @@ -15,11 +15,6 @@ $page = WikiPage::factory( $title ); $content = ContentHandler::getForModelID( 'MassMessageListContent' )-makeEmptyContent(); $page-doEditContent( $content, 'summary' ); - - // The title object may be cached; force a LinkCache lookup for the updated - // content model the next time it is checked. - $title-mContentModel = false; - $this-doLogin(); } diff --git a/tests/MassMessageTargetsTest.php b/tests/MassMessageTargetsTest.php index 604ceea..0dbe7e7 100644 --- a/tests/MassMessageTargetsTest.php +++ b/tests/MassMessageTargetsTest.php @@ -96,7 +96,6 @@ $title = Title::newFromText( 'MassMessageListContent_spamlist' ); $page = WikiPage::factory( $title ); $page-doEditContent( $content, 'summary' ); - $title-mContentModel = false; // Force the updated model to be read from LinkCache $targets = MassMessageTargets::getTargets( $title, RequestContext::getMain() ); $this-assertEquals( 2, count( $targets ) ); $this-assertEquals( 'A', $targets[0]['title'] ); -- To view, visit https://gerrit.wikimedia.org/r/155695 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3798c484fb0e908de8106a50a9606943e1ab547 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: contenthandler Gerrit-Owner: Wctaiwan wctai...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add highlighting character entity references (v 1.2.0) - change (mediawiki...CodeMirror)
jenkins-bot has submitted this change and it was merged. Change subject: add highlighting character entity references (v 1.2.0) .. add highlighting character entity references (v 1.2.0) Change-Id: I1e2a41a5dd2d417ea62c5b78778c7c50bafcbb40 --- M CodeMirror.php M resources/mode/mediawiki/mediawiki.js 2 files changed, 21 insertions(+), 4 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/CodeMirror.php b/CodeMirror.php index 4116969..3898666 100644 --- a/CodeMirror.php +++ b/CodeMirror.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -const CODEMIRROR_VERSION = '1.1.1'; +const CODEMIRROR_VERSION = '1.2.0'; // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/resources/mode/mediawiki/mediawiki.js b/resources/mode/mediawiki/mediawiki.js index 33536a3..48dccff 100644 --- a/resources/mode/mediawiki/mediawiki.js +++ b/resources/mode/mediawiki/mediawiki.js @@ -104,12 +104,29 @@ break; case '\'': if ( stream.match( '\'\'' ) ) { - state.isBold = ( state.isBold ? false : true ); + state.isBold = state.isBold ? false : true; } else if ( stream.match( '\'' ) ) { - state.isItalic = ( state.isItalic ? false : true ); + state.isItalic = state.isItalic ? false : true; + } + break; + case '': + // this code was copied from mode/xml/xml.js + var ok; + if ( stream.eat( '#' ) ) { + if (stream.eat( 'x' ) ) { + ok = stream.eatWhile( /[a-fA-F\d]/ ) stream.eat( ';'); + } else { + ok = stream.eatWhile( /[\d]/ ) stream.eat( ';' ); + } + } else { + ok = stream.eatWhile( /[\w\.\-:]/ ) stream.eat( ';' ); + } + if ( ok ) { + style.push( 'atom' ); } break; } + if ( state.isBold ) { style.push( 'strong' ); } @@ -124,7 +141,7 @@ return { startState: function() { - return { tokenize: inWikitext, style: null }; + return { tokenize: inWikitext, isBold: false, isItalic: false }; }, token: function( stream, state ) { return state.tokenize( stream, state ); -- To view, visit https://gerrit.wikimedia.org/r/155694 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e2a41a5dd2d417ea62c5b78778c7c50bafcbb40 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeMirror Gerrit-Branch: master Gerrit-Owner: Pastakhov pastak...@yandex.ru Gerrit-Reviewer: Pastakhov pastak...@yandex.ru Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove manual resets of mContentModel - change (mediawiki...MassMessage)
jenkins-bot has submitted this change and it was merged. Change subject: Remove manual resets of mContentModel .. Remove manual resets of mContentModel Made unnecessary with I94f06baf406afa538cd2b10139598442f9fc6759 Change-Id: If3798c484fb0e908de8106a50a9606943e1ab547 --- M tests/ApiEditMassMessageListTest.php M tests/MassMessageTargetsTest.php 2 files changed, 0 insertions(+), 6 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/ApiEditMassMessageListTest.php b/tests/ApiEditMassMessageListTest.php index 104f51e..e67e84d 100644 --- a/tests/ApiEditMassMessageListTest.php +++ b/tests/ApiEditMassMessageListTest.php @@ -15,11 +15,6 @@ $page = WikiPage::factory( $title ); $content = ContentHandler::getForModelID( 'MassMessageListContent' )-makeEmptyContent(); $page-doEditContent( $content, 'summary' ); - - // The title object may be cached; force a LinkCache lookup for the updated - // content model the next time it is checked. - $title-mContentModel = false; - $this-doLogin(); } diff --git a/tests/MassMessageTargetsTest.php b/tests/MassMessageTargetsTest.php index 604ceea..0dbe7e7 100644 --- a/tests/MassMessageTargetsTest.php +++ b/tests/MassMessageTargetsTest.php @@ -96,7 +96,6 @@ $title = Title::newFromText( 'MassMessageListContent_spamlist' ); $page = WikiPage::factory( $title ); $page-doEditContent( $content, 'summary' ); - $title-mContentModel = false; // Force the updated model to be read from LinkCache $targets = MassMessageTargets::getTargets( $title, RequestContext::getMain() ); $this-assertEquals( 2, count( $targets ) ); $this-assertEquals( 'A', $targets[0]['title'] ); -- To view, visit https://gerrit.wikimedia.org/r/155695 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3798c484fb0e908de8106a50a9606943e1ab547 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: contenthandler Gerrit-Owner: Wctaiwan wctai...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make legend easier to read - change (mediawiki...Interwiki)
Isarra has uploaded a new change for review. https://gerrit.wikimedia.org/r/155696 Change subject: Make legend easier to read .. Make legend easier to read Moves the legend table into a system message for easier editing, and reformats the overall layout as well as changing some of the individual explanations. Change-Id: I744dce4bbfb9d8623fc4df83def3860626482330 --- M Interwiki.css M Interwiki_body.php M i18n/en.json M i18n/qqq.json 4 files changed, 10 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Interwiki refs/changes/96/155696/1 diff --git a/Interwiki.css b/Interwiki.css index e4f9299..065a6dc 100755 --- a/Interwiki.css +++ b/Interwiki.css @@ -41,7 +41,7 @@ } .mw-special-Interwiki .mw-collapsible-toggle { - float: left; + float: none; } .mw-collapsible-content { diff --git a/Interwiki_body.php b/Interwiki_body.php index 75dcf6d..1a98635 100755 --- a/Interwiki_body.php +++ b/Interwiki_body.php @@ -306,24 +306,11 @@ 'data-collapsetext' = $this-msg( 'interwiki-legend-hide' )-escaped(), 'data-expandtext' = $this-msg('interwiki-legend-show' )-escaped() ) ) ); - $this-getOutput()-addHTML( - Html::rawElement( - 'table', array( 'class' = 'mw-interwikitable wikitable intro' ), - $this-addInfoRow( 'start', 'interwiki_prefix', 'interwiki_prefix_intro' ) . \n . - $this-addInfoRow( 'start', 'interwiki_url', 'interwiki_url_intro' ) . \n . - $this-addInfoRow( 'start', 'interwiki_local', 'interwiki_local_intro' ) . \n . - $this-addInfoRow( 'end', 'interwiki_0', 'interwiki_local_0_intro' ) . \n . - $this-addInfoRow( 'end', 'interwiki_1', 'interwiki_local_1_intro' ) . \n . - $this-addInfoRow( 'start', 'interwiki_trans', 'interwiki_trans_intro' ) . \n . - $this-addInfoRow( 'end', 'interwiki_0', 'interwiki_trans_0_intro' ) . \n . - $this-addInfoRow( 'end', 'interwiki_1', 'interwiki_trans_1_intro' ) . \n - ) - ); - + $this-getOutput()-addWikiMsg( 'interwiki_legend' ); $this-getOutput()-addHTML( Html::closeElement( 'div' ) ); // end collapsible. if ( $canModify ) { - $this-getOutput()-addHTML( br / . $this-msg( 'interwiki_intro_footer' )-parse() ); + $this-getOutput()-addWikiMsg( 'interwiki_intro_footer' ); $addtext = $this-msg( 'interwiki_addtext' )-escaped(); $addlink = Linker::linkKnown( $this-getPageTitle( 'add' ), $addtext ); $this-getOutput()-addHTML( 'p class=mw-interwiki-addlink' . $addlink . '/p' ); diff --git a/i18n/en.json b/i18n/en.json old mode 100644 new mode 100755 index d9d9cb8..7ef1225 --- a/i18n/en.json +++ b/i18n/en.json @@ -12,22 +12,21 @@ interwiki_intro: This is an overview of the interwiki table., interwiki-legend-show: Show legend, interwiki-legend-hide: Hide legend, +interwiki_legend: {| class=\wikitable\\n|-\n!{{int:interwiki_prefix}}\n|colspan=2|{{int:interwiki_prefix_intro}}\n|-\n!{{int:interwiki_url}}\n|colspan=2|{{int:interwiki_url_intro}}\n|-\n!rowspan=2|{{int:interwiki_local}}\n!{{int:interwiki_1}}\n|{{int:interwiki_local_1_intro}}\n|-\n!{{int:interwiki_0}}\n|{{int:interwiki_local_0_intro}}\n|-\n!rowspan=2|Transclude\n!{{int:interwiki_1}}\n|{{int:interwiki_trans_1_intro}}\n|-\n!{{int:interwiki_0}}\n|{{int:interwiki_trans_0_intro}}\n|-\n|}, interwiki_prefix: Prefix, interwiki-prefix-label: Prefix:, interwiki_prefix_intro: Interwiki prefix to be used in code[nowiki /[prefix:empagename/em]]/code wikitext syntax., interwiki_url: URL, interwiki-url-label: URL:, -interwiki_url_intro: Template for URLs. The placeholder $1 will be replaced by the empagename/em of the wikitext, when the abovementioned wikitext syntax is used., +interwiki_url_intro: Template for URLs. The placeholder $1 will be replaced by the empagename/em in code[nowiki /[prefix:empagename/em]]/code., interwiki_local: Forward, interwiki-local-label: Forward:, -interwiki_local_intro: An HTTP request to the local wiki with this interwiki prefix in the URL is:, -interwiki_local_0_intro: not honored, a \{{int:badtitle}}\ error page will be displayed instead., -interwiki_local_1_intro: redirected to the target URL given in the interwiki link definitions (i.e. treated like links to local pages)., +interwiki_local_0_intro: External HTTP requests to the local wiki using this interwiki prefix in the URL
[MediaWiki-commits] [Gerrit] add highlighting comments (v 1.3.0) - change (mediawiki...CodeMirror)
Pastakhov has uploaded a new change for review. https://gerrit.wikimedia.org/r/155697 Change subject: add highlighting comments (v 1.3.0) .. add highlighting comments (v 1.3.0) Change-Id: I0243202d8a7571570f6446bb0dca3b50f2b812a3 --- M CodeMirror.php M resources/mode/mediawiki/mediawiki.js 2 files changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror refs/changes/97/155697/1 diff --git a/CodeMirror.php b/CodeMirror.php index 3898666..aa658b3 100644 --- a/CodeMirror.php +++ b/CodeMirror.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -const CODEMIRROR_VERSION = '1.2.0'; +const CODEMIRROR_VERSION = '1.3.0'; // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/resources/mode/mediawiki/mediawiki.js b/resources/mode/mediawiki/mediawiki.js index 48dccff..ce30669 100644 --- a/resources/mode/mediawiki/mediawiki.js +++ b/resources/mode/mediawiki/mediawiki.js @@ -85,6 +85,11 @@ } function inWikitext( stream, state ) { + function chain( parser ) { + state.tokenize = parser; + return parser( stream, state ); + } + var style = []; var sol = stream.sol(); var ch = stream.next(); @@ -107,6 +112,11 @@ state.isBold = state.isBold ? false : true; } else if ( stream.match( '\'' ) ) { state.isItalic = state.isItalic ? false : true; + } + break; + case '': + if ( stream.match( '!--' ) ) { + return chain( inBlock( 'comment', '--' ) ); } break; case '': @@ -139,6 +149,19 @@ return null; } + function inBlock( style, terminator ) { + return function( stream, state ) { + while ( !stream.eol() ) { + if ( stream.match( terminator ) ) { + state.tokenize = inWikitext; + break; + } + stream.next(); + } + return style; + }; + } + return { startState: function() { return { tokenize: inWikitext, isBold: false, isItalic: false }; -- To view, visit https://gerrit.wikimedia.org/r/155697 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0243202d8a7571570f6446bb0dca3b50f2b812a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeMirror Gerrit-Branch: master Gerrit-Owner: Pastakhov pastak...@yandex.ru ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add highlighting comments (v 1.3.0) - change (mediawiki...CodeMirror)
jenkins-bot has submitted this change and it was merged. Change subject: add highlighting comments (v 1.3.0) .. add highlighting comments (v 1.3.0) Change-Id: I0243202d8a7571570f6446bb0dca3b50f2b812a3 --- M CodeMirror.php M resources/mode/mediawiki/mediawiki.js 2 files changed, 24 insertions(+), 1 deletion(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/CodeMirror.php b/CodeMirror.php index 3898666..aa658b3 100644 --- a/CodeMirror.php +++ b/CodeMirror.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -const CODEMIRROR_VERSION = '1.2.0'; +const CODEMIRROR_VERSION = '1.3.0'; // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( diff --git a/resources/mode/mediawiki/mediawiki.js b/resources/mode/mediawiki/mediawiki.js index 48dccff..ce30669 100644 --- a/resources/mode/mediawiki/mediawiki.js +++ b/resources/mode/mediawiki/mediawiki.js @@ -85,6 +85,11 @@ } function inWikitext( stream, state ) { + function chain( parser ) { + state.tokenize = parser; + return parser( stream, state ); + } + var style = []; var sol = stream.sol(); var ch = stream.next(); @@ -107,6 +112,11 @@ state.isBold = state.isBold ? false : true; } else if ( stream.match( '\'' ) ) { state.isItalic = state.isItalic ? false : true; + } + break; + case '': + if ( stream.match( '!--' ) ) { + return chain( inBlock( 'comment', '--' ) ); } break; case '': @@ -139,6 +149,19 @@ return null; } + function inBlock( style, terminator ) { + return function( stream, state ) { + while ( !stream.eol() ) { + if ( stream.match( terminator ) ) { + state.tokenize = inWikitext; + break; + } + stream.next(); + } + return style; + }; + } + return { startState: function() { return { tokenize: inWikitext, isBold: false, isItalic: false }; -- To view, visit https://gerrit.wikimedia.org/r/155697 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0243202d8a7571570f6446bb0dca3b50f2b812a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeMirror Gerrit-Branch: master Gerrit-Owner: Pastakhov pastak...@yandex.ru Gerrit-Reviewer: Pastakhov pastak...@yandex.ru Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Use ipaddress module - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/155698 Change subject: WIP: Use ipaddress module .. WIP: Use ipaddress module page.py includes a regexp to check if a username is an IPv4 or IPv6 address, for User.isAnonymous(). There are other instances where pywikibot should be validating strings which may contain a IP address, such as config parsing, and a client side assert to prevent writing to the server as an anonymous user. There are modules which provide this functionality, however they fail the pywikibot tests. This changeset doesnt alter the existing tests, so the failures are recorded. Change-Id: I438632608c07f2b7ed196e8b2a536481fcfa3e8e --- M pywikibot/comms/http.py M pywikibot/data/api.py M pywikibot/page.py M setup.py M tests/ipregex_tests.py 5 files changed, 104 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/98/155698/1 diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index dbc23cf..8da6653 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -59,6 +59,14 @@ from http import cookiejar as cookielib from urlparse import quote +try: +# https://pypi.python.org/pypi/py2-ipaddress fails numerous tests +# https://pypi.python.org/pypi/ipaddress only fails a few tests +# _Both_ install as 'ipaddress' +import ipaddress +except ImportError: +ipaddress = None + from pywikibot import config from pywikibot.exceptions import FatalServerError, Server504Error from pywikibot.comms import threadedhttp @@ -124,6 +132,43 @@ pywikibot.cookie_jar = cookie_jar +def is_IP(IP): + +Verify the IP address provided is valid. + +@param IP: IP address +@type IP: unicode +@rtype: bool + +global ipaddress +if ipaddress: +try: +ipaddress.ip_address(IP) +return True +except ValueError as e: +pywikibot.debug(u'is_IP(%r) failed: %s' +% (IP, e), _logger) +return False + +if ipaddress is None: +# Only print the following warning once. +pywikibot.warning( +u'pywikibot uses the ipaddress module if available.\n' +u'For Python 2, install the backport with pip.') +ipaddress = False + +import re +ip_regexp = re.compile(r'^(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}' + r'(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|' + r'(((?=(?=(.*?(::)))\3(?!.+\4)))\4?|[\dA-F]{1,4}:)' + r'([\dA-F]{1,4}(\4|:\b)|\2){5}' + r'(([\dA-F]{1,4}(\4|:\b|$)|\2){2}|' + r'(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4}))\Z', + re.IGNORECASE) + +return ip_regexp.match(IP) is not None + + def request(site, uri, ssl=False, *args, **kwargs): Queue a request to be submitted to Site. diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 643369c..4e5fcf7 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -146,6 +146,15 @@ wbremoveclaims, wbsetclaimvalue, wbsetreference, wbremovereferences ) +# Client side verification that the request is being performed +# by a logged in user. +if self.write: +if not hasattr(self.site, _userinfo) or not self.site.user(): +raise Error(uAPI write action without a user specified) +if http.is_IP(self.site._userinfo['name']): +raise Error(uAPI write action as an IP %r +% self.site._userinfo['name']) + # MediaWiki 1.23 allows assertion for any action, # whereas earlier WMF wikis and others used an extension which # could only allow assert for action=edit. diff --git a/pywikibot/page.py b/pywikibot/page.py index 8c7afe8..c699b9d 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -2254,15 +2254,6 @@ return sorted(list(set(self.categories( -ip_regexp = re.compile(r'^(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}' - r'(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|' - r'(((?=(?=(.*?(::)))\3(?!.+\4)))\4?|[\dA-F]{1,4}:)' - r'([\dA-F]{1,4}(\4|:\b)|\2){5}' - r'(([\dA-F]{1,4}(\4|:\b|$)|\2){2}|' - r'(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4}))\Z', - re.IGNORECASE) - - class User(Page): A class that represents a Wiki user. @@ -2338,7 +2329,7 @@ @return: bool -return ip_regexp.match(self.username) is not None +return pywikibot.comms.http.is_IP(self.username) def getprops(self, force=False): Return a properties about the user. diff --git a/setup.py b/setup.py index
[MediaWiki-commits] [Gerrit] Record usage of badges - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has submitted this change and it was merged. Change subject: Record usage of badges .. Record usage of badges This only a temporary hack and will be done in a saner way after we have an EntityParserOutput class [1]. Therefor, this also will get tested in the other patch. [1] https://gerrit.wikimedia.org/r/#/c/155287/ Change-Id: I767ec181522272d9ad7e9e15b1f13036bcf8a707 --- M repo/includes/EntityView.php 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: WikidataJenkins: Verified Thiemo Mättig (WMDE): Looks good to me, approved jenkins-bot: Checked diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index f805f43..dda755f 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -8,6 +8,7 @@ use InvalidArgumentException; use Linker; use ParserOutput; +use Wikibase\DataModel\SiteLinkList; use Wikibase\Lib\PropertyDataTypeLookup; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\SnakFormatter; @@ -378,6 +379,10 @@ $pout-setExtensionData( 'wikibase-view-chunks', $this-getPlaceholders() ); } + if ( $entity instanceof Item ) { + $this-addBadgesToParserOutput( $pout, $entity-getSiteLinkList() ); + } + //@todo: record sitelinks as iwlinks //@todo: record CommonsMedia values as imagelinks @@ -403,6 +408,14 @@ return $pout; } + private function addBadgesToParserOutput( ParserOutput $pout, SiteLinkList $siteLinkList ) { + foreach ( $siteLinkList as $siteLink ) { + foreach ( $siteLink-getBadges() as $badge ) { + $pout-addLink( $this-entityTitleLookup-getTitleForID( $badge ) ); + } + } + } + /** * Returns the HTML for the heading of the claims section * -- To view, visit https://gerrit.wikimedia.org/r/155276 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I767ec181522272d9ad7e9e15b1f13036bcf8a707 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Bene benestar.wikime...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug 69889-unexpected keyword argument 'site' while moving ca... - change (pywikibot/core)
Mpaa has uploaded a new change for review. https://gerrit.wikimedia.org/r/155699 Change subject: Bug 69889-unexpected keyword argument 'site' while moving category .. Bug 69889-unexpected keyword argument 'site' while moving category Removed invalid 'site' keyword used when Category() is instantiated in Page.change_category(). Change-Id: I184b97000c9ce6626f17f176a68772fd90b908f5 --- M pywikibot/page.py 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/99/155699/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index 8c7afe8..14c5682 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -1705,8 +1705,7 @@ else: if newCat: cats[cats.index(oldCat)] = Category(site, newCat.title(), -sortKey=sortKey, -site=self.site) +sortKey=sortKey) else: cats.pop(cats.index(oldCat)) oldtext = self.get(get_redirect=True) -- To view, visit https://gerrit.wikimedia.org/r/155699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I184b97000c9ce6626f17f176a68772fd90b908f5 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Mpaa mpaa.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Drop 5.3 repo only travis build (in German) - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Drop 5.3 repo only travis build (in German) .. Drop 5.3 repo only travis build (in German) we run 5.3 on jenkins, so this is redundant. Change-Id: I381eba1533c849934a7297bc8d385d47d78f5924 --- M .travis.yml 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: WikidataJenkins: Verified Jeroen De Dauw: Looks good to me, approved jenkins-bot: Checked diff --git a/.travis.yml b/.travis.yml index 2370e97..c40cc2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,6 @@ include: - env: DBTYPE=mysql LANG=de; MW=master WB=client php: 5.3 -- env: DBTYPE=sqlite LANG=de; MW=master WB=repo - php: 5.3 - env: DBTYPE=sqlite LANG=ar; MW=master WB=both php: 5.3 - env: DBTYPE=sqlite LANG=ru; MW=master WB=both -- To view, visit https://gerrit.wikimedia.org/r/10 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I381eba1533c849934a7297bc8d385d47d78f5924 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Hoo man h...@online.de Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New configuration setting $wgForceHTTPS - change (mediawiki/core)
Withoutaname has uploaded a new change for review. https://gerrit.wikimedia.org/r/155700 Change subject: New configuration setting $wgForceHTTPS .. New configuration setting $wgForceHTTPS $wgForceHTTPS is a configuration setting that determines enforcement of sitewide HTTPS rules via Strict-Transport-Security headers. Change-Id: I98b1b0d6decf03e3f0f301ae603dc87e1552ae26 --- M includes/DefaultSettings.php M includes/Setup.php 2 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/00/155700/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 68fa0b5..8e9a0f7 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -318,6 +318,11 @@ */ $wgActionPaths = array(); +/** + * If true, visitors are required to use HTTPS in order to access the website. + */ +$wgForceHTTPS = false; + /**@}*/ ///** diff --git a/includes/Setup.php b/includes/Setup.php index 0c5cf92..a5ecefd 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -617,6 +617,15 @@ $wgUsersNotifiedOnAllChanges = array(); } +if ( $wgForceHTTPS ) { + if ( $wgRequest-getProtocol() === 'http' ) { + header( 'Location: ' . wfExpandUrl( $wgRequest-getRequestURL(), 'https://' ), true, 301 ); + } + header( 'Strict-Transport-Security: max-age=31536000' ); +} else { + header( 'Strict-Transport-Security: max-age=0' ); +} + wfProfileOut( $fname . '-globals' ); wfProfileIn( $fname . '-extensions' ); -- To view, visit https://gerrit.wikimedia.org/r/155700 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I98b1b0d6decf03e3f0f301ae603dc87e1552ae26 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Withoutaname drevit...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] gerrit secure.config.erb - variable access - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: gerrit secure.config.erb - variable access .. gerrit secure.config.erb - variable access from puppet compiler warnings on ytterbium: Variable access via 'ldap_proxyagent_pass' is deprecated. Use '@ldap_proxyagent_pass' instead. Variable access via 'ldap_proxyagent' is deprecated. Use '@ldap_proxyagent' instead. Change-Id: Ic4eb2051b28c39ec7ffaef718e0c256386f963bf --- M templates/gerrit/secure.config.erb 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/templates/gerrit/secure.config.erb b/templates/gerrit/secure.config.erb index 07d24b1..87e7a4f 100644 --- a/templates/gerrit/secure.config.erb +++ b/templates/gerrit/secure.config.erb @@ -1,8 +1,8 @@ [database] password = %= scope.lookupvar('gerrit::instance::dbpass') % [ldap] - username = %= ldap_proxyagent % - password = %= ldap_proxyagent_pass % + username = %= @ldap_proxyagent % + password = %= @ldap_proxyagent_pass % [auth] registerEmailPrivateKey = %= scope.lookupvar('gerrit::instance::email_key') % [bugzilla] -- To view, visit https://gerrit.wikimedia.org/r/155433 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4eb2051b28c39ec7ffaef718e0c256386f963bf Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] rm files/misc/boost-backports.key - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: rm files/misc/boost-backports.key .. rm files/misc/boost-backports.key doesnt seem to be used anywhere?! Change-Id: I5edc6c801cc465b95cb37245b72c391f89bbdd5b --- D files/misc/boost-backports.key 1 file changed, 0 insertions(+), 13 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/files/misc/boost-backports.key b/files/misc/boost-backports.key deleted file mode 100644 index 90c9b2d..000 --- a/files/misc/boost-backports.key +++ /dev/null @@ -1,13 +0,0 @@ --BEGIN PGP PUBLIC KEY BLOCK- -Version: SKS 1.1.4 -Comment: Hostname: keyserver.ubuntu.com - -mI0ETiwADQEEANEbV9FF7WhSqo5k7IOHmAWsQyAROp3rRPyG15Bgwt1o1h6PjAxwMoNG30XB -q3gM/syEwDFcvMeZoRvSOaFaE0xK2gCkFJFP0lP7TphimklMpQolmMxQNCrIuQXfUnxLImgN -yYs9zSn+0l+o3WTXy1jZyAUdBUUk2DoRN1AKitJBABEBAAG0I0xhdW5jaHBhZCBQUEEgZm9y -IE1hcG5payBEZXZlbG9wZXJziLgEEwECACIFAk4sAA0CGwMGCwkIBwMCBhUIAgkKCwQWAgMB -Ah4BAheAAAoJEE97k1ldULa6mjQEAJulasTjtOAt0O6CWHwvNlpfjty5mDIWVkrbiTVEJ9es -XgatzFzmS6RnepcR3ij93XY7scTce298/o0yjQEtBrRCD4C48+PG5dff1E7qhDyK4bkSJzkk -h2oBxIjnPunnY6di6YwO28Br/FBIFslNmD7JM32/9lzVYpwTDn9T6cEp -=kSkP --END PGP PUBLIC KEY BLOCK- \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/153226 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5edc6c801cc465b95cb37245b72c391f89bbdd5b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Matanya mata...@foss.co.il 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 - 22/08/2014 10:00 - change (mediawiki...Wikidata)
WikidataBuilder has uploaded a new change for review. https://gerrit.wikimedia.org/r/155701 Change subject: New Wikidata Build - 22/08/2014 10:00 .. New Wikidata Build - 22/08/2014 10:00 Change-Id: I3180bface922502a3979a4aacf2cf10839022679 --- M composer.lock M extensions/Wikibase/.travis.yml M extensions/Wikibase/client/config/WikibaseClient.default.php M extensions/Wikibase/docs/options.wiki M extensions/Wikibase/repo/config/Wikibase.default.php M extensions/Wikibase/repo/includes/DiffView.php M extensions/Wikibase/repo/includes/EntityContentDiffView.php M extensions/Wikibase/repo/includes/EntityDiffVisualizer.php M extensions/Wikibase/repo/includes/EntityView.php M extensions/Wikibase/repo/includes/actions/EditEntityAction.php M extensions/Wikibase/repo/tests/phpunit/includes/CopyrightMessageBuilderTest.php M extensions/Wikibase/repo/tests/phpunit/includes/DiffViewTest.php M extensions/Wikibase/repo/tests/phpunit/includes/EntityDiffVisualizerTest.php M vendor/autoload.php M vendor/composer/autoload_real.php M vendor/composer/installed.json 16 files changed, 138 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/01/155701/1 diff --git a/composer.lock b/composer.lock index 8030ed3..3ab70b0 100644 --- a/composer.lock +++ b/composer.lock @@ -1138,12 +1138,12 @@ source: { type: git, url: https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -reference: 05c771e36eadae5e4e6b533227b82f05bde4d1b9 +reference: 7062a0d98ac009c62adc53f0911792979a0f0cae }, dist: { type: zip, -url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/05c771e36eadae5e4e6b533227b82f05bde4d1b9;, -reference: 05c771e36eadae5e4e6b533227b82f05bde4d1b9, +url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7062a0d98ac009c62adc53f0911792979a0f0cae;, +reference: 7062a0d98ac009c62adc53f0911792979a0f0cae, shasum: }, require: { @@ -1212,7 +1212,7 @@ wikibaserepo, wikidata ], -time: 2014-08-21 09:16:33 +time: 2014-08-22 09:04:34 } ], packages-dev: [ diff --git a/extensions/Wikibase/.travis.yml b/extensions/Wikibase/.travis.yml index 2370e97..c40cc2e 100644 --- a/extensions/Wikibase/.travis.yml +++ b/extensions/Wikibase/.travis.yml @@ -8,8 +8,6 @@ include: - env: DBTYPE=mysql LANG=de; MW=master WB=client php: 5.3 -- env: DBTYPE=sqlite LANG=de; MW=master WB=repo - php: 5.3 - env: DBTYPE=sqlite LANG=ar; MW=master WB=both php: 5.3 - env: DBTYPE=sqlite LANG=ru; MW=master WB=both diff --git a/extensions/Wikibase/client/config/WikibaseClient.default.php b/extensions/Wikibase/client/config/WikibaseClient.default.php index 1184213..bf52e5d 100644 --- a/extensions/Wikibase/client/config/WikibaseClient.default.php +++ b/extensions/Wikibase/client/config/WikibaseClient.default.php @@ -40,8 +40,8 @@ 'propagateChangesToRepo' = true, 'otherProjectsLinksByDefault' = false, 'otherProjectsLinksBeta' = false, - // List of additional CSS class names for site links that have badges, e.g. - // array( 'Q101' = 'wb-badge-goldstar' ). + // List of additional CSS class names for site links that have badges, + // e.g. array( 'Q101' = 'badge-goodarticle' ) 'badgeClassNames' = array(), // Allow accessing data from other items in the parser functions and via Lua 'allowArbitraryDataAccess' = true, diff --git a/extensions/Wikibase/docs/options.wiki b/extensions/Wikibase/docs/options.wiki index 26af029..24eb1c9 100644 --- a/extensions/Wikibase/docs/options.wiki +++ b/extensions/Wikibase/docs/options.wiki @@ -49,7 +49,7 @@ ;entityNamespaces: Defines which kind of entity is managed in which namespace; this is given as an associative array mapping content model IDs such as codeCONTENT_MODEL_WIKIBASE_ITEM/code to namespace IDs. This setting is required for each kind of entity that should be supported. ;dataRightsUrl: Url to link to license for data contents. Defaults to $wgRightsUrl setting. ;dataRightsText: Text for data license link. Defaults to $wgRightsText setting. -;badgeItems: Items allowed to be used as badges. This setting expects an array of serialized item ids pointing to their CSS class names. +;badgeItems: Items allowed to be used as badges. This setting expects an array of serialized item ids pointing to their CSS class names, like codearray( 'Q101' = 'wb-badge-goodarticle' )/code. With this class name it is possible to change the icon of a
[MediaWiki-commits] [Gerrit] nosetests for Python 3 - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/155702 Change subject: nosetests for Python 3 .. nosetests for Python 3 - Minor code modifications to fix python 3 support for the underlying components tested by nose. - Moderate changes in the tests to provide enough python 3 support needed to run the !net,!site tests. Change-Id: I62a71cb786562eb9904a556d8066b6120ed885cf --- M pywikibot/comms/http.py M pywikibot/i18n.py M pywikibot/page.py M pywikibot/site.py M pywikibot/textlib.py M tests/dry_api_tests.py M tests/i18n_tests.py M tests/ipregex_tests.py M tests/namespace_tests.py M tests/textlib_tests.py M tests/ui_tests.py M tests/utils.py M tests/wikibase_tests.py M tox.ini 14 files changed, 59 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/02/155702/1 diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index dbc23cf..564026a 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -57,7 +57,7 @@ import queue as Queue import urllib.parse as urlparse from http import cookiejar as cookielib -from urlparse import quote +from urllib.parse import quote from pywikibot import config from pywikibot.exceptions import FatalServerError, Server504Error diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py index 2908481..cb6bd71 100644 --- a/pywikibot/i18n.py +++ b/pywikibot/i18n.py @@ -11,6 +11,7 @@ __version__ = '$Id$' # +import sys import re import locale from pywikibot import Error @@ -18,6 +19,9 @@ import pywikibot from . import config2 as config +if sys.version_info[0] == 3: +basestring = (str, ) + PLURAL_PATTERN = '{{PLURAL:(?:%\()?([^\)]*?)(?:\)d)?\|(.*?)}}' # Package name for the translation messages diff --git a/pywikibot/page.py b/pywikibot/page.py index 8c7afe8..c7dcb01 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -17,6 +17,7 @@ __version__ = '$Id$' # +import sys import pywikibot from pywikibot import config import pywikibot.site @@ -25,11 +26,11 @@ from pywikibot import textlib import hashlib -try: +if sys.version_info[0] == 2: import htmlentitydefs from urllib import quote as quote_from_bytes, unquote as unquote_to_bytes -except ImportError: -unicode = str +else: +unicode = basestring = str from html import entities as htmlentitydefs from urllib.parse import quote_from_bytes, unquote_to_bytes @@ -4020,7 +4021,7 @@ if unicodeCodepoint and unicodeCodepoint not in ignore: # solve narrow Python build exception (UTF-16) if unicodeCodepoint sys.maxunicode: -unicode_literal = lambda n: eval(u'\U%08x' % n) +unicode_literal = lambda n: eval(ru'\U%08x' % n) result += unicode_literal(unicodeCodepoint) else: result += unichr(unicodeCodepoint) diff --git a/pywikibot/site.py b/pywikibot/site.py index befcf3a..cadb647 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -288,6 +288,9 @@ def __str__(self): Return a string representation. +if sys.version_info[0] == 3: +return self.__unicode__() + if self.id == 0: return ':' elif self.id in (6, 14): diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index d7f1f87..d11154e 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -26,6 +26,8 @@ from HTMLParser import HTMLParser else: from html.parser import HTMLParser +basestring = (str,) +unicode = str from . import config2 as config diff --git a/tests/dry_api_tests.py b/tests/dry_api_tests.py index 6c61a33..de448c6 100644 --- a/tests/dry_api_tests.py +++ b/tests/dry_api_tests.py @@ -10,7 +10,7 @@ import datetime import pywikibot from pywikibot.data.api import CachedRequest, QueryGenerator -from utils import unittest, NoSiteTestCase, SiteTestCase, DummySiteinfo +from tests.utils import unittest, NoSiteTestCase, SiteTestCase, DummySiteinfo class DryCachedRequestTests(SiteTestCase): diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py index 2d16042..0d0b7fe 100644 --- a/tests/i18n_tests.py +++ b/tests/i18n_tests.py @@ -237,7 +237,7 @@ u'Bot: Ändere elf Zeilen von mehreren Seiten.') def testAllParametersExist(self): -with self.assertRaisesRegexp(KeyError, u'line'): +with self.assertRaisesRegexp(KeyError, %s % repr(u'line')): # all parameters must be inside twntranslate self.assertEqual( i18n.twntranslate('de', 'test-multiple-plurals', diff --git a/tests/ipregex_tests.py b/tests/ipregex_tests.py index 01fa79b..1af1dc7 100644 --- a/tests/ipregex_tests.py +++ b/tests/ipregex_tests.py @@ -20,7 +20,7 @@ def tearDown(self): super(PyWikiIpRegexCase, self).tearDown() -print
[MediaWiki-commits] [Gerrit] New Wikidata Build - 22/08/2014 10:00 - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: New Wikidata Build - 22/08/2014 10:00 .. New Wikidata Build - 22/08/2014 10:00 Change-Id: I3180bface922502a3979a4aacf2cf10839022679 --- M composer.lock M extensions/Wikibase/.travis.yml M extensions/Wikibase/client/config/WikibaseClient.default.php M extensions/Wikibase/docs/options.wiki M extensions/Wikibase/repo/config/Wikibase.default.php M extensions/Wikibase/repo/includes/DiffView.php M extensions/Wikibase/repo/includes/EntityContentDiffView.php M extensions/Wikibase/repo/includes/EntityDiffVisualizer.php M extensions/Wikibase/repo/includes/EntityView.php M extensions/Wikibase/repo/includes/actions/EditEntityAction.php M extensions/Wikibase/repo/tests/phpunit/includes/CopyrightMessageBuilderTest.php M extensions/Wikibase/repo/tests/phpunit/includes/DiffViewTest.php M extensions/Wikibase/repo/tests/phpunit/includes/EntityDiffVisualizerTest.php M vendor/autoload.php M vendor/composer/autoload_real.php M vendor/composer/installed.json 16 files changed, 138 insertions(+), 46 deletions(-) Approvals: Aude: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index 8030ed3..3ab70b0 100644 --- a/composer.lock +++ b/composer.lock @@ -1138,12 +1138,12 @@ source: { type: git, url: https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -reference: 05c771e36eadae5e4e6b533227b82f05bde4d1b9 +reference: 7062a0d98ac009c62adc53f0911792979a0f0cae }, dist: { type: zip, -url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/05c771e36eadae5e4e6b533227b82f05bde4d1b9;, -reference: 05c771e36eadae5e4e6b533227b82f05bde4d1b9, +url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7062a0d98ac009c62adc53f0911792979a0f0cae;, +reference: 7062a0d98ac009c62adc53f0911792979a0f0cae, shasum: }, require: { @@ -1212,7 +1212,7 @@ wikibaserepo, wikidata ], -time: 2014-08-21 09:16:33 +time: 2014-08-22 09:04:34 } ], packages-dev: [ diff --git a/extensions/Wikibase/.travis.yml b/extensions/Wikibase/.travis.yml index 2370e97..c40cc2e 100644 --- a/extensions/Wikibase/.travis.yml +++ b/extensions/Wikibase/.travis.yml @@ -8,8 +8,6 @@ include: - env: DBTYPE=mysql LANG=de; MW=master WB=client php: 5.3 -- env: DBTYPE=sqlite LANG=de; MW=master WB=repo - php: 5.3 - env: DBTYPE=sqlite LANG=ar; MW=master WB=both php: 5.3 - env: DBTYPE=sqlite LANG=ru; MW=master WB=both diff --git a/extensions/Wikibase/client/config/WikibaseClient.default.php b/extensions/Wikibase/client/config/WikibaseClient.default.php index 1184213..bf52e5d 100644 --- a/extensions/Wikibase/client/config/WikibaseClient.default.php +++ b/extensions/Wikibase/client/config/WikibaseClient.default.php @@ -40,8 +40,8 @@ 'propagateChangesToRepo' = true, 'otherProjectsLinksByDefault' = false, 'otherProjectsLinksBeta' = false, - // List of additional CSS class names for site links that have badges, e.g. - // array( 'Q101' = 'wb-badge-goldstar' ). + // List of additional CSS class names for site links that have badges, + // e.g. array( 'Q101' = 'badge-goodarticle' ) 'badgeClassNames' = array(), // Allow accessing data from other items in the parser functions and via Lua 'allowArbitraryDataAccess' = true, diff --git a/extensions/Wikibase/docs/options.wiki b/extensions/Wikibase/docs/options.wiki index 26af029..24eb1c9 100644 --- a/extensions/Wikibase/docs/options.wiki +++ b/extensions/Wikibase/docs/options.wiki @@ -49,7 +49,7 @@ ;entityNamespaces: Defines which kind of entity is managed in which namespace; this is given as an associative array mapping content model IDs such as codeCONTENT_MODEL_WIKIBASE_ITEM/code to namespace IDs. This setting is required for each kind of entity that should be supported. ;dataRightsUrl: Url to link to license for data contents. Defaults to $wgRightsUrl setting. ;dataRightsText: Text for data license link. Defaults to $wgRightsText setting. -;badgeItems: Items allowed to be used as badges. This setting expects an array of serialized item ids pointing to their CSS class names. +;badgeItems: Items allowed to be used as badges. This setting expects an array of serialized item ids pointing to their CSS class names, like codearray( 'Q101' = 'wb-badge-goodarticle' )/code. With this class name it is possible to change the icon of a specific badge. ;conceptBaseUri: Base
[MediaWiki-commits] [Gerrit] Throttle browser tests at 1 per node max - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: Throttle browser tests at 1 per node max .. Throttle browser tests at 1 per node max Might help with browsertests timing out with xrvb/SauceLabs. Require the Jenkins plugin 'Throttle Concurrent Builds' https://wiki.jenkins-ci.org/display/JENKINS/Throttle+Concurrent+Builds+Plugin Change-Id: I370554615608e9332be43ca267c05fc744cbeb0a --- M job_template.yaml 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/job_template.yaml b/job_template.yaml index 37bd8aa..7a08d43 100644 --- a/job_template.yaml +++ b/job_template.yaml @@ -58,6 +58,17 @@ name: browsertests node: contintLabsSlave UbuntuPrecise +properties: + - throttle: + max-per-node: 1 + max-total: 0 + enabled: true + option: 'category' + categories: + # They are defined in the global configuration + # https://integration.wikimedia.org/ci/configure + - browsertest-one-per-node + scm: - git: url: https://gerrit.wikimedia.org/r/{repository} -- To view, visit https://gerrit.wikimedia.org/r/155337 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I370554615608e9332be43ca267c05fc744cbeb0a Gerrit-PatchSet: 4 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: cloudbees Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr 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] Start PHPUnit testing framework - change (mediawiki...TranslateSvg)
Jarry1250 has submitted this change and it was merged. Change subject: Start PHPUnit testing framework .. Start PHPUnit testing framework * Create TranslateSvgTestCase to handle shared content * Use TranslateSvgTestCase to handle global assignation * Start SVGMessageGroup and SVGFormatReader tests * Register hooks for Jenkins Change-Id: I3495d8f719616d60f8193bac8a54dbe98722ea17 --- M TranslateSvg.php M TranslateSvgHooks.php A phpunit.xml.dist A tests/data/Speech_bubbles.svg A tests/phpunit/SVGFormatReaderTest.php A tests/phpunit/SVGMessageGroupTest.php A tests/phpunit/TranslateSvgTestCase.php A tests/phpunit/bootstrap.php 8 files changed, 501 insertions(+), 0 deletions(-) Approvals: Jarry1250: Verified; Looks good to me, approved diff --git a/TranslateSvg.php b/TranslateSvg.php index 0c134fa..8bcc020 100644 --- a/TranslateSvg.php +++ b/TranslateSvg.php @@ -25,6 +25,12 @@ $wgAutoloadClasses['TranslateSvgHooks'] = $dir . 'TranslateSvgHooks.php'; $wgAutoloadClasses['ExportSVGMessagesTask'] = $dir . 'TranslateSvgTasks.php'; $wgAutoloadClasses['TranslateSvgUpload'] = $dir . 'SVGFormatWriter.php'; + +if( defined( 'MW_PHPUNIT_TEST' ) ) { + define( 'MW_PHPUNIT_USE_AUTOLOAD', true ); + require_once $dir . 'tests/phpunit/bootstrap.php'; +} + $wgMessagesDirs['TranslateSvg'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['TranslateSvg'] = $dir . 'TranslateSvg.i18n.php'; $wgExtensionMessagesFiles['TranslateSvgAlias'] = $dir . 'TranslateSvg.alias.php'; @@ -91,6 +97,7 @@ $wgHooks['TranslateGetAPIMessageGroupsParameterList'][] = 'TranslateSvgHooks::addAPIParams'; $wgHooks['TranslatePostInitGroups'][] = 'TranslateSvgHooks::loadSVGGroups'; $wgHooks['TranslateProcessAPIMessageGroupsProperties'][] = 'TranslateSvgHooks::processAPIProperties'; +$wgHooks['UnitTestsList'][] = 'TranslateSvgHooks::onUnitTestsList'; $wgSpecialPages['TranslateNewSVG'] = 'SpecialTranslateNewSVG'; $wgSpecialPageGroups['TranslateNewSVG'] = 'wiki'; diff --git a/TranslateSvgHooks.php b/TranslateSvgHooks.php index a8cbfb0..92bae4b 100644 --- a/TranslateSvgHooks.php +++ b/TranslateSvgHooks.php @@ -450,4 +450,15 @@ $vars['wgFileTranslationStarted'] = true; return true; } + + /** +* Register our unit tests so Jenkins can run them +* +* @param $files \array Array of tests (test files) to be run +* @return \bool True +*/ + public static function onUnitTestsList( $files ) { + $files = array_merge( $files, glob( __DIR__ . '/tests/phpunit/*Test.php' ) ); + return true; + } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 000..40d2720 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,25 @@ +?xml version=1.0 encoding=UTF-8? + +!-- +Colors don't work on Windows! +phpunit.php enables colors for other OSs at runtime +-- +phpunit bootstrap=tests/phpunit/bootstrap.php + colors=false + backupGlobals=false + convertErrorsToExceptions=true + convertNoticesToExceptions=true + convertWarningsToExceptions=true + forceCoversAnnotation=true + stopOnFailure=false + timeoutForSmallTests=10 + timeoutForMediumTests=30 + timeoutForLargeTests=60 + strict=true + verbose=true +testsuites +testsuite name=all +directorytests/phpunit//directory +/testsuite +/testsuites +/phpunit diff --git a/tests/data/Speech_bubbles.svg b/tests/data/Speech_bubbles.svg new file mode 100644 index 000..6b1ef7a --- /dev/null +++ b/tests/data/Speech_bubbles.svg @@ -0,0 +1,14 @@ +?xml version=1.0 encoding=UTF-8 standalone=no? +!-- Created with Inkscape (http://www.inkscape.org/) -- +svg xmlns:dc=http://purl.org/dc/elements/1.1/; xmlns:cc=http://creativecommons.org/ns#; xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns:svg=http://www.w3.org/2000/svg; xmlns=http://www.w3.org/2000/svg; xmlns:sodipodi=http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd; xmlns:inkscape=http://www.inkscape.org/namespaces/inkscape; width=17.7cm height=13cm id=svg2 version=1.1 inkscape:version=0.48.2 r9819 sodipodi:docname=New document 1 + defs id=defs4/ + sodipodi:namedview id=base pagecolor=#ff bordercolor=#66 borderopacity=1.0 inkscape:pageopacity=0.0 inkscape:pageshadow=2 inkscape:zoom=0.7 inkscape:cx=296.43458 inkscape:cy=130.17435 inkscape:document-units=px inkscape:current-layer=layer1 showgrid=false fit-margin-top=0 fit-margin-left=0 fit-margin-right=0 fit-margin-bottom=0 inkscape:window-width=1366 inkscape:window-height=706 inkscape:window-x=-8 inkscape:window-y=-8 inkscape:window-maximized=1/ + g inkscape:label=Layer 1 inkscape:groupmode=layer id=layer1 transform=translate(-0.28125,-1.21875) +switch
[MediaWiki-commits] [Gerrit] Add method for generating json of individual entities in Jso... - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Add method for generating json of individual entities in JsonDumpGenerator .. Add method for generating json of individual entities in JsonDumpGenerator split from the generateDump method Change-Id: I0012acec9f3126ed07b069c3679a09ff503c82eb --- M repo/includes/Dumpers/JsonDumpGenerator.php 1 file changed, 19 insertions(+), 13 deletions(-) Approvals: WikidataJenkins: Verified Jeroen De Dauw: Looks good to me, approved jenkins-bot: Checked diff --git a/repo/includes/Dumpers/JsonDumpGenerator.php b/repo/includes/Dumpers/JsonDumpGenerator.php index 6694be4..0843a58 100644 --- a/repo/includes/Dumpers/JsonDumpGenerator.php +++ b/repo/includes/Dumpers/JsonDumpGenerator.php @@ -236,19 +236,7 @@ } try { - try { - $entity = $this-entityLookup-getEntity( $entityId ); - - if ( !$entity ) { - throw new StorageException( 'Entity not found: ' . $entityId-getSerialization() ); - } - } catch( MWContentSerializationException $ex ) { - throw new StorageException( 'Deserialization error for ' - . $entityId-getSerialization() ); - } - - $data = $this-entitySerializer-getSerialized( $entity ); - $json = $this-encode( $data ); + $json = $this-generateJsonForEntityId( $entityId ); if ( $dumpCount 0 ) { $this-writeToDump( ,\n ); @@ -262,6 +250,24 @@ } } + private function generateJsonForEntityId( EntityId $entityId ) { + try { + $entity = $this-entityLookup-getEntity( $entityId ); + + if ( !$entity ) { + throw new StorageException( 'Entity not found: ' . $entityId-getSerialization() ); + } + } catch( MWContentSerializationException $ex ) { + throw new StorageException( 'Deserialization error for ' + . $entityId-getSerialization() ); + } + + $data = $this-entitySerializer-getSerialized( $entity ); + $json = $this-encode( $data ); + + return $json; + } + private function idMatchesFilters( EntityId $entityId ) { return $this-idMatchesShard( $entityId ) $this-idMatchesType( $entityId ); -- To view, visit https://gerrit.wikimedia.org/r/155520 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0012acec9f3126ed07b069c3679a09ff503c82eb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Handle MWContentSerializationException in JsonDumpGenerator - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: Handle MWContentSerializationException in JsonDumpGenerator .. Handle MWContentSerializationException in JsonDumpGenerator This can happen if there is a corrupt entity in the database, but should not cause the entire dump to fail. The entity can be skipped with an error message, as done for other error situations. Bug: 69846 Change-Id: I541fb68cd8697c8e9e6617c4cc8ca556a3e03238 --- M repo/includes/Dumpers/JsonDumpGenerator.php M repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php 2 files changed, 53 insertions(+), 3 deletions(-) Approvals: Hoo man: Looks good to me, approved WikidataJenkins: Verified jenkins-bot: Checked diff --git a/repo/includes/Dumpers/JsonDumpGenerator.php b/repo/includes/Dumpers/JsonDumpGenerator.php index 07b0f4e..6694be4 100644 --- a/repo/includes/Dumpers/JsonDumpGenerator.php +++ b/repo/includes/Dumpers/JsonDumpGenerator.php @@ -3,6 +3,7 @@ namespace Wikibase\Dumpers; use InvalidArgumentException; +use MWContentSerializationException; use MWException; use Wikibase\DataModel\Entity\EntityId; use Wikibase\EntityIdPager; @@ -235,10 +236,15 @@ } try { - $entity = $this-entityLookup-getEntity( $entityId ); + try { + $entity = $this-entityLookup-getEntity( $entityId ); - if ( !$entity ) { - throw new StorageException( 'Entity not found: ' . $entityId-getSerialization() ); + if ( !$entity ) { + throw new StorageException( 'Entity not found: ' . $entityId-getSerialization() ); + } + } catch( MWContentSerializationException $ex ) { + throw new StorageException( 'Deserialization error for ' + . $entityId-getSerialization() ); } $data = $this-entitySerializer-getSerialized( $entity ); diff --git a/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php b/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php index 1e6efcc..3797569 100644 --- a/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php +++ b/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php @@ -2,6 +2,7 @@ namespace Wikibase\Test\Dumpers; +use MWContentSerializationException; use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\EntityId; @@ -172,6 +173,49 @@ $this-testTypeFilterDump( $ids, null, $ids ); } + /** +* @dataProvider idProvider +*/ + public function testGenerateDump_HandlesMWContentSerializationException( array $ids ) { + $jsonDumper = $this-getJsonDumperWithExceptionHandler( $ids ); + $pager = $this-makeIdPager( $ids ); + + ob_start(); + $jsonDumper-generateDump( $pager ); + $json = ob_get_clean(); + + $data = json_decode( $json, true ); + $this-assertEquals( array(), $data ); + } + + private function getJsonDumperWithExceptionHandler( array $ids ) { + $entityLookup = $this-getEntityLookupThrowsMWContentSerializationException(); + $out = fopen( 'php://output', 'w' ); + $serializer = new DispatchingEntitySerializer( $this-serializerFactory ); + + $jsonDumper = new JsonDumpGenerator( $out, $entityLookup, $serializer ); + + $exceptionHandler = $this-getMock( 'Wikibase\Lib\Reporting\ExceptionHandler' ); + $exceptionHandler-expects( $this-exactly( count( $ids ) ) ) + -method( 'handleException' ); + + $jsonDumper-setExceptionHandler( $exceptionHandler ); + + return $jsonDumper; + } + + private function getEntityLookupThrowsMWContentSerializationException() { + $entityLookup = $this-getMock( 'Wikibase\Lib\Store\EntityLookup' ); + $entityLookup-expects( $this-any() ) + -method( 'getEntity' ) + -will( $this-returnCallback( function ( EntityId $id ) { + throw new MWContentSerializationException( 'cannot deserialize!' ); + } + ) ); + + return $entityLookup; + } + public static function idProvider() { $p10 = new PropertyId( 'P10' ); $q30 = new ItemId( 'Q30' ); -- To view, visit
[MediaWiki-commits] [Gerrit] protected - private in JsonDumpGenerator - change (mediawiki...Wikibase)
Tobias Gritschacher has submitted this change and it was merged. Change subject: protected - private in JsonDumpGenerator .. protected - private in JsonDumpGenerator Change-Id: I385b8739c3dffb73d93f71710cf34cf113561516 --- M repo/includes/Dumpers/JsonDumpGenerator.php 1 file changed, 9 insertions(+), 9 deletions(-) Approvals: WikidataJenkins: Verified Jeroen De Dauw: Looks good to me, approved jenkins-bot: Checked diff --git a/repo/includes/Dumpers/JsonDumpGenerator.php b/repo/includes/Dumpers/JsonDumpGenerator.php index 0843a58..30f0d3f 100644 --- a/repo/includes/Dumpers/JsonDumpGenerator.php +++ b/repo/includes/Dumpers/JsonDumpGenerator.php @@ -39,27 +39,27 @@ /** * @var resource File handle for output */ - protected $out; + private $out; /** * @var Serializer */ - protected $entitySerializer; + private $entitySerializer; /** * @var EntityLookup */ - protected $entityLookup; + private $entityLookup; /** * @var int Total number of shards a request should be split into */ - protected $shardingFactor = 1; + private $shardingFactor = 1; /** * @var int Number of the requested shard */ - protected $shard = 0; + private $shard = 0; /** * @var bool @@ -69,17 +69,17 @@ /** * @var string|null */ - protected $entityType = null; + private $entityType = null; /** * @var MessageReporter */ - protected $progressReporter; + private $progressReporter; /** * @var ExceptionHandler */ - protected $exceptionHandler; + private $exceptionHandler; /** * @param resource $out @@ -229,7 +229,7 @@ * @param EntityId[] $entityIds * @param int $dumpCount The number of entities already dumped (will be updated). */ - protected function dumpEntities( array $entityIds, $dumpCount ) { + private function dumpEntities( array $entityIds, $dumpCount ) { foreach ( $entityIds as $entityId ) { if ( !$this-idMatchesFilters( $entityId ) ) { continue; -- To view, visit https://gerrit.wikimedia.org/r/155521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I385b8739c3dffb73d93f71710cf34cf113561516 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] elasticsearch: decrease ganglia stats timeout - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/155703 Change subject: elasticsearch: decrease ganglia stats timeout .. elasticsearch: decrease ganglia stats timeout this avoids tying gmond up and missing heartbeats and so on, elasticsearch stats might go missing in the process but at least we get the basic metrics back. see also https://github.com/elasticsearch/elasticsearch/issues/7385 Change-Id: I328eb2624c12e1fb3dd822c508f9de4845c157be --- M modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/155703/1 diff --git a/modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py b/modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py index 3842625..21c6d24 100644 --- a/modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py +++ b/modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py @@ -16,6 +16,7 @@ import urllib2 from functools import partial +URLOPEN_TIMEOUT = 0.5 # Used to merge stat descriptions def merge(skel, stat): @@ -426,7 +427,7 @@ def load(url): -return json.load(urllib2.urlopen(url, None, 2)) +return json.load(urllib2.urlopen(url, None, URLOPEN_TIMEOUT)) def update_result(data): -- To view, visit https://gerrit.wikimedia.org/r/155703 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I328eb2624c12e1fb3dd822c508f9de4845c157be Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] elasticsearch: decrease ganglia stats timeout - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: elasticsearch: decrease ganglia stats timeout .. elasticsearch: decrease ganglia stats timeout this avoids tying gmond up and missing heartbeats and so on, elasticsearch stats might go missing in the process but at least we get the basic metrics back. see also https://github.com/elasticsearch/elasticsearch/issues/7385 Change-Id: I328eb2624c12e1fb3dd822c508f9de4845c157be --- M modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py b/modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py index 3842625..783ecb2 100644 --- a/modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py +++ b/modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py @@ -16,6 +16,8 @@ import urllib2 from functools import partial +URLOPEN_TIMEOUT = 0.5 + # Used to merge stat descriptions def merge(skel, stat): @@ -426,7 +428,7 @@ def load(url): -return json.load(urllib2.urlopen(url, None, 2)) +return json.load(urllib2.urlopen(url, None, URLOPEN_TIMEOUT)) def update_result(data): -- To view, visit https://gerrit.wikimedia.org/r/155703 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I328eb2624c12e1fb3dd822c508f9de4845c157be Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@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] Never embed the context when an inspector is present - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/155704 Change subject: Never embed the context when an inspector is present .. Never embed the context when an inspector is present Re-applies Ida871380 which was reverted during refactoring: Having an inspector launch over the context you are inspecting seems like a bad idea. Bug: 66542 Change-Id: I9fc6fabb6a04cc7847f25556674d6e09dcf012a0 --- M src/ui/ve.ui.Context.js M src/ui/ve.ui.DesktopContext.js 2 files changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/04/155704/1 diff --git a/src/ui/ve.ui.Context.js b/src/ui/ve.ui.Context.js index 82ea4bc..165d503 100644 --- a/src/ui/ve.ui.Context.js +++ b/src/ui/ve.ui.Context.js @@ -190,6 +190,21 @@ }; /** + * Check if current content is inspectable. + * + * @return {boolean} Content is inspectable + */ +ve.ui.Context.prototype.hasInspector = function () { + var i, availableTools = this.availableTools; + for ( i = availableTools.length - 1; i = 0; i-- ) { + if ( availableTools[i].tool.prototype instanceof ve.ui.InspectorTool ) { + return true; + } + } + return false; +}; + +/** * Get available tools. * * Result is cached, and cleared when the model or selection changes. diff --git a/src/ui/ve.ui.DesktopContext.js b/src/ui/ve.ui.DesktopContext.js index 91a6cf0..3290aec 100644 --- a/src/ui/ve.ui.DesktopContext.js +++ b/src/ui/ve.ui.DesktopContext.js @@ -133,7 +133,7 @@ var dim, node = this.surface.getView().getFocusedNode(); - if ( node node.isFocusable() ) { + if ( node node.isFocusable() !this.hasInspector() ) { dim = node.getDimensions(); return ( // HACK: `5` and `10` are estimates of what `0.25em` and `0.5em` (the margins of the -- To view, visit https://gerrit.wikimedia.org/r/155704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9fc6fabb6a04cc7847f25556674d6e09dcf012a0 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use and test SVGMessageGroup::register - change (mediawiki...TranslateSvg)
Jarry1250 has submitted this change and it was merged. Change subject: Use and test SVGMessageGroup::register .. Use and test SVGMessageGroup::register Code added in previous commit I7842792 but was previously unused pending implementation of proper unit tests. Change-Id: Iac01b0899c09d07950b400076f2ce6f18dfbd09d --- M tests/phpunit/SVGMessageGroupTest.php M tests/phpunit/TranslateSvgTestCase.php 2 files changed, 15 insertions(+), 6 deletions(-) Approvals: Jarry1250: Verified; Looks good to me, approved diff --git a/tests/phpunit/SVGMessageGroupTest.php b/tests/phpunit/SVGMessageGroupTest.php index cf31fa5..2329825 100644 --- a/tests/phpunit/SVGMessageGroupTest.php +++ b/tests/phpunit/SVGMessageGroupTest.php @@ -18,6 +18,19 @@ self::prepareFile( __DIR__ . '/../data/Speech_bubbles.svg' ); } + public function testRegistration() { + // In order that a lot of the tests function, prepareFile() calls register() + // but we should check now that it's worked + $name = str_replace( '_', ' ', self::$name ); + $group = MessageGroups::getGroup( $name ); + + // $group is either of type SVGMessageGroup (success) or null (failure) + $this-assertInstanceOf( 'SVGMessageGroup', $group ); + + // This should be equivalent to running: + $this-assertInstanceOf( 'SVGMessageGroup', $this-messageGroup ); + } + public function testGetSourceLanguage() { $this-assertEquals( 'en', diff --git a/tests/phpunit/TranslateSvgTestCase.php b/tests/phpunit/TranslateSvgTestCase.php index 88f70bb..005efca 100644 --- a/tests/phpunit/TranslateSvgTestCase.php +++ b/tests/phpunit/TranslateSvgTestCase.php @@ -43,12 +43,8 @@ die( 'Could not upload test file ' . $name ); } - $dbw = wfGetDB( DB_MASTER ); - $table = 'translate_svg'; - $row = array( 'ts_page_id' = $title-getArticleId() ); - $dbw-insert( $table, $row, __METHOD__, array( 'IGNORE' ) ); - MessageGroups::clearCache(); - MessageIndex::singleton()-rebuild(); + $messageGroup = new SVGMessageGroup( $name ); + $messageGroup-register( false ); self::$name = $name; } -- To view, visit https://gerrit.wikimedia.org/r/153332 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac01b0899c09d07950b400076f2ce6f18dfbd09d Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/TranslateSvg Gerrit-Branch: master Gerrit-Owner: Jarry1250 jarry1...@gmail.com Gerrit-Reviewer: Jarry1250 jarry1...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug 69889-unexpected keyword argument 'site' while moving ca... - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Bug 69889-unexpected keyword argument 'site' while moving category .. Bug 69889-unexpected keyword argument 'site' while moving category Removed invalid 'site' keyword used when Category() is instantiated in Page.change_category(). Change-Id: I184b97000c9ce6626f17f176a68772fd90b908f5 --- M pywikibot/page.py 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/page.py b/pywikibot/page.py index 8c7afe8..14c5682 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -1705,8 +1705,7 @@ else: if newCat: cats[cats.index(oldCat)] = Category(site, newCat.title(), -sortKey=sortKey, -site=self.site) +sortKey=sortKey) else: cats.pop(cats.index(oldCat)) oldtext = self.get(get_redirect=True) -- To view, visit https://gerrit.wikimedia.org/r/155699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I184b97000c9ce6626f17f176a68772fd90b908f5 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Mpaa mpaa.w...@gmail.com Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Ricordisamoa ricordisa...@openmailbox.org Gerrit-Reviewer: Xqt i...@gno.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] Prevent multiple api requests from firing - change (mediawiki...GettingStarted)
jenkins-bot has submitted this change and it was merged. Change subject: Prevent multiple api requests from firing .. Prevent multiple api requests from firing Bug: 69719 Change-Id: Ic8c2fe52aa2a0c1ae4a5ebd77859f0ce62107cd4 --- M resources/lightbulb/lightbulb.flyout.js 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/lightbulb/lightbulb.flyout.js b/resources/lightbulb/lightbulb.flyout.js index bfe28f0..d835e7c 100644 --- a/resources/lightbulb/lightbulb.flyout.js +++ b/resources/lightbulb/lightbulb.flyout.js @@ -24,7 +24,8 @@ suggestionRenderer = new mw.gettingStarted.lightbulb.SuggestionRenderer(), currentFlyoutPageIndex, // 0-based mwConfig = mw.config.get( [ 'wgArticleId', 'wgUserId' ] ), - $lightbulb = $( '.mw-gettingstarted-personal-tool-recommendations' ); + $lightbulb = $( '.mw-gettingstarted-personal-tool-recommendations' ), + requestingSuggestions = false; function renderFlyout() { @@ -214,6 +215,11 @@ userId: mwConfig.wgUserId } ); + // Prevent multiple api requests from firing + if ( requestingSuggestions ) { + return; + } + if ( $flyout.data( 'has-suggestions' ) ) { if ( $flyout.is( ':visible' ) ) { hideFlyout( $flyout ); @@ -224,6 +230,7 @@ return; } + requestingSuggestions = true; api = new mw.gettingStarted.Api(); api.getLastArticleUserEdited( mw.user.getName() ) .done( function ( title ) { @@ -238,6 +245,7 @@ positionFlyout( $flyout, $lightbulb ); $flyout.data( 'has-suggestions', true ); + requestingSuggestions = false; showFlyout( $flyout ); } ); -- To view, visit https://gerrit.wikimedia.org/r/155431 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic8c2fe52aa2a0c1ae4a5ebd77859f0ce62107cd4 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Robmoen rm...@wikimedia.org Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: Swalling swall...@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] filippo: let .bash_profile call .bashrc - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/155705 Change subject: filippo: let .bash_profile call .bashrc .. filippo: let .bash_profile call .bashrc Change-Id: I1e3548706d724a873ec442f68705e09bb9f905f9 --- M modules/admin/files/home/filippo/.bash_profile M modules/admin/files/home/filippo/.bashrc 2 files changed, 12 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/05/155705/1 diff --git a/modules/admin/files/home/filippo/.bash_profile b/modules/admin/files/home/filippo/.bash_profile index e9e6cfe..09a73a8 100644 --- a/modules/admin/files/home/filippo/.bash_profile +++ b/modules/admin/files/home/filippo/.bash_profile @@ -1,8 +1,2 @@ # Use .bashrc [[ -r ~/.bashrc ]] . ~/.bashrc - -RESET=$(tput sgr0) -BRIGHT=$(tput bold) -RED=$(tput setaf 1) -WHITE=$(tput setaf 7) -export PS1='\[$BRIGHT\]\[$RED\]\h\[$RESET\]:\w\[$BRIGHT\]\[$WHITE\]\$\[$RESET\] ' diff --git a/modules/admin/files/home/filippo/.bashrc b/modules/admin/files/home/filippo/.bashrc index 84ad6b6..836e441 100644 --- a/modules/admin/files/home/filippo/.bashrc +++ b/modules/admin/files/home/filippo/.bashrc @@ -3,7 +3,18 @@ # quit on one screen, interpret color escape, do not clear screen export LESS=FRX +# history settings +HISTCONTROL=ignoreboth +HISTSIZE=1000 +HISTFILESIZE=5000 +HISTTIMEFORMAT=%FT%TZ +shopt -s histappend + # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] eval $(SHELL=/bin/sh lesspipe) -HISTCONTROL=ignoreboth +RESET=$(tput sgr0) +BRIGHT=$(tput bold) +RED=$(tput setaf 1) +WHITE=$(tput setaf 7) +export PS1='\[$BRIGHT\]\[$RED\]\h\[$RESET\]:\w\[$BRIGHT\]\[$WHITE\]\$\[$RESET\] ' -- To view, visit https://gerrit.wikimedia.org/r/155705 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e3548706d724a873ec442f68705e09bb9f905f9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] filippo: let .bash_profile call .bashrc - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: filippo: let .bash_profile call .bashrc .. filippo: let .bash_profile call .bashrc Change-Id: I1e3548706d724a873ec442f68705e09bb9f905f9 --- M modules/admin/files/home/filippo/.bash_profile M modules/admin/files/home/filippo/.bashrc 2 files changed, 12 insertions(+), 7 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/modules/admin/files/home/filippo/.bash_profile b/modules/admin/files/home/filippo/.bash_profile index e9e6cfe..09a73a8 100644 --- a/modules/admin/files/home/filippo/.bash_profile +++ b/modules/admin/files/home/filippo/.bash_profile @@ -1,8 +1,2 @@ # Use .bashrc [[ -r ~/.bashrc ]] . ~/.bashrc - -RESET=$(tput sgr0) -BRIGHT=$(tput bold) -RED=$(tput setaf 1) -WHITE=$(tput setaf 7) -export PS1='\[$BRIGHT\]\[$RED\]\h\[$RESET\]:\w\[$BRIGHT\]\[$WHITE\]\$\[$RESET\] ' diff --git a/modules/admin/files/home/filippo/.bashrc b/modules/admin/files/home/filippo/.bashrc index 84ad6b6..836e441 100644 --- a/modules/admin/files/home/filippo/.bashrc +++ b/modules/admin/files/home/filippo/.bashrc @@ -3,7 +3,18 @@ # quit on one screen, interpret color escape, do not clear screen export LESS=FRX +# history settings +HISTCONTROL=ignoreboth +HISTSIZE=1000 +HISTFILESIZE=5000 +HISTTIMEFORMAT=%FT%TZ +shopt -s histappend + # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] eval $(SHELL=/bin/sh lesspipe) -HISTCONTROL=ignoreboth +RESET=$(tput sgr0) +BRIGHT=$(tput bold) +RED=$(tput setaf 1) +WHITE=$(tput setaf 7) +export PS1='\[$BRIGHT\]\[$RED\]\h\[$RESET\]:\w\[$BRIGHT\]\[$WHITE\]\$\[$RESET\] ' -- To view, visit https://gerrit.wikimedia.org/r/155705 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e3548706d724a873ec442f68705e09bb9f905f9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make focusables behave correctly when $element != $focusable - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/155706 Change subject: Make focusables behave correctly when $element != $focusable .. Make focusables behave correctly when $element != $focusable When there is more to the $element than $focusable, handle mousedown events on in and prevent default so the browser doesn't try and place the cursor inside the ce=false element. Also use cursor:default. Change-Id: I450537fd9239cef86838f22c082f0934f99a3487 --- M src/ce/styles/nodes/ve.ce.FocusableNode.css M src/ce/ve.ce.FocusableNode.js 2 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/06/155706/1 diff --git a/src/ce/styles/nodes/ve.ce.FocusableNode.css b/src/ce/styles/nodes/ve.ce.FocusableNode.css index b500a97..ded1816 100644 --- a/src/ce/styles/nodes/ve.ce.FocusableNode.css +++ b/src/ce/styles/nodes/ve.ce.FocusableNode.css @@ -13,6 +13,10 @@ opacity: 0.15; } +.ve-ce-focusableNode { + cursor: default; +} + .ve-ce-focusableNode-dropMarker { height: 1px; background: #999; diff --git a/src/ce/ve.ce.FocusableNode.js b/src/ce/ve.ce.FocusableNode.js index 73c10ec..f444263 100644 --- a/src/ce/ve.ce.FocusableNode.js +++ b/src/ce/ve.ce.FocusableNode.js @@ -105,6 +105,15 @@ 'mouseenter.ve-ce-focusableNode': ve.bind( this.onFocusableMouseEnter, this ), 'mousedown.ve-ce-focusableNode touchend.ve-ce-focusableNode': ve.bind( this.onFocusableMouseDown, this ) } ); + // $element is ce=false so make sure nothing happens when you click + // on it, just in case the browser decides to do something. + // If $element == $focusable then this can be skipped as $focusable already + // handles mousedown events. + if ( !this.$element.is( this.$focusable ) ) { + this.$element.on( { + 'mousedown.ve-ce-focusableNode': function ( e ) { e.preventDefault(); } + } ); + } this.isSetup = true; }; @@ -122,6 +131,7 @@ // Events this.$focusable.off( '.ve-ce-focusableNode' ); + this.$element.off( '.ve-ce-focusableNode' ); // Highlights this.clearHighlights(); -- To view, visit https://gerrit.wikimedia.org/r/155706 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I450537fd9239cef86838f22c082f0934f99a3487 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Optimize API calls so we don't request unneeded properties. - change (mediawiki...GettingStarted)
jenkins-bot has submitted this change and it was merged. Change subject: Optimize API calls so we don't request unneeded properties. .. Optimize API calls so we don't request unneeded properties. This allows dropping 'pageimage' and 4 revision properties with no change to the user interface. Change-Id: I27e626f1876f79a42a35219fc3856713de2a0618 --- M resources/ext.gettingstarted.api.js 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/ext.gettingstarted.api.js b/resources/ext.gettingstarted.api.js index 6d34d4b..40278a6 100644 --- a/resources/ext.gettingstarted.api.js +++ b/resources/ext.gettingstarted.api.js @@ -85,7 +85,9 @@ pilimit: options.count, // Same as ggspcount // During testing we found doubling to be appropriate pithumbsize: options.thumbSize * 2, - prop: 'pageimages|revisions' + prop: 'pageimages|revisions', + piprop: 'thumbnail', + rvprop: 'timestamp' }; this.get( params ).done( function ( resp ) { -- To view, visit https://gerrit.wikimedia.org/r/155656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I27e626f1876f79a42a35219fc3856713de2a0618 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: Swalling swall...@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] contint: switch localvhost to apache::conf - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/155707 Change subject: contint: switch localvhost to apache::conf .. contint: switch localvhost to apache::conf /etc/apache2/conf.d/ no more exists on Trusty. Luckily apache::conf is a thin wrapper that let us move the definition under conf-available and conf-enabled. Should fix an error on integration-slave1006-trusty.eqiad.wmflabs because /etc/apache2/conf.d/ does not exist. Bug: 68256 Change-Id: I76eaf3661dc7e34d9737892172f76a1e592c34e0 --- M modules/contint/manifests/localvhost.pp 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/07/155707/1 diff --git a/modules/contint/manifests/localvhost.pp b/modules/contint/manifests/localvhost.pp index 2acafcc..8d97b15 100644 --- a/modules/contint/manifests/localvhost.pp +++ b/modules/contint/manifests/localvhost.pp @@ -35,7 +35,8 @@ default = true, } -file { /etc/apache2/conf.d/listen-localhost-${port}: -content = template('contint/apache/listen.erb'), +apache::conf { listen-localhost-${port}: +content = template('contint/apache/listen.erb'), +replaces = /etc/apache2/conf.d/listen-localhost-${port}, } } -- To view, visit https://gerrit.wikimedia.org/r/155707 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I76eaf3661dc7e34d9737892172f76a1e592c34e0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: migrate localvhost to apache::site - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/155708 Change subject: contint: migrate localvhost to apache::site .. contint: migrate localvhost to apache::site Change-Id: I861ec6f09fa353acdbfd4f9addc235e32d64437d --- M modules/contint/manifests/localvhost.pp 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/08/155708/1 diff --git a/modules/contint/manifests/localvhost.pp b/modules/contint/manifests/localvhost.pp index 8d97b15..1c84552 100644 --- a/modules/contint/manifests/localvhost.pp +++ b/modules/contint/manifests/localvhost.pp @@ -20,10 +20,7 @@ $log_prefix = $name, ){ -file { /etc/apache2/sites-enabled/${name}.localhost: -mode= '0444', -owner = 'root', -group = 'root', +apache::site { ${name}.localhost: content = template('contint/apache/localvhost.erb'), } -- To view, visit https://gerrit.wikimedia.org/r/155708 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I861ec6f09fa353acdbfd4f9addc235e32d64437d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Modify check_ip to consider internal proxied requests as valid - change (analytics/webstatscollector)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/155709 Change subject: Modify check_ip to consider internal proxied requests as valid .. Modify check_ip to consider internal proxied requests as valid We would like to run webstatscollector using the varnish logs in Kafka. Unlike udp2log, this stream does not contain requests from the nginx SSL and IPv6 proxies. Instead of throwing out all varnish requests that have internal RemoteAddresses, we now consider if the X-Forwarded-For header is set. If it is, we (naively) assume that the request is a valid external request that has been proxied by a WMF internal node. Change-Id: Id54308de10d95caf2b5acaa1022385ff430c1856 --- M filter.c A tests/entry-internal-not-proxied.txt A tests/entry-internal-proxied.txt M tests/test.sh 4 files changed, 62 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/webstatscollector refs/changes/09/155709/1 diff --git a/filter.c b/filter.c index ad0eb61..4f314aa 100644 --- a/filter.c +++ b/filter.c @@ -52,14 +52,37 @@ 91.198.174., NULL}; -bool check_ip(char *ip) { + +/** + * Returns false if this request should be + * counted based on request IP and X-Forwarded-For. + * Returns false if the request should be + * discarded. + */ +bool check_ip(char *ip, char *xff) { char **prefix=dupes; - for (;*prefix;prefix++) { - if (!strncmp(*prefix,ip,strlen(*prefix))) - return false; + + bool ip_is_internal = false; + bool xff_is_set = (xff != NULL strncmp(-,xff,1) != 0); + + // Check if ip is a WMF public internal IP. + for (; *prefix; prefix++) { + if (strncmp(*prefix, ip, strlen(*prefix)) == 0) { + ip_is_internal = true; + break; + } } - return true; + + /* Throw away anything that is internal + and does not have XFF set. Internal + requests with XFF set are most likely + externally proxied requests (SSL or IPv6) */ + if (ip_is_internal !xff_is_set) + return false; + else + return true; } + const struct project { char *full; @@ -169,28 +192,35 @@ setgroups(1,gidlist); setuid(65534); - char *undef,*ip,*url, *size; + char *undef, *ip, *url, *size, *xff; while (fgets(line,LINESIZE-1,stdin)) { bzero(info,sizeof(info)); /* Tokenize the log line */ TOKENIZE(line,\t); /* server */ FIELD; /* id? */ FIELD; /* timestamp */ - FIELD; /* ??? */ + FIELD; /* time-to-first-byte */ info.ip=FIELD; /* IP address! */ - FIELD; /* status */ + FIELD; /* HTTP status */ info.size= FIELD; /* object size */ + FIELD; /* HTTP method */ + url=FIELD; /* request URI */ FIELD; - url=FIELD; + FIELD; /* content_type */ + FIELD; /* referer */ + xff=FIELD; /* x-forwarded-for */ + if (!url || !info.ip || !info.size) continue; + replace_space(url); - if (!check_ip(info.ip)) + if (!check_ip(info.ip,xff)) continue; if (!parse_url(url,info)) continue; if (!check_project(info)) continue; + printf(%s%s 1 %s %s\n,info.language, info.suffix, info.size, info.title); } } diff --git a/tests/entry-internal-not-proxied.txt b/tests/entry-internal-not-proxied.txt new file mode 100644 index 000..37ed132 --- /dev/null +++ b/tests/entry-internal-not-proxied.txt @@ -0,0 +1 @@ +cp1063.eqiad.wmnet 1085029940092014-08-21T19:52:03 0.62466 208.80.154.14 -/200 0 GET http://en.wikipedia.org/wiki/Neutron - - - - check_http/v1.4.15 (nagios-plugins 1.4.15) - - diff --git a/tests/entry-internal-proxied.txt b/tests/entry-internal-proxied.txt new file mode 100644 index 000..7e5440d --- /dev/null +++ b/tests/entry-internal-proxied.txt @@ -0,0 +1 @@ +cp1066.eqiad.wmnet 25134406711 2014-08-21T19:34:07 0.746407509 208.80.154.133 miss/2001064GET http://en.wikipedia.org/wiki/Neutron- application/json; charset=utf-8 https://en.wikipedia.org/wiki/Polikarpov_I-16 5.4.3.2 Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
[MediaWiki-commits] [Gerrit] Modify check_ip to consider internal proxied requests as valid - change (analytics/webstatscollector)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/155710 Change subject: Modify check_ip to consider internal proxied requests as valid .. Modify check_ip to consider internal proxied requests as valid We would like to run webstatscollector using the varnish logs in Kafka. Unlike udp2log, this stream does not contain requests from the nginx SSL and IPv6 proxies. Instead of throwing out all varnish requests that have internal RemoteAddresses, we now consider if the X-Forwarded-For header is set. If it is, we (naively) assume that the request is a valid external request that has been proxied by a WMF internal node. Change-Id: Id54308de10d95caf2b5acaa1022385ff430c1856 --- M filter.c A tests/entry-internal-not-proxied.txt A tests/entry-internal-proxied.txt M tests/test.sh 4 files changed, 62 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/webstatscollector refs/changes/10/155710/1 diff --git a/filter.c b/filter.c index ad0eb61..151fccc 100644 --- a/filter.c +++ b/filter.c @@ -52,14 +52,37 @@ 91.198.174., NULL}; -bool check_ip(char *ip) { + +/** + * Returns true if this request should be + * counted based on request IP and X-Forwarded-For. + * Returns false if the request should be + * discarded. + */ +bool check_ip(char *ip, char *xff) { char **prefix=dupes; - for (;*prefix;prefix++) { - if (!strncmp(*prefix,ip,strlen(*prefix))) - return false; + + bool ip_is_internal = false; + bool xff_is_set = (xff != NULL strncmp(-,xff,1) != 0); + + // Check if ip is a WMF public internal IP. + for (; *prefix; prefix++) { + if (strncmp(*prefix, ip, strlen(*prefix)) == 0) { + ip_is_internal = true; + break; + } } - return true; + + /* Throw away anything that is internal + and does not have XFF set. Internal + requests with XFF set are most likely + externally proxied requests (SSL or IPv6) */ + if (ip_is_internal !xff_is_set) + return false; + else + return true; } + const struct project { char *full; @@ -169,28 +192,35 @@ setgroups(1,gidlist); setuid(65534); - char *undef,*ip,*url, *size; + char *undef, *ip, *url, *size, *xff; while (fgets(line,LINESIZE-1,stdin)) { bzero(info,sizeof(info)); /* Tokenize the log line */ TOKENIZE(line,\t); /* server */ FIELD; /* id? */ FIELD; /* timestamp */ - FIELD; /* ??? */ + FIELD; /* time-to-first-byte */ info.ip=FIELD; /* IP address! */ - FIELD; /* status */ + FIELD; /* HTTP status */ info.size= FIELD; /* object size */ + FIELD; /* HTTP method */ + url=FIELD; /* request URI */ FIELD; - url=FIELD; + FIELD; /* content_type */ + FIELD; /* referer */ + xff=FIELD; /* x-forwarded-for */ + if (!url || !info.ip || !info.size) continue; + replace_space(url); - if (!check_ip(info.ip)) + if (!check_ip(info.ip,xff)) continue; if (!parse_url(url,info)) continue; if (!check_project(info)) continue; + printf(%s%s 1 %s %s\n,info.language, info.suffix, info.size, info.title); } } diff --git a/tests/entry-internal-not-proxied.txt b/tests/entry-internal-not-proxied.txt new file mode 100644 index 000..37ed132 --- /dev/null +++ b/tests/entry-internal-not-proxied.txt @@ -0,0 +1 @@ +cp1063.eqiad.wmnet 1085029940092014-08-21T19:52:03 0.62466 208.80.154.14 -/200 0 GET http://en.wikipedia.org/wiki/Neutron - - - - check_http/v1.4.15 (nagios-plugins 1.4.15) - - diff --git a/tests/entry-internal-proxied.txt b/tests/entry-internal-proxied.txt new file mode 100644 index 000..7e5440d --- /dev/null +++ b/tests/entry-internal-proxied.txt @@ -0,0 +1 @@ +cp1066.eqiad.wmnet 25134406711 2014-08-21T19:34:07 0.746407509 208.80.154.133 miss/2001064GET http://en.wikipedia.org/wiki/Neutron- application/json; charset=utf-8 https://en.wikipedia.org/wiki/Polikarpov_I-16 5.4.3.2 Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
[MediaWiki-commits] [Gerrit] Render the lightbulb icon correctly in IE9 - change (mediawiki...GettingStarted)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/155711 Change subject: Render the lightbulb icon correctly in IE9 .. Render the lightbulb icon correctly in IE9 Change-Id: I957c7f58398c2002457f8cc2554bf2febca39a8d --- M resources/lightbulb/lightbulb.flyout.less 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/11/155711/1 diff --git a/resources/lightbulb/lightbulb.flyout.less b/resources/lightbulb/lightbulb.flyout.less index eafef49..58f2480 100644 --- a/resources/lightbulb/lightbulb.flyout.less +++ b/resources/lightbulb/lightbulb.flyout.less @@ -15,6 +15,7 @@ height: 13px; position: absolute; .background-image-svg('images/lightbulb.svg', 'images/lightbulb.png'); + background-size: 100%; top: -1px; left: 0; } -- To view, visit https://gerrit.wikimedia.org/r/155711 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I957c7f58398c2002457f8cc2554bf2febca39a8d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Phuedx g...@samsmith.io ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add asw-[a-c]-codfw.mgmt.codfw.wmnet to RANCID - change (operations/puppet)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/155712 Change subject: Add asw-[a-c]-codfw.mgmt.codfw.wmnet to RANCID .. Add asw-[a-c]-codfw.mgmt.codfw.wmnet to RANCID Change-Id: I4554e93c754c137f18cadc70a9a6d04cd502f28c --- M files/misc/rancid/core/router.db 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/12/155712/1 diff --git a/files/misc/rancid/core/router.db b/files/misc/rancid/core/router.db index 690806f..d4ea46f 100644 --- a/files/misc/rancid/core/router.db +++ b/files/misc/rancid/core/router.db @@ -27,5 +27,8 @@ mr1-ulsfo.mgmt.ulsfo.wmnet:juniper:up: cr1-codfw.wikimedia.org:juniper:up: cr2-codfw.wikimedia.org:juniper:up: +asw-a-codfw.mgmt.codfw.wmnet:juniper:up: +asw-b-codfw.mgmt.codfw.wmnet:juniper:up: +asw-c-codfw.mgmt.codfw.wmnet:juniper:up: asw-d-codfw.mgmt.codfw.wmnet:juniper:up: mr1-esams.wikimedia.org:juniper:up: -- To view, visit https://gerrit.wikimedia.org/r/155712 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4554e93c754c137f18cadc70a9a6d04cd502f28c 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 server-side signup experiment event logging - change (mediawiki...GettingStarted)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/155713 Change subject: Remove server-side signup experiment event logging .. Remove server-side signup experiment event logging Stop logging the following events: * TrackedPageContentSaveComplete * SignupExpAccountCreationComplete * SignupExpAccountCreationImpression Change-Id: I69f4c643841df78622943eba1882fd21611726e3 --- M GettingStarted.php M Hooks.php 2 files changed, 0 insertions(+), 78 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/13/155713/1 diff --git a/GettingStarted.php b/GettingStarted.php index 0ba0219..c1c012a 100644 --- a/GettingStarted.php +++ b/GettingStarted.php @@ -432,9 +432,6 @@ $wgHooks[ 'GetPreferences' ][] = 'GettingStarted\Hooks::onGetPreferences'; $wgHooks[ 'UserLogoutComplete'][] = 'GettingStarted\Hooks::onUserLogoutComplete'; $wgHooks[ 'ResourceLoaderTestModules' ][] = 'GettingStarted\Hooks::onResourceLoaderTestModules'; -$wgHooks[ 'PageContentSaveComplete' ][] = 'GettingStarted\Hooks::onPageContentSaveComplete'; -$wgHooks[ 'AddNewAccount' ][] = 'GettingStarted\Hooks::onAddNewAccount'; -$wgHooks[ 'UserCreateForm' ][] = 'GettingStarted\Hooks::onUserCreateForm'; $wgHooks[ 'PersonalUrls' ][] = 'GettingStarted\Hooks::onPersonalUrls'; $wgExtensionFunctions[] = 'GettingStarted\Hooks::onSetup'; diff --git a/Hooks.php b/Hooks.php index a76776e..3a98276 100644 --- a/Hooks.php +++ b/Hooks.php @@ -488,34 +488,6 @@ } /** -* Log server-side event on successful page edit. -* @see https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete -* @see https://meta.wikimedia.org/wiki/Schema:TrackedPageContentSaveComplete -*/ - public static function onPageContentSaveComplete( $article, $user, $content, $summary, - $isMinor, $isWatch, $section, $flags, $revision, $status, $baseRevId ) { - - global $wgRequest; - - if ( $revision === null ) { - return true; - } - - $revId = $revision-getId(); - $event = array( - 'revId' = $revId, - ); - - $gettingStartedToken = self::getGettingStartedToken(); - if ( $gettingStartedToken !== null ) { - $event['token'] = $gettingStartedToken; - } - - \EventLogging::logEvent( 'TrackedPageContentSaveComplete', 8535426, $event ); - return true; - } - - /** * If the site is a Wikipedia, this is called to specify that Wikipedia-specific * versions will be used for certain keys. * @@ -547,53 +519,6 @@ ) ) ) { $lckey = {$lckey}-wikipedia; } - - return true; - } - - /** -* Logs a successful account creation, including the token -* -* @param User $user Newly created user -* @param boolean $byEmail True if and only if created by email -* -* @return bool Always true -*/ - public static function onAddNewAccount( User $user, $byEmail ) { - $gettingStartedToken = self::getGettingStartedToken(); - - $event = array( - 'userId' = $user-getId() - ); - - if ( $gettingStartedToken !== null ) { - $event['token'] = $gettingStartedToken; - } - - \EventLogging::logEvent( 'SignupExpAccountCreationComplete', 8539421, $event ); - - return true; - } - - /** -* Logs an impression on the signup form -* -* @param $template Template for form (unused) -* -* @return bool Always true -*/ - public static function onUserCreateForm( $template ) { - $gettingStartedToken = self::getGettingStartedToken(); - - $event = array(); - - if ( $gettingStartedToken !== null ) { - $event['token'] = $gettingStartedToken; - } - - // Cast so it's not serialized to []; temporary workaround for - // https://bugzilla.wikimedia.org/show_bug.cgi?id=65385 . - \EventLogging::logEvent( 'SignupExpAccountCreationImpression', 8539445, (object) $event ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/155713 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69f4c643841df78622943eba1882fd21611726e3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Phuedx g...@samsmith.io ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] Add asw-[a-c]-codfw.mgmt.codfw.wmnet to RANCID - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Add asw-[a-c]-codfw.mgmt.codfw.wmnet to RANCID .. Add asw-[a-c]-codfw.mgmt.codfw.wmnet to RANCID Change-Id: I4554e93c754c137f18cadc70a9a6d04cd502f28c --- M files/misc/rancid/core/router.db 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/files/misc/rancid/core/router.db b/files/misc/rancid/core/router.db index 690806f..d4ea46f 100644 --- a/files/misc/rancid/core/router.db +++ b/files/misc/rancid/core/router.db @@ -27,5 +27,8 @@ mr1-ulsfo.mgmt.ulsfo.wmnet:juniper:up: cr1-codfw.wikimedia.org:juniper:up: cr2-codfw.wikimedia.org:juniper:up: +asw-a-codfw.mgmt.codfw.wmnet:juniper:up: +asw-b-codfw.mgmt.codfw.wmnet:juniper:up: +asw-c-codfw.mgmt.codfw.wmnet:juniper:up: asw-d-codfw.mgmt.codfw.wmnet:juniper:up: mr1-esams.wikimedia.org:juniper:up: -- To view, visit https://gerrit.wikimedia.org/r/155712 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4554e93c754c137f18cadc70a9a6d04cd502f28c 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] Add cron job to drop old data in HDFS - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Add cron job to drop old data in HDFS .. Add cron job to drop old data in HDFS Change-Id: Ic917ccd027304f5a8a031bd20d8405f8fed30141 --- M manifests/role/analytics/refinery.pp M manifests/site.pp 2 files changed, 4 insertions(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/role/analytics/refinery.pp b/manifests/role/analytics/refinery.pp index e544e40..40a916a 100644 --- a/manifests/role/analytics/refinery.pp +++ b/manifests/role/analytics/refinery.pp @@ -83,7 +83,7 @@ # keep this many days of data $retention_days = 31 cron { 'refinery-drop-webrequest-partitions': -command = export PYTHONPATH=\${PYTHONPATH}:${role::analytics::refinery::path}/python ${role::analytics::refinery::path}/bin/refinery-drop-webrequest-partitions -d ${retention_days} -D wmf ${log_file} 21, +command = export PYTHONPATH=\${PYTHONPATH}:${role::analytics::refinery::path}/python ${role::analytics::refinery::path}/bin/refinery-drop-webrequest-partitions -d ${retention_days} -D wmf_raw -l /wmf/data/raw/webrequest ${log_file} 21, user= 'hdfs', hour= '*/4', } diff --git a/manifests/site.pp b/manifests/site.pp index 4340ab9..1d1181a 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -282,6 +282,9 @@ # HDFS from Kafka. include role::analytics::refinery::camus +# Add cron job to delete old data in HDFS +include role::analytics::refinery::data::drop + # Oozie runs a monitor_done_flag job to make # sure the _SUCCESS done-flag is written # for each hourly webrequest import. This -- To view, visit https://gerrit.wikimedia.org/r/155549 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic917ccd027304f5a8a031bd20d8405f8fed30141 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Jenkins job validation (DO NOT SUBMIT) - change (mediawiki/core)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/155714 Change subject: Jenkins job validation (DO NOT SUBMIT) .. Jenkins job validation (DO NOT SUBMIT) Change-Id: I0cbfadb4363df19f3a3ff6819280e5ccbedc50b9 --- A includes/JENKINS A includes/jenkins-testfile.py A includes/jenkins.erb A includes/jenkins.js A includes/jenkins.php A includes/jenkins.pp A includes/jenkins.rb 7 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/14/155714/1 diff --git a/includes/JENKINS b/includes/JENKINS new file mode 100644 index 000..e69de29 --- /dev/null +++ b/includes/JENKINS diff --git a/includes/jenkins-testfile.py b/includes/jenkins-testfile.py new file mode 100644 index 000..e69de29 --- /dev/null +++ b/includes/jenkins-testfile.py diff --git a/includes/jenkins.erb b/includes/jenkins.erb new file mode 100644 index 000..e69de29 --- /dev/null +++ b/includes/jenkins.erb diff --git a/includes/jenkins.js b/includes/jenkins.js new file mode 100644 index 000..e69de29 --- /dev/null +++ b/includes/jenkins.js diff --git a/includes/jenkins.php b/includes/jenkins.php new file mode 100644 index 000..e69de29 --- /dev/null +++ b/includes/jenkins.php diff --git a/includes/jenkins.pp b/includes/jenkins.pp new file mode 100644 index 000..e69de29 --- /dev/null +++ b/includes/jenkins.pp diff --git a/includes/jenkins.rb b/includes/jenkins.rb new file mode 100644 index 000..e69de29 --- /dev/null +++ b/includes/jenkins.rb -- To view, visit https://gerrit.wikimedia.org/r/155714 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0cbfadb4363df19f3a3ff6819280e5ccbedc50b9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_22 Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Drop left in debugging var_dump from WikiImporter - change (mediawiki/core)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/155715 Change subject: Drop left in debugging var_dump from WikiImporter .. Drop left in debugging var_dump from WikiImporter I found this on accident when searching for a var_dump I forgot somewhere in my own code. We are maintaining production code here, right? Debugging and testing should be somewhere else. Also note the stray print before the var_dump. Change-Id: I98725b277039f55db9ff95399e9559a477b43c26 --- M includes/Import.php 1 file changed, 0 insertions(+), 41 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/15/155715/1 diff --git a/includes/Import.php b/includes/Import.php index e6b5dc2..3880e25 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -429,53 +429,12 @@ return ''; } - # -- - - /** Left in for debugging */ - private function dumpElement() { - static $lookup = null; - if ( !$lookup ) { - $xmlReaderConstants = array( - NONE, - ELEMENT, - ATTRIBUTE, - TEXT, - CDATA, - ENTITY_REF, - ENTITY, - PI, - COMMENT, - DOC, - DOC_TYPE, - DOC_FRAGMENT, - NOTATION, - WHITESPACE, - SIGNIFICANT_WHITESPACE, - END_ELEMENT, - END_ENTITY, - XML_DECLARATION, - ); - $lookup = array(); - - foreach ( $xmlReaderConstants as $name ) { - $lookup[constant( XmlReader::$name )] = $name; - } - } - - print var_dump( - $lookup[$this-reader-nodeType], - $this-reader-name, - $this-reader-value - ) . \n\n; - } - /** * Primary entry point * @throws MWException * @return bool */ public function doImport() { - // Calls to reader-read need to be wrapped in calls to // libxml_disable_entity_loader() to avoid local file // inclusion attacks (bug 46932). -- To view, visit https://gerrit.wikimedia.org/r/155715 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I98725b277039f55db9ff95399e9559a477b43c26 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename variable in Title: $parser - $titleParser - change (mediawiki/core)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/155716 Change subject: Rename variable in Title: $parser - $titleParser .. Rename variable in Title: $parser - $titleParser so not to confuse this with Parser Change-Id: I7e06baa0a924310e9491f125d0cb851bde2702ab --- M includes/Title.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/16/155716/1 diff --git a/includes/Title.php b/includes/Title.php index a1b2352..690bb4f 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3300,8 +3300,8 @@ // @note: splitTitleString() is a temporary hack to allow MediaWikiTitleCodec to share //the parsing code with Title, while avoiding massive refactoring. // @todo: get rid of secureAndSplit, refactor parsing code. - $parser = self::getTitleParser(); - $parts = $parser-splitTitleString( $dbkey, $this-getDefaultNamespace() ); + $titleParser = self::getTitleParser(); + $parts = $titleParser-splitTitleString( $dbkey, $this-getDefaultNamespace() ); } catch ( MalformedTitleException $ex ) { return false; } -- To view, visit https://gerrit.wikimedia.org/r/155716 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e06baa0a924310e9491f125d0cb851bde2702ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Port code to python - change (labs...wikipedia-android-builds)
Yuvipanda has submitted this change and it was merged. Change subject: Port code to python .. Port code to python A virtualenv was setup at ~ with the sh module required to run the script. Script itself checks to see if any new commits exist Change-Id: I119c86c6465c24e5ed9015fbe5d2b5964b3b926b --- D bin/check_repo.bash D bin/runbuild.bash A crontab.txt D setup/crontab.txt 4 files changed, 1 insertion(+), 58 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/bin/check_repo.bash b/bin/check_repo.bash deleted file mode 100755 index 1e1bbab..000 --- a/bin/check_repo.bash +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -REPO=$HOME/wikipedia -BRANCH=master -OUT_DIR=$HOME/job/${BRANCH}/control -INCOMING=${OUT_DIR}/incoming.txt - -mkdir -p ${OUT_DIR} - -cd $REPO -git fetch origin -git log HEAD..origin/master --oneline ${INCOMING} -if [[ -n $(cat ${INCOMING}) ]]; then - echo need a new build - #git diff HEAD origin/master - jsub -mem 6g -once -o ${OUT_DIR}/build-out.txt -e ${OUT_DIR}/build-err.txt ${HOME}/bin/runbuild.bash -else - echo no updates -fi diff --git a/bin/runbuild.bash b/bin/runbuild.bash deleted file mode 100755 index 62e9030..000 --- a/bin/runbuild.bash +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -export ANDROID_HOME=$HOME/android-sdk-linux -export ANDROID_BUILD_TOOLS=$ANDROID_HOME/build-tools/20.0.0 -export M2_HOME=$HOME/apache-maven-3.1.1 -export M2=$M2_HOME/bin -export PATH=$M2:$ANDROID_HOME/tools:$ANDROID_BUILD_TOOLS:$JAVA_HOME/bin:$PATH - -REPO=$HOME/wikipedia -BRANCH=master -START_TIME=`TZ=UTC date +%Y-%m-%dT%H:%M` -OUT_DIR=$HOME/job/${BRANCH} -JOB_DIR=${OUT_DIR}/${START_TIME} - -if [[ -d ${JOB_DIR} ]]; then - echo ${JOB_DIR} already exists! - exit -fi - -mkdir -p ${JOB_DIR} -cd ${OUT_DIR} -ln -sf ${START_TIME} current - -cd ${REPO} -git checkout ${BRANCH} -git reset --hard -git log HEAD..origin/master --oneline ${JOB_DIR}/commits.txt -git diff HEAD origin/${BRANCH} ${JOB_DIR}/diffs.txt -git pull origin ${BRANCH} - -# just run inside the app folder so we don't try to run the instrumentation tests -cd ${REPO}/wikipedia -mvn clean install ${JOB_DIR}/mvn.log - -# copy more artifacts: -cp target/wikipedia*.apk ${JOB_DIR}/ - -ln -sf ${START_TIME} latest diff --git a/crontab.txt b/crontab.txt new file mode 100644 index 000..c936fe1 --- /dev/null +++ b/crontab.txt @@ -0,0 +1 @@ +0,30 * * * * jsub -once /data/project/wikipedia-android-builds/src/build.py diff --git a/setup/crontab.txt b/setup/crontab.txt deleted file mode 100644 index dd58aef..000 --- a/setup/crontab.txt +++ /dev/null @@ -1 +0,0 @@ -0,30 * * * * jsub -once -o job/master/control/check_repo-out.txt -e job/master/control/check_repo-err.txt bin/check_repo.bash -- To view, visit https://gerrit.wikimedia.org/r/155717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I119c86c6465c24e5ed9015fbe5d2b5964b3b926b Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Port code to python - change (labs...wikipedia-android-builds)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/155717 Change subject: Port code to python .. Port code to python A virtualenv was setup at ~ with the sh module required to run the script. Script itself checks to see if any new commits exist Change-Id: I119c86c6465c24e5ed9015fbe5d2b5964b3b926b --- D bin/check_repo.bash D bin/runbuild.bash A crontab.txt D setup/crontab.txt 4 files changed, 1 insertion(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikipedia-android-builds refs/changes/17/155717/1 diff --git a/bin/check_repo.bash b/bin/check_repo.bash deleted file mode 100755 index 1e1bbab..000 --- a/bin/check_repo.bash +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -REPO=$HOME/wikipedia -BRANCH=master -OUT_DIR=$HOME/job/${BRANCH}/control -INCOMING=${OUT_DIR}/incoming.txt - -mkdir -p ${OUT_DIR} - -cd $REPO -git fetch origin -git log HEAD..origin/master --oneline ${INCOMING} -if [[ -n $(cat ${INCOMING}) ]]; then - echo need a new build - #git diff HEAD origin/master - jsub -mem 6g -once -o ${OUT_DIR}/build-out.txt -e ${OUT_DIR}/build-err.txt ${HOME}/bin/runbuild.bash -else - echo no updates -fi diff --git a/bin/runbuild.bash b/bin/runbuild.bash deleted file mode 100755 index 62e9030..000 --- a/bin/runbuild.bash +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -export ANDROID_HOME=$HOME/android-sdk-linux -export ANDROID_BUILD_TOOLS=$ANDROID_HOME/build-tools/20.0.0 -export M2_HOME=$HOME/apache-maven-3.1.1 -export M2=$M2_HOME/bin -export PATH=$M2:$ANDROID_HOME/tools:$ANDROID_BUILD_TOOLS:$JAVA_HOME/bin:$PATH - -REPO=$HOME/wikipedia -BRANCH=master -START_TIME=`TZ=UTC date +%Y-%m-%dT%H:%M` -OUT_DIR=$HOME/job/${BRANCH} -JOB_DIR=${OUT_DIR}/${START_TIME} - -if [[ -d ${JOB_DIR} ]]; then - echo ${JOB_DIR} already exists! - exit -fi - -mkdir -p ${JOB_DIR} -cd ${OUT_DIR} -ln -sf ${START_TIME} current - -cd ${REPO} -git checkout ${BRANCH} -git reset --hard -git log HEAD..origin/master --oneline ${JOB_DIR}/commits.txt -git diff HEAD origin/${BRANCH} ${JOB_DIR}/diffs.txt -git pull origin ${BRANCH} - -# just run inside the app folder so we don't try to run the instrumentation tests -cd ${REPO}/wikipedia -mvn clean install ${JOB_DIR}/mvn.log - -# copy more artifacts: -cp target/wikipedia*.apk ${JOB_DIR}/ - -ln -sf ${START_TIME} latest diff --git a/crontab.txt b/crontab.txt new file mode 100644 index 000..c936fe1 --- /dev/null +++ b/crontab.txt @@ -0,0 +1 @@ +0,30 * * * * jsub -once /data/project/wikipedia-android-builds/src/build.py diff --git a/setup/crontab.txt b/setup/crontab.txt deleted file mode 100644 index dd58aef..000 --- a/setup/crontab.txt +++ /dev/null @@ -1 +0,0 @@ -0,30 * * * * jsub -once -o job/master/control/check_repo-out.txt -e job/master/control/check_repo-err.txt bin/check_repo.bash -- To view, visit https://gerrit.wikimedia.org/r/155717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I119c86c6465c24e5ed9015fbe5d2b5964b3b926b Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Actually add the python build script - change (labs...wikipedia-android-builds)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/155718 Change subject: Actually add the python build script .. Actually add the python build script I iz idit Change-Id: I3ebca20d6bd4237c2a717ead92b33db58411396f --- A src/build.py 1 file changed, 38 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikipedia-android-builds refs/changes/18/155718/1 diff --git a/src/build.py b/src/build.py new file mode 100755 index 000..5e8affe --- /dev/null +++ b/src/build.py @@ -0,0 +1,38 @@ +#!/data/project/wikipedia-android-builds/bin/python +import os +import sh +from datetime import datetime + +# Environment variables required for mvn to build app +env = { +'M2_HOME': os.path.expanduser('~/mvn'), +'M2': os.path.expanduser('~/mvn'), +'ANDROID_HOME': os.path.expanduser('~/adk'), +'ANDROID_BUILD_TOOLS': os.path.expanduser('~/adk/build-tools/20.0.0') +} + +REPO_PATH = os.path.expanduser('~/wikipedia') + +sh.cd(REPO_PATH) +sh.git('fetch') + +# Only run script if we have new commits +commit_count = int(sh.git('rev-list', 'HEAD..origin/master', '--count')) + +if commit_count != 0: +# Create the output directory +run_slug = 'master-%s' % datetime.now().isoformat() +run_path = os.path.expanduser('~/public_html/runs/%s' % run_slug) +sh.mkdir('-p', run_path) + +sh.git('reset', '--hard', 'origin/master') + +# Run in side the app folder, since we can't run +# instrumentation tests +sh.cd(os.path.join(REPO_PATH, 'wikipedia')) +mvn = sh.Command(os.path.expanduser('~/mvn/bin/mvn')) +mvn('clean', 'install', _env=env) + +sh.cp('target/wikipedia.apk', run_path) +else: +print 'No new commits' -- To view, visit https://gerrit.wikimedia.org/r/155718 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ebca20d6bd4237c2a717ead92b33db58411396f Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Actually add the python build script - change (labs...wikipedia-android-builds)
Yuvipanda has submitted this change and it was merged. Change subject: Actually add the python build script .. Actually add the python build script I iz idit Change-Id: I3ebca20d6bd4237c2a717ead92b33db58411396f --- A src/build.py 1 file changed, 38 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/src/build.py b/src/build.py new file mode 100755 index 000..5e8affe --- /dev/null +++ b/src/build.py @@ -0,0 +1,38 @@ +#!/data/project/wikipedia-android-builds/bin/python +import os +import sh +from datetime import datetime + +# Environment variables required for mvn to build app +env = { +'M2_HOME': os.path.expanduser('~/mvn'), +'M2': os.path.expanduser('~/mvn'), +'ANDROID_HOME': os.path.expanduser('~/adk'), +'ANDROID_BUILD_TOOLS': os.path.expanduser('~/adk/build-tools/20.0.0') +} + +REPO_PATH = os.path.expanduser('~/wikipedia') + +sh.cd(REPO_PATH) +sh.git('fetch') + +# Only run script if we have new commits +commit_count = int(sh.git('rev-list', 'HEAD..origin/master', '--count')) + +if commit_count != 0: +# Create the output directory +run_slug = 'master-%s' % datetime.now().isoformat() +run_path = os.path.expanduser('~/public_html/runs/%s' % run_slug) +sh.mkdir('-p', run_path) + +sh.git('reset', '--hard', 'origin/master') + +# Run in side the app folder, since we can't run +# instrumentation tests +sh.cd(os.path.join(REPO_PATH, 'wikipedia')) +mvn = sh.Command(os.path.expanduser('~/mvn/bin/mvn')) +mvn('clean', 'install', _env=env) + +sh.cp('target/wikipedia.apk', run_path) +else: +print 'No new commits' -- To view, visit https://gerrit.wikimedia.org/r/155718 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ebca20d6bd4237c2a717ead92b33db58411396f Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Put created new topic notification in new notification style - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Put created new topic notification in new notification style .. Put created new topic notification in new notification style Change-Id: Ia008c7bc9d6ca635ed253384dd4a1fb41c3ca588 --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 66f298e..4f49c8d 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -220,7 +220,7 @@ flow-notification-reply-bundle: span class=\plainlinks mw-echo-title-heading\[$4 $2]/spanbr /$1 and $5 {{PLURAL:$6|other|others}} {{GENDER:$1|responded}} on '''$3'''., flow-notification-edit: $1 {{GENDER:$1|edited}} a span class=\plainlinks\[$5 post]/span in \$2\ on [[$3|$4]]., flow-notification-edit-bundle: $1 and $5 {{PLURAL:$6|other|others}} {{GENDER:$1|edited}} a span class=\plainlinks\[$4 post]/span in \$2\ on \$3\., -flow-notification-newtopic: $1 {{GENDER:$1|created}} a span class=\plainlinks\[$5 new topic]/span on [[$2|$3]]: $4., +flow-notification-newtopic: $1 {{GENDER:$1|created}} a new topic on '''$3'''., flow-notification-rename: $1 {{GENDER:$1|changed}} the title of span class=\plainlinks\[$2 $3]/span to \$4\ on [[$5|$6]]., flow-notification-mention: $1 {{GENDER:$1|mentioned}} you in {{GENDER:$1|his|her|their}} span class=\plainlinks\[$2 post]/span in \$3\ on \$4\., flow-notification-link-text-view-post: View post, -- To view, visit https://gerrit.wikimedia.org/r/155651 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia008c7bc9d6ca635ed253384dd4a1fb41c3ca588 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Bsitu bs...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@gmail.com Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: phpcs mw standard on labs slaves - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: contint: phpcs mw standard on labs slaves .. contint: phpcs mw standard on labs slaves Make sure we have the PHP CodeSniffer for MediaWiki on CI labs instances. Bug: 64858 Change-Id: Ib0746a733a99364153cf1b6414b2261c783ccba4 --- M modules/contint/manifests/slave-scripts.pp 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/contint/manifests/slave-scripts.pp b/modules/contint/manifests/slave-scripts.pp index 7344f34..a6f5bff 100644 --- a/modules/contint/manifests/slave-scripts.pp +++ b/modules/contint/manifests/slave-scripts.pp @@ -30,6 +30,11 @@ origin = 'https://gerrit.wikimedia.org/r/p/integration/phpcs.git', recurse_submodules = true, } +git::clone { 'jenkins CI phpcs MediaWiki standard': +ensure= 'latest', +directory = '/srv/deployment/integration/mediawiki-tools-codesniffer', +origin= 'https://gerrit.wikimedia.org/r/p/mediawiki/tools/codesniffer.git', +} git::clone { 'jenkins CI phpunit': ensure = 'latest', directory = '/srv/deployment/integration/phpunit', -- To view, visit https://gerrit.wikimedia.org/r/155544 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0746a733a99364153cf1b6414b2261c783ccba4 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr 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] Modify check_ip to consider internal proxied requests as valid - change (analytics/webstatscollector)
jenkins-bot has submitted this change and it was merged. Change subject: Modify check_ip to consider internal proxied requests as valid .. Modify check_ip to consider internal proxied requests as valid We would like to run webstatscollector using the varnish logs in Kafka. Unlike udp2log, this stream does not contain requests from the nginx SSL and IPv6 proxies. Instead of throwing out all varnish requests that have internal RemoteAddresses, we now consider if the X-Forwarded-For header is set. If it is, we (naively) assume that the request is a valid external request that has been proxied by a WMF internal node. Change-Id: Id54308de10d95caf2b5acaa1022385ff430c1856 --- M filter.c A tests/entry-internal-not-proxied.txt A tests/entry-internal-proxied.txt M tests/test.sh 4 files changed, 59 insertions(+), 10 deletions(-) Approvals: QChris: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/filter.c b/filter.c index ad0eb61..cd12ae2 100644 --- a/filter.c +++ b/filter.c @@ -52,14 +52,36 @@ 91.198.174., NULL}; -bool check_ip(char *ip) { +/** + * Returns true if this request should be + * counted based on request IP and X-Forwarded-For. + * Returns false if the request should be + * discarded. + */ +bool check_ip(char *ip, char *xff) { char **prefix=dupes; - for (;*prefix;prefix++) { - if (!strncmp(*prefix,ip,strlen(*prefix))) - return false; + + bool ip_is_internal = false; + bool xff_is_set = (xff != NULL strncmp(-,xff,1) != 0); + + // Check if ip is a WMF public internal IP. + for (; *prefix; prefix++) { + if (strncmp(*prefix, ip, strlen(*prefix)) == 0) { + ip_is_internal = true; + break; + } } - return true; + + /* Throw away anything that is internal + and does not have XFF set. Internal + requests with XFF set are most likely + externally proxied requests (SSL or IPv6) */ + if (ip_is_internal !xff_is_set) + return false; + else + return true; } + const struct project { char *full; @@ -169,28 +191,35 @@ setgroups(1,gidlist); setuid(65534); - char *undef,*ip,*url, *size; + char *undef, *ip, *url, *size, *xff; while (fgets(line,LINESIZE-1,stdin)) { bzero(info,sizeof(info)); /* Tokenize the log line */ TOKENIZE(line,\t); /* server */ FIELD; /* id? */ FIELD; /* timestamp */ - FIELD; /* ??? */ + FIELD; /* time-to-first-byte */ info.ip=FIELD; /* IP address! */ - FIELD; /* status */ + FIELD; /* HTTP status */ info.size= FIELD; /* object size */ + FIELD; /* HTTP method */ + url=FIELD; /* request URI */ FIELD; - url=FIELD; + FIELD; /* content_type */ + FIELD; /* referer */ + xff=FIELD; /* x-forwarded-for */ + if (!url || !info.ip || !info.size) continue; + replace_space(url); - if (!check_ip(info.ip)) + if (!check_ip(info.ip,xff)) continue; if (!parse_url(url,info)) continue; if (!check_project(info)) continue; + printf(%s%s 1 %s %s\n,info.language, info.suffix, info.size, info.title); } } diff --git a/tests/entry-internal-not-proxied.txt b/tests/entry-internal-not-proxied.txt new file mode 100644 index 000..37ed132 --- /dev/null +++ b/tests/entry-internal-not-proxied.txt @@ -0,0 +1 @@ +cp1063.eqiad.wmnet 1085029940092014-08-21T19:52:03 0.62466 208.80.154.14 -/200 0 GET http://en.wikipedia.org/wiki/Neutron - - - - check_http/v1.4.15 (nagios-plugins 1.4.15) - - diff --git a/tests/entry-internal-proxied.txt b/tests/entry-internal-proxied.txt new file mode 100644 index 000..2307ad3 --- /dev/null +++ b/tests/entry-internal-proxied.txt @@ -0,0 +1 @@ +cp1066.eqiad.wmnet 25134406711 2014-08-21T19:34:07 0.746407509 208.80.154.133 miss/2001064GET http://en.wikipedia.org/wiki/Neutron- application/json; charset=utf-8 http://en.wikipedia.org/wiki/Main_Page 5.4.3.2 UserAgent WooWoo en-US,en;q=0.8 - diff --git a/tests/test.sh b/tests/test.sh index 258c95e..68c6ab6 100755 --- a/tests/test.sh +++
[MediaWiki-commits] [Gerrit] Adding a bunch of actions to block on simulate mode - change (pywikibot/core)
Martineznovo has uploaded a new change for review. https://gerrit.wikimedia.org/r/155720 Change subject: Adding a bunch of actions to block on simulate mode .. Adding a bunch of actions to block on simulate mode There were several actions that weren't listed in actions_to_block, but also perform modifications on the server. Adding them so they respect the -simulate option I went to https://www.mediawiki.org/w/api.php and added all of them that are part of core and the description contains This module requires read rights Bug: 69896 Change-Id: Ibbd05e86bf585e3c9f21670fd2be1978dbe27ebd --- M pywikibot/config2.py M pywikibot/site.py 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/20/155720/1 diff --git a/pywikibot/config2.py b/pywikibot/config2.py index 4b31fc1..f244fd8 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -642,7 +642,10 @@ # servers. Allows simulation runs of bots to be carried out without changing any # page on the server side. This setting may be overridden in user_config.py. actions_to_block = ['edit', 'watch', 'move', 'delete', 'undelete', 'protect', -'emailuser'] +'emailuser', 'createaccount', 'setnotificationtimestamp', +'rollback', 'block', 'unblock', 'upload', 'filerevert', +'patrol', 'import', 'userrights', 'options', 'purge', +'revisiondelete'] # Set simulate to True or use -simulate option to block all actions given above. simulate = False diff --git a/pywikibot/site.py b/pywikibot/site.py index befcf3a..698be2d 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3950,7 +3950,10 @@ pywikibot.output(uUpload: unrecognized response: %s % result) if result[result] == Success: pywikibot.output(uUpload successful.) -filepage._imageinfo = result[imageinfo] +# If we receive a nochange, that would mean we're in simulation +# mode, don't attempt to access imageinfo +if nochange not in result: +filepage._imageinfo = result[imageinfo] return @deprecate_arg(number, step) -- To view, visit https://gerrit.wikimedia.org/r/155720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibbd05e86bf585e3c9f21670fd2be1978dbe27ebd Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Martineznovo martinezn...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tests no longer require high worker count - change (analytics/wikimetrics)
Milimetric has uploaded a new change for review. https://gerrit.wikimedia.org/r/155721 Change subject: Tests no longer require high worker count .. Tests no longer require high worker count Change-Id: Id7ccc4ab2c9f6c917c151c2fc217a68fd88c806f --- M wikimetrics/config/test_config.yaml 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/21/155721/1 diff --git a/wikimetrics/config/test_config.yaml b/wikimetrics/config/test_config.yaml index e1817a4..bcf178d 100644 --- a/wikimetrics/config/test_config.yaml +++ b/wikimetrics/config/test_config.yaml @@ -1,5 +1,4 @@ -# this higher concurrency enables tests that stress resources such as database connections -CELERYD_CONCURRENCY : 170 +CELERYD_CONCURRENCY : 10 CELERY_ALWAYS_EAGER : True TEST: True WIKIMETRICS_ENGINE_URL : 'mysql://wikimetrics:wikimetrics@localhost/wikimetrics_testing' -- To view, visit https://gerrit.wikimedia.org/r/155721 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7ccc4ab2c9f6c917c151c2fc217a68fd88c806f 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] Symlink latest build directory to 'latest' - change (labs...wikipedia-android-builds)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/155723 Change subject: Symlink latest build directory to 'latest' .. Symlink latest build directory to 'latest' Change-Id: I8faae0740939f682d6f79ef86cc5fbfbdb856bc7 --- M src/build.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikipedia-android-builds refs/changes/23/155723/1 diff --git a/src/build.py b/src/build.py index 577c484..35ea2aa 100755 --- a/src/build.py +++ b/src/build.py @@ -39,5 +39,9 @@ print 'Finished build , output at %s' % run_path sh.cp('target/wikipedia.apk', run_path) + +latest_path = os.path.expanduser('~/public_html/runs/latest') +sh.rm('-f', latest_path) +sh.ln('-s', run_path, latest_path) else: print 'No new commits' -- To view, visit https://gerrit.wikimedia.org/r/155723 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8faae0740939f682d6f79ef86cc5fbfbdb856bc7 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add minor debug logging - change (labs...wikipedia-android-builds)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/155722 Change subject: Add minor debug logging .. Add minor debug logging Change-Id: If18d8423759888acbd2962c45faf07260cbfd09c --- M src/build.py 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikipedia-android-builds refs/changes/22/155722/1 diff --git a/src/build.py b/src/build.py index 5e8affe..577c484 100755 --- a/src/build.py +++ b/src/build.py @@ -27,12 +27,17 @@ sh.git('reset', '--hard', 'origin/master') +commit_hash = sh.git('rev-parse', 'HEAD') + +print 'Starting build for %s, with %s new commits' % (commit_hash, commit_count) # Run in side the app folder, since we can't run # instrumentation tests sh.cd(os.path.join(REPO_PATH, 'wikipedia')) mvn = sh.Command(os.path.expanduser('~/mvn/bin/mvn')) mvn('clean', 'install', _env=env) +print 'Finished build , output at %s' % run_path + sh.cp('target/wikipedia.apk', run_path) else: print 'No new commits' -- To view, visit https://gerrit.wikimedia.org/r/155722 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If18d8423759888acbd2962c45faf07260cbfd09c Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup now unused Tampa IPv6 subnets and IPs - change (operations/dns)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/155724 Change subject: Cleanup now unused Tampa IPv6 subnets and IPs .. Cleanup now unused Tampa IPv6 subnets and IPs Change-Id: I34f0f1dc5ef3f459732950daa2ed7e683e9820d8 --- M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 1 file changed, 3 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/24/155724/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 e001b8f..40cea6f 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 @@ -42,46 +42,27 @@ ; Machines 7.2.0.c.d.d.e.f.f.f.9.b.9.1.2.0 1H IN PTR mchenry.wikimedia.org. -b.e.6.8.d.d.e.f.f.f.9.b.9.1.2.0 1H IN PTR sanger.wikimedia.org. 5.6.1.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR fenari.wikimedia.org. -; Service IPs - - -; Tampa sandbox subnet 2620:0:860:3::/64 -$ORIGIN 3.0.0.0.{{ zonename }}. - -1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR vrrp-gw-102.wikimedia.org. - -2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR ae0-102.cr2-pmtpa.wikimedia.org. - -6.2.2.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR amaranth.toolserver.org. -7.2.2.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR cache-us.stable.toolserver.org. -8.2.2.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR mail.toolserver.org. -4.3.2.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR web.amaranth.toolserver.org. - -; Machine - -; ServiceIPs ; Neighbor blocks $ORIGIN e.f.{{ zonename }}. -; cr1-codfw -- cr2-codfw (2620:0:861:fe00::/64) +; cr1-codfw -- cr2-codfw (2620:0:860:fe00::/64) $ORIGIN 0.0.e.f.{{ zonename }}. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR ae0.cr1-codfw.wikimedia.org. 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR ae0.cr2-codfw.wikimedia.org. -; cr1-eqiad -- cr1-codfw (2620:0:861:fe01::/64) +; cr1-eqiad -- cr1-codfw (2620:0:860:fe01::/64) $ORIGIN 1.0.e.f.{{ zonename }}. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR xe-4-2-0.cr1-eqiad.wikimedia.org. 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR xe-5-2-1.cr1-codfw.wikimedia.org. -; cr2-eqiad -- cr2-codfw (2620:0:861:fe02::/64) +; cr2-eqiad -- cr2-codfw (2620:0:860:fe02::/64) $ORIGIN 2.0.e.f.{{ zonename }}. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR xe-4-2-0.cr2-eqiad.wikimedia.org. -- To view, visit https://gerrit.wikimedia.org/r/155724 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34f0f1dc5ef3f459732950daa2ed7e683e9820d8 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns 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] Cleanup now unused Tampa IPv6 subnets and IPs - change (operations/dns)
Mark Bergsma has submitted this change and it was merged. Change subject: Cleanup now unused Tampa IPv6 subnets and IPs .. Cleanup now unused Tampa IPv6 subnets and IPs Change-Id: I34f0f1dc5ef3f459732950daa2ed7e683e9820d8 --- M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 1 file changed, 3 insertions(+), 22 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified 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 e001b8f..40cea6f 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 @@ -42,46 +42,27 @@ ; Machines 7.2.0.c.d.d.e.f.f.f.9.b.9.1.2.0 1H IN PTR mchenry.wikimedia.org. -b.e.6.8.d.d.e.f.f.f.9.b.9.1.2.0 1H IN PTR sanger.wikimedia.org. 5.6.1.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR fenari.wikimedia.org. -; Service IPs - - -; Tampa sandbox subnet 2620:0:860:3::/64 -$ORIGIN 3.0.0.0.{{ zonename }}. - -1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR vrrp-gw-102.wikimedia.org. - -2.0.0.0.0.0.0.0.0.0.0.0.0.0.e.f 1H IN PTR ae0-102.cr2-pmtpa.wikimedia.org. - -6.2.2.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR amaranth.toolserver.org. -7.2.2.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR cache-us.stable.toolserver.org. -8.2.2.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR mail.toolserver.org. -4.3.2.0.2.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR web.amaranth.toolserver.org. - -; Machine - -; ServiceIPs ; Neighbor blocks $ORIGIN e.f.{{ zonename }}. -; cr1-codfw -- cr2-codfw (2620:0:861:fe00::/64) +; cr1-codfw -- cr2-codfw (2620:0:860:fe00::/64) $ORIGIN 0.0.e.f.{{ zonename }}. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR ae0.cr1-codfw.wikimedia.org. 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR ae0.cr2-codfw.wikimedia.org. -; cr1-eqiad -- cr1-codfw (2620:0:861:fe01::/64) +; cr1-eqiad -- cr1-codfw (2620:0:860:fe01::/64) $ORIGIN 1.0.e.f.{{ zonename }}. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR xe-4-2-0.cr1-eqiad.wikimedia.org. 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR xe-5-2-1.cr1-codfw.wikimedia.org. -; cr2-eqiad -- cr2-codfw (2620:0:861:fe02::/64) +; cr2-eqiad -- cr2-codfw (2620:0:860:fe02::/64) $ORIGIN 2.0.e.f.{{ zonename }}. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 1H IN PTR xe-4-2-0.cr2-eqiad.wikimedia.org. -- To view, visit https://gerrit.wikimedia.org/r/155724 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34f0f1dc5ef3f459732950daa2ed7e683e9820d8 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master 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] Remove remaining Tampa IPv6 addresses in use - change (operations/dns)
Mark Bergsma has uploaded a new change for review. https://gerrit.wikimedia.org/r/155725 Change subject: Remove remaining Tampa IPv6 addresses in use .. Remove remaining Tampa IPv6 addresses in use Change-Id: Ida5b449a190ce91c0eba6686c929ba94c4d0c08e --- M templates/wikimedia.org 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/25/155725/1 diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 08ae020..b8de967 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -125,7 +125,6 @@ 1H IN 2620:0:861:52:208:80:155:68 dobson 1H IN A208.80.152.173 fenari 1H IN A208.80.152.165 -1H IN 2620:0:860:2:208:80:152:165 francium1H IN A208.80.154.93 gadolinium 1H IN A208.80.154.73 gallium 1H IN A208.80.154.135 @@ -150,7 +149,6 @@ lvs1006 1H IN A208.80.154.139 magnesium 1H IN A208.80.154.5 mchenry 1H IN A208.80.152.186 -1H IN 2620:0:860:2:219:b9ff:fedd:c027 mercury 1H IN A208.80.154.86 1H IN 2620:0:861:3:208:80:154:86 mexia 1H IN A208.80.152.136 @@ -417,7 +415,6 @@ icinga 1H IN CNAMEneon icinga-admin1H IN A208.80.154.14 -1H IN 2620:0:860:2:208:80:154:14 imap1H IN A208.80.152.187 ; sanger integration 1H IN CNAMEmisc-web-lb.eqiad -- To view, visit https://gerrit.wikimedia.org/r/155725 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida5b449a190ce91c0eba6686c929ba94c4d0c08e Gerrit-PatchSet: 1 Gerrit-Project: operations/dns 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] Remove remaining Tampa IPv6 addresses in use - change (operations/dns)
Mark Bergsma has submitted this change and it was merged. Change subject: Remove remaining Tampa IPv6 addresses in use .. Remove remaining Tampa IPv6 addresses in use Change-Id: Ida5b449a190ce91c0eba6686c929ba94c4d0c08e --- M templates/wikimedia.org 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 08ae020..b8de967 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -125,7 +125,6 @@ 1H IN 2620:0:861:52:208:80:155:68 dobson 1H IN A208.80.152.173 fenari 1H IN A208.80.152.165 -1H IN 2620:0:860:2:208:80:152:165 francium1H IN A208.80.154.93 gadolinium 1H IN A208.80.154.73 gallium 1H IN A208.80.154.135 @@ -150,7 +149,6 @@ lvs1006 1H IN A208.80.154.139 magnesium 1H IN A208.80.154.5 mchenry 1H IN A208.80.152.186 -1H IN 2620:0:860:2:219:b9ff:fedd:c027 mercury 1H IN A208.80.154.86 1H IN 2620:0:861:3:208:80:154:86 mexia 1H IN A208.80.152.136 @@ -417,7 +415,6 @@ icinga 1H IN CNAMEneon icinga-admin1H IN A208.80.154.14 -1H IN 2620:0:860:2:208:80:154:14 imap1H IN A208.80.152.187 ; sanger integration 1H IN CNAMEmisc-web-lb.eqiad -- To view, visit https://gerrit.wikimedia.org/r/155725 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida5b449a190ce91c0eba6686c929ba94c4d0c08e Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master 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] Add new shell account for Elliott Eggleston (ejegg), add to ... - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Add new shell account for Elliott Eggleston (ejegg), add to deployment group .. Add new shell account for Elliott Eggleston (ejegg), add to deployment group RT 8152 Change-Id: Id882a3e49bda65f3814aab55af3348eb7e155d3f --- M modules/admin/data/data.yaml 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 3f841e0..811ef11 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -42,7 +42,7 @@ gjg, gwicke, halfak, hashar, hoo, kaldari, kartik, khorn, krinkle, manybubbles, maxsem, mattflaschen, marktraceur, milimetric, mlitn, nikerabbit, phuedx, reedy, rmoen, robla, spage, ssastry, tomasz, yurik, jgonera, - tgr, ssmith, bsimmers] + tgr, ssmith, bsimmers, ejegg] restricted: gid: 706 description: access to terbium, fluorine (private data) and bastion hosts @@ -1083,3 +1083,11 @@ - ssh-rsa B3NzaC1yc2EDAQABAAABAQDDsVGh2nH/6mGiL1mJMxAWyN9nxB3jivLfmUJKOaxqinPpPX4o+vAj/93todMm3Vcg/BEx/jdenqp9fzW4CYA+d/iHnHY1tfQdU6BrI71AhwCfwtEQBScwYTRiaE8pBU8x1gs71SfvtyUoqQdbKlNgJKwXBq/te0uz4M9I5wKItB6KyNiCyPfFFu1Zt7UCkKEY53U1J1UIk1oZkVby4k0DXjRkONijBK+Q1NKRgN9bVcJmZP9BF+eSH03I9SmPMl3/CZa1ExHbtQDJdVV57SxqmtBZaux4gM+aaFtro6cH1Q7uwSHCvXS+FYqUHAg51LZ61GpRHZYQ+HzkcHEcsnGd bsimmers@bsimmers-mbp.local - ssh-rsa B3NzaC1yc2EDAQABAAABAQC8p9BABLz+Xq2fTmjoRmCnRbf8Z5hRODb2oYpiinRAebkujhp5BuW7hxli9Ekq7ymJ9vRPfnmzjG+rDHIseckYF87N28ujEs0rsLTDyqTiXgr9bo1tw066gcecdpJoYy/ZaOc7nHk90PMIPyJ3Vs2f5DAMl0PUi4NnOl7ENQtCEuz2I2WVd9rIQO6qHJU9PpWqapt3ZLjv8mQuAiUnhNHgo6xePlWuWGo7rugHHAns7zICwfGzwozj89ttEQZ1rEu5ckWuXMAkyIqjPuP6UzEqymrul4HghK0Eo/0Uoq+4Gre9/JumhSsCWVBtvMlRIxm5wJ6pJ7Bh4zc9ptYIb96n bsimmers@osmium uid: 10173 + ejegg: +ensure: present +gid: 500 +name: ejegg +realname: Elliott Eggleston +ssh_keys: [ssh-rsa B3NzaC1yc2EDAQABAAABAQDSbcCuTyzTLxzVvPIVTXHL+FJ4Kj/LIPZmaOJ0I0IbTpJYUBxvLpq5uXcb41bC4DmSr/Wdd74PLoJCLN0Kew5OKpf52L78eddbFUHPcHiFfdsXOAn7Exm1T3oJRSFYLK9Aryy8JFbmKsIrlPIJ0caJIckcUrnQW3ZnttxQy459kFi6SGK8D/zWIuzN6845YkyH8H9bHdU/AhNNn8Mw0o4S5U8USvQXW6+7WL+kVncVHLiZYiJuDkyI6AGHiJe5ur/tTV7jOOf7zQ94vgA4uaIqHMC9OTnOQ8DawovirdkILQYnsG8THIfLb9O1O4njyeudJG7ZzhqDcwvFc1uMKj79 +eeggles...@wikimedia.org] +uid: 3649 \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/155726 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id882a3e49bda65f3814aab55af3348eb7e155d3f Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup ant related stuff - change (integration/jenkins)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/155727 Change subject: Cleanup ant related stuff .. Cleanup ant related stuff Bug: 51717 Change-Id: Idc1cdb16a6f10d20b37a8013f0ab7ea1ba7a3819 --- M bin/mw-run-phpunit-hhvm.sh M bin/mw-run-phpunit.sh D jobs/_shared/build.xml D jobs/_shared/default.properties 4 files changed, 0 insertions(+), 856 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/27/155727/1 diff --git a/bin/mw-run-phpunit-hhvm.sh b/bin/mw-run-phpunit-hhvm.sh index 38a92ec..4f2cfb6 100755 --- a/bin/mw-run-phpunit-hhvm.sh +++ b/bin/mw-run-phpunit-hhvm.sh @@ -5,10 +5,6 @@ # PHPUNIT_EXCLUDE_GROUP. # # Passing 'databaseless' or 'misc' will run buildin list of tests -# -# This script replaces ant targets that were available in -# integration/jenkins.git under /jobs/_shared/build.xml -# ### # Configuration diff --git a/bin/mw-run-phpunit.sh b/bin/mw-run-phpunit.sh index 60b7d29..60bef01 100755 --- a/bin/mw-run-phpunit.sh +++ b/bin/mw-run-phpunit.sh @@ -5,10 +5,6 @@ # PHPUNIT_EXCLUDE_GROUP. # # Passing 'databaseless' or 'misc' will run buildin list of tests -# -# This script replaces ant targets that were available in -# integration/jenkins.git under /jobs/_shared/build.xml -# ### # Configuration diff --git a/jobs/_shared/build.xml b/jobs/_shared/build.xml deleted file mode 100644 index 7b0d1e1..000 --- a/jobs/_shared/build.xml +++ /dev/null @@ -1,797 +0,0 @@ -?xml version=1.0 encoding=UTF-8 ? -!-- vim: set ts=2 sw=2 noet: -- - -!-- - ant build file for MediaWiki Core continuous integration - - git macros from http://tlrobinson.net/blog/2008/11/ant-tasks-for-git/ --- -project name=MediaWiki default=build - - !-- Import environnement: -- - property environment=env / - - property name=phpunitexcludes value=Broken,ParserFuzz,Stub / - - !-- Import generic settings and validate existance -- - - !-- private.properties for password. it is in .gitignore -- - property file=private.properties / - - !-- job.properties file is at the job level. Useful to override generic -properties -- - property file=job.properties / - - !-- then load the default.properties, setting any values which have not been -set previously -- - property file=default.properties / - - !-- - In case they have not been defined above, set sourcedir and buildir - to this job workspace which is most of the case a sane default. - -- - property name=sourcedir value=${env.WORKSPACE} / - property name=builddir value=${env.WORKSPACE} / - - !-- - Detect whether we have the tmpfs system else fallback to - workspace. See default.properties for actual values. - -- - available file=${sqlite.dir.tempfs} - property=sqlite.dir.real - value=${sqlite.dir.tempfs} - / - property name=sqlite.dir.real value=${sqlite.dir.fallback} / - property name=sqlite.dir.forjob value=${sqlite.dir.real}/${env.JOB_NAME} / - - !-- ant -Dmw.database=sqlite -- - target name=select-database unless=mw.database - input - message = Select a database backend or set mw.database in local.properties - validargs= sqlite, postgre, mysql - defaultvalue = sqlite - addproperty = mw.database - / - /target - target name=select-branch unless=mw.branch - input - message = Specify a branch or set mw.branch in local.properties - defaultvalue = trunk - addproperty = mw.branch - / - /target - - - target name=build depends=install description=Main entry point / - - !-- Entry point to build the Wikidata project -- - target name=build-wikidata depends=-import-gerrit-env - !-- We need a copy of mediawiki/core.git@Wikidata -- - import-project - name=mediawiki/core - / - - !-- Import some extension dependencies: -- - import-extension name=cldr / - import-extension name=UniversalLanguageSelector / - import-extension name=Wikibase / - import-extension name=Diff / - import-extension name=DataValues / - - !-- Apply Gerrit change to the extension -- - gerrit-apply-change - dir=${sourcedir}/extensions/Wikibase - / - - antcall target=php-lint / - !--
[MediaWiki-commits] [Gerrit] Add new shell account for Elliott Eggleston (ejegg), add to ... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/155726 Change subject: Add new shell account for Elliott Eggleston (ejegg), add to deployment group .. Add new shell account for Elliott Eggleston (ejegg), add to deployment group RT 8152 Change-Id: Id882a3e49bda65f3814aab55af3348eb7e155d3f --- M modules/admin/data/data.yaml 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/26/155726/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 3f841e0..811ef11 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -42,7 +42,7 @@ gjg, gwicke, halfak, hashar, hoo, kaldari, kartik, khorn, krinkle, manybubbles, maxsem, mattflaschen, marktraceur, milimetric, mlitn, nikerabbit, phuedx, reedy, rmoen, robla, spage, ssastry, tomasz, yurik, jgonera, - tgr, ssmith, bsimmers] + tgr, ssmith, bsimmers, ejegg] restricted: gid: 706 description: access to terbium, fluorine (private data) and bastion hosts @@ -1083,3 +1083,11 @@ - ssh-rsa B3NzaC1yc2EDAQABAAABAQDDsVGh2nH/6mGiL1mJMxAWyN9nxB3jivLfmUJKOaxqinPpPX4o+vAj/93todMm3Vcg/BEx/jdenqp9fzW4CYA+d/iHnHY1tfQdU6BrI71AhwCfwtEQBScwYTRiaE8pBU8x1gs71SfvtyUoqQdbKlNgJKwXBq/te0uz4M9I5wKItB6KyNiCyPfFFu1Zt7UCkKEY53U1J1UIk1oZkVby4k0DXjRkONijBK+Q1NKRgN9bVcJmZP9BF+eSH03I9SmPMl3/CZa1ExHbtQDJdVV57SxqmtBZaux4gM+aaFtro6cH1Q7uwSHCvXS+FYqUHAg51LZ61GpRHZYQ+HzkcHEcsnGd bsimmers@bsimmers-mbp.local - ssh-rsa B3NzaC1yc2EDAQABAAABAQC8p9BABLz+Xq2fTmjoRmCnRbf8Z5hRODb2oYpiinRAebkujhp5BuW7hxli9Ekq7ymJ9vRPfnmzjG+rDHIseckYF87N28ujEs0rsLTDyqTiXgr9bo1tw066gcecdpJoYy/ZaOc7nHk90PMIPyJ3Vs2f5DAMl0PUi4NnOl7ENQtCEuz2I2WVd9rIQO6qHJU9PpWqapt3ZLjv8mQuAiUnhNHgo6xePlWuWGo7rugHHAns7zICwfGzwozj89ttEQZ1rEu5ckWuXMAkyIqjPuP6UzEqymrul4HghK0Eo/0Uoq+4Gre9/JumhSsCWVBtvMlRIxm5wJ6pJ7Bh4zc9ptYIb96n bsimmers@osmium uid: 10173 + ejegg: +ensure: present +gid: 500 +name: ejegg +realname: Elliott Eggleston +ssh_keys: [ssh-rsa B3NzaC1yc2EDAQABAAABAQDSbcCuTyzTLxzVvPIVTXHL+FJ4Kj/LIPZmaOJ0I0IbTpJYUBxvLpq5uXcb41bC4DmSr/Wdd74PLoJCLN0Kew5OKpf52L78eddbFUHPcHiFfdsXOAn7Exm1T3oJRSFYLK9Aryy8JFbmKsIrlPIJ0caJIckcUrnQW3ZnttxQy459kFi6SGK8D/zWIuzN6845YkyH8H9bHdU/AhNNn8Mw0o4S5U8USvQXW6+7WL+kVncVHLiZYiJuDkyI6AGHiJe5ur/tTV7jOOf7zQ94vgA4uaIqHMC9OTnOQ8DawovirdkILQYnsG8THIfLb9O1O4njyeudJG7ZzhqDcwvFc1uMKj79 +eeggles...@wikimedia.org] +uid: 3649 \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/155726 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id882a3e49bda65f3814aab55af3348eb7e155d3f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup ant related stuff - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: Cleanup ant related stuff .. Cleanup ant related stuff Bug: 51717 Change-Id: Idc1cdb16a6f10d20b37a8013f0ab7ea1ba7a3819 --- M bin/mw-run-phpunit-hhvm.sh M bin/mw-run-phpunit.sh D jobs/_shared/build.xml D jobs/_shared/default.properties 4 files changed, 0 insertions(+), 856 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/mw-run-phpunit-hhvm.sh b/bin/mw-run-phpunit-hhvm.sh index 38a92ec..4f2cfb6 100755 --- a/bin/mw-run-phpunit-hhvm.sh +++ b/bin/mw-run-phpunit-hhvm.sh @@ -5,10 +5,6 @@ # PHPUNIT_EXCLUDE_GROUP. # # Passing 'databaseless' or 'misc' will run buildin list of tests -# -# This script replaces ant targets that were available in -# integration/jenkins.git under /jobs/_shared/build.xml -# ### # Configuration diff --git a/bin/mw-run-phpunit.sh b/bin/mw-run-phpunit.sh index 60b7d29..60bef01 100755 --- a/bin/mw-run-phpunit.sh +++ b/bin/mw-run-phpunit.sh @@ -5,10 +5,6 @@ # PHPUNIT_EXCLUDE_GROUP. # # Passing 'databaseless' or 'misc' will run buildin list of tests -# -# This script replaces ant targets that were available in -# integration/jenkins.git under /jobs/_shared/build.xml -# ### # Configuration diff --git a/jobs/_shared/build.xml b/jobs/_shared/build.xml deleted file mode 100644 index 7b0d1e1..000 --- a/jobs/_shared/build.xml +++ /dev/null @@ -1,797 +0,0 @@ -?xml version=1.0 encoding=UTF-8 ? -!-- vim: set ts=2 sw=2 noet: -- - -!-- - ant build file for MediaWiki Core continuous integration - - git macros from http://tlrobinson.net/blog/2008/11/ant-tasks-for-git/ --- -project name=MediaWiki default=build - - !-- Import environnement: -- - property environment=env / - - property name=phpunitexcludes value=Broken,ParserFuzz,Stub / - - !-- Import generic settings and validate existance -- - - !-- private.properties for password. it is in .gitignore -- - property file=private.properties / - - !-- job.properties file is at the job level. Useful to override generic -properties -- - property file=job.properties / - - !-- then load the default.properties, setting any values which have not been -set previously -- - property file=default.properties / - - !-- - In case they have not been defined above, set sourcedir and buildir - to this job workspace which is most of the case a sane default. - -- - property name=sourcedir value=${env.WORKSPACE} / - property name=builddir value=${env.WORKSPACE} / - - !-- - Detect whether we have the tmpfs system else fallback to - workspace. See default.properties for actual values. - -- - available file=${sqlite.dir.tempfs} - property=sqlite.dir.real - value=${sqlite.dir.tempfs} - / - property name=sqlite.dir.real value=${sqlite.dir.fallback} / - property name=sqlite.dir.forjob value=${sqlite.dir.real}/${env.JOB_NAME} / - - !-- ant -Dmw.database=sqlite -- - target name=select-database unless=mw.database - input - message = Select a database backend or set mw.database in local.properties - validargs= sqlite, postgre, mysql - defaultvalue = sqlite - addproperty = mw.database - / - /target - target name=select-branch unless=mw.branch - input - message = Specify a branch or set mw.branch in local.properties - defaultvalue = trunk - addproperty = mw.branch - / - /target - - - target name=build depends=install description=Main entry point / - - !-- Entry point to build the Wikidata project -- - target name=build-wikidata depends=-import-gerrit-env - !-- We need a copy of mediawiki/core.git@Wikidata -- - import-project - name=mediawiki/core - / - - !-- Import some extension dependencies: -- - import-extension name=cldr / - import-extension name=UniversalLanguageSelector / - import-extension name=Wikibase / - import-extension name=Diff / - import-extension name=DataValues / - - !-- Apply Gerrit change to the extension -- - gerrit-apply-change - dir=${sourcedir}/extensions/Wikibase - / - - antcall target=php-lint / - !-- fixme: should just test @group Wikibase -- -
[MediaWiki-commits] [Gerrit] rm jobs/_shared/ExtraSettings.php - change (integration/jenkins)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/155729 Change subject: rm jobs/_shared/ExtraSettings.php .. rm jobs/_shared/ExtraSettings.php Replaced by mediawiki/conf.d/ Change-Id: I9b5a1e1b41b8c1cf79c22ad76219a8182b79e3d7 --- D jobs/_shared/ExtraSettings.php 1 file changed, 0 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/29/155729/1 diff --git a/jobs/_shared/ExtraSettings.php b/jobs/_shared/ExtraSettings.php deleted file mode 100644 index 5009745..000 --- a/jobs/_shared/ExtraSettings.php +++ /dev/null @@ -1,18 +0,0 @@ -?php - -// Debugging: PHP -error_reporting( -1 ); -ini_set( 'display_errors', 1 ); - -// Debugging: MediaWiki -$wgDevelopmentWarnings = true; -$wgShowExceptionDetails = true; - -// gallium.wikimedia.org has tmpfs installed, use that instead of -// the default /tmp. -$jenkinsUserHome = getenv('HOME') ?: '/var/lib/jenkins'; -$jenkinsTmpFs = {$jenkinsUserHome}/tmpfs; -$jenkinsJobName = getenv( 'JOB_NAME' ); -if ( $jenkinsJobName is_dir( $jenkinsTmpFs/$jenkinsJobName ) ) { - $wgTmpDirectory = $jenkinsTmpFs/$jenkinsJobName; -} -- To view, visit https://gerrit.wikimedia.org/r/155729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b5a1e1b41b8c1cf79c22ad76219a8182b79e3d7 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Stop using the Wikibase\EntityId alias - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/155728 Change subject: Stop using the Wikibase\EntityId alias .. Stop using the Wikibase\EntityId alias At least in all the tests. This can not be done in classes that are in the Wikibase namespace. PHP will find both and complain. Change-Id: Iaf184d9522035b4b01872427b703e0bd88bac893 --- M client/tests/phpunit/includes/RepoLinkerTest.php M lib/tests/phpunit/MockPropertyLabelResolver.php M lib/tests/phpunit/ReferencedUrlFinderTest.php M repo/tests/phpunit/includes/Localizer/MessageParameterFormatterTest.php M repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php 7 files changed, 14 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/28/155728/1 diff --git a/client/tests/phpunit/includes/RepoLinkerTest.php b/client/tests/phpunit/includes/RepoLinkerTest.php index cc28ae8..999d8d4 100644 --- a/client/tests/phpunit/includes/RepoLinkerTest.php +++ b/client/tests/phpunit/includes/RepoLinkerTest.php @@ -2,9 +2,9 @@ namespace Wikibase\Test; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\EntityId; use Wikibase\RepoLinker; /** @@ -350,4 +350,5 @@ ) ); } + } diff --git a/lib/tests/phpunit/MockPropertyLabelResolver.php b/lib/tests/phpunit/MockPropertyLabelResolver.php index 4b53471..2a454fc 100644 --- a/lib/tests/phpunit/MockPropertyLabelResolver.php +++ b/lib/tests/phpunit/MockPropertyLabelResolver.php @@ -2,7 +2,7 @@ namespace Wikibase\Test; -use Wikibase\EntityId; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\PropertyLabelResolver; /** @@ -46,4 +46,5 @@ return $ids; } + } diff --git a/lib/tests/phpunit/ReferencedUrlFinderTest.php b/lib/tests/phpunit/ReferencedUrlFinderTest.php index afa0654..3eb8913 100644 --- a/lib/tests/phpunit/ReferencedUrlFinderTest.php +++ b/lib/tests/phpunit/ReferencedUrlFinderTest.php @@ -3,8 +3,8 @@ namespace Wikibase\Lib\Test; use DataValues\StringValue; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\EntityId; use Wikibase\Lib\InMemoryDataTypeLookup; use Wikibase\PropertyNoValueSnak; use Wikibase\PropertySomeValueSnak; @@ -82,4 +82,5 @@ $actual = $linkFinder-findSnakLinks( $snaks ); $this-assertEmpty( $actual ); // since $p42 isn't know, this should return nothing } + } diff --git a/repo/tests/phpunit/includes/Localizer/MessageParameterFormatterTest.php b/repo/tests/phpunit/includes/Localizer/MessageParameterFormatterTest.php index 2772dc3..1bb2244 100644 --- a/repo/tests/phpunit/includes/Localizer/MessageParameterFormatterTest.php +++ b/repo/tests/phpunit/includes/Localizer/MessageParameterFormatterTest.php @@ -9,9 +9,9 @@ use SiteStore; use Title; use ValueFormatters\ValueFormatter; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\SiteLink; -use Wikibase\EntityId; use Wikibase\EntityTitleLookup; use Wikibase\Repo\Localizer\MessageParameterFormatter; @@ -112,4 +112,5 @@ return $mock; } + } diff --git a/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php b/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php index 6afe5d5..65db270 100644 --- a/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php +++ b/repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php @@ -3,13 +3,13 @@ namespace Wikibase\Test\Validators; use Wikibase\DataModel\Entity\Entity; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Term\AliasGroupList; use Wikibase\DataModel\Term\Fingerprint; use Wikibase\DataModel\Term\Term; use Wikibase\DataModel\Term\TermList; -use Wikibase\EntityId; use Wikibase\LabelDescriptionDuplicateDetector; use Wikibase\Test\ChangeOpTestMockProvider; use Wikibase\Validators\LabelUniquenessValidator; diff --git a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php index 6a4f64e..b755806 100644 --- a/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php +++ b/repo/tests/phpunit/includes/rdf/RdfBuilderTest.php @@ -8,9 +8,9 @@ use EasyRdf_Namespace; use EasyRdf_Resource; use SiteList; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\ItemId; use Wikibase\Entity; -use Wikibase\EntityId; use Wikibase\EntityRevision; use Wikibase\Item; use Wikibase\RdfBuilder; diff --git
[MediaWiki-commits] [Gerrit] rm jobs/_shared/ExtraSettings.php - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: rm jobs/_shared/ExtraSettings.php .. rm jobs/_shared/ExtraSettings.php Replaced by mediawiki/conf.d/ Change-Id: I9b5a1e1b41b8c1cf79c22ad76219a8182b79e3d7 --- D jobs/_shared/ExtraSettings.php 1 file changed, 0 insertions(+), 18 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/jobs/_shared/ExtraSettings.php b/jobs/_shared/ExtraSettings.php deleted file mode 100644 index 5009745..000 --- a/jobs/_shared/ExtraSettings.php +++ /dev/null @@ -1,18 +0,0 @@ -?php - -// Debugging: PHP -error_reporting( -1 ); -ini_set( 'display_errors', 1 ); - -// Debugging: MediaWiki -$wgDevelopmentWarnings = true; -$wgShowExceptionDetails = true; - -// gallium.wikimedia.org has tmpfs installed, use that instead of -// the default /tmp. -$jenkinsUserHome = getenv('HOME') ?: '/var/lib/jenkins'; -$jenkinsTmpFs = {$jenkinsUserHome}/tmpfs; -$jenkinsJobName = getenv( 'JOB_NAME' ); -if ( $jenkinsJobName is_dir( $jenkinsTmpFs/$jenkinsJobName ) ) { - $wgTmpDirectory = $jenkinsTmpFs/$jenkinsJobName; -} -- To view, visit https://gerrit.wikimedia.org/r/155729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b5a1e1b41b8c1cf79c22ad76219a8182b79e3d7 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Write out meta.json with metadata about each build - change (labs...wikipedia-android-builds)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/155730 Change subject: Write out meta.json with metadata about each build .. Write out meta.json with metadata about each build Change-Id: I8426f70f270d2cf2815512bb668d524cc5bb363e --- M src/build.py 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikipedia-android-builds refs/changes/30/155730/1 diff --git a/src/build.py b/src/build.py index 4700fde..4c1e3aa 100755 --- a/src/build.py +++ b/src/build.py @@ -1,6 +1,7 @@ #!/data/project/wikipedia-android-builds/bin/python import os import sh +import json from datetime import datetime # Environment variables required for mvn to build app @@ -20,16 +21,24 @@ commit_count = int(sh.git('rev-list', 'HEAD..origin/master', '--count')) if commit_count != 0: +meta = { +'commit_count': commit_count +} + # Create the output directory run_slug = 'master-%s' % datetime.now().isoformat() run_path = os.path.expanduser('~/public_html/runs/%s' % run_slug) sh.mkdir('-p', run_path) +meta['commits'] = str(sh.git('log', 'HEAD..origin/master', '--oneline')).split('\n') + sh.git('reset', '--hard', 'origin/master') -commit_hash = sh.git('rev-parse', 'HEAD') +commit_hash = str(sh.git('rev-parse', 'HEAD')).strip() -print 'Starting build for %s, with %s new commits' % (commit_hash.strip(), commit_count) +meta['commit_hash'] = commit_hash + +print 'Starting build for %s, with %s new commits' % (commit_hash, commit_count) # Run in side the app folder, since we can't run # instrumentation tests sh.cd(os.path.join(REPO_PATH, 'wikipedia')) @@ -40,6 +49,8 @@ sh.cp('target/wikipedia.apk', run_path) +json.dump(open(os.path.join(run_path, 'meta.json'), 'w'), meta) + latest_path = os.path.expanduser('~/public_html/runs/latest') sh.rm('-f', latest_path) sh.ln('-s', run_path, latest_path) -- To view, visit https://gerrit.wikimedia.org/r/155730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8426f70f270d2cf2815512bb668d524cc5bb363e Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reassign db1053 to s4 - change (operations/puppet)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/155731 Change subject: Reassign db1053 to s4 .. Reassign db1053 to s4 Change-Id: I7d261417f4414a4fa0c4c44807adff0dfaaacd69 --- M manifests/site.pp 1 file changed, 3 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/31/155731/1 diff --git a/manifests/site.pp b/manifests/site.pp index 1d1181a..a2b2cf9 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -763,7 +763,7 @@ } } -node /^db10(04|40|42|56|59|64|68)\.eqiad\.wmnet/ { +node /^db10(04|40|42|53|56|59|64|68)\.eqiad\.wmnet/ { include admin $cluster = 'mysql' @@ -871,24 +871,6 @@ } ## SANITARIUM -node 'db1053.eqiad.wmnet' { - -include admin -$cluster = 'mysql' -$ganglia_aggregator = true -class { 'role::db::sanitarium': -instances = { -'s1' = { -'port'= '3306', -'innodb_log_file_size'= '2000M', -'ram' = '72G', -'repl_wild_ignore_tables' = $::private_tables, -'log_bin' = true, -'binlog_format' = 'row', -}, -} -} -} node 'db1054.eqiad.wmnet' { @@ -965,6 +947,7 @@ include admin $cluster = 'mysql' +$ganglia_aggregator = true include role::mariadb::sanitarium } @@ -979,6 +962,7 @@ include admin $cluster = 'mysql' +$ganglia_aggregator = true $mariadb_backups_folder = '/a/backups' include role::mariadb::backup # 24h pt-slave-delay on all repl streams -- To view, visit https://gerrit.wikimedia.org/r/155731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d261417f4414a4fa0c4c44807adff0dfaaacd69 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle sprin...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] When exporting Bugzilla tickets via Chase's script we run in... - change (wikimedia...modifications)
Aklapper has uploaded a new change for review. https://gerrit.wikimedia.org/r/155732 Change subject: When exporting Bugzilla tickets via Chase's script we run into an API bug with specific Unicode letters for https://bugzilla.wikimedia.org/show_bug.cgi?id=9444#c0. This is applying a hackish upstream workaround described in https://bugzilla.mozilla.org/sh .. When exporting Bugzilla tickets via Chase's script we run into an API bug with specific Unicode letters for https://bugzilla.wikimedia.org/show_bug.cgi?id=9444#c0. This is applying a hackish upstream workaround described in https://bugzilla.mozilla.org/show_bug.cgi?id=839023#c10 which is slightly overkill (applied to the entire output, not just the values provided back when querying the API). However, that Unicode character range affected by this patch should not be in use in any relevant way, plus this change affects only XML RPC behavior (while e.g. Bingle uses JSON RPC, hence not affected). This file is a copy of the upstream file which has not seen changes since February 2014 (hence same as in the 4.4.5 tarball code which we have deployed), with the custom hack being two lines added (search for 69747). As expressed, not feeling very happy about its scope and cannot 100% judge potential side effects (but I miss better Perl skills). Bug: 69747 Change-Id: I6d4b679345085c461ff1a2db5cd5ab5af15e9c98 --- A Bugzilla/WebService/Server/XMLRPC.pm 1 file changed, 382 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bugzilla/modifications refs/changes/32/155732/1 diff --git a/Bugzilla/WebService/Server/XMLRPC.pm b/Bugzilla/WebService/Server/XMLRPC.pm new file mode 100644 index 000..7a624dc --- /dev/null +++ b/Bugzilla/WebService/Server/XMLRPC.pm @@ -0,0 +1,382 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This Source Code Form is Incompatible With Secondary Licenses, as +# defined by the Mozilla Public License, v. 2.0. + +package Bugzilla::WebService::Server::XMLRPC; + +use strict; +use XMLRPC::Transport::HTTP; +use Bugzilla::WebService::Server; +if ($ENV{MOD_PERL}) { +our @ISA = qw(XMLRPC::Transport::HTTP::Apache Bugzilla::WebService::Server); +} else { +our @ISA = qw(XMLRPC::Transport::HTTP::CGI Bugzilla::WebService::Server); +} + +use Bugzilla::WebService::Constants; + +# Allow WebService methods to call XMLRPC::Lite's type method directly +BEGIN { +*Bugzilla::WebService::type = sub { +my ($self, $type, $value) = @_; +if ($type eq 'dateTime') { +# This is the XML-RPC implementation, see the README in Bugzilla/WebService/. +# Our base implementation is in Bugzilla::WebService::Server. +$value = Bugzilla::WebService::Server-datetime_format_outbound($value); +$value =~ s/-//g; +} +return XMLRPC::Data-type($type)-value($value); +}; +} + +sub initialize { +my $self = shift; +my %retval = $self-SUPER::initialize(@_); +$retval{'serializer'} = Bugzilla::XMLRPC::Serializer-new; +$retval{'deserializer'} = Bugzilla::XMLRPC::Deserializer-new; +$retval{'dispatch_with'} = WS_DISPATCH; +return %retval; +} + +sub make_response { +my $self = shift; + +$self-SUPER::make_response(@_); + +# XMLRPC::Transport::HTTP::CGI doesn't know about Bugzilla carrying around +# its cookies in Bugzilla::CGI, so we need to copy them over. +foreach my $cookie (@{Bugzilla-cgi-{'Bugzilla_cookie_list'}}) { +$self-response-headers-push_header('Set-Cookie', $cookie); +} + +# Copy across security related headers from Bugzilla::CGI +foreach my $header (split(/[\r\n]+/, Bugzilla-cgi-header)) { +my ($name, $value) = $header =~ /^([^:]+): (.*)/; +if (!$self-response-headers-header($name)) { + $self-response-headers-header($name = $value); +} +} +} + +sub handle_login { +my ($self, $classes, $action, $uri, $method) = @_; +my $class = $classes-{$uri}; +my $full_method = $uri . . . $method; +$self-SUPER::handle_login($class, $method, $full_method); +return; +} + +1; + +# This exists to validate input parameters (which XMLRPC::Lite doesn't do) +# and also, in some cases, to more-usefully decode them. +package Bugzilla::XMLRPC::Deserializer; +use strict; +# We can't use use base because XMLRPC::Serializer doesn't return +# a true value. +use XMLRPC::Lite; +our @ISA = qw(XMLRPC::Deserializer); + +use Bugzilla::Error; +use Bugzilla::WebService::Constants qw(XMLRPC_CONTENT_TYPE_WHITELIST); +use Bugzilla::WebService::Util qw(fix_credentials); +use Scalar::Util qw(tainted); + +sub deserialize { +my $self = shift; + +# Only allow certain content types to protect against CSRF attacks +my $content_type
[MediaWiki-commits] [Gerrit] Make SVGMessageGroup::register cheap - change (mediawiki...TranslateSvg)
Jarry1250 has submitted this change and it was merged. Change subject: Make SVGMessageGroup::register cheap .. Make SVGMessageGroup::register cheap More specifically, use $dbw-affectedRows() to check whether the MessageIndex cache actually need to be rebuilt. Change-Id: I49b572c3f7512d80df0c0ddd6e7c94598568b50d --- M SVGMessageGroup.php 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Jarry1250: Verified; Looks good to me, approved diff --git a/SVGMessageGroup.php b/SVGMessageGroup.php index ef94313..430c05e 100644 --- a/SVGMessageGroup.php +++ b/SVGMessageGroup.php @@ -67,6 +67,7 @@ $desc = [[$prefixedFilename|thumb| . $wgLang-alignEnd() . |upright|275x275px]] . \n . Html::rawElement( 'div', array( 'style' = 'overflow:auto; padding:2px;' ), $rev ); $this-setDescription( $desc ); + } /** @@ -229,10 +230,14 @@ $dbw = wfGetDB( DB_MASTER ); $row = array( 'ts_page_id' = $articleId ); - // If $dbw-affectedRows() == 0, it already exists, - // but no particular reason to error out $dbw-insert( 'translate_svg', $row, __METHOD__, array( 'IGNORE' ) ); + if( $dbw-affectedRows() === 0 ) { + // If $dbw-affectedRows() == 0, it already exists, + // but no particular reason to error out + return true; + } + MessageGroups::clearCache(); if( $useJobQueue ) { MessageIndexRebuildJob::newJob()-insert(); -- To view, visit https://gerrit.wikimedia.org/r/153331 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49b572c3f7512d80df0c0ddd6e7c94598568b50d Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/TranslateSvg Gerrit-Branch: master Gerrit-Owner: Jarry1250 jarry1...@gmail.com Gerrit-Reviewer: Jarry1250 jarry1...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reassign db1053 to s4 - change (operations/puppet)
Springle has submitted this change and it was merged. Change subject: Reassign db1053 to s4 .. Reassign db1053 to s4 Change-Id: I7d261417f4414a4fa0c4c44807adff0dfaaacd69 --- M manifests/site.pp 1 file changed, 3 insertions(+), 19 deletions(-) Approvals: Springle: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 1d1181a..a2b2cf9 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -763,7 +763,7 @@ } } -node /^db10(04|40|42|56|59|64|68)\.eqiad\.wmnet/ { +node /^db10(04|40|42|53|56|59|64|68)\.eqiad\.wmnet/ { include admin $cluster = 'mysql' @@ -871,24 +871,6 @@ } ## SANITARIUM -node 'db1053.eqiad.wmnet' { - -include admin -$cluster = 'mysql' -$ganglia_aggregator = true -class { 'role::db::sanitarium': -instances = { -'s1' = { -'port'= '3306', -'innodb_log_file_size'= '2000M', -'ram' = '72G', -'repl_wild_ignore_tables' = $::private_tables, -'log_bin' = true, -'binlog_format' = 'row', -}, -} -} -} node 'db1054.eqiad.wmnet' { @@ -965,6 +947,7 @@ include admin $cluster = 'mysql' +$ganglia_aggregator = true include role::mariadb::sanitarium } @@ -979,6 +962,7 @@ include admin $cluster = 'mysql' +$ganglia_aggregator = true $mariadb_backups_folder = '/a/backups' include role::mariadb::backup # 24h pt-slave-delay on all repl streams -- To view, visit https://gerrit.wikimedia.org/r/155731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d261417f4414a4fa0c4c44807adff0dfaaacd69 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle sprin...@wikimedia.org Gerrit-Reviewer: Springle sprin...@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 testImportTranslations() and testGetOnWikiLanguages() - change (mediawiki...TranslateSvg)
Jarry1250 has uploaded a new change for review. https://gerrit.wikimedia.org/r/155733 Change subject: Add testImportTranslations() and testGetOnWikiLanguages() .. Add testImportTranslations() and testGetOnWikiLanguages() Change-Id: I7a2a3ee65a66e8b3ba41a38a0a0f1f70b715822a --- M tests/phpunit/SVGMessageGroupTest.php 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TranslateSvg refs/changes/33/155733/1 diff --git a/tests/phpunit/SVGMessageGroupTest.php b/tests/phpunit/SVGMessageGroupTest.php index 2329825..5fc298c 100644 --- a/tests/phpunit/SVGMessageGroupTest.php +++ b/tests/phpunit/SVGMessageGroupTest.php @@ -66,4 +66,25 @@ public function testGetNamespace() { $this-assertEquals( NS_FILE, $this-messageGroup-getNamespace() ); } + + public function testGetOnWikiLanguagesBeforeImport() { + $this-assertCount( + 0, + $this-messageGroup-getOnWikiLanguages(), + 'Message group is registered but has not been imported yet, so getOnWikiLanguages() should return an empty array' + ); + } + + public function testImportTranslations() { + $ret = $this-messageGroup-importTranslations(); + $this-assertTrue( $ret ); + } + + public function testGetOnWikiLanguagesAfterImport() { + // Clearly this is dependent on the translations having been imported correctly + $this-assertArrayEquals( + array( 'de', 'en', 'fr', 'nl' ), + $this-messageGroup-getOnWikiLanguages() + ); + } } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/155733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a2a3ee65a66e8b3ba41a38a0a0f1f70b715822a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TranslateSvg Gerrit-Branch: master Gerrit-Owner: Jarry1250 jarry1...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Purge interwiki memcached entries in populateInterwiki script - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/155734 Change subject: Purge interwiki memcached entries in populateInterwiki script .. Purge interwiki memcached entries in populateInterwiki script Bug: 69903 Change-Id: I34a4bb97f32ca649b81f8917bd3c2a85caa4975c --- M client/maintenance/populateInterwiki.php 1 file changed, 23 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/34/155734/1 diff --git a/client/maintenance/populateInterwiki.php b/client/maintenance/populateInterwiki.php index 1f618cf..0c63025 100644 --- a/client/maintenance/populateInterwiki.php +++ b/client/maintenance/populateInterwiki.php @@ -21,6 +21,11 @@ */ private $source; + /** +* @var BagOStuff +*/ + private $cache; + public function __construct() { $this-mDescription = TEXT This script will populate the interwiki table, pulling in interwiki links that are used on Wikipedia @@ -46,6 +51,8 @@ $force = $this-getOption( 'force', false ); $this-source = $this-getOption( 'source', 'https://en.wikipedia.org/w/api.php' ); + $this-cache = wfGetMainCache(); + $data = $this-fetchLinks(); if ( $data === false ) { @@ -64,7 +71,6 @@ 'format' = 'json' ); - // todo: is valid if ( !empty( $this-source ) ) { try { $baseUrl = rtrim( $this-source, '?' ) . '?'; @@ -105,17 +111,20 @@ } foreach( $data as $d ) { + $prefix = $d['prefix']; + $row = $dbw-selectRow( 'interwiki', '1', - array( 'iw_prefix' = $d['prefix'] ), + array( 'iw_prefix' = $prefix ), __METHOD__ ); if ( ! $row ) { $dbw-insert( 'interwiki', - array( 'iw_prefix' = $d['prefix'], + array( + 'iw_prefix' = $prefix, 'iw_url' = $d['url'], 'iw_local' = 1 ), @@ -123,12 +132,23 @@ 'IGNORE' ); } + + $this-clearCacheEntry( $prefix ); } $this-output( Interwiki links are populated.\n ); return true; } + + /** +* @param string $prefix +*/ + private function clearCacheEntry( $prefix ) { + $key = wfMemcKey( 'interwiki', $prefix ); + $this-cache-delete( $key ); + } + } $maintClass = 'PopulateInterwiki'; -- To view, visit https://gerrit.wikimedia.org/r/155734 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34a4bb97f32ca649b81f8917bd3c2a85caa4975c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Sync parserTests with core. - change (mediawiki...parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/155735 Change subject: Sync parserTests with core. .. Sync parserTests with core. This matches upstream core commit 13a85541fccca12ead97c0bb393b505c201f4f59. Upstream added tidy support to parser tests, in commit 019e8ce29d5e94597bf7f50a2bc6ba8614e2bbe9. Parsoid had this support added in commit 7a6df104bf41107c1b9d3e1291319f35e3fbcd06. The commit adds the following new failures to the blacklist: * Legit P-wrapping bugs: - Block tag on one line (div) (wt2html) - Block tag on one line (blockquote) (wt2html) - Block tag on both lines (div) (wt2html) - Block tag on both lines (blockquote) (wt2html) - Multiple lines without block tags (wt2html) - Empty lines between lines with block tags (wt2html) - Empty lines between lines with block tags (html2html) (This might be a subtly different bug, but the p-wrapping should be fixed first) - Bug 15491: ins/del in blockquote (2) (wt2html) - Bug 15491: ins/del in blockquote (2) (html2wt) (The above two are quirks in tidy; we may want to add a html/parsoid case for parsoid behavior... once we've fixed p-wrapping in general.) - 3a. Indent-Pre and block tags (single-line html) (wt2html) - 3b. Indent-Pre and block tags (multi-line html) (wt2html) - Horizontal ruler -- Supports content following dashes on same line (wt2html) - Horizontal ruler -- Supports content following dashes on same line (html2wt) (In the html2wt direction we don't recognize the potential implicit p-wrapping.) - Templates: 2. Inside a block tag (wt2html) - Templates: P-wrapping: 1c. Templates on consecutive lines (wt2html) - Fuzz testing: URL adjacent extension (no space, dirty; pre) (wt2html) - Bug 6200: paragraphs inside blockquotes (no extra line breaks) (wt2html) - Bug 6200: paragraphs inside blockquotes (extra line break on close) (wt2html) * Related to p-wrapping, except in the inverse direction: we emit wt that *won't* get p-wrapped (but it needs to be): - Bug 6200: paragraphs inside blockquotes (extra line break on open) (html2wt) * We don't strip empty pre tags, but tidy does: - Empty pre; pre inside other HTML tags (bug 54946) (wt2html) * Expected fail, because the input is broken markup: (We should probably fix the test cases to exclude wt2wt) - Implicit td after a |- (wt2wt) - pre tags should be recognized in an explicit td context, but not in an implicit td context (wt2wt) * Not yet sure what's going on here, I think our generated wt wouldn't round trip: - Lists should be recognized in an implicit td context (wt2wt) * I think upstream/core added some new Local interwiki link support which Parsoid doesn't yet know about (maybe bug 61357,64167 is related): - Local interwiki link (wt2html) - Local interwiki link (html2wt) - Local interwiki link (html2html) - Local interwiki link: self-link to current page (wt2html) - Local interwiki link: self-link to current page (html2wt) - Local interwiki link: prefix only (bug 64167) (wt2html) - Local interwiki link: prefix only (bug 64167) (html2wt) - Local interwiki link: prefix only (bug 64167) (html2html) - Local interwiki link: with additional interwiki prefix (bug 61357) (wt2html) - Local interwiki link: with additional interwiki prefix (bug 61357) (html2wt) - Local interwiki link: with additional interwiki prefix (bug 61357) (html2html) - Interlanguage link with preceding local interwiki link (bug 68085) (wt2html) - Interlanguage link with preceding local interwiki link (bug 68085) (html2wt) - Interlanguage link with preceding local interwiki link (bug 68085) (html2html) - Looks like an interlanguage link, but is actually a local interwiki (wt2html) - Looks like an interlanguage link, but is actually a local interwiki (html2wt) - Looks like an interlanguage link, but is actually a local interwiki (html2html) * Expected fail, we don't preserve crazy spacing in html2wt: - Interlanguage link with spacing (html2wt) * We emit li tags unwrapped by ul: - Multiple list tags generated by templates (wt2html) * Looks correct, we should fix the test case: - Test the li-hack (The PHP parser relies on Tidy for the hack) (wt2html) - Test the li-hack (The PHP parser relies on Tidy for the hack) (wt2wt) (the wt2wt case is maybe bogus) * Need to look at this one: - Unbalanced closing block tags break a list (php parser relies on Tidy to fix up) (html2wt) * Parsoid fails this test, but it might be tricky to support properly. See bug 68395.: - Unbalanced closing non-block tags don't break a list (php parser relies on Tidy to fix up) (wt2html) - Unbalanced closing non-block tags don't break a list (php parser relies on Tidy to fix up) (wt2wt) - Unbalanced closing non-block tags don't break a list (php parser relies on Tidy to fix up) (html2wt) -
[MediaWiki-commits] [Gerrit] Add minor debug logging - change (labs...wikipedia-android-builds)
Dbrant has submitted this change and it was merged. Change subject: Add minor debug logging .. Add minor debug logging Change-Id: If18d8423759888acbd2962c45faf07260cbfd09c --- M src/build.py 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Dbrant: Verified; Looks good to me, approved diff --git a/src/build.py b/src/build.py index 5e8affe..c835a10 100755 --- a/src/build.py +++ b/src/build.py @@ -27,12 +27,17 @@ sh.git('reset', '--hard', 'origin/master') +commit_hash = sh.git('rev-parse', 'HEAD') + +print 'Starting build for %s, with %s new commits' % (commit_hash.strip(), commit_count) # Run in side the app folder, since we can't run # instrumentation tests sh.cd(os.path.join(REPO_PATH, 'wikipedia')) mvn = sh.Command(os.path.expanduser('~/mvn/bin/mvn')) mvn('clean', 'install', _env=env) +print 'Finished build, output at %s' % run_path + sh.cp('target/wikipedia.apk', run_path) else: print 'No new commits' -- To view, visit https://gerrit.wikimedia.org/r/155722 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If18d8423759888acbd2962c45faf07260cbfd09c Gerrit-PatchSet: 2 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Dbrant dbr...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki: restore scap symlinks - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/155736 Change subject: mediawiki: restore scap symlinks .. mediawiki: restore scap symlinks scap-rebuild-cdbs and sync-common are called via ssh by scap on a non-interactive, non-login shell and thus won't get the right PATH Change-Id: I54de584169e7566fbdcff6952c3e6bd263e6ab3b --- M modules/mediawiki/manifests/sync.pp 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/155736/1 diff --git a/modules/mediawiki/manifests/sync.pp b/modules/mediawiki/manifests/sync.pp index 33179ab..dd6d18f 100644 --- a/modules/mediawiki/manifests/sync.pp +++ b/modules/mediawiki/manifests/sync.pp @@ -45,4 +45,16 @@ mode= '0775', replace = false, } + +# these get invoked by scap over SSH using a non-interactive, non-login +# shell thus won't pick up /etc/profile.d above +file { '/usr/local/bin/scap-rebuild-cdbs': +ensure = link, +target = '/srv/deployment/scap/scap/bin/scap-rebuild-cdbs', +} + +file { '/usr/local/bin/sync-common': +ensure = link, +target = '/srv/deployment/scap/scap/bin/sync-common', +} } -- To view, visit https://gerrit.wikimedia.org/r/155736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54de584169e7566fbdcff6952c3e6bd263e6ab3b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki: restore scap symlinks - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: mediawiki: restore scap symlinks .. mediawiki: restore scap symlinks scap-rebuild-cdbs and sync-common are called via ssh by scap on a non-interactive, non-login shell and thus won't get the right PATH Change-Id: I54de584169e7566fbdcff6952c3e6bd263e6ab3b --- M modules/mediawiki/manifests/sync.pp 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, but someone else must approve Filippo Giunchedi: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/mediawiki/manifests/sync.pp b/modules/mediawiki/manifests/sync.pp index 33179ab..dd6d18f 100644 --- a/modules/mediawiki/manifests/sync.pp +++ b/modules/mediawiki/manifests/sync.pp @@ -45,4 +45,16 @@ mode= '0775', replace = false, } + +# these get invoked by scap over SSH using a non-interactive, non-login +# shell thus won't pick up /etc/profile.d above +file { '/usr/local/bin/scap-rebuild-cdbs': +ensure = link, +target = '/srv/deployment/scap/scap/bin/scap-rebuild-cdbs', +} + +file { '/usr/local/bin/sync-common': +ensure = link, +target = '/srv/deployment/scap/scap/bin/sync-common', +} } -- To view, visit https://gerrit.wikimedia.org/r/155736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54de584169e7566fbdcff6952c3e6bd263e6ab3b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor duplicate code in EntityView and related - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/155737 Change subject: Refactor duplicate code in EntityView and related .. Refactor duplicate code in EntityView and related Change-Id: I9d181433b16c2e38ca59459aae249dd1e472b9d7 --- M repo/includes/EntityView.php M repo/includes/ItemView.php M repo/includes/PropertyView.php 3 files changed, 23 insertions(+), 51 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/37/155737/1 diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 96b3468..05f0833 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -80,7 +80,7 @@ * * @since 0.2 * -* @var array +* @var string[] */ public static $typeMap = array( Item::ENTITY_TYPE = '\Wikibase\ItemView', @@ -166,7 +166,7 @@ * Returns the placeholder map build while generating HTML. * The map returned here may be used with TextInjector. * -* @return array string - array +* @return array[] string - array */ public function getPlaceholders() { return $this-textInjector-getMarkers(); @@ -237,10 +237,10 @@ * Builds and returns the inner HTML for representing a whole WikibaseEntity. The difference to getHtml() is that * this does not group all the HTMl within one parent node as one entity. * -* @string -* * @param EntityRevision $entityRevision * @param bool $editable +* +* @throws InvalidArgumentException * @return string */ public function getInnerHtml( EntityRevision $entityRevision, $editable = true ) { @@ -249,7 +249,6 @@ $entity = $entityRevision-getEntity(); $html = ''; - $html .= $this-getHtmlForFingerprint( $entity, $editable ); $html .= $this-getHtmlForToc(); $html .= $this-getHtmlForTermBox( $entityRevision, $editable ); @@ -267,16 +266,6 @@ */ protected function getHtmlForFingerprint( Entity $entity, $editable = true ) { return $this-fingerprintView-getHtml( $entity-getFingerprint(), $entity-getId(), $editable ); - } - - /** -* Builds and returns the HTML for the entity's claims. -* -* @param Enttiy $entity -* @return string -*/ - protected function getHtmlForClaims( Entity $entity ) { - return $this-claimsView-getHtml( $entity-getClaims(), 'wikibase-claims' ); } /** @@ -320,7 +309,7 @@ /** * Returns the sections that should displayed in the toc. * -* @return array( link target = system message key ) +* @return string[] array( link target = system message key ) */ protected function getTocSections() { return array(); diff --git a/repo/includes/ItemView.php b/repo/includes/ItemView.php index f332e3b..b3b8e5e 100644 --- a/repo/includes/ItemView.php +++ b/repo/includes/ItemView.php @@ -2,6 +2,7 @@ namespace Wikibase; +use InvalidArgumentException; use Wikibase\Repo\View\SiteLinksView; use Wikibase\Repo\WikibaseRepo; @@ -21,19 +22,20 @@ * @see EntityView::getInnerHtml */ public function getInnerHtml( EntityRevision $entityRevision, $editable = true ) { + wfProfileIn( __METHOD__ ); + + $item = $entityRevision-getEntity(); + + if ( !( $item instanceof Item ) ) { + throw new InvalidArgumentException( '$entityRevision must contain an Item.' ); + } + $html = parent::getInnerHtml( $entityRevision, $editable ); + $html .= $this-claimsView-getHtml( $item-getClaims(), 'wikibase-statements' ); + $html .= $this-getHtmlForSiteLinks( $item, $editable ); - // add site-links to default entity stuff - $html .= $this-getHtmlForSiteLinks( $entityRevision-getEntity(), $editable ); - + wfProfileOut( __METHOD__ ); return $html; - } - - /** -* @see EntityView::getHtmlForClaims -*/ - protected function getHtmlForClaims( Entity $entity ) { - return $this-claimsView-getHtml( $entity-getClaims(), 'wikibase-statements' ); } /** @@ -43,7 +45,7 @@ $array = parent::getTocSections(); $array['claims'] = 'wikibase-statements'; $groups = WikibaseRepo::getDefaultInstance()-getSettings()-getSetting( 'siteLinkGroups' ); - foreach( $groups as $group ) { + foreach ( $groups as $group ) { $id = htmlspecialchars( 'sitelinks-' . $group,
[MediaWiki-commits] [Gerrit] Make ApiModuleManagerTest::testAddModules un-risky - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make ApiModuleManagerTest::testAddModules un-risky .. Make ApiModuleManagerTest::testAddModules un-risky Change-Id: Idbea51cf45fc95676759e5ac9abb342701e5b551 --- M tests/phpunit/includes/api/ApiModuleManagerTest.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/api/ApiModuleManagerTest.php b/tests/phpunit/includes/api/ApiModuleManagerTest.php index 19c0a7d..201eed1 100644 --- a/tests/phpunit/includes/api/ApiModuleManagerTest.php +++ b/tests/phpunit/includes/api/ApiModuleManagerTest.php @@ -101,6 +101,8 @@ $this-assertTrue( $moduleManager-isDefined( $name, $group ), 'isDefined' ); $this-assertNotNull( $moduleManager-getModule( $name, $group, true ), 'getModule' ); } + + $this-assertTrue( true ); // Don't mark the test as risky if $modules is empty } public function getModuleProvider() { -- To view, visit https://gerrit.wikimedia.org/r/155693 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idbea51cf45fc95676759e5ac9abb342701e5b551 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use safe attribute accessor for RecentChange - change (mediawiki/core)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/155738 Change subject: Use safe attribute accessor for RecentChange .. Use safe attribute accessor for RecentChange The RecentChange does not guarantee that all attributes are populated. Handily it provides a safe getter function in RecentChange::getAttribute() that will return null with out triggering an undefined index warning for missing attributes. Protects against log spam like Notice: Undefined index: rc_id. Change-Id: Idee844f0d40a2a084e17f201b5e1501d59a0464d --- M includes/rcfeed/MachineReadableRCFeedFormatter.php 1 file changed, 22 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/155738/1 diff --git a/includes/rcfeed/MachineReadableRCFeedFormatter.php b/includes/rcfeed/MachineReadableRCFeedFormatter.php index 18e6003..519606c 100644 --- a/includes/rcfeed/MachineReadableRCFeedFormatter.php +++ b/includes/rcfeed/MachineReadableRCFeedFormatter.php @@ -39,64 +39,63 @@ */ public function getLine( array $feed, RecentChange $rc, $actionComment ) { global $wgCanonicalServer, $wgServerName, $wgScriptPath; - $attrib = $rc-getAttributes(); $packet = array( // Usually, RC ID is exposed only for patrolling purposes, // but there is no real reason not to expose it in other cases, // and I can see how this may be potentially useful for clients. - 'id' = $attrib['rc_id'], - 'type' = RecentChange::parseFromRCType( $attrib['rc_type'] ), + 'id' = $rc-getAttribute( 'rc_id' ), + 'type' = RecentChange::parseFromRCType( $rc-getAttribute( 'rc_type' ) ), 'namespace' = $rc-getTitle()-getNamespace(), 'title' = $rc-getTitle()-getPrefixedText(), - 'comment' = $attrib['rc_comment'], - 'timestamp' = (int)wfTimestamp( TS_UNIX, $attrib['rc_timestamp'] ), - 'user' = $attrib['rc_user_text'], - 'bot' = (bool)$attrib['rc_bot'], + 'comment' = $rc-getAttribute( 'rc_comment' ), + 'timestamp' = (int)wfTimestamp( TS_UNIX, $rc-getAttribute( 'rc_timestamp' ) ), + 'user' = $rc-getAttribute( 'rc_user_text' ), + 'bot' = (bool)$rc-getAttribute( 'rc_bot' ), ); if ( isset( $feed['channel'] ) ) { $packet['channel'] = $feed['channel']; } - $type = $attrib['rc_type']; + $type = $rc-getAttribute( 'rc_type' ); if ( $type == RC_EDIT || $type == RC_NEW ) { global $wgUseRCPatrol, $wgUseNPPatrol; - $packet['minor'] = (bool)$attrib['rc_minor']; + $packet['minor'] = (bool)$rc-getAttribute( 'rc_minor' ); if ( $wgUseRCPatrol || ( $type == RC_NEW $wgUseNPPatrol ) ) { - $packet['patrolled'] = (bool)$attrib['rc_patrolled']; + $packet['patrolled'] = (bool)$rc-getAttribute( 'rc_patrolled' ); } } switch ( $type ) { case RC_EDIT: $packet['length'] = array( - 'old' = $attrib['rc_old_len'], - 'new' = $attrib['rc_new_len'] + 'old' = $rc-getAttribute( 'rc_old_len' ), + 'new' = $rc-getAttribute( 'rc_new_len' ) ); $packet['revision'] = array( - 'old' = $attrib['rc_last_oldid'], - 'new' = $attrib['rc_this_oldid'] + 'old' = $rc-getAttribute( 'rc_last_oldid' ), + 'new' = $rc-getAttribute( 'rc_this_oldid' ) ); break; case RC_NEW: - $packet['length'] = array( 'old' = null, 'new' = $attrib['rc_new_len'] ); - $packet['revision'] = array( 'old' = null, 'new' = $attrib['rc_this_oldid'] ); + $packet['length'] = array( 'old' = null, 'new' = $rc-getAttribute( 'rc_new_len' ) ); + $packet['revision'] = array( 'old' = null, 'new' = $rc-getAttribute( 'rc_this_oldid' ) ); break; case RC_LOG: -
[MediaWiki-commits] [Gerrit] [FEAT] UploadWarning has uses the warning code - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/155739 Change subject: [FEAT] UploadWarning has uses the warning code .. [FEAT] UploadWarning has uses the warning code To allow scripts easier to determine what the warning is about the UploadWarning contains an attribute 'code' which is the warning code recieved from the API. It's similar to APIError, so both are now subclasses of 'CodedError'. This may break scripts which already parse the warning message but use 'str(exception)' instead of 'exception.message'. The upload.py script uses this feature to allow abortion only because of specific warnings. Bug: 69852 Change-Id: I78e572ce5e40e7cfcdfdf67138c8aa2e41bfebdb --- M pywikibot/__init__.py M pywikibot/data/api.py M pywikibot/exceptions.py M pywikibot/site.py M scripts/upload.py 5 files changed, 57 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/39/155739/1 diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 59bb683..1c69466 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -39,7 +39,7 @@ PageNotSaved, UploadWarning, LockedPage, EditConflict, ServerError, FatalServerError, Server504Error, CaptchaError, SpamfilterError, CircularRedirect, -WikiBaseError, CoordinateGlobeUnknownException, +WikiBaseError, CoordinateGlobeUnknownException, CodedError, ) from pywikibot.textlib import ( unescape, replaceExcept, removeDisabledParts, removeHTMLParts, diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 643369c..4db712c 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -46,22 +46,9 @@ lagpattern = re.compile(rWaiting for [\d.]+: (?Plag\d+) seconds? lagged) -class APIError(pywikibot.Error): +class APIError(pywikibot.CodedError): The wiki site returned an error message. - -def __init__(self, code, info, **kwargs): -Save error dict returned by MW API. -self.code = code -self.info = info -self.other = kwargs -self.unicode = unicode(self.__str__()) - -def __repr__(self): -return 'APIError(%(code)s, %(info)s, %(other)s)' % self.__dict__ - -def __str__(self): -return %(code)s: %(info)s % self.__dict__ class TimeoutError(pywikibot.Error): diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py index 7f9a06d..4359fb9 100644 --- a/pywikibot/exceptions.py +++ b/pywikibot/exceptions.py @@ -27,6 +27,25 @@ return self.unicode +class CodedError(Error): + +Error with a code and message. + +def __init__(self, code, info, **kwargs): +Save error dict returned by MW API. +self.code = code +self.info = info +self.other = kwargs +self.unicode = unicode(self.__str__()) + +def __repr__(self): +return '{name}({code}, {info}, {other})'.format( +name=self.__class__.__name__, **self.__dict__) + +def __str__(self): +return %(code)s: %(info)s % self.__dict__ + + class PageRelatedError(Error): Abstract Exception, used when the Exception concerns a particular @@ -168,10 +187,17 @@ Captcha is asked and config.solve_captcha == False. -class UploadWarning(Error): +class UploadWarning(CodedError): Upload failed with a warning message (passed as the argument). +def __init__(self, code, message): +super(UploadWarning, self).__init__(code, message) + +@property +def message(self): +return self.info + class AutoblockUser(Error): diff --git a/pywikibot/site.py b/pywikibot/site.py index befcf3a..f1b3916 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3895,8 +3895,8 @@ User '%s' does not have upload rights on site %s. % (self.user(), self)) # check for required parameters -if (source_filename and source_url)\ -or (source_filename is None and source_url is None): +# bool(a) != bool(b) == a xor b +if bool(source_filename) == bool(source_url): raise ValueError(APISite.upload: must provide either source_filename or source_url, not both.) if comment is None: @@ -3915,6 +3915,12 @@ if not os.path.isfile(source_filename): raise ValueError(File '%s' does not exist. % source_filename) +if os.path.getsize(source_filename) (1 20) * 100: +# files larger than 100 MiB must be in chunks +# https://commons.wikimedia.org/wiki/Commons:Maximum_file_size +raise ValueError(File '{0}' is larger than 100 MiB and + pywikibot does not support chunked + uploads yet..format(source_filename)) # TODO: if file size exceeds some threshold (to be
[MediaWiki-commits] [Gerrit] Run webstatscollector (modified) with kafkatee on analytics1003 - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/155740 Change subject: Run webstatscollector (modified) with kafkatee on analytics1003 .. Run webstatscollector (modified) with kafkatee on analytics1003 This commit also starts kafkatee consuming from the full webrequest stream (all 4 topics). Here we go! Change-Id: I7be5f44075cae9899ece80de8e16c71b0f2ddc56 --- M manifests/role/analytics/kafkatee.pp M manifests/site.pp 2 files changed, 108 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/40/155740/1 diff --git a/manifests/role/analytics/kafkatee.pp b/manifests/role/analytics/kafkatee.pp index 56b73bb..5b10312 100644 --- a/manifests/role/analytics/kafkatee.pp +++ b/manifests/role/analytics/kafkatee.pp @@ -88,6 +88,69 @@ } } +# == role::analytics::kafkatee::webstatscollector +# We want to run webstatscollector via kafkatee for testing. +# Some of the production (role::logging::webstatscollector) +# configs are not relevant here, so we copy the class +# and edit it. +# +# webstatscollector needs all of the webrequest logs, +# so this class makes sure all webrequest topic input +# classes are included. +class role::analytics::kafkatee::webrequest::webstatscollector { +include role::analytics::kafkatee::input::webrequest + +# webstats-collector process writes dump files here. +$webstats_dumps_directory = '/srv/webstats/dumps' + +package { 'webstatscollector': ensure = installed } +service { 'webstats-collector': +ensure = 'running', +hasstatus = 'false', +hasrestart = 'true', +require= Package['webstatscollector'], +} + +# Gzip pagecounts files hourly. +cron { 'webstats-dumps-gzip': +command = /bin/gzip ${webstats_dumps_directory}/pagecounts--?? 2 /dev/null, +minute = 2, +user= 'nobody', +require = Service['webstats-collector'], +} + +# Delete webstats dumps that are older than 10 days daily. +cron { 'webstats-dumps-delete': +command = /usr/bin/find ${webstats_dumps_directory} -maxdepth 1 -type f -mtime +10 -delete, +minute = 28, +hour= 1, +user= 'nobody', +require = Service['webstats-collector'], +} + +# kafkatee outputs into webstats filter and forwards to webstats collector via log2udp +::kafkatee::output { 'webstatscollector': +destination = /usr/local/bin/filter | /usr/bin/log2udp -h localhost -p 3815, +type= 'pipe', +require = Service['webstats-collector'], +} +} + + + +# == Class role::analytics::kafkatee::input::webrequest +# Includes each of the 4 webrequest topics as input +# You can use this class, or if you want to consume +# only an individual topic, include one of the +# topic specific classes manually. +class role::analytics::kafkatee::input::webrequest { +include role::analytics::kafkatee::input::webrequest::mobile +include role::analytics::kafkatee::input::webrequest::text +include role::analytics::kafkatee::input::webrequest::bits +include role::analytics::kafkatee::input::webrequest::upload +} + + # == Class role::analytics::kafkatee::input::webrequest::mobile # Sets up a kafkatee input to consume from the webrequest_mobile topic @@ -103,3 +166,47 @@ offset = 'stored', } } +# == Class role::analytics::kafkatee::input::webrequest::text +# Sets up a kafkatee input to consume from the webrequest_text topic +# This is its own class so that if a kafkatee instance wants +# to consume from multiple topics, it may include each +# topic as a class. +# +class role::analytics::kafkatee::input::webrequest::text { +::kafkatee::input { 'kafka-webrequest_text': +topic = 'webrequest_text', +partitions = '0-11', +options = { 'encoding' = 'json' }, +offset = 'stored', +} +} +# == Class role::analytics::kafkatee::input::webrequest::bits +# Sets up a kafkatee input to consume from the webrequest_bits topic +# This is its own class so that if a kafkatee instance wants +# to consume from multiple topics, it may include each +# topic as a class. +# +class role::analytics::kafkatee::input::webrequest::bits { +::kafkatee::input { 'kafka-webrequest_bits': +topic = 'webrequest_bits', +partitions = '0-11', +options = { 'encoding' = 'json' }, +offset = 'stored', +} +} +# == Class role::analytics::kafkatee::input::webrequest::upload +# Sets up a kafkatee input to consume from the webrequest_upload topic +# This is its own class so that if a kafkatee instance wants +# to consume from multiple topics, it may include each +# topic as a class. +# +class role::analytics::kafkatee::input::webrequest::upload { +::kafkatee::input { 'kafka-webrequest_upload': +
[MediaWiki-commits] [Gerrit] Enable webfonts by default for Divehi (dv) wikis - change (operations/mediawiki-config)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/155741 Change subject: Enable webfonts by default for Divehi (dv) wikis .. Enable webfonts by default for Divehi (dv) wikis Request: https://bugzilla.wikimedia.org/show_bug.cgi?id=69860#c0 Bug: 69860 Change-Id: Iaaab010db98cc24d47c8c35b68b0534ca4f66087 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/41/155741/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 30a4b34..db2fa29 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13295,6 +13295,8 @@ 'wmgULSWebfontsEnabled' = array( 'default' = false, 'enwikisource' = true, // bug 69655 + 'dvwiki' = true, // bug 69860 + 'dvwiktionary' = true, // bug 69860 'hewikisource' = true, // bug 60939 ), -- To view, visit https://gerrit.wikimedia.org/r/155741 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaaab010db98cc24d47c8c35b68b0534ca4f66087 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Make the package name be .master - change (labs...wikipedia-android-builds)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/155742 Change subject: [WIP] Make the package name be .master .. [WIP] Make the package name be .master Change-Id: I695f73bb22f1dacd17907eafce4f84aa532beecf --- M src/build.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikipedia-android-builds refs/changes/42/155742/1 diff --git a/src/build.py b/src/build.py index 5ad00f2..f461237 100755 --- a/src/build.py +++ b/src/build.py @@ -38,6 +38,10 @@ meta['commit_hash'] = commit_hash +# Change the package name to .master +prepare_release = sh.Command(os.path.expanduser('~/wikipedia/scripts/prepare-release.py')) +prepare_release('--custompackage', 'master') + print 'Starting build for %s, with %s new commits' % (commit_hash, commit_count) # Run in side the app folder, since we can't run # instrumentation tests -- To view, visit https://gerrit.wikimedia.org/r/155742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I695f73bb22f1dacd17907eafce4f84aa532beecf Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Run webstatscollector (modified) with kafkatee on analytics1003 - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Run webstatscollector (modified) with kafkatee on analytics1003 .. Run webstatscollector (modified) with kafkatee on analytics1003 This commit also starts kafkatee consuming from the full webrequest stream (all 4 topics). Here we go! Change-Id: I7be5f44075cae9899ece80de8e16c71b0f2ddc56 --- M manifests/role/analytics/kafkatee.pp M manifests/site.pp 2 files changed, 108 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/role/analytics/kafkatee.pp b/manifests/role/analytics/kafkatee.pp index 56b73bb..5b10312 100644 --- a/manifests/role/analytics/kafkatee.pp +++ b/manifests/role/analytics/kafkatee.pp @@ -88,6 +88,69 @@ } } +# == role::analytics::kafkatee::webstatscollector +# We want to run webstatscollector via kafkatee for testing. +# Some of the production (role::logging::webstatscollector) +# configs are not relevant here, so we copy the class +# and edit it. +# +# webstatscollector needs all of the webrequest logs, +# so this class makes sure all webrequest topic input +# classes are included. +class role::analytics::kafkatee::webrequest::webstatscollector { +include role::analytics::kafkatee::input::webrequest + +# webstats-collector process writes dump files here. +$webstats_dumps_directory = '/srv/webstats/dumps' + +package { 'webstatscollector': ensure = installed } +service { 'webstats-collector': +ensure = 'running', +hasstatus = 'false', +hasrestart = 'true', +require= Package['webstatscollector'], +} + +# Gzip pagecounts files hourly. +cron { 'webstats-dumps-gzip': +command = /bin/gzip ${webstats_dumps_directory}/pagecounts--?? 2 /dev/null, +minute = 2, +user= 'nobody', +require = Service['webstats-collector'], +} + +# Delete webstats dumps that are older than 10 days daily. +cron { 'webstats-dumps-delete': +command = /usr/bin/find ${webstats_dumps_directory} -maxdepth 1 -type f -mtime +10 -delete, +minute = 28, +hour= 1, +user= 'nobody', +require = Service['webstats-collector'], +} + +# kafkatee outputs into webstats filter and forwards to webstats collector via log2udp +::kafkatee::output { 'webstatscollector': +destination = /usr/local/bin/filter | /usr/bin/log2udp -h localhost -p 3815, +type= 'pipe', +require = Service['webstats-collector'], +} +} + + + +# == Class role::analytics::kafkatee::input::webrequest +# Includes each of the 4 webrequest topics as input +# You can use this class, or if you want to consume +# only an individual topic, include one of the +# topic specific classes manually. +class role::analytics::kafkatee::input::webrequest { +include role::analytics::kafkatee::input::webrequest::mobile +include role::analytics::kafkatee::input::webrequest::text +include role::analytics::kafkatee::input::webrequest::bits +include role::analytics::kafkatee::input::webrequest::upload +} + + # == Class role::analytics::kafkatee::input::webrequest::mobile # Sets up a kafkatee input to consume from the webrequest_mobile topic @@ -103,3 +166,47 @@ offset = 'stored', } } +# == Class role::analytics::kafkatee::input::webrequest::text +# Sets up a kafkatee input to consume from the webrequest_text topic +# This is its own class so that if a kafkatee instance wants +# to consume from multiple topics, it may include each +# topic as a class. +# +class role::analytics::kafkatee::input::webrequest::text { +::kafkatee::input { 'kafka-webrequest_text': +topic = 'webrequest_text', +partitions = '0-11', +options = { 'encoding' = 'json' }, +offset = 'stored', +} +} +# == Class role::analytics::kafkatee::input::webrequest::bits +# Sets up a kafkatee input to consume from the webrequest_bits topic +# This is its own class so that if a kafkatee instance wants +# to consume from multiple topics, it may include each +# topic as a class. +# +class role::analytics::kafkatee::input::webrequest::bits { +::kafkatee::input { 'kafka-webrequest_bits': +topic = 'webrequest_bits', +partitions = '0-11', +options = { 'encoding' = 'json' }, +offset = 'stored', +} +} +# == Class role::analytics::kafkatee::input::webrequest::upload +# Sets up a kafkatee input to consume from the webrequest_upload topic +# This is its own class so that if a kafkatee instance wants +# to consume from multiple topics, it may include each +# topic as a class. +# +class role::analytics::kafkatee::input::webrequest::upload { +::kafkatee::input { 'kafka-webrequest_upload': +topic = 'webrequest_upload', +partitions =
[MediaWiki-commits] [Gerrit] Make prepare-release executable - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/155743 Change subject: Make prepare-release executable .. Make prepare-release executable Change-Id: I53d10ed65adf80f21687982cd9c9df7b7076cfd5 --- M scripts/prepare-release.py 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/43/155743/1 diff --git a/scripts/prepare-release.py b/scripts/prepare-release.py old mode 100644 new mode 100755 -- To view, visit https://gerrit.wikimedia.org/r/155743 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53d10ed65adf80f21687982cd9c9df7b7076cfd5 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make prepare-release executable - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Make prepare-release executable .. Make prepare-release executable Change-Id: I53d10ed65adf80f21687982cd9c9df7b7076cfd5 --- M scripts/prepare-release.py 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/prepare-release.py b/scripts/prepare-release.py old mode 100644 new mode 100755 -- To view, visit https://gerrit.wikimedia.org/r/155743 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53d10ed65adf80f21687982cd9c9df7b7076cfd5 Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@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] Ensure that expiry times are given as integers - change (mediawiki/core)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/155744 Change subject: Ensure that expiry times are given as integers .. Ensure that expiry times are given as integers Fixes Fatal error: Argument 4 passed to Memcached::cas() must be an instance of int, float given. Change-Id: Ibf1ea638ec1a4dcf009cdaea8aa66008c74ff30b --- M includes/objectcache/MemcachedBagOStuff.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/44/155744/1 diff --git a/includes/objectcache/MemcachedBagOStuff.php b/includes/objectcache/MemcachedBagOStuff.php index 59191d7..54a464d 100644 --- a/includes/objectcache/MemcachedBagOStuff.php +++ b/includes/objectcache/MemcachedBagOStuff.php @@ -154,7 +154,7 @@ if ( $expiry 2592000 $expiry 10 ) { $expiry = 2592000; } - return $expiry; + return (int) $expiry; } /** -- To view, visit https://gerrit.wikimedia.org/r/155744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf1ea638ec1a4dcf009cdaea8aa66008c74ff30b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: BryanDavis bda...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Symlink latest build directory to 'latest' - change (labs...wikipedia-android-builds)
Yuvipanda has submitted this change and it was merged. Change subject: Symlink latest build directory to 'latest' .. Symlink latest build directory to 'latest' Change-Id: I8faae0740939f682d6f79ef86cc5fbfbdb856bc7 --- M src/build.py 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: BearND: Looks good to me, approved Yuvipanda: Verified diff --git a/src/build.py b/src/build.py index c835a10..4700fde 100755 --- a/src/build.py +++ b/src/build.py @@ -39,5 +39,9 @@ print 'Finished build, output at %s' % run_path sh.cp('target/wikipedia.apk', run_path) + +latest_path = os.path.expanduser('~/public_html/runs/latest') +sh.rm('-f', latest_path) +sh.ln('-s', run_path, latest_path) else: print 'No new commits' -- To view, visit https://gerrit.wikimedia.org/r/155723 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8faae0740939f682d6f79ef86cc5fbfbdb856bc7 Gerrit-PatchSet: 2 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Write out meta.json with metadata about each build - change (labs...wikipedia-android-builds)
Yuvipanda has submitted this change and it was merged. Change subject: Write out meta.json with metadata about each build .. Write out meta.json with metadata about each build Change-Id: I8426f70f270d2cf2815512bb668d524cc5bb363e --- M src/build.py 1 file changed, 14 insertions(+), 2 deletions(-) Approvals: BearND: Looks good to me, approved Yuvipanda: Verified diff --git a/src/build.py b/src/build.py index 4700fde..5ad00f2 100755 --- a/src/build.py +++ b/src/build.py @@ -1,6 +1,7 @@ #!/data/project/wikipedia-android-builds/bin/python import os import sh +import json from datetime import datetime # Environment variables required for mvn to build app @@ -20,16 +21,24 @@ commit_count = int(sh.git('rev-list', 'HEAD..origin/master', '--count')) if commit_count != 0: +meta = { +'commit_count': commit_count +} + # Create the output directory run_slug = 'master-%s' % datetime.now().isoformat() run_path = os.path.expanduser('~/public_html/runs/%s' % run_slug) sh.mkdir('-p', run_path) +meta['commits'] = str(sh.git('rev-list', 'HEAD..origin/master', '--oneline')).split('\n') + sh.git('reset', '--hard', 'origin/master') -commit_hash = sh.git('rev-parse', 'HEAD') +commit_hash = str(sh.git('rev-parse', 'HEAD')).strip() -print 'Starting build for %s, with %s new commits' % (commit_hash.strip(), commit_count) +meta['commit_hash'] = commit_hash + +print 'Starting build for %s, with %s new commits' % (commit_hash, commit_count) # Run in side the app folder, since we can't run # instrumentation tests sh.cd(os.path.join(REPO_PATH, 'wikipedia')) @@ -40,6 +49,9 @@ sh.cp('target/wikipedia.apk', run_path) +meta['completed_on'] = datetime.now().isoformat() +json.dump(meta, open(os.path.join(run_path, 'meta.json'), 'w')) + latest_path = os.path.expanduser('~/public_html/runs/latest') sh.rm('-f', latest_path) sh.ln('-s', run_path, latest_path) -- To view, visit https://gerrit.wikimedia.org/r/155730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8426f70f270d2cf2815512bb668d524cc5bb363e Gerrit-PatchSet: 4 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make the package name be .master - change (labs...wikipedia-android-builds)
Yuvipanda has submitted this change and it was merged. Change subject: Make the package name be .master .. Make the package name be .master Change-Id: I695f73bb22f1dacd17907eafce4f84aa532beecf --- M src/build.py 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/src/build.py b/src/build.py index 5ad00f2..f461237 100755 --- a/src/build.py +++ b/src/build.py @@ -38,6 +38,10 @@ meta['commit_hash'] = commit_hash +# Change the package name to .master +prepare_release = sh.Command(os.path.expanduser('~/wikipedia/scripts/prepare-release.py')) +prepare_release('--custompackage', 'master') + print 'Starting build for %s, with %s new commits' % (commit_hash, commit_count) # Run in side the app folder, since we can't run # instrumentation tests -- To view, visit https://gerrit.wikimedia.org/r/155742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I695f73bb22f1dacd17907eafce4f84aa532beecf Gerrit-PatchSet: 2 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Grant all userrights to sysop group by default - change (mediawiki...Gadgets)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/155745 Change subject: Grant all userrights to sysop group by default .. Grant all userrights to sysop group by default Extensions should use a sane default configuration, and it is expected that sysops will be able to create/edit gadgets. This is also needed for backwards-compatability from Gadgets 1.0. Change-Id: I377e9e9a6477a337baf031b4e802ca58586f6392 See: https://www.mediawiki.org/wiki/Thread:Talk:ResourceLoader/Version_2_Design_Specification/Task_management/NS_GADGET_editing --- M Gadgets.php 1 file changed, 5 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets refs/changes/45/155745/1 diff --git a/Gadgets.php b/Gadgets.php index aa02f7a..eefd866 100644 --- a/Gadgets.php +++ b/Gadgets.php @@ -88,13 +88,11 @@ 'gadgets-definition-delete' ) ); -// Example of user groups -// Copy to your LocalSettings.php to use these -// or grant the rights to an existing group (e.g. sysops) -#$wgGroupPermissions['gadgetartists']['gadgets-edit'] = true; -#$wgGroupPermissions['gadgetmanagers']['gadgets-definition-create'] = true; -#$wgGroupPermissions['gadgetmanagers']['gadgets-definition-edit'] = true; -#$wgGroupPermissions['gadgetmanagers']['gadgets-definition-delete'] = true; +// Give all gadgets-* userrights to sysops by default +$wgGroupPermissions['sysop']['gadgets-edit'] = true; +$wgGroupPermissions['sysop']['gadgets-definition-create'] = true; +$wgGroupPermissions['sysop']['gadgets-definition-edit'] = true; +$wgGroupPermissions['sysop']['gadgets-definition-delete'] = true; $wgHooks['AfterImportPage'][] = 'GadgetsHooks::gadgetDefinitionImport'; $wgHooks['AfterImportPage'][] = 'GadgetsHooks::cssOrJsPageImport'; -- To view, visit https://gerrit.wikimedia.org/r/155745 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I377e9e9a6477a337baf031b4e802ca58586f6392 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gadgets Gerrit-Branch: RL2 Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduce cronspam - change (labs...wikipedia-android-builds)
Yuvipanda has submitted this change and it was merged. Change subject: Reduce cronspam .. Reduce cronspam Change-Id: I24568285a5c7989c5782fc41714df58072b1f15c --- M crontab.txt 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yuvipanda: Verified; Looks good to me, approved Legoktm: Looks good to me, but someone else must approve diff --git a/crontab.txt b/crontab.txt index c936fe1..e537ce5 100644 --- a/crontab.txt +++ b/crontab.txt @@ -1 +1 @@ -0,30 * * * * jsub -once /data/project/wikipedia-android-builds/src/build.py +0,30 * * * * jsub -quiet -once /data/project/wikipedia-android-builds/src/build.py -- To view, visit https://gerrit.wikimedia.org/r/155746 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I24568285a5c7989c5782fc41714df58072b1f15c Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduce cronspam - change (labs...wikipedia-android-builds)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/155746 Change subject: Reduce cronspam .. Reduce cronspam Change-Id: I24568285a5c7989c5782fc41714df58072b1f15c --- M crontab.txt 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikipedia-android-builds refs/changes/46/155746/1 diff --git a/crontab.txt b/crontab.txt index c936fe1..e537ce5 100644 --- a/crontab.txt +++ b/crontab.txt @@ -1 +1 @@ -0,30 * * * * jsub -once /data/project/wikipedia-android-builds/src/build.py +0,30 * * * * jsub -quiet -once /data/project/wikipedia-android-builds/src/build.py -- To view, visit https://gerrit.wikimedia.org/r/155746 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24568285a5c7989c5782fc41714df58072b1f15c Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikipedia-android-builds Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug 31256: a way to customize the AntiSpoof blacklist - change (mediawiki...AntiSpoof)
jenkins-bot has submitted this change and it was merged. Change subject: Bug 31256: a way to customize the AntiSpoof blacklist .. Bug 31256: a way to customize the AntiSpoof blacklist Patch by Van de Bugger Change-Id: I0d706be2dc8bcf060dc0bbf38d82a4c2da1e16d6 --- M AntiSpoof.php M AntiSpoof_body.php 2 files changed, 23 insertions(+), 17 deletions(-) Approvals: Legoktm: Looks good to me, but someone else must approve MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/AntiSpoof.php b/AntiSpoof.php index e125bd7..0ae0167 100644 --- a/AntiSpoof.php +++ b/AntiSpoof.php @@ -22,6 +22,22 @@ $wgAntiSpoofAccounts = true; /** + * Blacklisted character codes. + */ +$wgAntiSpoofBlacklist = array( + 0x0337, # Combining short solidus overlay + 0x0338, # Combining long solidus overlay + 0x2044, # Fraction slash + 0x2215, # Division slash + 0x23AE, # Integral extension + 0x29F6, # Solidus with overbar + 0x29F8, # Big solidus + 0x2AFB, # Triple solidus binary relation + 0x2AFD, # Double solidus operator + 0xFF0F # Fullwidth solidus +); + +/** * Allow sysops and bureaucrats to override the spoofing checks * and create accounts for people which hit false positives. */ diff --git a/AntiSpoof_body.php b/AntiSpoof_body.php index c485c12..931402b 100644 --- a/AntiSpoof_body.php +++ b/AntiSpoof_body.php @@ -127,21 +127,6 @@ array( 0x2F800, 0x2FA1F, SCRIPT_DEPRECATED ) # CJK Compatibility Ideographs Supplement ); - # Specially naughty characters we don't ever want to see... - # Slash-like characters. - private static $character_blacklist = array( - 0x0337, # Combining short solidus overlay - 0x0338, # Combining long solidus overlay - 0x2044, # Fraction slash - 0x2215, # Division slash - 0x23AE, # Integral extension - 0x29F6, # Solidus with overbar - 0x29F8, # Big solidus - 0x2AFB, # Triple solidus binary relation - 0x2AFD, # Double solidus operator - 0xFF0F # Fullwidth solidus - ); - # Equivalence sets private static $equivset = null; @@ -335,7 +320,12 @@ * @return array */ public static function checkUnicodeString( $testName ) { + global $wgAntiSpoofBlacklist; + # Start with some sanity checking + if ( !is_array( $wgAntiSpoofBlacklist ) ) { + throw new MWError( '$wgAntiSpoofBlacklist should be an array!' ); + } if ( !is_string( $testName ) ) { return array( ERROR, wfMessage( 'antispoof-badtype' )-text() ); } @@ -345,7 +335,7 @@ } foreach ( self::stringToList( $testName ) as $char ) { - if ( in_array( $char, self::$character_blacklist ) ) { + if ( in_array( $char, $wgAntiSpoofBlacklist ) ) { return self::badCharErr( 'antispoof-blacklisted', $char ); } } @@ -356,7 +346,7 @@ # Be paranoid: check again, just in case Unicode normalization code changes... foreach ( $testChars as $char ) { - if ( in_array( $char, self::$character_blacklist ) ) { + if ( in_array( $char, $wgAntiSpoofBlacklist ) ) { return self::badCharErr( 'antispoof-blacklisted', $char ); } } -- To view, visit https://gerrit.wikimedia.org/r/47902 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0d706be2dc8bcf060dc0bbf38d82a4c2da1e16d6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AntiSpoof Gerrit-Branch: master Gerrit-Owner: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: CSteipp cste...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Qgil q...@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] Drop left in debugging var_dump from WikiImporter - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Drop left in debugging var_dump from WikiImporter .. Drop left in debugging var_dump from WikiImporter I found this on accident when searching for a var_dump I forgot somewhere in my own code. We are maintaining production code here, right? Debugging and testing should be somewhere else. Also note the stray print before the var_dump. Change-Id: I98725b277039f55db9ff95399e9559a477b43c26 --- M includes/Import.php 1 file changed, 0 insertions(+), 41 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Import.php b/includes/Import.php index e6b5dc2..3880e25 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -429,53 +429,12 @@ return ''; } - # -- - - /** Left in for debugging */ - private function dumpElement() { - static $lookup = null; - if ( !$lookup ) { - $xmlReaderConstants = array( - NONE, - ELEMENT, - ATTRIBUTE, - TEXT, - CDATA, - ENTITY_REF, - ENTITY, - PI, - COMMENT, - DOC, - DOC_TYPE, - DOC_FRAGMENT, - NOTATION, - WHITESPACE, - SIGNIFICANT_WHITESPACE, - END_ELEMENT, - END_ENTITY, - XML_DECLARATION, - ); - $lookup = array(); - - foreach ( $xmlReaderConstants as $name ) { - $lookup[constant( XmlReader::$name )] = $name; - } - } - - print var_dump( - $lookup[$this-reader-nodeType], - $this-reader-name, - $this-reader-value - ) . \n\n; - } - /** * Primary entry point * @throws MWException * @return bool */ public function doImport() { - // Calls to reader-read need to be wrapped in calls to // libxml_disable_entity_loader() to avoid local file // inclusion attacks (bug 46932). -- To view, visit https://gerrit.wikimedia.org/r/155715 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I98725b277039f55db9ff95399e9559a477b43c26 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: TTO at.li...@live.com.au Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Removing mw1130 from dsh files to replace disk and r... - change (operations/puppet)
Cmjohnson has uploaded a new change for review. https://gerrit.wikimedia.org/r/155747 Change subject: Revert Removing mw1130 from dsh files to replace disk and re-install .. Revert Removing mw1130 from dsh files to replace disk and re-install This reverts commit cbdc50424cf1675c490b9e472e808491e296e8a6. Change-Id: I98d151d9a4f05876bba6a19ce4e43954bf0cc614 --- M files/dsh/group/apache-eqiad M files/dsh/group/apaches M files/dsh/group/mw-eqiad 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/47/155747/1 diff --git a/files/dsh/group/apache-eqiad b/files/dsh/group/apache-eqiad index 5cb602e..f6edafd 100644 --- a/files/dsh/group/apache-eqiad +++ b/files/dsh/group/apache-eqiad @@ -126,7 +126,7 @@ mw1127 mw1128 mw1129 - +mw1130 mw1131 mw1132 mw1133 diff --git a/files/dsh/group/apaches b/files/dsh/group/apaches index 5cb602e..f6edafd 100644 --- a/files/dsh/group/apaches +++ b/files/dsh/group/apaches @@ -126,7 +126,7 @@ mw1127 mw1128 mw1129 - +mw1130 mw1131 mw1132 mw1133 diff --git a/files/dsh/group/mw-eqiad b/files/dsh/group/mw-eqiad index 9a4612a..19b0ed0 100644 --- a/files/dsh/group/mw-eqiad +++ b/files/dsh/group/mw-eqiad @@ -127,7 +127,7 @@ mw1127 mw1128 mw1129 - +mw1130 mw1131 mw1132 mw1133 -- To view, visit https://gerrit.wikimedia.org/r/155747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I98d151d9a4f05876bba6a19ce4e43954bf0cc614 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Removing mw1130 from dsh files to replace disk and r... - change (operations/puppet)
Cmjohnson has submitted this change and it was merged. Change subject: Revert Removing mw1130 from dsh files to replace disk and re-install .. Revert Removing mw1130 from dsh files to replace disk and re-install This reverts commit cbdc50424cf1675c490b9e472e808491e296e8a6. Change-Id: I98d151d9a4f05876bba6a19ce4e43954bf0cc614 --- M files/dsh/group/apache-eqiad M files/dsh/group/apaches M files/dsh/group/mw-eqiad 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Cmjohnson: Looks good to me, approved jenkins-bot: Verified diff --git a/files/dsh/group/apache-eqiad b/files/dsh/group/apache-eqiad index 5cb602e..f6edafd 100644 --- a/files/dsh/group/apache-eqiad +++ b/files/dsh/group/apache-eqiad @@ -126,7 +126,7 @@ mw1127 mw1128 mw1129 - +mw1130 mw1131 mw1132 mw1133 diff --git a/files/dsh/group/apaches b/files/dsh/group/apaches index 5cb602e..f6edafd 100644 --- a/files/dsh/group/apaches +++ b/files/dsh/group/apaches @@ -126,7 +126,7 @@ mw1127 mw1128 mw1129 - +mw1130 mw1131 mw1132 mw1133 diff --git a/files/dsh/group/mw-eqiad b/files/dsh/group/mw-eqiad index 9a4612a..19b0ed0 100644 --- a/files/dsh/group/mw-eqiad +++ b/files/dsh/group/mw-eqiad @@ -127,7 +127,7 @@ mw1127 mw1128 mw1129 - +mw1130 mw1131 mw1132 mw1133 -- To view, visit https://gerrit.wikimedia.org/r/155747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I98d151d9a4f05876bba6a19ce4e43954bf0cc614 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org Gerrit-Reviewer: Cmjohnson cmjohn...@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] Drop unused imports - change (analytics/wikimetrics)
Milimetric has submitted this change and it was merged. Change subject: Drop unused imports .. Drop unused imports Change-Id: I2aaf8f490d23469bef4d3ee69fdb96ecbc10c376 --- M tests/test_models/test_run_report.py 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Milimetric: Looks good to me, approved diff --git a/tests/test_models/test_run_report.py b/tests/test_models/test_run_report.py index 8263295..03f3a7e 100644 --- a/tests/test_models/test_run_report.py +++ b/tests/test_models/test_run_report.py @@ -2,15 +2,13 @@ from datetime import timedelta, datetime from sqlalchemy import func from nose.tools import assert_equals, assert_true, raises -from nose.plugins.attrib import attr -from mock import MagicMock from celery.exceptions import SoftTimeLimitExceeded from tests.fixtures import QueueDatabaseTest, DatabaseTest from wikimetrics.models import RunReport, ReportStore, WikiUserStore, CohortWikiUserStore from wikimetrics.exceptions import InvalidCohort from wikimetrics.metrics import metric_classes -from wikimetrics.utils import diff_datewise, stringify, strip_time +from wikimetrics.utils import stringify, strip_time from wikimetrics.enums import Aggregation, TimeseriesChoices from wikimetrics.configurables import queue from wikimetrics.schedules.daily import recurring_reports -- To view, visit https://gerrit.wikimedia.org/r/155644 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2aaf8f490d23469bef4d3ee69fdb96ecbc10c376 Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikimetrics Gerrit-Branch: master Gerrit-Owner: QChris christ...@quelltextlich.at Gerrit-Reviewer: Milimetric dandree...@wikimedia.org Gerrit-Reviewer: Nuria nu...@wikimedia.org Gerrit-Reviewer: QChris christ...@quelltextlich.at Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignore local browsertest files - change (mediawiki...Math)
jenkins-bot has submitted this change and it was merged. Change subject: Ignore local browsertest files .. Ignore local browsertest files Change-Id: If4573c4ca0feb80a35a008133e55e91e82b68651 --- M .gitignore 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Frédéric Wang: Looks good to me, but someone else must approve Cmcmahon: Looks good to me, but someone else must approve Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index ed865bf..868c8aa 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,5 @@ modules/MathJax/unpacked/jax/output/SVG/fonts/Latin-Modern modules/MathJax/unpacked/jax/output/SVG/fonts/Neo-Euler modules/MathJax/unpacked/jax/output/SVG/fonts/STIX-Web +tests/browser/.bundle +tests/browser/.gem -- To view, visit https://gerrit.wikimedia.org/r/154060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4573c4ca0feb80a35a008133e55e91e82b68651 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Frédéric Wang fred.w...@free.fr Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits