Commit graph

106773 commits

Author SHA1 Message Date
Reedy
64353177e1 Upgrading guzzlehttp/psr7 (1.8.3 => 2.1.0)
Change-Id: I3af605d909cffd625b278577887394cbe61a9c6e
Depends-On: I8e9c899462b23e94bc8ff7875670062f97b3f1c6
2021-11-15 16:57:25 +00:00
jenkins-bot
b31db93458 Merge "Upgrading guzzlehttp/guzzle (7.2.0 => 7.4.0)" 2021-11-15 16:33:34 +00:00
jenkins-bot
7a09e2b6da Merge "media: Avoid logspam in case of lack of 'data' in metadata" 2021-11-15 15:57:56 +00:00
jenkins-bot
34ce0ad77c Merge "Drop User methods which were deprecated since 1.35" 2021-11-15 15:57:50 +00:00
Amir Sarabadani
d762c439ba media: Avoid logspam in case of lack of 'data' in metadata
Change-Id: Id4e0235ea4cee249f8b1e137cbd7f865e5ef6f15
2021-11-15 16:03:23 +01:00
Ladsgroup
8c4898d6be Revert "media: Port DjVuImage::retrieveMetaData() to use BoxedCommand"
This reverts commit 9834e56f38.

Reason for revert: Does not work in production (CLI mode)

Change-Id: Ibcbaeb83a3682bdcba167a1d5d5a1b8efb89ee75
2021-11-15 13:57:11 +01:00
Translation updater bot
5461a3e7e8 Localisation updates from https://translatewiki.net.
Change-Id: I6e017d6bebb3e559818605ceaeb218609ad3e4ed
2021-11-15 07:56:32 +01:00
jenkins-bot
35f864c422 Merge "resourceloader: Only load LanguageFallback data if module has languageScripts" 2021-11-14 11:18:23 +00:00
Alexander Vorwerk
9c97f7a7e4 Follow-Up: I10fbd4b6a: Update @since tags as those were backported
Bug: T281972
Change-Id: Ifef75649e217d4c9d1f5e66bd09116febe242038
2021-11-13 23:02:07 +01:00
Alexander Vorwerk
f172fd717c Create redirect Special Pages for delete and protect action
Adding Special:Delete and Special:Protect as redirects to the delete and
protect action.

Bug: T295611
Change-Id: Idf076573c0f429171221660145b616ec83516a2a
2021-11-13 13:21:49 +00:00
jenkins-bot
a8732ab2c5 Merge "ContentHandlerTest: Remove wfGetLangObj and test case from test" 2021-11-12 19:24:01 +00:00
jenkins-bot
9ca625b33e Merge "Increase memory limit for DjVu metadata" 2021-11-12 18:25:32 +00:00
Amir Sarabadani
4e8e644f8e Increase memory limit for DjVu metadata
With recent changes that moves reading the file to Shellbox, it seems
the current memory limit (~300KB) is extremely small and it broke
rendering of basically any DjVu file on the beta cluster, even when Shellbox is
is disabled there.

Until T292322 is resolved, this should stay. If we decide that moving
the file along the wire is better than looking them up in swift, this
should stay forever.

Bug: T275268
Change-Id: I292ee4f0ae79e7bd8afe9578c2ca0c4410c681ca
2021-11-12 17:57:14 +00:00
jenkins-bot
3c624d2de7 Merge "Introducing SettingsBuilder for loading settings files." 2021-11-12 17:24:29 +00:00
daniel
84dfbecc1b Introducing SettingsBuilder for loading settings files.
The goal is to use SettingsBuilder to load settings from JSON files
instead of relying on PHP files that manipulate global variables.

To allow for a smooth transition to the new system, config settings read
from JSON files will be applied to global variables, and it will be
possible to load JSON files programmatically from inside traditional
settings files.

Bug: T294740
Bug: T295500
Bug: T294741
Change-Id: Ibf52c660715fd0e6e67fea5169811ece9ed67cf7
2021-11-12 17:59:59 +01:00
vladshapik
9b92c1088f Drop User methods which were deprecated since 1.35
The following User methods, deprecated in 1.35, have been removed:
  - ::isIP,
  - ::isIPRange,
  - ::isValidUserName,
  - ::isUsableName,
  - ::isCreatableName,
  - ::getCanonicalName,
  - ::addAutopromoteOnceGroups,
  - ::getDefaultOptions,
  - ::getDefaultOption,
  - ::getOptions,
  - ::getBoolOption,
  - ::getIntOption,
  - ::setOption
  - ::listOptionKinds
  - ::getOptionKinds,
  - ::resetOptions,
  - ::getEffectiveGroups,
  - ::getAutomaticGroups,
  - ::getFormerGroups
User::GETOPTIONS_EXCLUDE_DEFAULTS has been removed, since it is used only in the description of User::getOptions.

