| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- As suggested on I14944639e00407f59380c8787fd2810c7d24a5c9,
ChangeTrackingUpdateSpyTrait is a better place to assert on operations
performed by ChangeTrackingEventIngress than
DerivedPageDataUpdaterTest.
What:
- Add an expected number of enqueued CategoryMembershipChangeJobs to
ChangeTrackingUpdateSpyTrait.
- Update tests using the trait to specify the expected number of jobs.
- Clear hooks in relevant tests to avoid test failures when extensions
are loaded that attempt to call methods on the mocks set by
ChangeTrackingUpdateSpyTrait. These tests currently fail if
e.g. PageTriage, Echo or EventBus are loaded.
Bug: T390636
Change-Id: I6fe6cb87cd5a16b1ed39e0998c49713704633d71
|
|
|
|
|
| |
Bug: T353458
Change-Id: I7a9c74f2106655d41ae029742090253f541bd4a6
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- Use consistent naming scheme based on "before" and "after" to
represent the change.
What:
- rename getOldRevision to getLatestRevisionBefore
- rename getNewRevision to getLatestRevisionAfter
Bug: T388588
Change-Id: I30078f606f457981987d95def5b2aaae181f0690
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- clarify naming after modeling discussions
What:
- Rename PageEvent to PageStateEvent
- Rename PageUpdatedEvent to PageRevisionUpdatedEvent.
Bug: T388588
Change-Id: I987c93a443d364782e692e2cf71b878ccbc5a2fa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- Listeners that want to skip processing if the page content didn't
change should generally not skip reconciliation requests.
PageUpdatedEvent should offer getters that make this straightforward.
What:
- Add isNominalContentChange that will return false for dummy revisions
but true for null edits. This is the preferred way for listeners to
determine whether they can skip redundant processing of page content.
- Rename isContentChange to isEffectiveContentChange, to distinguish
it from isNominalContentChange.
- Rename isRevisionChange to isRevisionHistoryChange, to make it clear
that the change affects the sequences of revisions.
- Add test cases to PageUpdaterTest asserting the expected update
propagation for null edits and dummy revisions.
- Change ingress objects so that:
- the message cache is updated for null edits
- module caches are not cleared for dummy revisions
Bug: T383552
Change-Id: Idf6625d3e737e4a225648b0fd81cc929b095d315
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- Improve consistency, naming, documentation and definition of flags.
What:
- remove direct access to flags, provide a separate getter for each flag
instead.
- Deprecate EDIT_SUPPRESS_RC in favor of EDIT_SILENT
- Introduce EDIT_IMPLICIT to replace "automated" mode
- Introduce FLAG_RECONCILIATION_REQUEST into PageEvent.
- Introduce isReconciliationRequest into DomainEvent.
Bug: T383552
Change-Id: I2bffbb5810376829f871e1840ca799a8d8232dda
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- Improve test readability by removing awkward boiler plate code
for checking whether an event or hook was triggered.
What:
- Introduce ExpectCallbackTrait for asserting the number of times an
event or hook was triggered.
Bug: T376063
Change-Id: I97f83f38c0fd14c041525f8faa00cc164d7d1124
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- We want to refactor code that performs page lifecycle changes,
such as edit, create, delete, import, etc.
- The goal of the refactoring is to apply the observer pattern in
order to remove direct dependencies from page related code on
code that needs to be notified of the change.
- Before we start refactoring, we should cover the current behavior in
tests.
What
- Rename and clarify semantics of spy traits introduced earlier.
- Add coverage for talk page notifications
- Add coverage for resource loader module cache updates
- Fix dirty entries in Title instance cache after deletion
Bug: T378936
Change-Id: If06e2aa5bda84dfbee3278bf4a8d16064b6effc8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces the concept of a "cause" and "performer" into
PageUpdatedEvent. Causes are e.g. "edit" or "import" or "move".
The performer is the same as the author for edits, but not
necessarily for undeletions, moves, etc.
Note that cause and performer were already being tracked in
DerivedPageDataUpdater for logging purposes.
PageUpdatedEvent was modeling the cause using flags.
This change formalizes the concept of "cause" and "performer"
and ensures it is handled consistently.
As an aside, this simplifies some test cases in
DerivedPageDataUpdaterTest to avoid confused state.
Bug: T383031
Bug: T383095
Change-Id: I79bde5604790636c91848f265fffd81d6348a8b4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- It's useful to be able to listen to sets of compatible event types.
What:
- Make DomainEvents aware of a list of types they are compatible with.
- Make EventDispatchEngine dispatch to all compatible listeners,
registered for any of the supported types.
- Move all page events to their own namespace
Bug: T384330
Change-Id: I96bde2cfaf198e409a6ef3a24101ee7d02d57959
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Ice76519 we lost the mechanism for triggering updates for the search
index and message cache on import and undeletion. This change restores
the trigger for these updates.
To achieve this, the logic for instantiating PageUpdatedEvents is moved
into DerivedPageDataUpdater. Perhaps the firing of the event can be
moved into that class eventually.
To improve consistency, the flags field in PageUpdatedEvent is changed
from a bitmap corresponding to the flags field in PageUpdater to an
array corresponding to the options array in DerivedPageDataUpdater.
For regression testing, this change defines new test traits, one for
each ingress. These traits define the expected behavior of each ingress
in each relevant situation (edit, move, import, and undeletion).
Bug: T381225
Bug: T381299
Change-Id: Ib0d1dd143160fb64d42cacfbc75fbb55f5614c1c
|
|
|
|
|
|
|
|
| |
Changes to the use statements and some additions
are done automatically via script
This also updates @covers tag for the namespaced classes
Change-Id: I859ba6d05018c99710b744e2becab432410d3bca
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* When wgAutoCreateTempUser['enabled'] is true, calling ActorStore
::acquireActorId for an IP address user will throw a
CannotCreateActorException to prevent attributing actions to IP
addresses.
* When using Special:Undelete to undelete a page that has IP
addresses who have made edits, the UndeletePage call to the
ActorStore::acquireActorId causes an exception.
* However, the revisions already existed so (similar to importing
revisions) it does not represent a leak of the IP address.
* As such, it should be possible to undelete a page with revisions
performed by IP addresses.
What:
* Add ActorStore::getActorStoreForUndelete which works the same
as ActorStore::getActorStoreForImport. Having methods that
are named for undelete / import avoids the usage for other
code that should use ::getActorStore instead.
* Add RevisionStoreFactory::getRevisionStoreForUndelete which
uses the ActorStore returned by ActorStore
::getActorStoreForUndelete.
* Update the PageCommandFactory to take the RevisionStoreFactory
and then call ::getRevisionStore for all but UndeletePage where
the ::getRevisionStoreForUndelete method is called.
Bug: T362019
Bug: T365669
Change-Id: Ia7c583c625843f4f400e1c4aa7ea360519e63c87
|
|
|
|
|
|
|
| |
Changes to the use statements done automatically via script
Addition of missing use statements and changes to docs done manually
Change-Id: Ib326ae1e5c8409a98398c721e8b8ce42c73bd012
|
|
|
|
|
| |
Bug: T342301
Change-Id: I5ea01f7ee103570165261bde0965c5b65e04c369
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Similar to RevisionSQB (Ifd690dc8f030)
Bug: T344971
Change-Id: Ic520bcf09f4cc95ebd6a3990cff46dec5b7cd350
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The method should never be called directly, so make it throw an exception.
Nonetheless, mark it as deprecated and detect overrides in the
constructor, so that anyone who tries to override this method will see a
warning.
Fix the few tests that were relying on the existence of the test page.
Bug: T342428
Depends-On: Ic64ded5e2c0b59e7c888ece9566076058a125be4
Change-Id: I308617427309815062d54c14f3438cab31b08a73
|
|/
|
|
|
|
|
|
|
| |
Deprecating RevisionStore::getQueryInfo() and cleaning up a lot of code
Also removing a brittle test that wasn't really testing anything.
Bug: T344971
Change-Id: Ifd690dc8f030f86e3567a717eaeb830cb6dc703b
|
|
|
|
|
| |
Bug: T311866
Change-Id: I0324919f4e40f4e2db3dab1e9aacf74177170b20
|
|
|
|
|
| |
Bug: T299954
Change-Id: I85d21b1eff70a7d70e8ce14f25d66f7e7c76e5fe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|
|
|
|
|
| |
Makes it clear what about the value is (slot role name)
Change-Id: I0dc195aa24c0e699a32d3b07e62d58e90cfac84d
|
|
|
|
|
|
| |
Avoid parsing known titles in tests to improve performance
Change-Id: Ie240eb42479d19714e64cc4606e26073fadc2e13
|
|
|
|
|
|
|
|
|
|
|
| |
* Adds option to undelete associated talk page in the context of a
subject page
* If subject page undeletion fails, talk page undeletion is aborted
* If restoring the associated talk page fails, a status with a
warning message is returned
Bug: T304962
Change-Id: I7b30863060974d4079639f57178062d359956c2e
|
|
|
|
| |
Change-Id: I38299cb65eeaadfdc0eb05db4e8c0b0119cfb37d
|
|
|
|
|
|
|
|
|
| |
Add a new helper to MediaWikiIntegrationTestCase, since deleting pages
seems to be pretty common in tests.
Some calls to WikiPage::factory were also updated to use WikiPageFactory.
Change-Id: I5b5100273a00ac292a1900022ca79708fa254347
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add entry in MediaWikiServices, add wiring code, inject all dependencies.
Also add an alternative entry point with permission checks, like for
DeletePage.
The new service is no longer @unstable, and the relevant methods in
PageArchive were deprecated.
Bug: T290021
Change-Id: I452a98679f5bfea3f7367aacd5c930acffd32102
|
|
|
|
|
|
|
| |
Also make $comment a required parameter, for symmetry with DeletePage.
Bug: T290021
Change-Id: I0bb2c6b782bf4d61396657d367e182295f913f0e
|
|
|
|
|
| |
Bug: T290021
Change-Id: Idaf25a209a65b9a36a0a24473c76523ee3a17e8d
|
|
This is just moving code verbatim, removing now-unneeded stuff, and
duplicating tests as well.
Bug: T290021
Change-Id: I540ddaaa11dfabcf0b87b608b151b5e34d199fd8
|