Commit graph

115438 commits

Author SHA1 Message Date
Aaron Schulz
29bab859fc profiler: Add ProfilingContext class
Use this class to track the entry point and handler used for requests,
making it available for use in profiling, stats, and logging code.

This makes it possible for periodic and/or shutdown profiling callbacks
to know the basic action handler that applies to the request (if any).
Metric names can easily include this string along with MW_ENTRY_POINT
to create per-action profiling dashboards.

This info cannot otherwise be acquired from things like excimer stack
traces since the router and handler classes do not appear in the stack
during PRESEND deferred updates and variations like ApiMain/SpecialPage
"inclusion mode" would have to be detected somehow.

Bug: T330810
Change-Id: Icca5a7a343faeeb18652994c96752acb61a61fd1
2023-03-23 00:08:49 +00:00
jenkins-bot
4de0415240 Merge "Change the default of wgParserEnableLegacyMediaDOM to false" 2023-03-20 19:58:43 +00:00
Raimond Spekking
b655b449f5 Merge "Localisation updates from https://translatewiki.net." 2023-03-20 15:30:28 +00:00
jenkins-bot
29d4996254 Merge "TempFSFile: Keep the WeakMap alive" 2023-03-20 12:47:25 +00:00
Translation updater bot
c9b5174759 Localisation updates from https://translatewiki.net.
Change-Id: I7b95ae090f8e79893280f27030818fa955c8ae75
2023-03-20 08:12:36 +00:00
Amir E. Aharoni
292654d65a Add Hindko language (hno)
Bug: T332113
Change-Id: I5e4751dcec6fe92081c0961b7d424ed3012c85c6
2023-03-20 09:58:33 +02:00
mainframe98
115903a25e MessageCache: Don't initialize messageKeyOverrides in the constructor
Follow-up to I89e1a9b901aff6ff1bde729df8958ba42a45f3d5 where I forgot
to remove this line after initialization was moved to MessageCache::get.

Change-Id: Iae441ccedba08eb12685d81381259aad49b7b42f
2023-03-19 14:51:24 +01:00
jenkins-bot
a5d39a33f2 Merge "Translate the upright option of images into Polish" 2023-03-19 11:09:44 +00:00
jenkins-bot
afe45883ca Merge "Update DummyLinker::userLink to match Linker::userLink" 2023-03-19 08:47:09 +00:00
jenkins-bot
299677dff1 Merge "EditPage: Support blanking of messages" 2023-03-19 07:14:46 +00:00
jenkins-bot
0f31699b07 Merge "objectcache: improve WANObjectCache::worthRefreshExpiring() scalability" 2023-03-19 03:50:41 +00:00
Umherirrender
61b1f689e7 mediawiki.misc-authed-ooui: Merge in mediawiki.special.revisionDelete
Special:RevisionDelete is using OOUI and is limited to priviliged users,
so its javascript can be merged into mediawiki.misc-authed-ooui.

The moved script is about 520 bytes minified uncompressed,
mediawiki.misc-authed-ooui grows to around 4800 bytes minified
uncompressed. The removed module saves up to 52 bytes minified
uncompressed in the startup module on every page view.

Change-Id: If0380e7a71e8bce215a21336f61644fd52c45ef6
2023-03-19 03:21:14 +00:00
jenkins-bot
3682678f08 Merge "phpunit: Reduce some complexity in MediaWikiIntegrationTestCase" 2023-03-18 14:51:16 +00:00
jenkins-bot
63f6100b45 Merge "languages: Enforce namespace and special page aliases without spaces" 2023-03-18 13:27:28 +00:00
Tim Starling
7775a3f7b7 TempFSFile: Keep the WeakMap alive
If you store a WeakMap in the object, containing only circular
references in the values, then nothing is keeping the WeakMap alive and
it can be deleted along with its parent TempFSFile by the garbage
collector.

A WeakMap contains normal references to its values, so those normal
references can be marked by the GC like any other references.

Instead, store the WeakMap as a static property.

Bug: T332461
Bug: T332397
Change-Id: Idbaa1019c2bac3d1dd9b001753c2f4c0aaf66e98
2023-03-18 14:20:13 +11:00
jenkins-bot
be360107e1 Merge "Namespace SpecialA* under \MediaWiki\Specials" 2023-03-18 01:22:52 +00:00
Aaron Schulz
5b349cb4d7 objectcache: improve WANObjectCache::worthRefreshExpiring() scalability
Make it use a power function and increase LOW_TTL from 30 to 60 so
that higher regeneration times (e.g. 1+ seconds) are more resistant
to regeneration stampedes.