Bug: T277511
Depends-On: Ida05c22f81b30d9b46678e8ede3d531c38855d83
Change-Id: I72bbc2336f8ddbc66ce67226cd2d5baaa2f807d8
2021-11-12 15:35:50 +02:00
jenkins-bot
e13dd0bf15 Merge "media: Make new DjVu metadata handler more defensive" 2021-11-12 10:36:13 +00:00
Amir Sarabadani
196045006d media: Make new DjVu metadata handler more defensive
Currently, it's fataling on the beta cluster because metadata can't be
extracted there:
https://commons.wikimedia.beta.wmflabs.org/wiki/File:PrasadSpaceTime.djvu

Change-Id: Ib6cf21de02c50f3b4a975469e6af9d15390dd0e3
2021-11-12 10:17:04 +00:00
Translation updater bot
b47a4c22fd Localisation updates from https://translatewiki.net.
Change-Id: I3a2bddd1e55fe2d8858f983897d509ad445b39e9
2021-11-12 08:16:36 +01:00
jenkins-bot
6b4d51fcd8 Merge "media: Build and use JSON for metadata of djvu instead of XML" 2021-11-12 01:32:07 +00:00
Amir Sarabadani
a855755437 media: Build and use JSON for metadata of djvu instead of XML
It has to keep backward compatibility for loading metadata.

Tested locally and works fine.

Bug: T275268
Bug: T192866
Change-Id: Ied61736e329e0e0f37b1db35bd3f7a4b343c01a2
2021-11-12 02:06:51 +01:00
Reedy
b2a2e0bf45 Upgrading guzzlehttp/guzzle (7.2.0 => 7.4.0)
Change-Id: I192f0a3a58b00b6fcac35711ca3fb4b1b23378e3
Depends-On: Icbfe05e17b2e5d31da9de3f61b14b6732c56a32f
2021-11-11 22:47:28 +00:00
Timo Tijhof
f913f4d29c Update wikimedia/minify to 2.2.5
Changes since 2.2.4:

* Fix minify CLI to work from within vendor directory.
* Remove true/false !0/!1 micro optimisation. (T237042)

Depends-On: Id2f2061ac5c7389840b73ad138a91df73a40877f
Change-Id: I1f437781dd8f0cea516693a6e15fe3f95a0aa2ad
2021-11-11 22:19:51 +00:00
jenkins-bot
d45cab7c46 Merge "Update deprecated Guzzle Psr7 function calls" 2021-11-11 16:41:57 +00:00
jenkins-bot
d4c92c6fd4 Merge "Use ParserCache for local file description renders" 2021-11-11 16:40:54 +00:00
Reedy
2d27b46802 Update deprecated Guzzle Psr7 function calls
Change-Id: If7cc461559d4857a7bae8b71cc8283fbabfe9a28
2021-11-11 16:00:34 +00:00
jenkins-bot
bb728b803a Merge "Move Content::prepareSave to ContentHandler" 2021-11-11 15:31:19 +00:00
Petr Pchelko
47e8872398 Use ParserCache for local file description renders
Currently for every File page view, if the file is local,
CommonsMetadata extension renders the file page twice -
once to extract the metadata, and once to show the page.
Metadata extraction parse was always uncached, so let's
at least use PoolCounter and ParserCache for this parse.

Bug: T292302
Change-Id: If6e1a1a72d794f4fb87105b7528ea0afe92a585f
2021-11-11 15:00:32 +00:00
Roman Stolar
5461404d69 Move Content::prepareSave to ContentHandler
Update method name in ContentHandler, soft-deprecate method on Content.
This will require making a semi-backwards-incompatible
change no matter what, we don't really have a great way
of hard-deprecating overriding methods.
Replace all callers of Content::prepareSave in core.

Add tests for ContentHandler::validateSave.

Bug: T287159
Change-Id: I7f23e6e97b1c7d27a6aaefdb88b19b2fc6e8b3a8
2021-11-11 15:40:42 +02:00
jenkins-bot
85c0575e9a Merge "Localisation updates from https://translatewiki.net." 2021-11-11 09:40:53 +00:00
jenkins-bot
33c1b3280d Merge "LoginSignup: Add function for overriding benefits container" 2021-11-11 09:02:52 +00:00
Translation updater bot
c918fb142a Localisation updates from https://translatewiki.net.
Change-Id: Ia4d0f26c93813ce57c19de8a7008b03f4b8b8c56
2021-11-11 09:47:06 +01:00
Timo Tijhof
eb9359afa2 resourceloader: Only load LanguageFallback data if module has languageScripts
Change-Id: I955283c9df1601ab4fa69b472268194210f30bb4
2021-11-11 00:40:20 +00:00
Yuki Shira
15563022cf DjVu: Update @since tag from 1.37 to 1.38 for $wgDjvuShell
Follow-Up: Ic4e3dff246792692a952da0e8f9b4a83d1b6b963

