aboutsummaryrefslogtreecommitdiffstats
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Make stats from RevisionOutputCache consistent with those from ↵HEADmasterjenkins-bot14 days1-10/+41
|\ | | | | | | ParserCache"
| * Make stats from RevisionOutputCache consistent with those from ParserCacheC. Scott Ananian2025-04-041-10/+41
| | | | | | | | | | | | In particular, add content model and render reason statistics. Change-Id: I5286425794cc7827705bfc0e7f004543e383443c
* | Merge "Improve PHPUnit parallel split_group generation algorithm"jenkins-bot14 days2-63/+218
|\ \
| * | Improve PHPUnit parallel split_group generation algorithmArthur Taylor14 days2-63/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the constraints that the PHPUnit test classes need to be run in their original order, that we might have incomplete information about the test duration, and that the test durations vary significantly (from 0 seconds to many tens of seconds), we want to make best efforts to create split_groups with similar durations (and in so doing, minimise the duration of the split_group with the longest runtime). The existing algorithm takes the number of tests and the total duration of tests and tries to create an even split by either duration or test count (assuming that the zero-duration tests actually take a similar, non-zero time to execute). This algorithm can potentially place two long-running tests into the same group - the group might be close to its duration limit, and the next test may be a long-running test. In such a case, the group can end up significantly bigger than desired. Change the group-splitting algorithm to chunk the tests into up to 200 chunks, and assign the chunks to split_groups using a dynamic programming algorithm that uses backtracking to find an optimal allocation of chunks to split_groups. Bug: T389189 Change-Id: I61ae44f3fca4a890947ea1499a99690a4fcc2bb8
* | | Merge "ManualLogEntry: Check RecentChanges bot flag before POSTSEND"jenkins-bot14 days1-13/+16
|\ \ \ | |/ / |/| |
| * | ManualLogEntry: Check RecentChanges bot flag before POSTSENDDreamy Jazz2025-04-031-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: * ManualLogEntry::publish causes an entry to be added to the recentchanges table as well as other publishing actions for the log entry. * This is done in a DeferredUpdate to avoid writes that block the response to the user unnecessarily. * However, doing this means that if we assign a temporary user right during the course of the POST request (such as in the case of an extension wanting to make lots of log entries) this is not seen in the RecentChanges object created at the POSTSEND stage. * Creating the RecentChanges entry at the time of calling ::publish allows temporary user rights, such as 'bot', to take effect and mark the log entries as bot actions. ** We still put the writes to the DB POSTSEND as we only need to create the RecentChanges object to get the bot flag set correctly. What: * Update ManualLogEntry::publish to create the RecentChanges object outside the POSTSEND DeferredUpdate. * Add tests for ManualLogEntry which was previously completely untested (though likely indirectly tested through code which uses this class). ** Adding the tests allows verification that the change performed actually does what we want it to do. Bug: T387659 Change-Id: I80d906bbc1cad180a815477477d9081f9775a197
* | | Merge "Stats: Improve newNull and newUnitTestingHelper docs and examples"jenkins-bot14 days2-37/+26
|\ \ \
| * | | Stats: Improve newNull and newUnitTestingHelper docs and examplesTimo Tijhof2025-04-042-37/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Write short one sentence standalone "brief", written in the imperative mood, separate from longer description, * Promote the `$statsHelper` variable name for newUnitTestingHelper, which emerged in usage and seems clearer in context (context by the caller is not limited to stats, but has various things, so leading with "stats..." helps). * Mark UnitTestingHelper constructor as internal, and point to the public entry point. Ref https://www.mediawiki.org/wiki/Manual:Coding_conventions/Documentation. Change-Id: I9ede1c3ff25f53690f07dbd4043927b68629044e
* | | | Merge "block: Fix DBS::acquireTarget() race using GET_LOCK()"jenkins-bot14 days2-0/+14
|\ \ \ \
| * | | | block: Fix DBS::acquireTarget() race using GET_LOCK()Tim Starling14 days2-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A crude solution for the acquireTarget() race condition. Use SQL GET_LOCK() to lock the target from the acquireTarget() call until the transaction is committed. Add FOR UPDATE to the acquireTarget() SELECT, otherwise it just sees the snapshot version of the row and inserts a new row anyway. Add a test which reliably failed prior to the change. Reword the ipb-block-not-found message. This is normal for simultaneous blocks of the same target. Don't contact us. In the API, remap it to "alreadyblocked". Bug: T389028 Change-Id: I1fa35bf08d456a93930194786f77df389217ba61
* | | | | Merge "multiblocks: Prevent reuse of loop variable"jenkins-bot14 days1-2/+3
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | multiblocks: Prevent reuse of loop variableMatěj Suchánek2025-04-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - BlockIpComplete informs subscribers when a block is placed or updated. - With CONFLICT_NEW, a block can be just inserted, never updated. However, the loop over prior blocks can set $priorBlock to an arbitrary block or keep it null, possibly confusing subscribers of the hook (e.g., by claiming a block is not active anymore). What: - Make sure $priorBlock is always null in this code path. - Also reuse the $priorBlocks array in the loop. Change-Id: I7e6b55a50cb78f77dedc074689dc3fe3b3484a2f
* | | | | Localisation updates from https://translatewiki.net.Translation updater bot2025-04-074-9/+25
| | | | | | | | | | | | | | | | | | | | Change-Id: I4b171bedf3a9ef1df7bd11f86c5d7404bd695929
* | | | | Merge "editpage: Refactor user right, rate limit and block checks to use ↵jenkins-bot2025-04-068-300/+142
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Authority"
| * | | | | editpage: Refactor user right, rate limit and block checks to use AuthorityBartosz Dziewoński2025-04-058-300/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace EditRightConstraint, UserBlockConstraint, and most of UserRateLimitConstraint with the new AuthorizationConstraint. Instead of many separate checks, everything is now handled by one authorizeWrite() call. Move 'editcontentmodel' rate limit to ContentModelChangeConstraint (by making it use authorizeWrite()). Keep 'linkpurge' rate limit in a separate check, renamed from UserRateLimitConstraint to LinkPurgeRateLimitConstraint, since the way it works in unusual and not portable to Authority without more refactoring in EditPage. AuthorizationConstraint needs some special handling to produce the idiosyncratic result codes required by EditPage, but luckily PermissionStatus gives us everything we need for that. Bug: T271975 Bug: T386346 Change-Id: Ic9f6f2fbd29efa3e349517013da540a363c263b5
* | | | | | Merge "Hard deprecate OutputPage::setRevisionTimestamp()"jenkins-bot2025-04-063-4/+5
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Hard deprecate OutputPage::setRevisionTimestamp()C. Scott Ananian2025-04-043-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method was already deprecated, and mentioned in the RELEASE-NOTES. This patch just removes use of the method in core; it does not seem to be used outside core: https://codesearch.wmcloud.org/deployed/?q=-%3EsetRevisionTimestamp%5C%28 Bug: T301020 Follows-Up: Iee09b1591bfa11142686c9043a8294e7e77d2b61 Change-Id: I7528b9bc3522ed05f41f0915e38940b4a1fd48ce
* | | | | | REST: Remove unused setUseParserCache() as potential footgunTimo Tijhof2025-04-051-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added in 2022 with I7d97c9e2d4 (c6a0d433ec) for Ie430acd075 (e82f11c246) which was (after a revert and re-apply) eventually removed after the warmup completed (I852060c8a4, 3df4952385). Bug: T322672 Bug: T387478 Change-Id: I1921b4f985fb27b2227aef4a0eba6751c1c0b8d5
* | | | | | Merge "CategoryLinksTable: use ParserOutput::getLinkList()"jenkins-bot2025-04-051-3/+7
|\ \ \ \ \ \
| * | | | | | CategoryLinksTable: use ParserOutput::getLinkList()C. Scott Ananian2025-04-041-3/+7
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We converted most of the LinksUpdate tasks to use ::getLinkList() in I32df68714ffdf2f0745b974f47bc3ccceef1f41c but CategoryLinksTable got overlooked. Follows-Up: I32df68714ffdf2f0745b974f47bc3ccceef1f41c Change-Id: I2953947e2b0a3c05dcba89d798c6b977113c3dc0
* | | | | | Merge "Special:Version - display basic information about Parsoid extension ↵jenkins-bot2025-04-041-0/+40
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | modules"
| * | | | | | Special:Version - display basic information about Parsoid extension modulesC. Scott Ananian2025-04-041-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can improve this, but this is a start. Change-Id: Ibd2e3987921b06955f1186ce5ce10b42104886ec
* | | | | | | Add localized message for Parsoid asynchronous fallback contentC. Scott Ananian2025-04-041-0/+8
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used by the Parsoid library when an asynchronous fragment is present in the wikitext content and it is not yet ready to render. Bug: T390341 Change-Id: Ic996f7b0c891338f8d4605a1789bf389e075e239
* | | | | | Merge "contributions: Use CSS classes for user links"jenkins-bot2025-04-041-5/+7
|\ \ \ \ \ \
| * | | | | | contributions: Use CSS classes for user linksHéctor Arroyo2025-04-041-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - Currently, the list of changes provided by ContributionsPager has links to user pages that start with a separator, then followed by a link to the user page, then followed by a link to the user talk page. - For each row, the link to the user talk page is wrapped in parenthesis by explicitly adding them to the HTML code. However, that doesn't work as expected when using the the Minerva skin: The CSS rules for that skin make the link to be shown out of the parenthesis. - Moreover, the different parts of each line do not provide CSS classes indicating their semantic meaning, making it difficult for skins to modify their appearance. What: - Stop providing the parenthesis as part of the HTML output, replacing them by the usage of semantic CSS classes 'mw-usertoollinks', 'mw-changeslist-links' and 'mw-usertoollinks-talk'. Bug: T389478 Change-Id: I44cc510eb37458b03c217b91f24eeaa8866e6cfd
* | | | | | | Merge "Domain Events: Make framework stable for 1.44 release"jenkins-bot2025-04-0410-6/+4
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | |
| * | | | | | Domain Events: Make framework stable for 1.44 releasedaniel2025-04-0310-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The domain events framework is ready for release in 1.44. The modeling of specific events is still experimental and should become stable in 1.45. Change-Id: Id53040c28ad559de4271f42f7403e39434f4ae0e
* | | | | | | Merge "Add @since tags to all ParserOptions::newFrom… methods"jenkins-bot2025-04-041-0/+3
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | |
| * | | | | | Add @since tags to all ParserOptions::newFrom… methodsthiemowmde2025-04-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found this relevant in the context of OutputPage::parserOptions() being deprecated. Is the replacement safe to be used even in old versions? Yes, it is. Bug: T350626 Change-Id: Id67c9df8f149d247fb6a3e0a113095eed3e727b1
* | | | | | | storage: Push CategoryMembershipChangeJob in ChangeTrackingEventIngressMáté Szabó2025-04-043-56/+68
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - CategoryMembershipChangeJob is currently enqueued in DerivedPageDataUpdater. - This job is responsible for creating RC entries for category membership changes that resulted from an edit, so it is semantically a better fit for ChangeTrackingEventIngress instead. - Idf6625d3e737e4a225648b0fd81cc929b095d315 unintentionally changed the logic to enqueue this job for both direct content changes and reconciliation requests, rather than only direct content changes. Since the job creates RC entries, it should only be enqueued as a result of direct content changes. What: - Move the logic of enqueueing CategoryMembershipChangeJobs into ChangeTrackingEventIngress. - Only enqueue CategoryMembershipChangeJobs for direct content changes and update tests accordingly. - Resolve the old TODO of making this logic MCR-aware by checking whether any changed content slot supports categories as a precondition of enqueueing the job, rather than only checking the main slot. Bug: T390636 Change-Id: Icfe33ccc6cfa391e65ecae21d8c1d575dc247ee3
* | | | | | objectcache: suppress various PhpUnusedLocalVariableInspection warnings in ↵Aaron Schulz2025-04-042-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WANObjectCache Change-Id: I9977d80bbbff215b18c9f099f0bef0865a3d1ac5
* | | | | | Merge "In .htaccess deny files, use "Satisfy All""jenkins-bot2025-04-044-3/+9
|\ \ \ \ \ \
| * | | | | | In .htaccess deny files, use "Satisfy All"Tim Starling2025-04-044-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These .htaccess files are intended to prohibit all web access. But if the user sets "Satisfy Any" on a parent directory, in conjunction with any permissive require directive like "Require all granted", access will be allowed despite "Require all denied" in .htaccess. So, override Satisfy so that the "Require all denied" will reliably take effect. Note that "Satisfy All" is the default. This only affects non-default installations. Change-Id: Ia5862fb69e439b7ea2ed7af011e1ebf8f1b1f6d6
* | | | | | | Merge "Clarify some HTML / plain text strings"jenkins-bot2025-04-042-8/+8
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | |
| * | | | | | Clarify some HTML / plain text stringsLucas Werkmeister2025-04-032-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mistaking getDimensionsString() for another HTML-returning method has now caused two separate security vulnerabilities, so let’s try to make it clearer that it returns plain text that a caller might have to escape themselves. Bug: T297543 Bug: T389369 Change-Id: I567f78c60e38ce0fa9d9ad6312860baec559c00f
* | | | | | | Localisation updates from https://translatewiki.net.Translation updater bot2025-04-043-35/+49
| |/ / / / / |/| | | | | | | | | | | | | | | | | Change-Id: I030398e0ef3a20be9a0d500b051e2a3d88ecc01f
* | | | | | Merge "DomainEvent: rename EventIngressBase to DomainEventIngress"jenkins-bot2025-04-047-16/+18
|\ \ \ \ \ \ | | |/ / / / | |/| | / / | |_|_|/ / |/| | | |
| * | | | DomainEvent: rename EventIngressBase to DomainEventIngressAaron Schulz2025-04-037-16/+18
| | |/ / | |/| | | | | | | | | | | | | | Bug: T390735 Change-Id: I0ebec537bb15925e8507ee6934cd4a17973c536a
* | | | Merge "api: Use type declaration on undocumented private functions"jenkins-bot2025-04-0416-29/+33
|\ \ \ \
| * | | | api: Use type declaration on undocumented private functionsUmherirrender2025-04-0416-29/+33
| | | | | | | | | | | | | | | | | | | | Change-Id: I2998ad3ccc5a54eccfe36ad09fe509e83dfb719c
* | | | | Merge "specials: Use type declaration on undocumented private functions"jenkins-bot2025-04-0422-31/+35
|\ \ \ \ \
| * | | | | specials: Use type declaration on undocumented private functionsUmherirrender2025-04-0422-31/+35
| |/ / / / | | | | | | | | | | | | | | | Change-Id: Ib394792b10afabf5e0440cd3be34c1f2fd9cfe1d
* | | | | Merge "objectcache: Fix RestBagOStuff bytes sent stats"jenkins-bot2025-04-041-1/+1
|\ \ \ \ \
| * | | | | objectcache: Fix RestBagOStuff bytes sent statsHannah Okwelum2025-04-041-1/+1
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current total bytes sent is computed on the response body recieved from the server. What we want is to compute this on the actual request body being sent to the server. Bug: T390815 Change-Id: I7d48a5e08f112329ebc4743a1cbd98d0f7144a69
* | | | | Merge "file: Use type declaration on undocumented private functions"jenkins-bot2025-04-0410-20/+22
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | file: Use type declaration on undocumented private functionsUmherirrender2025-03-3010-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also include media and upload parts Change-Id: Iaa0f1d1a7dc6b25ee3ddc0f4683b9ca9643192d3
* | | | | Merge "Rest: Use type declaration on undocumented private functions"jenkins-bot2025-04-048-9/+9
|\ \ \ \ \
| * | | | | Rest: Use type declaration on undocumented private functionsUmherirrender2025-03-308-9/+9
| |/ / / / | | | | | | | | | | | | | | | Change-Id: Ic9c1e2051775733672fe8a5378fd3b7ed0a3f652
* | | | | Merge "libs: Use type declaration on undocumented private functions"jenkins-bot2025-04-0415-23/+25
|\ \ \ \ \
| * | | | | libs: Use type declaration on undocumented private functionsUmherirrender2025-03-3115-23/+25
| |/ / / / | | | | | | | | | | | | | | | Change-Id: I9a74c316b87ae35597ce846a830a55542d9aa14c