Also fix code that was using LOW_TTL instead of TTL_LAGGED.

Bug: T331914
Change-Id: I2c0b35fbbce6b5a692b6d7885a2a921d7ffdd031
2023-03-18 00:23:32 +00:00
Timo Tijhof
beb26ce722 phpunit: Reduce some complexity in MediaWikiIntegrationTestCase
Make it more obviously correct and straight forward, as you want
as little doubt and confusion as possible when debugging a test.
Doubt and confusion from our source code is... enough to make ones
day interesting.

Change-Id: I440be81d4ee7c505c0f2c11af7edaf513b8ff2d7
2023-03-17 23:48:42 +00:00
jenkins-bot
5211a44a62 Merge "mediawiki.skinning: Apply central Codex tokens" 2023-03-17 23:03:53 +00:00
jenkins-bot
9b7e1cb757 Merge "Fix total breakage of wgCanonicalServer fallback" 2023-03-17 23:03:41 +00:00
jenkins-bot
3855dbec47 Merge "phpunit: Check if composer dependencies are up-to-date" 2023-03-17 23:03:33 +00:00
James D. Forrester
d933d5fcfa Namespace SpecialA* under \MediaWiki\Specials
So begins a series of patches. :-)

Change-Id: I88cb6304e2d1d2e59bd316b6fc181ab7f323e707
2023-03-17 17:42:39 -04:00
Volker E
c3bcf58097 mediawiki.skinning: Apply central Codex tokens
Applying central tokens to HTML elements, starting with a number of
color and border values.

Depends-On: I3c5c8f9fc4b1841f8f8bdbcf27de82291d1fabbd
Change-Id: I3461cd21866332e5f1329f11c27873191f43ed29
2023-03-17 21:32:35 +00:00
jenkins-bot
0f250c501a Merge "MessageCache: Add a new hook for more performant override fetching" 2023-03-17 21:31:49 +00:00
jenkins-bot
a1dbef205d Merge "rdbms: Fix line indent in ChronologyProtector" 2023-03-17 20:22:20 +00:00
Umherirrender
4e7f4c353d languages: Enforce namespace and special page aliases without spaces
Enforce underscores as used by the most languages in the namespace
aliases and special page aliases

Change-Id: I53d895f4b1d241954bd31973ad4996beed91bfb2
2023-03-17 20:57:43 +01:00
jenkins-bot
0bb4d98d18 Merge "Fix NS_CATEGORY in Gur" 2023-03-17 19:51:38 +00:00
jenkins-bot
f05b42300f Merge "On temp user creation, suppress watching of the user page" 2023-03-17 19:24:16 +00:00
jenkins-bot
1bd2725d21 Merge "build: Uprade stylelint-config-wikimedia from 0.13.1 to 0.14.0" 2023-03-17 18:18:02 +00:00
Stang
77e5154201 Fix NS_CATEGORY in Gur
Bug: T332241
Change-Id: I36728396c3a64db0a882456e301ee13de2ba8cab
2023-03-17 18:15:56 +00:00
Umherirrender
0b2dbee685 rdbms: Fix line indent in ChronologyProtector
Change-Id: I9b48bed152f4e0be9607092863741ad68e765f54
2023-03-17 19:06:53 +01:00
jenkins-bot
49778715fc Merge "api: Add watch option for userpage to action=unblock" 2023-03-17 17:37:23 +00:00
Jon Robson
1f2601c614 EditPage: Support blanking of messages
If the messages are blanked (e.g. via site interface messages)
they should not be wrapped in elements.

Follow up to
Id2114a65635c050a2017926274622f0a3c2d58d6

Bug: T311891
Change-Id: I99dd7ee77bd9a29f318ab4b209f2b198376636e9
2023-03-17 10:27:00 -07:00
jenkins-bot
2d5c55e85a Merge "specials: Add watch option for userpage to Special:Unblock" 2023-03-17 16:17:28 +00:00
Arlo Breault
892781fe94 Change the default of wgParserEnableLegacyMediaDOM to false
The 7% increase in css shipped is because of styles added for the
content-media feature, without dropping content-thumbnail.  This is
noted in T297984#8525146

Getting rid of content-thumbnail won't be possible until templates and
extensions that mimic the parser output have been migrated, which is
being worked on in T318433.

