[MediaWiki-commits] [Gerrit] labstore: Don't fetch 'homedir' property from LDAP - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/227422 Change subject: labstore: Don't fetch 'homedir' property from LDAP .. labstore: Don't fetch 'homedir' property from LDAP Is fairly useless since the homeDirectory is tuned to the path on the NFS client and not on the NFS server Change-Id: I3f7bd5afa14cea5d0f3543a1b0622e969fdcb923 --- M modules/labstore/files/create-dbusers 1 file changed, 5 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/227422/1 diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index 65d7af4..ae3e090 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -26,11 +26,10 @@ class User: -def __init__(self, project, name, uid, homedir): +def __init__(self, project, name, uid): self.project = project self.name = name self.uid = int(uid) -self.homedir = homedir @property def db_username(self): @@ -42,8 +41,8 @@ return 's%s' % self.uid def __repr__(self): -return User(name=%s, uid=%s, homedir=%s) % ( -self.name, self.uid, self.homedir) +return User(name=%s, uid=%s) % ( +self.name, self.uid) @classmethod def from_ldap_servicegroups(cls, conn, projectname): @@ -51,12 +50,12 @@ 'ou=people,ou=servicegroups,dc=wikimedia,dc=org', '(cn=%s.*)' % projectname, ldap3.SEARCH_SCOPE_WHOLE_SUBTREE, -attributes=['uidNumber', 'homeDirectory', 'cn'] +attributes=['uidNumber', 'cn'] ) users = [] for resp in conn.response: attrs = resp['attributes'] -users.append(cls(projectname, attrs['cn'][0], attrs['uidNumber'][0], attrs['homeDirectory'][0])) +users.append(cls(projectname, attrs['cn'][0], attrs['uidNumber'][0])) return users -- To view, visit https://gerrit.wikimedia.org/r/227422 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f7bd5afa14cea5d0f3543a1b0622e969fdcb923 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow customnization of Did you mean suggestions - change (mediawiki...CirrusSearch)
DCausse has uploaded a new change for review. https://gerrit.wikimedia.org/r/227424 Change subject: Allow customnization of Did you mean suggestions .. Allow customnization of Did you mean suggestions The settings used to build the suggest request are now configurable at runtime with request URI parameters. These settings can be made persistent with the 'cirrus-didyoumean-settings' system message. Bug: T106692 Change-Id: I10f5e6b1683d29e57d1a7ac23a48342bf26a64d3 --- M CirrusSearch.php M i18n/en.json M i18n/qqq.json M includes/Hooks.php M includes/Searcher.php M tests/browser/features/did_you_mean_api.feature M tests/browser/features/step_definitions/search_steps.rb 7 files changed, 206 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/24/227424/1 diff --git a/CirrusSearch.php b/CirrusSearch.php index bd69af8..18be4ca 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -240,10 +240,62 @@ // See max_errors on http://www.elasticsearch.org/guide/reference/api/search/suggest/ $wgCirrusSearchPhraseSuggestMaxErrors = 2; +// Set the hard limit for $wgCirrusSearchPhraseSuggestMaxErrors. This prevents customizing +// this setting in a way that could hurt the system performances. +$wgCirrusSearchPhraseSuggestMaxErrorsHardLimit = 2; + // Confidence level required to suggest new phrases. // See confidence on http://www.elasticsearch.org/guide/reference/api/search/suggest/ $wgCirrusSearchPhraseSuggestConfidence = 2.0; +// The suggest mode used by the phrase suggester +// can be : +// * missing: Only suggest terms in the suggest text that aren’t in the index. +// * popular: Only suggest suggestions that occur in more docs then the original +// suggest text term. +// * always: Suggest any matching suggestions based on terms in the suggest text. +$wgCirrusSearchPhraseSuggestMode = 'always'; + +// List of allowed values for the suggest mode +$wgCirrusSearchPhraseSuggestAllowedMode = array( 'missing', 'popular', 'always' ); + + +// The max term freq used by the phrase suggester. +// The maximum threshold in number of documents a suggest text token can exist in +// order to be included. Can be a relative percentage number (e.g 0.4) or an absolute +// number to represent document frequencies. If an value higher than 1 is specified +// then fractional can not be specified. Defaults to 0.01f. +// If a term appears in more then half the docs then don't try to correct it. This really +// shouldn't kick in much because we're not looking for misspellings. We're looking for phrases +// that can be might off. Like noble prize - nobel prize. In any case, the default was +// 0.01 which way too frequently decided not to correct some terms. +$wgCirrusSearchPhraseMaxTermFreq = 0.5; + +// Set the hard limit for $wgCirrusSearchPhraseMaxTermFreq. This prevents customizing +// this setting in a way that could hurt the system performances. +$wgCirrusSearchPhraseMaxTermFreqHardLimit = 0.6; + +// The max doc freq (shard level) used by the phrase suggester +// The minimal threshold in number of documents a suggestion should appear in. +// This can be specified as an absolute number or as a relative percentage of +// number of documents. This can improve quality by only suggesting high frequency +// terms. Defaults to 0f and is not enabled. If a value higher than 1 is specified +// then the number cannot be fractional. The shard level document frequencies are +// used for this option. +// NOTE: this value is ignored if $wgCirrusSearchPhraseSuggestMode is always +$wgCirrusSearchPhraseMinDocFreq = 0.0; + +// The prefix length used by the phrase suggester +// The number of minimal prefix characters that must match in order be a candidate +// suggestions. Defaults to 1. Increasing this number improves spellcheck performance. +// Usually misspellings don’t occur in the beginning of terms. +$wgCirrusSearchPhrasePrefixLength = 2; + +// Set the hard limit for $wgCirrusSearchPhrasePrefixLength. This prevents customizing +// this setting in a way that could hurt the system performances. +// (This is the minimal value) +$wgCirrusSearchPhrasePrefixLengthHardLimit = 2; + // Look for suggestions in the article text? Changing this from false to true will // break search until you perform an in place index rebuild. Changing it from true // to false is ok and then you can change it back to true so long as you _haven't_ diff --git a/i18n/en.json b/i18n/en.json index 5ec1c81..ba372c8 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -20,5 +20,6 @@ apihelp-cirrus-mapping-dump-description: Dump of CirrusSearch mapping for this wiki., apihelp-cirrus-settings-dump-description: Dump of CirrusSearch settings for this wiki., cirrussearch-give-feedback: Give us your feedback, - cirrussearch-morelikethis-settings: #!-- leave this line
[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-07-28T10:00:01+0000 - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: New Wikidata Build - 2015-07-28T10:00:01+ .. New Wikidata Build - 2015-07-28T10:00:01+ Change-Id: I5e305c20af3342ea190deed22de0c9ef0feefc7b --- M composer.lock M extensions/Wikibase/.jscsrc M extensions/Wikibase/.jshintignore M extensions/Wikibase/client/i18n/fi.json M extensions/Wikibase/client/i18n/tt-cyrl.json A extensions/Wikibase/lib/i18n/tt-cyrl.json M extensions/Wikibase/package.json M extensions/Wikibase/repo/i18n/de.json M extensions/Wikibase/repo/i18n/en.json M extensions/Wikibase/repo/i18n/es.json M extensions/Wikibase/repo/i18n/he.json M extensions/Wikibase/repo/i18n/lt.json M extensions/Wikibase/repo/i18n/pt.json M extensions/Wikibase/repo/i18n/qqq.json M extensions/Wikibase/repo/i18n/tt-cyrl.json M extensions/Wikibase/repo/includes/specials/SpecialNewEntity.php M extensions/Wikibase/repo/tests/phpunit/includes/api/GetEntitiesTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/ResultBuilderTest.php M extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.js M vendor/composer/installed.json 20 files changed, 290 insertions(+), 31 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index 3a8ddcf..b3b642f 100644 --- a/composer.lock +++ b/composer.lock @@ -1326,12 +1326,12 @@ source: { type: git, url: https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -reference: 7d80a60c43ad630fa2339e30631ab9d1b41204e2 +reference: c437e8eb6dcf9e537a8d2373915e835f99691319 }, dist: { type: zip, -url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7d80a60c43ad630fa2339e30631ab9d1b41204e2;, -reference: 7d80a60c43ad630fa2339e30631ab9d1b41204e2, +url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/c437e8eb6dcf9e537a8d2373915e835f99691319;, +reference: c437e8eb6dcf9e537a8d2373915e835f99691319, shasum: }, require: { @@ -1399,7 +1399,7 @@ wikibaserepo, wikidata ], -time: 2015-07-26 19:42:34 +time: 2015-07-28 08:34:21 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/.jscsrc b/extensions/Wikibase/.jscsrc index f66f6bd..312c030 100644 --- a/extensions/Wikibase/.jscsrc +++ b/extensions/Wikibase/.jscsrc @@ -3,12 +3,26 @@ preset: wikimedia, // - // Rules from wikimedia preset we don't follow + // Rules from wikimedia preset we don't yet? follow validateIndentation: null, requireMultipleVarDecl: null, disallowDanglingUnderscores: null, - requireSpacesInsideArrayBrackets: null, + requireSpacesInsideBrackets: null, + requireVarDeclFirst: null, + jsDoc: { + // what we don't yet follow is commented out + //checkAnnotations: jsduck5, + //checkParamNames: true, + requireParamTypes: true, + checkRedundantParams: true, + //checkReturnTypes: true, + checkRedundantReturns: true, + //requireReturnTypes: true, + //checkTypes: capitalizedNativeCase, + checkRedundantAccess: true + //requireNewlineAfterDescription: true + }, // // Own rules @@ -24,5 +38,5 @@ else ], - excludeFiles: [ node_modules/**, vendor/** ] + excludeFiles: [ node_modules/**, vendor/**, extensions/** ] } diff --git a/extensions/Wikibase/.jshintignore b/extensions/Wikibase/.jshintignore index a860310..48b4341 100644 --- a/extensions/Wikibase/.jshintignore +++ b/extensions/Wikibase/.jshintignore @@ -1 +1,3 @@ node_modules/** +vendor/** +extensions/** diff --git a/extensions/Wikibase/client/i18n/fi.json b/extensions/Wikibase/client/i18n/fi.json index 6413045..b9aa968 100644 --- a/extensions/Wikibase/client/i18n/fi.json +++ b/extensions/Wikibase/client/i18n/fi.json @@ -13,8 +13,8 @@ wikibase-client-desc: Wikibase-laajennuksen asiakasohjelma, tooltip-t-wikibase: Linkki yhdistettyyn keskustietovaraston kohteeseen, wikibase-after-page-move: Voit myös [$1 päivittää] sivuun liittyvän {{WBREPONAME}}-kohteen säilyttääksesi kielilinkit siirretyllä sivulla., - wikibase-after-page-move-queued: Tähän sivuun liitetty [$1 {{WBREPONAME}}-kohde] päivitetään pian automaattisesti., - wikibase-after-page-delete-queued: Tähän sivuun liitetty [$1 {{WBREPONAME}}-kohde] päivitetään pian automaattisesti., + wikibase-after-page-move-queued: Tähän
[MediaWiki-commits] [Gerrit] labstore: Fix use-before-reference properly - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/227421 Change subject: labstore: Fix use-before-reference properly .. labstore: Fix use-before-reference properly Change-Id: Ibf68f08d7226650533804a07788d866530f0791e --- M modules/labstore/files/create-dbusers 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/227421/1 diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index e54ca3a..65d7af4 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -61,15 +61,14 @@ return users def write_user_file(self, path, content): +f = os.open(path, os.O_CREAT | os.O_WRONLY) try: -f = os.open(path, os.O_CREAT | os.O_WRONLY) os.write(f, content.encode('utf-8')) # uid == gid os.fchown(f, self.uid, self.uid) os.fchmod(f, 0o400) finally: -if f: -os.close(f) +os.close(f) class CredentialCreator: -- To view, visit https://gerrit.wikimedia.org/r/227421 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf68f08d7226650533804a07788d866530f0791e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jshint: Ignore vendor and possible extensions directory from... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: jshint: Ignore vendor and possible extensions directory from composer. .. jshint: Ignore vendor and possible extensions directory from composer. Change-Id: I4268dbfcf9f4b9547a3fed019905282458f83f5f --- M .jshintignore 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/.jshintignore b/.jshintignore index a860310..48b4341 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1 +1,3 @@ node_modules/** +vendor/** +extensions/** -- To view, visit https://gerrit.wikimedia.org/r/227391 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4268dbfcf9f4b9547a3fed019905282458f83f5f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: Jonas Kress (WMDE) jonas.kr...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not retry UploadMediafileJob jobs with bad parameters - change (mediawiki...GWToolset)
jenkins-bot has submitted this change and it was merged. Change subject: Do not retry UploadMediafileJob jobs with bad parameters .. Do not retry UploadMediafileJob jobs with bad parameters * Not sure why these can even be sumbitted, but any case there is no use in retrying them Change-Id: Ib6eceb698f3856da97869a52826ccad94ad08973 --- M includes/Jobs/UploadMediafileJob.php 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Jobs/UploadMediafileJob.php b/includes/Jobs/UploadMediafileJob.php old mode 100644 new mode 100755 index ce4cdd5..04af130 --- a/includes/Jobs/UploadMediafileJob.php +++ b/includes/Jobs/UploadMediafileJob.php @@ -29,6 +29,8 @@ * @var {User} */ protected $User; + /** @var bool Allow retries */ + protected $allowRetry = true; /** * @param {Title} $title @@ -219,6 +221,12 @@ $result = false; } + $this-allowRetry = $result; + return $result; } + + public function allowRetries() { + return $this-allowRetry; + } } -- To view, visit https://gerrit.wikimedia.org/r/226618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6eceb698f3856da97869a52826ccad94ad08973 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/GWToolset Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Daemonize create-dbusers - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/227420 Change subject: labstore: Daemonize create-dbusers .. labstore: Daemonize create-dbusers - Runs every 60s - Runs only for toollabs users - Does not recover from crashes automatically! Need monitoring to alert whenever it crashes, however - will be added in a followup patch Change-Id: Ifb81756974d2cfc83520dcbf232e005b619d9eef --- M modules/labstore/files/create-dbusers 1 file changed, 26 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/20/227420/1 diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index 244deda..e54ca3a 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -22,6 +22,7 @@ import random import configparser import io +import time class User: @@ -138,12 +139,14 @@ if __name__ == '__main__': -PROJECTS = ['tools'] - argparser = argparse.ArgumentParser() argparser.add_argument('--config', help='Path to YAML config file') argparser.add_argument('--debug', help='Turn on debug logging', action='store_true') +argparser.add_argument('--project', help='Project name to create db users for', + default='tools') +argparser.add_argument('--delay', help='Number of seconds to wait between runs', + default=60) args = argparser.parse_args() logging.basicConfig(format='%(message)s', @@ -159,26 +162,30 @@ auto_bind=True, password=config['ldap']['password']) -servicegroups = User.from_ldap_servicegroups(conn, 'tools') cgen = CredentialCreator( config['mysql']['hosts'], config['mysql']['username'], config['mysql']['password'] ) -for sg in servicegroups: -# FIXME: for non tools/maps projects this path is different -replica_path = os.path.join( -'/srv/project/', sg.project, 'project', -re.sub(r'^%s\.' % sg.project, '', sg.name), -'replica.my.cnf' -) -if not os.path.exists(replica_path): -if not cgen.check_user_exists(sg): -# No replica.my.cnf and no user in db -# Generate new creds and put them in there! -logging.info('Creating DB accounts for %s with db username %s', sg.name, sg.db_username) -cgen.write_credentials_file(replica_path, sg) -logging.info(Created replica.my.cnf for %s, with username %s, sg.name, sg.db_username) -else: -logging.info('Missing replica.my.cnf for user %s despite grants present in db', sg.name) +while True: +logging.info('Starting createdb-users run') +servicegroups = User.from_ldap_servicegroups(conn, args.project) +for sg in servicegroups: +# FIXME: for non tools/maps projects this path is different +replica_path = os.path.join( +'/srv/project/', sg.project, 'project', +re.sub(r'^%s\.' % sg.project, '', sg.name), +'replica.my.cnf' +) +if not os.path.exists(replica_path): +if not cgen.check_user_exists(sg): +# No replica.my.cnf and no user in db +# Generate new creds and put them in there! +logging.info('Creating DB accounts for %s with db username %s', sg.name, sg.db_username) +cgen.write_credentials_file(replica_path, sg) +logging.info(Created replica.my.cnf for %s, with username %s, sg.name, sg.db_username) +else: +logging.info('Missing replica.my.cnf for user %s despite grants present in db', sg.name) +logging.info('Completed createdb-users run') +time.sleep(args.delay) -- To view, visit https://gerrit.wikimedia.org/r/227420 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb81756974d2cfc83520dcbf232e005b619d9eef Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move Lib LegacySerializers to Repo - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227427 Change subject: Move Lib LegacySerializers to Repo .. Move Lib LegacySerializers to Repo Their only use is in REPO and AFAIK we need to keep these! :) Change-Id: I5f7a09b8a2b55c31885b2b873793a32fd8e6ba30 --- M docs/options.wiki M repo/config/Wikibase.default.php M repo/includes/WikibaseRepo.php R repo/includes/serializers/LegacyInternalClaimSerializer.php R repo/includes/serializers/LegacyInternalEntitySerializer.php M repo/tests/phpunit/includes/DefaultRepoSettingsTest.php M repo/tests/phpunit/includes/WikibaseRepoTest.php M repo/tests/phpunit/includes/content/EntityHandlerTest.php 8 files changed, 16 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/27/227427/1 diff --git a/docs/options.wiki b/docs/options.wiki index 740bd2a..715f27a 100644 --- a/docs/options.wiki +++ b/docs/options.wiki @@ -57,7 +57,7 @@ :;length: the maximum length of the string, in characters. :Default: codearray( 'length' = 250 )/code ;useRedirectTargetColumn: Whether to use the epp_redirect_target column in the wb_entity_per_page table for detecting redirects. True per default, can be set to false in an environment where the necessary database update can't be deployed right away. To set up the table manually, run repo/sql/AddEppRedirectTarget.sql to create it, then use repo/maintenance/rebuildEntityPerPage.php to rebuild the table if neccessary. -;internalEntitySerializerClass: The class name of a serializer that is to be used when serializing entities for storage. Defaults to null, causing the default entity serializer from the SerializerFactory to be used. Should be set to Wikibase\Lib\Serializers\LegacyInternalEntitySerializer for compatibility with client wikis that run older code. +;internalEntitySerializerClass: The class name of a serializer that is to be used when serializing entities for storage. Defaults to null, causing the default entity serializer from the SerializerFactory to be used. Should be set to Wikibase\Repo\Serializers\LegacyInternalEntitySerializer for compatibility with client wikis that run older code. ;transformLegacyFormatOnExport: Whether entity revisions stored in a legacy format should be converted on the fly while exporting. Enabled per default, if internalEntitySerializerClass is not set, and disable by default if internalEntitySerializerClass is set. Must be disabled if internalEntitySerializerClass is set to the legacy serializer. ;subscriptionLookupMode: how the repo determines which clients need to be notified about changes to which entity (see also the useLegacyChangesSubscription setting in the client). Possible values: :;code'sitelinks'/code: Use only sitelinks from the wb_items_per_site table to track subscriptions (legacy mode). diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php index e36..f06090d 100644 --- a/repo/config/Wikibase.default.php +++ b/repo/config/Wikibase.default.php @@ -70,11 +70,11 @@ }, // Can be used to override the serialization used for storage. - // Typical value: Wikibase\Lib\Serializers\LegacyInternalEntitySerializer + // Typical value: Wikibase\Repo\Serializers\LegacyInternalEntitySerializer 'internalEntitySerializerClass' = null, // Can be used to override the serialization used for storage. - // Typical value: Wikibase\Lib\Serializers\LegacyInternalClaimSerializer + // Typical value: Wikibase\Repo\Serializers\LegacyInternalClaimSerializer 'internalClaimSerializerClass' = null, 'transformLegacyFormatOnExport' = function( SettingsArray $settings ) { diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php index 81fe49a..06da582 100644 --- a/repo/includes/WikibaseRepo.php +++ b/repo/includes/WikibaseRepo.php @@ -1064,7 +1064,7 @@ } return array( - 'Wikibase\Lib\Serializers\LegacyInternalEntitySerializer', + 'Wikibase\Repo\Serializers\LegacyInternalEntitySerializer', 'isBlobUsingLegacyFormat' ); } diff --git a/lib/includes/serializers/LegacyInternalClaimSerializer.php b/repo/includes/serializers/LegacyInternalClaimSerializer.php similarity index 93% rename from lib/includes/serializers/LegacyInternalClaimSerializer.php rename to repo/includes/serializers/LegacyInternalClaimSerializer.php index 5e1fcee..c3fccc5 100644 --- a/lib/includes/serializers/LegacyInternalClaimSerializer.php +++ b/repo/includes/serializers/LegacyInternalClaimSerializer.php @@ -1,6 +1,6 @@ ?php -namespace Wikibase\Lib\Serializers; +namespace Wikibase\Repo\Serializers; use InvalidArgumentException;
[MediaWiki-commits] [Gerrit] Move php code sniffer from composer.json to phpcs.xml file - change (mediawiki...WikidataPageBanner)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/227431 Change subject: Move php code sniffer from composer.json to phpcs.xml file .. Move php code sniffer from composer.json to phpcs.xml file Change-Id: Ib1d01ba7112b8c5511405a577c9c950d5f69084d --- M composer.json A i18n/de.json A i18n/es.json M i18n/qqq.json A phpcs.xml 5 files changed, 28 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/31/227431/1 diff --git a/composer.json b/composer.json index 7dd4cd9..6bc638e 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ scripts: { test: [ parallel-lint . --exclude vendor, - phpcs --standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki --extensions=php,php5,inc --ignore=vendor -p . + phpcs -p ] } } diff --git a/i18n/de.json b/i18n/de.json new file mode 100644 index 000..e662c51 --- /dev/null +++ b/i18n/de.json @@ -0,0 +1,9 @@ +{ + @metadata: { + authors: [ + Metalhead64 + ] + }, + wikidatapagebanner-extname: WikidataPageBanner, + wikidatapagebanner-desc: Rendert Banner auf angegebenen Wikiseiten am Artikelanfang +} diff --git a/i18n/es.json b/i18n/es.json new file mode 100644 index 000..0d3478a --- /dev/null +++ b/i18n/es.json @@ -0,0 +1,9 @@ +{ + @metadata: { + authors: [ + Macofe + ] + }, + wikidatapagebanner-extname: WikidataPageBanner, + wikidatapagebanner-desc: Despliega pancartas en páginas especificadas del wiki, al principio de los artículos +} diff --git a/i18n/qqq.json b/i18n/qqq.json index b3061d4..8f1f695 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -1,7 +1,5 @@ { - @metadata: { - authors: [] - }, + @metadata: [], wikidatapagebanner-extname: Used for the name of extension., wikidatapagebanner-desc: {{desc|name=WikidataPageBanner|url=https://www.mediawiki.org/wiki/Extension:WikidataPageBanner}}; -} \ No newline at end of file +} diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 000..cb19440 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,7 @@ +?xml version=1.0? +ruleset + rule ref=vendor/mediawiki/mediawiki-codesniffer/MediaWiki/ + file./file + arg name=extensions value=php/ + exclude-patternvendor/exclude-pattern +/ruleset -- To view, visit https://gerrit.wikimedia.org/r/227431 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1d01ba7112b8c5511405a577c9c950d5f69084d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Paladox thomasmulhall...@yahoo.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Recycle jobs to the front of the queue instead of the back - change (mediawiki...jobrunner)
jenkins-bot has submitted this change and it was merged. Change subject: Recycle jobs to the front of the queue instead of the back .. Recycle jobs to the front of the queue instead of the back * This is better if the queue is temporally very long * Also made sure retry comparison is for numbers in case double digit values are at play (default is 3 though). Change-Id: I068ea456f86e70210080cb654278d712db167cd3 --- M redisJobChronService 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/redisJobChronService b/redisJobChronService index 98bd08d..0e3d0de 100755 --- a/redisJobChronService +++ b/redisJobChronService @@ -451,7 +451,7 @@ public static function getChronScript() { static $script = LUA - local kClaimed, kAttempts, kUnclaimed, kData, kAbandoned, kDelayed = unpack(KEYS) + local kClaimed, kAttempts, kUnclaimed, kData, kAbandoned, kDelayed = unpack(KEYS) local rClaimCutoff, rPruneCutoff, rAttempts, rTime = unpack(ARGV) local released,abandoned,pruned,undelayed,ready = 0,0,0,0,0 -- Short-circuit if there is nothing at all in the queue @@ -463,10 +463,10 @@ local staleClaims = redis.call('zRangeByScore',kClaimed,0,rClaimCutoff) for k,id in ipairs(staleClaims) do local timestamp = redis.call('zScore',kClaimed,id) - local attempts = redis.call('hGet',kAttempts,id) - if attempts rAttempts then + local attempts = 1*redis.call('hGet',kAttempts,id) + if attempts 1*rAttempts then -- Claim expired and attempts left: re-enqueue the job - redis.call('lPush',kUnclaimed,id) + redis.call('rPush',kUnclaimed,id) released = released + 1 else -- Claim expired and no attempts left: mark the job as dead -- To view, visit https://gerrit.wikimedia.org/r/226891 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I068ea456f86e70210080cb654278d712db167cd3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/jobrunner Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Fix use-before-reference properly - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: labstore: Fix use-before-reference properly .. labstore: Fix use-before-reference properly Change-Id: Ibf68f08d7226650533804a07788d866530f0791e --- M modules/labstore/files/create-dbusers 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index e54ca3a..65d7af4 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -61,15 +61,14 @@ return users def write_user_file(self, path, content): +f = os.open(path, os.O_CREAT | os.O_WRONLY) try: -f = os.open(path, os.O_CREAT | os.O_WRONLY) os.write(f, content.encode('utf-8')) # uid == gid os.fchown(f, self.uid, self.uid) os.fchmod(f, 0o400) finally: -if f: -os.close(f) +os.close(f) class CredentialCreator: -- To view, visit https://gerrit.wikimedia.org/r/227421 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf68f08d7226650533804a07788d866530f0791e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] exim: split rt_relay into a separate config erb - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: exim: split rt_relay into a separate config erb .. exim: split rt_relay into a separate config erb Copy the exim4.conf.SMTP_IMAP_MM.erb template into a separate one for RT and remove all the conditionals in there that do not match the combination of options supplied by role::requesttracker. This change is a non-functional change; it has been tested and results into a zero-diff, excluding whitespace changes and the removal of a couple of unused/unreferenced domain lists. Change-Id: Ibb583b0f7c462997fff3c8e19b1e7ce7f2c2ff90 --- M manifests/mail.pp A templates/exim/exim4.conf.rt.erb 2 files changed, 227 insertions(+), 0 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/mail.pp b/manifests/mail.pp index 4638fc7..9e0ab97 100644 --- a/manifests/mail.pp +++ b/manifests/mail.pp @@ -64,6 +64,9 @@ if $phab_relay { $config_template = template('exim/exim4.conf.phab.erb') $filter_template = template('exim/system_filter.conf.erb') +} elsif $rt_relay { +$config_template = template('exim/exim4.conf.rt.erb') +$filter_template = template('exim/system_filter.conf.erb') } else { $config_template = template('exim/exim4.conf.SMTP_IMAP_MM.erb') $filter_template = template('exim/system_filter.conf.erb') diff --git a/templates/exim/exim4.conf.rt.erb b/templates/exim/exim4.conf.rt.erb new file mode 100644 index 000..f3e072a --- /dev/null +++ b/templates/exim/exim4.conf.rt.erb @@ -0,0 +1,224 @@ +# This file is managed by puppet + +## +# Macros # +## + +CONFDIR=/etc/exim4 + +### +# Main configuration settings # +### + +domainlist system_domains = @ +domainlist local_domains = %= @local_domains.join( : ) % + +# a list of domains to always respond defer; used for emergencies or planned downtimes +domainlist defer_domains = lsearch;CONFDIR/defer_domains + +# Standard lists +domainlist rt_domains = rt.wikimedia.org + +hostlist wikimedia_nets = ; %= scope.lookupvar('network::constants::all_networks').join( ; ) % +hostlist relay_from_hosts = ; @[] ; 127.0.0.1 ; ::1 ; + +# Administration +log_selector = +address_rewrite +all_parents +delivery_size +deliver_time +incoming_interface +incoming_port +smtp_confirmation +smtp_protocol_error +smtp_syntax_error +tls_cipher +tls_peerdn +message_logs = false + +# Policy control +acl_smtp_connect = acl_check_connect +acl_smtp_rcpt = acl_check_rcpt +acl_smtp_data = acl_check_data + +# Allow Phab, RT, OTRS to use any sender address +untrusted_set_sender = * +local_from_check = false + +system_filter = CONFDIR/system_filter + +# Resource control +check_spool_space = 50M +smtp_reserve_hosts = ; 127.0.0.1 ; ::1 ; +wikimedia_nets +smtp_accept_queue_per_connection = 500 + +deliver_queue_load_max = 800.0 +queue_only_load = 100.0 +remote_max_parallel = 500 + +smtp_connect_backlog = 128 +smtp_receive_timeout = 1m +smtp_accept_max = 4000 +smtp_accept_max_per_host = ${if match_ip{$sender_host_address}{+wikimedia_nets}{50}{5}} +smtp_accept_reserve = 100 + +# Lookups +host_lookup = * +rfc1413_hosts = + +# Other +never_users = root : daemon : bin +ignore_bounce_errors_after = 0h + +# force Gmail over IPv4 due to reports of bad spam reputation over IPv6 +dns_ipv4_lookup = gmail-smtp-in.l.google.com : aspmx.l.google.com + +### +# Access Control Lists (ACLs) # +### + +begin acl + +acl_check_rcpt: + + # Accept if the source is local SMTP (a pipe) + accept hosts = : + + # Deny if the local part contains @, %, /, | or !, or starts with a dot + deny local_parts = ^.*[@%!/|] : ^\\. + + # Accept relaying from networks we control. Note: no address verification + # is done at this point, which is good for mail submission, but may render + # recipient callout verification by affected hosts useless. + accept domains = ! +local_domains + hosts = +relay_from_hosts + control = submission/sender_retain + + # Require recipient domain to be local, or a domain we relay for + require message = Relay not permitted + domains = +local_domains : +relay_domains + set acl_m_relayed = yes + + # use this only for emergencies or planned downtimes + defer message = Administratively set to defer + domains = +defer_domains + + # Accept mail for postmaster without further policy checking, + # for compliance with the RFCs + accept local_parts = postmaster : abuse + set acl_m2 = skip_spamd + + # Verify the recipient address for local domains, or require the + # recipient domain to exist for remote domains +
[MediaWiki-commits] [Gerrit] Increasing db1035 weight - change (operations/mediawiki-config)
Jcrespo has submitted this change and it was merged. Change subject: Increasing db1035 weight .. Increasing db1035 weight The rpc errors have reduced substantially, increasing load for db1035. Change-Id: I62f9f64ed4c1ad0abf3d0904a549cd39ab395f61 --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jcrespo: Looks good to me, approved diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 2e67722..3b5d638 100755 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -112,7 +112,7 @@ 'db1038' = 0, # 1.4TB 64GB 'db1027' = 0, # 1.4TB 64GB, vslow, dump 'db1015' = 0, # 1.4TB 64GB, watchlist, recentchanges, contributions, logpager - 'db1035' = 40, # 1.4TB 64GB + 'db1035' = 100, # 1.4TB 64GB 'db1044' = 400, # 1.4TB 64GB ), 's4' = array( -- To view, visit https://gerrit.wikimedia.org/r/227428 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62f9f64ed4c1ad0abf3d0904a549cd39ab395f61 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo jcre...@wikimedia.org Gerrit-Reviewer: Jcrespo jcre...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Don't fetch 'homedir' property from LDAP - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: labstore: Don't fetch 'homedir' property from LDAP .. labstore: Don't fetch 'homedir' property from LDAP Is fairly useless since the homeDirectory is tuned to the path on the NFS client and not on the NFS server Change-Id: I3f7bd5afa14cea5d0f3543a1b0622e969fdcb923 --- M modules/labstore/files/create-dbusers 1 file changed, 5 insertions(+), 6 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index 65d7af4..ae3e090 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -26,11 +26,10 @@ class User: -def __init__(self, project, name, uid, homedir): +def __init__(self, project, name, uid): self.project = project self.name = name self.uid = int(uid) -self.homedir = homedir @property def db_username(self): @@ -42,8 +41,8 @@ return 's%s' % self.uid def __repr__(self): -return User(name=%s, uid=%s, homedir=%s) % ( -self.name, self.uid, self.homedir) +return User(name=%s, uid=%s) % ( +self.name, self.uid) @classmethod def from_ldap_servicegroups(cls, conn, projectname): @@ -51,12 +50,12 @@ 'ou=people,ou=servicegroups,dc=wikimedia,dc=org', '(cn=%s.*)' % projectname, ldap3.SEARCH_SCOPE_WHOLE_SUBTREE, -attributes=['uidNumber', 'homeDirectory', 'cn'] +attributes=['uidNumber', 'cn'] ) users = [] for resp in conn.response: attrs = resp['attributes'] -users.append(cls(projectname, attrs['cn'][0], attrs['uidNumber'][0], attrs['homeDirectory'][0])) +users.append(cls(projectname, attrs['cn'][0], attrs['uidNumber'][0])) return users -- To view, visit https://gerrit.wikimedia.org/r/227422 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f7bd5afa14cea5d0f3543a1b0622e969fdcb923 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] enabled GC logging - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: enabled GC logging .. enabled GC logging The JVM is capable of logging detailed information about each garbage collection event. Note: This logging has been enabled on restbase1001 for the past several days to no ill effect. Bug: T106619 Change-Id: I67f5b7f5fd5e271fa9515693c9887199f4330207 --- M modules/cassandra/templates/cassandra-env.sh.erb 1 file changed, 11 insertions(+), 11 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved Mobrovac: Looks good to me, but someone else must approve GWicke: Looks good to me, but someone else must approve diff --git a/modules/cassandra/templates/cassandra-env.sh.erb b/modules/cassandra/templates/cassandra-env.sh.erb index d1720fa..b182f3c 100644 --- a/modules/cassandra/templates/cassandra-env.sh.erb +++ b/modules/cassandra/templates/cassandra-env.sh.erb @@ -237,20 +237,20 @@ fi # GC logging options -- uncomment to enable -# JVM_OPTS=$JVM_OPTS -XX:+PrintGCDetails -# JVM_OPTS=$JVM_OPTS -XX:+PrintGCDateStamps -# JVM_OPTS=$JVM_OPTS -XX:+PrintHeapAtGC -# JVM_OPTS=$JVM_OPTS -XX:+PrintTenuringDistribution -# JVM_OPTS=$JVM_OPTS -XX:+PrintGCApplicationStoppedTime -# JVM_OPTS=$JVM_OPTS -XX:+PrintPromotionFailure -# JVM_OPTS=$JVM_OPTS -XX:PrintFLSStatistics=1 +JVM_OPTS=$JVM_OPTS -XX:+PrintGCDetails +JVM_OPTS=$JVM_OPTS -XX:+PrintGCDateStamps +JVM_OPTS=$JVM_OPTS -XX:+PrintHeapAtGC +JVM_OPTS=$JVM_OPTS -XX:+PrintTenuringDistribution +JVM_OPTS=$JVM_OPTS -XX:+PrintGCApplicationStoppedTime +JVM_OPTS=$JVM_OPTS -XX:+PrintPromotionFailure +JVM_OPTS=$JVM_OPTS -XX:PrintFLSStatistics=1 # JVM_OPTS=$JVM_OPTS -Xloggc:/var/log/cassandra/gc-`date +%s`.log # If you are using JDK 6u34 7u2 or later you can enable GC log rotation # don't stick the date in the log name if rotation is on. -# JVM_OPTS=$JVM_OPTS -Xloggc:/var/log/cassandra/gc.log -# JVM_OPTS=$JVM_OPTS -XX:+UseGCLogFileRotation -# JVM_OPTS=$JVM_OPTS -XX:NumberOfGCLogFiles=10 -# JVM_OPTS=$JVM_OPTS -XX:GCLogFileSize=10M +JVM_OPTS=$JVM_OPTS -Xloggc:/var/log/cassandra/gc.log +JVM_OPTS=$JVM_OPTS -XX:+UseGCLogFileRotation +JVM_OPTS=$JVM_OPTS -XX:NumberOfGCLogFiles=10 +JVM_OPTS=$JVM_OPTS -XX:GCLogFileSize=10M # Configure the following for JEMallocAllocator and if jemalloc is not available in the system # library path (Example: /usr/local/lib/). Usually make install will do the right thing. -- To view, visit https://gerrit.wikimedia.org/r/227355 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I67f5b7f5fd5e271fa9515693c9887199f4330207 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Eevans eev...@wikimedia.org Gerrit-Reviewer: Eevans eev...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: GWicke gwi...@wikimedia.org Gerrit-Reviewer: Mobrovac mobro...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use the same cookie jar throughout a request's life - change (mediawiki...citoid)
jenkins-bot has submitted this change and it was merged. Change subject: Use the same cookie jar throughout a request's life .. Use the same cookie jar throughout a request's life unshorten() needs to have a cookie jar as well since some sites, such as ScienceDirect, do not allow the redirects to continue before seeing the cookie they sent. Furthermore, move the cookie jar creation to CitoidRequest, so that the scraper can later reuse these cookies and thus scrape the resource faster. This partially addresses T97042 in that it avoids redirect hell caused when unshorten() is trying to find the final URL to scrape. Bug: T97042 (partially only) Bug: T106975 Change-Id: Id857d7eebb0d077408d6a4a4c86e3d2ab864ed5f --- M lib/CitoidRequest.js M lib/CitoidService.js M lib/Scraper.js M lib/unshorten.js M test/features/scraping/index.js 5 files changed, 21 insertions(+), 7 deletions(-) Approvals: Mvolz: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/CitoidRequest.js b/lib/CitoidRequest.js index 57c7f7e..129f46d 100644 --- a/lib/CitoidRequest.js +++ b/lib/CitoidRequest.js @@ -6,6 +6,7 @@ var BBPromise = require('bluebird'); var CitoidResponse = require('./CitoidResponse.js'); +var request = require('request'); /** * Constructor for CitoidRequest object @@ -24,6 +25,8 @@ this.url = null; this.doi = null; + this.jar = request.jar(); + this.exporter = app.citoid.exporter; this.build(); diff --git a/lib/CitoidService.js b/lib/CitoidService.js index 87ed747..e39d984 100644 --- a/lib/CitoidService.js +++ b/lib/CitoidService.js @@ -164,7 +164,7 @@ // Try again following all redirects- // We don't do this initially because many sites // will redirect to a log-in screen - return unshorten(requestedURL, self.userAgent).then(function(expandedURL) { + return unshorten(requestedURL, self.userAgent, cr.jar).then(function(expandedURL) { logger.log('trace/zotero', Redirect detected to + expandedURL); cr.url = expandedURL; return zoteroWebRequest(cr) diff --git a/lib/Scraper.js b/lib/Scraper.js index 7208142..94a6128 100644 --- a/lib/Scraper.js +++ b/lib/Scraper.js @@ -12,7 +12,6 @@ var contentType = require('content-type'); var iconv = require('iconv-lite'); var parseAll = require('html-metadata').parseAll; -var request = require('request'); var urlParse = require('url'); var preq = require('preq'); @@ -58,13 +57,11 @@ var userAgent = this.userAgent; var citationPromise = citationFromCR(cr); // Promise for citation - var j = request.jar(); // One time use cookie jar - logger.log('debug/scraper', Using native scraper on + url); return preq({ url: url, followAllRedirects: true, - jar: j, // Set cookie jar for request + jar: cr.jar, // Set cookie jar for request encoding: null, // returns page in Buffer object headers: { 'Accept-Language': acceptLanguage, diff --git a/lib/unshorten.js b/lib/unshorten.js index d6066e8..b17fdf1 100644 --- a/lib/unshorten.js +++ b/lib/unshorten.js @@ -7,16 +7,18 @@ * Follows redirects in a URL * @param {String} urlurl trying to be unshortened * @param {String} userAgent the User-Agent header to use + * @param {Object} jarthe cookie jar to use for requests * @return {Object} BBPromise for url */ -var unshorten = BBPromise.method(function (url, userAgent){ +var unshorten = BBPromise.method(function (url, userAgent, jar){ return preq({ method: 'head', url: url, headers: { 'User-Agent': userAgent - } + }, + jar: jar }).then(function (response){ if (response (url !== response.headers['content-location'])){ return response.headers['content-location']; diff --git a/test/features/scraping/index.js b/test/features/scraping/index.js index e8cd5f8..bca9a0a 100644 --- a/test/features/scraping/index.js +++ b/test/features/scraping/index.js @@ -135,6 +135,18 @@ }); }); + // Ensure DOI is present in non-zotero scraped page when request from DOI link + it('DOI which requires cookie to properly follow redirect to Zotero; no results from crossRef', function() { + return server.query('10.1642/0004-8038(2005)122[0673:PROAGP]2.0.CO;2').then(function(res) { + assert.status(res, 200); + assert.checkZotCitation(res, 'Phylogenetic relationships of antpitta genera (passeriformes: formicariidae)'); +
[MediaWiki-commits] [Gerrit] Cleanups based on IDE warnings - change (mediawiki...jobrunner)
jenkins-bot has submitted this change and it was merged. Change subject: Cleanups based on IDE warnings .. Cleanups based on IDE warnings * Use InvalidArgumentException * Make use of $pruned variable Change-Id: Ib509903ea75744d01d139c93903e2f1cd648d4ca --- M redisJobChronService M src/RedisJobService.php 2 files changed, 10 insertions(+), 7 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/redisJobChronService b/redisJobChronService index 98bd08d..40b3c63 100755 --- a/redisJobChronService +++ b/redisJobChronService @@ -314,6 +314,7 @@ $this-incrStats( job-recycle.$qType, $released ); $this-incrStats( job-abandon.$qType, $abandoned ); $this-incrStats( job-undelay.$qType, $undelayed ); + $this-incrStats( job-prune.$qType, $pruned ); } } catch ( RedisException $e ) { $failed += count( $paramsByQueue ); diff --git a/src/RedisJobService.php b/src/RedisJobService.php index 5423da1..bea9c87 100755 --- a/src/RedisJobService.php +++ b/src/RedisJobService.php @@ -81,14 +81,14 @@ $file = $args['config-file']; $content = file_get_contents( $file ); if ( $content === false ) { - throw new Exception( Coudn't open configuration file '{$file}'' ); + throw new InvalidArgumentException( Coudn't open configuration file '{$file}'' ); } // Remove comments and load into an array $content = trim( preg_replace( '/\/\/.*$/m', '', $content ) ); $config = json_decode( $content, true ); if ( !is_array( $config ) ) { - throw new Exception( Could not parse JSON file '{$file}'. ); + throw new InvalidArgumentException( Could not parse JSON file '{$file}'. ); } $instance = new static( $config ); @@ -103,20 +103,21 @@ protected function __construct( array $config ) { $this-aggrSrvs = $config['redis']['aggregators']; if ( !count( $this-aggrSrvs ) ) { - throw new Exception( Empty list for 'redis.aggregators'. ); + throw new InvalidArgumentException( Empty list for 'redis.aggregators'. ); } $this-queueSrvs = $config['redis']['queues']; if ( !count( $this-queueSrvs ) ) { - throw new Exception( Empty list for 'redis.queues'. ); + throw new InvalidArgumentException( Empty list for 'redis.queues'. ); } $this-dispatcher = $config['dispatcher']; if ( !$this-dispatcher ) { - throw new Exception( No command provided for 'dispatcher'. ); + throw new InvalidArgumentException( No command provided for 'dispatcher'. ); } foreach ( $config['groups'] as $name = $group ) { if ( !is_int( $group['runners'] ) ) { - throw new Exception( Invalid 'runners' value for runner group '$name'. ); + throw new InvalidArgumentException( + Invalid 'runners' value for runner group '$name'. ); } elseif ( $group['runners'] == 0 ) { continue; // loop disabled } @@ -125,7 +126,8 @@ if ( !isset( $group[$k] ) ) { $group[$k] = array(); } elseif ( !is_array( $group[$k] ) ) { - throw new Exception( Invalid '$k' value for runner group '$name'. ); + throw new InvalidArgumentException( + Invalid '$k' value for runner group '$name'. ); } } $this-loopMap[] = $group; -- To view, visit https://gerrit.wikimedia.org/r/226895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib509903ea75744d01d139c93903e2f1cd648d4ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/jobrunner Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Made WebVideoTranscodeJob bail if the work is started already - change (mediawiki...TimedMediaHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Made WebVideoTranscodeJob bail if the work is started already .. Made WebVideoTranscodeJob bail if the work is started already * Previously it would spam the job logs with errors and keep retrying the job, which just makes noise. Change-Id: I443ef991f73642cc30793a6fde6979efd711d8c1 --- M WebVideoTranscode/WebVideoTranscodeJob.php 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/WebVideoTranscode/WebVideoTranscodeJob.php b/WebVideoTranscode/WebVideoTranscodeJob.php old mode 100644 new mode 100755 index c78583b..5308c46 --- a/WebVideoTranscode/WebVideoTranscodeJob.php +++ b/WebVideoTranscode/WebVideoTranscodeJob.php @@ -163,8 +163,7 @@ if( ! is_null( $dbStartTime ) ){ $error = 'Error, running transcode job, for job that has already started'; $this-output( $error ); - $this-setLastError( $error ); - return false; + return true; } // Update the transcode table letting it know we have started work: -- To view, visit https://gerrit.wikimedia.org/r/226617 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I443ef991f73642cc30793a6fde6979efd711d8c1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update documentation and code to show that model is optional... - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/227434 Change subject: Update documentation and code to show that model is optional in ContextItem .. Update documentation and code to show that model is optional in ContextItem Bug: T107102 Change-Id: I7352065cec33a5f9a9927ca2e25334d0b8d2925d --- M src/ui/ve.ui.ContextItem.js 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/34/227434/1 diff --git a/src/ui/ve.ui.ContextItem.js b/src/ui/ve.ui.ContextItem.js index 56ce159..e24c5af 100644 --- a/src/ui/ve.ui.ContextItem.js +++ b/src/ui/ve.ui.ContextItem.js @@ -15,7 +15,7 @@ * * @constructor * @param {ve.ui.Context} context Context item is in - * @param {ve.dm.Model} model Model item is related to + * @param {ve.dm.Model} [model] Model item is related to * @param {Object} [config] Configuration options * @cfg {boolean} [basic] Render only basic information */ @@ -156,7 +156,7 @@ * @return {boolean} Item is editable */ ve.ui.ContextItem.prototype.isEditable = function () { - return this.constructor.static.editable this.model.isEditable(); + return this.constructor.static.editable ( !this.model || this.model.isEditable() ); }; /** @@ -176,7 +176,7 @@ ve.ui.ContextItem.prototype.getFragment = function () { if ( !this.fragment ) { var surfaceModel = this.context.getSurface().getModel(); - this.fragment = this.model instanceof ve.dm.Node ? + this.fragment = this.model this.model instanceof ve.dm.Node ? surfaceModel.getLinearFragment( this.model.getOuterRange() ) : surfaceModel.getFragment(); } -- To view, visit https://gerrit.wikimedia.org/r/227434 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7352065cec33a5f9a9927ca2e25334d0b8d2925d Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable ferm for remaining mc1* systems - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/227418 Change subject: Enable ferm for remaining mc1* systems .. Enable ferm for remaining mc1* systems Change-Id: I3bd40db29df7882ae1657a1c1f3038bcbc37c9b9 --- M manifests/site.pp 1 file changed, 1 insertion(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/227418/1 diff --git a/manifests/site.pp b/manifests/site.pp index 4b2b4f9..eaf36b5 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1650,20 +1650,7 @@ role maps::slave } -node /^mc(10[01][0-8])\.eqiad\.wmnet/ { - -role memcached -include passwords::redis - -file { '/a': -ensure = 'directory', -} - -include redis -include redis::ganglia -} - -node /^mc(10[01][9])\.eqiad\.wmnet/ { +node /^mc(10[01][0-9])\.eqiad\.wmnet/ { role memcached include passwords::redis -- To view, visit https://gerrit.wikimedia.org/r/227418 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3bd40db29df7882ae1657a1c1f3038bcbc37c9b9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Do not fail if homedir does not exist - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: labstore: Do not fail if homedir does not exist .. labstore: Do not fail if homedir does not exist toolwatcher creates them asynchronously. I'll move that in to this script too shortly, but until then! Change-Id: I278ca9ce1dcec1376cef0fa8a0a80fc4e766a92a --- M modules/labstore/files/create-dbusers 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index ae3e090..9acc4e6 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -171,12 +171,12 @@ servicegroups = User.from_ldap_servicegroups(conn, args.project) for sg in servicegroups: # FIXME: for non tools/maps projects this path is different -replica_path = os.path.join( +home_path = os.path.join( '/srv/project/', sg.project, 'project', -re.sub(r'^%s\.' % sg.project, '', sg.name), -'replica.my.cnf' +re.sub(r'^%s\.' % sg.project, '', sg.name) ) -if not os.path.exists(replica_path): +replica_path = os.path.join(home_path, 'replica.my.cnf') +if os.path.exists(home_path) and not os.path.exists(replica_path): if not cgen.check_user_exists(sg): # No replica.my.cnf and no user in db # Generate new creds and put them in there! -- To view, visit https://gerrit.wikimedia.org/r/227423 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I278ca9ce1dcec1376cef0fa8a0a80fc4e766a92a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Do not fail if homedir does not exist - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/227423 Change subject: labstore: Do not fail if homedir does not exist .. labstore: Do not fail if homedir does not exist toolwatcher creates them asynchronously. I'll move that in to this script too shortly, but until then! Change-Id: I278ca9ce1dcec1376cef0fa8a0a80fc4e766a92a --- M modules/labstore/files/create-dbusers 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/227423/1 diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index ae3e090..9acc4e6 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -171,12 +171,12 @@ servicegroups = User.from_ldap_servicegroups(conn, args.project) for sg in servicegroups: # FIXME: for non tools/maps projects this path is different -replica_path = os.path.join( +home_path = os.path.join( '/srv/project/', sg.project, 'project', -re.sub(r'^%s\.' % sg.project, '', sg.name), -'replica.my.cnf' +re.sub(r'^%s\.' % sg.project, '', sg.name) ) -if not os.path.exists(replica_path): +replica_path = os.path.join(home_path, 'replica.my.cnf') +if os.path.exists(home_path) and not os.path.exists(replica_path): if not cgen.check_user_exists(sg): # No replica.my.cnf and no user in db # Generate new creds and put them in there! -- To view, visit https://gerrit.wikimedia.org/r/227423 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I278ca9ce1dcec1376cef0fa8a0a80fc4e766a92a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] exim: split phab_relay into a separate config erb - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: exim: split phab_relay into a separate config erb .. exim: split phab_relay into a separate config erb Copy the exim4.conf.SMTP_IMAP_MM.erb template into a separate one for Phabricator and remove all the conditionals in there that do not match the combination of options supplied by role::phabricator::main. This change is a non-functional change; it has been tested and results into a zero-diff, excluding whitespace changes and the removal of a couple of unused/unreferenced domain lists. Change-Id: Id98c05bef7356ac4b9f2db49799d2d53b1931c1e --- M manifests/mail.pp A templates/exim/exim4.conf.phab.erb 2 files changed, 204 insertions(+), 2 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/mail.pp b/manifests/mail.pp index e584797..4638fc7 100644 --- a/manifests/mail.pp +++ b/manifests/mail.pp @@ -61,8 +61,13 @@ include privateexim::listserve include exim4::ganglia -$config_template = template('exim/exim4.conf.SMTP_IMAP_MM.erb') -$filter_template = template('exim/system_filter.conf.erb') +if $phab_relay { +$config_template = template('exim/exim4.conf.phab.erb') +$filter_template = template('exim/system_filter.conf.erb') +} else { +$config_template = template('exim/exim4.conf.SMTP_IMAP_MM.erb') +$filter_template = template('exim/system_filter.conf.erb') +} class { 'exim4': variant = 'heavy', diff --git a/templates/exim/exim4.conf.phab.erb b/templates/exim/exim4.conf.phab.erb new file mode 100644 index 000..0a8898b --- /dev/null +++ b/templates/exim/exim4.conf.phab.erb @@ -0,0 +1,197 @@ +# This file is managed by puppet + +## +# Macros # +## + +CONFDIR=/etc/exim4 + +### +# Main configuration settings # +### + +domainlist system_domains = @ +domainlist local_domains = %= @local_domains.join( : ) % + +# a list of domains to always respond defer; used for emergencies or planned downtimes +domainlist defer_domains = lsearch;CONFDIR/defer_domains + +# Standard lists +domainlist phab_domains = phabricator.wikimedia.org + +hostlist wikimedia_nets = ; %= scope.lookupvar('network::constants::all_networks').join( ; ) % +hostlist relay_from_hosts = ; @[] ; 127.0.0.1 ; ::1 ; + +# Administration +log_selector = +address_rewrite +all_parents +delivery_size +deliver_time +incoming_interface +incoming_port +smtp_confirmation +smtp_protocol_error +smtp_syntax_error +tls_cipher +tls_peerdn +message_logs = false + +# Policy control +acl_smtp_connect = acl_check_connect +acl_smtp_rcpt = acl_check_rcpt +acl_smtp_data = acl_check_data + +# Allow Phab, RT, OTRS to use any sender address +untrusted_set_sender = * +local_from_check = false + +system_filter = CONFDIR/system_filter + +# Resource control +check_spool_space = 50M +smtp_reserve_hosts = ; 127.0.0.1 ; ::1 ; +wikimedia_nets +smtp_accept_queue_per_connection = 500 + +deliver_queue_load_max = 800.0 +queue_only_load = 100.0 +remote_max_parallel = 500 + +smtp_connect_backlog = 128 +smtp_receive_timeout = 1m +smtp_accept_max = 4000 +smtp_accept_max_per_host = ${if match_ip{$sender_host_address}{+wikimedia_nets}{50}{5}} +smtp_accept_reserve = 100 + +# Lookups +host_lookup = * +rfc1413_hosts = + +# Other +never_users = root : daemon : bin +ignore_bounce_errors_after = 0h + +# force Gmail over IPv4 due to reports of bad spam reputation over IPv6 +dns_ipv4_lookup = gmail-smtp-in.l.google.com : aspmx.l.google.com + +### +# Access Control Lists (ACLs) # +### + +begin acl + +acl_check_rcpt: + + # Accept if the source is local SMTP (a pipe) + accept hosts = : + + # Deny if the local part contains @, %, /, | or !, or starts with a dot + deny local_parts = ^.*[@%!/|] : ^\\. + + # Accept relaying from networks we control. Note: no address verification + # is done at this point, which is good for mail submission, but may render + # recipient callout verification by affected hosts useless. + accept domains = ! +local_domains + hosts = +relay_from_hosts + control = submission/sender_retain + + # Require recipient domain to be local, or a domain we relay for + require message = Relay not permitted + domains = +local_domains : +relay_domains + set acl_m_relayed = yes + + # use this only for emergencies or planned downtimes + defer message = Administratively set to defer + domains = +defer_domains + + # Accept mail for postmaster without further policy checking, + # for compliance with the RFCs + accept local_parts = postmaster : abuse + set
[MediaWiki-commits] [Gerrit] Move ForbiddenSerializer to Client - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227426 Change subject: Move ForbiddenSerializer to Client .. Move ForbiddenSerializer to Client This class has 1 usage and it is in Client! Change-Id: I120b8e801ae2200b9d0740c6b2770b17f9dd096e --- R client/includes/ForbiddenSerializer.php M client/includes/WikibaseClient.php 2 files changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/26/227426/1 diff --git a/lib/includes/serializers/ForbiddenSerializer.php b/client/includes/ForbiddenSerializer.php similarity index 94% rename from lib/includes/serializers/ForbiddenSerializer.php rename to client/includes/ForbiddenSerializer.php index 135d0da..8c54481 100644 --- a/lib/includes/serializers/ForbiddenSerializer.php +++ b/client/includes/ForbiddenSerializer.php @@ -1,6 +1,6 @@ ?php -namespace Wikibase\Lib\Serializers; +namespace Wikibase\Client; use RuntimeException; use Serializers\Serializer as NewStyleSerializer; diff --git a/client/includes/WikibaseClient.php b/client/includes/WikibaseClient.php index 1f3359e..a174d00 100644 --- a/client/includes/WikibaseClient.php +++ b/client/includes/WikibaseClient.php @@ -48,7 +48,6 @@ use Wikibase\Lib\OutputFormatValueFormatterFactory; use Wikibase\Lib\Parsers\SuffixEntityIdParser; use Wikibase\Lib\PropertyInfoDataTypeLookup; -use Wikibase\Lib\Serializers\ForbiddenSerializer; use Wikibase\Lib\Store\EntityContentDataCodec; use Wikibase\Lib\Store\EntityLookup; use Wikibase\Lib\Store\EntityRetrievingTermLookup; -- To view, visit https://gerrit.wikimedia.org/r/227426 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I120b8e801ae2200b9d0740c6b2770b17f9dd096e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [DonationInterface] Add new optional key - change (translatewiki)
Raimond Spekking has uploaded a new change for review. https://gerrit.wikimedia.org/r/227419 Change subject: [DonationInterface] Add new optional key .. [DonationInterface] Add new optional key https://gerrit.wikimedia.org/r/#/c/226239/ Change-Id: I204df3e349ee29a887e9dcae3527262320596057 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/19/227419/1 diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 246f60a..26b7a78 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -776,15 +776,21 @@ id = ext-di-gc file = DonationInterface/gateway_common/i18n/interface/%CODE%.json descmsg = donate_interface-desc +ignored = donate_interface-big-amount-display, donate_interface-medium-amount-display +ignored = donate_interface-small-amount-display, donate_interface-big-amount-value +ignored = donate_interface-medium-amount-value, donate_interface-small-amount-value optional = donate_interface-currency-display, donate_interface-pm-alipay, donate_interface-pm-bpay optional = donate_interface-pm-boletus, donate_interface-pm-directebanking, donate_interface-pm-eps optional = donate_interface-pm-enets, donate_interface-pm-giropay, donate_interface-pm-ideal optional = donate_interface-pm-nordea, donate_interface-pm-skrill, donate_interface-pm-sofort optional = donate_interface-pm-webmoney, donate_interface-pm-westernunion, donate_interface-pm-yandex -ignored = donate_interface-big-amount-display, donate_interface-medium-amount-display -ignored = donate_interface-small-amount-display, donate_interface-big-amount-value -ignored = donate_interface-medium-amount-value, donate_interface-small-amount-value optional = donate_interface-donor-fname-alt, donate_interface-donor-lname-alt, donate_interface-donor-postcode +optional = donate_interface-donor-fiscal_number-ar, donate_interface-donor-fiscal_number-bo, donate_interface-donor-fiscal_number-br +optional = donate_interface-donor-fiscal_number-cl, donate_interface-donor-fiscal_number-co, donate_interface-donor-fiscal_number-mx +optional = donate_interface-donor-fiscal_number-pe, donate_interface-donor-fiscal_number-uy +optional = donate_interface-error-msg-fiscal_number-ar, donate_interface-error-msg-fiscal_number-bo, donate_interface-error-msg-fiscal_number-br +optional = donate_interface-error-msg-fiscal_number-cl, donate_interface-error-msg-fiscal_number-co, donate_interface-error-msg-fiscal_number-mx +optional = donate_interface-error-msg-fiscal_number-pe, donate_interface-error-msg-fiscal_number-uy Donation Interface - Global Collect Gateway file = DonationInterface/globalcollect_gateway/i18n/%CODE%.json @@ -1722,6 +1728,9 @@ Php Tags Wiki +# Missing qqq +# Picture Game + Pluggable Auth Poem -- To view, visit https://gerrit.wikimedia.org/r/227419 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I204df3e349ee29a887e9dcae3527262320596057 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [DonationInterface] Add new optional key - change (translatewiki)
Raimond Spekking has submitted this change and it was merged. Change subject: [DonationInterface] Add new optional key .. [DonationInterface] Add new optional key https://gerrit.wikimedia.org/r/#/c/226239/ Change-Id: I204df3e349ee29a887e9dcae3527262320596057 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 12 insertions(+), 3 deletions(-) Approvals: Raimond Spekking: Verified; Looks good to me, approved diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index 246f60a..26b7a78 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -776,15 +776,21 @@ id = ext-di-gc file = DonationInterface/gateway_common/i18n/interface/%CODE%.json descmsg = donate_interface-desc +ignored = donate_interface-big-amount-display, donate_interface-medium-amount-display +ignored = donate_interface-small-amount-display, donate_interface-big-amount-value +ignored = donate_interface-medium-amount-value, donate_interface-small-amount-value optional = donate_interface-currency-display, donate_interface-pm-alipay, donate_interface-pm-bpay optional = donate_interface-pm-boletus, donate_interface-pm-directebanking, donate_interface-pm-eps optional = donate_interface-pm-enets, donate_interface-pm-giropay, donate_interface-pm-ideal optional = donate_interface-pm-nordea, donate_interface-pm-skrill, donate_interface-pm-sofort optional = donate_interface-pm-webmoney, donate_interface-pm-westernunion, donate_interface-pm-yandex -ignored = donate_interface-big-amount-display, donate_interface-medium-amount-display -ignored = donate_interface-small-amount-display, donate_interface-big-amount-value -ignored = donate_interface-medium-amount-value, donate_interface-small-amount-value optional = donate_interface-donor-fname-alt, donate_interface-donor-lname-alt, donate_interface-donor-postcode +optional = donate_interface-donor-fiscal_number-ar, donate_interface-donor-fiscal_number-bo, donate_interface-donor-fiscal_number-br +optional = donate_interface-donor-fiscal_number-cl, donate_interface-donor-fiscal_number-co, donate_interface-donor-fiscal_number-mx +optional = donate_interface-donor-fiscal_number-pe, donate_interface-donor-fiscal_number-uy +optional = donate_interface-error-msg-fiscal_number-ar, donate_interface-error-msg-fiscal_number-bo, donate_interface-error-msg-fiscal_number-br +optional = donate_interface-error-msg-fiscal_number-cl, donate_interface-error-msg-fiscal_number-co, donate_interface-error-msg-fiscal_number-mx +optional = donate_interface-error-msg-fiscal_number-pe, donate_interface-error-msg-fiscal_number-uy Donation Interface - Global Collect Gateway file = DonationInterface/globalcollect_gateway/i18n/%CODE%.json @@ -1722,6 +1728,9 @@ Php Tags Wiki +# Missing qqq +# Picture Game + Pluggable Auth Poem -- To view, visit https://gerrit.wikimedia.org/r/227419 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I204df3e349ee29a887e9dcae3527262320596057 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable ferm on mc1009 - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/227417 Change subject: Enable ferm on mc1009 .. Enable ferm on mc1009 Enable ferm on mc1009 ahead of the others, others will be enabled in a second step. Change-Id: I807805ee93df40f56062aacad2af0cc64d110ad1 --- M manifests/site.pp 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/17/227417/1 diff --git a/manifests/site.pp b/manifests/site.pp index 4af2e0d..4b2b4f9 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1650,7 +1650,7 @@ role maps::slave } -node /^mc(10[01][0-9])\.eqiad\.wmnet/ { +node /^mc(10[01][0-8])\.eqiad\.wmnet/ { role memcached include passwords::redis @@ -1663,6 +1663,19 @@ include redis::ganglia } +node /^mc(10[01][9])\.eqiad\.wmnet/ { + +role memcached +include passwords::redis + +file { '/a': +ensure = 'directory', +} + +include base::firewall +include redis +include redis::ganglia +} node /^mc20[01][0-9]\.codfw\.wmnet/ { role memcached -- To view, visit https://gerrit.wikimedia.org/r/227417 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I807805ee93df40f56062aacad2af0cc64d110ad1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff mmuhlenh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] exim: untangle exim4.conf between roles simplify - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: exim: untangle exim4.conf between roles simplify .. exim: untangle exim4.conf between roles simplify Our humongous one-size-fits-all exim4.conf ERB template was probably not the best idea when it was originally conceived, but it has become even less so as our needs have evolved and our config has grown organically. The exim4 configuration language can be challenging to the untrained eye already, but our template is barely readable even by our most experienced with exim team members who often mess it up when trying to make change (including yours truly). Moreover, while this was an attempt to be DRY, in practice there are multiple sections where there is little to no overlap (e.g. routers, transports). On those that there is overlap, it is known that the template is unable to cope with that as intended, with certain combinations resulting into an invalid exim configuration (e.g. mailman without being a secondary mail relay) This is the cover part 1 of a long series that has the purpose of untangling this mess, culiminating with a nail to the coffin of exim::roled. Change-Id: I1247cc99846bb206548aed6717c10d4d78557fb3 --- M manifests/mail.pp M templates/exim/exim4.conf.SMTP_IMAP_MM.erb 2 files changed, 5 insertions(+), 6 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/mail.pp b/manifests/mail.pp index 1bc238e..e584797 100644 --- a/manifests/mail.pp +++ b/manifests/mail.pp @@ -61,10 +61,13 @@ include privateexim::listserve include exim4::ganglia +$config_template = template('exim/exim4.conf.SMTP_IMAP_MM.erb') +$filter_template = template('exim/system_filter.conf.erb') + class { 'exim4': variant = 'heavy', -config = template('exim/exim4.conf.SMTP_IMAP_MM.erb'), -filter = template('exim/system_filter.conf.erb'), +config = $config_template, +filter = $filter_template, } file { '/etc/exim4/defer_domains': diff --git a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb index d09fea8..f8487e7 100644 --- a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb +++ b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb @@ -59,7 +59,6 @@ domainlist rt_domains = rt.wikimedia.org domainlist phab_domains = phabricator.wikimedia.org domainlist donate_domains = donate.wikimedia.org -domainlist spamassassin_domains = * hostlist wikimedia_nets = ; %= scope.lookupvar('network::constants::all_networks').join( ; ) % hostlist relay_from_hosts = ; @[] ; 127.0.0.1 ; ::1 ; % if @enable_mail_relay != false -%%= scope.lookupvar('network::constants::external_networks').join( ; ) %; 10.0.0.0/8% end % @@ -124,9 +123,6 @@ # Other never_users = root : daemon : bin ignore_bounce_errors_after = 0h - -# Hold mail for these domains (e.g. for testing/debugging) -hold_domains = %= @hold_domains.join( : ) % # force Gmail over IPv4 due to reports of bad spam reputation over IPv6 dns_ipv4_lookup = gmail-smtp-in.l.google.com : aspmx.l.google.com -- To view, visit https://gerrit.wikimedia.org/r/216635 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1247cc99846bb206548aed6717c10d4d78557fb3 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-07-28T10:00:01+0000 - change (mediawiki...Wikidata)
WikidataBuilder has uploaded a new change for review. https://gerrit.wikimedia.org/r/227433 Change subject: New Wikidata Build - 2015-07-28T10:00:01+ .. New Wikidata Build - 2015-07-28T10:00:01+ Change-Id: I5e305c20af3342ea190deed22de0c9ef0feefc7b --- M composer.lock M extensions/Wikibase/.jscsrc M extensions/Wikibase/.jshintignore M extensions/Wikibase/client/i18n/fi.json M extensions/Wikibase/client/i18n/tt-cyrl.json A extensions/Wikibase/lib/i18n/tt-cyrl.json M extensions/Wikibase/package.json M extensions/Wikibase/repo/i18n/de.json M extensions/Wikibase/repo/i18n/en.json M extensions/Wikibase/repo/i18n/es.json M extensions/Wikibase/repo/i18n/he.json M extensions/Wikibase/repo/i18n/lt.json M extensions/Wikibase/repo/i18n/pt.json M extensions/Wikibase/repo/i18n/qqq.json M extensions/Wikibase/repo/i18n/tt-cyrl.json M extensions/Wikibase/repo/includes/specials/SpecialNewEntity.php M extensions/Wikibase/repo/tests/phpunit/includes/api/GetEntitiesTest.php M extensions/Wikibase/repo/tests/phpunit/includes/api/ResultBuilderTest.php M extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.js M vendor/composer/installed.json 20 files changed, 290 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata refs/changes/33/227433/1 diff --git a/composer.lock b/composer.lock index 3a8ddcf..b3b642f 100644 --- a/composer.lock +++ b/composer.lock @@ -1326,12 +1326,12 @@ source: { type: git, url: https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;, -reference: 7d80a60c43ad630fa2339e30631ab9d1b41204e2 +reference: c437e8eb6dcf9e537a8d2373915e835f99691319 }, dist: { type: zip, -url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7d80a60c43ad630fa2339e30631ab9d1b41204e2;, -reference: 7d80a60c43ad630fa2339e30631ab9d1b41204e2, +url: https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/c437e8eb6dcf9e537a8d2373915e835f99691319;, +reference: c437e8eb6dcf9e537a8d2373915e835f99691319, shasum: }, require: { @@ -1399,7 +1399,7 @@ wikibaserepo, wikidata ], -time: 2015-07-26 19:42:34 +time: 2015-07-28 08:34:21 }, { name: wikibase/wikimedia-badges, diff --git a/extensions/Wikibase/.jscsrc b/extensions/Wikibase/.jscsrc index f66f6bd..312c030 100644 --- a/extensions/Wikibase/.jscsrc +++ b/extensions/Wikibase/.jscsrc @@ -3,12 +3,26 @@ preset: wikimedia, // - // Rules from wikimedia preset we don't follow + // Rules from wikimedia preset we don't yet? follow validateIndentation: null, requireMultipleVarDecl: null, disallowDanglingUnderscores: null, - requireSpacesInsideArrayBrackets: null, + requireSpacesInsideBrackets: null, + requireVarDeclFirst: null, + jsDoc: { + // what we don't yet follow is commented out + //checkAnnotations: jsduck5, + //checkParamNames: true, + requireParamTypes: true, + checkRedundantParams: true, + //checkReturnTypes: true, + checkRedundantReturns: true, + //requireReturnTypes: true, + //checkTypes: capitalizedNativeCase, + checkRedundantAccess: true + //requireNewlineAfterDescription: true + }, // // Own rules @@ -24,5 +38,5 @@ else ], - excludeFiles: [ node_modules/**, vendor/** ] + excludeFiles: [ node_modules/**, vendor/**, extensions/** ] } diff --git a/extensions/Wikibase/.jshintignore b/extensions/Wikibase/.jshintignore index a860310..48b4341 100644 --- a/extensions/Wikibase/.jshintignore +++ b/extensions/Wikibase/.jshintignore @@ -1 +1,3 @@ node_modules/** +vendor/** +extensions/** diff --git a/extensions/Wikibase/client/i18n/fi.json b/extensions/Wikibase/client/i18n/fi.json index 6413045..b9aa968 100644 --- a/extensions/Wikibase/client/i18n/fi.json +++ b/extensions/Wikibase/client/i18n/fi.json @@ -13,8 +13,8 @@ wikibase-client-desc: Wikibase-laajennuksen asiakasohjelma, tooltip-t-wikibase: Linkki yhdistettyyn keskustietovaraston kohteeseen, wikibase-after-page-move: Voit myös [$1 päivittää] sivuun liittyvän {{WBREPONAME}}-kohteen säilyttääksesi kielilinkit siirretyllä sivulla., - wikibase-after-page-move-queued: Tähän sivuun liitetty [$1 {{WBREPONAME}}-kohde] päivitetään pian automaattisesti., - wikibase-after-page-delete-queued: Tähän sivuun liitetty [$1 {{WBREPONAME}}-kohde] päivitetään pian
[MediaWiki-commits] [Gerrit] Upgrade to jscs 2.0 - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Upgrade to jscs 2.0 .. Upgrade to jscs 2.0 Disable some rules that we don't yet follow. Ignore extensions directory that may be there from composer. Bug: T107124 Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be --- M .jscsrc M package.json 2 files changed, 18 insertions(+), 4 deletions(-) Approvals: Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc index f66f6bd..312c030 100644 --- a/.jscsrc +++ b/.jscsrc @@ -3,12 +3,26 @@ preset: wikimedia, // - // Rules from wikimedia preset we don't follow + // Rules from wikimedia preset we don't yet? follow validateIndentation: null, requireMultipleVarDecl: null, disallowDanglingUnderscores: null, - requireSpacesInsideArrayBrackets: null, + requireSpacesInsideBrackets: null, + requireVarDeclFirst: null, + jsDoc: { + // what we don't yet follow is commented out + //checkAnnotations: jsduck5, + //checkParamNames: true, + requireParamTypes: true, + checkRedundantParams: true, + //checkReturnTypes: true, + checkRedundantReturns: true, + //requireReturnTypes: true, + //checkTypes: capitalizedNativeCase, + checkRedundantAccess: true + //requireNewlineAfterDescription: true + }, // // Own rules @@ -24,5 +38,5 @@ else ], - excludeFiles: [ node_modules/**, vendor/** ] + excludeFiles: [ node_modules/**, vendor/**, extensions/** ] } diff --git a/package.json b/package.json index 9fa2adb..43022cd 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ author: The Wikidata team, license: GPL-2.0+, devDependencies: { - jscs: ~1.13.1, + jscs: =2.0, jshint: } } -- To view, visit https://gerrit.wikimedia.org/r/227397 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: Jonas Kress (WMDE) jonas.kr...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Factor Rank (De)Serialization out of Lib - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/227425 Change subject: Factor Rank (De)Serialization out of Lib .. Factor Rank (De)Serialization out of Lib This could in turn be moved to DataModelSerialization Change-Id: I80baa29f474d97e3290e30b990e08cd977101c90 --- M lib/includes/serializers/ClaimSerializer.php M lib/tests/phpunit/serializers/ClaimSerializerTest.php M repo/includes/ChangeOp/ChangeOpStatementRank.php M repo/includes/Diff/ClaimDifferenceVisualizer.php A repo/includes/StatementRankSerializer.php M repo/includes/api/GetClaims.php A repo/tests/phpunit/includes/StatementRankSerializerTest.php M repo/tests/phpunit/includes/api/GetClaimsTest.php M view/src/ClaimHtmlGenerator.php 9 files changed, 151 insertions(+), 63 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/25/227425/1 diff --git a/lib/includes/serializers/ClaimSerializer.php b/lib/includes/serializers/ClaimSerializer.php index 269445a..6e85618 100644 --- a/lib/includes/serializers/ClaimSerializer.php +++ b/lib/includes/serializers/ClaimSerializer.php @@ -50,19 +50,7 @@ ); /** -* Returns the available ranks in serialized form. -* -* @since 0.3 -* -* @return string[] -*/ - public static function getRanks() { - return array_values( self::$rankMap ); - } - - /** * Unserializes the rank and returns an element from the Statement::RANK_ enum. -* Roundtrips with @see ClaimSerializer::serializeRank * * @since 0.3 * @@ -70,23 +58,9 @@ * * @return integer */ - public static function unserializeRank( $serializedRank ) { + private static function unserializeRank( $serializedRank ) { $ranks = array_flip( self::$rankMap ); return $ranks[$serializedRank]; - } - - /** -* Serializes the rank. -* Roundtrips with @see ClaimSerializer::unserializeRank -* -* @since 0.3 -* -* @param integer $rank -* -* @return string -*/ - public static function serializeRank( $rank ) { - return self::$rankMap[$rank]; } /** diff --git a/lib/tests/phpunit/serializers/ClaimSerializerTest.php b/lib/tests/phpunit/serializers/ClaimSerializerTest.php index 96921cc..7417d78 100644 --- a/lib/tests/phpunit/serializers/ClaimSerializerTest.php +++ b/lib/tests/phpunit/serializers/ClaimSerializerTest.php @@ -124,34 +124,4 @@ return $validArgs; } - public function rankProvider() { - $ranks = array( - Statement::RANK_NORMAL, - Statement::RANK_PREFERRED, - Statement::RANK_DEPRECATED, - ); - - return $this-arrayWrap( $ranks ); - } - - /** -* @dataProvider rankProvider -*/ - public function testRankSerialization( $rank ) { - $id = new PropertyId( 'P42' ); - $statement = new Statement( new PropertyNoValueSnak( $id ) ); - - $statement-setRank( $rank ); - - $serializer = new ClaimSerializer( new SnakSerializer() ); - - $serialization = $serializer-getSerialized( $statement ); - - $this-assertEquals( - $rank, - ClaimSerializer::unserializeRank( $serialization['rank'] ), - 'Roundtrip between rank serialization and unserialization' - ); - } - } diff --git a/repo/includes/ChangeOp/ChangeOpStatementRank.php b/repo/includes/ChangeOp/ChangeOpStatementRank.php index ce11a44..10f3c43 100644 --- a/repo/includes/ChangeOp/ChangeOpStatementRank.php +++ b/repo/includes/ChangeOp/ChangeOpStatementRank.php @@ -8,6 +8,7 @@ use Wikibase\DataModel\Snak\Snak; use Wikibase\DataModel\Statement\StatementListHolder; use Wikibase\Lib\Serializers\ClaimSerializer; +use Wikibase\StatementRankSerializer; use Wikibase\Summary; /** @@ -76,8 +77,12 @@ $this-updateSummary( $summary, null, '', $this-getSnakSummaryArgs( $statement-getMainSnak() ) ); if ( $summary !== null ) { + $statementRankSerializer = new StatementRankSerializer(); $summary-addAutoCommentArgs( - array( ClaimSerializer::serializeRank( $oldRank ), ClaimSerializer::serializeRank( $this-rank ) ) + array( + $statementRankSerializer-serialize( $oldRank ), + $statementRankSerializer-serialize( $this-rank ) + ) ); } diff --git
[MediaWiki-commits] [Gerrit] Increasing db1035 weight - change (operations/mediawiki-config)
Jcrespo has uploaded a new change for review. https://gerrit.wikimedia.org/r/227428 Change subject: Increasing db1035 weight .. Increasing db1035 weight The rpc errors have reduced substantially, increasing load for db1035. Change-Id: I62f9f64ed4c1ad0abf3d0904a549cd39ab395f61 --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/28/227428/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 2e67722..3b5d638 100755 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -112,7 +112,7 @@ 'db1038' = 0, # 1.4TB 64GB 'db1027' = 0, # 1.4TB 64GB, vslow, dump 'db1015' = 0, # 1.4TB 64GB, watchlist, recentchanges, contributions, logpager - 'db1035' = 40, # 1.4TB 64GB + 'db1035' = 100, # 1.4TB 64GB 'db1044' = 400, # 1.4TB 64GB ), 's4' = array( -- To view, visit https://gerrit.wikimedia.org/r/227428 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62f9f64ed4c1ad0abf3d0904a549cd39ab395f61 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo jcre...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix logevents for pagetranslation - change (labs...crosswatch)
Sitic has submitted this change and it was merged. Change subject: Fix logevents for pagetranslation .. Fix logevents for pagetranslation Add i18n logevent strings for pagetranslation, fix error handling when logtype/logaction not recognized. Change-Id: Iddfe60d9e4c0c22869653613d0e11e4d4a902a9d --- M frontend/src/components/watchlist/logevent.directive.html M frontend/src/i18n/en.json 2 files changed, 20 insertions(+), 8 deletions(-) Approvals: Sitic: Verified; Looks good to me, approved diff --git a/frontend/src/components/watchlist/logevent.directive.html b/frontend/src/components/watchlist/logevent.directive.html index 415c966..5e4a762 100644 --- a/frontend/src/components/watchlist/logevent.directive.html +++ b/frontend/src/components/watchlist/logevent.directive.html @@ -4,7 +4,7 @@ span ng-switch-when=delete translate=LOGEVENT_DELETE_DELETE translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=restore translate=LOGEVENT_DELETE_RESTORE translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=revision translate=LOGEVENT_DELETE_REVISION translate-values=event translate-interpolation=custom translate-compile/span -span ng-switch-default{{event}}/span !-- debug fallback -- +span ng-switch-defaultcode{{event}}/code/span !-- debug fallback -- /span /span span ng-switch-when=protect @@ -13,7 +13,7 @@ span ng-switch-when=move_prot translate=LOGEVENT_PROTECT_MOVE translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=protect translate=LOGEVENT_PROTECT_PROTECT translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=unprotect translate=LOGEVENT_PROTECT_UNPROTECT translate-values=event translate-interpolation=custom translate-compile/span -span ng-switch-default{{event}}/span !-- debug fallback -- +span ng-switch-defaultcode{{event}}/code/span !-- debug fallback -- /span /span span ng-switch-when=move @@ -24,15 +24,15 @@ span ng-switch-when=block translate=LOGEVENT_BLOCK_BLOCK translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=reblock translate=LOGEVENT_BLOCK_REBLOCK translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=unblock translate=LOGEVENT_BLOCK_UNBLOCK translate-values=event translate-interpolation=custom translate-compile/span -span ng-switch-default{{event}}/span !-- debug fallback -- +span ng-switch-defaultcode{{event}}/code/span !-- debug fallback -- /span /span span ng-switch-when=rights span ng-switch=::event.logaction span ng-switch-when=autopromote translate=LOGEVENT_RIGHTS_AUTOPROMOTE translate-values=event translate-interpolation=custom translate-compile/span -span ng-switch-when=erevoke{{::event}} !-- TODO, seems to be unused by WMF --/span +span ng-switch-when=erevokecode{{event}}/code !-- TODO, seems to be unused by WMF --/span span ng-switch-when=rights translate=LOGEVENT_RIGHTS_RIGHTS translate-values=event translate-interpolation=custom translate-compile/span -span ng-switch-default{{event}}/span !-- debug fallback -- +span ng-switch-defaultcode{{event}}/code/span !-- debug fallback -- /span /span span ng-switch-when=upload @@ -40,14 +40,14 @@ span ng-switch-when=overwrite translate=LOGEVENT_UPLOAD_OVERWRITE translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=revert translate=LOGEVENT_UPLOAD_REVERT translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=upload translate=LOGEVENT_UPLOAD_UPLOAD translate-values=event translate-interpolation=custom translate-compile/span -span ng-switch-default{{event}}/span !-- debug fallback -- +span ng-switch-defaultcode{{event}}/code/span !-- debug fallback -- /span /span span ng-switch-when=import span ng-switch=::event.logaction span ng-switch-when=interwiki translate=LOGEVENT_IMPORT_INTERWIKI translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=upload translate=LOGEVENT_IMPORT_UPLOAD translate-values=event translate-interpolation=custom translate-compile/span -span ng-switch-default{{event}}/span !-- debug fallback -- +span ng-switch-defaultcode{{event}}/code/span !-- debug fallback -- /span /span span ng-switch-when=merge @@ -58,11 +58,20 @@ span ng-switch-when=create translate=LOGEVENT_NEWUSERS_CREATE translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=create2 translate=LOGEVENT_NEWUSERS_CREATE2 translate-values=event translate-interpolation=custom translate-compile/span span ng-switch-when=byemail
[MediaWiki-commits] [Gerrit] RedisBagOStuff: if no alternatives, skip master link status ... - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/227618 Change subject: RedisBagOStuff: if no alternatives, skip master link status check .. RedisBagOStuff: if no alternatives, skip master link status check If RedisBagOStuff::getConnection() is able to establish a connection, only check the master link status if automatic failover is enabled and if there are other viable servers left to consider. If there are no servers left to consider, or if automatic failover is not configured, just return the connection handle without subjecting it to further tests. This will have the side-effect of making RedisBagOStuff compatible with Nutcracker, which does not implement the INFO command. This is because when MediaWiki is configured to use Nutcracker, the server pool will consist of a single server (namely, Nutcracker itself), and thus there will be no other server to consider, so INFO will never be executed. Change-Id: I3812ec5a0b22df122bdf44350bc0496574c02ce8 --- M includes/objectcache/RedisBagOStuff.php 1 file changed, 29 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/18/227618/1 diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php index b8a0dd5..7e506f0 100644 --- a/includes/objectcache/RedisBagOStuff.php +++ b/includes/objectcache/RedisBagOStuff.php @@ -372,31 +372,30 @@ } } - foreach ( $candidates as $tag ) { + while ( ( $tag = array_shift( $candidates ) ) !== false ) { $server = $this-serverTagMap[$tag]; - $conn = $this-redisPool-getConnection( $server ); if ( !$conn ) { continue; } - try { - $info = $conn-info(); - // Check if this server has an unreachable redis master - if ( $info['role'] === 'slave' -$info['master_link_status'] === 'down' -$this-automaticFailover - ) { - // If the master cannot be reached, fail-over to the next server. - // If masters are in data-center A, and slaves in data-center B, - // this helps avoid the case were fail-over happens in A but not - // to the corresponding server in B (e.g. read/write mismatch). + // If automatic failover is enabled, check that the server's link + // to its master (if any) is up -- but only if there are other + // viable candidates left to consider. + if ( $this-automaticFailover $candidates ) { + try { + if ( $this-getMasterLinkStatus( $conn ) === 'down' ) { + // If the master cannot be reached, fail-over to the next server. + // If masters are in data-center A, and slaves in data-center B, + // this helps avoid the case were fail-over happens in A but not + // to the corresponding server in B (e.g. read/write mismatch). + continue; + } + } catch ( RedisException $e ) { + // Server is not accepting commands + $this-handleException( $conn, $e ); continue; } - } catch ( RedisException $e ) { - // Server is not accepting commands - $this-handleException( $conn, $e ); - continue; } return array( $server, $conn ); @@ -408,6 +407,19 @@ } /** +* Check the master link status of a Redis server that is configured as a slave. +* @param RedisConnRef $conn +* @return string|null Master link status (either 'up' or 'down'), or null +* if the server is not a slave. +*/ + protected function getMasterLinkStatus( RedisConnRef $conn ) { + $info = $conn-info(); + return isset( $info['master_link_status'] ) + ? $info['master_link_status'] + : null; + } + + /** * Log a fatal error
[MediaWiki-commits] [Gerrit] RedisBagOStuff: if no alternatives, skip master link status ... - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/227617 Change subject: RedisBagOStuff: if no alternatives, skip master link status check .. RedisBagOStuff: if no alternatives, skip master link status check If RedisBagOStuff::getConnection() is able to establish a connection, only check the master link status if automatic failover is enabled and if there are other viable servers left to consider. If there are no servers left to consider, or if automatic failover is not configured, just return the connection handle without subjecting it to further tests. This will have the side-effect of making RedisBagOStuff compatible with Nutcracker, which does not implement the INFO command. This is because when MediaWiki is configured to use Nutcracker, the server pool will consist of a single server (namely, Nutcracker itself), and thus there will be no other server to consider, so INFO will never be executed. Change-Id: I3812ec5a0b22df122bdf44350bc0496574c02ce8 --- M includes/objectcache/RedisBagOStuff.php 1 file changed, 29 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/17/227617/1 diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php index b8a0dd5..7e506f0 100644 --- a/includes/objectcache/RedisBagOStuff.php +++ b/includes/objectcache/RedisBagOStuff.php @@ -372,31 +372,30 @@ } } - foreach ( $candidates as $tag ) { + while ( ( $tag = array_shift( $candidates ) ) !== false ) { $server = $this-serverTagMap[$tag]; - $conn = $this-redisPool-getConnection( $server ); if ( !$conn ) { continue; } - try { - $info = $conn-info(); - // Check if this server has an unreachable redis master - if ( $info['role'] === 'slave' -$info['master_link_status'] === 'down' -$this-automaticFailover - ) { - // If the master cannot be reached, fail-over to the next server. - // If masters are in data-center A, and slaves in data-center B, - // this helps avoid the case were fail-over happens in A but not - // to the corresponding server in B (e.g. read/write mismatch). + // If automatic failover is enabled, check that the server's link + // to its master (if any) is up -- but only if there are other + // viable candidates left to consider. + if ( $this-automaticFailover $candidates ) { + try { + if ( $this-getMasterLinkStatus( $conn ) === 'down' ) { + // If the master cannot be reached, fail-over to the next server. + // If masters are in data-center A, and slaves in data-center B, + // this helps avoid the case were fail-over happens in A but not + // to the corresponding server in B (e.g. read/write mismatch). + continue; + } + } catch ( RedisException $e ) { + // Server is not accepting commands + $this-handleException( $conn, $e ); continue; } - } catch ( RedisException $e ) { - // Server is not accepting commands - $this-handleException( $conn, $e ); - continue; } return array( $server, $conn ); @@ -408,6 +407,19 @@ } /** +* Check the master link status of a Redis server that is configured as a slave. +* @param RedisConnRef $conn +* @return string|null Master link status (either 'up' or 'down'), or null +* if the server is not a slave. +*/ + protected function getMasterLinkStatus( RedisConnRef $conn ) { + $info = $conn-info(); + return isset( $info['master_link_status'] ) + ? $info['master_link_status'] + : null; + } + + /** * Log a fatal error
[MediaWiki-commits] [Gerrit] Update and restart services during git-update - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Update and restart services during git-update .. Update and restart services during git-update Thus far, running vagrant git-update would update the git repos of services living in /vagrant/srv. This patch enhances its behaviour by also performing a dependency update and a service restart. For a service to do that, it must declare a service::gitupdate block specifying which updates need to be carried out and whether the service should be restarted. A configuration file for each service is then placed in /etc/mw-vagrant/services/ and later read by run-git-update. This patch also updates all of the service modules to use it. Note: this patch also contains a fix for the phabricator module, instructing it to connect to MySQL via the TCP socket, not the UNIX one (the latter has been disabled in the new HHVM version packaged by WMF). Bug: T101749 Change-Id: I7ec1d2eaa3a003d4c3bfb80a29fa11fb64506407 --- M puppet/hieradata/common.yaml M puppet/modules/arcanist/manifests/init.pp M puppet/modules/crm/manifests/init.pp M puppet/modules/iegreview/manifests/init.pp M puppet/modules/mediawiki/manifests/init.pp M puppet/modules/mediawiki/manifests/jobrunner.pp M puppet/modules/mediawiki/manifests/parsoid.pp M puppet/modules/mediawiki/templates/run-git-update.erb M puppet/modules/mwv/manifests/init.pp M puppet/modules/phabricator/manifests/init.pp M puppet/modules/role/manifests/phragile.pp M puppet/modules/scholarships/manifests/init.pp A puppet/modules/service/files/confd/.gitignore A puppet/modules/service/manifests/gitupdate.pp M puppet/modules/service/manifests/init.pp M puppet/modules/service/manifests/node.pp A puppet/modules/service/templates/gitupdate.conf.erb M puppet/modules/smashpig/manifests/init.pp M puppet/modules/zotero/manifests/init.pp 19 files changed, 288 insertions(+), 37 deletions(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 5ba9368..c10506d 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -5,6 +5,7 @@ - '::puppet::agent' mwv::files_dir: /srv +mwv::etc_dir: /etc/mw-vagrant mwv::services_dir: /vagrant/srv mwv::vendor_dir: /srv mwv::enable_cachefilesd: true @@ -248,6 +249,7 @@ sentry::admin_pass: vagrant service::root_dir: %{hiera('mwv::services_dir')} +service::conf_dir: %{hiera('mwv::etc_dir')}/services service::log_dir: /vagrant/logs service::log_level: info diff --git a/puppet/modules/arcanist/manifests/init.pp b/puppet/modules/arcanist/manifests/init.pp index 6f62b7c..cdc5e7e 100644 --- a/puppet/modules/arcanist/manifests/init.pp +++ b/puppet/modules/arcanist/manifests/init.pp @@ -25,4 +25,13 @@ env::profile_script { 'add arcanist bin to path': content = export PATH=\$PATH:${deploy_dir}/arcanist/bin, } + +service::gitupdate { 'libphutil': +dir = ${deploy_dir}/libphutil, +} + +service::gitupdate { 'arcanist': +dir = ${deploy_dir}/arcanist, +} + } diff --git a/puppet/modules/crm/manifests/init.pp b/puppet/modules/crm/manifests/init.pp index 9ea1e02..c6706cd 100644 --- a/puppet/modules/crm/manifests/init.pp +++ b/puppet/modules/crm/manifests/init.pp @@ -46,6 +46,12 @@ require = Git::Clone[$repo], } +service::gitupdate { 'crm': +dir= $dir, +type = 'php', +update = true, +} + # required by module ganglia_reporter package { 'ganglia-monitor': } diff --git a/puppet/modules/iegreview/manifests/init.pp b/puppet/modules/iegreview/manifests/init.pp index 7c8531d..99fcc67 100644 --- a/puppet/modules/iegreview/manifests/init.pp +++ b/puppet/modules/iegreview/manifests/init.pp @@ -54,6 +54,10 @@ directory = $deploy_dir, } +service::gitupdate { 'iegreview': +dir = $deploy_dir, +} + # Create an application database mysql::db { $db_name: ensure = present, diff --git a/puppet/modules/mediawiki/manifests/init.pp b/puppet/modules/mediawiki/manifests/init.pp index e5ef274..b983c16 100644 --- a/puppet/modules/mediawiki/manifests/init.pp +++ b/puppet/modules/mediawiki/manifests/init.pp @@ -73,6 +73,8 @@ require ::php require ::hhvm +require ::service + include ::mediawiki::apache include ::mediawiki::jobrunner include ::mediawiki::multiwiki diff --git a/puppet/modules/mediawiki/manifests/jobrunner.pp b/puppet/modules/mediawiki/manifests/jobrunner.pp index 056e99c..64a5d9b 100644 --- a/puppet/modules/mediawiki/manifests/jobrunner.pp +++ b/puppet/modules/mediawiki/manifests/jobrunner.pp @@ -22,6 +22,11 @@ default = 'running', } +$restart = $enable ? { +false = false, +default = true, +} + git::clone { 'mediawiki/services/jobrunner': directory = $dir,
[MediaWiki-commits] [Gerrit] tests: Twist the time in comparison tests in a different manner - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: tests: Twist the time in comparison tests in a different manner .. tests: Twist the time in comparison tests in a different manner The OO.ui.Element#updateThemeClasses is asynchronous and debounced so that multiple state changes during widget initialization, which would normally each require a theme classes update, require only one. However, in comparison tests we need to wait for the updates to complete, or better yet, we want them to be synchronous because that makes life so much easier. Until now we ran the debounced method manually for the root widget, but that obviously only works for the root widget, and would cause the tests to fail in cryptic ways when the root widget included other widgets which needed their theme classes to be updated (I4e8e755e66916abffb90516519fe2b8fc4b48cd7, Ie14a35fac70d62ff7d102caaa56654ebde11d7dd). So let's try something else: make the OO.ui.Element#updateThemeClasses method not be debounced or asynchronous for the tests. It's a bit more evil, and requires a weird check in FlaggedElement (but we already have such workarounds for methods being called before their class is done constructing in various places in the library), but should be a bit more reliable. Change-Id: I4460919cd424a67fed98a06735b86e19f34b1fba --- M src/mixins/FlaggedElement.js M tests/JSPHP.test.karma.js M tests/JSPHP.test.standalone.js 3 files changed, 12 insertions(+), 10 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/src/mixins/FlaggedElement.js b/src/mixins/FlaggedElement.js index bd35427..400c5d6 100644 --- a/src/mixins/FlaggedElement.js +++ b/src/mixins/FlaggedElement.js @@ -100,7 +100,8 @@ * @return {boolean} The flag is set */ OO.ui.mixin.FlaggedElement.prototype.hasFlag = function ( flag ) { - return flag in this.flags; + // This may be called before the constructor, thus before this.flags is set + return this.flags ( flag in this.flags ); }; /** @@ -109,7 +110,8 @@ * @return {string[]} Flag names */ OO.ui.mixin.FlaggedElement.prototype.getFlags = function () { - return Object.keys( this.flags ); + // This may be called before the constructor, thus before this.flags is set + return Object.keys( this.flags || {} ); }; /** diff --git a/tests/JSPHP.test.karma.js b/tests/JSPHP.test.karma.js index 5e181c0..9fe2db1 100644 --- a/tests/JSPHP.test.karma.js +++ b/tests/JSPHP.test.karma.js @@ -31,14 +31,10 @@ $( 'body' ).append( instance.$element, $fromPhp ); - // Updating theme classes is normally debounced, we need to do it immediately - instance.debouncedUpdateThemeClasses(); - testName = JSON.stringify( test.config ); assert.equalDomElement( instance.$element[ 0 ], $fromPhp[ 0 ], testName, true ); infused = OO.ui.infuse( $fromPhp[ 0 ] ); - infused.debouncedUpdateThemeClasses(); assert.equalDomElement( instance.$element[ 0 ], infused.$element[ 0 ], testName + ' (infuse)', true ); instance.$element.add( infused.$element ).detach(); @@ -46,6 +42,10 @@ } ); } + // Updating theme classes is normally debounced, we need to do it immediately + // if we want the tests to be synchronous + OO.ui.Element.prototype.updateThemeClasses = OO.ui.Element.prototype.debouncedUpdateThemeClasses; + /*global testSuiteConfigs, testSuitePHPOutput */ for ( klassName in testSuiteConfigs ) { for ( theme in themes ) { diff --git a/tests/JSPHP.test.standalone.js b/tests/JSPHP.test.standalone.js index 1cbebc3..dcd4560 100644 --- a/tests/JSPHP.test.standalone.js +++ b/tests/JSPHP.test.standalone.js @@ -32,20 +32,20 @@ fromPhp = document.getElementById( id ).firstChild; instance.$element.insertBefore( fromPhp ); - // Updating theme classes is normally debounced, we need to do it immediately - instance.debouncedUpdateThemeClasses(); - testName = JSON.stringify( test.config ); assert.equalDomElement( instance.$element[ 0 ], fromPhp, testName ); infused = OO.ui.infuse( fromPhp ); - infused.debouncedUpdateThemeClasses(); assert.equalDomElement( instance.$element[ 0 ], infused.$element[ 0 ], testName + ' (infuse)' ); } } ); } + // Updating theme classes is normally debounced,
[MediaWiki-commits] [Gerrit] Replace perl inline with proper script - change (integration/config)
JanZerebecki has uploaded a new change for review. https://gerrit.wikimedia.org/r/227625 Change subject: Replace perl inline with proper script .. Replace perl inline with proper script Bug: T106433 Change-Id: I7a335d4e6009b203b03bb89900a968b90b2b92c4 --- M jjb/wikidata.yaml 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/25/227625/1 diff --git a/jjb/wikidata.yaml b/jjb/wikidata.yaml index 35600ab..8ad0b49 100644 --- a/jjb/wikidata.yaml +++ b/jjb/wikidata.yaml @@ -4,10 +4,7 @@ - shell: | set -eu cd $WORKSPACE/src/ -cat ../deps.txt | perl -ne ' - BEGIN { print { \extra\: { \merge-plugin\: { \include\: [; $lineend=; }; - if ( /^mediawiki\/extensions/ ) { s/^mediawiki\///; s/\n/\/composer.json/; $print=$lineend\n\$_\; $lineend=,; print $print } - END{ print \n] } } }\n };' composer.local.json + /srv/deployment/integration/slave-scripts/bin/mw-create-composer-local.py ../deps.txt composer.local.json timeout 300 composer update --prefer-source -vvv # FIXME BUG the first run just exits without error without finishing especially in a clean working copy timeout 300 composer update --prefer-source -vvv -- To view, visit https://gerrit.wikimedia.org/r/227625 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a335d4e6009b203b03bb89900a968b90b2b92c4 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: JanZerebecki jan.wikime...@zerebecki.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] enable ipsec for all eqiad text caches - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: enable ipsec for all eqiad text caches .. enable ipsec for all eqiad text caches Bug: T81543 Change-Id: Ibdd028c0243893e474fd3853071a01fccde9d2e4 --- M manifests/site.pp 1 file changed, 1 insertion(+), 6 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index eb6708a..bc10901 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -401,13 +401,8 @@ } node /^cp10(5[2-5]|6[5-8])\.eqiad\.wmnet$/ { - interface::add_ip6_mapped { 'main': } -if $::hostname =~ /^cp10(5[345]|65)$/ { -role cache::text, ipsec -} else { -role cache::text -} +role cache::text, ipsec } node 'cp1056.eqiad.wmnet', 'cp1057.eqiad.wmnet', 'cp1069.eqiad.wmnet', 'cp1070.eqiad.wmnet' { -- To view, visit https://gerrit.wikimedia.org/r/219817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibdd028c0243893e474fd3853071a01fccde9d2e4 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: Gage jger...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] On page views, update usage tracking via the job queue. - change (mediawiki...Wikibase)
Aude has submitted this change and it was merged. Change subject: On page views, update usage tracking via the job queue. .. On page views, update usage tracking via the job queue. In some cases, we need to update the usage tracking table during normal page views. In this case, we should not write to the database directly, but schedule a job instead. Bug: T103429 Change-Id: Ied1db3f2ab802ac7d7638b63844598374bd59812 --- M client/WikibaseClient.php M client/includes/Hooks/DataUpdateHookHandlers.php M client/includes/Usage/EntityUsage.php A client/includes/store/AddUsagesForPageJob.php M client/includes/store/ClientStore.php M client/includes/store/sql/DirectSqlStore.php M client/tests/phpunit/MockClientStore.php A client/tests/phpunit/includes/AddUsagesForPageJobTest.php M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php M client/tests/phpunit/includes/Usage/EntityUsageTest.php 10 files changed, 449 insertions(+), 28 deletions(-) Approvals: Aude: Verified; Looks good to me, approved Addshore: Looks good to me, but someone else must approve diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 6fb840c..9a9ae33 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -67,6 +67,7 @@ global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks; global $wgAPIMetaModules, $wgAPIPropModules, $wgSpecialPages, $wgResourceModules; global $wgWBClientSettings, $wgRecentChangesFlags, $wgMessagesDirs; + global $wgJobClasses; $wgExtensionCredits['wikibase'][] = array( 'path' = __DIR__, @@ -121,6 +122,9 @@ // extension hooks $wgHooks['WikibaseDeleteData'][] = '\Wikibase\ClientHooks::onWikibaseDeleteData'; + // job classes + $wgJobClasses['wikibase-addUsagesForPage'] = 'Wikibase\Client\Store\AddUsagesForPageJob'; + // api modules $wgAPIMetaModules['wikibase'] = array( 'class' = 'Wikibase\ApiClientInfo', diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php b/client/includes/Hooks/DataUpdateHookHandlers.php index 8b12966..42d9d78 100644 --- a/client/includes/Hooks/DataUpdateHookHandlers.php +++ b/client/includes/Hooks/DataUpdateHookHandlers.php @@ -3,6 +3,8 @@ namespace Wikibase\Client\Hooks; use Content; +use JobQueueGroup; +use JobSpecification; use LinksUpdate; use ManualLogEntry; use ParserCache; @@ -10,7 +12,9 @@ use ParserOutput; use Title; use User; +use Wikibase\Client\Store\AddUsagesForPageJob; use Wikibase\Client\Store\UsageUpdater; +use Wikibase\Client\Usage\EntityUsage; use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\Client\WikibaseClient; use WikiPage; @@ -34,19 +38,15 @@ */ private $usageUpdater; + /** +* @var JobQueueGroup +*/ + private $jobScheduler; + public static function newFromGlobalState() { - $wikibaseClient = WikibaseClient::getDefaultInstance(); - $settings = $wikibaseClient-getSettings(); - - $usageUpdater = new UsageUpdater( - $settings-getSetting( 'siteGlobalID' ), - $wikibaseClient-getStore()-getUsageTracker(), - $wikibaseClient-getStore()-getUsageLookup(), - $wikibaseClient-getStore()-getSubscriptionManager() - ); - return new DataUpdateHookHandlers( - $usageUpdater + WikibaseClient::getDefaultInstance()-getStore()-getUsageUpdater(), + JobQueueGroup::singleton() ); } @@ -113,9 +113,11 @@ } public function __construct( - UsageUpdater $usageUpdater + UsageUpdater $usageUpdater, + JobQueueGroup $jobScheduler ) { $this-usageUpdater = $usageUpdater; + $this-jobScheduler = $jobScheduler; } /** @@ -169,13 +171,22 @@ // These timestamps should usually be the same, but asking $title may cause a database query. $touched = $parserOutput-getTimestamp() ?: $title-getTouched(); + if ( count( $usageAcc-getUsages() ) === 0 ) { + // no usages, bail out + return; + } + // Add or touch any usages present in the new rendering. // This allows us to track usages in each user language separately, for multilingual sites. - $this-usageUpdater-addUsagesForPage( - $title-getArticleId(), - $usageAcc-getUsages(), - $touched - ); + + // NOTE: Since parser cache updates may be triggered by page views (in a new language), + // schedule the usage updates
[MediaWiki-commits] [Gerrit] Update liuggio/statsd-php-client: v1.0.12 - v1.0.16 - change (mediawiki/vendor)
BryanDavis has submitted this change and it was merged. Change subject: Update liuggio/statsd-php-client: v1.0.12 - v1.0.16 .. Update liuggio/statsd-php-client: v1.0.12 - v1.0.16 core patch: I6e013485175c63a984d2de205dc45704483d149b Bug: T106457 Change-Id: I307b58f4abe4d615ac9b2f86f50d0c5d6b906d83 --- M composer.json M composer.lock M composer/autoload_classmap.php M composer/installed.json A liuggio/statsd-php-client/CHANGELOG.md R liuggio/statsd-php-client/README.md M liuggio/statsd-php-client/composer.json R liuggio/statsd-php-client/phpunit.xml M liuggio/statsd-php-client/src/Liuggio/StatsdClient/Entity/StatsdData.php M liuggio/statsd-php-client/src/Liuggio/StatsdClient/Entity/StatsdDataInterface.php A liuggio/statsd-php-client/src/Liuggio/StatsdClient/Service/StatsdService.php M liuggio/statsd-php-client/src/Liuggio/StatsdClient/StatsdClient.php A liuggio/statsd-php-client/tests/Liuggio/StatsdClient/Service/StatsdServiceTest.php 13 files changed, 408 insertions(+), 77 deletions(-) Approvals: BryanDavis: Verified; Looks good to me, approved diff --git a/composer.json b/composer.json index 58cb882..f39dadc 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ require: { cssjanus/cssjanus: 1.1.1, leafo/lessphp: 0.5.0, - liuggio/statsd-php-client: 1.0.12, + liuggio/statsd-php-client: 1.0.16, kzykhys/pygments: 1.0, php: =5.3.3, psr/log: 1.0.0, diff --git a/composer.lock b/composer.lock index 2687e5c..fbb6606 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, This file is @generated automatically ], -hash: af634b8b312618a08a2034c5ced2d1e2, +hash: 88a5c97aa15fe4a052b5a37bb6bc12c1, packages: [ { name: cssjanus/cssjanus, @@ -115,20 +115,20 @@ }, { name: liuggio/statsd-php-client, -version: v1.0.12, +version: v1.0.16, source: { type: git, url: https://github.com/liuggio/statsd-php-client.git;, -reference: a8c9ccd2a3af6cc49c7fc4f5f689d7b148ab19d7 +reference: a84fbef1a7afbfafd0ca4f1ebae4935bd1a7d920 }, dist: { type: zip, -url: https://api.github.com/repos/liuggio/statsd-php-client/zipball/a8c9ccd2a3af6cc49c7fc4f5f689d7b148ab19d7;, -reference: a8c9ccd2a3af6cc49c7fc4f5f689d7b148ab19d7, +url: https://api.github.com/repos/liuggio/statsd-php-client/zipball/a84fbef1a7afbfafd0ca4f1ebae4935bd1a7d920;, +reference: a84fbef1a7afbfafd0ca4f1ebae4935bd1a7d920, shasum: }, require: { -php: =5.2 +php: =5.3.2 }, require-dev: { monolog/monolog: =1.2.0 @@ -160,7 +160,7 @@ php, statsd ], -time: 2014-09-17 21:37:49 +time: 2015-04-27 08:12:26 }, { name: mediawiki/at-ease, diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php index b346fe7..a8d8445 100644 --- a/composer/autoload_classmap.php +++ b/composer/autoload_classmap.php @@ -343,6 +343,7 @@ 'Liuggio\\StatsdClient\\Sender\\SenderInterface' = $vendorDir . '/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Sender/SenderInterface.php', 'Liuggio\\StatsdClient\\Sender\\SocketSender' = $vendorDir . '/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Sender/SocketSender.php', 'Liuggio\\StatsdClient\\Sender\\SysLogSender' = $vendorDir . '/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Sender/SysLogSender.php', +'Liuggio\\StatsdClient\\Service\\StatsdService' = $vendorDir . '/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Service/StatsdService.php', 'Liuggio\\StatsdClient\\StatsdClient' = $vendorDir . '/liuggio/statsd-php-client/src/Liuggio/StatsdClient/StatsdClient.php', 'Liuggio\\StatsdClient\\StatsdClientInterface' = $vendorDir . '/liuggio/statsd-php-client/src/Liuggio/StatsdClient/StatsdClientInterface.php', 'Monolog\\ErrorHandler' = $vendorDir . '/monolog/monolog/src/Monolog/ErrorHandler.php', diff --git a/composer/installed.json b/composer/installed.json index 5965594..2734067 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -227,57 +227,6 @@ homepage: https://www.mediawiki.org/wiki/CDB; }, { -name: liuggio/statsd-php-client, -version: v1.0.12, -version_normalized: 1.0.12.0, -source: { -type: git, -url: https://github.com/liuggio/statsd-php-client.git;, -reference:
[MediaWiki-commits] [Gerrit] Log errors in Http::request() - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Log errors in Http::request() .. Log errors in Http::request() Instead of silently discarding errors in server-side HTTP requests, log them to a 'http' channel. Make ForeignAPIFile::httpGet() (which sort of reimplements Http::get()) log to the same channel, for consistency. Bug: T103043 Change-Id: Ibf552e22adc7fde4a751f92e92dad6ceba2f335c --- M includes/HttpFunctions.php M includes/filerepo/ForeignAPIRepo.php 2 files changed, 12 insertions(+), 4 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 7b43a2d..fec8adc 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -25,6 +25,8 @@ * @defgroup HTTP HTTP */ +use MediaWiki\Logger\LoggerFactory; + /** * Various HTTP related functions * @ingroup HTTP @@ -73,11 +75,14 @@ $req = MWHttpRequest::factory( $url, $options, $caller ); $status = $req-execute(); - $content = false; if ( $status-isOK() ) { - $content = $req-getContent(); + return $req-getContent(); + } else { + $errors = $status-getErrorsByType( 'error' ); + $logger = LoggerFactory::getInstance( 'http' ); + $logger-warning( $status-getWikiText(), array( 'caller' = $caller ) ); + return false; } - return $content; } /** diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index ec84762..4ffbf4a 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -21,6 +21,8 @@ * @ingroup FileRepo */ +use MediaWiki\Logger\LoggerFactory; + /** * A foreign repository with a remote MediaWiki with an API thingy * @@ -521,7 +523,8 @@ if ( $status-isOK() ) { return $req-getContent(); } else { - wfDebug( ForeignAPIRepo: ERROR on GET: . $status-getWikiText() ); + $logger = LoggerFactory::getInstance( 'http' ); + $logger-warning( $status-getWikiText(), array( 'caller' = 'ForeignAPIRepo::httpGet' ) ); return false; } } -- To view, visit https://gerrit.wikimedia.org/r/223518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf552e22adc7fde4a751f92e92dad6ceba2f335c Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] group0 wikis to 1.26wmf16 - change (operations/mediawiki-config)
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/227599 Change subject: group0 wikis to 1.26wmf16 .. group0 wikis to 1.26wmf16 Change-Id: I4c9dadd465f11968b5247372c4d5a787d3a1bd2b --- A w/rl-test.php M w/static/current/extensions M w/static/current/resources M w/static/current/skins M wikiversions.json 5 files changed, 23 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/99/227599/1 diff --git a/w/rl-test.php b/w/rl-test.php new file mode 100644 index 000..998ceae --- /dev/null +++ b/w/rl-test.php @@ -0,0 +1,19 @@ +?php + +date_default_timezone_set( 'UTC' ); +header( 'Access-Control-Allow-Origin: *' ); +header( 'Content-Type: text/plain; charset=utf-8' ); + +$version = isset( $_GET['version'] ) is_numeric( $_GET['version'] ) ? intval( $_GET['version'] ) : '-'; +$date = date( 'r' ); + +$uname = posix_uname(); +if ( !isset( $uname['nodename'] ) || $uname['nodename'] !== 'mw1017' ) { + header( 'HTTP/1.0 404 Not Found' ); + echo /* nooo */\n; + exit; +} + +$ok = file_put_contents( '/tmp/rl-test.log', [$date] version: $version\n, FILE_APPEND ); +echo $ok ? /* yep */\n : /* nope */\n; +exit; diff --git a/w/static/current/extensions b/w/static/current/extensions index 25f0d12..b0af31f 12 --- a/w/static/current/extensions +++ b/w/static/current/extensions @@ -1 +1 @@ -/srv/mediawiki/php-1.26wmf15/extensions \ No newline at end of file +/srv/mediawiki/php-1.26wmf16/extensions \ No newline at end of file diff --git a/w/static/current/resources b/w/static/current/resources index 110de94..dfe6a15 12 --- a/w/static/current/resources +++ b/w/static/current/resources @@ -1 +1 @@ -/srv/mediawiki/php-1.26wmf15/resources \ No newline at end of file +/srv/mediawiki/php-1.26wmf16/resources \ No newline at end of file diff --git a/w/static/current/skins b/w/static/current/skins index 7b86736..47be9c5 12 --- a/w/static/current/skins +++ b/w/static/current/skins @@ -1 +1 @@ -/srv/mediawiki/php-1.26wmf15/skins \ No newline at end of file +/srv/mediawiki/php-1.26wmf16/skins \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index 140a336..3a413b0 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1 +1 @@
[MediaWiki-commits] [Gerrit] ~50KiB - change (apps...wikipedia)
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/227633 Change subject: ~50KiB .. ~50KiB Change-Id: I5eacc8c07844253974cba6eb479bbcc8c5a2fa4f --- M wikipedia/build.gradle M wikipedia/proguard-rules.pro M wikipedia/res/values/preference_keys.xml M wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java M wikipedia/src/main/java/org/wikipedia/Site.java A wikipedia/src/main/java/org/wikipedia/data/GsonMarshaller.java A wikipedia/src/main/java/org/wikipedia/data/GsonUnmarshaller.java A wikipedia/src/main/java/org/wikipedia/data/TabUnmarshaller.java M wikipedia/src/main/java/org/wikipedia/nearby/NearbyFragment.java M wikipedia/src/main/java/org/wikipedia/page/HtmlPageLoadStrategy.java M wikipedia/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java M wikipedia/src/main/java/org/wikipedia/page/PageBackStackItem.java M wikipedia/src/main/java/org/wikipedia/page/PageInfoDialog.java M wikipedia/src/main/java/org/wikipedia/page/PageLoadStrategy.java M wikipedia/src/main/java/org/wikipedia/page/PageProperties.java M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java M wikipedia/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java M wikipedia/src/main/java/org/wikipedia/page/tabs/Tab.java M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java M wikipedia/src/main/java/org/wikipedia/settings/Prefs.java 21 files changed, 236 insertions(+), 166 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/33/227633/1 diff --git a/wikipedia/build.gradle b/wikipedia/build.gradle index a950b19..d560a57 100644 --- a/wikipedia/build.gradle +++ b/wikipedia/build.gradle @@ -127,6 +127,7 @@ compile 'com.android.support:appcompat-v7:22.2.1' // includes support-v4 compile 'com.android.support:design:22.2.1' compile 'com.android.support:percent:22.2.0' +compile 'com.google.code.gson:gson:2.3.1' compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0' compile 'com.squareup.okhttp:okhttp:2.4.0' compile 'com.squareup:otto:1.3.6' diff --git a/wikipedia/proguard-rules.pro b/wikipedia/proguard-rules.pro index b0e4737..439f2f0 100644 --- a/wikipedia/proguard-rules.pro +++ b/wikipedia/proguard-rules.pro @@ -85,3 +85,21 @@ # Our code: -keep class org.wikipedia.** {*;} -keep class org.mediawiki.api.json.** {*;} + +##---Begin: proguard configuration for Gson -- +# https://github.com/google/gson/blob/master/examples/android-proguard-example/proguard.cfg +# Gson uses generic type information stored in a class file when working with fields. Proguard +# removes such information by default, so configure it to keep all of it. +#-keepattributes Signature (already specified) + +# For using GSON @Expose annotation (already specified) +#-keepattributes *Annotation* + +# Gson specific classes +-keep class sun.misc.Unsafe { *; } +#-keep class com.google.gson.stream.** { *; } + +# Application classes that will be serialized/deserialized over Gson +-keep class com.google.gson.examples.android.model.** { *; } + +##---End: proguard configuration for Gson -- diff --git a/wikipedia/res/values/preference_keys.xml b/wikipedia/res/values/preference_keys.xml index 2de5ee6..b0e674c 100644 --- a/wikipedia/res/values/preference_keys.xml +++ b/wikipedia/res/values/preference_keys.xml @@ -31,4 +31,5 @@ string name=preference_key_more_like_search_enabledmoreLikeSearchEnabled/string string name=preference_key_show_developer_settingsshowDeveloperSettings/string string name=preference_key_last_run_time_format%s-lastrun/string +string name=preference_key_tabstabs/string /resources diff --git a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java index 8605550..1fef961 100644 --- a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java @@ -91,7 +91,8 @@ return; } HistoryEntry historyEntry = new HistoryEntry(title, HistoryEntry.SOURCE_RANDOM); -((PageActivity) getActivity()).displayNewPage(title, historyEntry, false, true); +((PageActivity) getActivity()).displayNewPage(title, historyEntry, +PageActivity.TabPosition.CURRENT_TAB, true); } @Override @@ -185,7 +186,7 @@ Intent intent = new Intent(); switch (view.getId()) { case R.id.nav_item_today: -((PageActivity)getActivity()).displayMainPage(); +((PageActivity)getActivity()).displayMainPageInCurrentTab(); break;
[MediaWiki-commits] [Gerrit] On page views, update usage tracking via the job queue. - change (mediawiki...Wikibase)
Aude has submitted this change and it was merged. Change subject: On page views, update usage tracking via the job queue. .. On page views, update usage tracking via the job queue. In some cases, we need to update the usage tracking table during normal page views. In this case, we should not write to the database directly, but schedule a job instead. Bug: T103429 Change-Id: Ied1db3f2ab802ac7d7638b63844598374bd59812 (cherry picked from commit 2bdd21e427cac4f0f5a2a5cdcdd4a276633d7866) --- M client/WikibaseClient.php M client/includes/Hooks/DataUpdateHookHandlers.php M client/includes/Usage/EntityUsage.php A client/includes/store/AddUsagesForPageJob.php M client/includes/store/ClientStore.php M client/includes/store/sql/DirectSqlStore.php M client/tests/phpunit/MockClientStore.php A client/tests/phpunit/includes/AddUsagesForPageJobTest.php M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php M client/tests/phpunit/includes/Usage/EntityUsageTest.php 10 files changed, 449 insertions(+), 28 deletions(-) Approvals: Aude: Verified; Looks good to me, approved diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 6fb840c..9a9ae33 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -67,6 +67,7 @@ global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks; global $wgAPIMetaModules, $wgAPIPropModules, $wgSpecialPages, $wgResourceModules; global $wgWBClientSettings, $wgRecentChangesFlags, $wgMessagesDirs; + global $wgJobClasses; $wgExtensionCredits['wikibase'][] = array( 'path' = __DIR__, @@ -121,6 +122,9 @@ // extension hooks $wgHooks['WikibaseDeleteData'][] = '\Wikibase\ClientHooks::onWikibaseDeleteData'; + // job classes + $wgJobClasses['wikibase-addUsagesForPage'] = 'Wikibase\Client\Store\AddUsagesForPageJob'; + // api modules $wgAPIMetaModules['wikibase'] = array( 'class' = 'Wikibase\ApiClientInfo', diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php b/client/includes/Hooks/DataUpdateHookHandlers.php index 8b12966..42d9d78 100644 --- a/client/includes/Hooks/DataUpdateHookHandlers.php +++ b/client/includes/Hooks/DataUpdateHookHandlers.php @@ -3,6 +3,8 @@ namespace Wikibase\Client\Hooks; use Content; +use JobQueueGroup; +use JobSpecification; use LinksUpdate; use ManualLogEntry; use ParserCache; @@ -10,7 +12,9 @@ use ParserOutput; use Title; use User; +use Wikibase\Client\Store\AddUsagesForPageJob; use Wikibase\Client\Store\UsageUpdater; +use Wikibase\Client\Usage\EntityUsage; use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\Client\WikibaseClient; use WikiPage; @@ -34,19 +38,15 @@ */ private $usageUpdater; + /** +* @var JobQueueGroup +*/ + private $jobScheduler; + public static function newFromGlobalState() { - $wikibaseClient = WikibaseClient::getDefaultInstance(); - $settings = $wikibaseClient-getSettings(); - - $usageUpdater = new UsageUpdater( - $settings-getSetting( 'siteGlobalID' ), - $wikibaseClient-getStore()-getUsageTracker(), - $wikibaseClient-getStore()-getUsageLookup(), - $wikibaseClient-getStore()-getSubscriptionManager() - ); - return new DataUpdateHookHandlers( - $usageUpdater + WikibaseClient::getDefaultInstance()-getStore()-getUsageUpdater(), + JobQueueGroup::singleton() ); } @@ -113,9 +113,11 @@ } public function __construct( - UsageUpdater $usageUpdater + UsageUpdater $usageUpdater, + JobQueueGroup $jobScheduler ) { $this-usageUpdater = $usageUpdater; + $this-jobScheduler = $jobScheduler; } /** @@ -169,13 +171,22 @@ // These timestamps should usually be the same, but asking $title may cause a database query. $touched = $parserOutput-getTimestamp() ?: $title-getTouched(); + if ( count( $usageAcc-getUsages() ) === 0 ) { + // no usages, bail out + return; + } + // Add or touch any usages present in the new rendering. // This allows us to track usages in each user language separately, for multilingual sites. - $this-usageUpdater-addUsagesForPage( - $title-getArticleId(), - $usageAcc-getUsages(), - $touched - ); + + // NOTE: Since parser cache updates may be triggered by page views (in a new language), + // schedule the usage
[MediaWiki-commits] [Gerrit] Follow up to Ied1db3f, use lazyPush, remove unused imports, ... - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/227635 Change subject: Follow up to Ied1db3f, use lazyPush, remove unused imports, etc. .. Follow up to Ied1db3f, use lazyPush, remove unused imports, etc. * moved AddUsagesForPageJobTest to includes/store test subdirectory to be consistent with location of AddUsagesForPageJob. * removed unused imports. * use JobQueueGroup::lazyPush and EnqueueJob. (see how this is done in WikiPage to add refreshLinks) * add removeDuplicates to job specification. Change-Id: If209bbeb8871a3ac9e6c45b3258006a6b45bbad5 --- M client/includes/Hooks/DataUpdateHookHandlers.php M client/includes/Usage/EntityUsage.php M client/includes/store/AddUsagesForPageJob.php M client/includes/store/sql/DirectSqlStore.php M client/tests/phpunit/MockClientStore.php M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php R client/tests/phpunit/includes/store/AddUsagesForPageJobTest.php 7 files changed, 57 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/35/227635/1 diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php b/client/includes/Hooks/DataUpdateHookHandlers.php index 42d9d78..6776f65 100644 --- a/client/includes/Hooks/DataUpdateHookHandlers.php +++ b/client/includes/Hooks/DataUpdateHookHandlers.php @@ -3,8 +3,8 @@ namespace Wikibase\Client\Hooks; use Content; +use EnqueueJob; use JobQueueGroup; -use JobSpecification; use LinksUpdate; use ManualLogEntry; use ParserCache; @@ -14,7 +14,6 @@ use User; use Wikibase\Client\Store\AddUsagesForPageJob; use Wikibase\Client\Store\UsageUpdater; -use Wikibase\Client\Usage\EntityUsage; use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\Client\WikibaseClient; use WikiPage; @@ -162,7 +161,7 @@ * Implemented to update usage tracking information via UsageUpdater. * * @param ParserOutput $parserOutput -* @param $title $title +* @param Title $title */ public function doParserCacheSaveComplete( ParserOutput $parserOutput, Title $title ) { $usageAcc = new ParserOutputUsageAccumulator( $parserOutput ); @@ -186,7 +185,9 @@ //TODO: Before posting a job, check slave database. If no changes are needed, skip update. $addUsagesForPageJob = AddUsagesForPageJob::newSpec( $title, $usageAcc-getUsages(), $touched ); - $this-jobScheduler-push( $addUsagesForPageJob ); + $enqueueJob = EnqueueJob::newFromLocalJobs( $addUsagesForPageJob ); + + $this-jobScheduler-lazyPush( $enqueueJob ); } /** diff --git a/client/includes/Usage/EntityUsage.php b/client/includes/Usage/EntityUsage.php index ba6938e..864efce 100644 --- a/client/includes/Usage/EntityUsage.php +++ b/client/includes/Usage/EntityUsage.php @@ -4,7 +4,6 @@ use InvalidArgumentException; use Wikibase\DataModel\Entity\EntityId; -use Wikibase\DataModel\Entity\EntityIdParsingException; /** * Value object representing the usage of an entity. This includes information about diff --git a/client/includes/store/AddUsagesForPageJob.php b/client/includes/store/AddUsagesForPageJob.php index 90f2e16..335fd3e 100644 --- a/client/includes/store/AddUsagesForPageJob.php +++ b/client/includes/store/AddUsagesForPageJob.php @@ -64,7 +64,12 @@ 'touched' = $touched ); - return new JobSpecification( 'wikibase-addUsagesForPage', $jobParams, array(), $title ); + return new JobSpecification( + 'wikibase-addUsagesForPage', + $jobParams, + array( 'removeDuplicates' = true ), + $title + ); } /** diff --git a/client/includes/store/sql/DirectSqlStore.php b/client/includes/store/sql/DirectSqlStore.php index 40df459..80d42cf 100644 --- a/client/includes/store/sql/DirectSqlStore.php +++ b/client/includes/store/sql/DirectSqlStore.php @@ -476,4 +476,5 @@ $this-getSubscriptionManager() ); } + } diff --git a/client/tests/phpunit/MockClientStore.php b/client/tests/phpunit/MockClientStore.php index f09938e..5a78d04 100644 --- a/client/tests/phpunit/MockClientStore.php +++ b/client/tests/phpunit/MockClientStore.php @@ -202,4 +202,5 @@ $this-getSubscriptionManager() ); } + } diff --git a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php index 45b978a..f2b3976 100644 --- a/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php +++ b/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php @@ -2,7 +2,6 @@ namespace Wikibase\Client\Tests\Hooks; -use Job; use
[MediaWiki-commits] [Gerrit] On page views, update usage tracking via the job queue. - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/227634 Change subject: On page views, update usage tracking via the job queue. .. On page views, update usage tracking via the job queue. In some cases, we need to update the usage tracking table during normal page views. In this case, we should not write to the database directly, but schedule a job instead. Bug: T103429 Change-Id: Ied1db3f2ab802ac7d7638b63844598374bd59812 --- M client/WikibaseClient.php M client/includes/Hooks/DataUpdateHookHandlers.php M client/includes/Usage/EntityUsage.php A client/includes/store/AddUsagesForPageJob.php M client/includes/store/ClientStore.php M client/includes/store/sql/DirectSqlStore.php M client/tests/phpunit/MockClientStore.php A client/tests/phpunit/includes/AddUsagesForPageJobTest.php M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php M client/tests/phpunit/includes/Usage/EntityUsageTest.php 10 files changed, 448 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/34/227634/1 diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 4c48108..deefc1f 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -67,6 +67,7 @@ global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks; global $wgAPIMetaModules, $wgAPIPropModules, $wgSpecialPages, $wgResourceModules; global $wgWBClientSettings, $wgRecentChangesFlags, $wgMessagesDirs; + global $wgJobClasses; $wgExtensionCredits['wikibase'][] = array( 'path' = __DIR__, @@ -123,6 +124,9 @@ // extension hooks $wgHooks['WikibaseDeleteData'][]= '\Wikibase\ClientHooks::onWikibaseDeleteData'; + // job classes + $wgJobClasses['wikibase-addUsagesForPage'] = 'Wikibase\Client\Store\AddUsagesForPageJob'; + // api modules $wgAPIMetaModules['wikibase'] = array( 'class' = 'Wikibase\ApiClientInfo', diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php b/client/includes/Hooks/DataUpdateHookHandlers.php index 8b12966..42d9d78 100644 --- a/client/includes/Hooks/DataUpdateHookHandlers.php +++ b/client/includes/Hooks/DataUpdateHookHandlers.php @@ -3,6 +3,8 @@ namespace Wikibase\Client\Hooks; use Content; +use JobQueueGroup; +use JobSpecification; use LinksUpdate; use ManualLogEntry; use ParserCache; @@ -10,7 +12,9 @@ use ParserOutput; use Title; use User; +use Wikibase\Client\Store\AddUsagesForPageJob; use Wikibase\Client\Store\UsageUpdater; +use Wikibase\Client\Usage\EntityUsage; use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\Client\WikibaseClient; use WikiPage; @@ -34,19 +38,15 @@ */ private $usageUpdater; + /** +* @var JobQueueGroup +*/ + private $jobScheduler; + public static function newFromGlobalState() { - $wikibaseClient = WikibaseClient::getDefaultInstance(); - $settings = $wikibaseClient-getSettings(); - - $usageUpdater = new UsageUpdater( - $settings-getSetting( 'siteGlobalID' ), - $wikibaseClient-getStore()-getUsageTracker(), - $wikibaseClient-getStore()-getUsageLookup(), - $wikibaseClient-getStore()-getSubscriptionManager() - ); - return new DataUpdateHookHandlers( - $usageUpdater + WikibaseClient::getDefaultInstance()-getStore()-getUsageUpdater(), + JobQueueGroup::singleton() ); } @@ -113,9 +113,11 @@ } public function __construct( - UsageUpdater $usageUpdater + UsageUpdater $usageUpdater, + JobQueueGroup $jobScheduler ) { $this-usageUpdater = $usageUpdater; + $this-jobScheduler = $jobScheduler; } /** @@ -169,13 +171,22 @@ // These timestamps should usually be the same, but asking $title may cause a database query. $touched = $parserOutput-getTimestamp() ?: $title-getTouched(); + if ( count( $usageAcc-getUsages() ) === 0 ) { + // no usages, bail out + return; + } + // Add or touch any usages present in the new rendering. // This allows us to track usages in each user language separately, for multilingual sites. - $this-usageUpdater-addUsagesForPage( - $title-getArticleId(), - $usageAcc-getUsages(), - $touched - ); + + // NOTE: Since parser cache updates may be triggered by page views (in a new language), +
[MediaWiki-commits] [Gerrit] Fix SKIP_TMPFS conditional - change (integration/jenkins)
Dduvall has uploaded a new change for review. https://gerrit.wikimedia.org/r/227593 Change subject: Fix SKIP_TMPFS conditional .. Fix SKIP_TMPFS conditional The previous fix to the unbound variable error introduced incorrect logic for checking the SKIP_TMPFS flag. Change-Id: I723a82d02e670dda5c667e1384e0359adcb5a27a Follows-up: I6906fadede546ce2205797da1c6b267aed586e17 --- M bin/global-set-env.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/93/227593/1 diff --git a/bin/global-set-env.sh b/bin/global-set-env.sh index fccacd5..59254fd 100755 --- a/bin/global-set-env.sh +++ b/bin/global-set-env.sh @@ -7,7 +7,7 @@ # Dependent scripts/builders that have issues related to tmpfs, or a non-root # temporary filesystem, can set `SKIP_TMPFS` to keep keep the temporary # directory under /tmp. -if [ -d $HOME/tmpfs ] [ ${SKIP_TMPFS:-0} != 0 ]; then +if [ -d $HOME/tmpfs ] [ -z ${SKIP_TMPFS:-} ]; then # All slaves should have tmpfs mounted, use if available export TMPDIR=$HOME/tmpfs/jenkins-${EXECUTOR_NUMBER} else -- To view, visit https://gerrit.wikimedia.org/r/227593 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I723a82d02e670dda5c667e1384e0359adcb5a27a Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Dduvall dduv...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add temporary rl-test.php entry point - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Add temporary rl-test.php entry point .. Add temporary rl-test.php entry point This is used on mw1017 to gather some statistics while investigating the impact of bug T105255 and subsequently to confirm whether the suggested fix works. This was manually put on mw1017 but got removed due to scap. Bug: T105255 Change-Id: Ic7c9a8acb37238ab43c1888011cc1d596bf1951e --- A w/rl-test.php 1 file changed, 19 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/w/rl-test.php b/w/rl-test.php new file mode 100644 index 000..998ceae --- /dev/null +++ b/w/rl-test.php @@ -0,0 +1,19 @@ +?php + +date_default_timezone_set( 'UTC' ); +header( 'Access-Control-Allow-Origin: *' ); +header( 'Content-Type: text/plain; charset=utf-8' ); + +$version = isset( $_GET['version'] ) is_numeric( $_GET['version'] ) ? intval( $_GET['version'] ) : '-'; +$date = date( 'r' ); + +$uname = posix_uname(); +if ( !isset( $uname['nodename'] ) || $uname['nodename'] !== 'mw1017' ) { + header( 'HTTP/1.0 404 Not Found' ); + echo /* nooo */\n; + exit; +} + +$ok = file_put_contents( '/tmp/rl-test.log', [$date] version: $version\n, FILE_APPEND ); +echo $ok ? /* yep */\n : /* nope */\n; +exit; -- To view, visit https://gerrit.wikimedia.org/r/227358 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic7c9a8acb37238ab43c1888011cc1d596bf1951e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tag v0.12.2 - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: Tag v0.12.2 .. Tag v0.12.2 Change-Id: Ia87684daeeecf92bab0aecfd5c41245d8ea8f586 --- M History.md M package.json 2 files changed, 11 insertions(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/History.md b/History.md index 7533000..2d46b84 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,15 @@ # OOjs UI Release History +## v0.12.2 / 2015-07-28 + +### Styles +* Dialog: Increase z-index of .oo-ui-dialog to 1000+ (Prateek Saxena) +* MediaWiki theme: Create new 'accessibility' icon pack (Violetto) + +### Code +* SelectWidget: Fix @mixins documentation (Roan Kattouw) +* Update OOjs to v1.1.8 (James D. Forrester) + ## v0.12.1 / 2015-07-22 ### Features diff --git a/package.json b/package.json index e91869a..9c24ecf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { name: oojs-ui, - version: 0.12.1, + version: 0.12.2, description: User interface classes built on the OOjs framework., keywords: [ oojs-plugin, -- To view, visit https://gerrit.wikimedia.org/r/227598 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia87684daeeecf92bab0aecfd5c41245d8ea8f586 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix SKIP_TMPFS conditional - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: Fix SKIP_TMPFS conditional .. Fix SKIP_TMPFS conditional The previous fix to the unbound variable error introduced incorrect logic for checking the SKIP_TMPFS flag. Change-Id: I723a82d02e670dda5c667e1384e0359adcb5a27a Follows-up: I6906fadede546ce2205797da1c6b267aed586e17 --- M bin/global-set-env.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/global-set-env.sh b/bin/global-set-env.sh index fccacd5..59254fd 100755 --- a/bin/global-set-env.sh +++ b/bin/global-set-env.sh @@ -7,7 +7,7 @@ # Dependent scripts/builders that have issues related to tmpfs, or a non-root # temporary filesystem, can set `SKIP_TMPFS` to keep keep the temporary # directory under /tmp. -if [ -d $HOME/tmpfs ] [ ${SKIP_TMPFS:-0} != 0 ]; then +if [ -d $HOME/tmpfs ] [ -z ${SKIP_TMPFS:-} ]; then # All slaves should have tmpfs mounted, use if available export TMPDIR=$HOME/tmpfs/jenkins-${EXECUTOR_NUMBER} else -- To view, visit https://gerrit.wikimedia.org/r/227593 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I723a82d02e670dda5c667e1384e0359adcb5a27a Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T104744: fix data types for wikibase-item properties - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: T104744: fix data types for wikibase-item properties .. T104744: fix data types for wikibase-item properties Change-Id: I86156844791d11bd4ad9e2dbb3801feb0bcf50d7 --- M repo/includes/rdf/RdfBuilder.php M repo/tests/phpunit/data/rdf/Q4_props.nt M repo/tests/phpunit/includes/rdf/RdfBuilderTestData.php 3 files changed, 11 insertions(+), 11 deletions(-) Approvals: Thiemo Mättig (WMDE): Looks good to me, but someone else must approve JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/rdf/RdfBuilder.php b/repo/includes/rdf/RdfBuilder.php index fb9200d..c7f58bd 100644 --- a/repo/includes/rdf/RdfBuilder.php +++ b/repo/includes/rdf/RdfBuilder.php @@ -349,7 +349,7 @@ */ private function propertyIsLink( Property $property ) { // For now, it's very simple but can be more complex later - return $property-getDataTypeId() == 'wikibase-entityid'; + return in_array( $property-getDataTypeId(), array('wikibase-item', 'wikibase-property', 'url', 'commonsMedia') ); } /** diff --git a/repo/tests/phpunit/data/rdf/Q4_props.nt b/repo/tests/phpunit/data/rdf/Q4_props.nt index e5abb8b..8917378 100644 --- a/repo/tests/phpunit/data/rdf/Q4_props.nt +++ b/repo/tests/phpunit/data/rdf/Q4_props.nt @@ -93,7 +93,7 @@ http://acme.test/P9 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://wikiba.se/ontology-beta#Property . http://acme.test/P9 http://www.w3.org/2000/01/rdf-schema#label Property9@en . http://acme.test/P9 http://www.w3.org/2004/02/skos/core#prefLabel Property9@en . -http://acme.test/P2 http://wikiba.se/ontology-beta#propertyType http://wikiba.se/ontology-beta#WikibaseEntityid . +http://acme.test/P2 http://wikiba.se/ontology-beta#propertyType http://wikiba.se/ontology-beta#WikibaseItem . http://acme.test/P3 http://wikiba.se/ontology-beta#propertyType http://wikiba.se/ontology-beta#CommonsMedia . http://acme.test/P4 http://wikiba.se/ontology-beta#propertyType http://wikiba.se/ontology-beta#Globecoordinate . http://acme.test/P5 http://wikiba.se/ontology-beta#propertyType http://wikiba.se/ontology-beta#Monolingualtext . @@ -222,12 +222,12 @@ http://acme.test/prop/statement/P2 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . http://acme.test/prop/statement/value/P2 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . http://acme.test/prop/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . -http://acme.test/prop/direct/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#DatatypeProperty . -http://acme.test/prop/qualifier/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#DatatypeProperty . +http://acme.test/prop/direct/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . +http://acme.test/prop/qualifier/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . http://acme.test/prop/qualifier/value/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . -http://acme.test/prop/reference/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#DatatypeProperty . +http://acme.test/prop/reference/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . http://acme.test/prop/reference/value/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . -http://acme.test/prop/statement/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#DatatypeProperty . +http://acme.test/prop/statement/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . http://acme.test/prop/statement/value/P3 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . http://acme.test/prop/P4 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . http://acme.test/prop/direct/P4 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#DatatypeProperty . @@ -270,10 +270,10 @@ http://acme.test/prop/statement/P8 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#DatatypeProperty . http://acme.test/prop/statement/value/P8 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . http://acme.test/prop/P9 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#ObjectProperty . -http://acme.test/prop/direct/P9 http://www.w3.org/1999/02/22-rdf-syntax-ns#type
[MediaWiki-commits] [Gerrit] adding mobrovac to graphoid-admins - change (operations/puppet)
RobH has submitted this change and it was merged. Change subject: adding mobrovac to graphoid-admins .. adding mobrovac to graphoid-admins mobrovac needs to be able to restart graphoid during debugging. this was granted in ops meeting disucssion on 2015-07-27. T106814 Change-Id: Ia9c8c29677731520c5fbe780fea35461ffcb66d2 --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: RobH: Looks good to me, approved John F. Lewis: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index d726f2e..fa2910c 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -310,7 +310,7 @@ graphoid-admin: gid: 750 description: group of graphoid admins -members: [yurik] +members: [mobrovac, yurik] privileges: ['ALL = NOPASSWD: /usr/sbin/service graphoid *', 'ALL = (graphoid) NOPASSWD: ALL'] traceback-roots: -- To view, visit https://gerrit.wikimedia.org/r/227601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia9c8c29677731520c5fbe780fea35461ffcb66d2 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH r...@wikimedia.org Gerrit-Reviewer: John F. Lewis johnflewi...@gmail.com Gerrit-Reviewer: RobH r...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Map some GC codes to message about transient errors - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/227606 Change subject: Map some GC codes to message about transient errors .. Map some GC codes to message about transient errors Encourage users to try again soon for cases where the error manual's suggested action is to try again. Favorites: 4311130 PBS_SERVICE_NOT_AVAILABLE, 4500600 BOKU ERROR Change-Id: Ifeae5f7a8c6db7ee88dd410b5a14e32a98bdb2fb --- M globalcollect_gateway/globalcollect.adapter.php 1 file changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/06/227606/1 diff --git a/globalcollect_gateway/globalcollect.adapter.php b/globalcollect_gateway/globalcollect.adapter.php index 4907dc4..8e9eedf 100644 --- a/globalcollect_gateway/globalcollect.adapter.php +++ b/globalcollect_gateway/globalcollect.adapter.php @@ -235,6 +235,31 @@ 430452 = 'globalcollect_gateway-response-default', // Not authorised :: This message was generated when trying to attempt a direct debit transaction from Belgium. 430900 = 'globalcollect_gateway-response-default', // NO VALID PROVIDERS FOUND FOR COMBINATION MERCHANTID: , PAYMENTPRODUCT: NNN, COUNTRYCODE: XX, CURRENCYCODE: XXX + // Errors where the suggested action is to try again + 20205 = 'donate_interface-try-again', // COULD NOT START TRANSACTION + 103000 = 'donate_interface-try-again', // ANOTHER_ACTION_IS_IN_PROCESS + 400850 = 'donate_interface-try-again', // IDEAL_SYSTEM_MAINTENANCE + 430150 = 'donate_interface-try-again', // READ_REQUEST_EXCEPTION + 430160 = 'donate_interface-try-again', // Unable to authorize ALL_TERMINAL_IDS_FOR_MERCHANT_CURRENCY_IN_USE + 430215 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_101 + 430220 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_103 + 430225 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_111 + 430230 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_113 + 430235 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_183 + 430240 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_601 + 430245 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_605 + 430430 = 'donate_interface-try-again', // Unable to authorize TIMEOUT + 430433 = 'donate_interface-try-again', // Unable to authorize TOO_MUCH_USAGE + 430581 = 'donate_interface-try-again', // Not authorized SOFT_DECLINE_BUYER_HAS_ALTERNATE_FUNDING_SOURCE + 485000 = 'donate_interface-try-again', // Unable to authorize NEW_ACCOUNT_INFO_AVAILABLE + 485010 = 'donate_interface-try-again', // Unable to authorize TRY_AGAIN_LATER + 4311130 = 'donate_interface-try-again', // PBS_SERVICE_NOT_AVAILABLE + 4360025 = 'donate_interface-try-again', // ECARD SYSTEM ERROR + 4500600 = 'donate_interface-try-again', // BOKU ERROR + 4500700 = 'donate_interface-try-again', // SUB1 ERROR + 2245= 'donate_interface-try-again', // COMMUNICATION ERROR + 99 = 'donate_interface-try-again', // ERROR_IN_PROCESSING_THE_REQUEST + // Internal messages 'internal-' = 'donate_interface-processing-error', // Failed failed pre-process checks. 'internal-0001' = 'donate_interface-processing-error', // Transaction could not be processed due to an internal error. -- To view, visit https://gerrit.wikimedia.org/r/227606 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifeae5f7a8c6db7ee88dd410b5a14e32a98bdb2fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg eeggles...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update .gitmodules to track submodule branches - change (mediawiki/core)
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/227608 Change subject: update .gitmodules to track submodule branches .. update .gitmodules to track submodule branches Change-Id: Ia06e89ceaba6c2b2e232c4eb2be3582016dcc2eb --- M .gitmodules 1 file changed, 179 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/08/227608/1 diff --git a/.gitmodules b/.gitmodules index e8e00ba..3db50ac 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,486 +1,647 @@ -[submodule extensions/CentralNotice] - path = extensions/CentralNotice - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CentralNotice.git -[submodule extensions/DonationInterface] - path = extensions/DonationInterface - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DonationInterface.git -[submodule extensions/Wikidata] - path = extensions/Wikidata - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikidata.git -[submodule extensions/SemanticMediaWiki] - path = extensions/SemanticMediaWiki - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticMediaWiki.git -[submodule extensions/SemanticResultFormats] - path = extensions/SemanticResultFormats - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticResultFormats.git -[submodule extensions/Validator] - path = extensions/Validator - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Validator.git [submodule extensions/AbuseFilter] path = extensions/AbuseFilter url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AbuseFilter.git + branch = wmf/1.26wmf16 [submodule extensions/AccountAudit] path = extensions/AccountAudit url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AccountAudit.git + branch = wmf/1.26wmf16 [submodule extensions/ActiveAbstract] path = extensions/ActiveAbstract url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ActiveAbstract.git + branch = wmf/1.26wmf16 [submodule extensions/AntiSpoof] path = extensions/AntiSpoof url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AntiSpoof.git + branch = wmf/1.26wmf16 [submodule extensions/ApiFeatureUsage] path = extensions/ApiFeatureUsage url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ApiFeatureUsage.git + branch = wmf/1.26wmf16 [submodule extensions/ApiSandbox] path = extensions/ApiSandbox url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ApiSandbox.git + branch = wmf/1.26wmf16 [submodule extensions/Babel] path = extensions/Babel url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Babel.git + branch = wmf/1.26wmf16 [submodule extensions/BetaFeatures] path = extensions/BetaFeatures url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/BetaFeatures.git + branch = wmf/1.26wmf16 [submodule extensions/BounceHandler] path = extensions/BounceHandler url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/BounceHandler.git + branch = wmf/1.26wmf16 [submodule extensions/Calendar] path = extensions/Calendar url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Calendar.git + branch = wmf/1.26wmf16 [submodule extensions/Campaigns] path = extensions/Campaigns url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Campaigns.git + branch = wmf/1.26wmf16 [submodule extensions/CategoryTree] path = extensions/CategoryTree url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CategoryTree.git + branch = wmf/1.26wmf16 [submodule extensions/CentralAuth] path = extensions/CentralAuth url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CentralAuth.git + branch = wmf/1.26wmf16 [submodule extensions/CharInsert] path = extensions/CharInsert url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CharInsert.git + branch = wmf/1.26wmf16 [submodule extensions/CheckUser] path = extensions/CheckUser url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CheckUser.git + branch = wmf/1.26wmf16 [submodule extensions/CirrusSearch] path = extensions/CirrusSearch url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CirrusSearch.git + branch = wmf/1.26wmf16 [submodule extensions/Cite] path = extensions/Cite url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Cite.git + branch = wmf/1.26wmf16 [submodule extensions/CiteThisPage] path = extensions/CiteThisPage url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CiteThisPage.git + branch =
[MediaWiki-commits] [Gerrit] Labs: Subscribe self-hosted puppetmaster to hiera.yaml changes - change (operations/puppet)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/227622 Change subject: Labs: Subscribe self-hosted puppetmaster to hiera.yaml changes .. Labs: Subscribe self-hosted puppetmaster to hiera.yaml changes Currently, the local puppetmaster service for self-hosted puppet masters is neither subscribed to changes to nor requires /etc/puppet/hiera.yaml. This can cause the puppetmaster service to be started before the Hiera configuration is available, triggering failures of Hiera look-ups. This change subscribes the puppetmaster service for self-hosted puppet masters to the Hiera configuration, thus postponing its start until the Hiera configuration is written and restarting it when the meta-configuration changes. This will not cause (unnecessary) restarts of the puppetmaster service when the data files themselves beneath hieradata/ are changed. Bug: T107205 Change-Id: I6786399d6713106a7eae693559cdf0116618e19d --- M modules/puppet/manifests/self/master.pp 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/227622/1 diff --git a/modules/puppet/manifests/self/master.pp b/modules/puppet/manifests/self/master.pp index c987131..82cd63f 100644 --- a/modules/puppet/manifests/self/master.pp +++ b/modules/puppet/manifests/self/master.pp @@ -103,7 +103,9 @@ service { 'puppetmaster': ensure= 'running', require = Package['puppetmaster'], -subscribe = Class['puppet::self::config'], +subscribe = [Class['puppet::self::config'], + File['/etc/puppet/hieradata'], + File['/etc/puppet/hiera.yaml']], } include puppetmaster::scripts -- To view, visit https://gerrit.wikimedia.org/r/227622 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6786399d6713106a7eae693559cdf0116618e19d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Initial commit - change (WrappedString)
jenkins-bot has submitted this change and it was merged. Change subject: Initial commit .. Initial commit Change-Id: I6330ca5e3f83534dab0980c8a8527adac1b7c4ea --- A .editorconfig A .gitignore A .jshintrc A .travis.yml A Doxyfile A LICENSE A README.md A composer.json A phpcs.xml A phpunit.xml.dist A src/WrappedString.php A tests/WrappedStringTest.php 12 files changed, 368 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved Ori.livneh: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000..7c8c7ab --- /dev/null +++ b/.editorconfig @@ -0,0 +1,5 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = tab diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..c760786 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/coverage +/doc +/vendor +/composer.lock diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..0cc2a4a --- /dev/null +++ b/.jshintrc @@ -0,0 +1,12 @@ +{ + // Enforcing + bitwise: true, + eqeqeq: true, + freeze: true, + latedef: true, + noarg: true, + nonew: true, + undef: true, + unused: true, + node: true +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000..c25a516 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +sudo: false +language: php +php: + - 5.3.3 + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm +install: + - composer install +script: + - composer test diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 000..3aec825 --- /dev/null +++ b/Doxyfile @@ -0,0 +1,26 @@ +# Doxyfile for WrappedString +# +# See http://www.stack.nl/~dimitri/doxygen/manual/config.html +# for help on how to use this file to configure Doxygen. + +PROJECT_NAME = WrappedString +PROJECT_BRIEF = Automatically compact sequentially-outputted strings that share a common prefix / suffix pair. +OUTPUT_DIRECTORY = doc +JAVADOC_AUTOBRIEF = YES +QT_AUTOBRIEF = YES +WARN_NO_PARAMDOC = YES +INPUT = README.md src/ +FILE_PATTERNS = *.php +RECURSIVE = YES +USE_MDFILE_AS_MAINPAGE = README.md +HTML_DYNAMIC_SECTIONS = YES +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 250 +GENERATE_LATEX = NO +HAVE_DOT = YES +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +TEMPLATE_RELATIONS = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +DOT_MULTI_TARGETS = YES diff --git a/LICENSE b/LICENSE new file mode 100644 index 000..5d34a4b --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Timo Tijhof krinklem...@gmail.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the Software), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 000..a7c38b5 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +WrappedString += + +WrappedString is a small PHP library for compacting redundant string-wrapping +code in text output. The most common use-case is to eliminate redundant runs of +HTML open/close tags and JavaScript boilerplate. + +Here is how you use it: + +pre lang=php +use WrappedString\WrappedString; + +$buffer = array( + new WrappedString( 'scriptvar q = q || [];', 'q.push( 0 );', '/script' ), + new WrappedString( 'scriptvar q = q || [];', 'q.push( 1 );', '/script' ), +); +$output = WrappedString::join( \n, $buffer ); +// Result: 'scriptvar q = q || [];q.push( 0 );q.push( 1 );/script' +/pre + +License +--- + +The project is licensed under the MIT license. diff --git a/composer.json b/composer.json new file mode 100644 index 000..7e9319d --- /dev/null +++ b/composer.json @@ -0,0 +1,30 @@ +{ + name: wikimedia/wrappedstring, + description: Automatically compact sequentially-outputted strings that share a common prefix / suffix pair., +
[MediaWiki-commits] [Gerrit] Make python tests verbose. - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: Make python tests verbose. .. Make python tests verbose. Change-Id: Icb3cbca2cecc4537ed48054153ad366978921751 --- M .gitignore A setup.cfg 2 files changed, 3 insertions(+), 0 deletions(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index fdec625..391c3d0 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ !.gitignore !.pep8 !test-requirements.txt +!setup.cfg !tox.ini !phpunit.xml.dist !bin/ diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000..b93803a --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[nosetests] +verbosity = 2 -- To view, visit https://gerrit.wikimedia.org/r/227619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icb3cbca2cecc4537ed48054153ad366978921751 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Revert Conversion to using getMainStashInstance() - change (mediawiki...AbuseFilter)
jenkins-bot has submitted this change and it was merged. Change subject: Revert Revert Conversion to using getMainStashInstance() .. Revert Revert Conversion to using getMainStashInstance() This reverts commit e4e78dcc4dce11edc86a82b2ca98c73b470660bb. Change-Id: I9ec43428a5090eb940838c8580c73f049da0b833 --- M AbuseFilter.class.php M AbuseFilter.hooks.php M Views/AbuseFilterViewRevert.php M api/ApiAbuseFilterUnblockAutopromote.php 4 files changed, 11 insertions(+), 13 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php index b6b47b9..adeacd8 100755 --- a/AbuseFilter.class.php +++ b/AbuseFilter.class.php @@ -1307,10 +1307,12 @@ break; case 'blockautopromote': - global $wgUser, $wgMemc; + global $wgUser; if ( !$wgUser-isAnon() ) { $blockPeriod = (int)mt_rand( 3 * 86400, 7 * 86400 ); // Block for 3-7 days. - $wgMemc-set( self::autoPromoteBlockKey( $wgUser ), true, $blockPeriod ); + ObjectCache::getMainStashInstance()-set( + self::autoPromoteBlockKey( $wgUser ), true, $blockPeriod + ); $message = array( 'abusefilter-autopromote-blocked', diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php old mode 100644 new mode 100755 index 892d901..faaafb3 --- a/AbuseFilter.hooks.php +++ b/AbuseFilter.hooks.php @@ -277,11 +277,8 @@ * @return bool */ public static function onGetAutoPromoteGroups( $user, $promote ) { - global $wgMemc; - $key = AbuseFilter::autoPromoteBlockKey( $user ); - - if ( $wgMemc-get( $key ) ) { + if ( ObjectCache::getMainStashInstance()-get( $key ) ) { $promote = array(); } diff --git a/Views/AbuseFilterViewRevert.php b/Views/AbuseFilterViewRevert.php old mode 100644 new mode 100755 index 941fa66..c1a7738 --- a/Views/AbuseFilterViewRevert.php +++ b/Views/AbuseFilterViewRevert.php @@ -209,9 +209,9 @@ ); return true; case 'blockautopromote': - global $wgMemc; - $wgMemc-delete( AbuseFilter::autopromoteBlockKey( - User::newFromId( $result['userid'] ) ) ); + ObjectCache::getMainStashInstance()-delete( + AbuseFilter::autopromoteBlockKey( User::newFromId( $result['userid'] ) ) + ); return true; case 'degroup': // Pull the user's groups from the vars. diff --git a/api/ApiAbuseFilterUnblockAutopromote.php b/api/ApiAbuseFilterUnblockAutopromote.php old mode 100644 new mode 100755 index 73d1558..6b3cb17 --- a/api/ApiAbuseFilterUnblockAutopromote.php +++ b/api/ApiAbuseFilterUnblockAutopromote.php @@ -15,16 +15,15 @@ $this-dieUsage( $msg, 'notsuspended' ); } - global $wgMemc; $key = AbuseFilter::autoPromoteBlockKey( $user ); - - if ( !$wgMemc-get( $key ) ) { + $stash = ObjectCache::getMainStashInstance(); + if ( !$stash-get( $key ) ) { // Same as above :( $msg = wfMessage( 'abusefilter-reautoconfirm-none', $params['user'] )-text(); $this-dieUsage( $msg, 'notsuspended' ); } - $wgMemc-delete( $key ); + $stash-delete( $key ); $res = array( 'user' = $params['user'] ); $this-getResult()-addValue( null, $this-getModuleName(), $res ); -- To view, visit https://gerrit.wikimedia.org/r/227624 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9ec43428a5090eb940838c8580c73f049da0b833 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: wmf/1.26wmf15 Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 6d22fd1..85ca7d3 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 6d22fd1..85ca7d3 .. Syncronize VisualEditor: 6d22fd1..85ca7d3 Change-Id: Ibbca9a87a34f2db979b45502ea7f70ff19f09e04 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 6d22fd1..85ca7d3 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 6d22fd1aa77f088eb2c4f2f2f193d923a4c39ee7 +Subproject commit 85ca7d3e94234463733c4c903ccbdb247d634511 -- To view, visit https://gerrit.wikimedia.org/r/227626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibbca9a87a34f2db979b45502ea7f70ff19f09e04 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add experimental 'mwext-mw-selenium' for Echo and Flow - change (integration/config)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/227640 Change subject: Add experimental 'mwext-mw-selenium' for Echo and Flow .. Add experimental 'mwext-mw-selenium' for Echo and Flow Change-Id: I152659717f7ee0a689d82e7f3e5d83cd49f0dbe2 --- M zuul/layout.yaml 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/40/227640/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index e54272c..c6f0cb8 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -3548,6 +3548,8 @@ - name: npm check: - jsonlint +experimental: + - mwext-mw-selenium - name: mediawiki/extensions/EditAccount template: @@ -3663,6 +3665,7 @@ - mwext-Flow-testextension-hhvm - mwext-testextension-hhvm - mwext-testextension-zend + - mwext-mw-selenium postmerge: - mwext-Flow-jsduck-publish -- To view, visit https://gerrit.wikimedia.org/r/227640 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I152659717f7ee0a689d82e7f3e5d83cd49f0dbe2 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tag v0.12.2 - change (oojs/ui)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/227598 Change subject: Tag v0.12.2 .. Tag v0.12.2 Change-Id: Ia87684daeeecf92bab0aecfd5c41245d8ea8f586 --- M History.md M package.json 2 files changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/98/227598/1 diff --git a/History.md b/History.md index 7533000..2d46b84 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,15 @@ # OOjs UI Release History +## v0.12.2 / 2015-07-28 + +### Styles +* Dialog: Increase z-index of .oo-ui-dialog to 1000+ (Prateek Saxena) +* MediaWiki theme: Create new 'accessibility' icon pack (Violetto) + +### Code +* SelectWidget: Fix @mixins documentation (Roan Kattouw) +* Update OOjs to v1.1.8 (James D. Forrester) + ## v0.12.1 / 2015-07-22 ### Features diff --git a/package.json b/package.json index e91869a..9c24ecf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { name: oojs-ui, - version: 0.12.1, + version: 0.12.2, description: User interface classes built on the OOjs framework., keywords: [ oojs-plugin, -- To view, visit https://gerrit.wikimedia.org/r/227598 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia87684daeeecf92bab0aecfd5c41245d8ea8f586 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] HTMLForm: Move header formatting OOUI-specific code to OOUIH... - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/227605 Change subject: HTMLForm: Move header formatting OOUI-specific code to OOUIHTMLForm .. HTMLForm: Move header formatting OOUI-specific code to OOUIHTMLForm * Introduce a getter getHeaderText() and override it in OOUIHTMLForm. * While we're at it, also introduce getFooterText() (although right now we have no need to override this one). * Use both in HTMLForm where appropriate. Change-Id: I9a7234ed75b024f24e0a087c9c000bb2024b405f --- M includes/htmlform/HTMLForm.php M includes/htmlform/OOUIHTMLForm.php 2 files changed, 49 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/05/227605/1 diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 0678bdd..2be3144 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -713,6 +713,21 @@ } /** +* Get header text. +* +* @param string|null $section The section to get the header text for +* @since 1.26 +* @return string +*/ + function getHeaderText( $section = null ) { + if ( is_null( $section ) ) { + return $this-mHeader; + } else { + return isset( $this-mSectionHeaders[$section] ) ? $this-mSectionHeaders[$section] : ''; + } + } + + /** * Add footer text, inside the form. * * @param string $msg Complete text of message to display @@ -750,6 +765,21 @@ } return $this; + } + + /** +* Get footer text. +* +* @param string|null $section The section to get the footer text for +* @since 1.26 +* @return string +*/ + function getFooterText( $section = null ) { + if ( is_null( $section ) ) { + return $this-mFooter; + } else { + return isset( $this-mSectionFooters[$section] ) ? $this-mSectionFooters[$section] : ''; + } } /** @@ -873,12 +903,11 @@ $html = '' . $this-getErrors( $submitResult ) - // In OOUI forms, we handle mHeader elsewhere. FIXME This is horrible. - . ( $this-getDisplayFormat() === 'ooui' ? '' : $this-mHeader ) + . $this-getHeaderText() . $this-getBody() . $this-getHiddenFields() . $this-getButtons() - . $this-mFooter; + . $this-getFooterText(); $html = $this-wrapForm( $html ); @@ -1374,12 +1403,7 @@ $legend = $this-getLegend( $key ); - if ( isset( $this-mSectionHeaders[$key] ) ) { - $section = $this-mSectionHeaders[$key] . $section; - } - if ( isset( $this-mSectionFooters[$key] ) ) { - $section .= $this-mSectionFooters[$key]; - } + $section = $this-getHeaderText( $key ) . $section . $this-getFooterText( $key ); $attributes = array(); if ( $fieldsetIDPrefix ) { diff --git a/includes/htmlform/OOUIHTMLForm.php b/includes/htmlform/OOUIHTMLForm.php index ca8ca0f..3f12f1d 100644 --- a/includes/htmlform/OOUIHTMLForm.php +++ b/includes/htmlform/OOUIHTMLForm.php @@ -132,6 +132,22 @@ // TODO Write me! } + /** +* Get header text. +* +* @param string|null $section The section to get the header text for +* @since 1.26 +* @return string +*/ + function getHeaderText( $section = null ) { + if ( is_null( $section ) ) { + // We handle $this-mHeader elsewhere, in getBody() + return ''; + } else { + return parent::getHeaderText( $section ); + } + } + function getBody() { $fieldset = parent::getBody(); // FIXME This only works for forms with no subsections -- To view, visit https://gerrit.wikimedia.org/r/227605 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a7234ed75b024f24e0a087c9c000bb2024b405f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com
[MediaWiki-commits] [Gerrit] HTMLForm: Correct documentation - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/227602 Change subject: HTMLForm: Correct documentation .. HTMLForm: Correct documentation Change-Id: I84f4d886907b2ae988956563fda48e78afb3cfa6 --- M includes/htmlform/HTMLForm.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/02/227602/1 diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index b10d789..ac064bc 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -76,10 +76,10 @@ *'size'-- the length of text fields *'filter-callback -- a function name to give you the chance to * massage the inputted value before it's processed. - * @see HTMLForm::filter() + * @see HTMLFormField::filter() *'validation-callback' -- a function name to give you the chance * to impose extra validation on the field input. - * @see HTMLForm::validate() + * @see HTMLFormField::validate() *'name'-- By default, the 'name' attribute of the input field * is wp{$fieldname}. If you want a different name * (eg one without the wp prefix), specify it here and -- To view, visit https://gerrit.wikimedia.org/r/227602 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84f4d886907b2ae988956563fda48e78afb3cfa6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Log event on captcha display/success/failure. - change (mediawiki...ConfirmEdit)
jenkins-bot has submitted this change and it was merged. Change subject: Log event on captcha display/success/failure. .. Log event on captcha display/success/failure. Logs a 'captcha.display' event when a captcha is displayed, either via web or in an API response, and 'captcha.submit' when a captcha response is evaluated. Bug: T91701 Change-Id: I376fdd6740aca4f11776e1326ff2e7e6e5af6a75 --- M SimpleCaptcha/Captcha.php 1 file changed, 29 insertions(+), 2 deletions(-) Approvals: BryanDavis: Looks good to me, approved Florianschmidtwelzow: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php index 5847c98..0e43521 100755 --- a/SimpleCaptcha/Captcha.php +++ b/SimpleCaptcha/Captcha.php @@ -1,5 +1,7 @@ ?php +use MediaWiki\Logger\LoggerFactory; + class SimpleCaptcha { /** @var boolean|null Was the CAPTCHA already passed and if yes, with which result? */ private $captchaSolved = null; @@ -144,6 +146,10 @@ wfDebug( ConfirmEdit: user group allows skipping captcha on account creation\n ); return true; } + LoggerFactory::getInstance( 'authmanager' )-info( 'Captcha shown on account creation', array( + 'event' = 'captcha.display', + 'type' = 'accountcreation', + ) ); $captcha = div class='captcha' . $wgOut-parse( $this-getMessage( 'createaccount' ) ) . $this-getForm( $wgOut ) . @@ -169,6 +175,10 @@ if ( $this-isBadLoginTriggered() ) { global $wgOut; + LoggerFactory::getInstance( 'authmanager' )-info( 'Captcha shown on login', array( + 'event' = 'captcha.display', + 'type' = 'login', + ) ); $this-action = 'badlogin'; $captcha = div class='captcha' . $wgOut-parse( $this-getMessage( 'badlogin' ) ) . @@ -624,7 +634,13 @@ function confirmUserCreate( $u, $message, $status = null ) { if ( $this-needCreateAccountCaptcha() ) { $this-trigger = new account ' . $u-getName() . '; - if ( !$this-passCaptchaLimited() ) { + $success = $this-passCaptchaLimited(); + LoggerFactory::getInstance( 'authmanager' )-info( 'Captcha submitted on account creation', array( + 'event' = 'captcha.submit', + 'type' = 'accountcreation', + 'successful' = $success, + ) ); + if ( !$success ) { // For older MediaWiki $message = wfMessage( 'captcha-createaccount-fail' )-text(); // For MediaWiki 1.23+ @@ -674,7 +690,13 @@ return true; $this-trigger = post-badlogin login ' . $u-getName() . '; - if ( !$this-passCaptchaLimited() ) { + $success = $this-passCaptchaLimited(); + LoggerFactory::getInstance( 'authmanager' )-info( 'Captcha submitted on login', array( + 'event' = 'captcha.submit', + 'type' = 'login', + 'successful' = $success, + ) ); + if ( !$success ) { // Emulate a bad-password return to confuse the shit out of attackers $retval = LoginForm::WRONG_PASS; return false; @@ -957,6 +979,11 @@ if ( $warning['message'] === 'captcha-createaccount-fail' ) { $this-addCaptchaAPI( $result ); $result['result'] = 'NeedCaptcha'; + + LoggerFactory::getInstance( 'authmanager' )-info( 'Captcha data added in account creation API', array( + 'event' = 'captcha.display', + 'type' = 'accountcreation', + ) ); } } } -- To view, visit https://gerrit.wikimedia.org/r/226951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged
[MediaWiki-commits] [Gerrit] Add year and copyright holder in license - change (mediawiki...Blueprint)
jenkins-bot has submitted this change and it was merged. Change subject: Add year and copyright holder in license .. Add year and copyright holder in license Change-Id: I17fdec84139f19c1f1f35a42ac6881a91eb33bbb --- M COPYING 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved VolkerE: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/COPYING b/COPYING index 5b90145..a45812e 100644 --- a/COPYING +++ b/COPYING @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) year copyright holders +Copyright (c) 2015 Wikimedia Foundation and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal -- To view, visit https://gerrit.wikimedia.org/r/227412 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I17fdec84139f19c1f1f35a42ac6881a91eb33bbb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Prtksxna psax...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Paladox thomasmulhall...@yahoo.com Gerrit-Reviewer: Prtksxna psax...@wikimedia.org Gerrit-Reviewer: Spage sp...@wikimedia.org Gerrit-Reviewer: VolkerE ve...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up 8250c8ad54: unbreak ApiResponseCache - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Follow-up 8250c8ad54: unbreak ApiResponseCache .. Follow-up 8250c8ad54: unbreak ApiResponseCache .set() should not overwrite existing deferreds; instead, it should resolve the existing deferred if it's pending. This is necessary because .set() is used by processResult(). Without this, passing .get() a title that no information is known for results in a promise that is never resolved, because the associated deferred is overwritten as soon as the API response arrives. Still make .set() a no-op if data has already been set, by checking if the deferred is pending. For .resolve() this doesn't matter, but for modifying this.cacheValues it does. Bug: T107212 Change-Id: I70e8c5450f23062db214ccc5c585624d41de6509 --- M modules/ve-mw/init/ve.init.mw.ApiResponseCache.js 1 file changed, 8 insertions(+), 4 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js b/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js index 9b9e8f7..5143aec 100644 --- a/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js +++ b/modules/ve-mw/init/ve.init.mw.ApiResponseCache.js @@ -109,7 +109,7 @@ */ /** - * Add entries to the cache. + * Add entries to the cache. Does not overwrite already-set entries. * * @param {Object} entries Object keyed by page title, with the values being data objects * @fires add @@ -117,9 +117,13 @@ ve.init.mw.ApiResponseCache.prototype.set = function ( entries ) { var name; for ( name in entries ) { - this.deferreds[name] = $.Deferred(); - this.deferreds[name].resolve( entries[name] ); - this.cacheValues[name] = entries[name]; + if ( !Object.prototype.hasOwnProperty.call( this.deferreds, name ) ) { + this.deferreds[name] = $.Deferred(); + } + if ( this.deferreds[name].state() === 'pending' ) { + this.deferreds[name].resolve( entries[name] ); + this.cacheValues[name] = entries[name]; + } } this.emit( 'add', Object.keys( entries ) ); }; -- To view, visit https://gerrit.wikimedia.org/r/227590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70e8c5450f23062db214ccc5c585624d41de6509 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: wmf/1.26wmf16 Gerrit-Owner: Alex Monk kren...@gmail.com Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor for I70e8c545 - change (mediawiki/core)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/227607 Change subject: Update VisualEditor for I70e8c545 .. Update VisualEditor for I70e8c545 Change-Id: I401bb9ce651cde6a532bc5134ab69f3e52fe664c --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/07/227607/1 diff --git a/extensions/VisualEditor b/extensions/VisualEditor index 5a07b28..599d6c3 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit 5a07b2844efa1806206bb5c298e3c54c577e3d45 +Subproject commit 599d6c31d8af0bc04c7320a27dc751f9ec022049 -- To view, visit https://gerrit.wikimedia.org/r/227607 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I401bb9ce651cde6a532bc5134ab69f3e52fe664c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf16 Gerrit-Owner: Alex Monk kren...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Map some GC codes to message about transient errors - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Map some GC codes to message about transient errors .. Map some GC codes to message about transient errors Encourage users to try again soon for cases where the error manual's suggested action is to try again. Favorites: 4311130 PBS_SERVICE_NOT_AVAILABLE, 4500600 BOKU ERROR Change-Id: Ifeae5f7a8c6db7ee88dd410b5a14e32a98bdb2fb --- M globalcollect_gateway/globalcollect.adapter.php 1 file changed, 25 insertions(+), 0 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/globalcollect_gateway/globalcollect.adapter.php b/globalcollect_gateway/globalcollect.adapter.php index 4907dc4..8e9eedf 100644 --- a/globalcollect_gateway/globalcollect.adapter.php +++ b/globalcollect_gateway/globalcollect.adapter.php @@ -235,6 +235,31 @@ 430452 = 'globalcollect_gateway-response-default', // Not authorised :: This message was generated when trying to attempt a direct debit transaction from Belgium. 430900 = 'globalcollect_gateway-response-default', // NO VALID PROVIDERS FOUND FOR COMBINATION MERCHANTID: , PAYMENTPRODUCT: NNN, COUNTRYCODE: XX, CURRENCYCODE: XXX + // Errors where the suggested action is to try again + 20205 = 'donate_interface-try-again', // COULD NOT START TRANSACTION + 103000 = 'donate_interface-try-again', // ANOTHER_ACTION_IS_IN_PROCESS + 400850 = 'donate_interface-try-again', // IDEAL_SYSTEM_MAINTENANCE + 430150 = 'donate_interface-try-again', // READ_REQUEST_EXCEPTION + 430160 = 'donate_interface-try-again', // Unable to authorize ALL_TERMINAL_IDS_FOR_MERCHANT_CURRENCY_IN_USE + 430215 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_101 + 430220 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_103 + 430225 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_111 + 430230 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_113 + 430235 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_183 + 430240 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_601 + 430245 = 'donate_interface-try-again', // Unable to authorize COMMS_FAIL_605 + 430430 = 'donate_interface-try-again', // Unable to authorize TIMEOUT + 430433 = 'donate_interface-try-again', // Unable to authorize TOO_MUCH_USAGE + 430581 = 'donate_interface-try-again', // Not authorized SOFT_DECLINE_BUYER_HAS_ALTERNATE_FUNDING_SOURCE + 485000 = 'donate_interface-try-again', // Unable to authorize NEW_ACCOUNT_INFO_AVAILABLE + 485010 = 'donate_interface-try-again', // Unable to authorize TRY_AGAIN_LATER + 4311130 = 'donate_interface-try-again', // PBS_SERVICE_NOT_AVAILABLE + 4360025 = 'donate_interface-try-again', // ECARD SYSTEM ERROR + 4500600 = 'donate_interface-try-again', // BOKU ERROR + 4500700 = 'donate_interface-try-again', // SUB1 ERROR + 2245= 'donate_interface-try-again', // COMMUNICATION ERROR + 99 = 'donate_interface-try-again', // ERROR_IN_PROCESSING_THE_REQUEST + // Internal messages 'internal-' = 'donate_interface-processing-error', // Failed failed pre-process checks. 'internal-0001' = 'donate_interface-processing-error', // Transaction could not be processed due to an internal error. -- To view, visit https://gerrit.wikimedia.org/r/227606 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifeae5f7a8c6db7ee88dd410b5a14e32a98bdb2fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg eeggles...@wikimedia.org Gerrit-Reviewer: AndyRussG andrew.green...@gmail.com Gerrit-Reviewer: Awight awi...@wikimedia.org Gerrit-Reviewer: Ssmith ssm...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] RedisBagOStuff: if no alternatives, skip master link status ... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: RedisBagOStuff: if no alternatives, skip master link status check .. RedisBagOStuff: if no alternatives, skip master link status check If RedisBagOStuff::getConnection() is able to establish a connection, only check the master link status if automatic failover is enabled and if there are other viable servers left to consider. If there are no servers left to consider, or if automatic failover is not configured, just return the connection handle without subjecting it to further tests. This will have the side-effect of making RedisBagOStuff compatible with Nutcracker, which does not implement the INFO command. This is because when MediaWiki is configured to use Nutcracker, the server pool will consist of a single server (namely, Nutcracker itself), and thus there will be no other server to consider, so INFO will never be executed. Change-Id: I3812ec5a0b22df122bdf44350bc0496574c02ce8 --- M includes/objectcache/RedisBagOStuff.php 1 file changed, 29 insertions(+), 17 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php index b8a0dd5..7e506f0 100644 --- a/includes/objectcache/RedisBagOStuff.php +++ b/includes/objectcache/RedisBagOStuff.php @@ -372,31 +372,30 @@ } } - foreach ( $candidates as $tag ) { + while ( ( $tag = array_shift( $candidates ) ) !== false ) { $server = $this-serverTagMap[$tag]; - $conn = $this-redisPool-getConnection( $server ); if ( !$conn ) { continue; } - try { - $info = $conn-info(); - // Check if this server has an unreachable redis master - if ( $info['role'] === 'slave' -$info['master_link_status'] === 'down' -$this-automaticFailover - ) { - // If the master cannot be reached, fail-over to the next server. - // If masters are in data-center A, and slaves in data-center B, - // this helps avoid the case were fail-over happens in A but not - // to the corresponding server in B (e.g. read/write mismatch). + // If automatic failover is enabled, check that the server's link + // to its master (if any) is up -- but only if there are other + // viable candidates left to consider. + if ( $this-automaticFailover $candidates ) { + try { + if ( $this-getMasterLinkStatus( $conn ) === 'down' ) { + // If the master cannot be reached, fail-over to the next server. + // If masters are in data-center A, and slaves in data-center B, + // this helps avoid the case were fail-over happens in A but not + // to the corresponding server in B (e.g. read/write mismatch). + continue; + } + } catch ( RedisException $e ) { + // Server is not accepting commands + $this-handleException( $conn, $e ); continue; } - } catch ( RedisException $e ) { - // Server is not accepting commands - $this-handleException( $conn, $e ); - continue; } return array( $server, $conn ); @@ -408,6 +407,19 @@ } /** +* Check the master link status of a Redis server that is configured as a slave. +* @param RedisConnRef $conn +* @return string|null Master link status (either 'up' or 'down'), or null +* if the server is not a slave. +*/ + protected function getMasterLinkStatus( RedisConnRef $conn ) { + $info = $conn-info(); + return isset( $info['master_link_status'] ) + ? $info['master_link_status'] + : null; + } + + /** * Log a fatal error * @param string $msg */
[MediaWiki-commits] [Gerrit] Make python tests verbose. - change (integration/jenkins)
JanZerebecki has uploaded a new change for review. https://gerrit.wikimedia.org/r/227619 Change subject: Make python tests verbose. .. Make python tests verbose. Change-Id: Icb3cbca2cecc4537ed48054153ad366978921751 --- M .gitignore A setup.cfg 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/19/227619/1 diff --git a/.gitignore b/.gitignore index fdec625..391c3d0 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ !.gitignore !.pep8 !test-requirements.txt +!setup.cfg !tox.ini !phpunit.xml.dist !bin/ diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000..b93803a --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[nosetests] +verbosity = 2 -- To view, visit https://gerrit.wikimedia.org/r/227619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb3cbca2cecc4537ed48054153ad366978921751 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: JanZerebecki jan.wikime...@zerebecki.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add script to create a composer.local.json based on a list o... - change (integration/jenkins)
jenkins-bot has submitted this change and it was merged. Change subject: Add script to create a composer.local.json based on a list of extensions .. Add script to create a composer.local.json based on a list of extensions Change-Id: Id321bdb91e844d14275eac6a5f21a643ea283199 --- A bin/mw-create-composer-local.py A tests/test_mw-create-composer-local.py 2 files changed, 69 insertions(+), 0 deletions(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/mw-create-composer-local.py b/bin/mw-create-composer-local.py new file mode 100755 index 000..fd63709 --- /dev/null +++ b/bin/mw-create-composer-local.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +from __future__ import print_function + +Creates a composer.local.json file for the +composer-merge-plugin to read based on a list +of provided extensions. + +Usage: mw-create-composer-local.py extension_list.txt src/composer.local.json + + + +import json +import sys + + +def main(extlist_path, composerlocal_path): +with open(extlist_path) as f: +extensions = [ext.strip()[len('mediawiki/'):] + '/composer.json' + for ext in f.read().splitlines() + if ext.strip().startswith('mediawiki/extensions/')] + +out = { +'extra': { +'merge-plugin': { +'include': extensions +} +} +} + +with open(composerlocal_path, 'w') as f: +json.dump(out, f) + +print('Created composer.local.json.') + +if __name__ == '__main__': +if len(sys.argv) != 3: +print('Invalid number of arguments provided') +sys.exit(1) +main(sys.argv[1], sys.argv[2]) diff --git a/tests/test_mw-create-composer-local.py b/tests/test_mw-create-composer-local.py new file mode 100644 index 000..dbce092 --- /dev/null +++ b/tests/test_mw-create-composer-local.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python + +import imp +import os +import tempfile +import unittest +path = os.path.dirname(os.path.dirname(__file__)) \ ++ '/bin/mw-create-composer-local.py' +mw_create_composer_local = imp.load_source('mw-create-composer-local', path) + + +class TestMwCreateComposerLocal(unittest.TestCase): +def test_main(self): +_, el_path = tempfile.mkstemp() +with open(el_path, 'w') as f: +f.write( +mediawiki/extensions/FooBar +mediawiki/extensions/BarFoo + +mediawiki/extensions/BazFoo +.strip()) +_, clocal_path = tempfile.mkstemp() +mw_create_composer_local.main(el_path, clocal_path) +self.assertEqual( +open(clocal_path).read(), +'{extra: {merge-plugin: {include: [extensions/FooBar/compos' +'er.json, extensions/BarFoo/composer.json, extensions/BazFoo/c' +'omposer.json]}}}' +) +os.unlink(clocal_path) -- To view, visit https://gerrit.wikimedia.org/r/192177 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id321bdb91e844d14275eac6a5f21a643ea283199 Gerrit-PatchSet: 5 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] resourceloader: Async all the weay - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/227627 Change subject: [WIP] resourceloader: Async all the weay .. [WIP] resourceloader: Async all the weay Elaborate. Change-Id: Icba6d7a87b239bf127a221bc6bc432cfa71a4a72 --- M includes/resourceloader/ResourceLoaderStartUpModule.php M resources/src/mediawiki/mediawiki.js M resources/src/startup.js 3 files changed, 46 insertions(+), 65 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/27/227627/1 diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 16424a0..bdf1b21 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -335,7 +335,7 @@ }, array( '$VARS.wgLegacyJavaScriptGlobals' = $this-getConfig()-get( 'LegacyJavaScriptGlobals' ), '$VARS.configuration' = $this-getConfigSettings( $context ), - '$VARS.baseModulesScript' = Html::linkedScript( self::getStartupModulesUrl( $context ) ), + '$VARS.baseModulesUri' = self::getStartupModulesUrl( $context ), ) ); $pairs['$CODE.registrations()'] = str_replace( \n, \n\t, trim( $this-getModuleRegistrations( $context ) ) ); diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index c0b1642..348df19 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -,39 +,24 @@ } /** -* Adds a script tag to the DOM, either using document.write or low-level DOM manipulation, -* depending on whether document-ready has occurred yet and whether we are in async mode. +* Load and execute a script with callback. * * @private * @param {string} src URL to script, will be used as the src attribute in the script tag * @param {Function} [callback] Callback which will be run when the script is done -* @param {boolean} [async=false] Whether to load modules asynchronously. -* Ignored (and defaulted to `true`) if the document-ready event has already occurred. */ - function addScript( src, callback, async ) { - // Using isReady directly instead of storing it locally from a $().ready callback (bug 31895) - if ( $.isReady || async ) { - $.ajax( { - url: src, - dataType: 'script', - // Force jQuery behaviour to be for crossDomain. Otherwise jQuery would use - // XHR for a same domain request instead of script, which changes the request - // headers (potentially missing a cache hit), and reduces caching in general - // since browsers cache XHR much less (if at all). And XHR means we retreive - // text, so we'd need to $.globalEval, which then messes up line numbers. - crossDomain: true, - cache: true, - async: true - } ).always( callback ); - } else { - /*jshint evil:true */ - document.write( mw.html.element( 'script', { 'src': src }, '' ) ); - if ( callback ) { - // Document.write is synchronous, so this is called when it's done. - // FIXME: That's a lie. doc.write isn't actually synchronous. - callback(); - } - } + function addScript( src, callback ) { + $.ajax( { + url: src, + dataType: 'script', + // Force jQuery behaviour to be for crossDomain. Otherwise jQuery would use + // XHR for a same domain request instead of script, which changes the request +
[MediaWiki-commits] [Gerrit] Upgrade to jscs 2.0 - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/227638 Change subject: Upgrade to jscs 2.0 .. Upgrade to jscs 2.0 Disable some rules that we don't yet follow. Ignore extensions directory that may be there from composer. Bug: T107124 Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be (cherry picked from commit db9224a519a05b2a7f80c8d3b6084f96b6e4fda6) --- M .jscsrc M package.json 2 files changed, 18 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/38/227638/1 diff --git a/.jscsrc b/.jscsrc index f66f6bd..312c030 100644 --- a/.jscsrc +++ b/.jscsrc @@ -3,12 +3,26 @@ preset: wikimedia, // - // Rules from wikimedia preset we don't follow + // Rules from wikimedia preset we don't yet? follow validateIndentation: null, requireMultipleVarDecl: null, disallowDanglingUnderscores: null, - requireSpacesInsideArrayBrackets: null, + requireSpacesInsideBrackets: null, + requireVarDeclFirst: null, + jsDoc: { + // what we don't yet follow is commented out + //checkAnnotations: jsduck5, + //checkParamNames: true, + requireParamTypes: true, + checkRedundantParams: true, + //checkReturnTypes: true, + checkRedundantReturns: true, + //requireReturnTypes: true, + //checkTypes: capitalizedNativeCase, + checkRedundantAccess: true + //requireNewlineAfterDescription: true + }, // // Own rules @@ -24,5 +38,5 @@ else ], - excludeFiles: [ node_modules/**, vendor/** ] + excludeFiles: [ node_modules/**, vendor/**, extensions/** ] } diff --git a/package.json b/package.json index 2e22208..43022cd 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ author: The Wikidata team, license: GPL-2.0+, devDependencies: { - jscs: , + jscs: =2.0, jshint: } } -- To view, visit https://gerrit.wikimedia.org/r/227638 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.26wmf13 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] On page views, update usage tracking via the job queue. - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: On page views, update usage tracking via the job queue. .. On page views, update usage tracking via the job queue. In some cases, we need to update the usage tracking table during normal page views. In this case, we should not write to the database directly, but schedule a job instead. Bug: T103429 Change-Id: Ied1db3f2ab802ac7d7638b63844598374bd59812 --- M client/WikibaseClient.php M client/includes/Hooks/DataUpdateHookHandlers.php M client/includes/Usage/EntityUsage.php A client/includes/store/AddUsagesForPageJob.php M client/includes/store/ClientStore.php M client/includes/store/sql/DirectSqlStore.php M client/tests/phpunit/MockClientStore.php A client/tests/phpunit/includes/AddUsagesForPageJobTest.php M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php M client/tests/phpunit/includes/Usage/EntityUsageTest.php 10 files changed, 448 insertions(+), 28 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php index 4c48108..deefc1f 100644 --- a/client/WikibaseClient.php +++ b/client/WikibaseClient.php @@ -67,6 +67,7 @@ global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks; global $wgAPIMetaModules, $wgAPIPropModules, $wgSpecialPages, $wgResourceModules; global $wgWBClientSettings, $wgRecentChangesFlags, $wgMessagesDirs; + global $wgJobClasses; $wgExtensionCredits['wikibase'][] = array( 'path' = __DIR__, @@ -123,6 +124,9 @@ // extension hooks $wgHooks['WikibaseDeleteData'][]= '\Wikibase\ClientHooks::onWikibaseDeleteData'; + // job classes + $wgJobClasses['wikibase-addUsagesForPage'] = 'Wikibase\Client\Store\AddUsagesForPageJob'; + // api modules $wgAPIMetaModules['wikibase'] = array( 'class' = 'Wikibase\ApiClientInfo', diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php b/client/includes/Hooks/DataUpdateHookHandlers.php index 8b12966..42d9d78 100644 --- a/client/includes/Hooks/DataUpdateHookHandlers.php +++ b/client/includes/Hooks/DataUpdateHookHandlers.php @@ -3,6 +3,8 @@ namespace Wikibase\Client\Hooks; use Content; +use JobQueueGroup; +use JobSpecification; use LinksUpdate; use ManualLogEntry; use ParserCache; @@ -10,7 +12,9 @@ use ParserOutput; use Title; use User; +use Wikibase\Client\Store\AddUsagesForPageJob; use Wikibase\Client\Store\UsageUpdater; +use Wikibase\Client\Usage\EntityUsage; use Wikibase\Client\Usage\ParserOutputUsageAccumulator; use Wikibase\Client\WikibaseClient; use WikiPage; @@ -34,19 +38,15 @@ */ private $usageUpdater; + /** +* @var JobQueueGroup +*/ + private $jobScheduler; + public static function newFromGlobalState() { - $wikibaseClient = WikibaseClient::getDefaultInstance(); - $settings = $wikibaseClient-getSettings(); - - $usageUpdater = new UsageUpdater( - $settings-getSetting( 'siteGlobalID' ), - $wikibaseClient-getStore()-getUsageTracker(), - $wikibaseClient-getStore()-getUsageLookup(), - $wikibaseClient-getStore()-getSubscriptionManager() - ); - return new DataUpdateHookHandlers( - $usageUpdater + WikibaseClient::getDefaultInstance()-getStore()-getUsageUpdater(), + JobQueueGroup::singleton() ); } @@ -113,9 +113,11 @@ } public function __construct( - UsageUpdater $usageUpdater + UsageUpdater $usageUpdater, + JobQueueGroup $jobScheduler ) { $this-usageUpdater = $usageUpdater; + $this-jobScheduler = $jobScheduler; } /** @@ -169,13 +171,22 @@ // These timestamps should usually be the same, but asking $title may cause a database query. $touched = $parserOutput-getTimestamp() ?: $title-getTouched(); + if ( count( $usageAcc-getUsages() ) === 0 ) { + // no usages, bail out + return; + } + // Add or touch any usages present in the new rendering. // This allows us to track usages in each user language separately, for multilingual sites. - $this-usageUpdater-addUsagesForPage( - $title-getArticleId(), - $usageAcc-getUsages(), - $touched - ); + + // NOTE: Since parser cache updates may be triggered by page views (in a new language), + // schedule the usage updates in the job queue,
[MediaWiki-commits] [Gerrit] [WIP] ignore - change (mediawiki...Flow)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/227642 Change subject: [WIP] ignore .. [WIP] ignore Change-Id: I8b1ebe65c918b86f4496be3952b98645c72ff9fa --- M tests/browser/features/anon_interface.feature 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/42/227642/1 diff --git a/tests/browser/features/anon_interface.feature b/tests/browser/features/anon_interface.feature index 25b2049..b13a39f 100644 --- a/tests/browser/features/anon_interface.feature +++ b/tests/browser/features/anon_interface.feature @@ -1,5 +1,6 @@ @chrome @firefox @internet_explorer_10 @clean +@integration @en.wikipedia.beta.wmflabs.org Feature: Check the interface for anonymous users -- To view, visit https://gerrit.wikimedia.org/r/227642 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b1ebe65c918b86f4496be3952b98645c72ff9fa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 12d22fe..6d22fd1 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 12d22fe..6d22fd1 .. Syncronize VisualEditor: 12d22fe..6d22fd1 Change-Id: I6ba3e2ea76b251de7e12cb6eee25fd61d0722497 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 12d22fe..6d22fd1 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 12d22fe48ad9ef17fa14d2ad301f5b3854f165d6 +Subproject commit 6d22fd1aa77f088eb2c4f2f2f193d923a4c39ee7 -- To view, visit https://gerrit.wikimedia.org/r/227595 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ba3e2ea76b251de7e12cb6eee25fd61d0722497 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 12d22fe..6d22fd1 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/227595 Change subject: Syncronize VisualEditor: 12d22fe..6d22fd1 .. Syncronize VisualEditor: 12d22fe..6d22fd1 Change-Id: I6ba3e2ea76b251de7e12cb6eee25fd61d0722497 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/95/227595/1 diff --git a/VisualEditor b/VisualEditor index 12d22fe..6d22fd1 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 12d22fe48ad9ef17fa14d2ad301f5b3854f165d6 +Subproject commit 6d22fd1aa77f088eb2c4f2f2f193d923a4c39ee7 -- To view, visit https://gerrit.wikimedia.org/r/227595 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ba3e2ea76b251de7e12cb6eee25fd61d0722497 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduce the module build time - change (mediawiki...MobileFrontend)
Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/227594 Change subject: Reduce the module build time .. Reduce the module build time Import module less files into styles.less so that lessphp can build the module faster. Bug: T105314 Change-Id: I17de655e52d2ff1f3467fa00b8eb6f461139b1ba --- M MobileFrontend.php M includes/Resources.php A resources/skins.minerva.content.styles/styles.less 3 files changed, 13 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/94/227594/1 diff --git a/MobileFrontend.php b/MobileFrontend.php index dde7cc2..3ecd384 100644 --- a/MobileFrontend.php +++ b/MobileFrontend.php @@ -181,6 +181,7 @@ // Set LESS importpath $wgResourceLoaderLESSImportPaths[] = __DIR__ . /minerva.less/; +$wgResourceLoaderLESSImportPaths[] = __DIR__ . /resources/; // ResourceLoader modules diff --git a/includes/Resources.php b/includes/Resources.php index b6dfa1e..a72cc4b 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -63,17 +63,7 @@ 'skins.minerva.content.styles' = $wgMFResourceFileModuleBoilerplate + array( 'position' = 'top', 'styles' = array( - 'resources/skins.minerva.content.styles/main.less', - 'resources/skins.minerva.content.styles/thumbnails.less', - 'resources/skins.minerva.content.styles/images.less', - 'resources/skins.minerva.content.styles/galleries.less', - 'resources/skins.minerva.content.styles/headings.less', - 'resources/skins.minerva.content.styles/blockquotes.less', - 'resources/skins.minerva.content.styles/lists.less', - 'resources/skins.minerva.content.styles/links.less', - 'resources/skins.minerva.content.styles/text.less', - 'resources/skins.minerva.content.styles/tables.less', - 'resources/skins.minerva.content.styles/hacks.less', + 'resources/skins.minerva.content.styles/styles.less', ), ), 'mobile.pagelist.styles' = $wgMFResourceFileModuleBoilerplate + array( diff --git a/resources/skins.minerva.content.styles/styles.less b/resources/skins.minerva.content.styles/styles.less new file mode 100644 index 000..cd3e2ca --- /dev/null +++ b/resources/skins.minerva.content.styles/styles.less @@ -0,0 +1,11 @@ +@import skins.minerva.content.styles/main.less; +@import skins.minerva.content.styles/thumbnails.less; +@import skins.minerva.content.styles/images.less; +@import skins.minerva.content.styles/galleries.less; +@import skins.minerva.content.styles/headings.less; +@import skins.minerva.content.styles/blockquotes.less; +@import skins.minerva.content.styles/lists.less; +@import skins.minerva.content.styles/links.less; +@import skins.minerva.content.styles/text.less; +@import skins.minerva.content.styles/tables.less; +@import skins.minerva.content.styles/hacks.less; -- To view, visit https://gerrit.wikimedia.org/r/227594 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17de655e52d2ff1f3467fa00b8eb6f461139b1ba Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov bmansu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] group0 wikis to 1.26wmf16 - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: group0 wikis to 1.26wmf16 .. group0 wikis to 1.26wmf16 Change-Id: I4c9dadd465f11968b5247372c4d5a787d3a1bd2b --- M w/static/current/extensions M w/static/current/resources M w/static/current/skins M wikiversions.json 4 files changed, 4 insertions(+), 4 deletions(-) Approvals: 20after4: Looks good to me, approved jenkins-bot: Verified diff --git a/w/static/current/extensions b/w/static/current/extensions index 25f0d12..b0af31f 12 --- a/w/static/current/extensions +++ b/w/static/current/extensions @@ -1 +1 @@ -/srv/mediawiki/php-1.26wmf15/extensions \ No newline at end of file +/srv/mediawiki/php-1.26wmf16/extensions \ No newline at end of file diff --git a/w/static/current/resources b/w/static/current/resources index 110de94..dfe6a15 12 --- a/w/static/current/resources +++ b/w/static/current/resources @@ -1 +1 @@ -/srv/mediawiki/php-1.26wmf15/resources \ No newline at end of file +/srv/mediawiki/php-1.26wmf16/resources \ No newline at end of file diff --git a/w/static/current/skins b/w/static/current/skins index 7b86736..47be9c5 12 --- a/w/static/current/skins +++ b/w/static/current/skins @@ -1 +1 @@ -/srv/mediawiki/php-1.26wmf15/skins \ No newline at end of file +/srv/mediawiki/php-1.26wmf16/skins \ No newline at end of file diff --git a/wikiversions.json b/wikiversions.json index 140a336..3a413b0 100644 --- a/wikiversions.json +++ b/wikiversions.json @@ -1 +1 @@
[MediaWiki-commits] [Gerrit] adding mobrovac to graphoid-admins - change (operations/puppet)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/227601 Change subject: adding mobrovac to graphoid-admins .. adding mobrovac to graphoid-admins mobrovac needs to be able to restart graphoid during debugging. this was granted in ops meeting disucssion on 2015-07-27. T106814 Change-Id: Ia9c8c29677731520c5fbe780fea35461ffcb66d2 --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/01/227601/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index d726f2e..86725b0 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -310,7 +310,7 @@ graphoid-admin: gid: 750 description: group of graphoid admins -members: [yurik] +members: [mobrovak, yurik] privileges: ['ALL = NOPASSWD: /usr/sbin/service graphoid *', 'ALL = (graphoid) NOPASSWD: ALL'] traceback-roots: -- To view, visit https://gerrit.wikimedia.org/r/227601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9c8c29677731520c5fbe780fea35461ffcb66d2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: RobH r...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.12.2 - change (mediawiki/core)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/227609 Change subject: Update OOjs UI to v0.12.2 .. Update OOjs UI to v0.12.2 Release notes: https://git.wikimedia.org/blob/oojs%2Fui.git/v0.12.2/History.md Change-Id: Ic7f4be9eee8c17e00270de8b731ec6206a35f9ad --- M composer.json M resources/ResourcesOOUI.php M resources/lib/oojs-ui/i18n/vi.json M resources/lib/oojs-ui/oojs-ui-apex-noimages.css M resources/lib/oojs-ui/oojs-ui-apex.js M resources/lib/oojs-ui/oojs-ui-mediawiki-noimages.css M resources/lib/oojs-ui/oojs-ui-mediawiki.js M resources/lib/oojs-ui/oojs-ui.js A resources/lib/oojs-ui/themes/mediawiki/icons-accessibility.json M resources/lib/oojs-ui/themes/mediawiki/icons-layout.json A resources/lib/oojs-ui/themes/mediawiki/images/icons/bright.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/bright.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/halfBright.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/halfBright.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/largerText-ltr.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/largerText-ltr.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/largerText-rtl.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/largerText-rtl.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/moon.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/moon.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/notBright.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/notBright.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/smallerText-ltr.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/smallerText-ltr.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/smallerText-rtl.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/smallerText-rtl.svg D resources/lib/oojs-ui/themes/mediawiki/images/icons/visionSimulator-invert.png D resources/lib/oojs-ui/themes/mediawiki/images/icons/visionSimulator-invert.svg 28 files changed, 86 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/09/227609/1 diff --git a/composer.json b/composer.json index 88ebdd5..3d8707d 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ leafo/lessphp: 0.5.0, liuggio/statsd-php-client: 1.0.16, mediawiki/at-ease: 1.0.0, - oojs/oojs-ui: 0.12.1, + oojs/oojs-ui: 0.12.2, php: =5.3.3, psr/log: 1.0.0, wikimedia/cdb: 1.0.1, diff --git a/resources/ResourcesOOUI.php b/resources/ResourcesOOUI.php index 974db87..8c3d091 100644 --- a/resources/ResourcesOOUI.php +++ b/resources/ResourcesOOUI.php @@ -86,6 +86,7 @@ 'icons', // oojs-ui.styles.icons 'indicators', // oojs-ui.styles.indicators 'textures', // oojs-ui.styles.textures + 'icons-accessibility', // oojs-ui.styles.icons-accessibility 'icons-alerts', // oojs-ui.styles.icons-alerts 'icons-content', // oojs-ui.styles.icons-content 'icons-editing-advanced', // oojs-ui.styles.icons-editing-advanced @@ -113,7 +114,7 @@ if ( substr( $name, 0, 5 ) === 'icons' ) { $module['selectorWithoutVariant'] = '.oo-ui-icon-{name}, .mw-ui-icon-{name}:before'; - $module['selectorWithVariant'] = '.oo-ui-image-{variant} .oo-ui-icon-{name}, + $module['selectorWithVariant'] = '.oo-ui-image-{variant} .oo-ui-icon-{name}, .oo-ui-image-{variant}.oo-ui-icon-{name}, .mw-ui-icon-{name}-{variant}:before, .mw-ui-hovericon:hover .mw-ui-icon-{name}-{variant}-hover:before, .mw-ui-hovericon.mw-ui-icon-{name}-{variant}-hover:hover:before'; diff --git a/resources/lib/oojs-ui/i18n/vi.json b/resources/lib/oojs-ui/i18n/vi.json index d62e3cb..7d4252d 100644 --- a/resources/lib/oojs-ui/i18n/vi.json +++ b/resources/lib/oojs-ui/i18n/vi.json @@ -20,6 +20,6 @@ ooui-dialog-process-dismiss: Bỏ qua, ooui-dialog-process-retry: Thử lại, ooui-dialog-process-continue: Tiếp tục, - ooui-selectfile-not-supported: Tệp tin được chọn không được hỗ trợ, - ooui-selectfile-placeholder: Không có Tệp tin nào được chọn + ooui-selectfile-not-supported: Không hỗ trợ việc chọn tập tin, + ooui-selectfile-placeholder: Không có tập tin nào được chọn } diff --git a/resources/lib/oojs-ui/oojs-ui-apex-noimages.css b/resources/lib/oojs-ui/oojs-ui-apex-noimages.css index d9a8314..3557c4c 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex-noimages.css +++ b/resources/lib/oojs-ui/oojs-ui-apex-noimages.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.12.1 + * OOjs UI v0.12.2 *
[MediaWiki-commits] [Gerrit] Revert Revert Conversion to using getMainStashInstance() - change (mediawiki...AbuseFilter)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/227624 Change subject: Revert Revert Conversion to using getMainStashInstance() .. Revert Revert Conversion to using getMainStashInstance() This reverts commit e4e78dcc4dce11edc86a82b2ca98c73b470660bb. Change-Id: I9ec43428a5090eb940838c8580c73f049da0b833 --- M AbuseFilter.class.php M AbuseFilter.hooks.php M Views/AbuseFilterViewRevert.php M api/ApiAbuseFilterUnblockAutopromote.php 4 files changed, 11 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/24/227624/1 diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php index b6b47b9..adeacd8 100755 --- a/AbuseFilter.class.php +++ b/AbuseFilter.class.php @@ -1307,10 +1307,12 @@ break; case 'blockautopromote': - global $wgUser, $wgMemc; + global $wgUser; if ( !$wgUser-isAnon() ) { $blockPeriod = (int)mt_rand( 3 * 86400, 7 * 86400 ); // Block for 3-7 days. - $wgMemc-set( self::autoPromoteBlockKey( $wgUser ), true, $blockPeriod ); + ObjectCache::getMainStashInstance()-set( + self::autoPromoteBlockKey( $wgUser ), true, $blockPeriod + ); $message = array( 'abusefilter-autopromote-blocked', diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php old mode 100644 new mode 100755 index 892d901..faaafb3 --- a/AbuseFilter.hooks.php +++ b/AbuseFilter.hooks.php @@ -277,11 +277,8 @@ * @return bool */ public static function onGetAutoPromoteGroups( $user, $promote ) { - global $wgMemc; - $key = AbuseFilter::autoPromoteBlockKey( $user ); - - if ( $wgMemc-get( $key ) ) { + if ( ObjectCache::getMainStashInstance()-get( $key ) ) { $promote = array(); } diff --git a/Views/AbuseFilterViewRevert.php b/Views/AbuseFilterViewRevert.php old mode 100644 new mode 100755 index 941fa66..c1a7738 --- a/Views/AbuseFilterViewRevert.php +++ b/Views/AbuseFilterViewRevert.php @@ -209,9 +209,9 @@ ); return true; case 'blockautopromote': - global $wgMemc; - $wgMemc-delete( AbuseFilter::autopromoteBlockKey( - User::newFromId( $result['userid'] ) ) ); + ObjectCache::getMainStashInstance()-delete( + AbuseFilter::autopromoteBlockKey( User::newFromId( $result['userid'] ) ) + ); return true; case 'degroup': // Pull the user's groups from the vars. diff --git a/api/ApiAbuseFilterUnblockAutopromote.php b/api/ApiAbuseFilterUnblockAutopromote.php old mode 100644 new mode 100755 index 73d1558..6b3cb17 --- a/api/ApiAbuseFilterUnblockAutopromote.php +++ b/api/ApiAbuseFilterUnblockAutopromote.php @@ -15,16 +15,15 @@ $this-dieUsage( $msg, 'notsuspended' ); } - global $wgMemc; $key = AbuseFilter::autoPromoteBlockKey( $user ); - - if ( !$wgMemc-get( $key ) ) { + $stash = ObjectCache::getMainStashInstance(); + if ( !$stash-get( $key ) ) { // Same as above :( $msg = wfMessage( 'abusefilter-reautoconfirm-none', $params['user'] )-text(); $this-dieUsage( $msg, 'notsuspended' ); } - $wgMemc-delete( $key ); + $stash-delete( $key ); $res = array( 'user' = $params['user'] ); $this-getResult()-addValue( null, $this-getModuleName(), $res ); -- To view, visit https://gerrit.wikimedia.org/r/227624 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ec43428a5090eb940838c8580c73f049da0b833 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter Gerrit-Branch: wmf/1.26wmf15 Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add configuration for authmetrics logging - change (operations/mediawiki-config)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/227630 Change subject: Add configuration for authmetrics logging .. Add configuration for authmetrics logging Depends on I966c510354ef4d7afb8328d5fcb8a80099a31903 Bug: T91701 Change-Id: Idf4496c6e5bcc2b3ec8646847cabd8ca732021d4 --- M wmf-config/InitialiseSettings-labs.php M wmf-config/InitialiseSettings.php M wmf-config/logging.php 3 files changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/30/227630/1 diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index f89c6cd..d1bd3a4 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -1109,5 +1109,8 @@ 'private' = false, ), + 'wmgLogAuthmanagerMetrics' = array( + 'default' = true, + ), ); } # wmflLabsSettings() diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 8313b83..035639d 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -15464,6 +15464,10 @@ 'default' = true, ), +'wmgLogAuthmanagerMetrics' = array( + 'default' = true, +), + ); diff --git a/wmf-config/logging.php b/wmf-config/logging.php index f73e75d..537c946 100644 --- a/wmf-config/logging.php +++ b/wmf-config/logging.php @@ -103,6 +103,16 @@ ), ); +if ( $wmgLogAuthmanagerMetrics ) { + $wmgMonologConfig['loggers']['authmanager'] = array( + 'handlers' = array( 'authmanager-statsd' ), + ); + $wmgMonologConfig['handlers']['authmanager-statsd'] = array( + // defined in WikimediaEvents + 'class' = 'AuthManagerStatsdHandler', + ); +} + // Add logging channels defined in $wmgMonologChannels foreach ( $wmgMonologChannels as $channel = $opts ) { if ( $opts === false ) { -- To view, visit https://gerrit.wikimedia.org/r/227630 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf4496c6e5bcc2b3ec8646847cabd8ca732021d4 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Upgrade to jscs 2.0 and pin versions of serialization compon... - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Upgrade to jscs 2.0 and pin versions of serialization components .. Upgrade to jscs 2.0 and pin versions of serialization components Disable some rules that we don't yet follow. Ignore extensions directory that may be there from composer. the serialization components need to be pinned to 1.4.0. apparently more recent versions have some incompatibilities. In the deployment build, we will update wikibase only, Bug: T107124 Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be (cherry picked from commit db9224a519a05b2a7f80c8d3b6084f96b6e4fda6) --- M .jscsrc M composer.json M package.json 3 files changed, 20 insertions(+), 6 deletions(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/.jscsrc b/.jscsrc index f66f6bd..312c030 100644 --- a/.jscsrc +++ b/.jscsrc @@ -3,12 +3,26 @@ preset: wikimedia, // - // Rules from wikimedia preset we don't follow + // Rules from wikimedia preset we don't yet? follow validateIndentation: null, requireMultipleVarDecl: null, disallowDanglingUnderscores: null, - requireSpacesInsideArrayBrackets: null, + requireSpacesInsideBrackets: null, + requireVarDeclFirst: null, + jsDoc: { + // what we don't yet follow is commented out + //checkAnnotations: jsduck5, + //checkParamNames: true, + requireParamTypes: true, + checkRedundantParams: true, + //checkReturnTypes: true, + checkRedundantReturns: true, + //requireReturnTypes: true, + //checkTypes: capitalizedNativeCase, + checkRedundantAccess: true + //requireNewlineAfterDescription: true + }, // // Own rules @@ -24,5 +38,5 @@ else ], - excludeFiles: [ node_modules/**, vendor/** ] + excludeFiles: [ node_modules/**, vendor/**, extensions/** ] } diff --git a/composer.json b/composer.json index 87885c5..943f9fd 100644 --- a/composer.json +++ b/composer.json @@ -37,9 +37,9 @@ wikibase/data-model: ~3.0, wikibase/data-model-javascript: ^1.0.2, - wikibase/data-model-serialization: ~1.4, + wikibase/data-model-serialization: ~1.4.0, wikibase/javascript-api: ~1.0, - wikibase/internal-serialization: ~1.4, + wikibase/internal-serialization: ~1.4.0, wikibase/serialization-javascript: ~2.0, diff/diff: ~2.0|~1.0 diff --git a/package.json b/package.json index 2e22208..43022cd 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ author: The Wikidata team, license: GPL-2.0+, devDependencies: { - jscs: , + jscs: =2.0, jshint: } } -- To view, visit https://gerrit.wikimedia.org/r/227638 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.26wmf13 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable search feedback survey - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Disable search feedback survey .. Disable search feedback survey Bug: T103131 Change-Id: If8e40814d90fb3f4845ff52b86752a319d81072e --- M wmf-config/InitialiseSettings.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index e1a715c..d320095 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -15222,7 +15222,6 @@ // Enable the Give us feedback link after search results on enwiki 'wmgCirrusSearchFeedbackLink' = array( 'default' = false, - 'enwiki' = 'https://wikimedia.qualtrics.com/SE/?SID=SV_eLmmEQA9600f8zP' ), 'wmgUseCite' = array( -- To view, visit https://gerrit.wikimedia.org/r/227496 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If8e40814d90fb3f4845ff52b86752a319d81072e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VisualEditor for I70e8c545 - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update VisualEditor for I70e8c545 .. Update VisualEditor for I70e8c545 Change-Id: I401bb9ce651cde6a532bc5134ab69f3e52fe664c --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/VisualEditor b/extensions/VisualEditor index 5a07b28..599d6c3 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit 5a07b2844efa1806206bb5c298e3c54c577e3d45 +Subproject commit 599d6c31d8af0bc04c7320a27dc751f9ec022049 -- To view, visit https://gerrit.wikimedia.org/r/227607 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I401bb9ce651cde6a532bc5134ab69f3e52fe664c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.26wmf16 Gerrit-Owner: Alex Monk kren...@gmail.com Gerrit-Reviewer: Alex Monk kren...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] RedisBagOStuff: if no alternatives, skip master link status ... - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/227614 Change subject: RedisBagOStuff: if no alternatives, skip master link status check .. RedisBagOStuff: if no alternatives, skip master link status check If RedisBagOStuff::getConnection() is able to establish a connection, only check the master link status if automatic failover is enabled and if there are other viable servers left to consider. If there are no servers left to consider, or if automatic failover is not configured, just return the connection handle without subjecting it to further tests. This will have the side-effect of making RedisBagOStuff compatible with Nutcracker, which does not implement the INFO command. This is because when MediaWiki is configured to use Nutcracker, the server pool will consist of a single server (namely, Nutcracker itself), and thus there will be no other server to consider, so INFO will never be executed. Change-Id: I3812ec5a0b22df122bdf44350bc0496574c02ce8 --- M includes/objectcache/RedisBagOStuff.php 1 file changed, 29 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/14/227614/1 diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php index b8a0dd5..7e506f0 100644 --- a/includes/objectcache/RedisBagOStuff.php +++ b/includes/objectcache/RedisBagOStuff.php @@ -372,31 +372,30 @@ } } - foreach ( $candidates as $tag ) { + while ( ( $tag = array_shift( $candidates ) ) !== false ) { $server = $this-serverTagMap[$tag]; - $conn = $this-redisPool-getConnection( $server ); if ( !$conn ) { continue; } - try { - $info = $conn-info(); - // Check if this server has an unreachable redis master - if ( $info['role'] === 'slave' -$info['master_link_status'] === 'down' -$this-automaticFailover - ) { - // If the master cannot be reached, fail-over to the next server. - // If masters are in data-center A, and slaves in data-center B, - // this helps avoid the case were fail-over happens in A but not - // to the corresponding server in B (e.g. read/write mismatch). + // If automatic failover is enabled, check that the server's link + // to its master (if any) is up -- but only if there are other + // viable candidates left to consider. + if ( $this-automaticFailover $candidates ) { + try { + if ( $this-getMasterLinkStatus( $conn ) === 'down' ) { + // If the master cannot be reached, fail-over to the next server. + // If masters are in data-center A, and slaves in data-center B, + // this helps avoid the case were fail-over happens in A but not + // to the corresponding server in B (e.g. read/write mismatch). + continue; + } + } catch ( RedisException $e ) { + // Server is not accepting commands + $this-handleException( $conn, $e ); continue; } - } catch ( RedisException $e ) { - // Server is not accepting commands - $this-handleException( $conn, $e ); - continue; } return array( $server, $conn ); @@ -408,6 +407,19 @@ } /** +* Check the master link status of a Redis server that is configured as a slave. +* @param RedisConnRef $conn +* @return string|null Master link status (either 'up' or 'down'), or null +* if the server is not a slave. +*/ + protected function getMasterLinkStatus( RedisConnRef $conn ) { + $info = $conn-info(); + return isset( $info['master_link_status'] ) + ? $info['master_link_status'] + : null; + } + + /** * Log a fatal error
[MediaWiki-commits] [Gerrit] Add WrappedString test and publisher jobs - change (integration/config)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/227615 Change subject: Add WrappedString test and publisher jobs .. Add WrappedString test and publisher jobs Change-Id: I2b1a0e3dc925634076b0eb92b6fd1a3281dbed7a --- M zuul/layout.yaml 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/15/227615/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 18628b4..e54272c 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -7720,6 +7720,13 @@ - doxygen-publish - phpunit-coverage-publish + - name: WrappedString +template: + - name: composer-test-package +postmerge: + - doxygen-publish + - phpunit-coverage-publish + - name: search/extra test: - search-extra -- To view, visit https://gerrit.wikimedia.org/r/227615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b1a0e3dc925634076b0eb92b6fd1a3281dbed7a Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use MW-Selenium setup slave script - change (integration/config)
Dduvall has uploaded a new change for review. https://gerrit.wikimedia.org/r/227616 Change subject: Use MW-Selenium setup slave script .. Use MW-Selenium setup slave script Switch to using the correct setup slave script according to If13aadef929d4b2e7682cc5c2bbe79e474b7c3ba Change-Id: I7afa07e9f559bffeeebaf7454cc6b39a37e04063 --- M jjb/macro.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/16/227616/1 diff --git a/jjb/macro.yaml b/jjb/macro.yaml index f0816ed..bbec1a8 100644 --- a/jjb/macro.yaml +++ b/jjb/macro.yaml @@ -385,7 +385,7 @@ builders: - prepare-localhost - bundle-with-options: -initialization: '/srv/deployment/integration/slave-scripts/bin/mw-selenium-teardown.sh' +initialization: '/srv/deployment/integration/slave-scripts/bin/mw-selenium-setup.sh' command: | cucumber --color --tags @integration --tags ~@skip --format pretty \ --format junit --out $WORKSPACE/log/junit -- To view, visit https://gerrit.wikimedia.org/r/227616 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7afa07e9f559bffeeebaf7454cc6b39a37e04063 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Dduvall dduv...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update .gitmodules to track submodule branches - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: update .gitmodules to track submodule branches .. update .gitmodules to track submodule branches Change-Id: Ia06e89ceaba6c2b2e232c4eb2be3582016dcc2eb --- M .gitmodules 1 file changed, 179 insertions(+), 18 deletions(-) Approvals: 20after4: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitmodules b/.gitmodules index e8e00ba..3db50ac 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,486 +1,647 @@ -[submodule extensions/CentralNotice] - path = extensions/CentralNotice - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CentralNotice.git -[submodule extensions/DonationInterface] - path = extensions/DonationInterface - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DonationInterface.git -[submodule extensions/Wikidata] - path = extensions/Wikidata - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikidata.git -[submodule extensions/SemanticMediaWiki] - path = extensions/SemanticMediaWiki - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticMediaWiki.git -[submodule extensions/SemanticResultFormats] - path = extensions/SemanticResultFormats - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticResultFormats.git -[submodule extensions/Validator] - path = extensions/Validator - url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Validator.git [submodule extensions/AbuseFilter] path = extensions/AbuseFilter url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AbuseFilter.git + branch = wmf/1.26wmf16 [submodule extensions/AccountAudit] path = extensions/AccountAudit url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AccountAudit.git + branch = wmf/1.26wmf16 [submodule extensions/ActiveAbstract] path = extensions/ActiveAbstract url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ActiveAbstract.git + branch = wmf/1.26wmf16 [submodule extensions/AntiSpoof] path = extensions/AntiSpoof url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AntiSpoof.git + branch = wmf/1.26wmf16 [submodule extensions/ApiFeatureUsage] path = extensions/ApiFeatureUsage url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ApiFeatureUsage.git + branch = wmf/1.26wmf16 [submodule extensions/ApiSandbox] path = extensions/ApiSandbox url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ApiSandbox.git + branch = wmf/1.26wmf16 [submodule extensions/Babel] path = extensions/Babel url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Babel.git + branch = wmf/1.26wmf16 [submodule extensions/BetaFeatures] path = extensions/BetaFeatures url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/BetaFeatures.git + branch = wmf/1.26wmf16 [submodule extensions/BounceHandler] path = extensions/BounceHandler url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/BounceHandler.git + branch = wmf/1.26wmf16 [submodule extensions/Calendar] path = extensions/Calendar url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Calendar.git + branch = wmf/1.26wmf16 [submodule extensions/Campaigns] path = extensions/Campaigns url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Campaigns.git + branch = wmf/1.26wmf16 [submodule extensions/CategoryTree] path = extensions/CategoryTree url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CategoryTree.git + branch = wmf/1.26wmf16 [submodule extensions/CentralAuth] path = extensions/CentralAuth url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CentralAuth.git + branch = wmf/1.26wmf16 [submodule extensions/CharInsert] path = extensions/CharInsert url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CharInsert.git + branch = wmf/1.26wmf16 [submodule extensions/CheckUser] path = extensions/CheckUser url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CheckUser.git + branch = wmf/1.26wmf16 [submodule extensions/CirrusSearch] path = extensions/CirrusSearch url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CirrusSearch.git + branch = wmf/1.26wmf16 [submodule extensions/Cite] path = extensions/Cite url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Cite.git + branch = wmf/1.26wmf16 [submodule extensions/CiteThisPage] path = extensions/CiteThisPage url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CiteThisPage.git + branch = wmf/1.26wmf16 [submodule extensions/Citoid]
[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.12.2 - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update OOjs UI to v0.12.2 .. Update OOjs UI to v0.12.2 Release notes: https://git.wikimedia.org/blob/oojs%2Fui.git/v0.12.2/History.md Change-Id: Ic7f4be9eee8c17e00270de8b731ec6206a35f9ad --- M composer.json M resources/ResourcesOOUI.php M resources/lib/oojs-ui/i18n/vi.json M resources/lib/oojs-ui/oojs-ui-apex-noimages.css M resources/lib/oojs-ui/oojs-ui-apex.js M resources/lib/oojs-ui/oojs-ui-mediawiki-noimages.css M resources/lib/oojs-ui/oojs-ui-mediawiki.js M resources/lib/oojs-ui/oojs-ui.js A resources/lib/oojs-ui/themes/mediawiki/icons-accessibility.json M resources/lib/oojs-ui/themes/mediawiki/icons-layout.json A resources/lib/oojs-ui/themes/mediawiki/images/icons/bright.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/bright.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/halfBright.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/halfBright.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/largerText-ltr.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/largerText-ltr.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/largerText-rtl.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/largerText-rtl.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/moon.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/moon.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/notBright.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/notBright.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/smallerText-ltr.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/smallerText-ltr.svg A resources/lib/oojs-ui/themes/mediawiki/images/icons/smallerText-rtl.png A resources/lib/oojs-ui/themes/mediawiki/images/icons/smallerText-rtl.svg D resources/lib/oojs-ui/themes/mediawiki/images/icons/visionSimulator-invert.png D resources/lib/oojs-ui/themes/mediawiki/images/icons/visionSimulator-invert.svg 28 files changed, 86 insertions(+), 21 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index 88ebdd5..3d8707d 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ leafo/lessphp: 0.5.0, liuggio/statsd-php-client: 1.0.16, mediawiki/at-ease: 1.0.0, - oojs/oojs-ui: 0.12.1, + oojs/oojs-ui: 0.12.2, php: =5.3.3, psr/log: 1.0.0, wikimedia/cdb: 1.0.1, diff --git a/resources/ResourcesOOUI.php b/resources/ResourcesOOUI.php index 974db87..8c3d091 100644 --- a/resources/ResourcesOOUI.php +++ b/resources/ResourcesOOUI.php @@ -86,6 +86,7 @@ 'icons', // oojs-ui.styles.icons 'indicators', // oojs-ui.styles.indicators 'textures', // oojs-ui.styles.textures + 'icons-accessibility', // oojs-ui.styles.icons-accessibility 'icons-alerts', // oojs-ui.styles.icons-alerts 'icons-content', // oojs-ui.styles.icons-content 'icons-editing-advanced', // oojs-ui.styles.icons-editing-advanced @@ -113,7 +114,7 @@ if ( substr( $name, 0, 5 ) === 'icons' ) { $module['selectorWithoutVariant'] = '.oo-ui-icon-{name}, .mw-ui-icon-{name}:before'; - $module['selectorWithVariant'] = '.oo-ui-image-{variant} .oo-ui-icon-{name}, + $module['selectorWithVariant'] = '.oo-ui-image-{variant} .oo-ui-icon-{name}, .oo-ui-image-{variant}.oo-ui-icon-{name}, .mw-ui-icon-{name}-{variant}:before, .mw-ui-hovericon:hover .mw-ui-icon-{name}-{variant}-hover:before, .mw-ui-hovericon.mw-ui-icon-{name}-{variant}-hover:hover:before'; diff --git a/resources/lib/oojs-ui/i18n/vi.json b/resources/lib/oojs-ui/i18n/vi.json index d62e3cb..7d4252d 100644 --- a/resources/lib/oojs-ui/i18n/vi.json +++ b/resources/lib/oojs-ui/i18n/vi.json @@ -20,6 +20,6 @@ ooui-dialog-process-dismiss: Bỏ qua, ooui-dialog-process-retry: Thử lại, ooui-dialog-process-continue: Tiếp tục, - ooui-selectfile-not-supported: Tệp tin được chọn không được hỗ trợ, - ooui-selectfile-placeholder: Không có Tệp tin nào được chọn + ooui-selectfile-not-supported: Không hỗ trợ việc chọn tập tin, + ooui-selectfile-placeholder: Không có tập tin nào được chọn } diff --git a/resources/lib/oojs-ui/oojs-ui-apex-noimages.css b/resources/lib/oojs-ui/oojs-ui-apex-noimages.css index d9a8314..3557c4c 100644 --- a/resources/lib/oojs-ui/oojs-ui-apex-noimages.css +++ b/resources/lib/oojs-ui/oojs-ui-apex-noimages.css @@ -1,12 +1,12 @@ /*! - * OOjs UI v0.12.1 + * OOjs UI v0.12.2 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2015 OOjs UI Team
[MediaWiki-commits] [Gerrit] Add WrappedString test and publisher jobs - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Add WrappedString test and publisher jobs .. Add WrappedString test and publisher jobs Change-Id: I2b1a0e3dc925634076b0eb92b6fd1a3281dbed7a --- M zuul/layout.yaml 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 18628b4..e54272c 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -7720,6 +7720,13 @@ - doxygen-publish - phpunit-coverage-publish + - name: WrappedString +template: + - name: composer-test-package +postmerge: + - doxygen-publish + - phpunit-coverage-publish + - name: search/extra test: - search-extra -- To view, visit https://gerrit.wikimedia.org/r/227615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b1a0e3dc925634076b0eb92b6fd1a3281dbed7a Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove codfw cache::parsoid ipsec role (no tier2, breaks pup... - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: remove codfw cache::parsoid ipsec role (no tier2, breaks puppet) .. remove codfw cache::parsoid ipsec role (no tier2, breaks puppet) Change-Id: Ibfae5212f323e5950143312e48f3e6eff5516006 --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 118d9cc..7a95614 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -437,7 +437,7 @@ node /^cp202[26]\.codfw\.wmnet$/ { interface::add_ip6_mapped { 'main': } -role cache::parsoid, ipsec +role cache::parsoid } node /^cp30(0[3-9]|1[0-4])\.esams\.wmnet$/ { -- To view, visit https://gerrit.wikimedia.org/r/227623 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibfae5212f323e5950143312e48f3e6eff5516006 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove codfw cache::parsoid ipsec role (no tier2, breaks pup... - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/227623 Change subject: remove codfw cache::parsoid ipsec role (no tier2, breaks puppet) .. remove codfw cache::parsoid ipsec role (no tier2, breaks puppet) Change-Id: Ibfae5212f323e5950143312e48f3e6eff5516006 --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/227623/1 diff --git a/manifests/site.pp b/manifests/site.pp index 118d9cc..7a95614 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -437,7 +437,7 @@ node /^cp202[26]\.codfw\.wmnet$/ { interface::add_ip6_mapped { 'main': } -role cache::parsoid, ipsec +role cache::parsoid } node /^cp30(0[3-9]|1[0-4])\.esams\.wmnet$/ { -- To view, visit https://gerrit.wikimedia.org/r/227623 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibfae5212f323e5950143312e48f3e6eff5516006 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack bbl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 6d22fd1..85ca7d3 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/227626 Change subject: Syncronize VisualEditor: 6d22fd1..85ca7d3 .. Syncronize VisualEditor: 6d22fd1..85ca7d3 Change-Id: Ibbca9a87a34f2db979b45502ea7f70ff19f09e04 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/26/227626/1 diff --git a/VisualEditor b/VisualEditor index 6d22fd1..85ca7d3 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 6d22fd1aa77f088eb2c4f2f2f193d923a4c39ee7 +Subproject commit 85ca7d3e94234463733c4c903ccbdb247d634511 -- To view, visit https://gerrit.wikimedia.org/r/227626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibbca9a87a34f2db979b45502ea7f70ff19f09e04 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Close the wikitext switch confirmation dialog if serialisati... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Close the wikitext switch confirmation dialog if serialisation errors .. Close the wikitext switch confirmation dialog if serialisation errors Bug: T103632 Change-Id: Id9aede04ff4f8919770e578fac24ad4a1178b9a6 --- M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index b31b641..f9d682a 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -889,6 +889,8 @@ ve.init.mw.ViewPageTarget.prototype.onSerializeError = function ( jqXHR, status ) { alert( ve.msg( 'visualeditor-serializeerror', status ) ); + this.getSurface().getDialogs().closeWindow( 'wikitextswitchconfirm' ); + // It's possible to get here while the save dialog has never been opened (if the user uses // the switch to source mode option) if ( this.saveDialog ) { -- To view, visit https://gerrit.wikimedia.org/r/226974 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id9aede04ff4f8919770e578fac24ad4a1178b9a6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex Monk kren...@gmail.com Gerrit-Reviewer: Esanders esand...@wikimedia.org Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Ignore phpcs and travis config for export - change (utfnormal)
jenkins-bot has submitted this change and it was merged. Change subject: build: Ignore phpcs and travis config for export .. build: Ignore phpcs and travis config for export Follows-up 613e846. Change-Id: I1f08a40b3d5286d1d0dcdb47b18c7f49d9afd41e --- M .gitattributes 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitattributes b/.gitattributes index 02a9946..e19aa8d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,9 @@ .gitattributes export-ignore .gitignore export-ignore .gitreview export-ignore +.travis.yml export-ignore composer.json export-ignore +phpcs.xml export-ignore phpunit.xml.dist export-ignore tests export-ignore scripts/data export-ignore -- To view, visit https://gerrit.wikimedia.org/r/221744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f08a40b3d5286d1d0dcdb47b18c7f49d9afd41e Gerrit-PatchSet: 2 Gerrit-Project: utfnormal Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace perl inline with proper script - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: Replace perl inline with proper script .. Replace perl inline with proper script Bug: T106433 Change-Id: I7a335d4e6009b203b03bb89900a968b90b2b92c4 --- M jjb/wikidata.yaml 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: JanZerebecki: Looks good to me, approved jenkins-bot: Verified diff --git a/jjb/wikidata.yaml b/jjb/wikidata.yaml index 35600ab..8ad0b49 100644 --- a/jjb/wikidata.yaml +++ b/jjb/wikidata.yaml @@ -4,10 +4,7 @@ - shell: | set -eu cd $WORKSPACE/src/ -cat ../deps.txt | perl -ne ' - BEGIN { print { \extra\: { \merge-plugin\: { \include\: [; $lineend=; }; - if ( /^mediawiki\/extensions/ ) { s/^mediawiki\///; s/\n/\/composer.json/; $print=$lineend\n\$_\; $lineend=,; print $print } - END{ print \n] } } }\n };' composer.local.json + /srv/deployment/integration/slave-scripts/bin/mw-create-composer-local.py ../deps.txt composer.local.json timeout 300 composer update --prefer-source -vvv # FIXME BUG the first run just exits without error without finishing especially in a clean working copy timeout 300 composer update --prefer-source -vvv -- To view, visit https://gerrit.wikimedia.org/r/227625 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a335d4e6009b203b03bb89900a968b90b2b92c4 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Silence jshint for online instead of entire file - change (mediawiki/core)
Prtksxna has uploaded a new change for review. https://gerrit.wikimedia.org/r/227628 Change subject: Silence jshint for online instead of entire file .. Silence jshint for online instead of entire file Follows up I6f760f7c32e2e6ed2008e897af72fb9e17dd663b Suppress warning at the specific line that uses the static keyword rather than the entire file. Expected an identifier and instead saw 'static' (a reserved word). (W024) Change-Id: I0e4f9062b01b82893205da9e72c41acae3d6967f --- M resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/28/227628/1 diff --git a/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js b/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js index 0d743e4..9016e89 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js @@ -5,7 +5,6 @@ * @license The MIT License (MIT); see LICENSE.txt */ /*global moment */ -/*jshint es3: false */ ( function ( $, mw ) { /** @@ -474,7 +473,9 @@ */ mw.widgets.CalendarWidget.prototype.onKeyDown = function ( e ) { var + /*jshint -W024*/ dir = OO.ui.Element.static.getDir( this.$element ), + /*jshint +W024*/ nextDirectionKey = dir === 'ltr' ? OO.ui.Keys.RIGHT : OO.ui.Keys.LEFT, prevDirectionKey = dir === 'ltr' ? OO.ui.Keys.LEFT : OO.ui.Keys.RIGHT, updateInDirection = null; -- To view, visit https://gerrit.wikimedia.org/r/227628 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e4f9062b01b82893205da9e72c41acae3d6967f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Prtksxna psax...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits