Page MenuHomePhabricator

mediawiki.page_change.v1 should not contain events for undelete into existing pages.
Closed, ResolvedPublic

Description

In the EventBus PageChangeHooks implementation PageUndeleteCompleteHook is also triggered when restoring into an existing page. This behavior is similar to an import, effectively resembling a merge.

In the context of the mediawiki.page_change.v1 stream, this does not update the latest revision and could be misleading.

@dkinzler proposes modeling undeletes using domain events. We may eventually distinguish between "proper" undeletes (i.e., the page is recreated) and "undelete into existing" events. As we replace the use of PageUndeleteCompleteHook for the stream, we can revise the emission behavior accordingly.

Acceptance Criteria (AC)
  • "undelete into an existing page" events are not published mediawiki.page_change.v1

Details

Event Timeline

Change #1154283 had a related patch set uploaded (by Gmodena; author: Gmodena):

[mediawiki/extensions/EventBus@master] WIP: adopt undelete domain event.

https://gerrit.wikimedia.org/r/1154283

Change #1154283 merged by jenkins-bot:

[mediawiki/extensions/EventBus@master] adopt undeletion domain event

https://gerrit.wikimedia.org/r/1154283

Q: Is it possible for undelete into existing page to update the latest revision of that page? I assume the answer is no. If not, then +1 :)