There is agreement around proposal T134502 for eventbus schema evolution.
This task is about updating mediwiki to fill-in missing information in the updated schemas.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | mforns | T134790 Extract edit oriented data from MySQL for simplewiki | |||
Resolved | None | T120037 Vital Signs: Please provide an "all languages" de-duplicated stream for the Community/Content groups of metrics | |||
Resolved | None | T120036 Vital Signs: Please make the data for enwiki and other big wikis less sad, and not just be missing for most days | |||
Resolved | odimitrijevic | T130256 Wikistats 2.0. | |||
Duplicate | mforns | T134793 User history in hadoop | |||
Resolved | Ottomata | T134502 Propose evolution of Mediawiki EventBus schemas to match needed data for Analytics need | |||
Resolved | Ottomata | T137287 Update MediaWiki hooks to generate data for new event-bus schemas | |||
Declined | JAllemandou | T134792 Spike - Slowly Changing Dimensions on Druid |
Event Timeline
Change 293293 had a related patch set uploaded (by Ottomata):
Easy updates for EventBus hooks. More difficult ones to follow.
In T134502#2326641 I wrote about how to implement user_blocks_change event:
The hook we would be able to use now to get this info is > BlockIpComplete. As is, this hook does not provide us with the previous state. We'd have to make modifications to SpecialBlock.php to get this. The code in maybeAlterFormDefaults() does look up previously saved block info from the db before submitting the form. We could save the $block object returned by Block::newFromTarget( $this->target ); on the SpecialBlock object, and then pass it to the BlockIpComplete hook later.
But doh, this won't work! The BlockIpComplete hook is run from [[ https://github.com/wikimedia/mediawiki/blob/master/includes/specials/SpecialBlock.php#L789 | processForm() ]], which is static, I guess called by some other place deep in Mediawiki. Plus maybeAlterFormDefaults is for presenting the form to the user, not intaking it, so it would be premature there anyway.
So, now I'm not sure how to do this without an extra db lookup during form submission. @aaron, thoughts?
Change 293628 had a related patch set uploaded (by Aaron Schulz):
Add any prior block to BlockIpComplete hook
Ok, it looks like processForm() does actually look up the previous block before submitting, if an initial insert fails.
The $currentBlock is altered and then $currentBlock-update() is called. I think I'll need to implement Block::clone in order to do $previousBlock = clone $currentBlock so that I have an untouched object I can work with once I get to emitting BlockIpComplete. TODO!
Change 293756 had a related patch set uploaded (by Ottomata):
Pass previous IP/User block state to BlockIPComplete hook as $previousBlock
Change 293805 had a related patch set uploaded (by Ottomata):
Add $visibilityChangeMap parameter to RevDelList doPostCommitUpdates
Change 293756 abandoned by Ottomata:
Pass previous IP/User block state to BlockIPComplete hook as $previousBlock
Reason:
Done by Aaron in https://gerrit.wikimedia.org/r/#/c/293628
Change 293805 merged by jenkins-bot:
Add $visibilityChangeMap parameter to RevDelList doPostCommitUpdates
Change 297630 had a related patch set uploaded (by Ottomata):
Updates for page_move, revision_visibility_change and user_blocks_change
Change 298567 had a related patch set uploaded (by Ottomata):
More changes for updates to schemas in https://gerrit.wikimedia.org/r/#/c/288210
Change 302605 had a related patch set uploaded (by Ottomata):
[WIP] Create new events matching new schemas in https://gerrit.wikimedia.org/r/#/c/301284/
Change 293293 abandoned by Ottomata:
Easy updates for EventBus hooks. More difficult ones to follow.
Reason:
Abandoning in favor of https://gerrit.wikimedia.org/r/#/c/302605/
Change 297630 abandoned by Ottomata:
Updates for page_move, revision_visibility_change and user_blocks_change
Reason:
Abandoning in favor of https://gerrit.wikimedia.org/r/#/c/302605/
Change 298567 abandoned by Ottomata:
[WIP] More changes for updates to schemas in https://gerrit.wikimedia.org/r/#/c/288210
Reason:
Abandoning in favor of https://gerrit.wikimedia.org/r/#/c/302605/
Change 302605 merged by Ottomata:
Create new events matching new schemas in https://gerrit.wikimedia.org/r/#/c/301284/
We are ready to go! I want to wait until next week's deployment train, so I can make sure I'm more present to babysit it.