Change-Id: I27fd8dab883867e99d9061067151241231e42280
2021-11-11 00:22:07 +00:00
jenkins-bot
7061fd2ee2 Merge "Reapply "Move limit report rendering to ParserOutput"" 2021-11-11 00:19:44 +00:00
jenkins-bot
d132545236 Merge "resourceloader: Fix indent in ResourceModules docs for "es6" option" 2021-11-10 21:20:26 +00:00
Timo Tijhof
923a605856 resourceloader: Fix indent in ResourceModules docs for "es6" option
Follows-up b267f7aa90.

Change-Id: I9cd17e177bed544aa5ca4a01e150cba5ca4f1c79
2021-11-10 20:07:59 +00:00
Aaron Schulz
61c6b312e0 objectcache: make CACHE_MEMCACHED alias "memcached-php"
This avoid duplicating the "memcached-php" instance/connections

Change-Id: I2a9a8182c064c326e9320d82774c5470424a5cfe
2021-11-10 18:55:47 +00:00
jenkins-bot
f47a6ef583 Merge "media: Port DjVuImage::retrieveMetaData() to use BoxedCommand" 2021-11-10 17:06:45 +00:00
jenkins-bot
f66e15e99c Merge "rdbms: Reduce time precision in DBPerformance messages to 3 digits" 2021-11-10 11:35:00 +00:00
jenkins-bot
c253de5c2a Merge "Tweak error message for missing composer dependencies" 2021-11-10 11:25:43 +00:00
jenkins-bot
ba3cb98f0f Merge "Add the Pa'O language (blk) to Names.php" 2021-11-10 08:13:23 +00:00
wctaiwan
0f4a775659 Tweak error message for missing composer dependencies
It wasn't obvious to me that the mediawiki.org link actually pointed
to specific instructions for resolving the error, as opposed to
just telling the user to search on mediawiki.org. Try to make this
a bit more obvious.

Change-Id: Id9a6cf9ee2520db9d405e17eaf34b10bd72897f3
2021-11-10 06:47:56 +00:00
jenkins-bot
a7803df401 Merge "Add linkTrail for several Cyrillic-script languages" 2021-11-10 05:45:55 +00:00
Aaron Schulz
8f6d05e62c objectcache: add watchErrors() to BagOStuff/WANObjectCache
The new style of checking for the last error during a section of
calls is more robust since it allows nesting of callers. Typically,
an external caller will want to watch a section of code that will
involve zero or more internally watched sections. Errors that are
seen internally (leading to a failing response) should also be
visible externally.

Replace internal BagOStuff clearLastError() calls.

Replace WANObjectCache clearLastError() calls. Such a class should not
clear the error codes since the class is effectively "internal". Callers
that are more meaningfully "external" might want to check the errors.

Cleanup "last" error handling for proxy backends.

Change-Id: I281817a85602967c0ec2bdd23a5d8be101680b64
2021-11-10 00:38:27 +00:00
Timo Tijhof
526fb0cf7d rdbms: Reduce time precision in DBPerformance messages to 3 digits
Slow fatal, before:

> DBTransactionSizeError:
> Transaction spent 3.016772747039795 second(s) in writes,
> exceeding the limit of 3

After:

> DBTransactionSizeError:
> Transaction spent 3.016s in writes, exceeding the 3s limit

Fast debug, before:

> [DBPerformance] Transaction spent 0.015979528427124 second(s) in
> writes, less than the limit of 3

After:
> [DBPerformance] Transaction spent 16ms in writes, under the 3s limit

Test plan:
* Set `$wgMaxUserDBWriteDuration = 3;` in LocalSettings.php.
* Perform a db-writing user action, such as an edit.
* Check mw debug log.
* Set `$wgMaxUserDBWriteDuration = 0.0001;` in LocalSettings.php,
  and ensure `$wgShowExceptionDetails = true;` is set as well
  (default if using official dev environments, or otherwise
  including DevelopmentSettings.php, otherwise check exception log),
  or add an artificial delay in DatabaseMysqli::doQuery().
* Perform a user action, and observe the fatal error.

Change-Id: Ice91ad25a836c4d9a824f9c0f6ec8debaad46adc
2021-11-10 00:19:10 +00:00
jenkins-bot
b3b4bdaeea Merge "ShellboxClientFactory: add RPCClient getters" 2021-11-09 22:43:14 +00:00
jenkins-bot
ef59b75ba1 Merge "language: Use property LanguageConverter::mUserVariant for optimisation" 2021-11-09 22:40:35 +00:00
Tim Starling
12cac7cca9 LockManager: distinguish conflicts from other kinds of lock errors
With a user-friendly error message which uses both technical and
non-technical language, without the irrelevant detail of filebackend
URLs.

Bug: T283045
Change-Id: I8704f405d38acdffae7bd4ea5b91f3f591fc2ebc
2021-11-09 21:58:20 +00:00
jenkins-bot
2b9cabf5b3 Merge "build: Update eslint-config-wikimedia to 0.21.0" 2021-11-09 21:38:15 +00:00