[MediaWiki-commits] [Gerrit] pywikibot/core[master]: page.py: Raise NoPage in WikibasePage.get if the entity does...
Dalba has uploaded a new change for review. https://gerrit.wikimedia.org/r/321842 Change subject: page.py: Raise NoPage in WikibasePage.get if the entity does not exist .. page.py: Raise NoPage in WikibasePage.get if the entity does not exist The test "test_item_never_existed" in "wikibase_tests.py" was failing because WikibasePage.get was raising APIError instead. Change-Id: Ie36e0b6f9898ab7eb3c74ae81ba99ee7a5880ef6 --- M pywikibot/page.py 1 file changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/42/321842/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index 61fb71a..06be97f 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -63,6 +63,7 @@ SiteDefinitionError, UserRightsError, ) +from pywikibot.data.api import APIError from pywikibot.family import Family from pywikibot.site import Namespace, need_version from pywikibot.tools import ( @@ -3182,7 +3183,7 @@ try: self.site.blockuser(self, expiry, reason, anononly, nocreate, autoblock, noemail, reblock) -except pywikibot.data.api.APIError as err: +except APIError as err: if err.code == 'invalidrange': raise ValueError("%s is not a valid IP range." % self.username) else: @@ -3492,7 +3493,12 @@ if not identification: raise pywikibot.NoPage(self) -data = self.repo.loadcontent(identification) +try: +data = self.repo.loadcontent(identification) +except APIError as err: +if err.code == 'no-such-entity': +raise pywikibot.NoPage(self) +raise item_index = list(data.keys())[0] if lazy_loading_id or item_index != '-1': self.id = item_index -- To view, visit https://gerrit.wikimedia.org/r/321842 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie36e0b6f9898ab7eb3c74ae81ba99ee7a5880ef6 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Dalba___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] remove UntaggedPageGenerator
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/321840 Change subject: [bugfix] remove UntaggedPageGenerator .. [bugfix] remove UntaggedPageGenerator - https://toolserver.org/~daniel/WikiSense/UntaggedImages.php is no longer available and the project has been discontinued. Remove it. Change-Id: I68805b101856ffc272d0022193f9ec32f077da31 --- M pywikibot/pagegenerators.py 1 file changed, 1 insertion(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/40/321840/1 diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 979f89b..07b3974 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -281,11 +281,6 @@ "-randomredirect:n" where n is the number of pages to be returned, else 10 pages are returned. --untagged Work on image pages that don't have any license template on a - site given in the format "..org, e.g. - "ja.wikipedia.org" or "commons.wikimedia.org". - Using an external Toolserver tool. - -google Work on all pages that are found in a Google search. You need a Google Web API license key. Note that Google doesn't give out license keys anymore. See google_key in @@ -888,7 +883,7 @@ elif arg == '-yahoo': gen = YahooSearchPageGenerator(value, site=self.site) elif arg == '-untagged': -gen = UntaggedPageGenerator(value, site=self.site) +issue_deprecation_warning(arg, None, 2) elif arg == '-wikidataquery': if not value: value = pywikibot.input('WikidataQuery string:') @@ -2299,37 +2294,6 @@ site = pywikibot.Site() for page in site.search(query, total=total, namespaces=namespaces): yield page - - -def UntaggedPageGenerator(untaggedProject, limit=500, site=None): -""" -Yield pages from defunct toolserver UntaggedImages.php. - -It was using this tool: -https://toolserver.org/~daniel/WikiSense/UntaggedImages.php - -@param site: Site for generator results. -@type site: L{pywikibot.site.BaseSite} -""" -URL = "https://toolserver.org/~daniel/WikiSense/UntaggedImages.php?; -REGEXP = r".*?" -lang, project = untaggedProject.split('.', 1) -if lang == 'commons': -wiki = 'wikifam=commons.wikimedia.org' -else: -wiki = 'wikilang=%s=.%s' % (lang, project) -link = '%s&%s=%d=img_timestamp' % (URL, wiki, limit) -results = re.findall(REGEXP, http.fetch(link)) -if not results: -raise pywikibot.Error( -u'Nothing found at %s! Try to use the tool by yourself to be sure ' -u'that it works!' % link) -if not site: -site = pywikibot.Site() -else: -for result in results: -yield pywikibot.Page(site, result) def LiveRCPageGenerator(site=None, total=None): -- To view, visit https://gerrit.wikimedia.org/r/321840 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68805b101856ffc272d0022193f9ec32f077da31 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Use File page descriptions for picture of the day
jenkins-bot has submitted this change and it was merged. Change subject: Use File page descriptions for picture of the day .. Use File page descriptions for picture of the day The POTD File pages seem to have additional translated descriptions. Retrieve information about the image from the MediaWiki API but parse the translated descriptions from the File page when the ImageDescription meta data is not available. Bug: T144109 Bug: T139314 Change-Id: Id9beefde503800c86d2fb57f1c10e044671255b2 --- M lib/feed/featured-image.js M test/features/featured-image/pagecontent.js 2 files changed, 80 insertions(+), 23 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/feed/featured-image.js b/lib/feed/featured-image.js index b122ece..1ee4734 100644 --- a/lib/feed/featured-image.js +++ b/lib/feed/featured-image.js @@ -8,24 +8,25 @@ var preq = require('preq'); var api = require('../api-util'); var dateUtil = require('../dateUtil'); +var domino = require('domino'); var mwapi = require('../mwapi'); var mUtil = require('../mobile-util'); +var parsoid = require('../parsoid-access'); var sUtil = require('../util'); var HTTPError = sUtil.HTTPError; +const COMMONS_URL = 'commons.wikimedia.org'; /** * Builds the request to get the Picture of the day of a given date. * * @param {Object} app the application object - * @param {String} domain the requested domain, e.g. 'de.wikipedia.org' * @param {Date} date for which day the featured image of theday is requested * @return {Promise} a promise resolving as an JSON object containing the response */ -function requestPictureOfTheDay(app, domain, date) { +function requestPictureOfTheDay(app, date) { var isoDate = dateUtil.formatISODate(date); -var lang = mUtil.getLanguageFromDomain(domain); -return api.mwApiGet(app, 'commons.wikimedia.org', { +return api.mwApiGet(app, COMMONS_URL, { action: 'query', format: 'json', formatversion: 2, @@ -58,6 +59,18 @@ } } return page; +} + +/** @param {!Object.} descriptions Map of languages to descriptions +@param {!string} lang Preferred language +@return {?string} Language */ +function pickDescriptionLang(descriptions, lang) { +const fallbackLang = 'en'; +return descriptions[lang] +? lang +: descriptions[fallbackLang] +? fallbackLang +: Object.keys(descriptions)[0]; } function buildPayload(page, lang) { @@ -102,6 +115,26 @@ && page.pageid + '/' + mwapi.getRevisionFromExtract(page); } +/** @param {!domino.Document} doc +@return {void} */ +function removeLangLabels(doc) { +const labels = doc.querySelectorAll('span[class*=langlabel-]') || []; +labels.forEach(element => { +element.parentNode.removeChild(element); +}); +} + +/** @param {!domino.Document} doc +@return {!Object. } Map of languages to descriptions */ +function queryDescriptions(doc) { +const descriptions = {}; +const descriptionElements = doc.querySelectorAll('.description[class*=lang-]') || []; +descriptionElements.forEach(element => { +descriptions[element.lang] = element.innerHTML.trim(); +}); +return descriptions; +} + function promise(app, req) { var aggregated = !!req.query.aggregated; @@ -112,17 +145,39 @@ dateUtil.throwDateError(); } -return requestPictureOfTheDay(app, req.params.domain, -dateUtil.getRequestedDate(req), aggregated) +const lang = mUtil.getLanguageFromDomain(req.params.domain); +let ret; +return requestPictureOfTheDay(app, dateUtil.getRequestedDate(req), +aggregated) .then(function (response) { mwapi.checkForQueryPagesInResponse(req, response); -var page = getPageObject(response); -return { -payload: buildPayload(page, mUtil.getLanguageFromDomain(req.params.domain)), +const page = getPageObject(response); +ret = { +payload: buildPayload(page, lang), meta: { etag: buildEtag(page) } }; + +const parsoidReq = Object.create(req); +parsoidReq.params = Object.create(req.params); +parsoidReq.params.title = page.title; +parsoidReq.params.domain = COMMONS_URL; +return parsoid.getParsoidHtml(app, parsoidReq); +}).then(function (response) { +const doc = domino.createDocument(response.body); +removeLangLabels(doc); +const descriptions = queryDescriptions(doc); + +// todo: should we just send all langs like parsoid does? +const resolvedLang = pickDescriptionLang(descriptions, lang); +if (resolvedLang && (resolvedLang === lang || !ret.payload.description)) { +ret.payload.description = { +lang: resolvedLang, +
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: throttle.py: Make sure opened files are closed properly
jenkins-bot has submitted this change and it was merged. Change subject: throttle.py: Make sure opened files are closed properly .. throttle.py: Make sure opened files are closed properly Previously, if there was an IOError during file opening, the file would not have been closed. Bug: T95111 Change-Id: I6af4adae0e731cbcc8ff0c002b7d188f4e874520 --- M pywikibot/throttle.py 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/throttle.py b/pywikibot/throttle.py index d125df1..9a38e46 100644 --- a/pywikibot/throttle.py +++ b/pywikibot/throttle.py @@ -204,12 +204,13 @@ self.checktime = 0 processes = [] try: -f = open(self.ctrlfilename, 'r') +with open(self.ctrlfilename, 'r') as f: +lines = f.readlines() except IOError: return else: now = time.time() -for line in f.readlines(): +for line in lines: try: line = line.split(' ') this_pid = int(line[0]) @@ -225,12 +226,11 @@ 'site': this_site}) processes.sort(key=lambda p: p['pid']) try: -f = open(self.ctrlfilename, 'w') -for p in processes: -f.write("%(pid)s %(time)s %(site)s\n" % p) +with open(self.ctrlfilename, 'w') as f: +for p in processes: +f.write("%(pid)s %(time)s %(site)s\n" % p) except IOError: return -f.close() def wait(self, seconds): """Wait for seconds seconds. -- To view, visit https://gerrit.wikimedia.org/r/321727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6af4adae0e731cbcc8ff0c002b7d188f4e874520 Gerrit-PatchSet: 4 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: DalbaGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add meta.wikimedia to checkimages
jenkins-bot has submitted this change and it was merged. Change subject: Add meta.wikimedia to checkimages .. Add meta.wikimedia to checkimages Bug: T143293 Change-Id: Ia0431f22c96cd70240e68cdc19424cb2a8c45681 --- M scripts/checkimages.py 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/checkimages.py b/scripts/checkimages.py index 96f191e..7d42a6c 100755 --- a/scripts/checkimages.py +++ b/scripts/checkimages.py @@ -114,6 +114,7 @@ # right day/month/year ) n_txt = { 'commons': u'{{subst:nld}}', +'meta': '{{No license}}', 'ar': u'{{subst:لم}}', 'de': u'{{Dateiüberprüfung}}', 'en': u'{{subst:nld}}', @@ -138,6 +139,7 @@ txt_find = { 'commons': [u'{{no license', u'{{no license/en', u'{{nld', u'{{no permission', u'{{no permission since'], +'meta': ['{{no license', '{{nolicense', '{{nld'], 'ar': [u'{{لت', u'{{لا ترخيص'], 'de': [u'{{DÜP', u'{{Düp', u'{{Dateiüberprüfung'], 'en': [u'{{nld', u'{{no license'], @@ -157,6 +159,7 @@ # no source without the welcome, isn't it? empty = { 'commons': u'{{subst:welcome}}\n\n', +'meta': '{{subst:Welcome}}\n\n', 'ar': u'{{ترحيب}}\n\n', 'de': u'{{subst:willkommen}} ', 'en': u'{{welcome}}\n\n', @@ -177,6 +180,7 @@ # In reality, there aren't unknown extension, they are only not allowed... delete_immediately = { 'commons': u"{{speedy|The file has .%s as extension. Is it ok? Please check.}}", +'meta': '{{Delete|The file has .%s as extension.}}', 'ar': u"{{شطب|الملف له .%s كامتداد.}}", 'en': u"{{db-meta|The file has .%s as extension.}}", 'fa': u"{{حذف سریع|تصویر %s اضافی است.}}", @@ -265,6 +269,7 @@ u"[[File:Human-help-browser.svg|18px|link=Commons:Help desk|?]] " u"'''[[Commons:Help desk|->]][[Commons:Help desk]]''' in any " u"language you like to use.'' --"""), +'meta': '{{subst:No license notice|File:%s}}', 'ar': u"{{subst:مصدر الصورة|File:%s}} --", 'en': u"{{subst:image source|File:%s}} --", 'fa': u"{{جا:اخطار نگاره|%s}}", @@ -286,6 +291,7 @@ bot_list = { 'commons': [u'Siebot', u'CommonsDelinker', u'Filbot', u'John Bot', u'Sz-iwbot', u'ABFbot'], +'meta': ['MABot'], 'de': [u'Xqbot'], 'en': [u'OrphanBot'], 'fa': [u'Amirobot'], @@ -322,6 +328,7 @@ # image on commons) This is the page where the bot will store them. report_page = { 'commons': u'User:Filbot/Report', +'meta': 'User:MABot/Report', 'de': u'Benutzer:Xqbot/Report', 'en': u'User:Filnik/Report', 'fa': u'کاربر:Amirobot/گزارش تصویر', @@ -364,6 +371,7 @@ HiddenTemplate = { # Put the other in the page on the project defined below 'commons': [u'Template:Information'], +'meta': ['Template:Information'], 'ar': [u'Template:معلومات'], 'de': [u'Template:Information'], 'en': [u'Template:Information'], @@ -464,6 +472,7 @@ # licenses. category_with_licenses = { 'commons': u'Category:License tags', +'meta': 'Category:License templates', 'ar': u'تصنيف:قوالب حقوق الصور', 'de': u'Kategorie:Vorlage:Lizenz für Bilder', 'en': 'Category:Wikipedia file copyright templates', @@ -505,7 +514,7 @@ # Add your project (in alphabetical order) if you want that the bot starts project_inserted = ['ar', 'commons', 'de', 'en', 'fa', 'ga', 'hu', 'it', 'ja', -'ko', 'ta', 'ur', 'zh'] +'ko', 'meta', 'ta', 'ur', 'zh'] # END OF CONFIGURATION. -- To view, visit https://gerrit.wikimedia.org/r/321829 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0431f22c96cd70240e68cdc19424cb2a8c45681 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: MagulGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Remove Chinese wiki support from the news endpoint
jenkins-bot has submitted this change and it was merged. Change subject: Remove Chinese wiki support from the news endpoint .. Remove Chinese wiki support from the news endpoint Bug: T147874 Change-Id: I5f2003d6a56fd5f3e3fa2390c139ff20ba73b11c --- M etc/feed/news-sites.js 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: BearND: Looks good to me, approved Mholloway: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/etc/feed/news-sites.js b/etc/feed/news-sites.js index 0cc07f9..8ce95c0 100644 --- a/etc/feed/news-sites.js +++ b/etc/feed/news-sites.js @@ -25,8 +25,7 @@ pt: {title: 'Portal:Eventos_atuais', selector: 'ul'}, ru: {title: 'Шаблон:Актуальные_события', selector: 'ul'}, sv: {title: 'Portal:Huvudsida/Aktuella händelser', selector: 'ul'}, -vi: {title: 'Bản_mẫu:Tin_tức', selector: 'ul'}, -zh: {title: 'Portal:新聞動態', selector: 'ul'} +vi: {title: 'Bản_mẫu:Tin_tức', selector: 'ul'} }; module.exports = NEWS_TEMPLATES; -- To view, visit https://gerrit.wikimedia.org/r/321696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f2003d6a56fd5f3e3fa2390c139ff20ba73b11c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: NiedzielskiGerrit-Reviewer: BearND Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Jhernandez Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: objectcache: Remove broken cas() method from WinCacheBagOStuff
jenkins-bot has submitted this change and it was merged. Change subject: objectcache: Remove broken cas() method from WinCacheBagOStuff .. objectcache: Remove broken cas() method from WinCacheBagOStuff Bug: T120896 Change-Id: I9406a50df8e900b4fc5861c2174ba7a63a0dd765 --- M includes/libs/objectcache/WinCacheBagOStuff.php 1 file changed, 0 insertions(+), 13 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/objectcache/WinCacheBagOStuff.php b/includes/libs/objectcache/WinCacheBagOStuff.php index 6996ce5..d84c959 100644 --- a/includes/libs/objectcache/WinCacheBagOStuff.php +++ b/includes/libs/objectcache/WinCacheBagOStuff.php @@ -29,16 +29,7 @@ */ class WinCacheBagOStuff extends BagOStuff { protected function doGet( $key, $flags = 0 ) { - $casToken = null; - - return $this->getWithToken( $key, $casToken, $flags ); - } - - protected function getWithToken( $key, &$casToken, $flags = 0 ) { $val = wincache_ucache_get( $key ); - - $casToken = $val; - if ( is_string( $val ) ) { $val = unserialize( $val ); } @@ -52,10 +43,6 @@ /* wincache_ucache_set returns an empty array on success if $value was an array, bool otherwise */ return ( is_array( $result ) && $result === [] ) || $result; - } - - protected function cas( $casToken, $key, $value, $exptime = 0 ) { - return wincache_ucache_cas( $key, $casToken, serialize( $value ) ); } public function delete( $key ) { -- To view, visit https://gerrit.wikimedia.org/r/321019 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9406a50df8e900b4fc5861c2174ba7a63a0dd765 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: objectcache: detect default getWithSetCallback() set options
jenkins-bot has submitted this change and it was merged. Change subject: objectcache: detect default getWithSetCallback() set options .. objectcache: detect default getWithSetCallback() set options This works by setting a callback to return the cache set options. The callback will watch DB reads and create a merged result from said usage. This handles callers that are missing getCacheSetOptions(). Change-Id: Ia264f011e45e8cf105480955dad7e2c4c2357b73 --- M includes/ServiceWiring.php M includes/db/MWLBFactory.php M includes/libs/objectcache/WANObjectCache.php M includes/libs/rdbms/database/DBConnRef.php M includes/libs/rdbms/database/Database.php M includes/libs/rdbms/database/IDatabase.php M includes/libs/rdbms/lbfactory/ILBFactory.php M includes/libs/rdbms/lbfactory/LBFactory.php M includes/libs/rdbms/loadbalancer/ILoadBalancer.php M includes/libs/rdbms/loadbalancer/LoadBalancer.php M includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php M tests/phpunit/includes/db/LBFactoryTest.php M tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php 13 files changed, 419 insertions(+), 42 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index c2197a6..beefb33 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -52,7 +52,10 @@ ); $class = MWLBFactory::getLBFactoryClass( $lbConf ); - return new $class( $lbConf ); + $instance = new $class( $lbConf ); + MWLBFactory::setCacheUsageCallbacks( $instance, $services ); + + return $instance; }, 'DBLoadBalancer' => function( MediaWikiServices $services ) { diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php index 42ef685..5a5c46c 100644 --- a/includes/db/MWLBFactory.php +++ b/includes/db/MWLBFactory.php @@ -134,6 +134,25 @@ } /** +* @param LBFactory $lbf New LBFactory instance that will be bound to $services +* @param MediaWikiServices $services +*/ + public static function setCacheUsageCallbacks( LBFactory $lbf, MediaWikiServices $services ) { + // Account for lag and pending updates by default in cache generator callbacks + $wCache = $services->getMainWANObjectCache(); + $wCache->setDefaultCacheSetOptionCallbacks( + function () use ( $lbf ) { + return $lbf->declareUsageSectionStart(); + }, + function ( $id ) use ( $lbf ) { + $info = $lbf->declareUsageSectionEnd( $id ); + + return $info['cacheSetOptions'] ?: []; + } + ); + } + + /** * Returns the LBFactory class to use and the load balancer configuration. * * @todo instead of this, use a ServiceContainer for managing the different implementations. diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index 8d3c6d9..b9753d3 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -93,6 +93,11 @@ /** @var mixed[] Temporary warm-up cache */ private $warmupCache = []; + /** @var callable Callback used in generating default options in getWithSetCallback() */ + private $sowSetOptsCallback; + /** @var callable Callback used in generating default options in getWithSetCallback() */ + private $reapSetOptsCallback; + /** Max time expected to pass between delete() and DB commit finishing */ const MAX_COMMIT_DELAY = 3; /** Max replication+snapshot lag before applying TTL_LAGGED or disallowing set() */ @@ -181,6 +186,12 @@ ? $params['relayers']['purge'] : new EventRelayerNull( [] ); $this->setLogger( isset( $params['logger'] ) ? $params['logger'] : new NullLogger() ); + $this->sowSetOptsCallback = function () { + return null; // no-op + }; + $this->reapSetOptsCallback = function () { + return []; // no-op + }; } public function setLogger( LoggerInterface $logger ) { @@ -1001,7 +1012,9 @@ $setOpts = []; ++$this->callbackDepth; try { + $tag = call_user_func( $this->sowSetOptsCallback ); $value = call_user_func_array( $callback, [ $cValue, &$ttl, &$setOpts, $asOf ] ); + $setOptDefaults = call_user_func( $this->reapSetOptsCallback, $tag ); } finally { --$this->callbackDepth;
[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Provide a stable method for checking whether a user has enab...
jenkins-bot has submitted this change and it was merged. Change subject: Provide a stable method for checking whether a user has enabled OATH .. Provide a stable method for checking whether a user has enabled OATH This makes it possible to check from another extension whether the user has strong login security, without depending on internals which can change at any time. (The TwoFactorEnabled hook was intended for something like this but it operates on $wgUser which makes it useless for logins.) Change-Id: Ie15c45c9b29de0a0f926c2467808ca144f05e866 --- M OATHAuthUtils.php 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, but someone else must approve Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/OATHAuthUtils.php b/OATHAuthUtils.php index 5fcf018..07f2667 100644 --- a/OATHAuthUtils.php +++ b/OATHAuthUtils.php @@ -6,6 +6,16 @@ * @ingroup Extensions */ class OATHAuthUtils { + /** +* Check whether OATH two-factor authentication is enabled for a given user. +* This is a stable method that does not change and can be used in other extensions. +* @param User $user +* @return bool +*/ + public static function isEnabledFor( User $user ) { + $oathUser = OATHAuthHooks::getOATHUserRepository()->findByUser( $user ); + return $oathUser && $oathUser->getKey(); + } /** * Encrypt an aray of variables to put into the user's session. We use this -- To view, visit https://gerrit.wikimedia.org/r/321818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie15c45c9b29de0a0f926c2467808ca144f05e866 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OATHAuth Gerrit-Branch: master Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Anomie Gerrit-Reviewer: Brian Wolff Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dpatrick Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fix regression on Square import due to change in exception.
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/321836 Change subject: Fix regression on Square import due to change in exception. .. Fix regression on Square import due to change in exception. The getUserMessage() class is now required in the exceptions. Bug: TT150810 Change-Id: I595d8118eef430c307ac1a8fdbd39a6821e8a500 --- M sites/all/modules/offline2civicrm/IgnoredRowException.php M sites/all/modules/offline2civicrm/SquareFile.php 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/36/321836/1 diff --git a/sites/all/modules/offline2civicrm/IgnoredRowException.php b/sites/all/modules/offline2civicrm/IgnoredRowException.php index c65cc2d..c233921 100644 --- a/sites/all/modules/offline2civicrm/IgnoredRowException.php +++ b/sites/all/modules/offline2civicrm/IgnoredRowException.php @@ -1,4 +1,4 @@ $data['Status']))); } return parent::parseRow( $data ); -- To view, visit https://gerrit.wikimedia.org/r/321836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I595d8118eef430c307ac1a8fdbd39a6821e8a500 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Cache result of query to get custom data extends.
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/321837 Change subject: Cache result of query to get custom data extends. .. Cache result of query to get custom data extends. This query has been removed from core as of 4.7.13 (we are on 4.7.11) so not upstreaming this. Bug: T148688 Change-Id: I68e783198bfa6d543aa848d87bb0bf2fcea8fec3 --- M api/v3/utils.php 1 file changed, 18 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/37/321837/1 diff --git a/api/v3/utils.php b/api/v3/utils.php index b11f4f2..7d76443 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -501,9 +501,10 @@ * } */ function _civicrm_api3_custom_fields_for_entity($entity) { - $result = array(); - - $query = " + static $result = array(); + if (!isset($result[$entity])) { +$result[$entity] = array(); +$query = " SELECT f.id, f.label, f.data_type, f.html_type, f.is_search_range, f.option_group_id, f.custom_group_id, @@ -515,21 +516,22 @@ AND f.is_active = 1 AND g.extends = %1"; - $params = array( -'1' => array($entity, 'String'), - ); - - $dao = CRM_Core_DAO::executeQuery($query, $params); - while ($dao->fetch()) { -$result[$dao->id] = array( - 'table_name' => $dao->table_name, - 'column_name' => $dao->column_name, - 'data_type' => $dao->data_type, +$params = array( + '1' => array($entity, 'String'), ); - } - $dao->free(); - return $result; +$dao = CRM_Core_DAO::executeQuery($query, $params); +while ($dao->fetch()) { + $result[$entity][$dao->id] = array( +'table_name' => $dao->table_name, +'column_name' => $dao->column_name, +'data_type' => $dao->data_type, + ); +} +$dao->free(); + } + + return $result[$entity]; } /** -- To view, visit https://gerrit.wikimedia.org/r/321837 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68e783198bfa6d543aa848d87bb0bf2fcea8fec3 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Genealogy[master]: Refactor various things
Samwilson has uploaded a new change for review. https://gerrit.wikimedia.org/r/321834 Change subject: Refactor various things .. Refactor various things This redesigns much of the layout of the extension, but doesn't change many fundamental ideas of it. Change-Id: I8e536310a7370f96041471ed790710ca1150bd9a --- A .gitignore D Core.php M Genealogy.i18n.magic.php M Genealogy.i18n.php D Genealogy.php D Person.php M README.md D Traverser.php D Tree.php M composer.json A extension.json A person_template.wikitext A phpcs.xml A src/Hooks.php A src/Person.php A src/Traverser.php A src/Tree.php M tests/phpunit/PersonTest.php 18 files changed, 1,051 insertions(+), 611 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Genealogy refs/changes/34/321834/1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..8b13789 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ + diff --git a/Core.php b/Core.php deleted file mode 100644 index cdb039b..000 --- a/Core.php +++ /dev/null @@ -1,138 +0,0 @@ -setFunctionHook('genealogy', 'GenealogyCore::RenderParserFunction'); - return true; - } - - /** -* Hooked to UnitTestsList. -* @param array|String $files -* @return boolean -*/ - static function onUnitTestsList(&$files) { - $files = array_merge($files, glob(__DIR__ . '/tests/phpunit/*Test.php')); - return true; - } - - /** -* Render the output of the parser function. -* The input parameters are wikitext with templates expanded. -* The output should be wikitext too. -* -* @param Parser $parser -* @param string $type -* @param string $param2 -* @param string $param3 -* @return string The wikitext with which to replace the parser function call. -*/ - static function RenderParserFunction(Parser $parser) { - $params = array(); - $args = func_get_args(); - array_shift($args); // Remove $parser - $type = array_shift($args); // Get param 1, the function type - foreach ($args as $arg) { // Everything that's left must be named - $pair = explode('=', $arg, 2); - if (count($pair) == 2) { - $name = trim($pair[0]); - $value = trim($pair[1]); - $params[$name] = $value; - } else { - $params[] = $arg; - } - } - $out = ''; //"".print_r($params, true).""; - switch ($type) { - case 'person': - if (isset($params['birth date'])) { - $out .= $params['birth date']; - self::SaveProp($parser, 'birth date', $params['birth date'], false); - } - if (isset($params['death date'])) { - $out .= $params['death date']; - self::SaveProp($parser, 'death date', $params['death date'], false); - } - break; - case 'parent': - $parentTitle = Title::newFromText($params[0]); - if ($parentTitle and $parentTitle->exists()) { - $person = new GenealogyPerson($parentTitle); - $out .= $person->getWikiLink(); - } else { - $out .= "[[" . $params[0] . "]]"; - } - self::SaveProp($parser, 'parent', $params[0]); - break; - case 'siblings': - $person = new GenealogyPerson($parser->getTitle()); - $out .= self::PeopleList($person->getSiblings()); - break; - case 'partner': - //$out .= "[[".$params[0]."]]"; - self::SaveProp($parser, 'partner', $params[0]); - break; - case 'partners': - $person = new GenealogyPerson($parser->getTitle()); - $out .= self::PeopleList($person->getPartners()); - break; - case 'children': - $person = new GenealogyPerson($parser->getTitle()); - $out .= self::PeopleList($person->getChildren()); -
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "add mapped IPv6 address for krypton"
Dzahn has submitted this change and it was merged. Change subject: Revert "add mapped IPv6 address for krypton" .. Revert "add mapped IPv6 address for krypton" This reverts commit 6285b4a8ab69be174c82725509cae1f5f3484130. This change did not do what it said it would, because seriously rebase got confused and did it the wrong way. Compare PS 1/2 with PS3 on that and all of a sudden it touches kubernetes instead of krypton, and all there was in between was an automatic rebase. :o https://stackoverflow.com/questions/39747872/git-rebase-patches-file-in-the-wrong-place Change-Id: I87e2ced5bd24b8a9e5ba6d12e463285f4fa82575 --- M manifests/site.pp 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 8e24e5f..860f207 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1373,7 +1373,6 @@ node /kubernetes100[1-4].eqiad.wmnet/ { role(kubernetes::worker) include standard -interface::add_ip6_mapped { 'main': interface => 'eth0', } } node 'labcontrol1001.wikimedia.org' { -- To view, visit https://gerrit.wikimedia.org/r/321833 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I87e2ced5bd24b8a9e5ba6d12e463285f4fa82575 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "add mapped IPv6 address for krypton"
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/321833 Change subject: Revert "add mapped IPv6 address for krypton" .. Revert "add mapped IPv6 address for krypton" This reverts commit 6285b4a8ab69be174c82725509cae1f5f3484130. Change-Id: I87e2ced5bd24b8a9e5ba6d12e463285f4fa82575 --- M manifests/site.pp 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/33/321833/1 diff --git a/manifests/site.pp b/manifests/site.pp index 8e24e5f..860f207 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1373,7 +1373,6 @@ node /kubernetes100[1-4].eqiad.wmnet/ { role(kubernetes::worker) include standard -interface::add_ip6_mapped { 'main': interface => 'eth0', } } node 'labcontrol1001.wikimedia.org' { -- To view, visit https://gerrit.wikimedia.org/r/321833 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87e2ced5bd24b8a9e5ba6d12e463285f4fa82575 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: remove wmf3762.mgmt.frack.codfw.wmnet
Dzahn has submitted this change and it was merged. Change subject: remove wmf3762.mgmt.frack.codfw.wmnet .. remove wmf3762.mgmt.frack.codfw.wmnet This is betelgeuse.mgmt.frack.codfw.wmnet. No other host in frack has the duplicate name with the WMF asset tag, just this, and forward lookup for it fails. The very last thing on T149875. Bug: T149875 Change-Id: Ie30a68c917e119c2bda4de85e1662e8ad2d455d5 --- M templates/10.in-addr.arpa 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Dzahn: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 2de15b4..bc0ab29 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -4077,7 +4077,6 @@ 109 1H IN PTR bellatrix.mgmt.frack.codfw.wmnet. 110 1H IN PTR fdb2001.mgmt.frack.codfw.wmnet. 111 1H IN PTR betelgeuse.mgmt.frack.codfw.wmnet. -111 1H IN PTR wmf3762.mgmt.frack.codfw.wmnet. ; codfw labs realm -- To view, visit https://gerrit.wikimedia.org/r/321832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie30a68c917e119c2bda4de85e1662e8ad2d455d5 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: Papaul Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/dns[master]: remove wmf3762.mgmt.frack.codfw.wmnet
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/321832 Change subject: remove wmf3762.mgmt.frack.codfw.wmnet .. remove wmf3762.mgmt.frack.codfw.wmnet This is betelgeuse.mgmt.frack.codfw.wmnet. No other host in frack has the duplicate name with the WMF asset tag, just this, and forward lookup for it fails. The very last thing on T149875. Bug: T149875 Change-Id: Ie30a68c917e119c2bda4de85e1662e8ad2d455d5 --- M templates/10.in-addr.arpa 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/32/321832/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index f870f41..29c7418 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -4076,7 +4076,6 @@ 109 1H IN PTR bellatrix.mgmt.frack.codfw.wmnet. 110 1H IN PTR fdb2001.mgmt.frack.codfw.wmnet. 111 1H IN PTR betelgeuse.mgmt.frack.codfw.wmnet. -111 1H IN PTR wmf3762.mgmt.frack.codfw.wmnet. ; codfw labs realm -- To view, visit https://gerrit.wikimedia.org/r/321832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie30a68c917e119c2bda4de85e1662e8ad2d455d5 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add first letter data for bn collation (Standard and Traditi...
jenkins-bot has submitted this change and it was merged. Change subject: Add first letter data for bn collation (Standard and Traditional) .. Add first letter data for bn collation (Standard and Traditional) This is based solely on looking at the bn.txt collation data file. It has not been tested by native speakers. Bug: T148885 Change-Id: Ide926bc5ee8752269ef6a1bfe972e19b7188d193 --- M includes/collation/IcuCollation.php 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/collation/IcuCollation.php b/includes/collation/IcuCollation.php index e6b773c..7b4fce6 100644 --- a/includes/collation/IcuCollation.php +++ b/includes/collation/IcuCollation.php @@ -100,6 +100,12 @@ 'be' => [ "Ё" ], 'be-tarask' => [ "Ё" ], 'bg' => [], + 'bn' => [ 'ং', 'ঃ', 'ঁ' ], + 'bn@collation=traditional' => [ + 'ং', 'ঃ', 'ঁ', 'ক্', 'খ্', 'গ্', 'ঘ্', 'ঙ্', 'চ্', 'ছ্', 'জ্', 'ঝ্', + 'ঞ্', 'ট্', 'ঠ্', 'ড্', 'ঢ্', 'ণ্', 'ৎ', 'থ্', 'দ্', 'ধ্', 'ন্', 'প্', + 'ফ্', 'ব্', 'ভ্', 'ম্', 'য্', 'র্', 'ৰ্', 'ল্', 'ৱ্', 'শ্', 'ষ্', 'স্', 'হ্' + ], 'bo' => [], 'br' => [ "Ch", "C'h" ], 'bs' => [ "Č", "Ć", "Dž", "Đ", "Lj", "Nj", "Š", "Ž" ], -- To view, visit https://gerrit.wikimedia.org/r/318260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ide926bc5ee8752269ef6a1bfe972e19b7188d193 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brian WolffGerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Kaldari Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: visibilitychange: Consider all changes to imply hidden
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/321831 Change subject: visibilitychange: Consider all changes to imply hidden .. visibilitychange: Consider all changes to imply hidden Previously we only emitted "hidden" if the visibilitychange event was emitted to change state from visible to hidden, not if it changed from visible to hidden. It shouln't make any difference since we already check the initial value as well. To verify that this doesn't matter, this commit simplifies the code by removing the document.hidden check from the change event handler. See also I8e8ec96fc. Change-Id: Ibd0935bef8f76a0e1a675db5242e2d4e301b0233 --- M modules/ext.wikimediaEvents.visibilitychange.js 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/31/321831/1 diff --git a/modules/ext.wikimediaEvents.visibilitychange.js b/modules/ext.wikimediaEvents.visibilitychange.js index 473cebd..c032ab7 100644 --- a/modules/ext.wikimediaEvents.visibilitychange.js +++ b/modules/ext.wikimediaEvents.visibilitychange.js @@ -33,8 +33,8 @@ } - function check() { - if ( document[ hidden ] === true && !( mwLoadEnd && document.readyState === 'complete' ) ) { + function changeHandler() { + if ( !( mwLoadEnd && document.readyState === 'complete' ) ) { trackOnce( 'hidden' ); } } @@ -64,8 +64,11 @@ return; } - check(); - document.addEventListener( eventName, check, false ); + // Initial value + if ( document[ hidden ] === true ) { + trackOnce( 'hidden' ); + } + document.addEventListener( eventName, changeHandler, false ); trackOnce( 'supported' ); if ( vendor ) { trackOnce( 'vendor' ); -- To view, visit https://gerrit.wikimedia.org/r/321831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd0935bef8f76a0e1a675db5242e2d4e301b0233 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: build: Bump eslint-config-wikimedia to v0.3.0 and make pass
jenkins-bot has submitted this change and it was merged. Change subject: build: Bump eslint-config-wikimedia to v0.3.0 and make pass .. build: Bump eslint-config-wikimedia to v0.3.0 and make pass Change-Id: I7449c11aa63c50fda667265c32021439cc53471f --- M modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js M modules/ve-mw/init/ve.init.mw.ArticleTarget.js M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js M modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js M package.json 5 files changed, 6 insertions(+), 8 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js index 281579e..3586760 100644 --- a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js +++ b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js @@ -35,7 +35,6 @@ //this.$image // this.caption.view.$element - // Build DOM: if ( isError ) { $image = $( [] ); diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index b6908ad..50dd2d1 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -323,7 +323,6 @@ this.documentReady( this.doc ); } - data = response ? ( response.visualeditor || response.visualeditoredit ) : {}; this.checkboxFields = []; diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js index cb371c1..ddb0506 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js @@ -523,7 +523,7 @@ this.toggleSearchPanel( false ); // Highlight new item - item = item ? item : this.galleryGroup.items[ 0 ]; + item = item || this.galleryGroup.items[ 0 ]; item.toggleHighlighted( true ); this.highlightedItem = item; diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js index 8cf0d44..217d18c 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js @@ -110,8 +110,8 @@ this.editor = ace.edit( this.$ace[ 0 ] ); this.setMinRows( this.minRows ); this.editor.setOptions( { - enableBasicAutocompletion: this.autocomplete !== 'none' ? true : false, - enableLiveAutocompletion: this.autocomplete === 'live' ? true : false + enableBasicAutocompletion: this.autocomplete !== 'none', + enableLiveAutocompletion: this.autocomplete === 'live' } ); this.editor.getSession().on( 'change', this.onEditorChange.bind( this ) ); this.editor.renderer.on( 'resize', this.onEditorResize.bind( this ) ); @@ -129,8 +129,8 @@ this.autocomplete = mode; this.loadingPromise.done( function () { widget.editor.renderer.setOptions( { - enableBasicAutocompletion: widget.autocomplete !== 'none' ? true : false, - enableLiveAutocompletion: widget.autocomplete === 'live' ? true : false + enableBasicAutocompletion: widget.autocomplete !== 'none', + enableLiveAutocompletion: widget.autocomplete === 'live' } ); } ); return this; diff --git a/package.json b/package.json index d7cb270..bf319f8 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "babel-polyfill": "6.9.1", -"eslint-config-wikimedia": "0.2.0", +"eslint-config-wikimedia": "0.3.0", "grunt": "1.0.1", "grunt-banana-checker": "0.5.0", "grunt-contrib-copy": "1.0.0", -- To view, visit https://gerrit.wikimedia.org/r/321804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7449c11aa63c50fda667265c32021439cc53471f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Esanders Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] oojs/ui[master]: PopupElement: Allow $autoCloseIgnore to be overridden
jenkins-bot has submitted this change and it was merged. Change subject: PopupElement: Allow $autoCloseIgnore to be overridden .. PopupElement: Allow $autoCloseIgnore to be overridden PopupElement needs to ensure that this.$element is auto-close-ignored, but it can accomplish this by adding it to $autoCloseIgnore rather than overriding it. Change-Id: I81dd678024d218f77f761546e72a536f66218986 --- M src/mixins/PopupElement.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/mixins/PopupElement.js b/src/mixins/PopupElement.js index 98da819..8846452 100644 --- a/src/mixins/PopupElement.js +++ b/src/mixins/PopupElement.js @@ -20,7 +20,7 @@ this.popup = new OO.ui.PopupWidget( $.extend( { autoClose: true }, config.popup, - { $autoCloseIgnore: this.$element } + { $autoCloseIgnore: this.$element.add( config.popup && config.popup.$autoCloseIgnore ) } ) ); }; -- To view, visit https://gerrit.wikimedia.org/r/320708 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81dd678024d218f77f761546e72a536f66218986 Gerrit-PatchSet: 2 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: CatropeGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Mooeypoo Gerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...tools-webservice[master]: Revert "Route all logs to /dev/null"
Yuvipanda has submitted this change and it was merged. Change subject: Revert "Route all logs to /dev/null" .. Revert "Route all logs to /dev/null" Back to normalcy This reverts commit 44a6b94831216d49c0075d1351631ee9a85f64b3. Change-Id: I82b72a9c1c231fe990f7afe62e2d2ed5afe870b7 --- M debian/changelog M toollabs/webservice/backends/gridenginebackend.py M toollabs/webservice/services/lighttpdwebservice.py M toollabs/webservice/services/pythonwebservice.py M toollabs/webservice/services/uwsgiwebservice.py 5 files changed, 13 insertions(+), 7 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index e7c6399..3c53316 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +toollabs-webservice (0.30) trusty; urgency=medium + + * Stop routing logs to /dev/null + + -- yuvipandaTue, 15 Nov 2016 17:27:09 + + toollabs-webservice (0.29) trusty; urgency=medium * Route python2 webservices to /dev/null too diff --git a/toollabs/webservice/backends/gridenginebackend.py b/toollabs/webservice/backends/gridenginebackend.py index 8465bb2..6423991 100644 --- a/toollabs/webservice/backends/gridenginebackend.py +++ b/toollabs/webservice/backends/gridenginebackend.py @@ -69,8 +69,8 @@ if self.extra_args: cmd += " --extra_args '%s'" % self.extra_args command = ['qsub', - '-e', '/dev/null', - '-o', '/dev/null', + '-e', os.path.expanduser('~/error.log'), + '-o', os.path.expanduser('~/error.log'), '-i', '/dev/null', '-q', self.queue, '-l', 'h_vmem=%s,release=%s' % (self.memlimit, self.release), diff --git a/toollabs/webservice/services/lighttpdwebservice.py b/toollabs/webservice/services/lighttpdwebservice.py index 9ecf056..a3c0c42 100644 --- a/toollabs/webservice/services/lighttpdwebservice.py +++ b/toollabs/webservice/services/lighttpdwebservice.py @@ -22,8 +22,8 @@ server.core-files = "disable" server.document-root = "{home}/public_html" server.pid-file = "/var/run/lighttpd/{toolname}.pid" -server.errorlog = "/dev/null" -server.breakagelog = "/dev/null" +server.errorlog = "{home}/error.log" +server.breakagelog = "{home}/error.log" server.follow-symlink = "enable" server.max-connections = 300 server.stat-cache-engine = "simple" @@ -39,7 +39,7 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) accesslog.use-syslog = "disable" -accesslog.filename = "/dev/null" +accesslog.filename = "{home}/access.log" include_shell "/usr/share/lighttpd/create-mime.assign.pl" diff --git a/toollabs/webservice/services/pythonwebservice.py b/toollabs/webservice/services/pythonwebservice.py index 34e4d5c..a55dcfd 100644 --- a/toollabs/webservice/services/pythonwebservice.py +++ b/toollabs/webservice/services/pythonwebservice.py @@ -21,7 +21,7 @@ '--plugin', 'python,python3', # Will ignore plugins that don't load '--http-socket', ':' + str(port), '--chdir', self.tool.get_homedir_subpath('www/python/src'), -'--logto', '/dev/null', +'--logto', self.tool.get_homedir_subpath('uwsgi.log'), '--callable', 'app', '--manage-script-name', '--workers', '4', diff --git a/toollabs/webservice/services/uwsgiwebservice.py b/toollabs/webservice/services/uwsgiwebservice.py index 27a1468..6a021e0 100644 --- a/toollabs/webservice/services/uwsgiwebservice.py +++ b/toollabs/webservice/services/uwsgiwebservice.py @@ -19,7 +19,7 @@ args = [ '/usr/bin/uwsgi', '--http-socket', ':' + str(port), -'--logto', "/dev/null", +'--logto', self.tool.get_homedir_subpath('uwsgi.log'), '--ini', self.tool.get_homedir_subpath('uwsgi.ini'), '--workers', '4', '--die-on-term', -- To view, visit https://gerrit.wikimedia.org/r/321828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I82b72a9c1c231fe990f7afe62e2d2ed5afe870b7 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/tools-webservice Gerrit-Branch: master Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Citoid[master]: build: Bump eslint-config-wikimedia to v0.3.0 and make pass
jenkins-bot has submitted this change and it was merged. Change subject: build: Bump eslint-config-wikimedia to v0.3.0 and make pass .. build: Bump eslint-config-wikimedia to v0.3.0 and make pass Change-Id: Ic32f38fb07189a0fd49b1c01042d837e3f188495 --- M modules/tests/index.test.js M package.json 2 files changed, 1 insertion(+), 3 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/tests/index.test.js b/modules/tests/index.test.js index 16832bf..7933cf8 100644 --- a/modules/tests/index.test.js +++ b/modules/tests/index.test.js @@ -1,4 +1,3 @@ - /** * Citoid extension unit tests for function * ve.ui.CiteFromIdInspector.populateTemplate @@ -2462,4 +2461,3 @@ return testMaps( maps, citation, expected, assert ); } ); - diff --git a/package.json b/package.json index eb0828a..4e12a0f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "license": "MIT", "devDependencies": { -"eslint-config-wikimedia": "0.2.0", +"eslint-config-wikimedia": "0.3.0", "grunt": "1.0.1", "grunt-banana-checker": "0.5.0", "grunt-eslint": "19.0.0", -- To view, visit https://gerrit.wikimedia.org/r/321820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic32f38fb07189a0fd49b1c01042d837e3f188495 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Citoid Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Esanders Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: build: Bump eslint-config-wikimedia to v0.3.0 (already passes)
jenkins-bot has submitted this change and it was merged. Change subject: build: Bump eslint-config-wikimedia to v0.3.0 (already passes) .. build: Bump eslint-config-wikimedia to v0.3.0 (already passes) Change-Id: I84a3a6c550a4989c6ef584b2289272204d1b6eb4 --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index 1cb24b6..09ae647 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "test": "grunt test" }, "devDependencies": { -"eslint-config-wikimedia": "0.2.0", +"eslint-config-wikimedia": "0.3.0", "grunt": "1.0.1", "grunt-banana-checker": "0.5.0", "grunt-contrib-watch": "1.0.0", -- To view, visit https://gerrit.wikimedia.org/r/321821 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84a3a6c550a4989c6ef584b2289272204d1b6eb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Esanders Gerrit-Reviewer: Physikerwelt Gerrit-Reviewer: TheDJ Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add meta.wikimedia to checkimages
Magul has uploaded a new change for review. https://gerrit.wikimedia.org/r/321829 Change subject: Add meta.wikimedia to checkimages .. Add meta.wikimedia to checkimages Bug: T143293 Change-Id: Ia0431f22c96cd70240e68cdc19424cb2a8c45681 --- M scripts/checkimages.py 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/29/321829/1 diff --git a/scripts/checkimages.py b/scripts/checkimages.py index 96f191e..7d42a6c 100755 --- a/scripts/checkimages.py +++ b/scripts/checkimages.py @@ -114,6 +114,7 @@ # right day/month/year ) n_txt = { 'commons': u'{{subst:nld}}', +'meta': '{{No license}}', 'ar': u'{{subst:لم}}', 'de': u'{{Dateiüberprüfung}}', 'en': u'{{subst:nld}}', @@ -138,6 +139,7 @@ txt_find = { 'commons': [u'{{no license', u'{{no license/en', u'{{nld', u'{{no permission', u'{{no permission since'], +'meta': ['{{no license', '{{nolicense', '{{nld'], 'ar': [u'{{لت', u'{{لا ترخيص'], 'de': [u'{{DÜP', u'{{Düp', u'{{Dateiüberprüfung'], 'en': [u'{{nld', u'{{no license'], @@ -157,6 +159,7 @@ # no source without the welcome, isn't it? empty = { 'commons': u'{{subst:welcome}}\n\n', +'meta': '{{subst:Welcome}}\n\n', 'ar': u'{{ترحيب}}\n\n', 'de': u'{{subst:willkommen}} ', 'en': u'{{welcome}}\n\n', @@ -177,6 +180,7 @@ # In reality, there aren't unknown extension, they are only not allowed... delete_immediately = { 'commons': u"{{speedy|The file has .%s as extension. Is it ok? Please check.}}", +'meta': '{{Delete|The file has .%s as extension.}}', 'ar': u"{{شطب|الملف له .%s كامتداد.}}", 'en': u"{{db-meta|The file has .%s as extension.}}", 'fa': u"{{حذف سریع|تصویر %s اضافی است.}}", @@ -265,6 +269,7 @@ u"[[File:Human-help-browser.svg|18px|link=Commons:Help desk|?]] " u"'''[[Commons:Help desk|->]][[Commons:Help desk]]''' in any " u"language you like to use.'' --"""), +'meta': '{{subst:No license notice|File:%s}}', 'ar': u"{{subst:مصدر الصورة|File:%s}} --", 'en': u"{{subst:image source|File:%s}} --", 'fa': u"{{جا:اخطار نگاره|%s}}", @@ -286,6 +291,7 @@ bot_list = { 'commons': [u'Siebot', u'CommonsDelinker', u'Filbot', u'John Bot', u'Sz-iwbot', u'ABFbot'], +'meta': ['MABot'], 'de': [u'Xqbot'], 'en': [u'OrphanBot'], 'fa': [u'Amirobot'], @@ -322,6 +328,7 @@ # image on commons) This is the page where the bot will store them. report_page = { 'commons': u'User:Filbot/Report', +'meta': 'User:MABot/Report', 'de': u'Benutzer:Xqbot/Report', 'en': u'User:Filnik/Report', 'fa': u'کاربر:Amirobot/گزارش تصویر', @@ -364,6 +371,7 @@ HiddenTemplate = { # Put the other in the page on the project defined below 'commons': [u'Template:Information'], +'meta': ['Template:Information'], 'ar': [u'Template:معلومات'], 'de': [u'Template:Information'], 'en': [u'Template:Information'], @@ -464,6 +472,7 @@ # licenses. category_with_licenses = { 'commons': u'Category:License tags', +'meta': 'Category:License templates', 'ar': u'تصنيف:قوالب حقوق الصور', 'de': u'Kategorie:Vorlage:Lizenz für Bilder', 'en': 'Category:Wikipedia file copyright templates', @@ -505,7 +514,7 @@ # Add your project (in alphabetical order) if you want that the bot starts project_inserted = ['ar', 'commons', 'de', 'en', 'fa', 'ga', 'hu', 'it', 'ja', -'ko', 'ta', 'ur', 'zh'] +'ko', 'meta', 'ta', 'ur', 'zh'] # END OF CONFIGURATION. -- To view, visit https://gerrit.wikimedia.org/r/321829 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0431f22c96cd70240e68cdc19424cb2a8c45681 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Magul___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...tools-webservice[master]: Revert "Route all logs to /dev/null"
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/321828 Change subject: Revert "Route all logs to /dev/null" .. Revert "Route all logs to /dev/null" Back to normalcy This reverts commit 44a6b94831216d49c0075d1351631ee9a85f64b3. Change-Id: I82b72a9c1c231fe990f7afe62e2d2ed5afe870b7 --- M debian/changelog M toollabs/webservice/backends/gridenginebackend.py M toollabs/webservice/services/lighttpdwebservice.py M toollabs/webservice/services/pythonwebservice.py M toollabs/webservice/services/uwsgiwebservice.py 5 files changed, 13 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-webservice refs/changes/28/321828/1 diff --git a/debian/changelog b/debian/changelog index e7c6399..3c53316 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +toollabs-webservice (0.30) trusty; urgency=medium + + * Stop routing logs to /dev/null + + -- yuvipandaTue, 15 Nov 2016 17:27:09 + + toollabs-webservice (0.29) trusty; urgency=medium * Route python2 webservices to /dev/null too diff --git a/toollabs/webservice/backends/gridenginebackend.py b/toollabs/webservice/backends/gridenginebackend.py index 8465bb2..6423991 100644 --- a/toollabs/webservice/backends/gridenginebackend.py +++ b/toollabs/webservice/backends/gridenginebackend.py @@ -69,8 +69,8 @@ if self.extra_args: cmd += " --extra_args '%s'" % self.extra_args command = ['qsub', - '-e', '/dev/null', - '-o', '/dev/null', + '-e', os.path.expanduser('~/error.log'), + '-o', os.path.expanduser('~/error.log'), '-i', '/dev/null', '-q', self.queue, '-l', 'h_vmem=%s,release=%s' % (self.memlimit, self.release), diff --git a/toollabs/webservice/services/lighttpdwebservice.py b/toollabs/webservice/services/lighttpdwebservice.py index 9ecf056..a3c0c42 100644 --- a/toollabs/webservice/services/lighttpdwebservice.py +++ b/toollabs/webservice/services/lighttpdwebservice.py @@ -22,8 +22,8 @@ server.core-files = "disable" server.document-root = "{home}/public_html" server.pid-file = "/var/run/lighttpd/{toolname}.pid" -server.errorlog = "/dev/null" -server.breakagelog = "/dev/null" +server.errorlog = "{home}/error.log" +server.breakagelog = "{home}/error.log" server.follow-symlink = "enable" server.max-connections = 300 server.stat-cache-engine = "simple" @@ -39,7 +39,7 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) accesslog.use-syslog = "disable" -accesslog.filename = "/dev/null" +accesslog.filename = "{home}/access.log" include_shell "/usr/share/lighttpd/create-mime.assign.pl" diff --git a/toollabs/webservice/services/pythonwebservice.py b/toollabs/webservice/services/pythonwebservice.py index 34e4d5c..a55dcfd 100644 --- a/toollabs/webservice/services/pythonwebservice.py +++ b/toollabs/webservice/services/pythonwebservice.py @@ -21,7 +21,7 @@ '--plugin', 'python,python3', # Will ignore plugins that don't load '--http-socket', ':' + str(port), '--chdir', self.tool.get_homedir_subpath('www/python/src'), -'--logto', '/dev/null', +'--logto', self.tool.get_homedir_subpath('uwsgi.log'), '--callable', 'app', '--manage-script-name', '--workers', '4', diff --git a/toollabs/webservice/services/uwsgiwebservice.py b/toollabs/webservice/services/uwsgiwebservice.py index 27a1468..6a021e0 100644 --- a/toollabs/webservice/services/uwsgiwebservice.py +++ b/toollabs/webservice/services/uwsgiwebservice.py @@ -19,7 +19,7 @@ args = [ '/usr/bin/uwsgi', '--http-socket', ':' + str(port), -'--logto', "/dev/null", +'--logto', self.tool.get_homedir_subpath('uwsgi.log'), '--ini', self.tool.get_homedir_subpath('uwsgi.ini'), '--workers', '4', '--die-on-term', -- To view, visit https://gerrit.wikimedia.org/r/321828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82b72a9c1c231fe990f7afe62e2d2ed5afe870b7 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/tools-webservice Gerrit-Branch: master Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...EmailAuth[master]: First version of the extension
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/321827 Change subject: First version of the extension .. First version of the extension Change-Id: Ia6ed8f1952fd727af352646433b5f90f7083a8c2 --- A .gitignore A .jscsrc A .jshintignore A .jshintrc A Gruntfile.js A README.md A composer.json A extension.json A hooks.txt A i18n/en.json A i18n/qqq.json A includes/EmailAuthAuthenticationRequest.php A includes/EmailAuthSecondaryAuthenticationProvider.php A includes/Hooks.php A package.json A phpcs.xml A tests/phpunit/EmailAuthAuthenticationRequestTest.php A tests/phpunit/EmailAuthSecondaryAuthenticationProviderTest.php 18 files changed, 415 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EmailAuth refs/changes/27/321827/1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..59a2a36 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.*.swp +*~ +/.project +/composer.lock +/vendor +/node_modules diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 000..04baa68 --- /dev/null +++ b/.jscsrc @@ -0,0 +1,4 @@ +{ + "preset": "wikimedia", + "excludeFiles": [ "node_modules/**", "vendor/**" ] +} diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..82eaa05 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,2 @@ +node_modules/** +vendor/** diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..d43c482 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,20 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "es3": true, + "latedef": true, + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + + // Environment + "browser": true, + + "globals": { + "mw": false, + "$": false + } +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..36b41e8 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,35 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jscs' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '*.js', + 'modules/**/*.js' + ] + }, + jscs: { + src: '<%= jshint.all %>' + }, + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**', + '!vendor/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/README.md b/README.md new file mode 100644 index 000..c973562 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +This is a blank extension template. It doesn't really do anything on its own. +It is intended to provide a boiler template for an actual MediaWiki extension. + +If you are checking this out from Git and intend to use it, you may use the +following commands to make a clean directory of just this template without the +Git meta-data and other examples. + + cd extensions + git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/BoilerPlate.git + cp -R BoilerPlate ./MyExtension + +This automates the recommended code checkers for PHP and JavaScript code in Wikimedia projects +(see https://www.mediawiki.org/wiki/Continuous_integration/Entry_points). +To take advantage of this automation. + # install nodejs, npm, and PHP composer + # change to the extension's directory + # npm install + # composer install + +Once set up, running `npm test` and `composer test` will run automated code checks. diff --git a/composer.json b/composer.json new file mode 100644 index 000..98d41d9 --- /dev/null +++ b/composer.json @@ -0,0 +1,13 @@ +{ + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.9.2", + "mediawiki/mediawiki-codesniffer": "0.7.2" + }, + "scripts": { + "fix": "phpcbf", + "test": [ + "parallel-lint . --exclude vendor", + "phpcs -p -s" + ] + } +} diff --git a/extension.json b/extension.json new file mode 100644 index 000..9d3a22c --- /dev/null +++ b/extension.json @@ -0,0 +1,29 @@ +{ + "name": "EmailAuth", +
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rewrite runBatchedQuery.php
Brian Wolff has submitted this change and it was merged. Change subject: Rewrite runBatchedQuery.php .. Rewrite runBatchedQuery.php This maintenance script was previously introduced as a way to do large UPDATE queries in a replication safe way. However, in modern versions of MySQL, UPDATE...LIMIT is considered a non-replication-safe query, and will emit a warning. So instead, ask the user to provide slightly more structured data about the update query being done, and partition the table based on an index. In the UPDATE queries, specify index ranges instead of using LIMIT. Also add a "db" option, which allows the script to update databases which are not valid wiki names, for example, centralauth. Change-Id: I462bdcb03e107af9db4738895952d5110f0ec4fc --- M maintenance/runBatchedQuery.php 1 file changed, 56 insertions(+), 8 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/runBatchedQuery.php b/maintenance/runBatchedQuery.php index a5e7a2f..f8eedb3 100644 --- a/maintenance/runBatchedQuery.php +++ b/maintenance/runBatchedQuery.php @@ -34,26 +34,74 @@ public function __construct() { parent::__construct(); $this->addDescription( - "Run a query repeatedly until it affects 0 rows, and wait for replica DBs in between.\n" . - "NOTE: You need to set a LIMIT clause yourself." ); + "Run an update query on all rows of a table. " . + "Waits for replicas at appropriate intervals." ); + $this->addOption( 'table', 'The table name', true, true ); + $this->addOption( 'set', 'The SET clause', true, true ); + $this->addOption( 'where', 'The WHERE clause', false, true ); + $this->addOption( 'key', 'A column name, the values of which are unique', true, true ); + $this->addOption( 'batch-size', 'The batch size (default 1000)', false, true ); + $this->addOption( 'db', 'The database name, or omit to use the current wiki.', false, true ); } public function execute() { - if ( !$this->hasArg() ) { - $this->error( "No query specified. Specify the query as a command line parameter.", true ); + $table = $this->getOption( 'table' ); + $key = $this->getOption( 'key' ); + $set = $this->getOption( 'set' ); + $where = $this->getOption( 'where', null ); + $where = $where === null ? [] : [ $where ]; + $batchSize = $this->getOption( 'batch-size', 1000 ); + + $dbName = $this->getOption( 'db', null ); + if ( $dbName === null ) { + $dbw = $this->getDB( DB_MASTER ); + } else { + $lbf = MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); + $lb = $lbf->getMainLB( $dbName ); + $dbw = $lb->getConnection( DB_MASTER, [], $dbName ); } - $query = $this->getArg(); + $selectConds = $where; + $prevEnd = false; + $n = 1; - $dbw = $this->getDB( DB_MASTER ); do { $this->output( "Batch $n: " ); $n++; + + // Note that the update conditions do not rely on atomicity of the + // SELECT query in order to guarantee that all rows are updated. The + // results of the SELECT are merely a partitioning hint. Simultaneous + // updates merely result in the wrong number of rows being updated + // in a batch. + + $res = $dbw->select( $table, $key, $selectConds, __METHOD__, + [ 'ORDER BY' => $key, 'LIMIT' => $batchSize ] ); + if ( $res->numRows() ) { + $res->seek( $res->numRows() - 1 ); + $row = $res->fetchObject(); + $end = $dbw->addQuotes( $row->$key ); + $selectConds = array_merge( $where, [ "$key > $end" ] ); + $updateConds = array_merge( $where, [ "$key <= $end" ] ); + } else { + $updateConds = $where; + } + if ( $prevEnd !== false ) { + $updateConds = array_merge( [ "$key > $prevEnd" ], $updateConds ); + } + + $query = "UPDATE " . $dbw->tableName( $table ) . + " SET " . $set . + " WHERE " . $dbw->makeList(
[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: build: Bump eslint-config-wikimedia to v0.3.0 and make pass
jenkins-bot has submitted this change and it was merged. Change subject: build: Bump eslint-config-wikimedia to v0.3.0 and make pass .. build: Bump eslint-config-wikimedia to v0.3.0 and make pass Change-Id: I774e05c4393eca8b4719f335a124efcb3d2a6dd5 --- M modules/ext.RevisionSlider.DiffPage.js M modules/ext.RevisionSlider.PointerLine.js M modules/ext.RevisionSlider.PointerView.js M modules/ext.RevisionSlider.init.js M package.json M tests/qunit/RevisionSlider.Revision.test.js 6 files changed, 14 insertions(+), 7 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.RevisionSlider.DiffPage.js b/modules/ext.RevisionSlider.DiffPage.js index faca14f..a010f4c 100644 --- a/modules/ext.RevisionSlider.DiffPage.js +++ b/modules/ext.RevisionSlider.DiffPage.js @@ -52,7 +52,7 @@ $sidePanel = $( '#mw-panel' ), $navigation = $( '#p-views' ), $catLinks = $( '#catlinks' ), - $printFooter = $( '.printfooter' ), + $printFooter = $( '.printfooter' ), scrollLeft = $container.find( '.mw-revslider-revisions-container' ).scrollLeft(); // Add our current rendered slider into the newly loaded container @@ -76,9 +76,11 @@ // Following wikEdDiff.js-specific code is deprecated and will be removed in the future. // WikEdDiff should be updated to use a hook. if ( self.wikEdDiffDetected() ) { + /* eslint-disable no-console */ console.log( 'You are running WikEdDiff & your copy of the code may need to be updated to work with the RevisionSlider.' ); console.log( 'Please see: https://phabricator.wikimedia.org/T143199#2631963' ); console.log( 'If WikEdDiff is still working while using the RevisonSlider then the code change has already been done.' ); + /* eslint-enable no-console */ } }, function ( xhr ) { @@ -87,6 +89,8 @@ this.tryCount++; mw.track( 'counter.MediaWiki.RevisionSlider.error.refresh' ); if ( retryAttempt <= retryLimit ) { + // TODO Remove this debugging code? + // eslint-disable-next-line no-console console.log( 'Retrying request' ); self.refresh( revId1, revId2, retryAttempt + 1 ); } diff --git a/modules/ext.RevisionSlider.PointerLine.js b/modules/ext.RevisionSlider.PointerLine.js index dd4b817..e466530 100644 --- a/modules/ext.RevisionSlider.PointerLine.js +++ b/modules/ext.RevisionSlider.PointerLine.js @@ -110,7 +110,7 @@ if ( this.pointer.getView().isUpperPointer() ) { $lowerLineDiv.removeClass( 'mw-revslider-lower-color' ).addClass( 'mw-revslider-upper-color' ); $upperLineDiv.removeClass( 'mw-revslider-lower-color' ).addClass( 'mw-revslider-upper-color' ); - $targetColumn = $( '.diff-ntitle' ); + $targetColumn = $( '.diff-ntitle' ); } else { $lowerLineDiv.removeClass( 'mw-revslider-upper-color' ).addClass( 'mw-revslider-lower-color' ); $upperLineDiv.removeClass( 'mw-revslider-upper-color' ).addClass( 'mw-revslider-lower-color' ); @@ -121,7 +121,7 @@ $upperLineDiv.addClass( 'mw-revslider-bottom-line' ); - if ( this.targetColumnIsRightFromPointer( $sourcePointer, $targetColumn ) ) { + if ( this.targetColumnIsRightFromPointer( $sourcePointer, $targetColumn ) ) { $upperLineDiv.addClass( 'mw-revslider-left-line' ); $lowerLineDiv.addClass( 'mw-revslider-right-line' ); } else { diff --git a/modules/ext.RevisionSlider.PointerView.js b/modules/ext.RevisionSlider.PointerView.js index 526557b..e23405a 100644 --- a/modules/ext.RevisionSlider.PointerView.js +++ b/modules/ext.RevisionSlider.PointerView.js @@ -115,7 +115,7 @@ if ( posBeforeSlider ) { return this.animateTo(
[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: build: Bump eslint-config-wikimedia to v0.3.0 (already passes)
jenkins-bot has submitted this change and it was merged. Change subject: build: Bump eslint-config-wikimedia to v0.3.0 (already passes) .. build: Bump eslint-config-wikimedia to v0.3.0 (already passes) Change-Id: Ifb4a7ab21907e81f19a1e3885ce44fcef90eb72e --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index 588e248..7b1ab5d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "browserify": "^13.0.0", -"eslint-config-wikimedia": "0.2.0", +"eslint-config-wikimedia": "0.3.0", "graph-shared": "git+http://g...@github.com/nyurik/graph-shared;, "grunt": "1.0.1", "grunt-banana-checker": "0.5.0", -- To view, visit https://gerrit.wikimedia.org/r/321826 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifb4a7ab21907e81f19a1e3885ce44fcef90eb72e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Graph Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Esanders Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: build: Bump eslint-config-wikimedia to v0.3.0 and make pass
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/321825 Change subject: build: Bump eslint-config-wikimedia to v0.3.0 and make pass .. build: Bump eslint-config-wikimedia to v0.3.0 and make pass Change-Id: Ia92d3fbb978977d628d526fe612dd05de4487775 --- M modules/box/Map.js M modules/wikivoyage/WVMapLayers.js M package.json 3 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/25/321825/1 diff --git a/modules/box/Map.js b/modules/box/Map.js index 23de947..4f5a792 100644 --- a/modules/box/Map.js +++ b/modules/box/Map.js @@ -340,7 +340,7 @@ * @chainable */ initView: function ( center, zoom, setView ) { - setView = setView === false ? false : true; + setView = setView !== false; if ( Array.isArray( center ) ) { if ( !isNaN( center[ 0 ] ) && !isNaN( center[ 1 ] ) ) { diff --git a/modules/wikivoyage/WVMapLayers.js b/modules/wikivoyage/WVMapLayers.js index 3354c91..dd18a37 100644 --- a/modules/wikivoyage/WVMapLayers.js +++ b/modules/wikivoyage/WVMapLayers.js @@ -105,4 +105,3 @@ module.wikivoyage, module.ControlLayers ) ); - diff --git a/package.json b/package.json index ebd031a..7aaee26 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "browserify": "^13.0.0", -"eslint-config-wikimedia": "0.2.0", +"eslint-config-wikimedia": "0.3.0", "grunt": "1.0.1", "grunt-banana-checker": "0.5.0", "grunt-contrib-watch": "1.0.0", -- To view, visit https://gerrit.wikimedia.org/r/321825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia92d3fbb978977d628d526fe612dd05de4487775 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Kartographer Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: build: Bump eslint-config-wikimedia to v0.3.0 (already passes)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/321821 Change subject: build: Bump eslint-config-wikimedia to v0.3.0 (already passes) .. build: Bump eslint-config-wikimedia to v0.3.0 (already passes) Change-Id: I84a3a6c550a4989c6ef584b2289272204d1b6eb4 --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/21/321821/1 diff --git a/package.json b/package.json index 1cb24b6..09ae647 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "test": "grunt test" }, "devDependencies": { -"eslint-config-wikimedia": "0.2.0", +"eslint-config-wikimedia": "0.3.0", "grunt": "1.0.1", "grunt-banana-checker": "0.5.0", "grunt-contrib-watch": "1.0.0", -- To view, visit https://gerrit.wikimedia.org/r/321821 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84a3a6c550a4989c6ef584b2289272204d1b6eb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Citoid[master]: build: Bump eslint-config-wikimedia to v0.3.0 and make pass
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/321820 Change subject: build: Bump eslint-config-wikimedia to v0.3.0 and make pass .. build: Bump eslint-config-wikimedia to v0.3.0 and make pass Change-Id: Ic32f38fb07189a0fd49b1c01042d837e3f188495 --- M modules/tests/index.test.js M package.json 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Citoid refs/changes/20/321820/1 diff --git a/modules/tests/index.test.js b/modules/tests/index.test.js index 16832bf..7933cf8 100644 --- a/modules/tests/index.test.js +++ b/modules/tests/index.test.js @@ -1,4 +1,3 @@ - /** * Citoid extension unit tests for function * ve.ui.CiteFromIdInspector.populateTemplate @@ -2462,4 +2461,3 @@ return testMaps( maps, citation, expected, assert ); } ); - diff --git a/package.json b/package.json index eb0828a..4e12a0f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "license": "MIT", "devDependencies": { -"eslint-config-wikimedia": "0.2.0", +"eslint-config-wikimedia": "0.3.0", "grunt": "1.0.1", "grunt-banana-checker": "0.5.0", "grunt-eslint": "19.0.0", -- To view, visit https://gerrit.wikimedia.org/r/321820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic32f38fb07189a0fd49b1c01042d837e3f188495 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Citoid Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: build: Bump eslint-config-wikimedia to v0.3.0 (already passes)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/321819 Change subject: build: Bump eslint-config-wikimedia to v0.3.0 (already passes) .. build: Bump eslint-config-wikimedia to v0.3.0 (already passes) Change-Id: Icc31cf9bf804765c38a1f44e310c9d8dc43f5be1 --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite refs/changes/19/321819/1 diff --git a/package.json b/package.json index 4214f2b..7be6012 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test": "grunt test" }, "devDependencies": { -"eslint-config-wikimedia": "0.2.0", +"eslint-config-wikimedia": "0.3.0", "grunt": "1.0.1", "grunt-banana-checker": "0.5.0", "grunt-eslint": "19.0.0", -- To view, visit https://gerrit.wikimedia.org/r/321819 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc31cf9bf804765c38a1f44e310c9d8dc43f5be1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Hide empty square for QR code with CSS for no-JS users
jenkins-bot has submitted this change and it was merged. Change subject: Hide empty square for QR code with CSS for no-JS users .. Hide empty square for QR code with CSS for no-JS users Change-Id: Id557bce14a623d894e0b23123c8ef037ddd3cc53 --- M extension.json A modules/ext.oath.showqrcode.styles.css M special/SpecialOATHEnable.php 3 files changed, 10 insertions(+), 1 deletion(-) Approvals: Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 7f02d2b..c93ead5 100644 --- a/extension.json +++ b/extension.json @@ -68,6 +68,11 @@ "qrcode.js", "ext.oath.showqrcode.js" ] + }, + "ext.oath.showqrcode.styles": { + "styles": [ + "ext.oath.showqrcode.styles.css" + ] } }, "ResourceFileModulePaths": { diff --git a/modules/ext.oath.showqrcode.styles.css b/modules/ext.oath.showqrcode.styles.css new file mode 100644 index 000..7d8f0e5 --- /dev/null +++ b/modules/ext.oath.showqrcode.styles.css @@ -0,0 +1,3 @@ +.client-nojs .mw-display-qrcode { +display: none; +} diff --git a/special/SpecialOATHEnable.php b/special/SpecialOATHEnable.php index 7607b67..700d78b 100644 --- a/special/SpecialOATHEnable.php +++ b/special/SpecialOATHEnable.php @@ -39,6 +39,7 @@ $form->setWrapperLegend( false ); $form->getOutput()->setPageTitle( $this->msg( 'oathauth-enable' ) ); $form->getOutput()->addModules( 'ext.oath.showqrcode' ); + $form->getOutput()->addModuleStyles( 'ext.oath.showqrcode.styles' ); } /** @@ -92,7 +93,7 @@ 'data-mw-qrcode-url' => $qrcodeUrl, 'class' => 'mw-display-qrcode', // Include width/height, so js won't re-arrange layout - // OTOH, this will cause non-js browsers to see a big empty space. + // And non-js users will have this hidden with CSS 'style' => 'width: 256px; height: 256px;' ] ); -- To view, visit https://gerrit.wikimedia.org/r/321587 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id557bce14a623d894e0b23123c8ef037ddd3cc53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OATHAuth Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Add dewiktionary for Beta Cluster
jenkins-bot has submitted this change and it was merged. Change subject: Add dewiktionary for Beta Cluster .. Add dewiktionary for Beta Cluster Fix spelling error for en.wiktionary Bug: T150764 Change-Id: I8dae8474d7c6211f1e5595453c56fca0dca73ab6 --- M conf/wmf/betalabs.localsettings.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/conf/wmf/betalabs.localsettings.js b/conf/wmf/betalabs.localsettings.js index 3b507fe..6551b3f 100644 --- a/conf/wmf/betalabs.localsettings.js +++ b/conf/wmf/betalabs.localsettings.js @@ -7,6 +7,7 @@ parsoidConfig.setMwApi({ prefix: 'cawiki', uri: 'https://ca.wikipedia.beta.wmflabs.org/w/api.php' }); parsoidConfig.setMwApi({ prefix: 'commonswiki', uri: 'https://commons.wikimedia.beta.wmflabs.org/w/api.php' }); parsoidConfig.setMwApi({ prefix: 'dewiki', uri: 'https://de.wikipedia.beta.wmflabs.org/w/api.php' }); + parsoidConfig.setMwApi({ prefix: 'dewiktionary', uri: 'https://de.wiktionary.beta.wmflabs.org/w/api.php' }); parsoidConfig.setMwApi({ prefix: 'en_rtlwiki', uri: 'https://en-rtl.wikipedia.beta.wmflabs.org/w/api.php' }); parsoidConfig.setMwApi({ prefix: 'enwiki', uri: 'https://en.wikipedia.beta.wmflabs.org/w/api.php' }); parsoidConfig.setMwApi({ prefix: 'enwikibooks', uri: 'https://en.wikibooks.beta.wmflabs.org/w/api.php' }); @@ -15,7 +16,7 @@ parsoidConfig.setMwApi({ prefix: 'enwikisource', uri: 'https://en.wikisource.beta.wmflabs.org/w/api.php' }); parsoidConfig.setMwApi({ prefix: 'enwikiversity', uri: 'https://en.wikiversity.beta.wmflabs.org/w/api.php' }); parsoidConfig.setMwApi({ prefix: 'enwikivoyage', uri: 'https://en.wikivoyage.beta.wmflabs.org/w/api.php' }); - parsoidConfig.setMwApi({ prefix: 'enwiktionary', uri: 'https://en.wikitionary.beta.wmflabs.org/w/api.php' }); + parsoidConfig.setMwApi({ prefix: 'enwiktionary', uri: 'https://en.wiktionary.beta.wmflabs.org/w/api.php' }); parsoidConfig.setMwApi({ prefix: 'eowiki', uri: 'https://eo.wikipedia.beta.wmflabs.org/w/api.php' }); parsoidConfig.setMwApi({ prefix: 'eswiki', uri: 'https://es.wikipedia.beta.wmflabs.org/w/api.php' }); parsoidConfig.setMwApi({ prefix: 'fawiki', uri: 'https://fa.wikipedia.beta.wmflabs.org/w/api.php' }); -- To view, visit https://gerrit.wikimedia.org/r/321816 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8dae8474d7c6211f1e5595453c56fca0dca73ab6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/parsoid/deploy Gerrit-Branch: master Gerrit-Owner: MattflaschenGerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Increase CirrusSearch interwiki load test to 25%
jenkins-bot has submitted this change and it was merged. Change subject: Increase CirrusSearch interwiki load test to 25% .. Increase CirrusSearch interwiki load test to 25% The deployment of 5% interwiki search hasn't even made a dent in any of our metrics for server load or query latency. Push things a little harder, to 25%. Bug: T149740 Change-Id: I60549e418513fe16e1b4bb52034ba04c4ae07c11 --- M wmf-config/CirrusSearch-production.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Dereckson: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CirrusSearch-production.php b/wmf-config/CirrusSearch-production.php index ed3f49c..dddf03d 100644 --- a/wmf-config/CirrusSearch-production.php +++ b/wmf-config/CirrusSearch-production.php @@ -75,7 +75,7 @@ $wgCirrusSearchInterwikiCacheTime = 60; } else { $wgCirrusSearchInterwikiSources = $wmgCirrusSearchInterwikiSources; - $wgCirrusSearchInterwikiLoadTest = $wgCirrusSearchInterwikiSources ? 0.05 : null; + $wgCirrusSearchInterwikiLoadTest = $wgCirrusSearchInterwikiSources ? 0.25 : null; } if ( $wgDBname == 'enwiki' ) { -- To view, visit https://gerrit.wikimedia.org/r/321724 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60549e418513fe16e1b4bb52034ba04c4ae07c11 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: Dereckson Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Provide a stable method for checking whether a user has enab...
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/321818 Change subject: Provide a stable method for checking whether a user has enabled OATH .. Provide a stable method for checking whether a user has enabled OATH This makes it possible to check from another extension whether the user has strong login security, without depending on internals which can change at any time. (The TwoFactorEnabled hook was intended for something like this but it operates on $wgUser which makes it useless for logins.) Change-Id: Ie15c45c9b29de0a0f926c2467808ca144f05e866 --- M OATHAuthUtils.php 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OATHAuth refs/changes/18/321818/1 diff --git a/OATHAuthUtils.php b/OATHAuthUtils.php index 5fcf018..07f2667 100644 --- a/OATHAuthUtils.php +++ b/OATHAuthUtils.php @@ -6,6 +6,16 @@ * @ingroup Extensions */ class OATHAuthUtils { + /** +* Check whether OATH two-factor authentication is enabled for a given user. +* This is a stable method that does not change and can be used in other extensions. +* @param User $user +* @return bool +*/ + public static function isEnabledFor( User $user ) { + $oathUser = OATHAuthHooks::getOATHUserRepository()->findByUser( $user ); + return $oathUser && $oathUser->getKey(); + } /** * Encrypt an aray of variables to put into the user's session. We use this -- To view, visit https://gerrit.wikimedia.org/r/321818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie15c45c9b29de0a0f926c2467808ca144f05e866 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OATHAuth Gerrit-Branch: master Gerrit-Owner: Gergő Tisza___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add dewiktionary to RESTBase on Beta Cluster
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/321817 Change subject: Add dewiktionary to RESTBase on Beta Cluster .. Add dewiktionary to RESTBase on Beta Cluster Fix spelling error for enwiktionary Bug: T150764 Change-Id: Ibe7882efec5807db6f1537f6b3a0c06dcf39db22 --- M modules/restbase/templates/config.labs.yaml.erb 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/17/321817/1 diff --git a/modules/restbase/templates/config.labs.yaml.erb b/modules/restbase/templates/config.labs.yaml.erb index cf45e4d..d7bcb5e 100644 --- a/modules/restbase/templates/config.labs.yaml.erb +++ b/modules/restbase/templates/config.labs.yaml.erb @@ -88,13 +88,14 @@ /{domain:commons.wikimedia.beta.wmflabs.org}: *default_project /{domain:deployment.wikimedia.beta.wmflabs.org}: *default_project /{domain:de.wikipedia.beta.wmflabs.org}: *default_project +/{domain:de.wiktionary.beta.wmflabs.org}: *default_project /{domain:en-rtl.wikipedia.beta.wmflabs.org}: *default_project /{domain:en.wikibooks.beta.wmflabs.org}: *default_project /{domain:en.wikinews.beta.wmflabs.org}: *default_project /{domain:en.wikipedia.beta.wmflabs.org}: *default_project /{domain:en.wikiquote.beta.wmflabs.org}: *default_project /{domain:en.wikisource.beta.wmflabs.org}: *default_project -/{domain:en.wikitionary.beta.wmflabs.org}: *default_project +/{domain:en.wiktionary.beta.wmflabs.org}: *default_project /{domain:en.wikiversity.beta.wmflabs.org}: *default_project /{domain:en.wikivoyage.beta.wmflabs.org}: *default_project /{domain:eo.wikipedia.beta.wmflabs.org}: *default_project -- To view, visit https://gerrit.wikimedia.org/r/321817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe7882efec5807db6f1537f6b3a0c06dcf39db22 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mattflaschen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Allow 'interface-editor' & 'engineer' users to use OATHAuth
jenkins-bot has submitted this change and it was merged. Change subject: Allow 'interface-editor' & 'engineer' users to use OATHAuth .. Allow 'interface-editor' & 'engineer' users to use OATHAuth Interface editors (and 'engineer' users at ruwiki) have access to the sensitive 'editinterface' right which allows them to edit the site MediaWiki pages and other users CSS and JS files, a sysop-level right. It seems appropriate to give them the choice to enable this security feature on their accounts given the recent security issues. This will only affect wikis that have configured the 'interface-editor' right locally. Bug: T150807 Change-Id: Ibaa20e52a9663adae24b521ee1ff869881457714 --- M wmf-config/CommonSettings.php 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Brian Wolff: Looks good to me, but someone else must approve Dereckson: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 6477444..77e2219 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -3158,6 +3158,12 @@ if ( isset( $wgGroupPermissions['abusefilter'] ) ) { $wgGroupPermissions['abusefilter']['oathauth-enable'] = true; } + if ( isset( $wgGroupPermissions['interface-editor'] ) ) { + $wgGroupPermissions['interface-editor']['oathauth-enable'] = true; + } + if ( isset( $wgGroupPermissions['engineer'] ) ) { + $wgGroupPermissions['engineer']['oathauth-enable'] = true; + } } if ( $wmgUseCentralAuth ) { -- To view, visit https://gerrit.wikimedia.org/r/321797 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibaa20e52a9663adae24b521ee1ff869881457714 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarcoAurelioGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Dereckson Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: role: add external_labels to ops prometheus
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/321813 Change subject: role: add external_labels to ops prometheus .. role: add external_labels to ops prometheus Bug: T150486 Change-Id: Ie9d3c232c07a8842ac01cdde6abc6a295baed890 --- M modules/role/manifests/prometheus/ops.pp 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/13/321813/1 diff --git a/modules/role/manifests/prometheus/ops.pp b/modules/role/manifests/prometheus/ops.pp index 25f7cac..94287d2 100644 --- a/modules/role/manifests/prometheus/ops.pp +++ b/modules/role/manifests/prometheus/ops.pp @@ -6,6 +6,15 @@ $targets_path = '/srv/prometheus/ops/targets' $rules_path = '/srv/prometheus/ops/rules' +$config_extra = { +# All metrics will get an additional 'site' label when queried by +# external systems (e.g. via federation) +'external_labels' => { +'site' => $::site, +}, +} + + # Add one job for each of mysql 'group' (i.e. their broad function) # Each job will look for new files matching the glob and load the job # configuration automatically. @@ -92,6 +101,7 @@ prometheus::server { 'ops': listen_address => '127.0.0.1:9900', scrape_configs_extra => array_concat($mysql_jobs, $varnish_jobs, $memcached_jobs), +global_config_extra => $config_extra, } prometheus::web { 'ops': -- To view, visit https://gerrit.wikimedia.org/r/321813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9d3c232c07a8842ac01cdde6abc6a295baed890 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fix Engage import handling of Postal.
jenkins-bot has submitted this change and it was merged. Change subject: Fix Engage import handling of Postal. .. Fix Engage import handling of Postal. Bug: T148056 Change-Id: I14084d5bda8fc5b679d8eac67c7566f897067e30 --- M sites/all/modules/offline2civicrm/ChecksFile.php A sites/all/modules/offline2civicrm/test_data/engage_postal.csv M sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php 3 files changed, 38 insertions(+), 8 deletions(-) Approvals: XenoRyet: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/offline2civicrm/ChecksFile.php b/sites/all/modules/offline2civicrm/ChecksFile.php index 29750a7..3b14cab 100644 --- a/sites/all/modules/offline2civicrm/ChecksFile.php +++ b/sites/all/modules/offline2civicrm/ChecksFile.php @@ -297,7 +297,9 @@ } // left-pad the zipcode -if ( $msg['country'] === 'US' && !empty( $msg['postal_code'] ) ) { +// Unclear whether US needs to be handled. United States is valid from a csv & +// gets this far. United States covered by a unit test. +if ( ($msg['country'] === 'US' || $msg['country'] === 'United States') && !empty( $msg['postal_code'] ) ) { if ( preg_match( '/^(\d{1,4})(-\d+)?$/', $msg['postal_code'], $matches ) ) { $msg['postal_code'] = str_pad( $matches[1], 5, "0", STR_PAD_LEFT ); if ( !empty( $matches[2] ) ) { diff --git a/sites/all/modules/offline2civicrm/test_data/engage_postal.csv b/sites/all/modules/offline2civicrm/test_data/engage_postal.csv new file mode 100644 index 000..138afc6 --- /dev/null +++ b/sites/all/modules/offline2civicrm/test_data/engage_postal.csv @@ -0,0 +1,2 @@ +Banner,Campaign,Medium,Batch,Contribution Type,Total Amount,Source,Postmark Date,Received Date,Payment Instrument,Check Number,Restrictions,Gift Source,Direct Mail Appeal,Organization Name,Street Address,City,Country,Postal Code,Email,State,Thank You Letter Date,AC Flag,Notes,Do Not Email,Do Not Phone,Do Not Mail,Do Not SMS,Is Opt Out +B15_0601_enlvroskLVROSK_dsk_sm_pos_contrl.no-LP.paypal,C15_mlWW_mob_lw_FR,sitenotice,10833,Engage,38,USD 38.00,5/11/2015,5/11/2015,Cash,5,Unrestricted - General,Corporate Gift,Robert TEST Simpson,Jaloo,22 Maple Lane,Houston,United States,7065,rsimps...@unblog.fr,Texas,4/2/2015,,, diff --git a/sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php b/sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php index 2e537e3..ab99b80 100644 --- a/sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php +++ b/sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php @@ -136,15 +136,21 @@ $this->assertEquals( $expected_normal, $output ); } + public function testImporterFormatsPostal() { +civicrm_initialize(); +$fileUri = $this->setupFile('engage_postal.csv'); + +$importer = new EngageChecksFile($fileUri); +$importer->import(); +$contact = $this->callAPISuccess('Contact', 'get', array('email' => 'rsimps...@unblog.fr', 'sequential' => 1)); +$this->assertEquals('07065', $contact['values'][0]['postal_code']); +$this->assertEquals(5, strlen($contact['values'][0]['postal_code'])); + } + public function testImporterCreatesOutputFiles() { civicrm_initialize(); $this->sourceFileUri = __DIR__ . '/../test_data/engage_reduced.csv'; - $this->purgePreviousData(); - - // copy the file to a temp dir so copies are made in the temp dir. - // This is where it would be in an import. - $fileUri = tempnam(sys_get_temp_dir(), 'Engage') . '.csv'; - copy($this->sourceFileUri, $fileUri); + $fileUri = $this->setupFile('engage_reduced.csv'); $importer = new EngageChecksFile($fileUri); $messages = $importer->import(); @@ -194,8 +200,10 @@ public function purgePreviousData() { $this->callAPISuccess('Contribution', 'get', array( 'api.Contribution.delete' => 1, - wmf_civicrm_get_custom_field_name('gateway_txn_id') => array('IN' => $this->getGatewayIDs()) + wmf_civicrm_get_custom_field_name('gateway_txn_id') => array('IN' => $this->getGatewayIDs()), + 'api.contact.delete' => array('skip_undelete' => 1), )); +CRM_Core_DAO::executeQuery('DELETE FROM civicrm_contact WHERE organization_name = "Jaloo"'); } /** @@ -231,4 +239,22 @@ } return $result; } + + /** + * Set up the file for import. + * + * @param string $inputFileName + * + * @return string + */ + public function setupFile($inputFileName) { +$this->sourceFileUri = __DIR__ . '/../test_data/' . $inputFileName; +$this->purgePreviousData(); + +// copy the file to a temp dir so copies are made in the temp dir. +// This is where it would be in an import. +$fileUri = tempnam(sys_get_temp_dir(), 'Engage') . '.csv'; +copy($this->sourceFileUri, $fileUri); +return
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Improve import to allow downloading of ALL non imported rows...
jenkins-bot has submitted this change and it was merged. Change subject: Improve import to allow downloading of ALL non imported rows and add tests .. Improve import to allow downloading of ALL non imported rows and add tests Restrict downloading of csvs to the creator of the file. Add the user ID into the filename and only allow the user in the filename to grab the file. Bug: T88460 Change-Id: I78ed9b892aa9f403085be0f7d94ae05a44f4e3d6 --- M sites/all/modules/offline2civicrm/ChecksFile.php M sites/all/modules/offline2civicrm/offline2civicrm.module M sites/all/modules/offline2civicrm/test_data/engage.csv A sites/all/modules/offline2civicrm/test_data/engage_reduced.csv M sites/all/modules/offline2civicrm/tests/EngageChecksFileTest.php 5 files changed, 254 insertions(+), 1,003 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/321616 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78ed9b892aa9f403085be0f7d94ae05a44f4e3d6 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Add Flow External Store to addWiki.php
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/321810 Change subject: Add Flow External Store to addWiki.php .. Add Flow External Store to addWiki.php Bug: T128417 Change-Id: Ieb45186e89fb0d3634c9de2da80289b6269187d0 --- M addWiki.php 1 file changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance refs/changes/10/321810/1 diff --git a/addWiki.php b/addWiki.php index 7d7c264..1b45ede 100644 --- a/addWiki.php +++ b/addWiki.php @@ -149,6 +149,18 @@ } else { $stores = array(); } + + // Flow External Store (may be the same, so there is an array_unique) + if ( is_array( $wgFlowExternalStore ) ) { + $flowStores = $wgFlowExternalStore; + } elseif ( $wgFlowExternalStore ) { + $flowStores = array( $wgFlowExternalStore ); + } else { + $flowStores = array(); + } + + $stores = array_unique( array_merge( $stores, $flowStores ) ); + if ( count( $stores ) ) { global $wgDBuser, $wgDBpassword, $wgExternalServers; foreach ( $stores as $storeURL ) { @@ -167,7 +179,10 @@ $store = new ExternalStoreDB; $extdb = $store->getMaster( $cluster ); $extdb->query( "SET default_storage_engine=InnoDB" ); - $extdb->query( "CREATE DATABASE $dbName" ); + + // IF NOT EXISTS because two External Store clusters + // can use the same DB, but different blobs table entries. + $extdb->query( "CREATE DATABASE IF NOT EXISTS $dbName" ); $extdb->selectDB( $dbName ); # Hack x2 -- To view, visit https://gerrit.wikimedia.org/r/321810 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb45186e89fb0d3634c9de2da80289b6269187d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: Mattflaschen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix of typo in checkimages docstring
Magul has uploaded a new change for review. https://gerrit.wikimedia.org/r/321811 Change subject: Fix of typo in checkimages docstring .. Fix of typo in checkimages docstring Bug: T150720 Change-Id: I5e6c545ec8e7366563227fcf903dfb6954335204 --- M scripts/checkimages.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/11/321811/1 diff --git a/scripts/checkimages.py b/scripts/checkimages.py index 96f191e..d20df03 100755 --- a/scripts/checkimages.py +++ b/scripts/checkimages.py @@ -22,7 +22,7 @@ rollback wait before reporting the image in the report instead of tag the image) default: 1 rollback. --duplicatesreport Report the duplicates in a log *AND* put the template in +-duplicatereportReport the duplicates in a log *AND* put the template in the images. -sendemail Send an email after tagging. -- To view, visit https://gerrit.wikimedia.org/r/321811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e6c545ec8e7366563227fcf903dfb6954335204 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Magul___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove redundant manifest Activity export
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/321807 Change subject: Hygiene: remove redundant manifest Activity export .. Hygiene: remove redundant manifest Activity export Remove redundant export="false" attributes from Activities that have no intent filters. From the docs[0]: Whether or not the activity can be launched by components of other applications — "true" if it can be, and "false" if not. If "false", the activity can be launched only by components of the same application or applications with the same user ID. The default value depends on whether the activity contains intent filters. The absence of any filters means that the activity can be invoked only by specifying its exact class name. This implies that the activity is intended only for application-internal use (since others would not know the class name). So in this case, the default value is "false". On the other hand, the presence of at least one filter implies that the activity is intended for external use, so the default value is "true". [0] https://developer.android.com/guide/topics/manifest/activity-element.html#exported Change-Id: Ia56250b6049af671663d1f7cd323f9413ce939ba --- M app/src/main/AndroidManifest.xml 1 file changed, 3 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/07/321807/1 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6a157df..04f0357 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -97,12 +97,10 @@ + android:theme="@style/PageTheme" /> +android:windowSoftInputMode="stateVisible|adjustResize" /> +android:theme="@style/AppTheme" /> https://gerrit.wikimedia.org/r/321807 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia56250b6049af671663d1f7cd323f9413ce939ba Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] All-Projects[refs/meta/config]: Edit Project Config
BBlack has submitted this change and it was merged. Change subject: Edit Project Config .. Edit Project Config Change-Id: I2bba9c4c8907e7bc39a91dc9fe109526e7ba1e55 --- M project.config 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/project.config b/project.config index 68161b2..3fbcea9 100644 --- a/project.config +++ b/project.config @@ -44,8 +44,6 @@ queryLimit = +0..+5000 group Registered Users queryLimit = +0..+500 group Anonymous Users killTask = group Administrators - accessDatabase = group capability-access-database - accessDatabase = group ldap/ops viewCaches = group gerrit viewConnections = group gerrit viewQueue = group gerrit -- To view, visit https://gerrit.wikimedia.org/r/321801 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2bba9c4c8907e7bc39a91dc9fe109526e7ba1e55 Gerrit-PatchSet: 2 Gerrit-Project: All-Projects Gerrit-Branch: refs/meta/config Gerrit-Owner: BBlackGerrit-Reviewer: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Added mapdata to interactive
jenkins-bot has submitted this change and it was merged. Change subject: Added mapdata to interactive .. Added mapdata to interactive Change-Id: I362231ba3ba2105d812cbb89255b7723359e34a5 --- M config.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Zppix: Looks good to me, approved jenkins-bot: Verified diff --git a/config.yaml b/config.yaml index f7ff032..5a7df24 100644 --- a/config.yaml +++ b/config.yaml @@ -52,6 +52,7 @@ mediawiki/extensions/Kartographer: mediawiki/services/graphoid: maps/.*: +mapdata: "#pywikibot": pywikipediabot.*: pywikibot.*: -- To view, visit https://gerrit.wikimedia.org/r/321800 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I362231ba3ba2105d812cbb89255b7723359e34a5 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: YurikGerrit-Reviewer: JGirault Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Zppix Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: build: Bump eslint-config-wikimedia to v0.3.0 and make pass
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/321803 Change subject: build: Bump eslint-config-wikimedia to v0.3.0 and make pass .. build: Bump eslint-config-wikimedia to v0.3.0 and make pass Change-Id: I2d97fb761a2f6aa861d8f11c4b7b012e563450e7 --- M package.json M src/ce/ve.ce.Surface.js M src/dm/ve.dm.Document.js 3 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/03/321803/1 diff --git a/package.json b/package.json index b8eaff5..dc95dba 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ } ], "devDependencies": { -"eslint-config-wikimedia": "0.2.0", +"eslint-config-wikimedia": "0.3.0", "grunt": "1.0.1", "grunt-banana-checker": "0.5.0", "grunt-contrib-clean": "1.0.0", diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js index 5e9a58b..a8e67c5 100644 --- a/src/ce/ve.ce.Surface.js +++ b/src/ce/ve.ce.Surface.js @@ -2692,7 +2692,7 @@ // TODO: setTimeout: document purpose setTimeout( function () { surface.changeModel( null, newSelection ); - surface .showModelSelection(); + surface.showModelSelection(); } ); } } diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js index 43aa7a1..6cfae10 100644 --- a/src/dm/ve.dm.Document.js +++ b/src/dm/ve.dm.Document.js @@ -539,6 +539,7 @@ ); } + // eslint-disable-next-line no-inner-declarations function nodeNeedsContext( node ) { return node.getParentNodeTypes() !== null || node.isContent(); } -- To view, visit https://gerrit.wikimedia.org/r/321803 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d97fb761a2f6aa861d8f11c4b7b012e563450e7 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: WIP: Add description editing success activity
Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/321802 Change subject: WIP: Add description editing success activity .. WIP: Add description editing success activity TODO: Fix SVG which doesn't seem to have imported correctly. Change-Id: I5039df3e428cd7564b126ebb50cc4a095a2cf6ec --- M app/src/main/AndroidManifest.xml M app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java A app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessActivity.java A app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessFragment.java A app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessView.java A app/src/main/java/org/wikipedia/views/AppTextViewWithImages.java A app/src/main/res/drawable/button_selector_blue.xml A app/src/main/res/drawable/button_shape_blue.xml A app/src/main/res/drawable/button_shape_blue_highlight.xml A app/src/main/res/drawable/edit.png A app/src/main/res/drawable/ic_illustration_description_success.xml A app/src/main/res/drawable/shape_border_1dp_gray.xml A app/src/main/res/layout/fragment_description_edit_success.xml A app/src/main/res/layout/view_description_edit_success.xml M app/src/main/res/values-qq/strings.xml M app/src/main/res/values/strings.xml M app/src/main/res/values/styles.xml 17 files changed, 362 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/02/321802/1 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f54183c..6a157df 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -161,6 +161,10 @@ android:windowSoftInputMode="stateVisible|adjustResize" android:exported="false"/> + + call) { if (getActivity() != null) { DeviceUtil.hideSoftKeyboard(getActivity()); -// TODO: go to success fragment + startActivity(DescriptionEditSuccessActivity.newIntent(getContext())); getActivity().finish(); } } diff --git a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessActivity.java b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessActivity.java new file mode 100644 index 000..132a446 --- /dev/null +++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessActivity.java @@ -0,0 +1,25 @@ +package org.wikipedia.descriptions; + +import android.content.Context; +import android.content.Intent; +import android.support.annotation.NonNull; +import android.view.View; + +import org.wikipedia.activity.SingleFragmentActivity; + +public class DescriptionEditSuccessActivity +extends SingleFragmentActivity { + +static Intent newIntent(@NonNull Context context) { +return new Intent(context, DescriptionEditSuccessActivity.class); +} + +@Override protected DescriptionEditSuccessFragment createFragment() { +return DescriptionEditSuccessFragment.newInstance(); +} + +// Expose finish() for use in the android:onClick property (see view_description_edit_success.xml) +public void finish(View v) { +finish(); +} +} diff --git a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessFragment.java b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessFragment.java new file mode 100644 index 000..164b9d6 --- /dev/null +++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessFragment.java @@ -0,0 +1,21 @@ +package org.wikipedia.descriptions; + +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import org.wikipedia.R; + +public class DescriptionEditSuccessFragment extends Fragment { +@NonNull public static DescriptionEditSuccessFragment newInstance() { +return new DescriptionEditSuccessFragment(); +} + +@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { +super.onCreateView(inflater, container, savedInstanceState); +return inflater.inflate(R.layout.fragment_description_edit_success, container, false); +} +} diff --git a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessView.java b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessView.java new file mode 100644 index 000..e081683 --- /dev/null +++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditSuccessView.java @@ -0,0 +1,40 @@ +package org.wikipedia.descriptions; + +import android.annotation.TargetApi; +import android.content.Context; +import android.os.Build;
[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Added mapdata to interactive
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/321800 Change subject: Added mapdata to interactive .. Added mapdata to interactive Change-Id: I362231ba3ba2105d812cbb89255b7723359e34a5 --- M config.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit refs/changes/00/321800/1 diff --git a/config.yaml b/config.yaml index f7ff032..5a7df24 100644 --- a/config.yaml +++ b/config.yaml @@ -52,6 +52,7 @@ mediawiki/extensions/Kartographer: mediawiki/services/graphoid: maps/.*: +mapdata: "#pywikibot": pywikipediabot.*: pywikibot.*: -- To view, visit https://gerrit.wikimedia.org/r/321800 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I362231ba3ba2105d812cbb89255b7723359e34a5 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: Yurik___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerrit: smaller upload limits
BBlack has submitted this change and it was merged. Change subject: gerrit: smaller upload limits .. gerrit: smaller upload limits Limit upload packs to 20MB, and limit to 10 changes/push. Change-Id: I0d2fafc72cc68a3cddc78a7a6d11710bdedccc1d --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: BBlack: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index 889de87..6bdd332 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -186,7 +186,8 @@ maxSubjectLength = 100 maxLineLength = 120 [receive] -maxObjectSizeLimit = 100m +maxObjectSizeLimit = 20m +maxBatchChanges = 10 enableSignedPush = false [changeCleanup] # Not actually used, but Gerrit complains if unset -- To view, visit https://gerrit.wikimedia.org/r/321799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0d2fafc72cc68a3cddc78a7a6d11710bdedccc1d Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlackGerrit-Reviewer: BBlack Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerrit: smaller upload limits
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/321799 Change subject: gerrit: smaller upload limits .. gerrit: smaller upload limits Limit upload packs to 20MB, and limit to 10 changes/push. Change-Id: I0d2fafc72cc68a3cddc78a7a6d11710bdedccc1d --- M modules/gerrit/templates/gerrit.config.erb 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/321799/1 diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index 889de87..6bdd332 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -186,7 +186,8 @@ maxSubjectLength = 100 maxLineLength = 120 [receive] -maxObjectSizeLimit = 100m +maxObjectSizeLimit = 20m +maxBatchChanges = 10 enableSignedPush = false [changeCleanup] # Not actually used, but Gerrit complains if unset -- To view, visit https://gerrit.wikimedia.org/r/321799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d2fafc72cc68a3cddc78a7a6d11710bdedccc1d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: parserTests: Use a mock parser during article insertion
jenkins-bot has submitted this change and it was merged. Change subject: parserTests: Use a mock parser during article insertion .. parserTests: Use a mock parser during article insertion This makes debugging simpler by avoiding log noise, hitting breakpoints unexpectedly, etc. This means that {{subst:}} is no longer supported in !!article sections, but I could only find one test which relied on that. Change-Id: I6400defa389389e5d9632fb01d4a534c0d88d442 --- M tests/common/TestsAutoLoader.php A tests/parser/ParserTestMockParser.php M tests/parser/ParserTestRunner.php 3 files changed, 29 insertions(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/common/TestsAutoLoader.php b/tests/common/TestsAutoLoader.php index a19fea1..d79fbd7 100644 --- a/tests/common/TestsAutoLoader.php +++ b/tests/common/TestsAutoLoader.php @@ -35,6 +35,7 @@ 'DjVuSupport' => "$testDir/parser/DjVuSupport.php", 'TestRecorder' => "$testDir/parser/TestRecorder.php", 'MultiTestRecorder' => "$testDir/parser/MultiTestRecorder.php", + 'ParserTestMockParser' => "$testDir/parser/ParserTestMockParser.php", 'ParserTestRunner' => "$testDir/parser/ParserTestRunner.php", 'ParserTestParserHook' => "$testDir/parser/ParserTestParserHook.php", 'ParserTestPrinter' => "$testDir/parser/ParserTestPrinter.php", diff --git a/tests/parser/ParserTestMockParser.php b/tests/parser/ParserTestMockParser.php new file mode 100644 index 000..0757b34 --- /dev/null +++ b/tests/parser/ParserTestMockParser.php @@ -0,0 +1,20 @@ +getParser(); + $restore = $this->executeSetupSnippets( [ 'wgParser' => new ParserTestMockParser ] ); $status = $page->doEditContent( ContentHandler::makeContent( $text, $title ), '', EDIT_NEW ); + $restore(); + if ( !$status->isOK() ) { throw new MWException( $status->getWikiText( false, false, 'en' ) ); } -- To view, visit https://gerrit.wikimedia.org/r/314490 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6400defa389389e5d9632fb01d4a534c0d88d442 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Tim StarlingGerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Allow 'interface-editor' users to use OATHAuth
MarcoAurelio has uploaded a new change for review. https://gerrit.wikimedia.org/r/321797 Change subject: Allow 'interface-editor' users to use OATHAuth .. Allow 'interface-editor' users to use OATHAuth Interface editors have access to the sensitive 'editinterface' right which allows them to edit the site MediaWiki pages and other users CSS and JS files, a sysop-level right. It seems appropriate to give them the choice to enable this security feature on their accounts given the recent security issues. This will only affect wikis that have configured the 'interface-editor' right locally. Bug: T150807 Change-Id: Ibaa20e52a9663adae24b521ee1ff869881457714 --- M wmf-config/CommonSettings.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/97/321797/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 6477444..d75f53a 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -3158,6 +3158,9 @@ if ( isset( $wgGroupPermissions['abusefilter'] ) ) { $wgGroupPermissions['abusefilter']['oathauth-enable'] = true; } + if ( isset( $wgGroupPermissions['interface-editor'] ) ) { + $wgGroupPermissions['interface-editor']['oathauth-enable'] = true; + } } if ( $wmgUseCentralAuth ) { -- To view, visit https://gerrit.wikimedia.org/r/321797 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibaa20e52a9663adae24b521ee1ff869881457714 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarcoAurelio___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Throttler: improve log message compatibility with Monolog lo...
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/321798 Change subject: Throttler: improve log message compatibility with Monolog logger .. Throttler: improve log message compatibility with Monolog logger The `type` log event attribute is used in Wikimedia production logging to categorize log events by source (e.g. 'mediawiki', 'restbase', etc). Adding a `type` key to the logging context overwrites the default value of 'mediawiki'. Rename the key to `throttle` in the context and the message template. Change-Id: Ic274159774e43a8749f83c850fff7897956cf377 --- M includes/auth/Throttler.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/321798/1 diff --git a/includes/auth/Throttler.php b/includes/auth/Throttler.php index f47c606..000b070 100644 --- a/includes/auth/Throttler.php +++ b/includes/auth/Throttler.php @@ -135,7 +135,7 @@ $this->cache->incr( $throttleKey ); } else { // throttled $this->logRejection( [ - 'type' => $this->type, + 'throttle' => $this->type, 'index' => $index, 'ip' => $ipKey, 'username' => $username, @@ -191,7 +191,7 @@ } protected function logRejection( array $context ) { - $logMsg = 'Throttle {type} hit, throttled for {expiry} seconds due to {count} attempts ' + $logMsg = 'Throttle {throttle} hit, throttled for {expiry} seconds due to {count} attempts ' . 'from username {username} and IP {ip}'; // If we are hitting a throttle for >= warningLimit attempts, it is much more likely to be -- To view, visit https://gerrit.wikimedia.org/r/321798 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic274159774e43a8749f83c850fff7897956cf377 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: BryanDavis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fix attribute.style typo in gallery dialog
jenkins-bot has submitted this change and it was merged. Change subject: Fix attribute.style typo in gallery dialog .. Fix attribute.style typo in gallery dialog Change-Id: I71162652df5e09c4d974e0f863ea661c4bd7902e --- M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved Esanders: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js index 5ddb705..ee5f062 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js @@ -655,7 +655,7 @@ mwData.attrs.perrow = perrow || undefined; mwData.attrs.showfilename = showFilename ? 'yes' : undefined; mwData.attrs.classes = classes || undefined; - mwData.attrs.styles = styles || undefined; + mwData.attrs.style = styles || undefined; // Unset mode attribute if it is the same as the default mwData.attrs.mode = mode === this.defaults.mode ? undefined : mode; -- To view, visit https://gerrit.wikimedia.org/r/321551 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I71162652df5e09c4d974e0f863ea661c4bd7902e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: TchandersGerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update eventstreams to 6d957a4
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/321794 Change subject: Update eventstreams to 6d957a4 .. Update eventstreams to 6d957a4 List of changes: xxx Update node module dependencies Change-Id: Ib84730999f3df190e23a98274d3c500d6f029400 --- M node_modules/bunyan/bin/bunyan M node_modules/bunyan/lib/bunyan.js M node_modules/bunyan/node_modules/dtrace-provider/dtrace_probe.cc M node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.cc M node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.h M node_modules/bunyan/node_modules/dtrace-provider/package.json A node_modules/bunyan/node_modules/dtrace-provider/test/args-after-cb-1.test.js A node_modules/bunyan/node_modules/dtrace-provider/test/args-after-cb-1_fire.js A node_modules/bunyan/node_modules/dtrace-provider/test/args-after-cb-2.test.js A node_modules/bunyan/node_modules/dtrace-provider/test/args-after-cb-2_fire.js M node_modules/bunyan/node_modules/moment/LICENSE M node_modules/bunyan/node_modules/moment/locale/af.js A node_modules/bunyan/node_modules/moment/locale/ar-dz.js M node_modules/bunyan/node_modules/moment/locale/ar-ly.js M node_modules/bunyan/node_modules/moment/locale/ar-ma.js M node_modules/bunyan/node_modules/moment/locale/ar-sa.js M node_modules/bunyan/node_modules/moment/locale/ar-tn.js M node_modules/bunyan/node_modules/moment/locale/ar.js M node_modules/bunyan/node_modules/moment/locale/az.js M node_modules/bunyan/node_modules/moment/locale/be.js A node_modules/bunyan/node_modules/moment/locale/bg-x.js M node_modules/bunyan/node_modules/moment/locale/bg.js M node_modules/bunyan/node_modules/moment/locale/bn.js M node_modules/bunyan/node_modules/moment/locale/bo.js M node_modules/bunyan/node_modules/moment/locale/br.js M node_modules/bunyan/node_modules/moment/locale/bs.js M node_modules/bunyan/node_modules/moment/locale/ca.js M node_modules/bunyan/node_modules/moment/locale/cs.js M node_modules/bunyan/node_modules/moment/locale/cv.js M node_modules/bunyan/node_modules/moment/locale/cy.js M node_modules/bunyan/node_modules/moment/locale/da.js M node_modules/bunyan/node_modules/moment/locale/de-at.js M node_modules/bunyan/node_modules/moment/locale/de.js M node_modules/bunyan/node_modules/moment/locale/dv.js M node_modules/bunyan/node_modules/moment/locale/el.js M node_modules/bunyan/node_modules/moment/locale/en-au.js M node_modules/bunyan/node_modules/moment/locale/en-ca.js M node_modules/bunyan/node_modules/moment/locale/en-gb.js M node_modules/bunyan/node_modules/moment/locale/en-ie.js M node_modules/bunyan/node_modules/moment/locale/en-nz.js M node_modules/bunyan/node_modules/moment/locale/eo.js M node_modules/bunyan/node_modules/moment/locale/es-do.js M node_modules/bunyan/node_modules/moment/locale/es.js M node_modules/bunyan/node_modules/moment/locale/et.js M node_modules/bunyan/node_modules/moment/locale/eu.js M node_modules/bunyan/node_modules/moment/locale/fa.js M node_modules/bunyan/node_modules/moment/locale/fi.js M node_modules/bunyan/node_modules/moment/locale/fo.js M node_modules/bunyan/node_modules/moment/locale/fr-ca.js M node_modules/bunyan/node_modules/moment/locale/fr-ch.js M node_modules/bunyan/node_modules/moment/locale/fr.js M node_modules/bunyan/node_modules/moment/locale/fy.js M node_modules/bunyan/node_modules/moment/locale/gd.js M node_modules/bunyan/node_modules/moment/locale/gl.js M node_modules/bunyan/node_modules/moment/locale/he.js M node_modules/bunyan/node_modules/moment/locale/hi.js M node_modules/bunyan/node_modules/moment/locale/hr.js M node_modules/bunyan/node_modules/moment/locale/hu.js M node_modules/bunyan/node_modules/moment/locale/hy-am.js M node_modules/bunyan/node_modules/moment/locale/id.js M node_modules/bunyan/node_modules/moment/locale/is.js M node_modules/bunyan/node_modules/moment/locale/it.js M node_modules/bunyan/node_modules/moment/locale/ja.js M node_modules/bunyan/node_modules/moment/locale/jv.js M node_modules/bunyan/node_modules/moment/locale/ka.js M node_modules/bunyan/node_modules/moment/locale/kk.js M node_modules/bunyan/node_modules/moment/locale/km.js M node_modules/bunyan/node_modules/moment/locale/ko.js M node_modules/bunyan/node_modules/moment/locale/ky.js M node_modules/bunyan/node_modules/moment/locale/lb.js M node_modules/bunyan/node_modules/moment/locale/lo.js M node_modules/bunyan/node_modules/moment/locale/lt.js M node_modules/bunyan/node_modules/moment/locale/lv.js M node_modules/bunyan/node_modules/moment/locale/me.js M node_modules/bunyan/node_modules/moment/locale/mi.js M node_modules/bunyan/node_modules/moment/locale/mk.js M node_modules/bunyan/node_modules/moment/locale/ml.js M node_modules/bunyan/node_modules/moment/locale/mr.js M node_modules/bunyan/node_modules/moment/locale/ms-my.js M node_modules/bunyan/node_modules/moment/locale/ms.js M node_modules/bunyan/node_modules/moment/locale/my.js M
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix 'getTimestamp' default check in NotificationItem unit test
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/321793 Change subject: Fix 'getTimestamp' default check in NotificationItem unit test .. Fix 'getTimestamp' default check in NotificationItem unit test Initially this test checked whether when we ask for the default value of 'getTimestamp' we are getting a 'now' value. This is flawed because there could be (and is, apparently) a difference in time between instantiating the object and getting the result, which meant that the test failed. Instead, we remove this default test and bring it back specifically after the automatic tests - this time, we are just checking that the format of the default timestamp is the correct format that we expect. This will prevent us from guessing the 'now' time of the request and dealing with storing times, etc. Change-Id: Ic1c1e4ce8e4cd8afc337535d5b33ec2d2f63f514 --- M tests/qunit/model/test_mw.echo.dm.NotificationItem.js 1 file changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/93/321793/1 diff --git a/tests/qunit/model/test_mw.echo.dm.NotificationItem.js b/tests/qunit/model/test_mw.echo.dm.NotificationItem.js index 10ac6c7..22464bf 100644 --- a/tests/qunit/model/test_mw.echo.dm.NotificationItem.js +++ b/tests/qunit/model/test_mw.echo.dm.NotificationItem.js @@ -30,7 +30,7 @@ QUnit.module( 'ext.echo.dm - mw.echo.dm.NotificationItem' ); QUnit.test( 'Constructing items', function ( assert ) { - var i, j, itemModel, checkMethods, + var i, j, itemModel, checkMethods, defaultTimestamp, defaultValues = { getId: undefined, getContentHeader: '', @@ -41,7 +41,6 @@ isSeen: false, isForeign: false, isBundled: false, - getTimestamp: moment.utc().format( '-MM-DD[T]HH:mm:ss[Z]' ), getPrimaryUrl: undefined, getIconURL: undefined, getIconType: undefined, @@ -106,6 +105,19 @@ tests[ i ].msg + ' (' + checkMethods[ j ] + ')' ); } + + // Specifically check whether our fallback timestamp works + // We can't give the system the regular "check whether we are + // getting 'now'" value because there may be a difference + // between the 'now' it is instantiating with and the + // 'now' that it is checking. Instead, we will verify that the + // time we are recieving as the fallback value is in the correct format + itemModel = new mw.echo.dm.NotificationItem( 0 ); + defaultTimestamp = itemModel.getTimestamp(); + assert.ok( + moment( defaultTimestamp, '-MM-DD[T]HH:mm:ss[Z]' ) + .format( '-MM-DD[T]HH:mm:ss[Z]' ) === defaultTimestamp + ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/321793 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1c1e4ce8e4cd8afc337535d5b33ec2d2f63f514 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Mooeypoo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ocg-collection[wmf-deploy]: Revert "Add en.wiktionary.org to blacklist temporarily to pr...
Arlolra has submitted this change and it was merged. Change subject: Revert "Add en.wiktionary.org to blacklist temporarily to prevent DoS." .. Revert "Add en.wiktionary.org to blacklist temporarily to prevent DoS." This reverts commit 0bf27e3452dfdc770317f15793e93e6e89c7865a. Bug: T147211 Bug: T150604 Change-Id: I74f3c50df7533c83099580c4c80b99de3bf7ca31 --- M LocalSettings.js 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Arlolra: Verified; Looks good to me, approved Marostegui: Looks good to me, but someone else must approve Dzahn: Looks good to me, but someone else must approve diff --git a/LocalSettings.js b/LocalSettings.js index 60afb3e..86e998d 100644 --- a/LocalSettings.js +++ b/LocalSettings.js @@ -10,9 +10,6 @@ config.backend.writers.rdf2latex.bin = "/srv/deployment/ocg/ocg/mw-ocg-latexer/bin/mw-ocg-latexer"; config.backend.writers.rdf2text.bin = "/srv/deployment/ocg/ocg/mw-ocg-texter/bin/mw-ocg-texter"; - // DoS prevention: stop spider of wiktionary (2016-10-03, T147211) - config.frontend.blacklist = /"baseurl":"[^"]*en\.wiktionary\.org/; - // DoS prevention: limit bundle sizes to 512MB config.backend.bundler.additionalArgs.push('--image-size-limit=5'); config.backend.bundler.additionalArgs.push('--bundle-size-limit=536870912'); -- To view, visit https://gerrit.wikimedia.org/r/314058 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I74f3c50df7533c83099580c4c80b99de3bf7ca31 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/ocg-collection Gerrit-Branch: wmf-deploy Gerrit-Owner: C. Scott AnanianGerrit-Reviewer: Arlolra Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Marostegui ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Make compute:get fully public
Andrew Bogott has submitted this change and it was merged. Change subject: Make compute:get fully public .. Make compute:get fully public This will allow observers (and anyone) to query instance details regardless of project membership. This shouldn't reveal any information that isn't already visible on wikitech. Bug: T150092 Change-Id: I2a9f2f6131a37e56afb2ad47d1f3aee20ef5d0c9 --- M modules/openstack/files/liberty/nova/policy.json M modules/openstack/files/mitaka/nova/policy.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack/files/liberty/nova/policy.json b/modules/openstack/files/liberty/nova/policy.json index 9744bac..b912d32 100644 --- a/modules/openstack/files/liberty/nova/policy.json +++ b/modules/openstack/files/liberty/nova/policy.json @@ -10,7 +10,7 @@ "compute:create:attach_network": "rule:admin_or_projectadmin", "compute:create:attach_volume": "rule:admin_or_projectadmin", "compute:create:forced_host": "rule:admin_or_projectadmin", -"compute:get": "rule:admin_or_member", +"compute:get": "", "compute:get_all": "", "compute:get_all_tenants": "", "compute:start": "rule:admin_or_projectadmin", diff --git a/modules/openstack/files/mitaka/nova/policy.json b/modules/openstack/files/mitaka/nova/policy.json index 9744bac..b912d32 100644 --- a/modules/openstack/files/mitaka/nova/policy.json +++ b/modules/openstack/files/mitaka/nova/policy.json @@ -10,7 +10,7 @@ "compute:create:attach_network": "rule:admin_or_projectadmin", "compute:create:attach_volume": "rule:admin_or_projectadmin", "compute:create:forced_host": "rule:admin_or_projectadmin", -"compute:get": "rule:admin_or_member", +"compute:get": "", "compute:get_all": "", "compute:get_all_tenants": "", "compute:start": "rule:admin_or_projectadmin", -- To view, visit https://gerrit.wikimedia.org/r/320827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a9f2f6131a37e56afb2ad47d1f3aee20ef5d0c9 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update eventstreams
Ottomata has submitted this change and it was merged. Change subject: Update eventstreams .. Update eventstreams Change-Id: I0addea683bf03e5816ed13c3b0a81eff8134a594 --- M src 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/src b/src index b31779d..6d957a4 16 --- a/src +++ b/src @@ -1 +1 @@ -Subproject commit b31779d96d83cae3c43bf35766cc8cca5ba0a236 +Subproject commit 6d957a4fd335e835435eb19462bc2369e6e38b52 -- To view, visit https://gerrit.wikimedia.org/r/321792 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0addea683bf03e5816ed13c3b0a81eff8134a594 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/eventstreams/deploy Gerrit-Branch: master Gerrit-Owner: OttomataGerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update eventstreams
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/321792 Change subject: Update eventstreams .. Update eventstreams Change-Id: I0addea683bf03e5816ed13c3b0a81eff8134a594 --- M src 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/eventstreams/deploy refs/changes/92/321792/1 diff --git a/src b/src index b31779d..6d957a4 16 --- a/src +++ b/src @@ -1 +1 @@ -Subproject commit b31779d96d83cae3c43bf35766cc8cca5ba0a236 +Subproject commit 6d957a4fd335e835435eb19462bc2369e6e38b52 -- To view, visit https://gerrit.wikimedia.org/r/321792 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0addea683bf03e5816ed13c3b0a81eff8134a594 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/eventstreams/deploy Gerrit-Branch: master Gerrit-Owner: Ottomata___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix typo in #getDateFromExif
jenkins-bot has submitted this change and it was merged. Change subject: Fix typo in #getDateFromExif .. Fix typo in #getDateFromExif Actually use fileStr instead of fileReader.result directly. Change-Id: I470799c65c06e191c8ca81aee2f286676be1c8f9 --- M resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js index 844d74c..741771a 100644 --- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js +++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js @@ -395,7 +395,7 @@ } try { - metadata = mw.libs.jpegmeta( this.result, file.name ); + metadata = mw.libs.jpegmeta( fileStr, file.name ); } catch ( e ) { metadata = null; } -- To view, visit https://gerrit.wikimedia.org/r/321731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I470799c65c06e191c8ca81aee2f286676be1c8f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: Prtksxna Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...eventstreams[master]: Updates to package.json to use tagged kafka-sse
Ottomata has submitted this change and it was merged. Change subject: Updates to package.json to use tagged kafka-sse .. Updates to package.json to use tagged kafka-sse Change-Id: Ifdcd0d5e3d199e0749d1c4c6d2dac46e15a36454 --- M README.md M package.json 2 files changed, 3 insertions(+), 4 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 0534980..e2127c2 100644 --- a/README.md +++ b/README.md @@ -49,5 +49,4 @@ ## TODO: -- Use tagged and versioned kafka-sse in package.json - server side filtering diff --git a/package.json b/package.json index b3aefb7..3be0547 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "repository": { "type": "git", -"url": "git://github.com/wikimedia/mediawiki-services-eventstreams.git" +"url": "https://gerrit.wikimedia.org/r/mediawiki/services/eventstreams; }, "keywords": [ "MediaWiki", @@ -28,7 +28,7 @@ "bugs": { "url": "https://phabricator.wikimedia.org/tag/wikimedia-stream/; }, - "homepage": "https://github.com/wikimedia/mediawiki-services-eventstreams;, + "homepage": "https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/services/eventstreams;, "dependencies": { "bluebird": "^3.4.1", "body-parser": "^1.15.2", @@ -42,7 +42,7 @@ "service-runner": "^2.0.4", "swagger-router": "^0.4.6", "lodash": "^4.15.0", -"kafka-sse": "git+https://phabricator.wikimedia.org/diffusion/WKSE/kafkasse.git; +"kafka-sse": "git+https://phabricator.wikimedia.org/diffusion/WKSE/kafkasse.git#v0.0.4; }, "devDependencies": { "extend": "^3.0.0", -- To view, visit https://gerrit.wikimedia.org/r/321782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifdcd0d5e3d199e0749d1c4c6d2dac46e15a36454 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/eventstreams Gerrit-Branch: master Gerrit-Owner: OttomataGerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...eventstreams[master]: Updates to package.json to use tagged kafka-sse
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/321782 Change subject: Updates to package.json to use tagged kafka-sse .. Updates to package.json to use tagged kafka-sse Change-Id: Ifdcd0d5e3d199e0749d1c4c6d2dac46e15a36454 --- M README.md M package.json 2 files changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/eventstreams refs/changes/82/321782/1 diff --git a/README.md b/README.md index 0534980..e2127c2 100644 --- a/README.md +++ b/README.md @@ -49,5 +49,4 @@ ## TODO: -- Use tagged and versioned kafka-sse in package.json - server side filtering diff --git a/package.json b/package.json index b3aefb7..3be0547 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "repository": { "type": "git", -"url": "git://github.com/wikimedia/mediawiki-services-eventstreams.git" +"url": "https://gerrit.wikimedia.org/r/mediawiki/services/eventstreams; }, "keywords": [ "MediaWiki", @@ -28,7 +28,7 @@ "bugs": { "url": "https://phabricator.wikimedia.org/tag/wikimedia-stream/; }, - "homepage": "https://github.com/wikimedia/mediawiki-services-eventstreams;, + "homepage": "https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/services/eventstreams;, "dependencies": { "bluebird": "^3.4.1", "body-parser": "^1.15.2", @@ -42,7 +42,7 @@ "service-runner": "^2.0.4", "swagger-router": "^0.4.6", "lodash": "^4.15.0", -"kafka-sse": "git+https://phabricator.wikimedia.org/diffusion/WKSE/kafkasse.git; +"kafka-sse": "git+https://phabricator.wikimedia.org/diffusion/WKSE/kafkasse.git#v0.0.4; }, "devDependencies": { "extend": "^3.0.0", -- To view, visit https://gerrit.wikimedia.org/r/321782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifdcd0d5e3d199e0749d1c4c6d2dac46e15a36454 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/eventstreams Gerrit-Branch: master Gerrit-Owner: Ottomata___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Keystone: Make the project list public
Andrew Bogott has submitted this change and it was merged. Change subject: Keystone: Make the project list public .. Keystone: Make the project list public This will allow the 'observer' role (which has no explicit rights) to enumerate projects. Bug: T150092 Change-Id: Ica7a4cc14b2ae581fcaa270fb01d93b98565df62 --- M modules/openstack/files/liberty/keystone/policy.json M modules/openstack/files/mitaka/keystone/policy.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack/files/liberty/keystone/policy.json b/modules/openstack/files/liberty/keystone/policy.json index 7d7910a..e0cde3e 100644 --- a/modules/openstack/files/liberty/keystone/policy.json +++ b/modules/openstack/files/liberty/keystone/policy.json @@ -34,7 +34,7 @@ "identity:delete_domain": "rule:admin_required", "identity:get_project": "rule:admin_required", -"identity:list_projects": "rule:admin_required", +"identity:list_projects": "", "identity:list_user_projects": "", "identity:create_project": "rule:admin_required", "identity:update_project": "rule:admin_required", diff --git a/modules/openstack/files/mitaka/keystone/policy.json b/modules/openstack/files/mitaka/keystone/policy.json index 7d7910a..e0cde3e 100644 --- a/modules/openstack/files/mitaka/keystone/policy.json +++ b/modules/openstack/files/mitaka/keystone/policy.json @@ -34,7 +34,7 @@ "identity:delete_domain": "rule:admin_required", "identity:get_project": "rule:admin_required", -"identity:list_projects": "rule:admin_required", +"identity:list_projects": "", "identity:list_user_projects": "", "identity:create_project": "rule:admin_required", "identity:update_project": "rule:admin_required", -- To view, visit https://gerrit.wikimedia.org/r/320826 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ica7a4cc14b2ae581fcaa270fb01d93b98565df62 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Keystone: remove explicit observer rights
Andrew Bogott has submitted this change and it was merged. Change subject: Keystone: remove explicit observer rights .. Keystone: remove explicit observer rights This was never used for anything, and I have a different plan now: The observer will have no explicit rights, and be allowed to only do things that are 100% public. That should make the intent of the observer role clearer. Bug: T150092 Change-Id: Ifdceaad6be9d707c5756077e45751e725becc82c --- M modules/openstack/files/liberty/keystone/policy.json M modules/openstack/files/mitaka/keystone/policy.json 2 files changed, 0 insertions(+), 4 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack/files/liberty/keystone/policy.json b/modules/openstack/files/liberty/keystone/policy.json index 16c5a6f..7d7910a 100644 --- a/modules/openstack/files/liberty/keystone/policy.json +++ b/modules/openstack/files/liberty/keystone/policy.json @@ -1,11 +1,9 @@ { "admin_required": "role:admin or is_admin:1", "service_role": "role:service", -"observer_role": "role:observer", "service_or_admin": "rule:admin_required or rule:service_role", "owner" : "user_id:%(user_id)s", "admin_or_owner": "rule:admin_required or rule:owner", -"admin_or_observer": "rule:admin_required or rule:observer_role", "token_subject": "user_id:%(target.token.user_id)s", "admin_or_token_subject": "rule:admin_required or rule:token_subject", diff --git a/modules/openstack/files/mitaka/keystone/policy.json b/modules/openstack/files/mitaka/keystone/policy.json index 16c5a6f..7d7910a 100644 --- a/modules/openstack/files/mitaka/keystone/policy.json +++ b/modules/openstack/files/mitaka/keystone/policy.json @@ -1,11 +1,9 @@ { "admin_required": "role:admin or is_admin:1", "service_role": "role:service", -"observer_role": "role:observer", "service_or_admin": "rule:admin_required or rule:service_role", "owner" : "user_id:%(user_id)s", "admin_or_owner": "rule:admin_required or rule:owner", -"admin_or_observer": "rule:admin_required or rule:observer_role", "token_subject": "user_id:%(target.token.user_id)s", "admin_or_token_subject": "rule:admin_required or rule:token_subject", -- To view, visit https://gerrit.wikimedia.org/r/320825 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifdceaad6be9d707c5756077e45751e725becc82c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] Special:RC filter: userExpLevel
Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/321744 Change subject: [WIP] Special:RC filter: userExpLevel .. [WIP] Special:RC filter: userExpLevel Allows filtering changes based on user experience level. Supports the following levels: 'newcomer', 'experienced, 'moreexperienced' Will be used by the ERI project. Bug: T149637 Change-Id: Ib2ac92925836ce2f3706d898968538aa18d14d5d --- M includes/specials/SpecialRecentchanges.php M tests/phpunit/includes/specials/SpecialRecentchangesTest.php 2 files changed, 122 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/44/321744/1 diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index cd3299c..d80e24c 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -91,6 +91,8 @@ $opts->add( 'categories_any', false ); $opts->add( 'tagfilter', '' ); + $opts->add( 'userExpLevel', 'all' ); + return $opts; } @@ -239,6 +241,8 @@ $query_options, $opts['tagfilter'] ); + + $this->filterOnUserExperienceLevel( $tables, $fields, $conds, $query_options, $join_conds, $opts ); if ( !$this->runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts ) @@ -802,4 +806,35 @@ return 60 * 5; } + protected function filterOnUserExperienceLevel( &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts ) { + $now = time(); + $days = 86400; + $newcomerCutoff = $now - 4 * $days; + $newcomerEdits = 10; + $moreExperiencedCutoff = $now - 30 * $days; + $moreExperiencedEdits = 500; + + if ( $opts['userExpLevel'] !== 'all' && !$opts['hideliu'] ) { + $tables[] = 'user'; + $join_conds['user'] = [ 'LEFT JOIN', 'rc_user = user_id' ]; + + $userConds = []; + $selectedExpLevels = explode( ',', strtolower( $opts['userExpLevel'] ) ); + + if ( array_search( 'newcomer', $selectedExpLevels ) !== false ) { + $userConds[] = $this->getDB()->makeList( + [ + 'user_editcount < ' . $newcomerEdits, + 'user_registration > ' . $this->getDB()->timestamp( $newcomerCutoff ), + ], + IDatabase::LIST_AND + ); + } + + $conds[] = $this->getDB()->makeList( $userConds, IDatabase::LIST_OR ); + + return $conds; + } + } + } diff --git a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php index cc16e5f..08cdf51 100644 --- a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php +++ b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php @@ -129,4 +129,91 @@ [ NS_TALK, NS_MAIN ], ]; } + + public function testFilterUserExpLevel() { + $this->createUsers( [ + 'Newcomer1' => [ 'edits' => 2, 'days' => 2 ], + 'Newcomer2' => [ 'edits' => 12, 'days' => 3 ], + 'Newcomer3' => [ 'edits' => 8, 'days' => 5 ], + 'Experienced1' => [ 'edits' => 15, 'days' => 10 ], + 'Experienced2' => [ 'edits' => 450, 'days' => 20 ], + 'Experienced3' => [ 'edits' => 460, 'days' => 33 ], + 'Experienced4' => [ 'edits' => 525, 'days' => 28 ], + 'MoreExperienced1' => [ 'edits' => 538, 'days' => 33 ], + ] ); + + // newcomers only + $this->assertArrayEquals( + [ 'Newcomer1', 'Newcomer2', 'Newcomer3' ], + $this->fetchUsers( [ 'userExpLevel' => 'newcomer', 'hideliu' => 0 ] ) + ); + + // newcomers and experienced + $this->assertArrayEquals( + [ 'Newcomer1', 'Newcomer2', 'Newcomer3', 'Experienced1', 'Experienced2', 'Experienced3', 'Experienced4' ], + $this->fetchUsers( [ 'userExpLevel' => 'newcomer,experienced', 'hideliu' => 0 ] ) + ); + + // newcomers and more experienced + $this->assertArrayEquals( + [ 'Newcomer1', 'Newcomer2', 'Newcomer3',
[MediaWiki-commits] [Gerrit] labs...wikibugs2[master]: Fix tox-jessie
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/321743 Change subject: Fix tox-jessie .. Fix tox-jessie Change-Id: I01e3e1c8eebed12f6715cb0764161dc48d010d3b --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 refs/changes/43/321743/1 -- To view, visit https://gerrit.wikimedia.org/r/321743 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01e3e1c8eebed12f6715cb0764161dc48d010d3b Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikibugs2 Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...wikibugs2[master]: Wikibugs: Update irc3 to 0.8.9
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/321742 Change subject: Wikibugs: Update irc3 to 0.8.9 .. Wikibugs: Update irc3 to 0.8.9 Change-Id: Ibe96b4495fc4a2e1a364b566ace4c8a1beffe0f6 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 refs/changes/42/321742/1 -- To view, visit https://gerrit.wikimedia.org/r/321742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe96b4495fc4a2e1a364b566ace4c8a1beffe0f6 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikibugs2 Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add partman entries for restbase201[0-2] Bug:T150680
Dzahn has submitted this change and it was merged. Change subject: Add partman entries for restbase201[0-2] Bug:T150680 .. Add partman entries for restbase201[0-2] Bug:T150680 Change-Id: If76bde70ad8bd79d075127a87373223e94c20e9a --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index 0992889..df333a4 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -137,6 +137,7 @@ restbase-test2*) echo partman/cassandrahosts-2ssd.cfg ;; \ restbase200[1-6]) echo partman/cassandrahosts-5ssd.cfg ;; \ restbase200[7-9]) echo partman/cassandrahosts-4ssd.cfg ;; \ +restbase201[0-2]) echo partman/cassandrahosts-4ssd.cfg ;; \ rhenium) echo partman/raid1-gpt.cfg ;; \ sarin) echo partman/raid1-lvm-ext4-srv.cfg ;; \ analytics1003|scb200[1-4]|sinistra|cobalt) echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/321706 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If76bde70ad8bd79d075127a87373223e94c20e9a Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: PapaulGerrit-Reviewer: Dzahn Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mapdata[master]: Convert tabs to spaces according to the project
jenkins-bot has submitted this change and it was merged. Change subject: Convert tabs to spaces according to the project .. Convert tabs to spaces according to the project Change-Id: I35d78c00e87aa2213e52ccc1a6a91b36662804eb --- M .eslintrc.json 1 file changed, 10 insertions(+), 10 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/.eslintrc.json b/.eslintrc.json index 858a3d4..0f73bdd 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,15 +1,15 @@ { - "extends": "wikimedia", - "env": { - "browser": true - }, - "globals": { + "extends": "wikimedia", + "env": { +"browser": true + }, + "globals": { "module": false, "require": false - }, - "rules": { - "dot-notation": 0, + }, + "rules": { +"dot-notation": 0, "indent": [ "error", 2, { "SwitchCase": 1, "VariableDeclarator": 2 } ], - "wrap-iife": 0 - } +"wrap-iife": 0 + } } -- To view, visit https://gerrit.wikimedia.org/r/321734 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35d78c00e87aa2213e52ccc1a6a91b36662804eb Gerrit-PatchSet: 1 Gerrit-Project: mapdata Gerrit-Branch: master Gerrit-Owner: JGiraultGerrit-Reviewer: MaxSem Gerrit-Reviewer: Yurik Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mapdata[master]: eslint: Re-enable wrap-iife and partially enable dot-notation
JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/321739 Change subject: eslint: Re-enable wrap-iife and partially enable dot-notation .. eslint: Re-enable wrap-iife and partially enable dot-notation Change-Id: I2ec8cfe60a3d6d886dcb8d813bd2c05d947b840f --- M .eslintrc.json 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mapdata refs/changes/39/321739/1 diff --git a/.eslintrc.json b/.eslintrc.json index 0f73bdd..1a82843 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,8 +8,7 @@ "require": false }, "rules": { -"dot-notation": 0, -"indent": [ "error", 2, { "SwitchCase": 1, "VariableDeclarator": 2 } ], -"wrap-iife": 0 +"dot-notation": [ "error", { "allowKeywords": true } ], +"indent": [ "error", 2, { "SwitchCase": 1, "VariableDeclarator": 2 } ] } } -- To view, visit https://gerrit.wikimedia.org/r/321739 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ec8cfe60a3d6d886dcb8d813bd2c05d947b840f Gerrit-PatchSet: 1 Gerrit-Project: mapdata Gerrit-Branch: master Gerrit-Owner: JGirault___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: prometheus-mysql-exporter: Add new labs (sanitarium) host db...
Jcrespo has submitted this change and it was merged. Change subject: prometheus-mysql-exporter: Add new labs (sanitarium) host db1095 .. prometheus-mysql-exporter: Add new labs (sanitarium) host db1095 Bug: T150802 Change-Id: I14f0384565b198df80e5ae9c78f487d0b2318c92 --- M modules/role/files/prometheus/mysql-labs_eqiad.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jcrespo: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/role/files/prometheus/mysql-labs_eqiad.yaml b/modules/role/files/prometheus/mysql-labs_eqiad.yaml index 958c550..5cdd1cf 100644 --- a/modules/role/files/prometheus/mysql-labs_eqiad.yaml +++ b/modules/role/files/prometheus/mysql-labs_eqiad.yaml @@ -3,6 +3,7 @@ role: slave targets: - db1069:9104 + - db1095:9104 - labsdb1001:9104 - labsdb1003:9104 - labsdb1008:9104 -- To view, visit https://gerrit.wikimedia.org/r/321735 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I14f0384565b198df80e5ae9c78f487d0b2318c92 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: JcrespoGerrit-Reviewer: Jcrespo Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Make two-factor messages use consistent wording
MarcoAurelio has uploaded a new change for review. https://gerrit.wikimedia.org/r/321738 Change subject: Make two-factor messages use consistent wording .. Make two-factor messages use consistent wording Bug: T150597 Change-Id: I0fed5a9b3fd747b6f2f71834c0bfe9dc88bbefb8 --- M i18n/en.json 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OATHAuth refs/changes/38/321738/1 diff --git a/i18n/en.json b/i18n/en.json index 1551bca..3f162ec 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -8,13 +8,13 @@ "oathauth-desc": "Provides authentication support using HMAC based one-time passwords", "oath": "OATHAuth", "specialpages-group-oath": "Two-factor authentication", - "oathauth-account": "Two-factor account name:", + "oathauth-account": "Two-factor authentication account name:", "oathauth-legend": "Verify your credentials", - "oathauth-secret": "Two-factor secret key:", + "oathauth-secret": "Two-factor authentication secret key:", "oathauth-enable": "Enable two-factor authentication", "oathauth-failedtoenableoauth": "Failed to enable two-factor authentication.", "oathauth-alreadyenabled": "Two-factor authentication is already enabled.", - "oathauth-verify": "Verify two-factor token", + "oathauth-verify": "Verify two-factor authentication token", "openstackmanager-scratchtokens": "The following list is a list of one-time use scratch tokens. These tokens can only be used once, and are for emergency use. Please write these down and keep them in a secure location. If you lose your phone, these tokens are the only way to rescue your account. These tokens will never be shown again.", "oathauth-reset": "Reset two-factor credentials", "oathauth-donotdeleteoldsecret": "Please do not delete your old credentials until you have validated your new credentials.", @@ -32,7 +32,7 @@ "oathauth-disabledoath": "Disabled two-factor authentication.", "oathauth-failedtodisableoauth": "Failed to disable two-factor authentication.", "oathauth-reattemptdisable": "Reattempt disabling of two-factor authentication.", - "oathauth-failedtoresetoath": "Failed to reset two-factor credentials.", + "oathauth-failedtoresetoath": "Failed to reset two-factor authentication credentials.", "oathauth-notloggedin": "Login required", "oathauth-mustbeloggedin": "You must be logged in to perform this action.", "oathauth-prefs-label": "Two-factor authentication:", -- To view, visit https://gerrit.wikimedia.org/r/321738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0fed5a9b3fd747b6f2f71834c0bfe9dc88bbefb8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OATHAuth Gerrit-Branch: master Gerrit-Owner: MarcoAurelio___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: e3f2972d7fe7
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/321737 Change subject: e3f2972d7fe7 .. e3f2972d7fe7 Change-Id: I177bb1826069b059c37846146da5b1e46fe7317b --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms refs/changes/37/321737/1 -- To view, visit https://gerrit.wikimedia.org/r/321737 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I177bb1826069b059c37846146da5b1e46fe7317b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add new labs (sanitarium) host db1095
Jcrespo has uploaded a new change for review. https://gerrit.wikimedia.org/r/321735 Change subject: Add new labs (sanitarium) host db1095 .. Add new labs (sanitarium) host db1095 Bug: T150802 Change-Id: I14f0384565b198df80e5ae9c78f487d0b2318c92 --- M modules/role/files/prometheus/mysql-labs_eqiad.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/35/321735/1 diff --git a/modules/role/files/prometheus/mysql-labs_eqiad.yaml b/modules/role/files/prometheus/mysql-labs_eqiad.yaml index 958c550..5cdd1cf 100644 --- a/modules/role/files/prometheus/mysql-labs_eqiad.yaml +++ b/modules/role/files/prometheus/mysql-labs_eqiad.yaml @@ -3,6 +3,7 @@ role: slave targets: - db1069:9104 + - db1095:9104 - labsdb1001:9104 - labsdb1003:9104 - labsdb1008:9104 -- To view, visit https://gerrit.wikimedia.org/r/321735 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I14f0384565b198df80e5ae9c78f487d0b2318c92 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Group0 to 1.29.0-wmf.3
jenkins-bot has submitted this change and it was merged. Change subject: Group0 to 1.29.0-wmf.3 .. Group0 to 1.29.0-wmf.3 Change-Id: I25861859de4579265209ed18d687ac21cfeedb7e --- M wikiversions.json 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/wikiversions.json b/wikiversions.json index dc190e2..b766b89 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -479,7 +479,7 @@ "maiwiki": "php-1.29.0-wmf.2", "map_bmswiki": "php-1.29.0-wmf.2", "mdfwiki": "php-1.29.0-wmf.2", -"mediawikiwiki": "php-1.29.0-wmf.2", +"mediawikiwiki": "php-1.29.0-wmf.3", "metawiki": "php-1.29.0-wmf.2", "mgwiki": "php-1.29.0-wmf.2", "mgwikibooks": "php-1.29.0-wmf.2", @@ -749,9 +749,9 @@ "tawiktionary": "php-1.29.0-wmf.2", "tcywiki": "php-1.29.0-wmf.2", "tenwiki": "php-1.29.0-wmf.2", -"test2wiki": "php-1.29.0-wmf.2", -"testwiki": "php-1.29.0-wmf.2", -"testwikidatawiki": "php-1.29.0-wmf.2", +"test2wiki": "php-1.29.0-wmf.3", +"testwiki": "php-1.29.0-wmf.3", +"testwikidatawiki": "php-1.29.0-wmf.3", "tetwiki": "php-1.29.0-wmf.2", "tewiki": "php-1.29.0-wmf.2", "tewikibooks": "php-1.29.0-wmf.2", @@ -881,7 +881,7 @@ "zawikiquote": "php-1.29.0-wmf.2", "zawiktionary": "php-1.29.0-wmf.2", "zeawiki": "php-1.29.0-wmf.2", -"zerowiki": "php-1.29.0-wmf.2", +"zerowiki": "php-1.29.0-wmf.3", "zh_classicalwiki": "php-1.29.0-wmf.2", "zh_min_nanwiki": "php-1.29.0-wmf.2", "zh_min_nanwikibooks": "php-1.29.0-wmf.2", -- To view, visit https://gerrit.wikimedia.org/r/321722 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25861859de4579265209ed18d687ac21cfeedb7e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ThciprianiGerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Keystone: Limit password auth to certain hosts and users.
Andrew Bogott has submitted this change and it was merged. Change subject: Keystone: Limit password auth to certain hosts and users. .. Keystone: Limit password auth to certain hosts and users. Bug: T150092 Change-Id: Ib5db956e973124793ac9431f74be9d6fc2e7da2e --- A modules/openstack/files/liberty/keystone/password_whitelist.py M modules/openstack/manifests/keystone/service.pp M modules/openstack/templates/liberty/keystone/keystone.conf.erb 3 files changed, 92 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack/files/liberty/keystone/password_whitelist.py b/modules/openstack/files/liberty/keystone/password_whitelist.py new file mode 100644 index 000..efc685a --- /dev/null +++ b/modules/openstack/files/liberty/keystone/password_whitelist.py @@ -0,0 +1,72 @@ +# Copyright 2016 Andrew Bogott for the Wikimedia Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from netaddr import IPNetwork, IPAddress + +from oslo_log import log +from oslo_config import cfg + +from keystone.auth import plugins as auth_plugins +from keystone.auth.plugins import password +from keystone import exception +from keystone.i18n import _ + +METHOD_NAME = 'password' + +LOG = log.getLogger(__name__) + +whitelist_ops = [ +cfg.MultiStrOpt('password_whitelist', +default=[], +help='user:ip range permitted to use password auth.' + 'also supports a simple one-character * wildcard' + 'for user.'), +] + +CONF = cfg.CONF +CONF.register_opts(whitelist_ops, group='auth') + + +def check_whitelist(user_id, remote_addr): +"""Return True if the user_id/remote_addr is in our whitelist. + Otherwise, return raise Unauthorized""" +LOG.debug("Auth request for user %s from %s" % (user_id, +remote_addr)) + +for entry in CONF.auth.password_whitelist: +user, subnet = entry.split(':', 1) +if user == "*" or user_id == user: +if IPAddress(remote_addr) in IPNetwork(subnet): +return True + +LOG.warn('Password auth not allowed for %s from %s' % (user_id, + remote_addr)) + +msg = _('Password auth not allowed for this username from this ip.') +raise exception.Unauthorized(msg) + + +class PasswordWhitelist(password.Password): + +def authenticate(self, context, auth_payload, auth_context): +"""Verify username and password but only allow access for configured + accounts and from configured IP ranges.""" + +user_info = auth_plugins.UserAuthInfo.create(auth_payload, METHOD_NAME) +check_whitelist(user_info.user_id, +context['environment']['REMOTE_ADDR']) + +return super(PasswordWhitelist, self).authenticate(context, + auth_payload, + auth_context) diff --git a/modules/openstack/manifests/keystone/service.pp b/modules/openstack/manifests/keystone/service.pp index b46d2b9..b7ed76c 100644 --- a/modules/openstack/manifests/keystone/service.pp +++ b/modules/openstack/manifests/keystone/service.pp @@ -21,6 +21,10 @@ } } +include network::constants +$prod_networks = $network::constants::production_networks +$labs_networks = $network::constants::labs_networks + file { '/etc/keystone/keystone.conf': content => template("openstack/${openstack_version}/keystone/keystone.conf.erb"), @@ -41,6 +45,12 @@ owner => 'root', group => 'root', require => Package['keystone']; + '/usr/lib/python2.7/dist-packages/keystone/auth/plugins/password_whitelist.py': +source => "puppet:///modules/openstack/${openstack_version}/keystone/password_whitelist.py", +mode=> '0644', +owner => 'root', +group => 'root', +require => Package['keystone']; } if $::fqdn == hiera('labs_nova_controller') { diff --git a/modules/openstack/templates/liberty/keystone/keystone.conf.erb b/modules/openstack/templates/liberty/keystone/keystone.conf.erb index 59956e0..71e79be 100644 ---
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove more ancient unreferenced fundraising cruft
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/321733 Change subject: Remove more ancient unreferenced fundraising cruft .. Remove more ancient unreferenced fundraising cruft Change-Id: Iecc0f3b4d70ecbe388c19b07061eaf8d9fadbce1 --- D docroot/foundation/funddrive/fundgraph.php D docroot/foundation/funddrive/index.php D docroot/foundation/funddrive/report.php D docroot/foundation/funddrive/reportConfig.php D docroot/foundation/tracker/bannerImpression.php 5 files changed, 0 insertions(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/33/321733/1 diff --git a/docroot/foundation/funddrive/fundgraph.php b/docroot/foundation/funddrive/fundgraph.php deleted file mode 100644 index f400611..000 --- a/docroot/foundation/funddrive/fundgraph.php +++ /dev/null @@ -1,3 +0,0 @@ -http://fundraising.wikimedia.org/' ); -?> diff --git a/docroot/foundation/funddrive/index.php b/docroot/foundation/funddrive/index.php deleted file mode 100644 index f400611..000 --- a/docroot/foundation/funddrive/index.php +++ /dev/null @@ -1,3 +0,0 @@ -http://fundraising.wikimedia.org/' ); -?> diff --git a/docroot/foundation/funddrive/report.php b/docroot/foundation/funddrive/report.php deleted file mode 100644 index f400611..000 --- a/docroot/foundation/funddrive/report.php +++ /dev/null @@ -1,3 +0,0 @@ -http://fundraising.wikimedia.org/' ); -?> diff --git a/docroot/foundation/funddrive/reportConfig.php b/docroot/foundation/funddrive/reportConfig.php deleted file mode 100644 index f400611..000 --- a/docroot/foundation/funddrive/reportConfig.php +++ /dev/null @@ -1,3 +0,0 @@ -http://fundraising.wikimedia.org/' ); -?> diff --git a/docroot/foundation/tracker/bannerImpression.php b/docroot/foundation/tracker/bannerImpression.php deleted file mode 100644 index dce6902..000 --- a/docroot/foundation/tracker/bannerImpression.php +++ /dev/null @@ -1,24 +0,0 @@ - - -- To view, visit https://gerrit.wikimedia.org/r/321733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecc0f3b4d70ecbe388c19b07061eaf8d9fadbce1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix typo in #getDateFromExif
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/321731 Change subject: Fix typo in #getDateFromExif .. Fix typo in #getDateFromExif Actually use fileStr instead of fileReader.result directly. Change-Id: I470799c65c06e191c8ca81aee2f286676be1c8f9 --- M resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/321731/1 diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js index 844d74c..741771a 100644 --- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js +++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js @@ -395,7 +395,7 @@ } try { - metadata = mw.libs.jpegmeta( this.result, file.name ); + metadata = mw.libs.jpegmeta( fileStr, file.name ); } catch ( e ) { metadata = null; } -- To view, visit https://gerrit.wikimedia.org/r/321731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I470799c65c06e191c8ca81aee2f286676be1c8f9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add --record and --replay options to parse.js
jenkins-bot has submitted this change and it was merged. Change subject: Add --record and --replay options to parse.js .. Add --record and --replay options to parse.js * --record will record http requests in nocks/$prefix/$title.js * --replay will look for the nock file there and use it to replay http requests * Useful for performance testing by eliminating network latencies and freezing wikitext, templates, etc. Change-Id: Iabe2860d7e2070e0daf3e5ce442d21d55a8f5590 --- M .gitignore M bin/parse.js M npm-shrinkwrap.json M package.json 4 files changed, 97 insertions(+), 0 deletions(-) Approvals: Arlolra: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 42090f4..e103d22 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ coverage/ contrib/ extensions/ +nocks/ diff --git a/bin/parse.js b/bin/parse.js index ac81cb9..a735d3f 100755 --- a/bin/parse.js +++ b/bin/parse.js @@ -148,6 +148,16 @@ 'boolean': true, 'default': false, }, + 'record': { + description: 'Record http requests for later replay', + 'boolean': true, + 'default': false, + }, + 'replay': { + description: 'Replay recorded http requests for later replay', + 'boolean': true, + 'default': false, + }, 'useBatchAPI': { description: 'Turn on/off the API batching system', // Since I picked a null default (to let the default config setting be the default), @@ -385,12 +395,51 @@ parsoidConfig.defaultWiki = prefix ? prefix : parsoidConfig.reverseMwApiMap.get(domain); + var nock, dir, nocksFile; + if (argv.record || argv.replay) { + prefix = prefix || 'enwiki'; + dir = path.resolve(__dirname, '../nocks/'); + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir); + } + dir = dir + '/' + prefix; + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir); + } + nocksFile = dir + '/' + argv.page + '.js'; + } + + if (argv.record) { + nock = require('nock'); + nock.recorder.rec({dont_print: true}); + } else if (argv.replay) { + try { + require(nocksFile); + } catch (e) { + console.error('Exception ' + e + ' requiring ' + nocksFile); + console.error('Cannot replay!'); + return -1; + } + } + return parse(null, argv, parsoidConfig, prefix, domain).then(function(res) { var stdout = process.stdout; stdout.write(res.out); if (res.trailingNL && stdout.isTTY) { stdout.write('\n'); } + + if (argv.record) { + var nockCalls = nock.recorder.play(); + var stream = fs.createWriteStream(nocksFile); + stream.once('open', function() { + stream.write("var nock = require('nock');"); + for (var i = 0; i < nockCalls.length; i++) { + stream.write(nockCalls[i]); + } + stream.end(); + }); + } }).done(); }()); } diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 22feda4..830931e 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2260,6 +2260,52 @@ "from": "negotiator@git+https://github.com/arlolra/negotiator.git#0418ab4e9a665772b7e233564a4525c9d9a8ec3a;, "resolved": "git+https://github.com/arlolra/negotiator.git#0418ab4e9a665772b7e233564a4525c9d9a8ec3a; }, +"nock": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/nock/-/nock-8.0.0.tgz;, + "dependencies": { +"debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz;, + "dependencies": { +"ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz; +} + } +}, +"deep-equal": { + "version": "1.0.1", + "resolved":
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Kill skins-1.5
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/321730 Change subject: Kill skins-1.5 .. Kill skins-1.5 Ancient, unused. Only thing referencing it is bits, which is already dead and just needs cleanup Change-Id: Ib2c1443c2978d90e08bafa22a90fa5cb47efcaf6 --- D w/skins-1.5 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/30/321730/1 diff --git a/w/skins-1.5 b/w/skins-1.5 deleted file mode 12 index f36bdb6..000 --- a/w/skins-1.5 +++ /dev/null @@ -1 +0,0 @@ -/srv/mediawiki/php/skins \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/321730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2c1443c2978d90e08bafa22a90fa5cb47efcaf6 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[REL1_28]: Don't require write access for Special:CiteThisPage
jenkins-bot has submitted this change and it was merged. Change subject: Don't require write access for Special:CiteThisPage .. Don't require write access for Special:CiteThisPage If the database is locked/read-only, this page will still function. Change-Id: I4f942a173a8a319218f755f27d8b2a3c60ca54d0 (cherry picked from commit 2c65135c62a5924d114f0d2101a963bdf7dc6ba9) --- M SpecialCiteThisPage.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php index 4b81aa0..ada2f3b 100644 --- a/SpecialCiteThisPage.php +++ b/SpecialCiteThisPage.php @@ -203,4 +203,8 @@ public function requiresUnblock() { return false; } + + public function requiresWrite() { + return false; + } } -- To view, visit https://gerrit.wikimedia.org/r/321729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4f942a173a8a319218f755f27d8b2a3c60ca54d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CiteThisPage Gerrit-Branch: REL1_28 Gerrit-Owner: LegoktmGerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: linter: Add test for self-closed-tag inside a template
jenkins-bot has submitted this change and it was merged. Change subject: linter: Add test for self-closed-tag inside a template .. linter: Add test for self-closed-tag inside a template Change-Id: Ifcc6b14a0ff2296e8a7873f3664b0cb210ed68d3 --- M tests/mocha/lintertest.js 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/mocha/lintertest.js b/tests/mocha/lintertest.js index 271aa42..9ff1e83 100644 --- a/tests/mocha/lintertest.js +++ b/tests/mocha/lintertest.js @@ -198,5 +198,17 @@ result[1].params.should.have.a.property("name", "span"); }); }); + it('should lint self-closing tags in a template correctly', function() { + return parseWT('{{1x|}}').then(function(result) { + result.should.have.length(1); + result[0].should.have.a.property("type", "self-closed-tag"); + result[0].dsr.should.include.members([ 0, 12, null, null ]); + result[0].should.have.a.property("src", "{{1x|}}"); + result[0].should.have.a.property("params"); + result[0].params.should.have.a.property("name", "b"); + result[0].should.have.a.property("templateInfo"); + result[0].templateInfo.should.have.a.property("name", "1x"); + }); + }); }); }); -- To view, visit https://gerrit.wikimedia.org/r/321720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifcc6b14a0ff2296e8a7873f3664b0cb210ed68d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[REL1_28]: Don't require write access for Special:CiteThisPage
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/321729 Change subject: Don't require write access for Special:CiteThisPage .. Don't require write access for Special:CiteThisPage If the database is locked/read-only, this page will still function. Change-Id: I4f942a173a8a319218f755f27d8b2a3c60ca54d0 (cherry picked from commit 2c65135c62a5924d114f0d2101a963bdf7dc6ba9) --- M SpecialCiteThisPage.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CiteThisPage refs/changes/29/321729/1 diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php index 4b81aa0..ada2f3b 100644 --- a/SpecialCiteThisPage.php +++ b/SpecialCiteThisPage.php @@ -203,4 +203,8 @@ public function requiresUnblock() { return false; } + + public function requiresWrite() { + return false; + } } -- To view, visit https://gerrit.wikimedia.org/r/321729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4f942a173a8a319218f755f27d8b2a3c60ca54d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CiteThisPage Gerrit-Branch: REL1_28 Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Re-enable AbuseFilterCachingParser everywhere
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/321728 Change subject: Re-enable AbuseFilterCachingParser everywhere .. Re-enable AbuseFilterCachingParser everywhere With T148673 fixed, I think we can enable this again. Change-Id: I968050af3f751ee6d03cbc2dcc04954a8e0718b0 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/28/321728/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 32180eb..d8d4ae0 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12258,11 +12258,7 @@ ], 'wgAbuseFilterParserClass' => [ - 'default' => 'AbuseFilterParser', - 'mediawikiwiki' => 'AbuseFilterCachingParser', - 'metawiki' => 'AbuseFilterCachingParser', - 'commonswiki' => 'AbuseFilterCachingParser', - 'testwiki' => 'AbuseFilterCachingParser', + 'default' => 'AbuseFilterCachingParser', ], # @} -- To view, visit https://gerrit.wikimedia.org/r/321728 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I968050af3f751ee6d03cbc2dcc04954a8e0718b0 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: throttle.py: Make sure openned files are closed properly
Dalba has uploaded a new change for review. https://gerrit.wikimedia.org/r/321727 Change subject: throttle.py: Make sure openned files are closed properly .. throttle.py: Make sure openned files are closed properly Bug: T124725 unclosed and python raised ResourceWarning upon exit. Change-Id: I6af4adae0e731cbcc8ff0c002b7d188f4e874520 --- M pywikibot/throttle.py 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/27/321727/1 diff --git a/pywikibot/throttle.py b/pywikibot/throttle.py index d125df1..9a38e46 100644 --- a/pywikibot/throttle.py +++ b/pywikibot/throttle.py @@ -204,12 +204,13 @@ self.checktime = 0 processes = [] try: -f = open(self.ctrlfilename, 'r') +with open(self.ctrlfilename, 'r') as f: +lines = f.readlines() except IOError: return else: now = time.time() -for line in f.readlines(): +for line in lines: try: line = line.split(' ') this_pid = int(line[0]) @@ -225,12 +226,11 @@ 'site': this_site}) processes.sort(key=lambda p: p['pid']) try: -f = open(self.ctrlfilename, 'w') -for p in processes: -f.write("%(pid)s %(time)s %(site)s\n" % p) +with open(self.ctrlfilename, 'w') as f: +for p in processes: +f.write("%(pid)s %(time)s %(site)s\n" % p) except IOError: return -f.close() def wait(self, seconds): """Wait for seconds seconds. -- To view, visit https://gerrit.wikimedia.org/r/321727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6af4adae0e731cbcc8ff0c002b7d188f4e874520 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Dalba___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Standardize most of the docroots
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/321726 Change subject: Standardize most of the docroots .. Standardize most of the docroots Only ones that have custom files and aren't standard are: - Usability should be folded into wikimedia.org, will do via puppet and later remove from here - Bits is going away in I935c4c5d - Secure, search and noc are weird one offs - foundation, mediawiki, wikimedia.org, wikipedia.org all have custom content that they're serving. This should be audited and possibly cleaned up Change-Id: I351e60c7a2bed8600500142ea52c544f13474955 --- A docroot/commons R docroot/standard-docroot/503.html R docroot/standard-docroot/images R docroot/standard-docroot/static R docroot/standard-docroot/w A docroot/wikibooks.org D docroot/wikibooks.org/503.html D docroot/wikibooks.org/images D docroot/wikibooks.org/static D docroot/wikibooks.org/w A docroot/wikidata D docroot/wikidata/503.html D docroot/wikidata/images D docroot/wikidata/static D docroot/wikidata/w A docroot/wikinews.org D docroot/wikinews.org/503.html D docroot/wikinews.org/images D docroot/wikinews.org/static D docroot/wikinews.org/w A docroot/wikiquote.org D docroot/wikiquote.org/503.html D docroot/wikiquote.org/images D docroot/wikiquote.org/static D docroot/wikiquote.org/w A docroot/wikisource.org D docroot/wikisource.org/503.html D docroot/wikisource.org/images D docroot/wikisource.org/static D docroot/wikisource.org/w A docroot/wikiversity.org D docroot/wikiversity.org/503.html D docroot/wikiversity.org/images D docroot/wikiversity.org/static D docroot/wikiversity.org/w A docroot/wikivoyage.org D docroot/wikivoyage.org/503.html D docroot/wikivoyage.org/images D docroot/wikivoyage.org/static D docroot/wikivoyage.org/w A docroot/wiktionary.org D docroot/wiktionary.org/503.html D docroot/wiktionary.org/images D docroot/wiktionary.org/static D docroot/wiktionary.org/w 45 files changed, 9 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/26/321726/1 diff --git a/docroot/commons b/docroot/commons new file mode 12 index 000..e970be9 --- /dev/null +++ b/docroot/commons @@ -0,0 +1 @@ +standard-docroot \ No newline at end of file diff --git a/docroot/commons/503.html b/docroot/standard-docroot/503.html similarity index 100% rename from docroot/commons/503.html rename to docroot/standard-docroot/503.html diff --git a/docroot/commons/images b/docroot/standard-docroot/images similarity index 100% rename from docroot/commons/images rename to docroot/standard-docroot/images diff --git a/docroot/commons/static b/docroot/standard-docroot/static similarity index 100% rename from docroot/commons/static rename to docroot/standard-docroot/static diff --git a/docroot/commons/w b/docroot/standard-docroot/w similarity index 100% rename from docroot/commons/w rename to docroot/standard-docroot/w diff --git a/docroot/wikibooks.org b/docroot/wikibooks.org new file mode 12 index 000..e970be9 --- /dev/null +++ b/docroot/wikibooks.org @@ -0,0 +1 @@ +standard-docroot \ No newline at end of file diff --git a/docroot/wikibooks.org/503.html b/docroot/wikibooks.org/503.html deleted file mode 12 index 8a0c3a2..000 --- a/docroot/wikibooks.org/503.html +++ /dev/null @@ -1 +0,0 @@ -../../errorpages/503.html \ No newline at end of file diff --git a/docroot/wikibooks.org/images b/docroot/wikibooks.org/images deleted file mode 12 index 2a1f364..000 --- a/docroot/wikibooks.org/images +++ /dev/null @@ -1 +0,0 @@ -/srv/mediawiki/images \ No newline at end of file diff --git a/docroot/wikibooks.org/static b/docroot/wikibooks.org/static deleted file mode 12 index de3aae3..000 --- a/docroot/wikibooks.org/static +++ /dev/null @@ -1 +0,0 @@ -/srv/mediawiki/static \ No newline at end of file diff --git a/docroot/wikibooks.org/w b/docroot/wikibooks.org/w deleted file mode 12 index 65de7be..000 --- a/docroot/wikibooks.org/w +++ /dev/null @@ -1 +0,0 @@ -/srv/mediawiki/w \ No newline at end of file diff --git a/docroot/wikidata b/docroot/wikidata new file mode 12 index 000..e970be9 --- /dev/null +++ b/docroot/wikidata @@ -0,0 +1 @@ +standard-docroot \ No newline at end of file diff --git a/docroot/wikidata/503.html b/docroot/wikidata/503.html deleted file mode 12 index 8a0c3a2..000 --- a/docroot/wikidata/503.html +++ /dev/null @@ -1 +0,0 @@ -../../errorpages/503.html \ No newline at end of file diff --git a/docroot/wikidata/images b/docroot/wikidata/images deleted file mode 12 index 2a1f364..000 --- a/docroot/wikidata/images +++ /dev/null @@ -1 +0,0 @@ -/srv/mediawiki/images \ No newline at end of file diff --git a/docroot/wikidata/static b/docroot/wikidata/static deleted file mode 12 index de3aae3..000 --- a/docroot/wikidata/static +++ /dev/null @@ -1 +0,0 @@ -/srv/mediawiki/static \ No newline at end of file diff --git
[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[REL1_28]: Allow blocked users to use Special:CiteThisPage
jenkins-bot has submitted this change and it was merged. Change subject: Allow blocked users to use Special:CiteThisPage .. Allow blocked users to use Special:CiteThisPage Bug: T150791 Change-Id: Ie9c2e54e47f387a03e2490edaf5052826dafc4ce (cherry picked from commit 5eb4059dc9e5d11b5fae21ab7e2e5a740789eb36) --- M SpecialCiteThisPage.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php index fe70167..4b81aa0 100644 --- a/SpecialCiteThisPage.php +++ b/SpecialCiteThisPage.php @@ -199,4 +199,8 @@ protected function getDisplayFormat() { return 'ooui'; } + + public function requiresUnblock() { + return false; + } } -- To view, visit https://gerrit.wikimedia.org/r/321723 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9c2e54e47f387a03e2490edaf5052826dafc4ce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CiteThisPage Gerrit-Branch: REL1_28 Gerrit-Owner: LegoktmGerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add parser test for "Piped link with empty link text"
jenkins-bot has submitted this change and it was merged. Change subject: Add parser test for "Piped link with empty link text" .. Add parser test for "Piped link with empty link text" Change-Id: Iea2bcf3d3ff618973d2300fef702fa0667db3c93 --- M tests/parser/parserTests.txt 1 file changed, 17 insertions(+), 0 deletions(-) Approvals: Arlolra: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 9fe3029..5b17eac 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -7441,6 +7441,23 @@ !! end !! test +Piped link with empty link text +!! wikitext +[[Main Page|]] - empty nowiki +[[Main Page| ]] - empty space +[[Main Page|]] - empty non breaking space +!! html/php + - empty nowiki + - empty space + - empty non breaking space + +!! html/parsoid + - empty nowiki + - empty space + - empty non breaking space +!! end + +!! test Broken link !! wikitext [[Zigzagzogzagzig]] -- To view, visit https://gerrit.wikimedia.org/r/296064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea2bcf3d3ff618973d2300fef702fa0667db3c93 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[master]: Don't require write access for Special:CiteThisPage
jenkins-bot has submitted this change and it was merged. Change subject: Don't require write access for Special:CiteThisPage .. Don't require write access for Special:CiteThisPage If the database is locked/read-only, this page will still function. Change-Id: I4f942a173a8a319218f755f27d8b2a3c60ca54d0 --- M SpecialCiteThisPage.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php index 4b81aa0..ada2f3b 100644 --- a/SpecialCiteThisPage.php +++ b/SpecialCiteThisPage.php @@ -203,4 +203,8 @@ public function requiresUnblock() { return false; } + + public function requiresWrite() { + return false; + } } -- To view, visit https://gerrit.wikimedia.org/r/321716 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4f942a173a8a319218f755f27d8b2a3c60ca54d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CiteThisPage Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: role: include memcached_exporter in role::memcached
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/321725 Change subject: role: include memcached_exporter in role::memcached .. role: include memcached_exporter in role::memcached Bug: T147326 Change-Id: Ia0fb5c33be8dbf7c74f7a885ca419d7d6be8d4ee --- M modules/role/manifests/memcached.pp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/25/321725/1 diff --git a/modules/role/manifests/memcached.pp b/modules/role/manifests/memcached.pp index a53a609..b2cf317 100644 --- a/modules/role/manifests/memcached.pp +++ b/modules/role/manifests/memcached.pp @@ -34,6 +34,8 @@ } } +include role::prometheus::memcached_exporter + # `memkeys` is a `top`-like tool for inspecting memcache key usage in real time. # In addition to making it available for interactive use, we configure a cronjob # to run once a day and log 20 seconds' worth of memcached usage stats to a CSV -- To view, visit https://gerrit.wikimedia.org/r/321725 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0fb5c33be8dbf7c74f7a885ca419d7d6be8d4ee Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Increase CirrusSearch interwiki load test to 25%
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/321724 Change subject: Increase CirrusSearch interwiki load test to 25% .. Increase CirrusSearch interwiki load test to 25% The deployment of 5% interwiki search hasn't even made a dent in any of our metrics for server load or query latency. Push things a little harder, to 25%. Bug: T149740 Change-Id: I60549e418513fe16e1b4bb52034ba04c4ae07c11 --- M wmf-config/CirrusSearch-production.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/24/321724/1 diff --git a/wmf-config/CirrusSearch-production.php b/wmf-config/CirrusSearch-production.php index ed3f49c..dddf03d 100644 --- a/wmf-config/CirrusSearch-production.php +++ b/wmf-config/CirrusSearch-production.php @@ -75,7 +75,7 @@ $wgCirrusSearchInterwikiCacheTime = 60; } else { $wgCirrusSearchInterwikiSources = $wmgCirrusSearchInterwikiSources; - $wgCirrusSearchInterwikiLoadTest = $wgCirrusSearchInterwikiSources ? 0.05 : null; + $wgCirrusSearchInterwikiLoadTest = $wgCirrusSearchInterwikiSources ? 0.25 : null; } if ( $wgDBname == 'enwiki' ) { -- To view, visit https://gerrit.wikimedia.org/r/321724 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60549e418513fe16e1b4bb52034ba04c4ae07c11 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator: Add a few more languages to pygments dropdown box
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/321721 Change subject: Phabricator: Add a few more languages to pygments dropdown box .. Phabricator: Add a few more languages to pygments dropdown box Bug: T147980 Change-Id: I53a9a1ac5bfcaee3239fb5918da4bb9e1880e8df --- M modules/phabricator/data/fixed_settings.yaml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/321721/1 diff --git a/modules/phabricator/data/fixed_settings.yaml b/modules/phabricator/data/fixed_settings.yaml index 3664abc..08e0f9e 100644 --- a/modules/phabricator/data/fixed_settings.yaml +++ b/modules/phabricator/data/fixed_settings.yaml @@ -9,6 +9,12 @@ 'logoImagePHID': 'PHID-FILE-rs3pf2brupiulr6zcnrg' 'wordmarkText': 'Phabricator' +pygments.dropdown-choices: + 'apache': 'Apache' + 'cucumber': 'Cucumber' + 'less': 'Less' + 'shell': 'Shell' + ui.footer-items: - {name: 'Content licensed under Creative Commons Attribution-ShareAlike 3.0 (CC-BY-SA) unless otherwise noted; code licensed under GNU General Public License (GPL) or other open source licenses. By using this site, you agree to the Terms of Use and Privacy Policy.'} - {href: 'https://www.wikimediafoundation.org/', name: Wikimedia Foundation} -- To view, visit https://gerrit.wikimedia.org/r/321721 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53a9a1ac5bfcaee3239fb5918da4bb9e1880e8df Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[master]: Allow blocked users to use Special:CiteThisPage
jenkins-bot has submitted this change and it was merged. Change subject: Allow blocked users to use Special:CiteThisPage .. Allow blocked users to use Special:CiteThisPage Bug: T150791 Change-Id: Ie9c2e54e47f387a03e2490edaf5052826dafc4ce --- M SpecialCiteThisPage.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php index fe70167..4b81aa0 100644 --- a/SpecialCiteThisPage.php +++ b/SpecialCiteThisPage.php @@ -199,4 +199,8 @@ protected function getDisplayFormat() { return 'ooui'; } + + public function requiresUnblock() { + return false; + } } -- To view, visit https://gerrit.wikimedia.org/r/321710 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9c2e54e47f387a03e2490edaf5052826dafc4ce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CiteThisPage Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Chad Gerrit-Reviewer: Harej Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: linter: Add test for self-closed-tag inside a template
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/321720 Change subject: linter: Add test for self-closed-tag inside a template .. linter: Add test for self-closed-tag inside a template Change-Id: Ifcc6b14a0ff2296e8a7873f3664b0cb210ed68d3 --- M tests/mocha/lintertest.js 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/20/321720/1 diff --git a/tests/mocha/lintertest.js b/tests/mocha/lintertest.js index 271aa42..9ff1e83 100644 --- a/tests/mocha/lintertest.js +++ b/tests/mocha/lintertest.js @@ -198,5 +198,17 @@ result[1].params.should.have.a.property("name", "span"); }); }); + it('should lint self-closing tags in a template correctly', function() { + return parseWT('{{1x|}}').then(function(result) { + result.should.have.length(1); + result[0].should.have.a.property("type", "self-closed-tag"); + result[0].dsr.should.include.members([ 0, 12, null, null ]); + result[0].should.have.a.property("src", "{{1x|}}"); + result[0].should.have.a.property("params"); + result[0].params.should.have.a.property("name", "b"); + result[0].should.have.a.property("templateInfo"); + result[0].templateInfo.should.have.a.property("name", "1x"); + }); + }); }); }); -- To view, visit https://gerrit.wikimedia.org/r/321720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifcc6b14a0ff2296e8a7873f3664b0cb210ed68d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ArticlePlaceholder[master]: Remove "$" and "mw" from globals in .jshintrc
Fomafix has uploaded a new change for review. https://gerrit.wikimedia.org/r/321719 Change subject: Remove "$" and "mw" from globals in .jshintrc .. Remove "$" and "mw" from globals in .jshintrc "$" and "mw" are always mapped by a closure from "jQuery" and "mediaWiki". Change-Id: I214e65164391cbf932d56e86ac2466a44da63b20 --- M .jshintrc 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticlePlaceholder refs/changes/19/321719/1 diff --git a/.jshintrc b/.jshintrc index 3110352..ca5db31 100644 --- a/.jshintrc +++ b/.jshintrc @@ -13,8 +13,6 @@ "browser": true, "globals": { - "mw": false, - "$": false, "jQuery": false, "mediaWiki": false, "module": true, -- To view, visit https://gerrit.wikimedia.org/r/321719 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I214e65164391cbf932d56e86ac2466a44da63b20 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticlePlaceholder Gerrit-Branch: master Gerrit-Owner: Fomafix___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: role: account for labs in memcached_exporter
Filippo Giunchedi has submitted this change and it was merged. Change subject: role: account for labs in memcached_exporter .. role: account for labs in memcached_exporter Yay special cases Bug: T147326 Change-Id: Ice86ff96ce9a7b4029f3b62ebb984ef3ea439bf2 --- M modules/role/manifests/prometheus/memcached_exporter.pp 1 file changed, 8 insertions(+), 3 deletions(-) Approvals: Filippo Giunchedi: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/role/manifests/prometheus/memcached_exporter.pp b/modules/role/manifests/prometheus/memcached_exporter.pp index 0b86635..6829ebe 100644 --- a/modules/role/manifests/prometheus/memcached_exporter.pp +++ b/modules/role/manifests/prometheus/memcached_exporter.pp @@ -1,12 +1,17 @@ class role::prometheus::memcached_exporter { prometheus::memcached_exporter { 'default': } -$prometheus_nodes = hiera('prometheus_nodes') -$prometheus_ferm_nodes = join($prometheus_nodes, ' ') +if $::realm == 'labs' { +$ferm_srange = '$LABS_NETWORKS' +} else { +$prometheus_nodes = hiera('prometheus_nodes') +$prometheus_ferm_nodes = join($prometheus_nodes, ' ') +$ferm_srange = "(@resolve((${prometheus_ferm_nodes})) @resolve((${prometheus_ferm_nodes}), ))" +} ferm::service { 'prometheus-memcached-exporter': proto => 'tcp', port => '9150', -srange => "(@resolve((${prometheus_ferm_nodes})) @resolve((${prometheus_ferm_nodes}), ))" +srange => $ferm_srange, } } -- To view, visit https://gerrit.wikimedia.org/r/321717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ice86ff96ce9a7b4029f3b62ebb984ef3ea439bf2 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo GiunchediGerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Rewrite checkoutMediaWiki as scap3 plugin
Chad has submitted this change and it was merged. Change subject: Rewrite checkoutMediaWiki as scap3 plugin .. Rewrite checkoutMediaWiki as scap3 plugin Change-Id: I38b8d36c02ac72dd501ae61cedca1ccd2ab90b19 --- A scap/plugins/prep.py 1 file changed, 128 insertions(+), 0 deletions(-) Approvals: Chad: Looks good to me, approved 20after4: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/scap/plugins/prep.py b/scap/plugins/prep.py new file mode 100644 index 000..a0d9b35 --- /dev/null +++ b/scap/plugins/prep.py @@ -0,0 +1,128 @@ +import argparse +import os +import re +import subprocess + +import scap.cli as cli +import scap.git as git +import scap.utils as utils + + +def VersionParser(v): +try: +return re.match("(\d+\.\d+(\.\d+-)?wmf\.?\d+|master)", v).group(0) +except: +raise argparse.ArgumentTypeError( +"Branch '%s' does not match required format" % (v,)) + + +@cli.command('prep', help='Checkout MediaWiki version to staging') +class CheckoutMediaWiki(cli.Application): +gerrit = 'https://gerrit.wikimedia.org/r/p/' +dest_dir = '' + +""" Scap sub-command to manage checkout new MediaWiki versions """ +@cli.argument('-p', '--prefix', nargs=1, required=False, + default='php-', metavar='PREFIX', + help='Directory prefix to checkout version to.') +@cli.argument('branch', metavar='BRANCH', type=VersionParser, + help='The name of the branch to operate on.') +def main(self, *extra_args): +""" Checkout next MediaWiki """ + +self.branch = self.arguments.branch +self.dest_dir = os.path.join( +self.config['stage_dir'], +'{}{}'.format(self.arguments.prefix, self.branch) +) + +if os.path.isdir(self.dest_dir): +self.get_logger().info('Version already checked out') +return 0 + +git.fetch(self.dest_dir, self.gerrit + 'mediawiki/core') + +with utils.cd(self.dest_dir): +if subprocess.call(['/usr/bin/git', 'config', +'branch.autosetuprebase', 'always']) != 0: +self.get_logger().warn('Unable to setup auto-rebase') + +checkout_version = 'master' +if self.branch != 'master': +checkout_version = 'wmf/%s' % self.branch + +git.checkout(self.dest_dir, checkout_version) + +if checkout_version == 'master': +self.master_stuff() +else: +git.update_submodules(self.dest_dir, use_upstream=True) +self.update_submodule_update_strategy(self.dest_dir) + +self.write_localsettings() +self.create_startprofiler_symlink() + +cache_dir = os.path.join(self.dest_dir, 'cache') +os.chmod(cache_dir, 0777) +utils.sudo_check_call('l10nupdate', + 'mkdir "%s"' % os.path.join(cache_dir, 'l10n')) + +self.get_logger().info('MediaWiki %s successfully checked out.' % + checkout_version) + +def create_startprofiler_symlink(self): +path = os.path.join(self.dest_dir, 'StartProfiler.php') +log = self.get_logger() +if not os.path.exists(path): +os.symlink('../wmf-config/StartProfiler.php', path) +log.info('Created StartProfiler symlink') +else: +log.warning('StartProfiler symlink already exists') + +def write_localsettings(self): +ls_file = os.path.join(self.dest_dir, 'LocalSettings.php') +cs_file = os.path.join(self.config['deploy_dir'], + 'wmf-config', 'CommonSettings.php') +ls_stub = ( +'https://gerrit.wikimedia.org/r/317757 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I38b8d36c02ac72dd501ae61cedca1ccd2ab90b19 Gerrit-PatchSet: 5 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: 20after4 Gerrit-Reviewer: Chad Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits