Page MenuHomePhabricator

Update Pingback to use the Event Platform
Open, Needs TriagePublic

Description

From both a recent conversation with @daniel and per T200375: Implement Pingback v2, it seems that Pingback should be updated to use the Event Platform. This migration is a little more complicated as the event producer doesn't use EventLogging. This is because the instrument needs to run during installation when extensions aren't loaded.

TODO

Per T259163: Migrate legacy metawiki schemas to Event Platform:

  • Create /analytics/legacy/ schema
  • Edit-protect https://meta.wikimedia.org/wiki/Schema:MediaWikiPingback
  • Manually evolve the Hive table to use new schema
  • Update the queries in the analytics/reportupdater-queries repo
  • Add entries to wgEventStreams in operations/mediwiki-config
    • Since the Pingback instrument doesn't use EventLogging, we don't have to add entries to $wgEventLoggingStreamNames or $wgEventLoggingSchemas
  • Once the legacy stream's data is fully produced through EventGate, switch to using Refine job that uses schema repo instead of meta.wm.org

Links

  1. Implementation in MediaWiki Core
  2. https://wikitech.wikimedia.org/wiki/Event_Platform/EventLogging_legacy

Event Timeline

Oof, I didn't know there was a hardcoded use of EventLogging inside of MediaWiki core. This seems pretty fragile. This migration makes sense, but are we sure we want to continue doing this in the long term?

Oof, I didn't know there was a hardcoded use of EventLogging inside of MediaWiki core. This seems pretty fragile. This migration makes sense, but are we sure we want to continue doing this in the long term?

I think the question of whether we want to have pingback really depoends on the question of how much we want to support 3rd party installations. If we want to support them, having statistics about them is really helpful. So I personally think it's suprt important to have this.

What makes this difficult is that it's somethign that needs to happen during installation, so we can't rely on extensions. That makes it a bit awkward...

needs to happen during installation, we can't rely on extensions

We also can't rely on them, as perhaps we want stats on a MediaWiki with no extensions installed?

Perhaps receiving these stats should be fully encapsulated within MediaWiki core then, rather than relying on EventLogging/Event Platform? Some hardcoded API endpoint to receive and store stats in a MediaWiki database table?

Perhaps receiving these stats should be fully encapsulated within MediaWiki core then, rather than relying on EventLogging/Event Platform? Some hardcoded API endpoint to receive and store stats in a MediaWiki database table?

That code and table would be unused on all except one MediaWiki installations... There is only one instance (mediawiki.org, I guess) that receives Pingack, right?

So the code for sending it should be in core, but the code for receiving it shouldn't. It doesn't even need to be in MediaWiki at all, could be something else entirely.

Hm, yes, but I guess I mean at least this hardcoded producer code in MW core wouldn't have a hardcoded external dependency?

Meh, too much work for what this is. I don't love it, but I don't have a better solution. Proceed! :)