This key predates MediaWiki's standardised notion of request IDs,
and of PSR-3 and Monolog usage.
Bug: T199607
Change-Id: Ibdd5bf12591761ab45be12ba72943e9d94f678cb
This should make error logs easier to work with through a couple
of ways:
* The stack trace is now complete, instead of missing the first
crucial step, which is often the one used for filtering
purposes and for identifying errors within a given deployed
version of MediaWiki. (E.g. when filtering out an error that is
expected to be fixed by the next release and/or when checking
how prominent an error currently is).
* Logstash reports that report message + trace will not need to be
edited by hand to include the file+line.
* The workflow for Logstash generally follows one of two patterns.
The default is to filter by exception.file (including line number),
which is very sure to catch all possible variants thrown from
the same code, regardless of any variables in the message, but
has the downside of not matching week-over-week consistency due to
file paths (at least for WMF) containing the deployment version.
The other option is to filter by message, which has the risk of
possibly excluding too much if there are multiple unrelated ways
to trigger the issue, but is a sensible second option. This is
usually done by filtering on normalized_message for non-exception
errors, but doesn't work well for exceptions because they contain
the file paths and do so in-between the class and message words,
and thus are not compatible with Logstash's default substring/term
match. The alternative of exception.message is then considered but
is lacking the class/type, which can be fragile.
With this change applied, no editing is needed, and no multiple
approaches need to be considered with the same option.
Either filtering by exception.file as-is, or filtering by
normalized_message as-is, regardless of whether it is an exception
error or other message in another channel, will both work.
Bug: T271496
Change-Id: I5908ed53f9b97b3c9cde126aca89ab6fc197c845
- Restructure as a more readable and easier to scan list,
rather than with large sections.
- Move examples out to their own section, and remove or combine
trivial examples.
- Link to mediawiki.org docs for Package files,
and document when the feature was added (since 1.33).
- Document the "factory" option, and use the same format
for specifying when it was added.
- Add more @see references to this for discovery.
(The @see syntax is required for Doxygen to link variables,
unlike class names which can be linked bare from class/method
descriptions.)
Bug: T232566
Change-Id: Idb295d034c0afbd75cc1f57bbed163654bda2ab5
For MySQL/Sqlite:
- Changing oi_name and oi_archive_name to varbinary instead of "varchar
binary"
- Dropping default from oi_timestamp
For Postgres:
- Adding the correct default to seven fields
- Removing incorrect default from oi_metadata
- Add missing index oi_actor_timestamp
- Change four fields to have correct data type
- Make oi_major_mime and oi_minor_mime not nullable
- Drop foreign key on oi_name
Bug: T230428
Bug: T164898
Change-Id: I4dff0e48081a5797a29513f9c8b87f9ffcaadb5d
This reverts commit 8f46ef5ff4.
This has seemingly broken FlaggedRevs and thus a bunch of repos.
Bug: T272170
Change-Id: I67de3dbbbc9163aae937f710ecb0e40db0d483a0
This reverts commit 36f1adf670.
This has seemingly broken FlaggedRevs and thus a bunch of repos.
Bug: T272170
Change-Id: I26c6fd656c75a6b209fb17965dc9109edf68642b
This allows Title and WikiPage objects to be compared with PageIdentity
and LinkTarget instances consistently.
Change-Id: I1bbd15d17d046359393ecfc1acd2778273260a95
This introduces the Authority interface and an implementation of basic
functionality. This serves as a basis for spike exploring the concept.
Bug: T261963
Change-Id: Idd4e8bd934f191296eada443450bc69500102937
This makes it so methods that take a WikiPage can be narrowed to a
PageIdentity, and prepares WikiPage for the introduction of the PageRecord
interface.
Bug: T208776
Change-Id: Iab8bd75a1948873baab9c91c76f966d606b23c0f
The `testGetWatchedItemsWithRecentChangeInfo_watchlistOwnerAndInvalidToken`
method (and its data provider) moved to the remaining integration test,
since those actually do require integration
Also do some minor clean up to the unit tests:
* Replace ::getFakeRow with manual (object) casts
* Combine duplicate getMockNonAnonUserWithIdAndRestrictedPermissions
and getMockNonAnonUserWithIdAndNoPatrolRights
Change-Id: Ie853f465b39f06dadd65582df061a9c44068b63a
Follow-up ba6490aa1e.
That patch worked around $executeContext iteration errors due to the
lack of recursion support in doUpdates()/handleUpdateQueue(). Errors
were triggered by MediaWiki::schedulePostSendJobs() enqueueing deferred
updates that invoke JobRunner::run(), which, in turn, invoke doUpdates()
for each job via JobRunner:: doExecuteJob(). The doUpdates() method was
changed to operate on the sub-queue for the in-progress DeferrableUpdate.
Further improve the recursion logic:
* Use classes for the scope stack and scope queues.
* Put *all* updates added during a DeferrableUpdate::doUpdate() call into
the subqueue, regardless of "defer until" stage or whether it implements
MergeableUpdate. Now, doUpdate() can run *everything* it enqueued instead
of a non-obvious subset. Note that the TransactionRoundDefiningUpdate
that invokes JobRunner was already a POSTSEND update before ba6490aa1eb;
the only effect of this change is that MergeableUpdate instances from jobs
will once again run in doExecuteJob().
* Make recursive DeferredUpdates::doUpdate() calls error out immediately
unless the DeferrableUpdate responsible is a TransactionRoundAwareUpdate
with the TRX_ROUND_ABSENT flag. This covers the schedulePostSendJobs()
scenario and only prohibits insane call patterns. Failing early avoids
the risk of handleUpdateQueue() dropping all the updates due to the same
DBTransactionError error in DeferredUpdates::attemptUpdate().
* Avoid recursion loop in tryOpportunisticExecute() when JobQueueDB is in
use and a large number of tasks are pending. This happened due to methods
like onTransactionPreCommitOrIdle() being used within JobQueueDB.
Mark DeferredUpdates::doUpdates()/tryOpportunisticExecute() as @internal
and create a Maintenance::shutdown() method to avoid a direct call in the
doMaintenance.php file.
Bug: T249069
Bug: T268840
Change-Id: Ib369f0e74243a48ababdb9cd83b155c9a0f5e741
Sometimes when moving pages, a row for the target page may already exist
in the watchlist_expiry table. The exact scenario that's causing the
prod errors could not be repo'd in tests or locally, but using REPLACE
should be a safe solution.
Tests updated to actually verify the expiry of the new title, if
present, is overriden with the old one following the page move.
Bug: T271971
Change-Id: Id4d46fcdea4816e5714d266985ba86fdc6450cfb
PageIdentity is intended as a lightweight alternative to Title,
similar to LinkTarget, but providing a page ID. It follows the precedent
of UserIdentity.
Bug: T208776
Change-Id: Iaed4871e0d32c67d4fb13e487625527f6a21e9c5
Most of these are found by the not yet released I10559d8.
I remove the type MockObject in some cases when the calling
code really does not need to know if he get's a mock or the
real thing. However, I do this only in places that are very
closely related to the fixes.
Change-Id: I26a4c3c5a8ae141bf56161b52b54bce7e68f2e30