Page MenuHomePhabricator

Investigate if the new 'Multiblocks' user blocks feature affects the mediawiki.user-blocks-change event stream
Closed, ResolvedPublic5 Estimated Story Points

Description

Community Tech recently implemented a Multiblocks feature. IIUC, this feature allows different types of blocks on a user to have different expiration dates.

I'm not certain, but I believe this will change the semantics of the mediawiki.user-blocks-change event stream emitted by EventBus via the BlockIpComplete hook. The mediawiki/user/blocks-change event schema represents the current states of blocks for a user, but only has a single expiration date field for the blocks.

Done is:

  • Decision made on if work is needed to update the user blocks change event stream to account for the Multiblocks feature. If so, a new task should be created to describe the needed work.

If we do need to make a change here, we may want to do so by implementing a more comprehensive mediawiki.user_change.v1 state change event stream, similar to the more recently designed and created mediawiki.page_change.v1 stream.

Note: this might have implications for {T348252} as well.

Event Timeline

WDoranWMF set the point value for this task to 5.

From a Data Products perspective, we don't seem to consume mediawiki.user-blocks-change in any Airflow DAGs, so this change doesn't seem to have cascading effects. We do still have to deal with T348252 from a Dumps 2.0 perspective, but that was known work before this ticket.

Table wmf.mediawiki_user_history does expose user blocks, but it exposes them in an array already. It does not expose expiration dates. As per the technical details of this new Multiblocks feature, there are significant database schema changes. But a cursory look at the code that generates wmf.mediawiki_user_history suggests that no changes would be needed since the job consumes block logs from the logging table rather than going directly to the ipblocks table.

@VirginiaPoundstone Is there any action that CommTech needs to take at this stage? Just wondering if we can remove from our backlog or if we need to create a ticket

@JWheeler-WMF EventBus extension uses the BlockIpComplete hook. If there are no changes to this hook API, then there are no changes needed for EventBus or the mediawiki.user-blocks-change stream. However, I'd assume that to accomodate Multiblocks feature, the hook will need to be changed to represent the multiple expiration dates of the different blocks.

If the hook interface and semantics are changed, then EventBus and the mediawiki/user/blocks-change schema will need updating to use the new hook.

So I guess the q is: Will the BlockIpComplete API change, and if so, how? :)

Thanks!

@xcollazo we are all clear on Dumps 1 also?

All clear. None of this is used by Dumps 1.0.