lhc/web/wiklou.git
4 years agoRevert "Output more MW version info in update.php"
Reedy [Tue, 27 Aug 2019 07:40:29 +0000 (08:40 +0100)]
Revert "Output more MW version info in update.php"

Left changes to SpecialVersion.php

This reverts commit e73328601d51674e8fef89c3db12b30ceafd702f.

Bug: T227489
Change-Id: I673b6a6abb73e93d2253fc554f94ef9c833dae0c

4 years agoMerge "Special:NewFiles: Drop 'newbies' feature"
jenkins-bot [Tue, 27 Aug 2019 19:49:54 +0000 (19:49 +0000)]
Merge "Special:NewFiles: Drop 'newbies' feature"

4 years agoMerge "Special:Contributions: Drop 'newbies' feature"
jenkins-bot [Tue, 27 Aug 2019 19:45:27 +0000 (19:45 +0000)]
Merge "Special:Contributions: Drop 'newbies' feature"

4 years agoSpecial:NewFiles: Drop 'newbies' feature
James D. Forrester [Fri, 2 Aug 2019 19:32:23 +0000 (12:32 -0700)]
Special:NewFiles: Drop 'newbies' feature

Change-Id: I946d7027db0fec90d8af68f9370fdd7fe5fd61e0

4 years agoSpecial:Contributions: Drop 'newbies' feature
James D. Forrester [Fri, 2 Aug 2019 19:06:31 +0000 (12:06 -0700)]
Special:Contributions: Drop 'newbies' feature

This old, low-value feature has been replaced by the much more featureful
functionality on RecentChanges, which has the added advantage of using an
efficient query.

Bug: T220447
Change-Id: I2e6e12b2ad627ecc346883878811ec0164cd03da

4 years agoMerge "WebStart: Avoid DB or uselang for nonwrite-api-promise-error message"
jenkins-bot [Tue, 27 Aug 2019 18:35:09 +0000 (18:35 +0000)]
Merge "WebStart: Avoid DB or uselang for nonwrite-api-promise-error message"

4 years agoMerge "MessageCache: Remove $wgMsgCacheExpiry configuration var"
jenkins-bot [Tue, 27 Aug 2019 18:33:05 +0000 (18:33 +0000)]
Merge "MessageCache: Remove $wgMsgCacheExpiry configuration var"

4 years agoMerge "MessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access"
jenkins-bot [Tue, 27 Aug 2019 18:31:18 +0000 (18:31 +0000)]
Merge "MessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access"

4 years agoMerge "BadFileLookup::isBadFile() expects null, not false"
jenkins-bot [Tue, 27 Aug 2019 18:25:54 +0000 (18:25 +0000)]
Merge "BadFileLookup::isBadFile() expects null, not false"

4 years agoBadFileLookup::isBadFile() expects null, not false
Aryeh Gregor [Tue, 27 Aug 2019 17:21:28 +0000 (20:21 +0300)]
BadFileLookup::isBadFile() expects null, not false

This deviation in behavior from wfIsBadImage() is accounted for in that
function, but I didn't account for it when changing callers to use the
service.

Bug: T231340
Bug: T231353
Change-Id: Iddf177770fb1763ed295d694ed6bab441ea9ab73

4 years agoMessageCache: Remove $wgMsgCacheExpiry configuration var
Timo Tijhof [Tue, 27 Aug 2019 15:35:49 +0000 (16:35 +0100)]
MessageCache: Remove $wgMsgCacheExpiry configuration var

This variable has never been set to anything other than the default value of
24 hours as introduced in 2003 (r2203, r2204; or 036ff960ceedf6b38626).

The variable has never changed in core, it's not overridden at WMF,
and MessageCache is not constructed anywhere other than ServiceWiring.php
anywhere in repos on Wikimedia Gerrit, indexed by MediaWiki Codesearch,
or any GitHub-hosted repository (incl Wikia repos and WikiHow mirrors).

I've also checked all GitHub-hosted repos for boilerplates and/or public
settings files from devs or prod, and couldn't find any example of
this being overridden (after filtering out copies of the core files
themselves). Rather than having to support potentially hard-to-predict
interactions betweeen caching layers by checking its state, make it
a constant so we can code reason about it more easily.

Change-Id: Ie2e139001aae3ac54b509d94a3d917bb408eaca0

4 years agoMerge "Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist"
jenkins-bot [Tue, 27 Aug 2019 17:23:05 +0000 (17:23 +0000)]
Merge "Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist"

