Page MenuHomePhabricator

Domain events: Establish the concept of ingress objects
Closed, ResolvedPublic2 Estimated Story Points

Description

The domain event framework defines the DomainEventSubscriber interface for objects that self-register listeners. It allows related listeners to be grouped together. The framework provides EventSubscriberBase as a base class for supporting listener methods based on naming conventions.

Experimentation with using subscriber objects to trigger updates in extensions and across components components has shown that the concpet of "ingress objects" is more meaningful from the receiver's side than the concept of a "subscriber": "subscriber" is the mechanism by which the listeners get registered with the event source, but it's not meaningful to the implementation of listeners. The idea of an "ingress" however is: an ingress object acts as an adapter for incoming events, interpreting them in the content of the recipient's behavior and model.

To establish this concept and model it explicitly, we should:

  • rename the EventSubscriberBase class to EventIngressBase DomainEventIngress (but keep the DomainEventSubscriber interface as it is and keep support for the old name) - see also T390735.
  • rename the DomainEventSubscribers key in extension.json to DomainEventIngress (but keep support for the old name).
  • update extensions to use the new name
    • CommunityConfiguration
    • GrowthExperiments
    • ContentTranslation
    • Linter
    • Wikistories
    • Gadgets (from EventIngressBase!)
  • Remove the class alias for EventSubscriberBase
  • Remove support for the DomainEventSubscribers key in extension.json

Event Timeline

Change #1128216 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] extension.json: DomainEventIngress instead of DomainEventSubscribers

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

Change #1127850 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] EventSubscriberBase: rename to EventIngressBase

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

Change #1127850 merged by jenkins-bot:

[mediawiki/core@master] EventSubscriberBase: rename to EventIngressBase

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

Change #1128216 merged by jenkins-bot:

[mediawiki/core@master] extension.json: DomainEventIngresses instead of DomainEventSubscribers

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

Before we renaming things in extensions we should wait for https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1133876 to ride the train. That makes things easier in case it needs to be reverted.

daniel triaged this task as High priority.Apr 4 2025, 7:27 AM
daniel lowered the priority of this task from High to Medium.

Change #1134745 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/extensions/CommunityConfiguration@master] Rename classes and methods on page related events to match the design document

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

Change #1134749 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/extensions/Wikistories@master] Rename classes and methods on page related events to match the design document

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

Change #1134743 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/extensions/ContentTranslation@master] Rename classes and methods on page related events to match the design document

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

Change #1134747 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/extensions/Linter@master] Rename classes and methods on page related events to match core

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

Change #1134744 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/extensions/GrowthExperiments@master] Rename classes and methods on page related events to match core

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

Change #1134750 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/extensions/Gadgets@master] Rename classes and methods on page related events to match the design document

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

aaron updated the task description. (Show Details)
aaron set the point value for this task to 2.Apr 8 2025, 2:30 PM

Change #1135512 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/core@master] [WIP] Remove deprecated DomainEvent-related alias classes and methods

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

Change #1134747 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Rename classes and methods on page related events to match core

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

Change #1134750 merged by jenkins-bot:

[mediawiki/extensions/Gadgets@master] Rename classes and methods on page related events to match core

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

Change #1134749 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Update classes and methods on page related events to match core

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

Change #1134743 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Rename classes and methods on page related events to match core

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

Change #1134745 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] Rename classes and methods on page related events to match core

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

Change #1134744 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Rename classes and methods on page related events to match core

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

Note that https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1135512 still remains open. Looks like gerritbot didn't mention it here.

Change #1135512 merged by jenkins-bot:

[mediawiki/core@master] DomainEvents: Remove deprecated DomainEvent-related alias classes and methods

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