Bug: T314318
Bug: T297984
Bug: T318433
Depends-On: Ib54b49d546423dd1b4416c82585bbb686950b29c
Change-Id: Ic587b1b9b8d22f3aef38e8823613815faaa09d9d
2023-03-17 12:09:29 -04:00
Thalia
a12cfa76ed Update DummyLinker::userLink to match Linker::userLink
Change-Id: Id941014789c06cfe6f06b4dd6a4e1f28cbed7297
2023-03-17 15:39:02 +00:00
jenkins-bot
2b62ee2931 Merge "Don't write to the source tree in ForeignResourceManagerTest" 2023-03-17 14:28:17 +00:00
jenkins-bot
b6bb1ea04d Merge "Fix tests that fail when $wgUsePigLatinVariant = false" 2023-03-17 14:25:39 +00:00
Tim Starling
89fef0ef93 Fix total breakage of wgCanonicalServer fallback
wgCanonicalServer is false by default. Setup.php tried to set it to the
result of a wfExpandUrl() call, which initialised the UrlUtils
service with the current value of wgCanonicalServer, i.e. false.
UrlUtils had a fallback for null but not false. So subsequent calls to
wfExpandUrl() would always use the empty string for the canonical
server. Probably since 472a914c63.

So, have UrlUtils handle the fallback, and have Setup.php ask UrlUtils
for the final value.

Bug: T325529
Change-Id: I99329e75bd53049ae84a8ae7a2536ad12cfeeb3b
2023-03-17 14:11:16 +00:00
jenkins-bot
69d54a9262 Merge "rdbms: Add missing QUERY_CHANGE_ flag to internal "USE" query" 2023-03-17 09:58:12 +00:00
Tim Starling
819efb3234 Don't write to the source tree in ForeignResourceManagerTest
* Wait until we know the action before choosing the temp directory.
  Use the configured temp directory if the action is verify, since the
  arguments for using a subdirectory of the source tree do not apply on
  verify.
* Use the configured cache directory in precedence over the source tree.

Change-Id: I0431db332238c8e2de14ec71fb611e0a8d4e959b
2023-03-17 20:45:05 +11:00
jenkins-bot
2197a282b5 Merge "Localisation updates from https://translatewiki.net." 2023-03-17 09:03:09 +00:00
Tim Starling
f600d07ec4 Fix tests that fail when $wgUsePigLatinVariant = false
* ParserTestRunner: LocalisationCache needs to be reset since it has a
  reference to LanguageNameUtils which has a copy of
  $wgUsePigLatinVariant. Also factor out some
  MediaWikiServices::getInstance() calls.
* In some other tests, set the variable.

Change-Id: I6c1e9bfad9790cf805809c28a3f8d45952cbb981
2023-03-17 19:56:32 +11:00
Translation updater bot
e275697916 Localisation updates from https://translatewiki.net.
Change-Id: I214185fd023d9371ae4d86bcc24f60f2e2d4acd5
2023-03-17 08:19:31 +01:00
jenkins-bot
f63ba3be5f Merge "SpecialFactoryPage: Don't use direct refs for namespaced classes" 2023-03-17 07:14:30 +00:00
jenkins-bot
9490d12598 Merge "RELEASE-NOTES-1.40: Note that the rename specials have also been namespaced" 2023-03-17 07:14:07 +00:00
jenkins-bot
d9a3757fbf Merge "Namespace SpecialWantedPages under \MediaWiki\Specials" 2023-03-17 07:14:00 +00:00
jenkins-bot
46153a5efb Merge "Namespace SpecialWantedFiles under \MediaWiki\Specials" 2023-03-17 07:06:59 +00:00
jenkins-bot
310e6cf4a6 Merge "Namespace SpecialUserRights under \MediaWiki\Specials" 2023-03-17 07:06:46 +00:00
Timo Tijhof
8ce966af65 rdbms: Add missing QUERY_CHANGE_ flag to internal "USE" query
The added flag makes no functional difference. It informs
executeQuery() and SQLPlatform->isWriteQuery() that this is not a
write query, which it would otherwise find out by running a regex
on the SQL text.

QUERY_IGNORE_DBO_TRX is documented as being for USE queries,
which in isWriteQuery() return false, just as it did already
based on the regex previously.

This follows-up to Ic91412ffdaab6b7d which made isWriteQuery warn
when this flag is missing, precisely to find this inefficiency.

Bug: T332228
Change-Id: If510415dbcf407353612f7b8e425d8a8189e26d9
2023-03-17 02:01:49 +00:00