4 years agoMerge "Restore some previous constructor calls"
jenkins-bot [Tue, 27 Aug 2019 17:04:14 +0000 (17:04 +0000)]
Merge "Restore some previous constructor calls"

4 years agoRemove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist
Reedy [Tue, 27 Aug 2019 16:53:27 +0000 (17:53 +0100)]
Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist

It's causing quite a bit of WMF log spam because it's still used in wmf-config

Partial revert of I4c90e361b7538efeb0c5efa7ca61aed2e468591c

Change-Id: I7d1282e4260e7a42bee35b81d77470eb40dea818

4 years agoMerge "Avoid PHP warning due to bogus second tideways_xhprof_enable() argument"
jenkins-bot [Tue, 27 Aug 2019 16:29:10 +0000 (16:29 +0000)]
Merge "Avoid PHP warning due to bogus second tideways_xhprof_enable() argument"

4 years agoMessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access
Timo Tijhof [Tue, 27 Aug 2019 15:26:20 +0000 (16:26 +0100)]
MessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access

The class used is typed against BagOStuff so access the constant
from there instead.

Bug: T218207
Change-Id: Ie22d6aa5877fb5e8e2ae0b3be87f4b28f45ad763

4 years agoMerge "rdbms: remove unused $fulltextEnabled field from DatabaseSqlite"
jenkins-bot [Tue, 27 Aug 2019 16:21:21 +0000 (16:21 +0000)]
Merge "rdbms: remove unused $fulltextEnabled field from DatabaseSqlite"

4 years agoMerge "Hard deprecate new SearchResult() and introduce RevisionSearchResult"
jenkins-bot [Tue, 27 Aug 2019 15:53:34 +0000 (15:53 +0000)]
Merge "Hard deprecate new SearchResult() and introduce RevisionSearchResult"

4 years agoMerge "LockManagerGroupFactory to replace singletons"
jenkins-bot [Tue, 27 Aug 2019 15:41:15 +0000 (15:41 +0000)]
Merge "LockManagerGroupFactory to replace singletons"

4 years agoMerge "Use correct metadata when adding exact query match"
jenkins-bot [Tue, 27 Aug 2019 15:34:43 +0000 (15:34 +0000)]
Merge "Use correct metadata when adding exact query match"

4 years agoHard deprecate new SearchResult() and introduce RevisionSearchResult
David Causse [Thu, 1 Aug 2019 20:38:46 +0000 (22:38 +0200)]
Hard deprecate new SearchResult() and introduce RevisionSearchResult

Transitional step for the transformation of SearchResult into an
abstract base class:
- RevisionSearchResult is introduced to behave like SearchResult
- methods are currently shared between  RevisionSearchResult and
  SearchResult in the RevisionSearchResultTrait

Bug: T228626
Change-Id: I13d132de50f6c66086b7f9055d036f2e76667b27

4 years agoMerge "mail: Avoid use of global state and use MediaWiki services DI"
jenkins-bot [Tue, 27 Aug 2019 15:26:47 +0000 (15:26 +0000)]
Merge "mail: Avoid use of global state and use MediaWiki services DI"

4 years agoMerge "Use UserIdentity::isRegistered instead of User::isAnon in BlockManager"
jenkins-bot [Tue, 27 Aug 2019 15:22:40 +0000 (15:22 +0000)]
Merge "Use UserIdentity::isRegistered instead of User::isAnon in BlockManager"

4 years agoMerge "Use ->getTitle() instead of ->mTitle to get the title from Parser"
jenkins-bot [Tue, 27 Aug 2019 14:30:12 +0000 (14:30 +0000)]
Merge "Use ->getTitle() instead of ->mTitle to get the title from Parser"

4 years agomail: Avoid use of global state and use MediaWiki services DI
Derick Alangi [Mon, 26 Aug 2019 13:03:35 +0000 (14:03 +0100)]
mail: Avoid use of global state and use MediaWiki services DI

Change-Id: If335cb6a220ebc5eb7487e51ee097f9d2afa0d2d

4 years agoMerge "wdio: Switch to dots reporter for brevity"
jenkins-bot [Tue, 27 Aug 2019 13:13:43 +0000 (13:13 +0000)]
Merge "wdio: Switch to dots reporter for brevity"

4 years agoUse correct metadata when adding exact query match
Ed Sanders [Tue, 27 Aug 2019 11:15:54 +0000 (12:15 +0100)]
Use correct metadata when adding exact query match

