aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge "schema: Fix typo about site.site_id in comment"jenkins-bot2021-12-023-4/+4
|\ \ \
| * | | schema: Fix typo about site.site_id in commentUmherirrender2021-12-013-4/+4
| | |/ | |/| | | | | | | | | | | | | The table calls sites Change-Id: I361e1a3207259ef4d85f1e46b3c75f4d655ff0b6
* / | Introduce `Redirect(Lookup&Store)` services to handle redirectsDerick Alangi2021-12-011-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The concept of a redirect chain didn't really work for a value of max redirect > 1. In the ideal world, we just want to have a source which points to target (source -> target) discarding the concept of a redirect chain completely. Having something like: source -> target -> target1 -> target2 doesn't really work well with the current database design. NOTE: Support for $wgMaxRedirect will be removed soon hence deprecation without interfaces for replacement. Bug: T290639 Change-Id: I469de6f85e405e8ddbe7abaa5b99b77cb9cf415d
* | Merge "jobqueue: Fix max no. of double redirect jobs in job queue"jenkins-bot2021-11-291-2/+1
|\ \
| * | jobqueue: Fix max no. of double redirect jobs in job queueDerick Alangi2021-11-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a constant to track the maximum number of double redirects jobs in the job queue. Before we allow 10000 to spread in the code base, we can just change the constant now and references of this value will be changed. Does this qualify to be a configuration or a regular constant will do? Change-Id: I10c45a8c1cd5b3382edebf9a05f4b3f94f5327df
* | | getReplicaServer: Handle clustersMartin Urbanec2021-11-281-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | This will be useful for the Growth team, which intends to release a DB table that currently resides at the x1 cluster. Bug: T291966 Change-Id: I55fa417e779a0aa847c7b8e630977553641f46df
* | | Merge "GetConfiguration: Allow partial output with JSON encoding"jenkins-bot2021-11-261-1/+10
|\ \ \ | |/ / |/| |
| * | GetConfiguration: Allow partial output with JSON encodingKosta Harlan2021-11-241-1/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Add a config flag to allow for partial output on error. An extra configuration variable is exported with the result so the client can know that an error occurred during serialization. Misc: * Remove the unneeded $out variable null declaration Bug: T294786 Change-Id: I8f8f504cf614cbd81323f536e7ea255a4aff5907
* | MoveBatch.php: Minor code cleanupReedy2021-11-241-10/+6
| | | | | | | | | | | | | | | | * Swap == for === * Rename a couple of local variables to match common naming patterns * Remove old chdir(); not needed now the code no longer uses commandLine.inc Change-Id: Iabae9b6f4bf57309a7f06cb6740db60e473e1ff2
* | Remove or replace usages of "sane"Reedy2021-11-221-1/+1
| | | | | | | | | | Bug: T254646 Change-Id: Ia660ab95353cd8f05c50e60f30d29fd22b018a43
* | Remove or replace usages of "sane"Reedy2021-11-225-7/+7
| | | | | | | | | | Bug: T254646 Change-Id: I096b2cf738a1395a14f1d47bcbed0c2c686c2581
* | Merge "media: Drop XML metadata support from DjvuHandler"jenkins-bot2021-11-211-1/+3
|\ \
| * | media: Drop XML metadata support from DjvuHandlerAmir Sarabadani2021-11-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | All of production has been migrated to json and this patch also adds an update entry for third parties. Bug: T275268 Change-Id: I916127896bdce95472823ae7be12fc5e6e16691a
* | | Merge "Remove or replace usages of "sanity""jenkins-bot2021-11-2111-14/+13
|\ \ \ | |/ / |/| |
| * | Remove or replace usages of "sanity"Reedy2021-11-1911-14/+13
| | | | | | | | | | | | | | | Bug: T254646 Change-Id: I2b120f0b9c9e1dc1a6c216bfefa3f2463efe1001
* | | Merge "nukeNS: don't run purgeRedundantText() after every change"jenkins-bot2021-11-201-1/+2
|\ \ \
| * | | nukeNS: don't run purgeRedundantText() after every changeUniversal Omega2021-11-191-1/+2
| |/ / | | | | | | | | | | | | | | | This is very slow and not very performant to do. As far as I can tell, unnecessary. Change-Id: Ifc498c458a083418e350f4e02fe51484d2fba8ff
* | | Merge "reassignEdits: Collapse nested if statements"jenkins-bot2021-11-201-34/+32
|\ \ \
| * | | reassignEdits: Collapse nested if statementsReedy2021-11-191-34/+32
| |/ / | | | | | | | | | | | | | | | Reduces indenting Change-Id: I67923bc83c92941908b1e7a487faf7cafb33ea4b
* / / Fix path for ZhConversion.phpFomafix2021-11-201-1/+1
|/ / | | | | | | | | | | | | | | | | | | In e07a279a396588fd83d8a550281cdf5f06c91bfe ZhConversion.php was moved from languages/data/ZhConversion.php to includes/languages/data/ZhConversion.php Change-Id: If48e19c89882a72ba130b98cf9f1ef62e2626462
* | maintenance: Add ability to start from rev_id to migrateRevisionActorTempAmir Sarabadani2021-11-181-0/+5
| | | | | | | | | | | | | | | | This is important in long-running script so we can pick it up where it had to be stopped or crashed (db read-only for example). Bug: T275246 Change-Id: I7c9330c447bbd857f57b12ffb241b8e64ddbfada
* | maintenance: Add waitForReplication and sleep in migrateRevisionActorTempAmir Sarabadani2021-11-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - waitForReplication is critical in such scripts, it has caused a major outage in commons before. - The extra sleep is not important for scripts that take a couple of hours to finish but it is important for ones that take more than a day. Because replication lag to secondary datacenter and non-core dbs (cloud, backup source, analytics) is not reflected in waitForReplication and running a maint script for an extended period of time will cause issues for those. You can see similar work done on similar scripts such as deleteAutoPatrolLogs.php Bug: T275246 Change-Id: If6aa0aaadc62949c151a1f675f8aa24041bf3738
* | Stop using LocalFile::lock()Tim Starling2021-11-151-6/+5
|/ | | | | | | | | | | | | | | | | | | | LocalFile::lock() held an explicit DB transaction open while a potentially slow file backend operation was in progress, causing production errors. Instead, protect write operations with non-blocking locks. If a file is locked, report the failure to the user. Like an edit conflict, informing the user is appropriate in most cases. For example, if two admins try to delete the same file at the same time, only one should succeed, and the second does not need to wait for the first. In upgradeRow(), locks were used to protect operations which read from a file and write the result back to the database. The lock was supposed to prevent overwriting of fresh data with stale data. Use a timestamp check instead. Bug: T283045 Change-Id: Iaf9c9eef617044656b5b0d91a9632eacd84a5a78
* Merge "Allow populateContentTables to continue when there are bad blobs"jenkins-bot2021-11-031-14/+11
|\
| * Allow populateContentTables to continue when there are bad blobsCindy Cicalese2021-10-171-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | When encountering missing or null text blobs, populateContentTables would fail, leaving the data migration to slots incomplete. This patch allows the script to continue, reporting the bad blobs without failing. This patch and I041d5c67bf241bb7cf2e31e0a4b0030e2cf9a13b, upon which it depends upon, should be backported. Bug: T212428 Change-Id: I582eac2befec152cb48d898644bc024a5ade2260
* | Drop experimental FileJournal system without deprecationJames D. Forrester2021-11-012-334/+0
| | | | | | | | | | | | | | The feature was introduced in 2012 with d19f54602f (just before the gerrit migration). Change-Id: Ia3f59ad0ddeb1f610947b14e22b0694ff4c6ed84
* | checkStorage: pass no parameters to WikiRevision::getContent()Universal Omega2021-10-241-2/+1
| | | | | | | | | | | | | | This defaults to SlotRecord::MAIN, which is what it should be rather than RevisionRecord::RAW Bug: T294043 Change-Id: Ib035fe4eea778747f47a476c8aa2cfaab44aa7d8
* | CheckStorage: Annotate importRevision $revision parameter as being WikiRevisionReedy2021-10-211-0/+3
| | | | | | | | Change-Id: Ic07cd955a3a25a70db2a1589a57d19a592813986
* | Fix checkStorage.phpUniversal Omega2021-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes checkStorage.php --fix * importRevision() is required to be public for WikiImporter::setRevisionCallback() * $revision must not be passed by reference * $importer is unused, so removed Change-Id: I53ef3825308af3b6e632cb88b9a3eb2f40ab5239
* | Merge "HistoryBlobStub: add getLocation() to get $mOldId"jenkins-bot2021-10-202-3/+3
|\ \
| * | HistoryBlobStub: add getLocation() to get $mOldIdUniversal Omega2021-10-192-3/+3
| | | | | | | | | | | | | | | | | | | | | For use in the checkStorage and resolveStubs maintenance scripts, in order to fix them. Follows-Up: Id1f530c2c8ec1171615f726dc7446431ee7ca8fe Change-Id: Iade3d1660f2b7db62f829f5e5ca94372614ae7e5
* | | Replace Content::getParserOutput call to ContentRenderer::getParserOutputRoman Stolar2021-10-202-4/+4
|/ / | | | | | | | | Bug: T287158 Change-Id: I8a13f45027e08e2d8ddefa140dd47a0c55094934
* / importDump.php: handle fopen errorGergő Tisza2021-10-171-0/+3
|/ | | | | Bug: T293569 Change-Id: I13c05d754513f01f6a3f293d299cb9d55cc19265
* Merge "namespaceDupes.php: Handle invalid titles"jenkins-bot2021-10-161-29/+44
|\
| * namespaceDupes.php: Handle invalid titlesGergő Tisza2021-10-161-29/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply prefix and suffix to invalid titles just like it's applied to conflicting titles. (Typically this will be needed when the Foo namespace is created and there is a Foo: article already.) Also remove a broken for loop. Presumably the intent was to repeatedly add prefix/suffix on conflict, but actually it would just get into an infinite loop. The behavior doesn't seem that useful anyway. Bug: T293407 Change-Id: Ieef6698b461e7db003dc326e5cd82accd2909540
* | profiler: Remove dependency on WebRequest from ProfilerTimo Tijhof2021-10-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I intent to remove Profiler::getContext/setContext after a week without deprecation. I consider these methods as internal (they predate the stable interface policy, and we forgot to triage this class, it has neither `@stable` nor `@internal`). The hard-deprecation in this commit is to detect any use that may have gone unnoticed in WMF production from Codesearch analysis alone, where no usage was found. Bug: T292269 Change-Id: Id40679f21cc7a3f77a1b96a4bbd55daeaea16892
* | Merge "Convert TrackingCategories to a service with DI"jenkins-bot2021-10-091-2/+1
|\ \
| * | Convert TrackingCategories to a service with DIDannyS7122021-10-081-2/+1
| | | | | | | | | | | | | | | Bug: T247194 Change-Id: I50012e2a5e65aeee7671023d2fd5367e21e8ae67
* | | Merge "Remove unimplemented "bogus" parts of CleanupPreferences"jenkins-bot2021-10-081-17/+4
|\ \ \ | |/ / |/| |
| * | Remove unimplemented "bogus" parts of CleanupPreferencesUmherirrender2021-09-291-17/+4
| |/ | | | | | | Change-Id: I50b5a1bfde6f132b449eda9576ba163f1301ca13
* | Merge "Deprecate wfLogProfilingData(), improve statsd/profiling docs"jenkins-bot2021-10-071-4/+21
|\ \
| * | Deprecate wfLogProfilingData(), improve statsd/profiling docsTimo Tijhof2021-10-021-4/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Document that Maintenance::shutdown is the CLI equivalent of MediaWiki::restInPeace. * Centrally document in the emitStats method why we flush stats regularly, and clarify that these OOM concerns are specific to CLI processes there. That isn't to say it could never happen on a web request, but all our early flush handling (even DB trx hooks) are explicitly limited to command-line mode today and always have been. * Ref T253547. It is now clear why --profiler=text doesn't work on the CLI (it is missing the non-external profiler output handling), which I'll fix in a follow-up. * Ref T292269. The WebRequest-dependency in Profiler is now much more clearly problematic. Previously this was masked by wfLogProfilingData effectively silencing the warning on the CLI without it being so obviously wrong. I'll fix that in a follow-up. * Ref T292253. All this is already post-send, and flame graphs confirm that we don't have any calls to emitBufferedStatsdData nor StatsdClient::send apart from the post-send one via restInPeace. Bug: T253547 Bug: T292269 Bug: T292253 Change-Id: If78c37046cf8651c7a8d6690e01d38c3ca29d8d8
* / uppercaseTitlesForUnicodeTransition: improve userlist formatPetr Pchelko2021-10-041-13/+17
|/ | | | | | | | | | | | | | | | | | This script is used to rename things to prepare for unicode update. The script does not rename the users, instead it generates a list of users to be renamed with renameInvalidUsernames.php, but this script output is incompatible with the other script input. It would be more convinient to be able to directly feed the result of this script as input to the other script. renameInvalidUsernames.php expects input as TSV with domain, user_id, new_user_name. That's what we want to output. Also opening the output file in append mode is more convenient - that way we can collect all usernames for renames for all wikis when running the script with foreachwiki Bug: T219279 Change-Id: I27e182247d55c635e75027065546285be74934b6
* Merge "Bump minimum required version for upgrade to 1.29"jenkins-bot2021-09-298-60/+4
|\
| * Bump minimum required version for upgrade to 1.29Amir Sarabadani2021-09-288-60/+4
| | | | | | | | | | | | | | | | Since the branch cut has happened, we can bump and get rid of legacy cruft. According to the policy we can go up to 1.31 but let's keep it that way to avoid major distruptions. Change-Id: I9d697445a3bb5047726c8b2a7f808edb8403cdda
* | Introduce CommentFormatterTim Starling2021-09-281-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CommentParser: * Move comment formatting backend from Linker to a CommentParser service. Allow link existence and file existence to be batched. * Rename $local to $samePage since I think that is clearer. * Rename $title to $selfLinkTarget since it was unclear what the title was used for. * Rename the "autocomment" concept to "section link" in public interfaces, although the old term remains in CSS classes. * Keep unsafe HTML pass-through in separate "unsafe" methods, for easier static analysis and code review. CommentFormatter: * Add CommentFormatter and RowCommentFormatter services as a usable frontend for comment batches, and to replace the Linker static methods. * Provide fluent and parametric interfaces. Linker: * Remove Linker::makeCommentLink() without deprecation -- nothing calls it and it is obviously an internal helper. * Soft-deprecate Linker methods formatComment(), formatLinksInComment(), commentBlock() and revComment(). Caller migration: * CommentFormatter single: Linker, RollbackAction, ApiComparePages, ApiParse * CommentFormatter parametric batch: ImageHistoryPseudoPager * CommentFormatter fluent batch: ApiQueryFilearchive * RowCommentFormatter sequential: History feed, BlocklistPager, ProtectedPagesPager, ApiQueryProtectedTitles * RowCommentFormatter with index: ChangesFeed, ChangesList, ApiQueryDeletedrevs, ApiQueryLogEvents, ApiQueryRecentChanges * RevisionCommentBatch: HistoryPager, ContribsPager Bug: T285917 Change-Id: Ia3fd50a4a13138ba5003d884962da24746d562d0
* | Merge "Use 0 instead of "" in phpCharToUpper.json"jenkins-bot2021-09-281-2/+2
|\ \ | |/ |/|
| * Use 0 instead of "" in phpCharToUpper.jsonFomafix2021-09-231-2/+2
| | | | | | | | | | | | | | | | Use 0 instead of "" to signal an unchanged character. 0 is only one character and "" are two characters. This reduces the uncompressed size of the JSON file by 770 byte. Change-Id: Ibb6d2d1d9af712ad73733d3179fb82751028e054
* | Merge "Change 'fromdbmaster' to WikiPage::READ_LATEST"jenkins-bot2021-09-271-1/+1
|\ \
| * | Change 'fromdbmaster' to WikiPage::READ_LATESTUmherirrender2021-09-261-1/+1
| | | | | | | | | | | | | | | | | | Constants are harder to misspell Change-Id: Ie1afcc8580cccf815df1cc97f05a5be81676d9f7