Bug: T230819
Change-Id: If85fa1cbad1f3ef9ab2cb0da966a98aafffad05e

4 years agoUse ->getTitle() instead of ->mTitle to get the title from Parser
Fomafix [Tue, 27 Aug 2019 10:29:39 +0000 (12:29 +0200)]
Use ->getTitle() instead of ->mTitle to get the title from Parser

This allows to make mTitle a private property.

Change-Id: If953546cf4bb0324e4ae41d2195254c37c0ad3b4

4 years agoLockManagerGroupFactory to replace singletons
Aryeh Gregor [Thu, 15 Aug 2019 18:07:36 +0000 (21:07 +0300)]
LockManagerGroupFactory to replace singletons

100% test coverage of code that appears to be working and used, in both
LockManagerGroupFactory and also LockManagerGroup. Where possible I
wrote it as unit tests. One preexisting code path seems to be broken and
I marked the test as skipped. Two methods look unused and perhaps not
especially helpful, so I didn't write tests for them yet in case we want
to just get rid of them instead.

Change-Id: Iaa7354f31c451b87773468609c674a3bf1d4382f

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 27 Aug 2019 08:14:39 +0000 (10:14 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I52497a0a7f1d15ca6643556e3967d9302572a40f

4 years agoRestore some previous constructor calls
Matěj Suchánek [Tue, 27 Aug 2019 07:56:38 +0000 (09:56 +0200)]
Restore some previous constructor calls

Follow-up to If07f10075a51fbbe9de24464cb6844faaad94780
and I082152b64141f1a9a4085bba23fe81a99ec8d886.

It will make getRequest use the provided context again.

Change-Id: I60b2598edcb0daed076876482e1e9d6cbf815eb2

4 years agoUse UserIdentity::isRegistered instead of User::isAnon in BlockManager
Thalia [Mon, 26 Aug 2019 23:21:04 +0000 (00:21 +0100)]
Use UserIdentity::isRegistered instead of User::isAnon in BlockManager

BlockManager::getBlockFromCookieValue accepts a UserIdentity, so should
only call methods defined in that interface.

Change-Id: If30df15b800cceee0ad052a2e0524df8b28d9901

4 years agoMerge "TablePager: put parent construct call back at end"
jenkins-bot [Tue, 27 Aug 2019 05:09:07 +0000 (05:09 +0000)]
Merge "TablePager: put parent construct call back at end"

4 years agoTablePager: put parent construct call back at end
Elliott Eggleston [Tue, 27 Aug 2019 03:42:07 +0000 (22:42 -0500)]
TablePager: put parent construct call back at end

Restores position of parent constructor call, changed in commit
I082152b64141f1a.

The parent constructor calls getIndexField(), which depends on the
mSort value already being set.

Bug: T231261
Change-Id: If07f10075a51fbbe9de24464cb6844faaad94780

4 years agoMerge "Add more information to exception thrown"
jenkins-bot [Tue, 27 Aug 2019 03:03:42 +0000 (03:03 +0000)]
Merge "Add more information to exception thrown"

4 years agoAdd more information to exception thrown
Max Semenik [Tue, 27 Aug 2019 02:03:09 +0000 (19:03 -0700)]
Add more information to exception thrown

It's not just about the preference name, because current user's properties
are used for validation too.

Bug: T231029
Change-Id: I268b959017bb0dce2b4295d5302a544bfa3513eb

4 years agoMerge "Add help link to Special:NewSection"
jenkins-bot [Tue, 27 Aug 2019 01:19:16 +0000 (01:19 +0000)]
Merge "Add help link to Special:NewSection"

4 years agoMerge "Add SearchResultTrait"
jenkins-bot [Tue, 27 Aug 2019 00:32:25 +0000 (00:32 +0000)]
Merge "Add SearchResultTrait"

4 years agoAdd help link to Special:NewSection
DannyS712 [Tue, 27 Aug 2019 00:24:23 +0000 (00:24 +0000)]
Add help link to Special:NewSection

Bug: T231260
Change-Id: I856f5256b45c3961186f27c3b0b190998e297c1a

4 years agoMerge "Setup: Remove scopedProfileIn() calls"
jenkins-bot [Mon, 26 Aug 2019 23:36:44 +0000 (23:36 +0000)]
Merge "Setup: Remove scopedProfileIn() calls"

4 years agoMerge "REST: call MediaWiki::preOutputCommit and doPostOutputShutdown"
jenkins-bot [Mon, 26 Aug 2019 23:36:36 +0000 (23:36 +0000)]
Merge "REST: call MediaWiki::preOutputCommit and doPostOutputShutdown"

4 years agoMerge "SpecialNewSection: Fix handling of 'preloadparams'"
jenkins-bot [Mon, 26 Aug 2019 23:30:12 +0000 (23:30 +0000)]
Merge "SpecialNewSection: Fix handling of 'preloadparams'"

4 years agoMerge "Clean up LinkRenderer usage in IndexPager and extensions"
jenkins-bot [Mon, 26 Aug 2019 23:14:38 +0000 (23:14 +0000)]
Merge "Clean up LinkRenderer usage in IndexPager and extensions"

4 years agoMerge "Revert "Make LocalisationCache a service""
jenkins-bot [Mon, 26 Aug 2019 22:00:46 +0000 (22:00 +0000)]
Merge "Revert "Make LocalisationCache a service""

4 years agoMerge "objectcache: SqlBagOStuff cleanups for sqlite and postgres"
jenkins-bot [Mon, 26 Aug 2019 22:00:39 +0000 (22:00 +0000)]
Merge "objectcache: SqlBagOStuff cleanups for sqlite and postgres"

4 years agoMerge "rdbms: simplify comment in LoadBalancer::reuseConnection()"
jenkins-bot [Mon, 26 Aug 2019 21:23:28 +0000 (21:23 +0000)]
Merge "rdbms: simplify comment in LoadBalancer::reuseConnection()"

4 years agoMerge "rdbms: rename $db => $conn in remaining places in LoadBalancer"
jenkins-bot [Mon, 26 Aug 2019 21:21:34 +0000 (21:21 +0000)]
Merge "rdbms: rename $db => $conn in remaining places in LoadBalancer"

4 years agoMerge "Setup: Move wgRCLinkDays logic from Setup to ChangesListSpecialPage"
jenkins-bot [Mon, 26 Aug 2019 20:43:19 +0000 (20:43 +0000)]
Merge "Setup: Move wgRCLinkDays logic from Setup to ChangesListSpecialPage"

4 years agordbms: remove unused $fulltextEnabled field from DatabaseSqlite
Aaron Schulz [Mon, 26 Aug 2019 17:24:36 +0000 (10:24 -0700)]
rdbms: remove unused $fulltextEnabled field from DatabaseSqlite

Change-Id: Idad680485f6cf6b521a0ea33c02d30e78d1d6b50

4 years agoMerge "Use local variabe $services instead of MediaWikiServices::getInstance()"
jenkins-bot [Mon, 26 Aug 2019 19:05:14 +0000 (19:05 +0000)]
Merge "Use local variabe $services instead of MediaWikiServices::getInstance()"

4 years agoMerge "Disambiguate confusing $fromReplica variable in BlockManager"
jenkins-bot [Mon, 26 Aug 2019 18:45:00 +0000 (18:45 +0000)]
Merge "Disambiguate confusing $fromReplica variable in BlockManager"

4 years agoSpecialNewSection: Fix handling of 'preloadparams'
Bartosz Dziewoński [Mon, 26 Aug 2019 18:02:57 +0000 (20:02 +0200)]
SpecialNewSection: Fix handling of 'preloadparams'

The parent class RedirectSpecialPage handles array parameters
automatically, and we need to specify the name without the '[]',
same as in RedirectSpecialArticle.

Bug: T231088
Change-Id: I52838a39f3311fe612c466903d7eda95fecedfa7

4 years agoRevert "Make LocalisationCache a service"
Amir Sarabadani [Mon, 26 Aug 2019 16:28:26 +0000 (18:28 +0200)]
Revert "Make LocalisationCache a service"

This reverts commits:
 - 76a940350d36c323ebedb4ab45cc81ed1c6b6c92
 - b78b8804d076618e967c7b31ec15a1bd9e35d1d0
 - 2e52f48c2ed8dcf480843e2186f685a86810e2ac
 - e4468a1d6b6b9fdc5b64800febdc8748d21f213d

Bug: T231200
Bug: T231198
Change-Id: I1a7e46a979ae5c9c8130dd3927f6663a216ba753

4 years agoobjectcache: SqlBagOStuff cleanups for sqlite and postgres
Aaron Schulz [Thu, 15 Aug 2019 13:26:51 +0000 (09:26 -0400)]
objectcache: SqlBagOStuff cleanups for sqlite and postgres

Make createTables() work for Postgres. Also add and use new
initSqliteDatabase() method for SQLite.

Also use ConvertibleTimestamp instead of wfTimestamp

Change-Id: I8e4505775e57fc6cd7380afa015fc0901a1bfc1b

4 years agordbms: rename $db => $conn in remaining places in LoadBalancer
Aaron Schulz [Mon, 26 Aug 2019 16:15:04 +0000 (09:15 -0700)]
rdbms: rename $db => $conn in remaining places in LoadBalancer

Change-Id: I7e419cdc97d03616d5ee011a97fca658d0d79cad

4 years agoMerge "language: Move ConverterRule to includes/ and add test case"
jenkins-bot [Mon, 26 Aug 2019 15:09:13 +0000 (15:09 +0000)]
Merge "language: Move ConverterRule to includes/ and add test case"

4 years agoUse local variabe $services instead of MediaWikiServices::getInstance()
Fomafix [Mon, 26 Aug 2019 14:08:10 +0000 (16:08 +0200)]
Use local variabe $services instead of MediaWikiServices::getInstance()

Change-Id: Ieb6230231d9b916fd1366e7b473db00c87ac4428

4 years agolanguage: Move ConverterRule to includes/ and add test case
Timo Tijhof [Sun, 25 Aug 2019 17:55:34 +0000 (18:55 +0100)]
language: Move ConverterRule to includes/ and add test case

Add a very basic test that creates an instance, invokes it
with an empty string, and asserts the types and values returned
by the public methods used in LanguageConverter::applyManualConv.

Bug: T225756
Change-Id: I3600260e712f019243ba5f00890011e694444e43

4 years agoPass correct store to rebuildLocalisationCache.php
Aryeh Gregor [Mon, 26 Aug 2019 09:54:19 +0000 (12:54 +0300)]
Pass correct store to rebuildLocalisationCache.php

e4468a1d6b6 completely broke rebuildLocalisationCache.php by
unconditionally passing in LCStoreDB( [] ) instead of constructing the
correct object.

Bug: T231183
Change-Id: I0d52662e8745cf0e10091169b3b08eff48ef2b8f

4 years agoCorrectly register storeDirectory in l10n cache
Aryeh Gregor [Mon, 26 Aug 2019 09:41:56 +0000 (12:41 +0300)]
Correctly register storeDirectory in l10n cache

e4468a1d6b6 made LocalisationCache a service and refactored a bunch of
setup code. In doing so, when processing 'storeDirectory' from
$wgLocalisationCacheConf, it accidentally started treating empty
non-null values (such as the default "false") as storage paths instead
of meaning "fall back to $wgCacheDirectory". This would have broken all
config that used file store for LocalisationCache and did not specify
'storeDirectory'.

Bug: T231183
Change-Id: I9ff16be628996b202599e3bb2feed088af03775f

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 26 Aug 2019 06:32:31 +0000 (08:32 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I85f8b577290b04d60af1fa4f9151a6756a658aa8

4 years agordbms: simplify comment in LoadBalancer::reuseConnection()
Aaron Schulz [Mon, 26 Aug 2019 06:04:24 +0000 (23:04 -0700)]
rdbms: simplify comment in LoadBalancer::reuseConnection()

Change-Id: Ie6ea6ac7617b1f026b0ee7b8b76c287ec0da9e34

4 years agoMerge "title: Fix flaky TitlePermissionTest::testUserBlock"
jenkins-bot [Mon, 26 Aug 2019 04:35:59 +0000 (04:35 +0000)]
Merge "title: Fix flaky TitlePermissionTest::testUserBlock"

4 years agoREST: call MediaWiki::preOutputCommit and doPostOutputShutdown
Tim Starling [Fri, 16 Aug 2019 04:38:48 +0000 (14:38 +1000)]
REST: call MediaWiki::preOutputCommit and doPostOutputShutdown

As in api.php. Among other things, this enables profiling.

Move EntryPoint test out of unit/ so that it passes.

Use ob_start()/ob_end_clean() instead of assuming an output buffer is
open, so that EntryPoint::execute() can be run from CLI mode.

Change-Id: I38162a9eac6fd5acfed2035b87cac4a97ffd50d6

4 years agoSetup: Move wgRCLinkDays logic from Setup to ChangesListSpecialPage
Timo Tijhof [Sun, 25 Aug 2019 22:19:48 +0000 (23:19 +0100)]
Setup: Move wgRCLinkDays logic from Setup to ChangesListSpecialPage

This is only needed when viewing SpecialRecentChanges (or a related
page). Move the consuming logic to that class, where it can be
maintained as part of the rest of the code. This also makes it
more testable and makes config easier to work with or load from
elsewhere in the future. Aside from some dynamic default values,
configuration should generally not mutate. If there is some domain-
specific way to consume it, the relevant component should be
responsible for doing so. This also means we defer such logic to
where it is needed, instead of unconditionally for all possible
features that might be used.

Bug: T189966
Change-Id: If17608909711d98ac560b6d64f72ba7913a561a9

4 years agoMerge "resourceloader: Add coverage for internal Context::getReqBase()"
jenkins-bot [Sun, 25 Aug 2019 22:15:02 +0000 (22:15 +0000)]
Merge "resourceloader: Add coverage for internal Context::getReqBase()"

4 years agoMerge "rdbms: refactor caching in LoadBalancer::getReadOnlyReason()"
jenkins-bot [Sun, 25 Aug 2019 22:12:00 +0000 (22:12 +0000)]
Merge "rdbms: refactor caching in LoadBalancer::getReadOnlyReason()"

4 years agoAvoid PHP warning due to bogus second tideways_xhprof_enable() argument
Aaron Schulz [Sun, 25 Aug 2019 22:03:33 +0000 (15:03 -0700)]
Avoid PHP warning due to bogus second tideways_xhprof_enable() argument

Change-Id: I3d86d74e8a97eb578f392f9f1d918cc628d2bf4b

4 years agordbms: refactor caching in LoadBalancer::getReadOnlyReason()
Aaron Schulz [Tue, 16 Jul 2019 06:06:13 +0000 (23:06 -0700)]
rdbms: refactor caching in LoadBalancer::getReadOnlyReason()

Avoid nesting of the same getWithSetCallback() cache updates.
Also favor accuracy over initial cache use for the case where
there is already a master connection. Add missing "lockTSE"
flag to protect against stampedes updating stale values.

Change serverIsReadOnly() to use SELECT in mysql instead of
SHOW to avoid internal temporary tables.

Bug: T227838
Change-Id: I2b0d680c9c3bdc7aaa1d1e1d6beb2dd203a815f1

4 years agordbms: make IDatabase comments more up-to-date and stylistically consistent
Aaron Schulz [Wed, 7 Aug 2019 21:43:21 +0000 (14:43 -0700)]
rdbms: make IDatabase comments more up-to-date and stylistically consistent

Keep the first comment line of methods short, mention "expected" exceptions,
and break long method signatures into separate lines.

Change-Id: I64b36210f2451d46f8f2412b48dc846b56989e82

4 years agoSetup: Remove scopedProfileIn() calls
Timo Tijhof [Sun, 25 Aug 2019 18:22:26 +0000 (19:22 +0100)]
Setup: Remove scopedProfileIn() calls

To my knowledge this never goes anywhere. These are left overs from
when we used profileIn/profileOut still, which we no longer use
given things like Tideways and XHProf are now recommended for
profiling, instead.

Bug: T189966
Change-Id: Id1bacc951f267dc1d3872aed935afd306adc37b3

4 years agoWebStart: Avoid DB or uselang for nonwrite-api-promise-error message
Timo Tijhof [Sun, 25 Aug 2019 18:15:34 +0000 (19:15 +0100)]
WebStart: Avoid DB or uselang for nonwrite-api-promise-error message

Make the code easier to reason about by not involving global state from
LBFactory, RequestContext, SessionManager, and User.

Bug: T189966
Change-Id: I88d2bf58ebd481009ce295335d730a34dbb277fb

4 years agoClean up LinkRenderer usage in IndexPager and extensions
Matěj Suchánek [Tue, 9 Jul 2019 10:45:54 +0000 (12:45 +0200)]
Clean up LinkRenderer usage in IndexPager and extensions

The property needs to be private because pagers in extensions
may declare the same property with stronger visibility which
would crash.

Bug: T149346
Change-Id: I082152b64141f1a9a4085bba23fe81a99ec8d886

4 years agoresourceloader: Add coverage for internal Context::getReqBase()
Timo Tijhof [Sun, 25 Aug 2019 18:01:48 +0000 (19:01 +0100)]
resourceloader: Add coverage for internal Context::getReqBase()

Change-Id: I068000f55f2100a6791470896d7f1050bdcb19a4

4 years agoRemove more Oracle and Mssql leftovers
Daimona Eaytoy [Thu, 15 Aug 2019 12:21:55 +0000 (14:21 +0200)]
Remove more Oracle and Mssql leftovers

Follows-up 4d10bb14e81 and 807d793ab9079.

According to codesearch [0], these were the last usages. Note that this
patch leaves two constants in places, IDatabase::DBO_SYSDBA and
DBO_DDLMODE. These are public constants used "mostly for oracle" according
to the docs, but maybe we could find other use cases in the future (?).

[0] - https://codesearch.wmflabs.org/core/?q=oracle%7Cmssql&i=fosho&files=%5C.%5B%5Ej%5Cd%5D%7Cen%5C.json&repos=

Bug: T230418
Change-Id: Ibfb748b4b23b885a77f4de161af4bf2ab9649a89

4 years agoMerge "Revert "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX""
jenkins-bot [Sun, 25 Aug 2019 17:09:21 +0000 (17:09 +0000)]
Merge "Revert "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX""

4 years agoMerge "objectcache: make MediumSpecificBagOStuff::mergeViaCas() handle negative TTLs"
jenkins-bot [Sun, 25 Aug 2019 16:57:41 +0000 (16:57 +0000)]
Merge "objectcache: make MediumSpecificBagOStuff::mergeViaCas() handle negative TTLs"

4 years agoRevert "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX"
Urbanecm [Sun, 25 Aug 2019 16:30:30 +0000 (16:30 +0000)]
Revert "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX"

This reverts commit 45831e619c5e667ae1201bcdacfb8d4dcce10b41.

Reason for revert: Caused beta not work at all.

Bug: T231162
Change-Id: Icc5c1fa0dc01082a622641ad96c22c939cd56d48

4 years agoMerge "Migrate BagOStuff::incr() calls to incrWithInit()"
jenkins-bot [Sun, 25 Aug 2019 15:11:49 +0000 (15:11 +0000)]
Merge "Migrate BagOStuff::incr() calls to incrWithInit()"

4 years agotitle: Fix flaky TitlePermissionTest::testUserBlock
Timo Tijhof [Sun, 25 Aug 2019 15:04:19 +0000 (16:04 +0100)]
title: Fix flaky TitlePermissionTest::testUserBlock

The mock timestamp is asserted via $prev, which is set a few lines
up.

The input timestamp is set as 0, which usually passes (if these two
lines execute in the same second), but when the two lines of code
are on opposite sides of a clock second boundary, the test would
fail.

Instead of fixing the setTimestamp() call, remove it in favour of
fixing the 'timestamp' option instead, which was needlessly
being set to one thing and then overwritten by setTimestamp.

Bug: T231166
Change-Id: If6a1e4ec7b91efee0a43e6dd86794f15c5a440b3

4 years agoMerge "rdbms: add setTempTablesOnlyMode() to suppress CONN_TRX_AUTOCOMMIT during...
jenkins-bot [Sun, 25 Aug 2019 15:02:48 +0000 (15:02 +0000)]
Merge "rdbms: add setTempTablesOnlyMode() to suppress CONN_TRX_AUTOCOMMIT during tests"

4 years agoMerge "Make the JobRunner flushReplicaSnapshots() call cover the first job"
jenkins-bot [Sun, 25 Aug 2019 14:54:19 +0000 (14:54 +0000)]
Merge "Make the JobRunner flushReplicaSnapshots() call cover the first job"

4 years agoMerge "Make NameTableStore use LoadBalancer::getConnectionRef()"
jenkins-bot [Sun, 25 Aug 2019 14:38:56 +0000 (14:38 +0000)]
Merge "Make NameTableStore use LoadBalancer::getConnectionRef()"

4 years agoMake the JobRunner flushReplicaSnapshots() call cover the first job
Aaron Schulz [Fri, 2 Aug 2019 19:28:18 +0000 (15:28 -0400)]
Make the JobRunner flushReplicaSnapshots() call cover the first job

If JobRunner is called when replica transactions exists, the first job
would previously use the stale REPEATABLE-READ snapshot data.

Also clear any master connection snapshots via commitMasterChanges().
This makes the code more similar to DeferredUpdates::attemptUpdate().

Change-Id: I2157a91fb01ea8c233f964b1f3164e8c3b1a07ca

4 years agoMerge "parsercache: use WRITE_ALLOW_SEGMENTS for cached ParserOutput values"
Krinkle [Sun, 25 Aug 2019 14:06:52 +0000 (14:06 +0000)]
Merge "parsercache: use WRITE_ALLOW_SEGMENTS for cached ParserOutput values"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 25 Aug 2019 07:50:55 +0000 (09:50 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I89aab65db771aaded5fb8a3517cea3545a6efa01

4 years agoMake NameTableStore use LoadBalancer::getConnectionRef()
Aaron Schulz [Sun, 4 Aug 2019 03:38:54 +0000 (23:38 -0400)]
Make NameTableStore use LoadBalancer::getConnectionRef()

This method handles reuseConnection() calls, disallows writes to
DB_REPLICA role handles, is more consistent with wfGetDB(), and
is more efficient with I540b08920997c5.

Change-Id: I8edaef0ea4718414e2004fad04afca8ec5797669

4 years agoMigrate BagOStuff::incr() calls to incrWithInit()
Aaron Schulz [Fri, 9 Aug 2019 22:56:18 +0000 (15:56 -0700)]
Migrate BagOStuff::incr() calls to incrWithInit()

Change-Id: I722d6fe3d50c594858e3e7960fb99ef2fc1664b3

4 years agoparsercache: use WRITE_ALLOW_SEGMENTS for cached ParserOutput values
Aaron Schulz [Tue, 18 Jun 2019 15:35:27 +0000 (16:35 +0100)]
parsercache: use WRITE_ALLOW_SEGMENTS for cached ParserOutput values

This lets large output entries fit into memcached via key segmentation.

Follows b09b3980f99 which applied the feature to PageEditStash.

Bug: T204742
Change-Id: I33a60f5d718cd9033ea12d1d16046d2bede87b5b

4 years agoMerge "rdbms: make LBFactory close/rollback dangling handles like LoadBalancer"
jenkins-bot [Sat, 24 Aug 2019 23:15:36 +0000 (23:15 +0000)]
Merge "rdbms: make LBFactory close/rollback dangling handles like LoadBalancer"

4 years agoobjectcache: make WANObjectCache::relayPurge() actually use $holdoff
Aaron Schulz [Sun, 21 Jul 2019 09:53:53 +0000 (02:53 -0700)]
objectcache: make WANObjectCache::relayPurge() actually use $holdoff

Fixes a regression introduced by 70547f3fa304 in 2016.

Change-Id: I5996b63c31ac3b382e838a6858b8585bdc8c585c

4 years agoMerge "resourceloader: Map group names to integers internally"
jenkins-bot [Sat, 24 Aug 2019 22:40:59 +0000 (22:40 +0000)]
Merge "resourceloader: Map group names to integers internally"

4 years agoMerge "resourceloader: Add tests for mw.loader not storing private/user response"
jenkins-bot [Sat, 24 Aug 2019 22:40:53 +0000 (22:40 +0000)]
Merge "resourceloader: Add tests for mw.loader not storing private/user response"

4 years agoMerge "resourceloader: Add tests for disallowing access to private modules"
jenkins-bot [Sat, 24 Aug 2019 22:20:32 +0000 (22:20 +0000)]
Merge "resourceloader: Add tests for disallowing access to private modules"

4 years agoMerge "objectcache: rename getDB() to getConnection() in SqlBagOStuff"
jenkins-bot [Sat, 24 Aug 2019 20:57:17 +0000 (20:57 +0000)]
Merge "objectcache: rename getDB() to getConnection() in SqlBagOStuff"

4 years agoMerge "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX"
jenkins-bot [Sat, 24 Aug 2019 20:55:48 +0000 (20:55 +0000)]
Merge "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX"

4 years agoMerge "filebackend: update code comments and break some long lines"
jenkins-bot [Sat, 24 Aug 2019 20:45:44 +0000 (20:45 +0000)]
Merge "filebackend: update code comments and break some long lines"

4 years agoMerge "objectcache: improve BagOStuff arithmetic method signatures"
jenkins-bot [Sat, 24 Aug 2019 20:45:19 +0000 (20:45 +0000)]
Merge "objectcache: improve BagOStuff arithmetic method signatures"

4 years agoMerge "maintenance: Cleanup db code and bogus RevisionRecord constants in NamespaceDupes"
jenkins-bot [Sat, 24 Aug 2019 20:39:07 +0000 (20:39 +0000)]
Merge "maintenance: Cleanup db code and bogus RevisionRecord constants in NamespaceDupes"

4 years agoMerge "maintenance: Fix bogus IDatabase method calls in sqlite.php"
jenkins-bot [Sat, 24 Aug 2019 20:34:18 +0000 (20:34 +0000)]
Merge "maintenance: Fix bogus IDatabase method calls in sqlite.php"